Lines Matching refs:nla
82 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() argument
84 return (void *)nla + NLA_HDRLEN; in libbpf_nla_data()
87 static inline uint8_t libbpf_nla_getattr_u8(const struct nlattr *nla) in libbpf_nla_getattr_u8() argument
89 return *(uint8_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u8()
92 static inline uint32_t libbpf_nla_getattr_u32(const struct nlattr *nla) in libbpf_nla_getattr_u32() argument
94 return *(uint32_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u32()
97 static inline const char *libbpf_nla_getattr_str(const struct nlattr *nla) in libbpf_nla_getattr_str() argument
99 return (const char *)libbpf_nla_data(nla); in libbpf_nla_getattr_str()
106 static inline int libbpf_nla_len(const struct nlattr *nla) in libbpf_nla_len() argument
108 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len()
114 struct nlattr *nla,
119 static inline struct nlattr *nla_data(struct nlattr *nla) in nla_data() argument
121 return (struct nlattr *)((void *)nla + NLA_HDRLEN); in nla_data()
132 struct nlattr *nla; in nlattr_add() local
139 nla = req_tail(req); in nlattr_add()
140 nla->nla_type = type; in nlattr_add()
141 nla->nla_len = NLA_HDRLEN + len; in nlattr_add()
143 memcpy(nla_data(nla), data, len); in nlattr_add()
144 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add()