Home | History | Annotate | Download | only in cls

Lines Matching refs:ematch

2  * lib/route/cls/ematch.c	Extended Matches
14 * @defgroup ematch Extended Match
24 #include <netlink/route/cls/ematch.h>
34 * Register ematch module
50 * Unregister ematch module
70 * Lookup ematch module by kind
87 * Lookup ematch module by name
88 * @arg name Name of ematch module.
129 * Add ematch to the end of the parent's list of children.
130 * @arg parent Parent ematch.
131 * @arg child Ematch to be added as new child of parent.
140 * Remove ematch from the list it is linked to.
141 * @arg ematch Ematch to be unlinked.
143 void rtnl_ematch_unlink(struct rtnl_ematch *ematch)
145 nl_list_del(&ematch->e_list);
148 void rtnl_ematch_free(struct rtnl_ematch *ematch)
150 if (!ematch)
153 free(ematch);
156 void rtnl_ematch_set_flags(struct rtnl_ematch *ematch, uint16_t flags)
158 ematch->e_flags |= flags;
161 void rtnl_ematch_unset_flags(struct rtnl_ematch *ematch, uint16_t flags)
163 ematch->e_flags &= ~flags;
166 uint16_t rtnl_ematch_get_flags(struct rtnl_ematch *ematch)
168 return ematch->e_flags;
171 void *rtnl_ematch_data(struct rtnl_ematch *ematch)
173 return ematch->e_data;
216 struct rtnl_ematch *ematch)
218 nl_list_add_tail(&ematch->e_list, &tree->et_list);
221 static inline uint32_t container_ref(struct rtnl_ematch *ematch)
223 return *((uint32_t *) rtnl_ematch_data(ematch));
229 struct rtnl_ematch *ematch;
233 ematch = index[i];
235 nl_list_add_tail(&ematch->e_list, root);
237 if (ematch->e_kind == TCF_EM_CONTAINER)
238 link_tree(index, nmatches, container_ref(ematch),
239 &ematch->e_childs);
241 if (!(ematch->e_flags & TCF_EM_REL_MASK))
255 * Parse ematch netlink attributes
298 struct rtnl_ematch *ematch;
322 if (!(ematch = rtnl_ematch_alloc(ops))) {
327 ematch->e_id = hdr->matchid;
328 ematch->e_kind = hdr->kind;
329 ematch->e_flags = hdr->flags;
331 if (ops && (err = ops->eo_parse(ematch, data, len)) < 0)
335 container_ref(ematch) >= thdr->nmatches) {
340 index[nmatches++] = ematch;
377 nl_dump(p, "[unknown ematch %d]", match->e_kind);
395 /* end of first level ematch sequence */