/** * Remove ematch from the list of ematches it is linked to. * @arg ematch ematch object */ void rtnl_ematch_unlink(struct rtnl_ematch *ematch) { NL_DBG(2, "unlinked ematch %p from any lists\n", ematch); if (!nl_list_empty(&ematch->e_childs)) NL_DBG(1, "warning: ematch %p with childs was unlinked\n", ematch); nl_list_del(&ematch->e_list); nl_init_list_head(&ematch->e_list); }
struct rtnl_nexthop *rtnl_route_nh_alloc(void) { struct rtnl_nexthop *nh; nh = calloc(1, sizeof(*nh)); if (!nh) return NULL; nl_init_list_head(&nh->rtnh_list); return nh; }