summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pcap-common.c10
-rw-r--r--wiretap/wtap.c5
-rw-r--r--wiretap/wtap.h1
3 files changed, 10 insertions, 6 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.
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 6dc8a5c150..6b0cf92610 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -259,7 +259,7 @@ static struct encap_type_info encap_table_base[] = {
{ "ATM PDUs - untruncated", "atm-pdus-untruncated" },
/* WTAP_ENCAP_NULL */
- { "NULL", "null" },
+ { "NULL/Loopback", "null" },
/* WTAP_ENCAP_ASCEND */
{ "Lucent/Ascend access equipment", "ascend" },
@@ -737,6 +737,9 @@ static struct encap_type_info encap_table_base[] = {
/* WTAP_ENCAP_IPMI_TRACE */
{ "IPMI Trace Data Collection", "ipmi-trace" },
+
+ /* WTAP_ENCAP_LOOP */
+ { "OpenBSD loopback", "loop" },
};
WS_DLL_LOCAL
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 348d3a9495..1570466579 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -265,6 +265,7 @@ extern "C" {
#define WTAP_ENCAP_PKTAP 172
#define WTAP_ENCAP_EPON 173
#define WTAP_ENCAP_IPMI_TRACE 174
+#define WTAP_ENCAP_LOOP 175
/* After adding new item here, please also add new item to encap_table_base array */
#define WTAP_NUM_ENCAP_TYPES wtap_get_num_encap_types()