forked from Mirrors/sngrep
capture: Increase capture snaplen for live captures #150
This commit is contained in:
parent
b764ec6722
commit
9f0600c96d
|
@ -128,7 +128,7 @@ capture_online(const char *dev, const char *outfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open capture device
|
// Open capture device
|
||||||
capinfo->handle = pcap_open_live(dev, BUFSIZ, 1, 1000, errbuf);
|
capinfo->handle = pcap_open_live(dev, MAXIMUM_SNAPLEN, 1, 1000, errbuf);
|
||||||
if (capinfo->handle == NULL) {
|
if (capinfo->handle == NULL) {
|
||||||
fprintf(stderr, "Couldn't open device %s: %s\n", dev, errbuf);
|
fprintf(stderr, "Couldn't open device %s: %s\n", dev, errbuf);
|
||||||
return 2;
|
return 2;
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
|
|
||||||
//! Max allowed packet assembled size
|
//! Max allowed packet assembled size
|
||||||
#define MAX_CAPTURE_LEN 20480
|
#define MAX_CAPTURE_LEN 20480
|
||||||
|
//! Max allowed packet length
|
||||||
|
#define MAXIMUM_SNAPLEN 262144
|
||||||
|
|
||||||
//! Define VLAN 802.1Q Ethernet type
|
//! Define VLAN 802.1Q Ethernet type
|
||||||
#ifndef ETHERTYPE_8021Q
|
#ifndef ETHERTYPE_8021Q
|
||||||
|
|
Loading…
Reference in New Issue