summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-09-15 17:35:23 -0700
committerGuy Harris <guy@alum.mit.edu>2011-09-15 17:35:52 -0700
commitb131cecfd1ee42886c13ed11639ce1ae6ce92ea3 (patch)
tree55b8d2724e8d2f4e79a4e727079175a9f28f897c
parent5aafb33027bd33ff78bd61f9ec6c85a1af85699f (diff)
downloadlibpcap-b131cecfd1ee42886c13ed11639ce1ae6ce92ea3.tar.gz
Change name of Hilscher link types to say NETANALYER.
That makes the names a bit shorter, and mentions the specific Hilscher product to which they apply.
-rw-r--r--gencode.c36
-rw-r--r--pcap-common.c19
-rw-r--r--pcap.c4
-rw-r--r--pcap/bpf.h10
4 files changed, 36 insertions, 33 deletions
diff --git a/gencode.c b/gencode.c
index d0a487d3..03274fbf 100644
--- a/gencode.c
+++ b/gencode.c
@@ -1620,7 +1620,7 @@ init_linktype(p)
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 */
@@ -1628,7 +1628,7 @@ init_linktype(p)
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 */
@@ -3106,8 +3106,8 @@ gen_linktype(proto)
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;
@@ -4869,8 +4869,8 @@ gen_gateway(eaddr, alist, proto, dir)
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:
@@ -6242,8 +6242,8 @@ gen_scode(name, q)
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(
@@ -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:
- 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);
@@ -7368,8 +7368,8 @@ gen_broadcast(proto)
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);
@@ -7465,8 +7465,8 @@ gen_multicast(proto)
/* 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:
@@ -8093,8 +8093,8 @@ gen_vlan(vlan_num)
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);
@@ -8158,8 +8158,8 @@ gen_mpls(label_num)
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;
diff --git a/pcap-common.c b/pcap-common.c
index 1bba068e..9af2aaab 100644
--- a/pcap-common.c
+++ b/pcap-common.c
@@ -790,21 +790,22 @@
/*
* 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 <HPfrommer@hilscher.com>
*/
-#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
- * 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 <HPfrommer@hilscher.com>
*/
-#define LINKTYPE_ETHERNET_HILSCHER_TRANSPARENT 241
+#define LINKTYPE_NETANALYZER_TRANSPARENT 241
static struct linktype_map {
@@ -1182,11 +1183,11 @@ static struct linktype_map {
/* 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 }
};
diff --git a/pcap.c b/pcap.c
index 4f2b2cd0..9fc26f91 100644
--- 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_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
};
diff --git a/pcap/bpf.h b/pcap/bpf.h
index 1ff8f288..0820861e 100644
--- a/pcap/bpf.h
+++ b/pcap/bpf.h
@@ -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
- * 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 <HPfrommer@hilscher.com>
*/
-#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
- * 1 byte of SFD.
+ * 1 byte of SFD, as supplied by their netANALYZER hardware and
+ * software.
*
* Requested by Holger P. Frommer <HPfrommer@hilscher.com>
*/
-#define DLT_ETHERNET_HILSCHER_TRANSPARENT 241
+#define DLT_NETANALYZER_TRANSPARENT 241
/*