Re: [tcpdump-workers] Seeking in tcpdump files

2005-11-11 Thread Christian Kreibich
Hi Evan, if Guy's points aren't a concern for you, you can just use libpcapnav. It provides pcapnav_get_offset() which does what you want. http://netdude.sourceforge.net/doco/libpcapnav/index.html Cheers, Christian. --

Re: [tcpdump-workers] Seeking in tcpdump files

2005-11-11 Thread Guy Harris
On Nov 11, 2005, at 1:48 PM, Evan Hughes wrote: I'm building a library that indexes packets in libpcap files. In order to create and use such an index, I'd like to be able to get the file location that each packet starts at. Would I be violating encapsulation if I just use pcap_file()

[tcpdump-workers] Seeking in tcpdump files

2005-11-11 Thread Evan Hughes
Howdy, I'm building a library that indexes packets in libpcap files. In order to create and use such an index, I'd like to be able to get the file location that each packet starts at. Would I be violating encapsulation if I just use pcap_file() to grab the file handle at the current packe

Re: [tcpdump-workers] Libpcap compile

2005-11-11 Thread Alexander Dupuy
Guy Harris writes: tcp && (ip[2:2] > (((ip[0]&0xF) + (tcp[12] >> 4)) << 2)) Extending this to check for TCP or UDP with non-empty payload, I got the following: # tcpdump -d 'ip && ((tcp && (ip[2:2] > ((ip[0]&0xF) + (tcp[12] >> 4)) << 2)) || (udp && udp[4:2] > 8))' (000) ldh [12] (001

Re: [tcpdump-workers] more advanced feature of libpcap?

2005-11-11 Thread Vossie
Thanks guy snip-- It cannot, for example, detect packets lost on the network before they arrive on the machine running the libpcap-based interface, such as packets dropped by a router or switch because packet buffers overflowed; that would have to be done, somehow, by the applicati

Re: [tcpdump-workers] libpcap and a proxy server

2005-11-11 Thread Vossie
Hi Amitesh Sorry for not replying earlier. I was not on campus yesterday. The University of Pretoria uses a firewall to limit access to the Internet but also a proxy server (for the students). According to someone I have spoken about my problem the proxy server also uses the firewall for outsi