diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-21 03:18:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:24 -0500 |
commit | 740c15d0dd281c0cbe1a9ab1abc4f332e0df29bc (patch) | |
tree | f627cc1660b7fd98aae953e3d367f0c35f34f0b6 /include | |
parent | 476bcea67f9a1ca6f2c0028e75fb2129272c8398 (diff) |
[VLAN]: Clean up vlan_hdr/vlan_ethhdr structs
Fix 3 space indentation and some overly long lines by moving the
comments to a kdoc structure description.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_vlan.h | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a26805198b14..a1b0066ec0d9 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -34,12 +34,30 @@ struct hlist_node; | |||
34 | #define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */ | 34 | #define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */ |
35 | #define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */ | 35 | #define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */ |
36 | 36 | ||
37 | /* | ||
38 | * struct vlan_hdr - vlan header | ||
39 | * @h_vlan_TCI: priority and VLAN ID | ||
40 | * @h_vlan_encapsulated_proto: packet type ID or len | ||
41 | */ | ||
42 | struct vlan_hdr { | ||
43 | __be16 h_vlan_TCI; | ||
44 | __be16 h_vlan_encapsulated_proto; | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * struct vlan_ethhdr - vlan ethernet header (ethhdr + vlan_hdr) | ||
49 | * @h_dest: destination ethernet address | ||
50 | * @h_source: source ethernet address | ||
51 | * @h_vlan_proto: ethernet protocol (always 0x8100) | ||
52 | * @h_vlan_TCI: priority and VLAN ID | ||
53 | * @h_vlan_encapsulated_proto: packet type ID or len | ||
54 | */ | ||
37 | struct vlan_ethhdr { | 55 | struct vlan_ethhdr { |
38 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 56 | unsigned char h_dest[ETH_ALEN]; |
39 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 57 | unsigned char h_source[ETH_ALEN]; |
40 | __be16 h_vlan_proto; /* Should always be 0x8100 */ | 58 | __be16 h_vlan_proto; |
41 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | 59 | __be16 h_vlan_TCI; |
42 | __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | 60 | __be16 h_vlan_encapsulated_proto; |
43 | }; | 61 | }; |
44 | 62 | ||
45 | #include <linux/skbuff.h> | 63 | #include <linux/skbuff.h> |
@@ -49,11 +67,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
49 | return (struct vlan_ethhdr *)skb_mac_header(skb); | 67 | return (struct vlan_ethhdr *)skb_mac_header(skb); |
50 | } | 68 | } |
51 | 69 | ||
52 | struct vlan_hdr { | ||
53 | __be16 h_vlan_TCI; /* Encapsulates priority and VLAN ID */ | ||
54 | __be16 h_vlan_encapsulated_proto; /* packet type ID field (or len) */ | ||
55 | }; | ||
56 | |||
57 | #define VLAN_VID_MASK 0xfff | 70 | #define VLAN_VID_MASK 0xfff |
58 | 71 | ||
59 | /* found in socket.c */ | 72 | /* found in socket.c */ |