summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/token.h
diff options
context:
space:
mode:
authorlile <lile@FreeBSD.org>1999-08-28 15:14:15 +0000
committerlile <lile@FreeBSD.org>1999-08-28 15:14:15 +0000
commit9fd13149fc506d1eb6472d76b7fdfb600bf67762 (patch)
tree2b6e1a00dfea7773f4e093201146482fca996035 /contrib/tcpdump/token.h
parente696937c355e73a4790a8a1ba34595e8cf562414 (diff)
downloadFreeBSD-src-9fd13149fc506d1eb6472d76b7fdfb600bf67762.zip
FreeBSD-src-9fd13149fc506d1eb6472d76b7fdfb600bf67762.tar.gz
Add source routing support.
Diffstat (limited to 'contrib/tcpdump/token.h')
-rw-r--r--contrib/tcpdump/token.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/contrib/tcpdump/token.h b/contrib/tcpdump/token.h
index 6f28a1e..98d2c59 100644
--- a/contrib/tcpdump/token.h
+++ b/contrib/tcpdump/token.h
@@ -27,10 +27,27 @@
*/
#define TOKEN_HDR_LEN 14
-#define IS_SOURCE_ROUTED (tp->ether_shost[0] & 0x80)
-#define RIF_LENGTH ((ntohs(tp->rcf) & 0x1f00) >> 8)
#define TOKEN_RING_MAC_LEN 6
#define ROUTING_SEGMENT_MAX 16
+#define IS_SOURCE_ROUTED (tp->ether_shost[0] & 0x80)
+#define BROADCAST ((ntohs(tp->rcf) & 0xE000) >> 13)
+#define RIF_LENGTH ((ntohs(tp->rcf) & 0x1f00) >> 8)
+#define DIRECTION ((ntohs(tp->rcf) & 0x0080) >> 7)
+#define LARGEST_FRAME ((ntohs(tp->rcf) & 0x0070) >> 4)
+#define RING_NUMBER(x) ((ntohs(tp->rseg[x]) & 0xfff0) >> 4)
+#define BRIDGE_NUMBER(x) ((ntohs(tp->rseg[x]) & 0x000f))
+#define SEGMENT_COUNT ((RIF_LENGTH - 2) / 2)
+
+char *broadcast_indicator[] = { "Non-Broadcast", "Non-Broadcast",
+ "Non-Broadcast", "Non-Broadcast",
+ "All-routes", "All-routes",
+ "Single-route", "Single-route"};
+
+char *direction[] = { "Forward", "Backward"};
+
+char *largest_frame[] = { "516", "1500", "2052", "4472", "8144",
+ "11407", "17800", ""};
+
struct token_header {
u_char ac;
@@ -40,4 +57,3 @@ struct token_header {
u_short rcf;
u_short rseg[ROUTING_SEGMENT_MAX];
};
-
OpenPOWER on IntegriCloud