]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-fr.c
add tracefiles for infinite loop testing
[tcpdump] / print-fr.c
index f6ff9329af543b18393272486139e3d5a5547921..899a633879865ceb96e0f1122a447de4210d86af 100644 (file)
@@ -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) {