Modules | |
Basic Classifier | |
Extended Match | |
Classifier Modules | |
Classifier Object | |
Classifier Addition/Modification/Deletion | |
int | rtnl_cls_build_add_request (struct rtnl_cls *cls, int flags, struct nl_msg **result) |
Build a netlink message to add a new classifier. More... | |
int | rtnl_cls_add (struct nl_sock *sk, struct rtnl_cls *cls, int flags) |
Add a new classifier. More... | |
int | rtnl_cls_build_change_request (struct rtnl_cls *cls, int flags, struct nl_msg **result) |
Build a netlink message to change classifier attributes. More... | |
int | rtnl_cls_change (struct nl_sock *sk, struct rtnl_cls *cls, int flags) |
Change a classifier. More... | |
int | rtnl_cls_build_delete_request (struct rtnl_cls *cls, int flags, struct nl_msg **result) |
Build a netlink request message to delete a classifier. More... | |
int | rtnl_cls_delete (struct nl_sock *sk, struct rtnl_cls *cls, int flags) |
Delete a classifier. More... | |
Cache Management | |
int | rtnl_cls_alloc_cache (struct nl_sock *sk, int ifindex, uint32_t parent, struct nl_cache **result) |
Build a classifier cache including all classifiers attached to the specified class/qdisc on eht specified interface. More... | |
Add a new classifier.
Builds a netlink message by calling rtnl_cls_build_add_request(), sends the request to the kernel and waits for the next ACK to be received and thus blocks until the request has been processed.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_cls_build_add_request().
Referenced by main().
int rtnl_cls_alloc_cache | ( | struct nl_sock * | sk, |
int | ifindex, | ||
uint32_t | parent, | ||
struct nl_cache ** | result | ||
) |
Build a classifier cache including all classifiers attached to the specified class/qdisc on eht specified interface.
Allocates a new cache, initializes it properly and updates it to include all classes attached to the specified interface.
References nl_cache::c_iarg1, nl_cache::c_iarg2, nl_cache_alloc(), nl_cache_free(), nl_cache_refill(), and NLE_NOMEM.
Referenced by main().
Build a netlink message to add a new classifier.
Builds a new netlink message requesting an addition of a classifier The netlink message header isn't fully equipped with all relevant fields and must be sent out via nl_send_auto_complete() or supplemented as needed. classifier must contain the attributes of the new classifier set via rtnl_cls_set_*
functions. opts may point to the clsasifier specific options.
References NLM_F_CREATE, and RTM_NEWTFILTER.
Referenced by rtnl_cls_add().
Build a netlink message to change classifier attributes.
Builds a new netlink message requesting a change of a neigh attributes. The netlink message header isn't fully equipped with all relevant fields and must thus be sent out via nl_send_auto_complete() or supplemented as needed.
References NLM_F_REPLACE, and RTM_NEWTFILTER.
Referenced by rtnl_cls_change().
Build a netlink request message to delete a classifier.
Builds a new netlink message requesting a deletion of a classifier. The netlink message header isn't fully equipped with all relevant fields and must thus be sent out via nl_send_auto_complete() or supplemented as needed.
References RTM_DELTFILTER.
Referenced by rtnl_cls_delete().
Change a classifier.
Builds a netlink message by calling rtnl_cls_build_change_request(), sends the request to the kernel and waits for the next ACK to be received and thus blocks until the request has been processed.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_cls_build_change_request().
Delete a classifier.
Builds a netlink message by calling rtnl_cls_build_delete_request(), sends the request to the kernel and waits for the next ACK to be received and thus blocks until the request has been processed.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_cls_build_delete_request().