aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netxray.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-04-26 20:06:06 +0000
committerGuy Harris <guy@alum.mit.edu>2007-04-26 20:06:06 +0000
commit235596a3c8856c869abbe9a43bcee5600c8a38b4 (patch)
tree16fa7e32c1a68e3ced360621e502ef58b559b763 /wiretap/netxray.c
parent65b4512fe39007bf3f069bbbcc26c0a823d85aaf (diff)
From Jeff Foster: add support for Cisco HDLC captures.
svn path=/trunk/; revision=21598
Diffstat (limited to 'wiretap/netxray.c')
-rw-r--r--wiretap/netxray.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wiretap/netxray.c b/wiretap/netxray.c
index aadf4fb05e..4d0cae8bd3 100644
--- a/wiretap/netxray.c
+++ b/wiretap/netxray.c
@@ -132,6 +132,7 @@ struct netxray_hdr {
#define WAN_CAPTYPE_SMDS 10 /* SMDS DXI */
#define WAN_CAPTYPE_BROUTER4 11 /* Bridge/router captured with pod */
#define WAN_CAPTYPE_BROUTER5 12 /* Bridge/router captured with pod */
+#define WAN_CAPTYPE_CHDLC 19 /* Cisco router (CHDLC) captured with pod */
#define CAPTYPE_ATM 15 /* ATM captured with pod */
@@ -696,6 +697,13 @@ int netxray_open(wtap *wth, int *err, gchar **err_info)
file_encap = WTAP_ENCAP_SDLC;
break;
+ case WAN_CAPTYPE_CHDLC:
+ /*
+ * Cisco router (CHDLC) captured with pod
+ */
+ file_encap = WTAP_ENCAP_CHDLC_WITH_PHDR;
+ break;
+
default:
*err = WTAP_ERR_UNSUPPORTED_ENCAP;
*err_info = g_strdup_printf("netxray: WAN capture subtype 0x%02x unknown or unsupported",
@@ -1245,6 +1253,7 @@ netxray_set_pseudo_header(wtap *wth, const guint8 *pd, int len,
case WTAP_ENCAP_PPP_WITH_PHDR:
case WTAP_ENCAP_SDLC:
+ case WTAP_ENCAP_CHDLC_WITH_PHDR:
pseudo_header->p2p.sent =
(hdr->hdr_2_x.xxx[12] & 0x01) ? TRUE : FALSE;
break;