|
Modules | |
| Queueing Discipline Modules | |
| Queueing Discipline Object | |
Data Structures | |
| struct | rtnl_qdisc_ops |
| Qdisc Operations. More... | |
QDisc Addition | |
| int | rtnl_qdisc_build_add_request (struct rtnl_qdisc *qdisc, int flags, struct nl_msg **result) |
| Build a netlink message to add a new qdisc. More... | |
| int | rtnl_qdisc_add (struct nl_sock *sk, struct rtnl_qdisc *qdisc, int flags) |
| Add a new qdisc. More... | |
QDisc Modification | |
| int | rtnl_qdisc_build_change_request (struct rtnl_qdisc *qdisc, struct rtnl_qdisc *new, struct nl_msg **result) |
| Build a netlink message to change attributes of a existing qdisc. More... | |
| int | rtnl_qdisc_change (struct nl_sock *sk, struct rtnl_qdisc *qdisc, struct rtnl_qdisc *new) |
| Change attributes of a qdisc. More... | |
QDisc Deletion | |
| int | rtnl_qdisc_build_delete_request (struct rtnl_qdisc *qdisc, struct nl_msg **result) |
| Build a netlink request message to delete a qdisc. More... | |
| int | rtnl_qdisc_delete (struct nl_sock *sk, struct rtnl_qdisc *qdisc) |
| Delete a qdisc. More... | |
Qdisc Cache Management | |
| int | rtnl_qdisc_alloc_cache (struct nl_sock *sk, struct nl_cache **result) |
| Build a qdisc cache including all qdiscs currently configured in the kernel. More... | |
| struct rtnl_qdisc * | rtnl_qdisc_get_by_parent (struct nl_cache *cache, int ifindex, uint32_t parent) |
| Look up qdisc by its parent in the provided cache. More... | |
| struct rtnl_qdisc * | rtnl_qdisc_get (struct nl_cache *cache, int ifindex, uint32_t handle) |
| Look up qdisc by its handle in the provided cache. More... | |
TC_H_ROOT: root qdisc (directly attached to the device)TC_H_INGRESS: ingress qdisc (directly attached to the device)TC_H_UNSPEC: unspecified qdisc (no reference)| int rtnl_qdisc_add | ( | struct nl_sock * | sk, |
| struct rtnl_qdisc * | qdisc, | ||
| int | flags | ||
| ) |
Add a new qdisc.
Builds a netlink message by calling rtnl_qdisc_build_add_request(), sends the request to the kernel and waits for the ACK to be received and thus blocks until the request has been processed.
Common message flags used:
References nl_send_auto_complete(), nlmsg_free(), and rtnl_qdisc_build_add_request().
Referenced by main().


Build a qdisc cache including all qdiscs currently configured in the kernel.
Allocates a new cache, initializes it properly and updates it to include all qdiscs currently configured in the kernel.
References nl_cache_alloc_and_fill().

| int rtnl_qdisc_build_add_request | ( | struct rtnl_qdisc * | qdisc, |
| int | flags, | ||
| struct nl_msg ** | result | ||
| ) |
Build a netlink message to add a new qdisc.
Builds a new netlink message requesting an addition of a qdisc. 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.
Common message flags used:
References NLM_F_CREATE, and RTM_NEWQDISC.
Referenced by rtnl_qdisc_add().

| int rtnl_qdisc_build_change_request | ( | struct rtnl_qdisc * | qdisc, |
| struct rtnl_qdisc * | new, | ||
| struct nl_msg ** | result | ||
| ) |
Build a netlink message to change attributes of a existing qdisc.
Builds a new netlink message requesting an change of qdisc attributes. 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.
References NLM_F_REPLACE, and RTM_NEWQDISC.
Referenced by rtnl_qdisc_change().

| int rtnl_qdisc_build_delete_request | ( | struct rtnl_qdisc * | qdisc, |
| struct nl_msg ** | result | ||
| ) |
Build a netlink request message to delete a qdisc.
Builds a new netlink message requesting a deletion of a qdisc. 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 BUG, NLE_MSGSIZE, NLE_NOMEM, NLMSG_ALIGNTO, nlmsg_alloc_simple(), nlmsg_append(), nlmsg_free(), RTM_DELQDISC, TCA_ATTR_IFINDEX, TCA_ATTR_PARENT, tcmsg::tcm_family, tcmsg::tcm_handle, tcmsg::tcm_ifindex, and tcmsg::tcm_parent.
Referenced by rtnl_qdisc_delete().


| int rtnl_qdisc_change | ( | struct nl_sock * | sk, |
| struct rtnl_qdisc * | qdisc, | ||
| struct rtnl_qdisc * | new | ||
| ) |
Change attributes of a qdisc.
Builds a netlink message by calling rtnl_qdisc_build_change_request(), sends the request to the kernel and waits for the ACK to be received and thus blocks until the request has been processed.
References nl_send_auto_complete(), nlmsg_free(), and rtnl_qdisc_build_change_request().

| int rtnl_qdisc_delete | ( | struct nl_sock * | sk, |
| struct rtnl_qdisc * | qdisc | ||
| ) |
Delete a qdisc.
Builds a netlink message by calling rtnl_qdisc_build_delete_request(), sends the request to the kernel and waits for the ACK to be received and thus blocks until the request has been processed.
References nl_send_auto_complete(), nlmsg_free(), and rtnl_qdisc_build_delete_request().

| struct rtnl_qdisc* rtnl_qdisc_get | ( | struct nl_cache * | cache, |
| int | ifindex, | ||
| uint32_t | handle | ||
| ) |
Look up qdisc by its handle in the provided cache.
References nl_cache::c_items, nl_cache::c_ops, nl_list_for_each_entry, nl_object_get(), and NULL.

| struct rtnl_qdisc* rtnl_qdisc_get_by_parent | ( | struct nl_cache * | cache, |
| int | ifindex, | ||
| uint32_t | parent | ||
| ) |
Look up qdisc by its parent in the provided cache.
References nl_cache::c_items, nl_cache::c_ops, nl_list_for_each_entry, nl_object_get(), and NULL.
Referenced by rtnl_class_leaf_qdisc().

