X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=dummynet2%2Finclude%2Fnet%2Fradix.h;h=e5b8ecce5158f032cd8015c1b9f6d101dfb41360;hb=28a7fe9d930667786b902af6697c01eb87694173;hp=45cb7ca26654cfda2111cfdd5c789c394c5f7944;hpb=10f6855044ac2d3a12f19eddbbbb24b59cbbf1fb;p=ipfw.git diff --git a/dummynet2/include/net/radix.h b/dummynet2/include/net/radix.h index 45cb7ca..e5b8ecc 100644 --- a/dummynet2/include/net/radix.h +++ b/dummynet2/include/net/radix.h @@ -105,15 +105,24 @@ typedef int walktree_f_t(struct radix_node *, void *); struct radix_node_head { struct radix_node *rnh_treetop; + int rnh_addrsize; /* permit, but not require fixed keys */ + int rnh_pktsize; /* permit, but not require fixed keys */ struct radix_node *(*rnh_addaddr) /* add based on sockaddr */ (void *v, void *mask, struct radix_node_head *head, struct radix_node nodes[]); + struct radix_node *(*rnh_addpkt) /* add based on packet hdr */ + (void *v, void *mask, + struct radix_node_head *head, struct radix_node nodes[]); struct radix_node *(*rnh_deladdr) /* remove based on sockaddr */ (void *v, void *mask, struct radix_node_head *head); + struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */ + (void *v, void *mask, struct radix_node_head *head); struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */ (void *v, struct radix_node_head *head); struct radix_node *(*rnh_lookup) /* locate based on sockaddr */ (void *v, void *mask, struct radix_node_head *head); + struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */ + (void *v, struct radix_node_head *head); int (*rnh_walktree) /* traverse tree */ (struct radix_node_head *head, walktree_f_t *f, void *w); int (*rnh_walktree_from) /* traverse tree below a */ @@ -157,6 +166,7 @@ struct radix_node_head { void rn_init(int); int rn_inithead(void **, int); +int rn_detachhead(void **); int rn_refines(void *, void *); struct radix_node *rn_addmask(void *, int, int),