From: Guy Harris Date: Tue, 25 Sep 2018 20:59:06 +0000 (-0700) Subject: Give more details for the _WITH_DIR types. X-Git-Tag: libpcap-1.10-bp~786 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/ddaaa08cea14f378158b6b45f56d464bd3ae345e Give more details for the _WITH_DIR types. The original request just spoke of "sent by this host" and "received by this host"; for X.25 LAPB and Frame Relay LAPF, "this host" is probably a piece of Data Terminal Equipment rather than Data Communications Equipment, so we treat "sent by this host" as DTE->DCE and "received by this host" as DCE->DTE. --- diff --git a/pcap-common.c b/pcap-common.c index 12ed4dbb..8b7ffa52 100644 --- a/pcap-common.c +++ b/pcap-common.c @@ -549,15 +549,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 . + * 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 . + */ +#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 . */ -#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 + * . + */ #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 + * . + */ #define LINKTYPE_LAPB_WITH_DIR 207 /* LAPB */ /* diff --git a/pcap/dlt.h b/pcap/dlt.h index 4ed32b97..324d4a5d 100644 --- a/pcap/dlt.h +++ b/pcap/dlt.h @@ -805,15 +805,34 @@ #define DLT_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 . - */ -#define DLT_PPP_WITH_DIR 204 /* PPP - don't confuse with DLT_PPP_WITH_DIRECTION */ -#define DLT_C_HDLC_WITH_DIR 205 /* Cisco HDLC */ -#define DLT_FRELAY_WITH_DIR 206 /* Frame Relay */ -#define DLT_LAPB_WITH_DIR 207 /* LAPB */ + * 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 . + */ +#define DLT_PPP_WITH_DIR 204 /* Don't confuse with DLT_PPP_WITH_DIRECTION */ + +/* + * 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 . + */ +#define DLT_C_HDLC_WITH_DIR 205 + +/* + * 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 + * . + */ +#define DLT_FRELAY_WITH_DIR 206 + +/* + * 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 + * . + */ +#define DLT_LAPB_WITH_DIR 207 /* * 208 is reserved for an as-yet-unspecified proprietary link-layer