Ethereal-dev: [Ethereal-dev] New WTAP_ENCAP_ value

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

From: Tomas Kukosa <tomas.kukosa@xxxxxxxxxx>
Date: Thu, 07 Feb 2002 11:56:10 +0100
Please, can you add to the Ethereal the new WTAP_ENCAP_HHDLC value
according to the new DLT_HHDLC in the libpcap? Necessary changes are in
the attached diff-file.
  Thanks,
    Tom Kukosa
diff -c -r src-0.9.1/wiretap/libpcap.c src/wiretap/libpcap.c
*** src-0.9.1/wiretap/libpcap.c	Sat Feb  2 19:48:34 2002
--- src/wiretap/libpcap.c	Thu Feb  7 10:44:44 2002
***************
*** 381,386 ****
--- 381,387 ----
  
  	{ 118,		WTAP_ENCAP_CISCO_IOS },
  	{ 119,		WTAP_ENCAP_PRISM_HEADER }, /* Prism monitor mode hdr */
+     { 121,      WTAP_ENCAP_HHDLC },     /* HiPath HDLC */
  };
  #define NUM_PCAP_ENCAPS (sizeof pcap_to_wtap_map / sizeof pcap_to_wtap_map[0])
  
diff -c -r src-0.9.1/wiretap/wtap.c src/wiretap/wtap.c
*** src-0.9.1/wiretap/wtap.c	Sat Feb  2 19:48:34 2002
--- src/wiretap/wtap.c	Thu Feb  7 10:43:08 2002
***************
*** 139,144 ****
--- 139,147 ----
  
  	/* WTAP_ENCAP_AIROPEEK  */
  	{ "IEEE 802.11 plus AiroPeek header", "airopeek" },
+ 
+     /* WTAP_ENCAP_HHDLC */
+     { "HiPath HDLC", "hhdlc" },
  };
  
  /* Name that should be somewhat descriptive. */
diff -c -r src-0.9.1/wiretap/wtap.h src/wiretap/wtap.h
*** src-0.9.1/wiretap/wtap.h	Sat Feb  2 19:48:34 2002
--- src/wiretap/wtap.h	Thu Feb  7 10:36:30 2002
***************
*** 106,114 ****
  #define WTAP_ENCAP_PRISM_HEADER			24
  #define WTAP_ENCAP_PFLOG			25
  #define WTAP_ENCAP_AIROPEEK			26
  
  /* last WTAP_ENCAP_ value + 1 */
! #define WTAP_NUM_ENCAP_TYPES			27
  
  /* File types that can be read by wiretap.
     We support writing some many of these file types, too, so we
--- 106,115 ----
  #define WTAP_ENCAP_PRISM_HEADER			24
  #define WTAP_ENCAP_PFLOG			25
  #define WTAP_ENCAP_AIROPEEK			26
+ #define WTAP_ENCAP_HHDLC            27
  
  /* last WTAP_ENCAP_ value + 1 */
! #define WTAP_NUM_ENCAP_TYPES			28
  
  /* File types that can be read by wiretap.
     We support writing some many of these file types, too, so we