if_tr.h
01:
02:
03:
04:
05:
06:
07:
08:
09:
10: <waltje@uWalt.NL.Mugnet.ORG>
11: <becker@super.org>
12: <stud11@cc4.kuleuven.ac.be>
13:
14:
15:
16:
17:
18:
19: #ifndef _LINUX_IF_TR_H
20: #define _LINUX_IF_TR_H
21:
22: #include <linux/types.h>
23: #include <asm/byteorder.h>
24:
25:
26:
27: #define TR_ALEN 6
28: #define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc))
29: #define AC 0x10
30: #define LLC_FRAME 0x40
31:
32:
33: #define EXTENDED_SAP 0xAA
34: #define UI_CMD 0x03
35:
36:
37: struct trh_hdr {
38: __u8 ac;
39: __u8 fc;
40: __u8 daddr[TR_ALEN];
41: __u8 saddr[TR_ALEN];
42: __be16 rcf;
43: __be16 rseg[8];
44: };
45:
46:
47:
48: struct trllc {
49: __u8 dsap;
50: __u8 ssap;
51: __u8 llc;
52: __u8 protid[3];
53: __be16 ethertype;
54: };
55:
56:
57: struct tr_statistics {
58: unsigned long rx_packets;
59: unsigned long tx_packets;
60: unsigned long rx_bytes;
61: unsigned long tx_bytes;
62: unsigned long rx_errors;
63: unsigned long tx_errors;
64: unsigned long rx_dropped;
65: unsigned long tx_dropped;
66: unsigned long multicast;
67: unsigned long transmit_collision;
68:
69:
70:
71:
72: unsigned long line_errors;
73: unsigned long internal_errors;
74: unsigned long burst_errors;
75: unsigned long A_C_errors;
76: unsigned long abort_delimiters;
77: unsigned long lost_frames;
78: unsigned long recv_congest_count;
79: unsigned long frame_copied_errors;
80: unsigned long frequency_errors;
81: unsigned long token_errors;
82: unsigned long dummy1;
83: };
84:
85:
86: #define TR_RII 0x80
87: #define TR_RCF_DIR_BIT 0x80
88: #define TR_RCF_LEN_MASK 0x1f00
89: #define TR_RCF_BROADCAST 0x8000
90: #define TR_RCF_LIMITED_BROADCAST 0xC000
91: #define TR_RCF_FRAME2K 0x20
92: #define TR_RCF_BROADCAST_MASK 0xC000
93: #define TR_MAXRIFLEN 18
94:
95: #endif
96:
© Andrew Scott 2006 -
2025,
All Rights Reserved