Ethereal-dev: [Ethereal-dev] nettl (HP-UX) - Tweak to new dump code

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Mark C. Brown" <mbrown@xxxxxxxxxx>
Date: Tue, 12 Oct 2004 07:14:10 -0400
Greetings,

Added code to handle raw ICMP encap.


Thanks!

Mark
-- 
"If a train station is where a train stops, | Mark C. Brown
 then what's a workstation?" -- D. Huber    | mbrown@xxxxxxxxxx
Index: wiretap/nettl.c
===================================================================
--- wiretap/nettl.c	(revision 12263)
+++ wiretap/nettl.c	(working copy)
@@ -665,6 +665,8 @@
 		case WTAP_ENCAP_FDDI:
 		case WTAP_ENCAP_TOKEN_RING:
 		case WTAP_ENCAP_RAW_IP:
+		case WTAP_ENCAP_RAW_ICMP:
+		case WTAP_ENCAP_RAW_ICMPV6:
 		case WTAP_ENCAP_PER_PACKET:
 		case WTAP_ENCAP_UNKNOWN:
 			return 0;
@@ -749,6 +751,14 @@
 			rec_hdr.subsys = g_htons(NETTL_SUBSYS_PCI_TR);
 			break;
 	
+		case WTAP_ENCAP_RAW_ICMP:
+			rec_hdr.subsys = g_htons(NETTL_SUBSYS_NS_LS_ICMP);
+			break;
+	
+		case WTAP_ENCAP_RAW_ICMPV6:
+			rec_hdr.subsys = g_htons(NETTL_SUBSYS_NS_LS_ICMPV6);
+			break;
+	
 		default:
 			/* found one we don't support */
 			*err = WTAP_ERR_UNSUPPORTED_ENCAP;