Lines Matching refs:nla
84 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() argument
86 return (void *)nla + NLA_HDRLEN; in libbpf_nla_data()
89 static inline uint8_t libbpf_nla_getattr_u8(const struct nlattr *nla) in libbpf_nla_getattr_u8() argument
91 return *(uint8_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u8()
94 static inline uint16_t libbpf_nla_getattr_u16(const struct nlattr *nla) in libbpf_nla_getattr_u16() argument
96 return *(uint16_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u16()
99 static inline uint32_t libbpf_nla_getattr_u32(const struct nlattr *nla) in libbpf_nla_getattr_u32() argument
101 return *(uint32_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u32()
104 static inline uint64_t libbpf_nla_getattr_u64(const struct nlattr *nla) in libbpf_nla_getattr_u64() argument
106 return *(uint64_t *)libbpf_nla_data(nla); in libbpf_nla_getattr_u64()
109 static inline const char *libbpf_nla_getattr_str(const struct nlattr *nla) in libbpf_nla_getattr_str() argument
111 return (const char *)libbpf_nla_data(nla); in libbpf_nla_getattr_str()
118 static inline int libbpf_nla_len(const struct nlattr *nla) in libbpf_nla_len() argument
120 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len()
126 struct nlattr *nla,
131 static inline struct nlattr *nla_data(struct nlattr *nla) in nla_data() argument
133 return (struct nlattr *)((void *)nla + NLA_HDRLEN); in nla_data()
144 struct nlattr *nla; in nlattr_add() local
151 nla = req_tail(req); in nlattr_add()
152 nla->nla_type = type; in nlattr_add()
153 nla->nla_len = NLA_HDRLEN + len; in nlattr_add()
155 memcpy(nla_data(nla), data, len); in nlattr_add()
156 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add()