X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux%2Fcompat%2Finclude%2Fnet%2Fnetlink.h;h=308cd69b4fba49a3c43bfad63cad092f7afdb1cd;hb=42d5dd9595cce35a8825a20be7d71a3a8f6f5640;hp=14041e2eb10e8c7352e1ee9e9c45f931e50ad7e2;hpb=d63649f1bb5101f365e51e7adbeed83a00bd6d69;p=sliver-openvswitch.git diff --git a/datapath/linux/compat/include/net/netlink.h b/datapath/linux/compat/include/net/netlink.h index 14041e2eb..308cd69b4 100644 --- a/datapath/linux/compat/include/net/netlink.h +++ b/datapath/linux/compat/include/net/netlink.h @@ -85,15 +85,21 @@ static inline __be64 nla_get_be64(const struct nlattr *nla) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) +#ifndef HAVE_NLA_PUT_BE16 static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value) { return nla_put(skb, attrtype, sizeof(__be16), &value); } +#endif + +#ifndef HAVE_NLA_PUT_BE32 static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value) { return nla_put(skb, attrtype, sizeof(__be32), &value); } +#endif + +#ifndef HAVE_NLA_PUT_BE64 static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value) { return nla_put(skb, attrtype, sizeof(__be64), &value); @@ -145,7 +151,7 @@ static inline int nlmsg_report(const struct nlmsghdr *nlh) } extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, - u32 pid, unsigned int group, int report, + u32 portid, unsigned int group, int report, gfp_t flags); #endif /* linux kernel < 2.6.19 */ @@ -156,13 +162,13 @@ extern int nlmsg_notify(struct sock *sk, struct sk_buff *skb, * argument. */ #define nlmsg_multicast rpl_nlmsg_multicast static inline int nlmsg_multicast(struct sock *sk, struct sk_buff *skb, - u32 pid, unsigned int group, gfp_t flags) + u32 portid, unsigned int group, gfp_t flags) { int err; NETLINK_CB(skb).dst_group = group; - err = netlink_broadcast(sk, skb, pid, group, flags); + err = netlink_broadcast(sk, skb, portid, group, flags); if (err > 0) err = 0;