aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcap-common.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-15 14:46:30 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-15 22:47:03 +0000
commitfea325d2ba86cee47bb6bf89a068906744701c88 (patch)
tree403c99ed077e31fee09090b2ce689e8ed8aac0b7 /wiretap/pcap-common.c
parent1917023fc157b896a23349c0eca8c95f22f2fb6f (diff)
Handle DLT_LOOP differently from DLT_NULL.
That's a little cleaner, and lets us preserve the LINKTYPE_ value for DLT_LOOP captures. ("Preserve" here doesn't mean "write files with a link-layer header type of 12", as that's ambiguous; we write it with a link-layer header type of LINKTYPE_LOOP, i.e. 108. If programs on OpenBSD don't recognize that as DLT_LOOP, that's a bug in OpenBSD's libpcap or in the program.) Change-Id: I48a2e04aed41c013823ffb5c588d2a8e8b376e15 Reviewed-on: https://code.wireshark.org/review/7143 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/pcap-common.c')
-rw-r--r--wiretap/pcap-common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 3f4a25a599..5fb0be384f 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -206,7 +206,7 @@ static const struct {
{ 105, WTAP_ENCAP_IEEE_802_11 }, /* IEEE 802.11 */
{ 106, WTAP_ENCAP_LINUX_ATM_CLIP },
{ 107, WTAP_ENCAP_FRELAY }, /* Frame Relay */
- { 108, WTAP_ENCAP_NULL }, /* OpenBSD loopback */
+ { 108, WTAP_ENCAP_LOOP }, /* OpenBSD loopback */
{ 109, WTAP_ENCAP_ENC }, /* OpenBSD IPSEC enc */
#if 0
{ 110, WTAP_ENCAP_LANE_802_3 },/* ATM LANE 802.3 */
@@ -481,12 +481,12 @@ static const struct {
* (it's just like DLT_NULL, only with the AF_ value in network
* rather than host byte order - Wireshark figures out the
* byte order from the data, so we don't care what byte order
- * it's in), so if DLT_LOOP is defined as 12, interpret 12
- * as WTAP_ENCAP_NULL, otherwise, unless DLT_C_HDLC is defined
- * as 12, interpret it as WTAP_ENCAP_RAW_IP.
+ * it's in), so, on OpenBSD, interpret 12 as WTAP_ENCAP_LOOP,
+ * otherwise, if we're not on BSD/OS, interpret it as
+ * WTAP_ENCAP_RAW_IP.
*/
#if defined(__OpenBSD__)
- { 12, WTAP_ENCAP_NULL },
+ { 12, WTAP_ENCAP_LOOP },
#elif defined(__bsdi__) /* BSD/OS */
/*
* Put entry for Cisco HDLC here.