X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Flinux-2.6%2Fcompat-2.6%2Finclude%2Fnet%2Fnetlink.h;h=52238d8b670b60feea198caca1c1cbd085d3a3f4;hb=c0a0ac4f414cd17caead7c1066b016ddbc28b9ce;hp=2ee321be8a26f73be1e2cddde6cb1c2915da0cbd;hpb=e2c779b3c277c085fc0e1a3f5b00f0119430af74;p=sliver-openvswitch.git diff --git a/datapath/linux-2.6/compat-2.6/include/net/netlink.h b/datapath/linux-2.6/compat-2.6/include/net/netlink.h index 2ee321be8..52238d8b6 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/netlink.h +++ b/datapath/linux-2.6/compat-2.6/include/net/netlink.h @@ -111,4 +111,21 @@ static inline int nla_type(const struct nlattr *nla) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) +#define nla_parse_nested(tb, maxtype, nla, policy) \ + nla_parse_nested(tb, maxtype, (struct nlattr *)(nla), policy) +#endif + +#ifndef nla_for_each_nested +#define nla_for_each_nested(pos, nla, rem) \ + nla_for_each_attr(pos, nla_data(nla), nla_len(nla), rem) +#endif + +#ifndef HAVE_NLA_FIND_NESTED +static inline struct nlattr *nla_find_nested(struct nlattr *nla, int attrtype) +{ + return nla_find(nla_data(nla), nla_len(nla), attrtype); +} +#endif + #endif /* net/netlink.h */