X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/dc3034d63de71a109f5c37ee3210ce199d4399ca..refs/heads/tcpdump-3.8:/print-fr.c diff --git a/print-fr.c b/print-fr.c index f6ff9329..899a6338 100644 --- a/print-fr.c +++ b/print-fr.c @@ -20,8 +20,8 @@ */ #ifndef lint -static const char rcsid[] = - "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.15 2003-10-16 09:50:37 guy Exp $ (LBL)"; +static const char rcsid[] _U_ = + "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.17.2.4 2004-04-02 06:53:51 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -202,7 +202,8 @@ fr_if_print(const struct pcap_pkthdr *h, register const u_char *p) u_short extracted_ethertype; u_int32_t orgcode; register u_short et; - int dlci, addr_len; + u_int dlci; + u_int addr_len; u_char nlpid; u_int hdr_len; char *flags; @@ -372,7 +373,7 @@ static const char * parse_dlci_ie(const u_char *p, u_int ie_len, char *buffer, ((ie_len == 3) && !(p[1] & 0x80)) || ((ie_len == 4) && ((p[1] & 0x80) || !(p[2] & 0x80))) || ((ie_len == 5) && ((p[1] & 0x80) || (p[2] & 0x80) || - !(p[2] & 0x80))) || + !(p[3] & 0x80))) || (ie_len > 5) || !(p[ie_len - 1] & 0x80)) return "Invalid DLCI IE"; @@ -437,18 +438,6 @@ lmi_print(const u_char *p, u_int length) /* Loop through the rest of IE */ while (length > 0) { - if (is_ansi && (ptemp[0] & ONE_BYTE_IE_MASK)) { - /* not sure what's that - any pointers to - documentation? Is it for ANSI T1.617 annex D only, - isn't it? */ - printf("\t\tOne byte IE: %02x, Content %02x\n", - (*ptemp & 0x70) >> 4, (*ptemp & 0x0F)); - length--; - ptemp++; - continue; - } - - /* Multi-byte IE */ ie_p = (struct common_ie_header *)ptemp; if (length < sizeof(struct common_ie_header) || length < sizeof(struct common_ie_header) + ie_p->ie_len) {