libnl 3.7.0
|
Modules | |
GACT Editing | |
Mirror and Redirect | |
NAT | |
SKB Editing | |
VLAN Manipulation | |
Functions | |
struct rtnl_act * | rtnl_act_next (struct rtnl_act *act) |
int | rtnl_act_append (struct rtnl_act **head, struct rtnl_act *new) |
int | rtnl_act_remove (struct rtnl_act **head, struct rtnl_act *act) |
int | rtnl_act_fill (struct nl_msg *msg, int attrtype, struct rtnl_act *act) |
void | rtnl_act_put_all (struct rtnl_act **head) |
int | rtnl_act_parse (struct rtnl_act **head, struct nlattr *tb) |
Allocation/Freeing | |
struct rtnl_act * | rtnl_act_alloc (void) |
void | rtnl_act_get (struct rtnl_act *act) |
void | rtnl_act_put (struct rtnl_act *act) |
Addition/Modification/Deletion | |
int | rtnl_act_build_add_request (struct rtnl_act *act, int flags, struct nl_msg **result) |
Build a netlink message requesting the addition of an action. More... | |
int | rtnl_act_add (struct nl_sock *sk, struct rtnl_act *act, int flags) |
Add/Update action. More... | |
int | rtnl_act_build_change_request (struct rtnl_act *act, int flags, struct nl_msg **result) |
Build a netlink message to change action attributes. More... | |
int | rtnl_act_change (struct nl_sock *sk, struct rtnl_act *act, int flags) |
Change an action. More... | |
int | rtnl_act_build_delete_request (struct rtnl_act *act, int flags, struct nl_msg **result) |
Build netlink message requesting the deletion of an action. More... | |
int | rtnl_act_delete (struct nl_sock *sk, struct rtnl_act *act, int flags) |
Delete action. More... | |
int rtnl_act_append | ( | struct rtnl_act ** | head, |
struct rtnl_act * | new | ||
) |
int rtnl_act_remove | ( | struct rtnl_act ** | head, |
struct rtnl_act * | act | ||
) |
int rtnl_act_fill | ( | struct nl_msg * | msg, |
int | attrtype, | ||
struct rtnl_act * | act | ||
) |
int rtnl_act_build_add_request | ( | struct rtnl_act * | act, |
int | flags, | ||
struct nl_msg ** | result | ||
) |
Build a netlink message requesting the addition of an action.
act | Action to add |
flags | Additional netlink message flags |
result | Pointer to store resulting netlink message |
The behaviour of this function is identical to rtnl_act_add() with the exception that it will not send the message but return it int the provided return pointer instead.
Definition at line 217 of file act.c.
Referenced by rtnl_act_add().
int rtnl_act_add | ( | struct nl_sock * | sk, |
struct rtnl_act * | act, | ||
int | flags | ||
) |
Add/Update action.
sk | Netlink socket |
act | Action to add/update |
flags | Additional netlink message flags |
Builds a RTM_NEWACTION
netlink message requesting the addition of a new action and sends the message to the kernel. The configuration of the action is derived from the attributes of the specified traffic class.
The following flags may be specified:
NLM_F_CREATE:
Create action if it does not exist, otherwise -NLE_OBJ_NOTFOUND is returned.NLM_F_EXCL:
Return -NLE_EXISTS if an action with matching handle exists already.Existing actions with matching handles will be updated, unless the flag NLM_F_EXCL
is specified. If no matching action exists, it will be created if the flag NLM_F_CREATE
is set, otherwise the error -NLE_OBJ_NOTFOUND is returned.
After sending, the function will wait for the ACK or an eventual error message to be received and will therefore block until the operation has been completed.
Definition at line 256 of file act.c.
References nl_send_sync(), and rtnl_act_build_add_request().
int rtnl_act_build_change_request | ( | struct rtnl_act * | act, |
int | flags, | ||
struct nl_msg ** | result | ||
) |
Build a netlink message to change action attributes.
act | Action to change |
flags | additional netlink message flags |
result | Pointer to store resulting message. |
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.
Definition at line 280 of file act.c.
Referenced by rtnl_act_change().
int rtnl_act_change | ( | struct nl_sock * | sk, |
struct rtnl_act * | act, | ||
int | flags | ||
) |
Change an action.
sk | Netlink socket. |
act | action to change |
flags | additional netlink message flags |
Builds a netlink message by calling rtnl_act_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.
Definition at line 298 of file act.c.
References nl_send_sync(), and rtnl_act_build_change_request().
int rtnl_act_build_delete_request | ( | struct rtnl_act * | act, |
int | flags, | ||
struct nl_msg ** | result | ||
) |
Build netlink message requesting the deletion of an action.
act | Action to delete |
flags | Additional netlink message flags |
result | Pointer to store resulting netlink message |
The behaviour of this function is identical to rtnl_act_delete() with the exception that it will not send the message but return it in the provided return pointer instead.
Definition at line 323 of file act.c.
Referenced by rtnl_act_delete().
int rtnl_act_delete | ( | struct nl_sock * | sk, |
struct rtnl_act * | act, | ||
int | flags | ||
) |
Delete action.
sk | Netlink socket |
act | Action to delete |
flags | Additional netlink message flags |
Builds a RTM_DELACTION
netlink message requesting the deletion of an action and sends the message to the kernel.
The message is constructed out of the following attributes:
ifindex
(required)prio
(required)protocol
(required)handle
(required)parent
(optional, if not specified parent equals root-qdisc)kind
(optional, must match if provided)All other action attributes including all class type specific attributes are ignored.
After sending, the function will wait for the ACK or an eventual error message to be received and will therefore block until the operation has been completed.
Definition at line 360 of file act.c.
References nl_send_sync(), and rtnl_act_build_delete_request().