Searched refs:nla (Results 1 – 3 of 3) sorted by relevance
25 static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) in nla_next() argument27 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() argument35 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() argument42 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 …]
82 static inline void *libbpf_nla_data(const struct nlattr *nla) in libbpf_nla_data() argument84 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() argument89 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() argument94 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() argument99 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() argument108 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len()[all …]
236 struct nlattr *nla; in __bpf_set_link_xdp_fd_replace() local247 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() local656 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()