Lines Matching refs:nla
509 ssize_t nla_strscpy(char *dst, const struct nlattr *nla, size_t dstsize);
510 char *nla_strdup(const struct nlattr *nla, gfp_t flags);
512 int nla_memcmp(const struct nlattr *nla, const void *data, size_t size);
513 int nla_strcmp(const struct nlattr *nla, const char *str);
1128 static inline int nla_type(const struct nlattr *nla) in nla_type() argument
1130 return nla->nla_type & NLA_TYPE_MASK; in nla_type()
1137 static inline void *nla_data(const struct nlattr *nla) in nla_data() argument
1139 return (char *) nla + NLA_HDRLEN; in nla_data()
1146 static inline int nla_len(const struct nlattr *nla) in nla_len() argument
1148 return nla->nla_len - NLA_HDRLEN; in nla_len()
1156 static inline int nla_ok(const struct nlattr *nla, int remaining) in nla_ok() argument
1158 return remaining >= (int) sizeof(*nla) && in nla_ok()
1159 nla->nla_len >= sizeof(*nla) && in nla_ok()
1160 nla->nla_len <= remaining; in nla_ok()
1171 static inline struct nlattr *nla_next(const struct nlattr *nla, int *remaining) in nla_next() argument
1173 unsigned int totlen = NLA_ALIGN(nla->nla_len); in nla_next()
1176 return (struct nlattr *) ((char *) nla + totlen); in nla_next()
1187 nla_find_nested(const struct nlattr *nla, int attrtype) in nla_find_nested() argument
1189 return nla_find(nla_data(nla), nla_len(nla), attrtype); in nla_find_nested()
1203 const struct nlattr *nla, in nla_parse_nested() argument
1207 if (!(nla->nla_type & NLA_F_NESTED)) { in nla_parse_nested()
1208 NL_SET_ERR_MSG_ATTR(extack, nla, "NLA_F_NESTED is missing"); in nla_parse_nested()
1212 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested()
1227 const struct nlattr *nla, in nla_parse_nested_deprecated() argument
1231 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested_deprecated()
1552 static inline u32 nla_get_u32(const struct nlattr *nla) in nla_get_u32() argument
1554 return *(u32 *) nla_data(nla); in nla_get_u32()
1561 static inline __be32 nla_get_be32(const struct nlattr *nla) in nla_get_be32() argument
1563 return *(__be32 *) nla_data(nla); in nla_get_be32()
1570 static inline __le32 nla_get_le32(const struct nlattr *nla) in nla_get_le32() argument
1572 return *(__le32 *) nla_data(nla); in nla_get_le32()
1579 static inline u16 nla_get_u16(const struct nlattr *nla) in nla_get_u16() argument
1581 return *(u16 *) nla_data(nla); in nla_get_u16()
1588 static inline __be16 nla_get_be16(const struct nlattr *nla) in nla_get_be16() argument
1590 return *(__be16 *) nla_data(nla); in nla_get_be16()
1597 static inline __le16 nla_get_le16(const struct nlattr *nla) in nla_get_le16() argument
1599 return *(__le16 *) nla_data(nla); in nla_get_le16()
1606 static inline u8 nla_get_u8(const struct nlattr *nla) in nla_get_u8() argument
1608 return *(u8 *) nla_data(nla); in nla_get_u8()
1615 static inline u64 nla_get_u64(const struct nlattr *nla) in nla_get_u64() argument
1619 nla_memcpy(&tmp, nla, sizeof(tmp)); in nla_get_u64()
1628 static inline __be64 nla_get_be64(const struct nlattr *nla) in nla_get_be64() argument
1632 nla_memcpy(&tmp, nla, sizeof(tmp)); in nla_get_be64()
1641 static inline __le64 nla_get_le64(const struct nlattr *nla) in nla_get_le64() argument
1643 return *(__le64 *) nla_data(nla); in nla_get_le64()
1650 static inline s32 nla_get_s32(const struct nlattr *nla) in nla_get_s32() argument
1652 return *(s32 *) nla_data(nla); in nla_get_s32()
1659 static inline s16 nla_get_s16(const struct nlattr *nla) in nla_get_s16() argument
1661 return *(s16 *) nla_data(nla); in nla_get_s16()
1668 static inline s8 nla_get_s8(const struct nlattr *nla) in nla_get_s8() argument
1670 return *(s8 *) nla_data(nla); in nla_get_s8()
1677 static inline s64 nla_get_s64(const struct nlattr *nla) in nla_get_s64() argument
1681 nla_memcpy(&tmp, nla, sizeof(tmp)); in nla_get_s64()
1690 static inline int nla_get_flag(const struct nlattr *nla) in nla_get_flag() argument
1692 return !!nla; in nla_get_flag()
1701 static inline unsigned long nla_get_msecs(const struct nlattr *nla) in nla_get_msecs() argument
1703 u64 msecs = nla_get_u64(nla); in nla_get_msecs()
1712 static inline __be32 nla_get_in_addr(const struct nlattr *nla) in nla_get_in_addr() argument
1714 return *(__be32 *) nla_data(nla); in nla_get_in_addr()
1721 static inline struct in6_addr nla_get_in6_addr(const struct nlattr *nla) in nla_get_in6_addr() argument
1725 nla_memcpy(&tmp, nla, sizeof(tmp)); in nla_get_in6_addr()
1733 static inline struct nla_bitfield32 nla_get_bitfield32(const struct nlattr *nla) in nla_get_bitfield32() argument
1737 nla_memcpy(&tmp, nla, sizeof(tmp)); in nla_get_bitfield32()
1931 #define nla_for_each_nested(pos, nla, rem) \ argument
1932 nla_for_each_attr(pos, nla_data(nla), nla_len(nla), rem)
1939 static inline bool nla_is_last(const struct nlattr *nla, int rem) in nla_is_last() argument
1941 return nla->nla_len == rem; in nla_is_last()