aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 821c7f45d2a7..d7f96ff68f77 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -387,6 +387,7 @@ typedef unsigned char *sk_buff_data_t;
387 * @vlan_tci: vlan tag control information 387 * @vlan_tci: vlan tag control information
388 * @inner_transport_header: Inner transport layer header (encapsulation) 388 * @inner_transport_header: Inner transport layer header (encapsulation)
389 * @inner_network_header: Network layer header (encapsulation) 389 * @inner_network_header: Network layer header (encapsulation)
390 * @inner_mac_header: Link layer header (encapsulation)
390 * @transport_header: Transport layer header 391 * @transport_header: Transport layer header
391 * @network_header: Network layer header 392 * @network_header: Network layer header
392 * @mac_header: Link layer header 393 * @mac_header: Link layer header
@@ -505,6 +506,7 @@ struct sk_buff {
505 506
506 sk_buff_data_t inner_transport_header; 507 sk_buff_data_t inner_transport_header;
507 sk_buff_data_t inner_network_header; 508 sk_buff_data_t inner_network_header;
509 sk_buff_data_t inner_mac_header;
508 sk_buff_data_t transport_header; 510 sk_buff_data_t transport_header;
509 sk_buff_data_t network_header; 511 sk_buff_data_t network_header;
510 sk_buff_data_t mac_header; 512 sk_buff_data_t mac_header;
@@ -1466,6 +1468,7 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
1466 1468
1467static inline void skb_reset_inner_headers(struct sk_buff *skb) 1469static inline void skb_reset_inner_headers(struct sk_buff *skb)
1468{ 1470{
1471 skb->inner_mac_header = skb->mac_header;
1469 skb->inner_network_header = skb->network_header; 1472 skb->inner_network_header = skb->network_header;
1470 skb->inner_transport_header = skb->transport_header; 1473 skb->inner_transport_header = skb->transport_header;
1471} 1474}
@@ -1511,6 +1514,22 @@ static inline void skb_set_inner_network_header(struct sk_buff *skb,
1511 skb->inner_network_header += offset; 1514 skb->inner_network_header += offset;
1512} 1515}
1513 1516
1517static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb)
1518{
1519 return skb->head + skb->inner_mac_header;
1520}
1521
1522static inline void skb_reset_inner_mac_header(struct sk_buff *skb)
1523{
1524 skb->inner_mac_header = skb->data - skb->head;
1525}
1526
1527static inline void skb_set_inner_mac_header(struct sk_buff *skb,
1528 const int offset)
1529{
1530 skb_reset_inner_mac_header(skb);
1531 skb->inner_mac_header += offset;
1532}
1514static inline bool skb_transport_header_was_set(const struct sk_buff *skb) 1533static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1515{ 1534{
1516 return skb->transport_header != ~0U; 1535 return skb->transport_header != ~0U;
@@ -1604,6 +1623,21 @@ static inline void skb_set_inner_network_header(struct sk_buff *skb,
1604 skb->inner_network_header = skb->data + offset; 1623 skb->inner_network_header = skb->data + offset;
1605} 1624}
1606 1625
1626static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb)
1627{
1628 return skb->inner_mac_header;
1629}
1630
1631static inline void skb_reset_inner_mac_header(struct sk_buff *skb)
1632{
1633 skb->inner_mac_header = skb->data;
1634}
1635
1636static inline void skb_set_inner_mac_header(struct sk_buff *skb,
1637 const int offset)
1638{
1639 skb->inner_mac_header = skb->data + offset;
1640}
1607static inline bool skb_transport_header_was_set(const struct sk_buff *skb) 1641static inline bool skb_transport_header_was_set(const struct sk_buff *skb)
1608{ 1642{
1609 return skb->transport_header != NULL; 1643 return skb->transport_header != NULL;