I just ran into a problem with pcap-snoop.c on a SG platform in the line "if
(ioctl(fd, SIOCSNOOPLEN, &snaplen) < 0) {". I have a fix that seems to
work, at least for my purposes, but I thought you might like to know.
With an MTU of 1500, if snaplen is set at 1518 (1500 plus the Ethernet
header size), the ioctl fails because the size is invalid, while if snaplen
is set at 1500, pcap doesn't get the complete packet with maximum-size
packets. If I have things figured out right, the ioctl wants a size without
the Ethernet header while other code in pcap needs the size including the
Ethernet header. I modified pcap-snoop.c to create a local variable set to
snaplen - 18 and pass that to the ioctl, and that seems to solve the problem
although I haven't done a lot of testing.
Thanks for making pcap available! It's a handy thing to have.
Sincerely,
Nathan A. Barclay
Teledyne Brown Engineering
(256) 726-3847
[EMAIL PROTECTED]
-
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