summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannes <hannes>2005-12-01 17:45:45 +0000
committerhannes <hannes>2005-12-01 17:45:45 +0000
commit46b52e5133d5fda0d7177280d79d16c5452f39ee (patch)
tree9c9bd4f742ec1827f2af59f3aa4facf22446da6a
parent95f66c8c622d57b50443c4d40be8b00a7de0aa94 (diff)
downloadtcpdump-46b52e5133d5fda0d7177280d79d16c5452f39ee.tar.gz
bugfix: bogus SS codepoints, display ctrl field correct, added 'Poll' token for I/S frames
-rw-r--r--llc.h4
-rw-r--r--print-llc.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/llc.h b/llc.h
index 6adbef2b..8c83fe09 100644
--- 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.19 2005-09-29 07:37:08 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.20 2005-12-01 17:45:45 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
diff --git a/print-llc.c b/print-llc.c
index a797804b..d0ae8b20 100644
--- a/print-llc.c
+++ b/print-llc.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.67 2005-11-13 12:12:42 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.68 2005-12-01 17:45:45 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);
}
}