Re: Destination_IP Field in packets coming from QUEUE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey man.
It works.
Thank You very much, Henrik.
It was about my degree thesis, You can't figure out
how much helpfull and important this was to me.

Thank You again.
thank you all.

Lore

--- Henrik Nordstrom <hno@xxxxxxxxxxxxxxx> ha scritto:


> On Sat, 1 Oct 2005, Lore wrote:
> 
> > Hi, At the moment I'm not able to run the program
> as
> > root. But what follow is the code that shows me
> the
> > wrong IP.
> 
> >    printf("S_ADDR:%s,D_ADDR:%s\n",
> >                    inet_ntoa(iph->saddr),
> >                    inet_ntoa(iph->daddr));
> 
> inet_ntoa can not be used like this. Each call to
> inet_ntoa overwrites the 
> result string. (see man inet_ntoa)
> 
> The following will give better results:
> 
>      printf("S_ADDR:%s", inet_ntoa(iph->saddr));
>      printf(",D_ADDR:%s\n", inet_ntoa(iph->daddr));
> 
> Regards
> Henrik
> 



		
___________________________________ 
Yahoo! Messenger: chiamate gratuite in tutto il mondo 
http://it.messenger.yahoo.com


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux