Implement "brctl showmacs" support in brcompat and ovs-brcompatd.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / netlink.h
1 #ifndef __LINUX_NETLINK_WRAPPER_H
2 #define __LINUX_NETLINK_WRAPPER_H 1
3
4 #include <linux/skbuff.h>
5 #include_next <linux/netlink.h>
6 #include <net/netlink.h>
7
8 #include <linux/version.h>
9
10 #ifndef NLMSG_DEFAULT_SIZE
11 #define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
12 #endif
13
14 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
15 #define nlmsg_new(s, f)   nlmsg_new_proper((s), (f))
16 static inline struct sk_buff *nlmsg_new_proper(int size, gfp_t flags)
17 {
18         return alloc_skb(size, flags);
19 }
20 #endif /* linux kernel < 2.6.19 */
21
22 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
23 static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
24 {
25         return (struct nlmsghdr *)skb->data;
26 }
27 #endif
28
29 #endif