libnl
1.1.4
|
Modules | |
Queueing Discipline Modules | |
Queueing Discipline Object | |
Data Structures | |
struct | rtnl_qdisc_ops |
Qdisc Operations. More... | |
QDisc Addition | |
struct nl_msg * | rtnl_qdisc_build_add_request (struct rtnl_qdisc *qdisc, int flags) |
Build a netlink message to add a new qdisc. More... | |
int | rtnl_qdisc_add (struct nl_handle *handle, struct rtnl_qdisc *qdisc, int flags) |
Add a new qdisc. More... | |
QDisc Modification | |
struct nl_msg * | rtnl_qdisc_build_change_request (struct rtnl_qdisc *qdisc, struct rtnl_qdisc *new) |
Build a netlink message to change attributes of a existing qdisc. More... | |
int | rtnl_qdisc_change (struct nl_handle *handle, struct rtnl_qdisc *qdisc, struct rtnl_qdisc *new) |
Change attributes of a qdisc. More... | |
QDisc Deletion | |
struct nl_msg * | rtnl_qdisc_build_delete_request (struct rtnl_qdisc *qdisc) |
Build a netlink request message to delete a qdisc. More... | |
int | rtnl_qdisc_delete (struct nl_handle *handle, struct rtnl_qdisc *qdisc) |
Delete a qdisc. More... | |
Qdisc Cache Management | |
struct nl_cache * | rtnl_qdisc_alloc_cache (struct nl_handle *handle) |
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)struct nl_msg* rtnl_qdisc_build_add_request | ( | struct rtnl_qdisc * | qdisc, |
int | flags | ||
) |
qdisc | qdisc to add |
flags | additional netlink message flags |
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:
Definition at line 197 of file qdisc.c.
References NLM_F_CREATE.
Referenced by rtnl_qdisc_add().
int rtnl_qdisc_add | ( | struct nl_handle * | handle, |
struct rtnl_qdisc * | qdisc, | ||
int | flags | ||
) |
handle | netlink handle |
qdisc | qdisc to delete |
flags | additional netlink message flags |
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:
Definition at line 224 of file qdisc.c.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_qdisc_build_add_request().
struct nl_msg* rtnl_qdisc_build_change_request | ( | struct rtnl_qdisc * | qdisc, |
struct rtnl_qdisc * | new | ||
) |
qdisc | qdisc to change |
new | new qdisc attributes |
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.
Definition at line 261 of file qdisc.c.
References NLM_F_REPLACE.
Referenced by rtnl_qdisc_change().
int rtnl_qdisc_change | ( | struct nl_handle * | handle, |
struct rtnl_qdisc * | qdisc, | ||
struct rtnl_qdisc * | new | ||
) |
handle | netlink handle |
qdisc | qdisc to change |
new | new qdisc attributes |
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.
Definition at line 279 of file qdisc.c.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_qdisc_build_change_request().
struct nl_msg* rtnl_qdisc_build_delete_request | ( | struct rtnl_qdisc * | qdisc | ) |
qdisc | qdisc to delete |
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.
Definition at line 315 of file qdisc.c.
References nlmsg_alloc_simple(), and nlmsg_append().
Referenced by rtnl_qdisc_delete().
int rtnl_qdisc_delete | ( | struct nl_handle * | handle, |
struct rtnl_qdisc * | qdisc | ||
) |
handle | netlink handle |
qdisc | qdisc to delete |
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.
Definition at line 348 of file qdisc.c.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_qdisc_build_delete_request().
struct nl_cache* rtnl_qdisc_alloc_cache | ( | struct nl_handle * | handle | ) |
handle | netlink handle |
Allocates a new cache, initializes it properly and updates it to include all qdiscs currently configured in the kernel.
Definition at line 384 of file qdisc.c.
References nl_cache_alloc(), nl_cache_free(), and nl_cache_refill().
struct rtnl_qdisc* rtnl_qdisc_get_by_parent | ( | struct nl_cache * | cache, |
int | ifindex, | ||
uint32_t | parent | ||
) |
cache | qdisc cache |
ifindex | interface the qdisc is attached to |
parent | parent handle |
Definition at line 407 of file qdisc.c.
References nl_object_get().
Referenced by rtnl_class_leaf_qdisc().
struct rtnl_qdisc* rtnl_qdisc_get | ( | struct nl_cache * | cache, |
int | ifindex, | ||
uint32_t | handle | ||
) |
cache | qdisc cache |
ifindex | interface the qdisc is attached to |
handle | qdisc handle |
Definition at line 432 of file qdisc.c.
References nl_object_get().