]> The Tcpdump Group git mirrors - libpcap/commitdiff
Change name of Hilscher link types to say NETANALYER.
authorGuy Harris <[email protected]>
Fri, 16 Sep 2011 00:35:23 +0000 (17:35 -0700)
committerGuy Harris <[email protected]>
Fri, 16 Sep 2011 00:35:52 +0000 (17:35 -0700)
That makes the names a bit shorter, and mentions the specific Hilscher
product to which they apply.

gencode.c
pcap-common.c
pcap.c
pcap/bpf.h

index d0a487d3765d5f798a97290c79090244e58da796..03274fbfcf42e909efad356be43e586bfcc908a7 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -1620,7 +1620,7 @@ init_linktype(p)
                off_nl_nosnap = -1;
                return;
 
                off_nl_nosnap = -1;
                return;
 
-       case DLT_ETHERNET_HILSCHER:
+       case DLT_NETANALYZER:
                off_mac = 4;            /* MAC header is past 4-byte pseudo-header */
                off_linktype = 16;      /* includes 4-byte pseudo-header */
                off_macpl = 18;         /* pseudo-header+Ethernet header length */
                off_mac = 4;            /* MAC header is past 4-byte pseudo-header */
                off_linktype = 16;      /* includes 4-byte pseudo-header */
                off_macpl = 18;         /* pseudo-header+Ethernet header length */
@@ -1628,7 +1628,7 @@ init_linktype(p)
                off_nl_nosnap = 3;      /* 802.3+802.2 */
                return;
 
                off_nl_nosnap = 3;      /* 802.3+802.2 */
                return;
 
-       case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+       case DLT_NETANALYZER_TRANSPARENT:
                off_mac = 12;           /* MAC header is past 4-byte pseudo-header, preamble, and SFD */
                off_linktype = 24;      /* includes 4-byte pseudo-header+preamble+SFD */
                off_macpl = 26;         /* pseudo-header+preamble+SFD+Ethernet header length */
                off_mac = 12;           /* MAC header is past 4-byte pseudo-header, preamble, and SFD */
                off_linktype = 24;      /* includes 4-byte pseudo-header+preamble+SFD */
                off_macpl = 26;         /* pseudo-header+preamble+SFD+Ethernet header length */
