diff options
Diffstat (limited to 'include/linux/if_tr.h')
-rw-r--r-- | include/linux/if_tr.h | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 4fd451f81ccb..3fba9e2f5427 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 10 | * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
11 | * Donald Becker, <becker@super.org> | 11 | * Donald Becker, <becker@super.org> |
12 | * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> | 12 | * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -19,24 +19,18 @@ | |||
19 | #ifndef _LINUX_IF_TR_H | 19 | #ifndef _LINUX_IF_TR_H |
20 | #define _LINUX_IF_TR_H | 20 | #define _LINUX_IF_TR_H |
21 | 21 | ||
22 | #include <asm/byteorder.h> /* For __be16 */ | ||
22 | 23 | ||
23 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble | 24 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble |
24 | and FCS/CRC (frame check sequence). */ | 25 | and FCS/CRC (frame check sequence). */ |
25 | #define TR_ALEN 6 /* Octets in one ethernet addr */ | 26 | #define TR_ALEN 6 /* Octets in one token-ring addr */ |
26 | #define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) | 27 | #define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) |
27 | #define AC 0x10 | 28 | #define AC 0x10 |
28 | #define LLC_FRAME 0x40 | 29 | #define LLC_FRAME 0x40 |
29 | #if 0 | ||
30 | #define ETH_HLEN 14 /* Total octets in header. */ | ||
31 | #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ | ||
32 | #define ETH_DATA_LEN 1500 /* Max. octets in payload */ | ||
33 | #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ | ||
34 | #endif | ||
35 | |||
36 | 30 | ||
37 | /* LLC and SNAP constants */ | 31 | /* LLC and SNAP constants */ |
38 | #define EXTENDED_SAP 0xAA | 32 | #define EXTENDED_SAP 0xAA |
39 | #define UI_CMD 0x03 | 33 | #define UI_CMD 0x03 |
40 | 34 | ||
41 | /* This is an Token-Ring frame header. */ | 35 | /* This is an Token-Ring frame header. */ |
42 | struct trh_hdr { | 36 | struct trh_hdr { |
@@ -44,8 +38,8 @@ struct trh_hdr { | |||
44 | __u8 fc; /* frame control field */ | 38 | __u8 fc; /* frame control field */ |
45 | __u8 daddr[TR_ALEN]; /* destination address */ | 39 | __u8 daddr[TR_ALEN]; /* destination address */ |
46 | __u8 saddr[TR_ALEN]; /* source address */ | 40 | __u8 saddr[TR_ALEN]; /* source address */ |
47 | __u16 rcf; /* route control field */ | 41 | __be16 rcf; /* route control field */ |
48 | __u16 rseg[8]; /* routing registers */ | 42 | __be16 rseg[8]; /* routing registers */ |
49 | }; | 43 | }; |
50 | 44 | ||
51 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
@@ -63,7 +57,7 @@ struct trllc { | |||
63 | __u8 ssap; /* source SAP */ | 57 | __u8 ssap; /* source SAP */ |
64 | __u8 llc; /* LLC control field */ | 58 | __u8 llc; /* LLC control field */ |
65 | __u8 protid[3]; /* protocol id */ | 59 | __u8 protid[3]; /* protocol id */ |
66 | __u16 ethertype; /* ether type field */ | 60 | __be16 ethertype; /* ether type field */ |
67 | }; | 61 | }; |
68 | 62 | ||
69 | /* Token-Ring statistics collection data. */ | 63 | /* Token-Ring statistics collection data. */ |
@@ -96,14 +90,13 @@ struct tr_statistics { | |||
96 | }; | 90 | }; |
97 | 91 | ||
98 | /* source routing stuff */ | 92 | /* source routing stuff */ |
99 | 93 | #define TR_RII 0x80 | |
100 | #define TR_RII 0x80 | 94 | #define TR_RCF_DIR_BIT 0x80 |
101 | #define TR_RCF_DIR_BIT 0x80 | 95 | #define TR_RCF_LEN_MASK 0x1f00 |
102 | #define TR_RCF_LEN_MASK 0x1f00 | 96 | #define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ |
103 | #define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ | 97 | #define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ |
104 | #define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ | 98 | #define TR_RCF_FRAME2K 0x20 |
105 | #define TR_RCF_FRAME2K 0x20 | 99 | #define TR_RCF_BROADCAST_MASK 0xC000 |
106 | #define TR_RCF_BROADCAST_MASK 0xC000 | 100 | #define TR_MAXRIFLEN 18 |
107 | #define TR_MAXRIFLEN 18 | ||
108 | 101 | ||
109 | #endif /* _LINUX_IF_TR_H */ | 102 | #endif /* _LINUX_IF_TR_H */ |