There is no need to use 2 threads. After you get the packet, you can see the protocol field, in the ip_header
it will be 6 for tcp and 17 for udp. -ashley Hello, Could you tell me if it is possible to get the information about kind of packet I caught? Let's assume I use bpf filter which allows only TCP and UDP packets to go up my protocol stack. How can I recognize which one I have in *p obtained from pcap_dispatch? I know I can use two filters but it forces me to use threads for each kind of packet I want to catch. Bpf does the header checking so it could inform me that this packet is TCP and this one is UDP. Is it possible? thanks for quick answer all the best Sebastian Proba - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe
