Lines Matching refs:ematch
143 void rtnl_ematch_unlink(struct rtnl_ematch *ematch) in rtnl_ematch_unlink() argument
145 nl_list_del(&ematch->e_list); in rtnl_ematch_unlink()
148 void rtnl_ematch_free(struct rtnl_ematch *ematch) in rtnl_ematch_free() argument
150 if (!ematch) in rtnl_ematch_free()
153 free(ematch); in rtnl_ematch_free()
156 void rtnl_ematch_set_flags(struct rtnl_ematch *ematch, uint16_t flags) in rtnl_ematch_set_flags() argument
158 ematch->e_flags |= flags; in rtnl_ematch_set_flags()
161 void rtnl_ematch_unset_flags(struct rtnl_ematch *ematch, uint16_t flags) in rtnl_ematch_unset_flags() argument
163 ematch->e_flags &= ~flags; in rtnl_ematch_unset_flags()
166 uint16_t rtnl_ematch_get_flags(struct rtnl_ematch *ematch) in rtnl_ematch_get_flags() argument
168 return ematch->e_flags; in rtnl_ematch_get_flags()
171 void *rtnl_ematch_data(struct rtnl_ematch *ematch) in rtnl_ematch_data() argument
173 return ematch->e_data; in rtnl_ematch_data()
216 struct rtnl_ematch *ematch) in rtnl_ematch_tree_add_tail() argument
218 nl_list_add_tail(&ematch->e_list, &tree->et_list); in rtnl_ematch_tree_add_tail()
221 static inline uint32_t container_ref(struct rtnl_ematch *ematch) in container_ref() argument
223 return *((uint32_t *) rtnl_ematch_data(ematch)); in container_ref()
229 struct rtnl_ematch *ematch; in link_tree() local
233 ematch = index[i]; in link_tree()
235 nl_list_add_tail(&ematch->e_list, root); in link_tree()
237 if (ematch->e_kind == TCF_EM_CONTAINER) in link_tree()
238 link_tree(index, nmatches, container_ref(ematch), in link_tree()
239 &ematch->e_childs); in link_tree()
241 if (!(ematch->e_flags & TCF_EM_REL_MASK)) in link_tree()
298 struct rtnl_ematch *ematch; in rtnl_ematch_parse() local
322 if (!(ematch = rtnl_ematch_alloc(ops))) { in rtnl_ematch_parse()
327 ematch->e_id = hdr->matchid; in rtnl_ematch_parse()
328 ematch->e_kind = hdr->kind; in rtnl_ematch_parse()
329 ematch->e_flags = hdr->flags; in rtnl_ematch_parse()
331 if (ops && (err = ops->eo_parse(ematch, data, len)) < 0) in rtnl_ematch_parse()
335 container_ref(ematch) >= thdr->nmatches) { in rtnl_ematch_parse()
340 index[nmatches++] = ematch; in rtnl_ematch_parse()