[Winpcap-users] My Problem at Interpreting the packets

Gianluca Varenni gianluca.varenni at cacetech.com
Wed Dec 13 16:21:12 GMT 2006


the sample you are using filters the packet with "ip and udp", so all the 
tcp packets are discarded.

The filter is compiled in the line

00080 char packet_filter[] = "ip and udp";
00081 struct bpf_program fcode;
00153     //compile the filter
00154     if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 )
00162     //set the filter
00163     if (pcap_setfilter(adhandle, &fcode)<0)

You need to either remove or modify the filter (e.g. "ip and tcp") to see 
the web traffic.

Have a nice day

----- Original Message ----- 
From: "Mesut Timur" <mesut_timur at hotmail.com>
To: <winpcap-users at winpcap.org>
Sent: Wednesday, December 13, 2006 1:46 AM
Subject: [Winpcap-users] My Problem at Interpreting the packets

> Hi everyone
> I have a problem at Interpreting the packets [WinPcap tutorial: a step by 
> step guide to using WinPcap] tutorial.
> When i compile the code at this tutorial also can be found at 
> http://www.winpcap.org/docs/docs_40b3/html/group__wpcap__tut6.html
> It is working as:
> ------------------------------------------------
> 11:39:32.981098 len:86 ->
> 11:39:32.994606 len:211 ->
> 11:39:42.197688 len:356 ->
> ------------------------------------------------
> First; is local are interface of my router; and
> is the ip of the wide area interface of my router; which has 
> been assigned by my ISP.
> is the dns server's ip of my ISP.
> And there isn't any different ip while sniffing.For example; when i am 
> connecting www.winpcap.org []; it doesn't show that ip at 
> sniffin window.
> So i wonder what is the problem about the code; how can i sniff all the 
> traphic.I am waiting for your answers.
> Thanks!
> Mesut Timur
> _________________________________________________________________
> Share your latest news with your friends with the Windows Live Spaces 
> friends module. 
> http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 

More information about the Winpcap-users mailing list