If has_snaplen isn't set, don't set the snapshot length with pcap_create()/pcap_activ...
authorGuy Harris <guy@alum.mit.edu>
Sat, 3 Jun 2017 17:14:39 +0000 (10:14 -0700)
committerGuy Harris <guy@alum.mit.edu>
Sat, 3 Jun 2017 17:15:17 +0000 (17:15 +0000)
commit2814e3c9cd4d9393231a746b4ef1bb1e6b7d95c9
tree99288e1365f2d48220a1d40d8b8a2426f9db0c91
parent8e1cd0453c787d72026e5a0193a3d3992d50226e
If has_snaplen isn't set, don't set the snapshot length with pcap_create()/pcap_activate().

Just let libpcap pick the snapshot length; that way, for link-layer
types that need a really large snapshot length, such as D-Bus (which
requires 128MB for the largest messages), it can pick that, but can
otherwise pick something that doesn't require as much memory, e.g.
256KB.

For pcap_open_live() and pcap_open(), which don't have a way of saying
"give me what's appropriate", pick 256KB.

Change-Id: Idef5694f7dfa85eaf3a61d6ca7a17d263c417431
Reviewed-on: https://code.wireshark.org/review/21917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
capchild/capture_sync.c
caputils/capture-pcap-util.c