From 235596a3c8856c869abbe9a43bcee5600c8a38b4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 26 Apr 2007 20:06:06 +0000 Subject: [PATCH] From Jeff Foster: add support for Cisco HDLC captures. svn path=/trunk/; revision=21598 --- wiretap/netxray.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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;