mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 19:39:07 +00:00
Update to libpcap 1.9.1 (initial commit, no Nmap-specific patches)
This commit is contained in:
@@ -514,11 +514,20 @@
|
||||
#define LINKTYPE_RAIF1 198
|
||||
|
||||
/*
|
||||
* IPMB packet for IPMI, beginning with the I2C slave address, followed
|
||||
* by the netFn and LUN, etc.. Requested by Chanthy Toeung
|
||||
* <chanthy.toeung@ca.kontron.com>.
|
||||
* IPMB packet for IPMI, beginning with a 2-byte header, followed by
|
||||
* the I2C slave address, followed by the netFn and LUN, etc..
|
||||
* Requested by Chanthy Toeung <chanthy.toeung@ca.kontron.com>.
|
||||
*
|
||||
* XXX - its DLT_ value used to be called DLT_IPMB, back when we got the
|
||||
* impression from the email thread requesting it that the packet
|
||||
* had no extra 2-byte header. We've renamed it; if anybody used
|
||||
* DLT_IPMB and assumed no 2-byte header, this will cause the compile
|
||||
* to fail, at which point we'll have to figure out what to do about
|
||||
* the two header types using the same DLT_/LINKTYPE_ value. If that
|
||||
* doesn't happen, we'll assume nobody used it and that the redefinition
|
||||
* is safe.
|
||||
*/
|
||||
#define LINKTYPE_IPMB 199
|
||||
#define LINKTYPE_IPMB_KONTRON 199
|
||||
|
||||
/*
|
||||
* Juniper-private data link type, as per request from
|
||||
@@ -549,15 +558,35 @@
|
||||
*/
|
||||
#define LINKTYPE_LAPD 203
|
||||
|
||||
|
||||
/*
|
||||
* Variants of various link-layer headers, with a one-byte direction
|
||||
* pseudo-header prepended - zero means "received by this host",
|
||||
* non-zero (any non-zero value) means "sent by this host" - as per
|
||||
* Will Barker <w.barker@zen.co.uk>.
|
||||
* PPP, with a one-byte direction pseudo-header prepended - zero means
|
||||
* "received by this host", non-zero (any non-zero value) means "sent by
|
||||
* this host" - as per Will Barker <w.barker@zen.co.uk>.
|
||||
*/
|
||||
#define LINKTYPE_PPP_WITH_DIR 204 /* Don't confuse with LINKTYPE_PPP_PPPD */
|
||||
|
||||
/*
|
||||
* Cisco HDLC, with a one-byte direction pseudo-header prepended - zero
|
||||
* means "received by this host", non-zero (any non-zero value) means
|
||||
* "sent by this host" - as per Will Barker <w.barker@zen.co.uk>.
|
||||
*/
|
||||
#define LINKTYPE_PPP_WITH_DIR 204 /* PPP */
|
||||
#define LINKTYPE_C_HDLC_WITH_DIR 205 /* Cisco HDLC */
|
||||
|
||||
/*
|
||||
* Frame Relay, with a one-byte direction pseudo-header prepended - zero
|
||||
* means "received by this host" (DCE -> DTE), non-zero (any non-zero
|
||||
* value) means "sent by this host" (DTE -> DCE) - as per Will Barker
|
||||
* <w.barker@zen.co.uk>.
|
||||
*/
|
||||
#define LINKTYPE_FRELAY_WITH_DIR 206 /* Frame Relay */
|
||||
|
||||
/*
|
||||
* LAPB, with a one-byte direction pseudo-header prepended - zero means
|
||||
* "received by this host" (DCE -> DTE), non-zero (any non-zero value)
|
||||
* means "sent by this host" (DTE -> DCE)- as per Will Barker
|
||||
* <w.barker@zen.co.uk>.
|
||||
*/
|
||||
#define LINKTYPE_LAPB_WITH_DIR 207 /* LAPB */
|
||||
|
||||
/*
|
||||
@@ -1081,7 +1110,12 @@
|
||||
*/
|
||||
#define LINKTYPE_DISPLAYPORT_AUX 275
|
||||
|
||||
#define LINKTYPE_MATCHING_MAX 275 /* highest value in the "matching" range */
|
||||
/*
|
||||
* Linux cooked sockets v2.
|
||||
*/
|
||||
#define LINKTYPE_LINUX_SLL2 276
|
||||
|
||||
#define LINKTYPE_MATCHING_MAX 276 /* highest value in the "matching" range */
|
||||
|
||||
/*
|
||||
* The DLT_ and LINKTYPE_ values in the "matching" range should be the
|
||||
@@ -1240,18 +1274,30 @@ linktype_to_dlt(int linktype)
|
||||
/*
|
||||
* Return the maximum snapshot length for a given DLT_ value.
|
||||
*
|
||||
* For most link-layer types, we use MAXIMUM_SNAPLEN, but for DLT_DBUS,
|
||||
* the maximum is 134217728, as per
|
||||
* For most link-layer types, we use MAXIMUM_SNAPLEN.
|
||||
*
|
||||
* For DLT_DBUS, the maximum is 128MiB, as per
|
||||
*
|
||||
* https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
|
||||
*
|
||||
* For DLT_USBPCAP, the maximum is 1MiB, as per
|
||||
*
|
||||
* https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15985
|
||||
*/
|
||||
u_int
|
||||
max_snaplen_for_dlt(int dlt)
|
||||
{
|
||||
if (dlt == DLT_DBUS)
|
||||
return 134217728;
|
||||
else
|
||||
switch (dlt) {
|
||||
|
||||
case DLT_DBUS:
|
||||
return 128*1024*1024;
|
||||
|
||||
case DLT_USBPCAP:
|
||||
return 1024*1024;
|
||||
|
||||
default:
|
||||
return MAXIMUM_SNAPLEN;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user