1 #ifndef __NET_NETLINK_WRAPPER_H
2 #define __NET_NETLINK_WRAPPER_H 1
4 #include_next <net/netlink.h>
6 #ifndef HAVE_NLA_NUL_STRING
7 #define NLA_NUL_STRING NLA_STRING
9 static inline int VERIFY_NUL_STRING(struct nlattr *attr)
11 return (!attr || (nla_len(attr)
12 && memchr(nla_data(attr), '\0', nla_len(attr)))
16 static inline int VERIFY_NUL_STRING(struct nlattr *attr)
20 #endif /* !HAVE_NLA_NUL_STRING */
24 #define NLA_PUT_BE16(skb, attrtype, value) \
25 NLA_PUT_TYPE(skb, __be16, attrtype, value)
26 #endif /* !NLA_PUT_BE16 */
29 #ifndef HAVE_NLA_GET_BE16
31 * nla_get_be16 - return payload of __be16 attribute
32 * @nla: __be16 netlink attribute
34 static inline __be16 nla_get_be16(struct nlattr *nla)
36 return *(__be16 *) nla_data(nla);
38 #endif /* !HAVE_NLA_GET_BE16 */
40 #endif /* net/netlink.h */