K
Kifah Abbad
hi guys,
Supposidly i have a function
code:--------------------------------------------------------------------------------
decode_ip(u_char *packet, u_char flags)
--------------------------------------------------------------------------------
that has a variable which is
code:--------------------------------------------------------------------------------
char destination_ip[40]; //Here we save destination IP
--------------------------------------------------------------------------------
where we save a specific value
code:--------------------------------------------------------------------------------
/*Kifah this part is for saving destination IP somewhere*/
sprintf(destination_ip,"%d.%d.%d.%d",
(packet[16] & 0xff),
(packet[17] & 0xff),
(packet[18] & 0xff),
(packet[19] & 0xff));
--------------------------------------------------------------------------------
Now i wanna "pass" the value saved in it, to another function:
code:--------------------------------------------------------------------------------
void socket_connect(struct scoop_pack *vp)
{
..
..
..
//something maybe like?
their_addr.sin_addr.s_addr = inet_addr(destination_ip);
--------------------------------------------------------------------------------
Is that possible? how would be able to pass it then?
Thanks in advance
Supposidly i have a function
code:--------------------------------------------------------------------------------
decode_ip(u_char *packet, u_char flags)
--------------------------------------------------------------------------------
that has a variable which is
code:--------------------------------------------------------------------------------
char destination_ip[40]; //Here we save destination IP
--------------------------------------------------------------------------------
where we save a specific value
code:--------------------------------------------------------------------------------
/*Kifah this part is for saving destination IP somewhere*/
sprintf(destination_ip,"%d.%d.%d.%d",
(packet[16] & 0xff),
(packet[17] & 0xff),
(packet[18] & 0xff),
(packet[19] & 0xff));
--------------------------------------------------------------------------------
Now i wanna "pass" the value saved in it, to another function:
code:--------------------------------------------------------------------------------
void socket_connect(struct scoop_pack *vp)
{
..
..
..
//something maybe like?
their_addr.sin_addr.s_addr = inet_addr(destination_ip);
--------------------------------------------------------------------------------
Is that possible? how would be able to pass it then?
Thanks in advance