]> The Tcpdump Group git mirrors - libpcap/commitdiff
Clean up the name-to-DLT mapping table.
authorGuy Harris <[email protected]>
Wed, 12 Oct 2016 18:58:42 +0000 (11:58 -0700)
committerGuy Harris <[email protected]>
Wed, 12 Oct 2016 18:58:42 +0000 (11:58 -0700)
Have DLT_CHOICE() take the DLT_ name *without* the leading DLT_ as an
argument, so that the name strings don't have it; that avoids the need
to skip it.

pcap.c

diff --git a/pcap.c b/pcap.c
index 64ce0609b554fd9841734b6e28da59a48e0a984b..77a709f8f2647a862f792a7bffcce7b2e5f12320 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -1138,139 +1138,139 @@ struct dlt_choice {
        int     dlt;
 };
 
-#define DLT_CHOICE(code, description) { #code, description, code }
+#define DLT_CHOICE(code, description) { #code, description, DLT_ ## code }
 #define DLT_CHOICE_SENTINEL { NULL, NULL, 0 }
 
 static struct dlt_choice dlt_choices[] = {
-       DLT_CHOICE(DLT_NULL, "BSD loopback"),
-       DLT_CHOICE(DLT_EN10MB, "Ethernet"),
-       DLT_CHOICE(DLT_IEEE802, "Token ring"),
-       DLT_CHOICE(DLT_ARCNET, "BSD ARCNET"),
-       DLT_CHOICE(DLT_SLIP, "SLIP"),
-       DLT_CHOICE(DLT_PPP, "PPP"),
-       DLT_CHOICE(DLT_FDDI, "FDDI"),
-       DLT_CHOICE(DLT_ATM_RFC1483, "RFC 1483 LLC-encapsulated ATM"),
-       DLT_CHOICE(DLT_RAW, "Raw IP"),
-       DLT_CHOICE(DLT_SLIP_BSDOS, "BSD/OS SLIP"),
-       DLT_CHOICE(DLT_PPP_BSDOS, "BSD/OS PPP"),
-       DLT_CHOICE(DLT_ATM_CLIP, "Linux Classical IP-over-ATM"),
-       DLT_CHOICE(DLT_PPP_SERIAL, "PPP over serial"),
-       DLT_CHOICE(DLT_PPP_ETHER, "PPPoE"),
-        DLT_CHOICE(DLT_SYMANTEC_FIREWALL, "Symantec Firewall"),
-       DLT_CHOICE(DLT_C_HDLC, "Cisco HDLC"),
-       DLT_CHOICE(DLT_IEEE802_11, "802.11"),
-       DLT_CHOICE(DLT_FRELAY, "Frame Relay"),
-       DLT_CHOICE(DLT_LOOP, "OpenBSD loopback"),
-       DLT_CHOICE(DLT_ENC, "OpenBSD encapsulated IP"),
-       DLT_CHOICE(DLT_LINUX_SLL, "Linux cooked"),
-       DLT_CHOICE(DLT_LTALK, "Localtalk"),
-       DLT_CHOICE(DLT_PFLOG, "OpenBSD pflog file"),
-       DLT_CHOICE(DLT_PFSYNC, "Packet filter state syncing"),
-       DLT_CHOICE(DLT_PRISM_HEADER, "802.11 plus Prism header"),
-       DLT_CHOICE(DLT_IP_OVER_FC, "RFC 2625 IP-over-Fibre Channel"),
-       DLT_CHOICE(DLT_SUNATM, "Sun raw ATM"),
-       DLT_CHOICE(DLT_IEEE802_11_RADIO, "802.11 plus radiotap header"),
-       DLT_CHOICE(DLT_ARCNET_LINUX, "Linux ARCNET"),
-        DLT_CHOICE(DLT_JUNIPER_MLPPP, "Juniper Multi-Link PPP"),
-       DLT_CHOICE(DLT_JUNIPER_MLFR, "Juniper Multi-Link Frame Relay"),
-        DLT_CHOICE(DLT_JUNIPER_ES, "Juniper Encryption Services PIC"),
-        DLT_CHOICE(DLT_JUNIPER_GGSN, "Juniper GGSN PIC"),
-       DLT_CHOICE(DLT_JUNIPER_MFR, "Juniper FRF.16 Frame Relay"),
-        DLT_CHOICE(DLT_JUNIPER_ATM2, "Juniper ATM2 PIC"),
-        DLT_CHOICE(DLT_JUNIPER_SERVICES, "Juniper Advanced Services PIC"),
-        DLT_CHOICE(DLT_JUNIPER_ATM1, "Juniper ATM1 PIC"),
-       DLT_CHOICE(DLT_APPLE_IP_OVER_IEEE1394, "Apple IP-over-IEEE 1394"),
-       DLT_CHOICE(DLT_MTP2_WITH_PHDR, "SS7 MTP2 with Pseudo-header"),
-       DLT_CHOICE(DLT_MTP2, "SS7 MTP2"),
-       DLT_CHOICE(DLT_MTP3, "SS7 MTP3"),
-       DLT_CHOICE(DLT_SCCP, "SS7 SCCP"),
-       DLT_CHOICE(DLT_DOCSIS, "DOCSIS"),
-       DLT_CHOICE(DLT_LINUX_IRDA, "Linux IrDA"),
-       DLT_CHOICE(DLT_IEEE802_11_RADIO_AVS, "802.11 plus AVS radio information header"),
-        DLT_CHOICE(DLT_JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
-       DLT_CHOICE(DLT_BACNET_MS_TP, "BACnet MS/TP"),
-       DLT_CHOICE(DLT_PPP_PPPD, "PPP for pppd, with direction flag"),
-       DLT_CHOICE(DLT_JUNIPER_PPPOE, "Juniper PPPoE"),
-       DLT_CHOICE(DLT_JUNIPER_PPPOE_ATM, "Juniper PPPoE/ATM"),
-       DLT_CHOICE(DLT_GPRS_LLC, "GPRS LLC"),
-       DLT_CHOICE(DLT_GPF_T, "GPF-T"),
-       DLT_CHOICE(DLT_GPF_F, "GPF-F"),
-       DLT_CHOICE(DLT_JUNIPER_PIC_PEER, "Juniper PIC Peer"),
-       DLT_CHOICE(DLT_ERF_ETH, "Ethernet with Endace ERF header"),
-       DLT_CHOICE(DLT_ERF_POS, "Packet-over-SONET with Endace ERF header"),
-       DLT_CHOICE(DLT_LINUX_LAPD, "Linux vISDN LAPD"),
-       DLT_CHOICE(DLT_JUNIPER_ETHER, "Juniper Ethernet"),
-       DLT_CHOICE(DLT_JUNIPER_PPP, "Juniper PPP"),
-       DLT_CHOICE(DLT_JUNIPER_FRELAY, "Juniper Frame Relay"),
-       DLT_CHOICE(DLT_JUNIPER_CHDLC, "Juniper C-HDLC"),
-       DLT_CHOICE(DLT_MFR, "FRF.16 Frame Relay"),
-       DLT_CHOICE(DLT_JUNIPER_VP, "Juniper Voice PIC"),
-       DLT_CHOICE(DLT_A429, "Arinc 429"),
-       DLT_CHOICE(DLT_A653_ICM, "Arinc 653 Interpartition Communication"),
-       DLT_CHOICE(DLT_USB_FREEBSD, "USB with FreeBSD header"),
-       DLT_CHOICE(DLT_BLUETOOTH_HCI_H4, "Bluetooth HCI UART transport layer"),
-       DLT_CHOICE(DLT_IEEE802_16_MAC_CPS, "IEEE 802.16 MAC Common Part Sublayer"),
-       DLT_CHOICE(DLT_USB_LINUX, "USB with Linux header"),
-       DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"),
-       DLT_CHOICE(DLT_IEEE802_15_4_LINUX, "IEEE 802.15.4 with Linux padding"),
-       DLT_CHOICE(DLT_PPI, "Per-Packet Information"),
-       DLT_CHOICE(DLT_IEEE802_16_MAC_CPS_RADIO, "IEEE 802.16 MAC Common Part Sublayer plus radiotap header"),
-       DLT_CHOICE(DLT_JUNIPER_ISM, "Juniper Integrated Service Module"),
-       DLT_CHOICE(DLT_IEEE802_15_4, "IEEE 802.15.4 with FCS"),
-       DLT_CHOICE(DLT_SITA, "SITA pseudo-header"),
-       DLT_CHOICE(DLT_ERF, "Endace ERF header"),
-       DLT_CHOICE(DLT_RAIF1, "Ethernet with u10 Networks pseudo-header"),
-       DLT_CHOICE(DLT_IPMB, "IPMB"),
-       DLT_CHOICE(DLT_JUNIPER_ST, "Juniper Secure Tunnel"),
-       DLT_CHOICE(DLT_BLUETOOTH_HCI_H4_WITH_PHDR, "Bluetooth HCI UART transport layer plus pseudo-header"),
-       DLT_CHOICE(DLT_AX25_KISS, "AX.25 with KISS header"),
-       DLT_CHOICE(DLT_IEEE802_15_4_NONASK_PHY, "IEEE 802.15.4 with non-ASK PHY data"),
-       DLT_CHOICE(DLT_MPLS, "MPLS with label as link-layer header"),
-       DLT_CHOICE(DLT_LINUX_EVDEV, "Linux evdev events"),
-       DLT_CHOICE(DLT_USB_LINUX_MMAPPED, "USB with padded Linux header"),
-       DLT_CHOICE(DLT_DECT, "DECT"),
-       DLT_CHOICE(DLT_AOS, "AOS Space Data Link protocol"),
-       DLT_CHOICE(DLT_WIHART, "Wireless HART"),
-       DLT_CHOICE(DLT_FC_2, "Fibre Channel FC-2"),
-       DLT_CHOICE(DLT_FC_2_WITH_FRAME_DELIMS, "Fibre Channel FC-2 with frame delimiters"),
-       DLT_CHOICE(DLT_IPNET, "Solaris ipnet"),
-       DLT_CHOICE(DLT_CAN_SOCKETCAN, "CAN-bus with SocketCAN headers"),
-       DLT_CHOICE(DLT_IPV4, "Raw IPv4"),
-       DLT_CHOICE(DLT_IPV6, "Raw IPv6"),
-       DLT_CHOICE(DLT_IEEE802_15_4_NOFCS, "IEEE 802.15.4 without FCS"),
-       DLT_CHOICE(DLT_DBUS, "D-Bus"),
-       DLT_CHOICE(DLT_JUNIPER_VS, "Juniper Virtual Server"),
-       DLT_CHOICE(DLT_JUNIPER_SRX_E2E, "Juniper SRX E2E"),
-       DLT_CHOICE(DLT_JUNIPER_FIBRECHANNEL, "Juniper Fibre Channel"),
-       DLT_CHOICE(DLT_DVB_CI, "DVB-CI"),
-       DLT_CHOICE(DLT_MUX27010, "MUX27010"),
-       DLT_CHOICE(DLT_STANAG_5066_D_PDU, "STANAG 5066 D_PDUs"),
-       DLT_CHOICE(DLT_JUNIPER_ATM_CEMIC, "Juniper ATM CEMIC"),
-       DLT_CHOICE(DLT_NFLOG, "Linux netfilter log messages"),
-       DLT_CHOICE(DLT_NETANALYZER, "Ethernet with Hilscher netANALYZER pseudo-header"),
-       DLT_CHOICE(DLT_NETANALYZER_TRANSPARENT, "Ethernet with Hilscher netANALYZER pseudo-header and with preamble and SFD"),
-       DLT_CHOICE(DLT_IPOIB, "RFC 4391 IP-over-Infiniband"),
-       DLT_CHOICE(DLT_MPEG_2_TS, "MPEG-2 transport stream"),
-       DLT_CHOICE(DLT_NG40, "ng40 protocol tester Iub/Iur"),
-       DLT_CHOICE(DLT_NFC_LLCP, "NFC LLCP PDUs with pseudo-header"),
-       DLT_CHOICE(DLT_INFINIBAND, "InfiniBand"),
-       DLT_CHOICE(DLT_SCTP, "SCTP"),
-       DLT_CHOICE(DLT_USBPCAP, "USB with USBPcap header"),
-       DLT_CHOICE(DLT_RTAC_SERIAL, "Schweitzer Engineering Laboratories RTAC packets"),
-       DLT_CHOICE(DLT_BLUETOOTH_LE_LL, "Bluetooth Low Energy air interface"),
-       DLT_CHOICE(DLT_NETLINK, "Linux netlink"),
-       DLT_CHOICE(DLT_BLUETOOTH_LINUX_MONITOR, "Bluetooth Linux Monitor"),
-       DLT_CHOICE(DLT_BLUETOOTH_BREDR_BB, "Bluetooth Basic Rate/Enhanced Data Rate baseband packets"),
-       DLT_CHOICE(DLT_BLUETOOTH_LE_LL_WITH_PHDR, "Bluetooth Low Energy air interface with pseudo-header"),
-       DLT_CHOICE(DLT_PROFIBUS_DL, "PROFIBUS data link layer"),
-       DLT_CHOICE(DLT_PKTAP, "Apple DLT_PKTAP"),
-       DLT_CHOICE(DLT_EPON, "Ethernet with 802.3 Clause 65 EPON preamble"),
-       DLT_CHOICE(DLT_IPMI_HPM_2, "IPMI trace packets"),
-       DLT_CHOICE(DLT_ZWAVE_R1_R2, "Z-Wave RF profile R1 and R2 packets"),
-       DLT_CHOICE(DLT_ZWAVE_R3, "Z-Wave RF profile R3 packets"),
-       DLT_CHOICE(DLT_WATTSTOPPER_DLM, "WattStopper Digital Lighting Management (DLM) and Legrand Nitoo Open protocol"),
-       DLT_CHOICE(DLT_ISO_14443, "ISO 14443 messages"),
-       DLT_CHOICE(DLT_RDS, "IEC 62106 Radio Data System groups"),
+       DLT_CHOICE(NULL, "BSD loopback"),
+       DLT_CHOICE(EN10MB, "Ethernet"),
+       DLT_CHOICE(IEEE802, "Token ring"),
+       DLT_CHOICE(ARCNET, "BSD ARCNET"),
+       DLT_CHOICE(SLIP, "SLIP"),
+       DLT_CHOICE(PPP, "PPP"),
+       DLT_CHOICE(FDDI, "FDDI"),
+       DLT_CHOICE(ATM_RFC1483, "RFC 1483 LLC-encapsulated ATM"),
+       DLT_CHOICE(RAW, "Raw IP"),
+       DLT_CHOICE(SLIP_BSDOS, "BSD/OS SLIP"),
+       DLT_CHOICE(PPP_BSDOS, "BSD/OS PPP"),
+       DLT_CHOICE(ATM_CLIP, "Linux Classical IP-over-ATM"),
+       DLT_CHOICE(PPP_SERIAL, "PPP over serial"),
+       DLT_CHOICE(PPP_ETHER, "PPPoE"),
+       DLT_CHOICE(SYMANTEC_FIREWALL, "Symantec Firewall"),
+       DLT_CHOICE(C_HDLC, "Cisco HDLC"),
+       DLT_CHOICE(IEEE802_11, "802.11"),
+       DLT_CHOICE(FRELAY, "Frame Relay"),
+       DLT_CHOICE(LOOP, "OpenBSD loopback"),
+       DLT_CHOICE(ENC, "OpenBSD encapsulated IP"),
+       DLT_CHOICE(LINUX_SLL, "Linux cooked"),
+       DLT_CHOICE(LTALK, "Localtalk"),
+       DLT_CHOICE(PFLOG, "OpenBSD pflog file"),
+       DLT_CHOICE(PFSYNC, "Packet filter state syncing"),
+       DLT_CHOICE(PRISM_HEADER, "802.11 plus Prism header"),
+       DLT_CHOICE(IP_OVER_FC, "RFC 2625 IP-over-Fibre Channel"),
+       DLT_CHOICE(SUNATM, "Sun raw ATM"),
+       DLT_CHOICE(IEEE802_11_RADIO, "802.11 plus radiotap header"),
+       DLT_CHOICE(ARCNET_LINUX, "Linux ARCNET"),
+       DLT_CHOICE(JUNIPER_MLPPP, "Juniper Multi-Link PPP"),
+       DLT_CHOICE(JUNIPER_MLFR, "Juniper Multi-Link Frame Relay"),
+       DLT_CHOICE(JUNIPER_ES, "Juniper Encryption Services PIC"),
+       DLT_CHOICE(JUNIPER_GGSN, "Juniper GGSN PIC"),
+       DLT_CHOICE(JUNIPER_MFR, "Juniper FRF.16 Frame Relay"),
+       DLT_CHOICE(JUNIPER_ATM2, "Juniper ATM2 PIC"),
+       DLT_CHOICE(JUNIPER_SERVICES, "Juniper Advanced Services PIC"),
+       DLT_CHOICE(JUNIPER_ATM1, "Juniper ATM1 PIC"),
+       DLT_CHOICE(APPLE_IP_OVER_IEEE1394, "Apple IP-over-IEEE 1394"),
+       DLT_CHOICE(MTP2_WITH_PHDR, "SS7 MTP2 with Pseudo-header"),
+       DLT_CHOICE(MTP2, "SS7 MTP2"),
+       DLT_CHOICE(MTP3, "SS7 MTP3"),
+       DLT_CHOICE(SCCP, "SS7 SCCP"),
+       DLT_CHOICE(DOCSIS, "DOCSIS"),
+       DLT_CHOICE(LINUX_IRDA, "Linux IrDA"),
+       DLT_CHOICE(IEEE802_11_RADIO_AVS, "802.11 plus AVS radio information header"),
+       DLT_CHOICE(JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
+       DLT_CHOICE(BACNET_MS_TP, "BACnet MS/TP"),
+       DLT_CHOICE(PPP_PPPD, "PPP for pppd, with direction flag"),
+       DLT_CHOICE(JUNIPER_PPPOE, "Juniper PPPoE"),
+       DLT_CHOICE(JUNIPER_PPPOE_ATM, "Juniper PPPoE/ATM"),
+       DLT_CHOICE(GPRS_LLC, "GPRS LLC"),
+       DLT_CHOICE(GPF_T, "GPF-T"),
+       DLT_CHOICE(GPF_F, "GPF-F"),
+       DLT_CHOICE(JUNIPER_PIC_PEER, "Juniper PIC Peer"),
+       DLT_CHOICE(ERF_ETH,     "Ethernet with Endace ERF header"),
+       DLT_CHOICE(ERF_POS, "Packet-over-SONET with Endace ERF header"),
+       DLT_CHOICE(LINUX_LAPD, "Linux vISDN LAPD"),
+       DLT_CHOICE(JUNIPER_ETHER, "Juniper Ethernet"),
+       DLT_CHOICE(JUNIPER_PPP, "Juniper PPP"),
+       DLT_CHOICE(JUNIPER_FRELAY, "Juniper Frame Relay"),
+       DLT_CHOICE(JUNIPER_CHDLC, "Juniper C-HDLC"),
+       DLT_CHOICE(MFR, "FRF.16 Frame Relay"),
+       DLT_CHOICE(JUNIPER_VP, "Juniper Voice PIC"),
+       DLT_CHOICE(A429, "Arinc 429"),
+       DLT_CHOICE(A653_ICM, "Arinc 653 Interpartition Communication"),
+       DLT_CHOICE(USB_FREEBSD, "USB with FreeBSD header"),
+       DLT_CHOICE(BLUETOOTH_HCI_H4, "Bluetooth HCI UART transport layer"),
+       DLT_CHOICE(IEEE802_16_MAC_CPS, "IEEE 802.16 MAC Common Part Sublayer"),
+       DLT_CHOICE(USB_LINUX, "USB with Linux header"),
+       DLT_CHOICE(CAN20B, "Controller Area Network (CAN) v. 2.0B"),
+       DLT_CHOICE(IEEE802_15_4_LINUX, "IEEE 802.15.4 with Linux padding"),
+       DLT_CHOICE(PPI, "Per-Packet Information"),
+       DLT_CHOICE(IEEE802_16_MAC_CPS_RADIO, "IEEE 802.16 MAC Common Part Sublayer plus radiotap header"),
+       DLT_CHOICE(JUNIPER_ISM, "Juniper Integrated Service Module"),
+       DLT_CHOICE(IEEE802_15_4, "IEEE 802.15.4 with FCS"),
+       DLT_CHOICE(SITA, "SITA pseudo-header"),
+       DLT_CHOICE(ERF, "Endace ERF header"),
+       DLT_CHOICE(RAIF1, "Ethernet with u10 Networks pseudo-header"),
+       DLT_CHOICE(IPMB, "IPMB"),
+       DLT_CHOICE(JUNIPER_ST, "Juniper Secure Tunnel"),
+       DLT_CHOICE(BLUETOOTH_HCI_H4_WITH_PHDR, "Bluetooth HCI UART transport layer plus pseudo-header"),
+       DLT_CHOICE(AX25_KISS, "AX.25 with KISS header"),
+       DLT_CHOICE(IEEE802_15_4_NONASK_PHY, "IEEE 802.15.4 with non-ASK PHY data"),
+       DLT_CHOICE(MPLS, "MPLS with label as link-layer header"),
+       DLT_CHOICE(LINUX_EVDEV, "Linux evdev events"),
+       DLT_CHOICE(USB_LINUX_MMAPPED, "USB with padded Linux header"),
+       DLT_CHOICE(DECT, "DECT"),
+       DLT_CHOICE(AOS, "AOS Space Data Link protocol"),
+       DLT_CHOICE(WIHART, "Wireless HART"),
+       DLT_CHOICE(FC_2, "Fibre Channel FC-2"),
+       DLT_CHOICE(FC_2_WITH_FRAME_DELIMS, "Fibre Channel FC-2 with frame delimiters"),
+       DLT_CHOICE(IPNET, "Solaris ipnet"),
+       DLT_CHOICE(CAN_SOCKETCAN, "CAN-bus with SocketCAN headers"),
+       DLT_CHOICE(IPV4, "Raw IPv4"),
+       DLT_CHOICE(IPV6, "Raw IPv6"),
+       DLT_CHOICE(IEEE802_15_4_NOFCS, "IEEE 802.15.4 without FCS"),
+       DLT_CHOICE(DBUS, "D-Bus"),
+       DLT_CHOICE(JUNIPER_VS, "Juniper Virtual Server"),
+       DLT_CHOICE(JUNIPER_SRX_E2E, "Juniper SRX E2E"),
+       DLT_CHOICE(JUNIPER_FIBRECHANNEL, "Juniper Fibre Channel"),
+       DLT_CHOICE(DVB_CI, "DVB-CI"),
+       DLT_CHOICE(MUX27010, "MUX27010"),
+       DLT_CHOICE(STANAG_5066_D_PDU, "STANAG 5066 D_PDUs"),
+       DLT_CHOICE(JUNIPER_ATM_CEMIC, "Juniper ATM CEMIC"),
+       DLT_CHOICE(NFLOG, "Linux netfilter log messages"),
+       DLT_CHOICE(NETANALYZER, "Ethernet with Hilscher netANALYZER pseudo-header"),
+       DLT_CHOICE(NETANALYZER_TRANSPARENT, "Ethernet with Hilscher netANALYZER pseudo-header and with preamble and SFD"),
+       DLT_CHOICE(IPOIB, "RFC 4391 IP-over-Infiniband"),
+       DLT_CHOICE(MPEG_2_TS, "MPEG-2 transport stream"),
+       DLT_CHOICE(NG40, "ng40 protocol tester Iub/Iur"),
+       DLT_CHOICE(NFC_LLCP, "NFC LLCP PDUs with pseudo-header"),
+       DLT_CHOICE(INFINIBAND, "InfiniBand"),
+       DLT_CHOICE(SCTP, "SCTP"),
+       DLT_CHOICE(USBPCAP, "USB with USBPcap header"),
+       DLT_CHOICE(RTAC_SERIAL, "Schweitzer Engineering Laboratories RTAC packets"),
+       DLT_CHOICE(BLUETOOTH_LE_LL, "Bluetooth Low Energy air interface"),
+       DLT_CHOICE(NETLINK, "Linux netlink"),
+       DLT_CHOICE(BLUETOOTH_LINUX_MONITOR, "Bluetooth Linux Monitor"),
+       DLT_CHOICE(BLUETOOTH_BREDR_BB, "Bluetooth Basic Rate/Enhanced Data Rate baseband packets"),
+       DLT_CHOICE(BLUETOOTH_LE_LL_WITH_PHDR, "Bluetooth Low Energy air interface with pseudo-header"),
+       DLT_CHOICE(PROFIBUS_DL, "PROFIBUS data link layer"),
+       DLT_CHOICE(PKTAP, "Apple DLT_PKTAP"),
+       DLT_CHOICE(EPON, "Ethernet with 802.3 Clause 65 EPON preamble"),
+       DLT_CHOICE(IPMI_HPM_2, "IPMI trace packets"),
+       DLT_CHOICE(ZWAVE_R1_R2, "Z-Wave RF profile R1 and R2 packets"),
+       DLT_CHOICE(ZWAVE_R3, "Z-Wave RF profile R3 packets"),
+       DLT_CHOICE(WATTSTOPPER_DLM, "WattStopper Digital Lighting Management (DLM) and Legrand Nitoo Open protocol"),
+       DLT_CHOICE(ISO_14443, "ISO 14443 messages"),
+       DLT_CHOICE(RDS, "IEC 62106 Radio Data System groups"),
        DLT_CHOICE_SENTINEL
 };
 
@@ -1280,8 +1280,7 @@ pcap_datalink_name_to_val(const char *name)
        int i;
 
        for (i = 0; dlt_choices[i].name != NULL; i++) {
-               if (pcap_strcasecmp(dlt_choices[i].name + sizeof("DLT_") - 1,
-                   name) == 0)
+               if (pcap_strcasecmp(dlt_choices[i].name, name) == 0)
                        return (dlt_choices[i].dlt);
        }
        return (-1);
@@ -1294,7 +1293,7 @@ pcap_datalink_val_to_name(int dlt)
 
        for (i = 0; dlt_choices[i].name != NULL; i++) {
                if (dlt_choices[i].dlt == dlt)
-                       return (dlt_choices[i].name + sizeof("DLT_") - 1);
+                       return (dlt_choices[i].name);
        }
        return (NULL);
 }