summaryrefslogtreecommitdiff
path: root/datapath/linux-2.6/compat-2.6/include/linux/ip.h
blob: 36765396b2951da1ef94c443ca07dc6155bd421c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __LINUX_IP_WRAPPER_H
#define __LINUX_IP_WRAPPER_H 1

#include_next <linux/ip.h>

#ifndef HAVE_SKBUFF_HEADER_HELPERS
static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
{
	return (struct iphdr *)skb_network_header(skb);
}

static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
{
	return ip_hdr(skb)->ihl * 4;
}
#endif /* !HAVE_SKBUFF_HEADER_HELPERS */

#endif