@@ -3106,8 +3106,8 @@ gen_linktype(proto)
        switch (linktype) {
 
        case DLT_EN10MB:
        switch (linktype) {
 
        case DLT_EN10MB:
-       case DLT_ETHERNET_HILSCHER:
-       case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+       case DLT_NETANALYZER:
+       case DLT_NETANALYZER_TRANSPARENT:
                return gen_ether_linktype(proto);
                /*NOTREACHED*/
                break;
                return gen_ether_linktype(proto);
                /*NOTREACHED*/
                break;
@@ -4869,8 +4869,8 @@ gen_gateway(eaddr, alist, proto, dir)
        case Q_RARP:
                switch (linktype) {
                case DLT_EN10MB:
        case Q_RARP:
                switch (linktype) {
                case DLT_EN10MB:
-               case DLT_ETHERNET_HILSCHER:
-               case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+               case DLT_NETANALYZER:
+               case DLT_NETANALYZER_TRANSPARENT:
                        b0 = gen_ehostop(eaddr, Q_OR);
                        break;
                case DLT_FDDI:
                        b0 = gen_ehostop(eaddr, Q_OR);
                        break;
                case DLT_FDDI:
@@ -6242,8 +6242,8 @@ gen_scode(name, q)
                        switch (linktype) {
 
                        case DLT_EN10MB:
                        switch (linktype) {
 
                        case DLT_EN10MB:
-                       case DLT_ETHERNET_HILSCHER:
-                       case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+                       case DLT_NETANALYZER:
+                       case DLT_NETANALYZER_TRANSPARENT:
                                eaddr = pcap_ether_hostton(name);
                                if (eaddr == NULL)
                                        bpf_error(
                                eaddr = pcap_ether_hostton(name);
                                if (eaddr == NULL)
                                        bpf_error(
@@ -6763,8 +6763,8 @@ gen_ecode(eaddr, q)
        if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) {
                switch (linktype) {
                case DLT_EN10MB:
        if ((q.addr == Q_HOST || q.addr == Q_DEFAULT) && q.proto == Q_LINK) {
                switch (linktype) {
                case DLT_EN10MB:
-               case DLT_ETHERNET_HILSCHER:
-               case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+               case DLT_NETANALYZER:
+               case DLT_NETANALYZER_TRANSPARENT:
                        return gen_ehostop(eaddr, (int)q.dir);
                case DLT_FDDI:
                        return gen_fhostop(eaddr, (int)q.dir);
                        return gen_ehostop(eaddr, (int)q.dir);
                case DLT_FDDI:
                        return gen_fhostop(eaddr, (int)q.dir);
@@ -7368,8 +7368,8 @@ gen_broadcast(proto)
                case DLT_ARCNET_LINUX:
                        return gen_ahostop(abroadcast, Q_DST);
                case DLT_EN10MB:
                case DLT_ARCNET_LINUX:
                        return gen_ahostop(abroadcast, Q_DST);
                case DLT_EN10MB:
-               case DLT_ETHERNET_HILSCHER:
-               case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+               case DLT_NETANALYZER:
+               case DLT_NETANALYZER_TRANSPARENT:
                        return gen_ehostop(ebroadcast, Q_DST);
                case DLT_FDDI:
                        return gen_fhostop(ebroadcast, Q_DST);
                        return gen_ehostop(ebroadcast, Q_DST);
                case DLT_FDDI:
                        return gen_fhostop(ebroadcast, Q_DST);
@@ -7465,8 +7465,8 @@ gen_multicast(proto)
                        /* all ARCnet multicasts use the same address */
                        return gen_ahostop(abroadcast, Q_DST);
                case DLT_EN10MB:
                        /* all ARCnet multicasts use the same address */
                        return gen_ahostop(abroadcast, Q_DST);
                case DLT_EN10MB:
-               case DLT_ETHERNET_HILSCHER:
-               case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+               case DLT_NETANALYZER:
+               case DLT_NETANALYZER_TRANSPARENT:
                        /* ether[0] & 1 != 0 */
                        return gen_mac_multicast(0);
                case DLT_FDDI:
                        /* ether[0] & 1 != 0 */
                        return gen_mac_multicast(0);
                case DLT_FDDI:
@@ -8093,8 +8093,8 @@ gen_vlan(vlan_num)
        switch (linktype) {
 
        case DLT_EN10MB:
        switch (linktype) {
 
        case DLT_EN10MB:
-       case DLT_ETHERNET_HILSCHER:
-       case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+       case DLT_NETANALYZER:
+       case DLT_NETANALYZER_TRANSPARENT:
                /* check for VLAN */
                b0 = gen_cmp(OR_LINK, off_linktype, BPF_H,
                    (bpf_int32)ETHERTYPE_8021Q);
                /* check for VLAN */
                b0 = gen_cmp(OR_LINK, off_linktype, BPF_H,
                    (bpf_int32)ETHERTYPE_8021Q);
@@ -8158,8 +8158,8 @@ gen_mpls(label_num)
                 
             case DLT_C_HDLC: /* fall through */
             case DLT_EN10MB:
                 
             case DLT_C_HDLC: /* fall through */
             case DLT_EN10MB:
-            case DLT_ETHERNET_HILSCHER:
-            case DLT_ETHERNET_HILSCHER_TRANSPARENT:
+            case DLT_NETANALYZER:
+            case DLT_NETANALYZER_TRANSPARENT:
                     b0 = gen_linktype(ETHERTYPE_MPLS);
                     break;
                 
                     b0 = gen_linktype(ETHERTYPE_MPLS);
                     break;
                 
index 1bba068ef57f16212858ef08c62aa0c696267cba..9af2aaab5ee6c0c17a7dba6ac82cd3d93d710a82 100644 (file)
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and always
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and always
- * with the payload including the FCS.
+ * with the payload including the FCS, as supplied by their
+ * netANALYZER hardware and software.
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
-#define LINKTYPE_ETHERNET_HILSCHER             240
+#define LINKTYPE_NETANALYZER           240
 
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and FCS and
 
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and FCS and
- * with the Ethernet header preceded by 7 bytes of preamble and
- * 1 byte of SFD.
+ * 1 byte of SFD, as supplied by their netANALYZER hardware and
+ * software.
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
-#define LINKTYPE_ETHERNET_HILSCHER_TRANSPARENT 241
+#define LINKTYPE_NETANALYZER_TRANSPARENT       241
 
 
 static struct linktype_map {
 
 
 static struct linktype_map {
@@ -1182,11 +1183,11 @@ static struct linktype_map {
         /* Linux NetFilter LOG messages */
        { DLT_NFLOG,            LINKTYPE_NFLOG },
 
         /* Linux NetFilter LOG messages */
        { DLT_NFLOG,            LINKTYPE_NFLOG },
 
-       /* Ethernet with Hilscher pseudo-header */
-       { DLT_ETHERNET_HILSCHER, LINKTYPE_ETHERNET_HILSCHER },
+       /* Ethernet with Hilscher netANALYZER pseudo-header */
+       { DLT_NETANALYZER,      LINKTYPE_NETANALYZER },
 
 
-       /* Ethernet with Hilscher pseudo-header and preamble/SFD */
-       { DLT_ETHERNET_HILSCHER_TRANSPARENT, LINKTYPE_ETHERNET_HILSCHER_TRANSPARENT },
+       /* Ethernet with Hilscher netANALYZER pseudo-header and with preamble/SFD */
+       { DLT_NETANALYZER_TRANSPARENT, LINKTYPE_NETANALYZER_TRANSPARENT },
 
        { -1,                   -1 }
 };
 
        { -1,                   -1 }
 };
diff --git a/pcap.c b/pcap.c
index 4f2b2cd02541e5bd7364a9065c420c0b210ba775..9fc26f91e733b50ce60818eac6bc4d81c8de40cb 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -862,8 +862,8 @@ static struct dlt_choice dlt_choices[] = {
        DLT_CHOICE(DLT_DVB_CI, "DVB-CI"),
        DLT_CHOICE(DLT_JUNIPER_ATM_CEMIC, "Juniper ATM CEMIC"),
        DLT_CHOICE(DLT_NFLOG, "Linux netfilter log messages"),
        DLT_CHOICE(DLT_DVB_CI, "DVB-CI"),
        DLT_CHOICE(DLT_JUNIPER_ATM_CEMIC, "Juniper ATM CEMIC"),
        DLT_CHOICE(DLT_NFLOG, "Linux netfilter log messages"),
-       DLT_CHOICE(DLT_ETHERNET_HILSCHER, "Ethernet with Hilscher pseudo-header"),
-       DLT_CHOICE(DLT_ETHERNET_HILSCHER_TRANSPARENT, "Ethernet with Hilscher pseudo-header and preamble/SFD"),
+       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_SENTINEL
 };
 
        DLT_CHOICE_SENTINEL
 };
 
index 1ff8f288abbdf60f1ff7bb6474c3384377e5dba6..0820861ed1ab74584f93cd6f18934a964f380aca 100644 (file)
@@ -1043,21 +1043,23 @@ struct bpf_program {
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and always
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and always
- * with the payload including the FCS.
+ * with the payload including the FCS, as supplied by their
+ * netANALYZER hardware and software.
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
-#define DLT_ETHERNET_HILSCHER          240
+#define DLT_NETANALYZER                        240
 
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and FCS and
  * with the Ethernet header preceded by 7 bytes of preamble and
 
 /*
  * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type
  * for Ethernet packets with a 4-byte pseudo-header and FCS and
  * with the Ethernet header preceded by 7 bytes of preamble and
- * 1 byte of SFD.
+ * 1 byte of SFD, as supplied by their netANALYZER hardware and
+ * software.
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
  *
  * Requested by Holger P. Frommer <[email protected]>
  */
-#define DLT_ETHERNET_HILSCHER_TRANSPARENT      241
+#define DLT_NETANALYZER_TRANSPARENT    241
 
 
 /*
 
 
 /*