Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-07 Thread James Deucker
Hi, what you're most likely after is if (pinfo->match_port == pinfo->destport) { -- thanks, James On 7 December 2010 15:04, 刘昆 wrote: > 于 2010年12月07日 11:56, Guy Harris 写道: > > > On Dec 6, 2010, at 7:48 PM, 刘昆 wrote: > > I have solve this problem about get ip address.However there is > anot

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread Richard Sharpe
On Mon, Dec 6, 2010 at 11:04 PM, 刘昆 wrote: > 于 2010年12月07日 11:56, Guy Harris 写道: > > On Dec 6, 2010, at 7:48 PM, 刘昆 wrote: > > I have solve this problem about get ip address.However there is > another question,When I print the ip address I notice there are two > ip addresses I get. > > Yes, there

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread 刘昆
于 2010年12月07日 11:56, Guy Harris 写道: On Dec 6, 2010, at 7:48 PM, 刘昆 wrote: I have solve this problem about get ip address.However there is another question,When I print the ip address I notice there are two ip addresses I get. Yes, there are two IP addresses in every IP packet - the source

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread Guy Harris
On Dec 6, 2010, at 7:48 PM, 刘昆 wrote: > I have solve this problem about get ip address.However there is another > question,When I print the ip address I notice there are two ip addresses I > get. Yes, there are two IP addresses in every IP packet - the source address, pinfo->src, and the dest

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread 刘昆
于 2010年12月07日 10:47, Guy Harris 写道: On Dec 6, 2010, at 6:39 PM, 刘昆 wrote: Thank you. Now I have noticed "data" is a pointer I add "printf("%s\n",(pinfo->src).data)" For almost all address types, including IPv4 and IPv6 addresses, the data field does *NOT* point to a text string. Wireshark

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread Guy Harris
On Dec 6, 2010, at 6:39 PM, 刘昆 wrote: > Thank you. Now I have noticed "data" is a pointer > > I add "printf("%s\n",(pinfo->src).data)" For almost all address types, including IPv4 and IPv6 addresses, the data field does *NOT* point to a text string. Wireshark deals with binary packet data; it

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread 刘昆
于 2010年12月07日 09:56, Guy Harris 写道: On Dec 6, 2010, at 5:47 PM, 刘昆 wrote: I want to find out the ip source address in packet-http.c.At first,I thought dissect_http:pinfo->src->data should save the ip source address,however when I use gdb to print pinfo->src->data ,the value is "0x8b5301a" .But

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread Bill Meier
On 12/6/2010 8:56 PM, Guy Harris wrote: > > On Dec 6, 2010, at 5:47 PM, 刘昆 wrote: > >> I want to find out the ip source address in packet-http.c.At first,I >> thought dissect_http:pinfo->src->data should save the ip source >> address,however when I use gdb to print pinfo->src->data ,the value is >>

Re: [Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread Guy Harris
On Dec 6, 2010, at 5:47 PM, 刘昆 wrote: > I want to find out the ip source address in packet-http.c.At first,I > thought dissect_http:pinfo->src->data should save the ip source > address,however when I use gdb to print pinfo->src->data ,the value is > "0x8b5301a" .But my ipv4 address is "10.32.59.4

[Wireshark-dev] where can I find the ip src address in packet-http.c

2010-12-06 Thread 刘昆
I want to find out the ip source address in packet-http.c.At first,I thought dissect_http:pinfo->src->data should save the ip source address,however when I use gdb to print pinfo->src->data ,the value is "0x8b5301a" .But my ipv4 address is "10.32.59.49 ",it seems the two values don't match.So what'