aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-19 07:13:52 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-19 07:13:52 +0000
commit3f8eaf78e6b43cba44f41307d3474f1c2afdab1a (patch)
tree26319169014fcb2a4b0f287771f0fb1cbd45707d /wiretap
parent6de0a8cfeb877f7699e32512c27c88921564c23c (diff)
From Mark C. Brown: fix support for nettl NETTL_SUBSYS_NS_LS_ICMP and
NETTL_SUBSYS_NS_LS_ICMPV6 - they don't even have IP headers, so we need to directly call the ICMP and ICMPv6 dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12047 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/nettl.c8
-rw-r--r--wiretap/wtap.c6
-rw-r--r--wiretap/wtap.h4
3 files changed, 14 insertions, 4 deletions
diff --git a/wiretap/nettl.c b/wiretap/nettl.c
index 702b0e8f0e..404c613ab0 100644
--- a/wiretap/nettl.c
+++ b/wiretap/nettl.c
@@ -311,10 +311,12 @@ nettl_read_rec_header(wtap *wth, FILE_T fh, struct wtap_pkthdr *phdr,
|| (encap[3] == NETTL_SUBSYS_NS_LS_LOOPBACK)
|| (encap[3] == NETTL_SUBSYS_NS_LS_UDP)
|| (encap[3] == NETTL_SUBSYS_NS_LS_TCP)
- || (encap[3] == NETTL_SUBSYS_NS_LS_ICMP)
- || (encap[3] == NETTL_SUBSYS_NS_LS_IPV6)
- || (encap[3] == NETTL_SUBSYS_NS_LS_ICMPV6) ) {
+ || (encap[3] == NETTL_SUBSYS_NS_LS_IPV6)) {
phdr->pkt_encap = WTAP_ENCAP_RAW_IP;
+ } else if (encap[3] == NETTL_SUBSYS_NS_LS_ICMP) {
+ phdr->pkt_encap = WTAP_ENCAP_RAW_ICMP;
+ } else if (encap[3] == NETTL_SUBSYS_NS_LS_ICMPV6) {
+ phdr->pkt_encap = WTAP_ENCAP_RAW_ICMPV6;
} else if (encap[3] == NETTL_SUBSYS_PCI_FDDI) {
phdr->pkt_encap = WTAP_ENCAP_FDDI;
} else if( (encap[3] == NETTL_SUBSYS_PCI_TR)
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index dda21fde40..a58e93fc32 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -251,6 +251,12 @@ static const struct encap_type_info {
/* WTAP_ENCAP_BACNET_MS_TP */
{ "BACnet MS/TP", "bacnet-ms-tp" },
+
+ /* WTAP_ENCAP_RAW_ICMP */
+ { "Raw ICMP", "raw-icmp" },
+
+ /* WTAP_ENCAP_RAW_ICMPV6 */
+ { "Raw ICMPv6", "raw-icmpv6" },
};
/* Name that should be somewhat descriptive. */
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 2df872017c..d624df981f 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -153,9 +153,11 @@
#define WTAP_ENCAP_SYMANTEC 61
#define WTAP_ENCAP_APPLE_IP_OVER_IEEE1394 62
#define WTAP_ENCAP_BACNET_MS_TP 63
+#define WTAP_ENCAP_RAW_ICMP 64
+#define WTAP_ENCAP_RAW_ICMPV6 65
/* last WTAP_ENCAP_ value + 1 */
-#define WTAP_NUM_ENCAP_TYPES 64
+#define WTAP_NUM_ENCAP_TYPES 66
/* File types that can be read by wiretap.
We support writing some many of these file types, too, so we