]> The Tcpdump Group git mirrors - tcpdump/commitdiff
bugfix: bogus SS codepoints, display ctrl field correct, added 'Poll' token for I...
authorhannes <hannes>
Thu, 1 Dec 2005 17:48:25 +0000 (17:48 +0000)
committerhannes <hannes>
Thu, 1 Dec 2005 17:48:25 +0000 (17:48 +0000)
llc.h
print-llc.c

diff --git a/llc.h b/llc.h
index fabba4cb631eebc77fcf0f69bd1e1605ec1961e8..688fed74147b10ad7850070841ac7ca7e5ac8c49 100644 (file)
--- a/llc.h
+++ b/llc.h
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.2 2005-09-29 07:40:12 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.3 2005-12-01 17:48:25 hannes Exp $ (LBL)
  */
 
 /*
@@ -44,7 +44,7 @@
 #define        LLC_XID         0xaf
 #define        LLC_FRMR        0x87
 
-#define        LLC_S_CMD(is)   (((is) >> 1) & 0x03)
+#define        LLC_S_CMD(is)   (((is) >> 2) & 0x03)
 #define        LLC_RR          0x0001
 #define        LLC_RNR         0x0005
 #define        LLC_REJ         0x0009
index 7ba7065b502f48fb99232055497c3b4c579af376..ff9ded09ae11876e5f0bf0f5824291d5fd1d6d49 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.61.2.6 2005-11-13 12:13:00 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.61.2.7 2005-12-01 17:48:25 hannes Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -80,14 +80,16 @@ static const struct tok llc_flag_values[] = {
         { LLC_GSAP, "Response" },
         { LLC_U_POLL, "Poll" },
         { LLC_GSAP|LLC_U_POLL, "Final" },
+        { LLC_IS_POLL, "Poll" },
         { LLC_GSAP|LLC_IS_POLL, "Final" },
        { 0, NULL }
 };
 
+
 static const struct tok llc_supervisory_values[] = { 
         { 0, "Receiver Ready" },
-        { 1, "Reject" },
-        { 2, "Receiver not Ready" },
+        { 1, "Receiver not Ready" },
+        { 2, "Reject" },
        { 0,             NULL }
 };
 
@@ -206,16 +208,17 @@ llc_print(const u_char *p, u_int length, u_int caplen,
        ssap = ssap_field & ~LLC_GSAP;
 
        if (eflag) {
-                printf("LLC, dsap %s (0x%02x), ssap %s (0x%02x)",
+                printf("LLC, dsap %s (0x%02x), ssap %s (0x%02x) %s",
                        tok2str(llc_values, "Unknown", dsap),
                        dsap,
                        tok2str(llc_values, "Unknown", ssap),
-                       ssap);
+                       ssap,
+                       tok2str(llc_flag_values, "Unknown", ssap_field & LLC_GSAP));
 
                if (is_u) {
-                       printf(", cmd 0x%02x: ", control);
+                       printf(", ctrl 0x%02x: ", control);
                } else {
-                       printf(", cmd 0x%04x: ", control);
+                       printf(", ctrl 0x%04x: ", control);
                }
        }