Home
last modified time | relevance | path

Searched refs:nla (Results 1 – 3 of 3) sorted by relevance

/tools/lib/bpf/
Dnlattr.c25 static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) in nla_next() argument
27 int totlen = NLA_ALIGN(nla->nla_len); in nla_next()
30 return (struct nlattr *)((void *)nla + totlen); in nla_next()
33 static int nla_ok(const struct nlattr *nla, int remaining) in nla_ok() argument
35 return remaining >= sizeof(*nla) && in nla_ok()
36 nla->nla_len >= sizeof(*nla) && in nla_ok()
37 nla->nla_len <= remaining; in nla_ok()
40 static int nla_type(const struct nlattr *nla) in nla_type() argument
42 return nla->nla_type & NLA_TYPE_MASK; in nla_type()
45 static int validate_nla(struct nlattr *nla, int maxtype, in validate_nla() argument
[all …]
Dnlattr.h82 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()
[all …]
Dnetlink.c236 struct nlattr *nla; in __bpf_set_link_xdp_fd_replace() local
247 nla = nlattr_begin_nested(&req, IFLA_XDP); in __bpf_set_link_xdp_fd_replace()
248 if (!nla) in __bpf_set_link_xdp_fd_replace()
264 nlattr_end_nested(&req, nla); in __bpf_set_link_xdp_fd_replace()
611 struct nlattr *nla; in bpf_tc_attach() local
656 nla = nlattr_begin_nested(&req, TCA_OPTIONS); in bpf_tc_attach()
657 if (!nla) in bpf_tc_attach()
666 nlattr_end_nested(&req, nla); in bpf_tc_attach()