Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-03 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guy Harris wrote: > Checked in, with some changes to handle old-style SOCK_PACKET sockets on > Linux (pcap_setdirection() isn't supported there, as the direction isn't > available), and to use the standard tab-based indentation. > I've added support fo

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-03 Thread Guy Harris
Which e-mail address should I use in the CREDITS file? I used your GMail address. - This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-03 Thread Guy Harris
Pawel Pokrywka wrote: Here comes my latest patch. Checked in, with some changes to handle old-style SOCK_PACKET sockets on Linux (pcap_setdirection() isn't supported there, as the direction isn't available), and to use the standard tab-based indentation. On unsupported capture mechanisms setdire

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-03 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here comes my latest patch. Changes from previous version: - - Changed name of pcap_direction() to pcap_setdirection(). - - Makes use of function pointers, so calling pcap_setdirection() on anything other than Linux will return -1 and set error text fo

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-03 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > A pcap_t structure, as of 0.8, contains a list of function pointers for > various libpcap operations; look for "Methods" in pcap-int.h. > > You'd add a "direction_op" member, which would be a function with the > same arguments as pcap_direction().

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-02 Thread Guy Harris
Pawel Pokrywka wrote: Back to pcap_direction() function. I think I better like idea, that pcap_direction() should return error when given direction is not supported on users platform. If there are no better ways, enclosing pcap_direction() body and direction checks in pcap_read_packet() with #ifdef

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-02 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guy Harris wrote: > Pawel Pokrywka wrote: > >> For me, only D_IN is required, so I would be happy with this direction >> only :) >> I don't know other platforms, but are you sure that there is no way to >> implement for example D_IN, when there is D_O

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-02 Thread Guy Harris
Pawel Pokrywka wrote: For me, only D_IN is required, so I would be happy with this direction only :) I don't know other platforms, but are you sure that there is no way to implement for example D_IN, when there is D_OUT and D_INOUT? Maybe there are other problems, but substracting D_OUT from D_INO

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-02 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> To specify direction pcap_direction() have to be called after >> pcap_open_live() with desired direction (D_IN, D_OUT, D_INOUT). Default >> direction, in case pcap_direction() was not called is D_INOUT. > >Are all three of those needed? > >On some p

Re: [tcpdump-workers] streamlined direction patch for libpcap

2005-05-01 Thread Guy Harris
Pawel Pokrywka wrote: Hello, I need to specify packet direction for my sniffing application, but current libpcap doesn't offer this functionality. I've found a patch[1], which adds ability to set direction of packet capture. The patch works good, but it modifies pcap_pkthdr struct from pcap.h, whic

[tcpdump-workers] streamlined direction patch for libpcap

2005-04-30 Thread Pawel Pokrywka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I need to specify packet direction for my sniffing application, but current libpcap doesn't offer this functionality. I've found a patch[1], which adds ability to set direction of packet capture. The patch works good, but it modifies pcap_pkthdr