aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-19 07:13:52 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-19 07:13:52 +0000
commit3cdebd31db6ee22cae1cf15e8586ed11bbcf1db7 (patch)
tree26319169014fcb2a4b0f287771f0fb1cbd45707d /wiretap
parentf9a64fcf9d9f5bc2ebeb8d746dbac46c6bdbdb15 (diff)
downloadwireshark-3cdebd31db6ee22cae1cf15e8586ed11bbcf1db7.tar.gz
wireshark-3cdebd31db6ee22cae1cf15e8586ed11bbcf1db7.tar.bz2
wireshark-3cdebd31db6ee22cae1cf15e8586ed11bbcf1db7.zip
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. svn path=/trunk/; revision=12047
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