aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_vlan.h4
-rw-r--r--include/linux/skbuff.h49
2 files changed, 22 insertions, 31 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 544490d9d0bd..81e9bc93569b 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -275,8 +275,8 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, unsigned short
275 veth->h_vlan_TCI = htons(tag); 275 veth->h_vlan_TCI = htons(tag);
276 276
277 skb->protocol = __constant_htons(ETH_P_8021Q); 277 skb->protocol = __constant_htons(ETH_P_8021Q);
278 skb->mac.raw -= VLAN_HLEN; 278 skb->mac_header -= VLAN_HLEN;
279 skb->nh.raw -= VLAN_HLEN; 279 skb->network_header -= VLAN_HLEN;
280 280
281 return skb; 281 return skb;
282} 282}
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 230dd43fc9b3..c45ad1263271 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -69,8 +69,8 @@
69 * NONE: skb is checksummed by protocol or csum is not required. 69 * NONE: skb is checksummed by protocol or csum is not required.
70 * 70 *
71 * PARTIAL: device is required to csum packet as seen by hard_start_xmit 71 * PARTIAL: device is required to csum packet as seen by hard_start_xmit
72 * from skb->h.raw to the end and to record the checksum 72 * from skb->transport_header to the end and to record the checksum
73 * at skb->h.raw+skb->csum. 73 * at skb->transport_header + skb->csum.
74 * 74 *
75 * Device must show its capabilities in dev->features, set 75 * Device must show its capabilities in dev->features, set
76 * at device setup time. 76 * at device setup time.
@@ -188,8 +188,8 @@ enum {
188 * @dev: Device we arrived on/are leaving by 188 * @dev: Device we arrived on/are leaving by
189 * @iif: ifindex of device we arrived on 189 * @iif: ifindex of device we arrived on
190 * @h: Transport layer header 190 * @h: Transport layer header
191 * @nh: Network layer header 191 * @network_header: Network layer header
192 * @mac: Link layer header 192 * @mac_header: Link layer header
193 * @dst: destination entry 193 * @dst: destination entry
194 * @sp: the security path, used for xfrm 194 * @sp: the security path, used for xfrm
195 * @cb: Control buffer. Free for use by every layer. Put private vars here 195 * @cb: Control buffer. Free for use by every layer. Put private vars here
@@ -236,18 +236,9 @@ struct sk_buff {
236 int iif; 236 int iif;
237 /* 4 byte hole on 64 bit*/ 237 /* 4 byte hole on 64 bit*/
238 238
239 union { 239 unsigned char *transport_header;
240 unsigned char *raw; 240 unsigned char *network_header;
241 } h; 241 unsigned char *mac_header;
242
243 union {
244 unsigned char *raw;
245 } nh;
246
247 union {
248 unsigned char *raw;
249 } mac;
250
251 struct dst_entry *dst; 242 struct dst_entry *dst;
252 struct sec_path *sp; 243 struct sec_path *sp;
253 244
@@ -953,68 +944,68 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
953 944
954static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 945static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
955{ 946{
956 return skb->h.raw; 947 return skb->transport_header;
957} 948}
958 949
959static inline void skb_reset_transport_header(struct sk_buff *skb) 950static inline void skb_reset_transport_header(struct sk_buff *skb)
960{ 951{
961 skb->h.raw = skb->data; 952 skb->transport_header = skb->data;
962} 953}
963 954
964static inline void skb_set_transport_header(struct sk_buff *skb, 955static inline void skb_set_transport_header(struct sk_buff *skb,
965 const int offset) 956 const int offset)
966{ 957{
967 skb->h.raw = skb->data + offset; 958 skb->transport_header = skb->data + offset;
968} 959}
969 960
970static inline int skb_transport_offset(const struct sk_buff *skb) 961static inline int skb_transport_offset(const struct sk_buff *skb)
971{ 962{
972 return skb->h.raw - skb->data; 963 return skb->transport_header - skb->data;
973} 964}
974 965
975static inline unsigned char *skb_network_header(const struct sk_buff *skb) 966static inline unsigned char *skb_network_header(const struct sk_buff *skb)
976{ 967{
977 return skb->nh.raw; 968 return skb->network_header;
978} 969}
979 970
980static inline void skb_reset_network_header(struct sk_buff *skb) 971static inline void skb_reset_network_header(struct sk_buff *skb)
981{ 972{
982 skb->nh.raw = skb->data; 973 skb->network_header = skb->data;
983} 974}
984 975
985static inline void skb_set_network_header(struct sk_buff *skb, const int offset) 976static inline void skb_set_network_header(struct sk_buff *skb, const int offset)
986{ 977{
987 skb->nh.raw = skb->data + offset; 978 skb->network_header = skb->data + offset;
988} 979}
989 980
990static inline int skb_network_offset(const struct sk_buff *skb) 981static inline int skb_network_offset(const struct sk_buff *skb)
991{ 982{
992 return skb->nh.raw - skb->data; 983 return skb->network_header - skb->data;
993} 984}
994 985
995static inline u32 skb_network_header_len(const struct sk_buff *skb) 986static inline u32 skb_network_header_len(const struct sk_buff *skb)
996{ 987{
997 return skb->h.raw - skb->nh.raw; 988 return skb->transport_header - skb->network_header;
998} 989}
999 990
1000static inline unsigned char *skb_mac_header(const struct sk_buff *skb) 991static inline unsigned char *skb_mac_header(const struct sk_buff *skb)
1001{ 992{
1002 return skb->mac.raw; 993 return skb->mac_header;
1003} 994}
1004 995
1005static inline int skb_mac_header_was_set(const struct sk_buff *skb) 996static inline int skb_mac_header_was_set(const struct sk_buff *skb)
1006{ 997{
1007 return skb->mac.raw != NULL; 998 return skb->mac_header != NULL;
1008} 999}
1009 1000
1010static inline void skb_reset_mac_header(struct sk_buff *skb) 1001static inline void skb_reset_mac_header(struct sk_buff *skb)
1011{ 1002{
1012 skb->mac.raw = skb->data; 1003 skb->mac_header = skb->data;
1013} 1004}
1014 1005
1015static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) 1006static inline void skb_set_mac_header(struct sk_buff *skb, const int offset)
1016{ 1007{
1017 skb->mac.raw = skb->data + offset; 1008 skb->mac_header = skb->data + offset;
1018} 1009}
1019 1010
1020/* 1011/*