diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-02-23 19:00:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-02-23 19:00:30 +0000 |
commit | 1514fcff5f94bc02e1c4ee117bdacb459ebd184c (patch) | |
tree | 8e89acab04fdc2ccc4c0fc40bf2a876fa466d4fb /capture-pcap-util.h | |
parent | b93465327798583bbc7ee89f26eae8f6273ec130 (diff) | |
download | wireshark-1514fcff5f94bc02e1c4ee117bdacb459ebd184c.tar.gz wireshark-1514fcff5f94bc02e1c4ee117bdacb459ebd184c.tar.bz2 wireshark-1514fcff5f94bc02e1c4ee117bdacb459ebd184c.zip |
Have the minimum snapshot length be 1 byte, and have a snapshot length
of 0 mean 65535, similar to what tcpdump does.
Fixes bug 2731.
svn path=/trunk/; revision=27526
Diffstat (limited to 'capture-pcap-util.h')
-rw-r--r-- | capture-pcap-util.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/capture-pcap-util.h b/capture-pcap-util.h index 9d91387b26..b00401a790 100644 --- a/capture-pcap-util.h +++ b/capture-pcap-util.h @@ -36,14 +36,13 @@ extern "C" { #include <pcap.h> /* - * XXX - this is also the traditional default snapshot size in - * tcpdump - but, if IPv6 is enabled, it defaults to 96, to get an - * IPv6 header + TCP + 22 extra bytes. - * - * Some libpcap versions for particular capture devices might happen - * to impose a minimum, but it's not always 68. + * A snapshot length of 0 is useless - and libpcap/WinPcap don't guarantee + * that a snapshot length of 0 will work, and, on some platforms, it won't + * (with BPF, for example, the kernel is told the snapshot length via the + * return value of the BPF program, and a return value of 0 means "drop + * the packet"), so the minimum packet size is 1 byte. */ -#define MIN_PACKET_SIZE 68 /* minimum amount of packet data we can read */ +#define MIN_PACKET_SIZE 1 /* minimum amount of packet data we can read */ /* * The list of interfaces returned by "get_interface_list()" is |