|
libnl 1.1.4
|
Flags Translations | |
| char * | rtnl_addr_flags2str (int flags, char *buf, size_t size) |
| int | rtnl_addr_str2flags (const char *name) |
Allocation/Freeing | |
| struct rtnl_addr * | rtnl_addr_alloc (void) |
| void | rtnl_addr_put (struct rtnl_addr *addr) |
Cache Management | |
| struct nl_cache * | rtnl_addr_alloc_cache (struct nl_handle *handle) |
Addition | |
| struct nl_msg * | rtnl_addr_build_add_request (struct rtnl_addr *addr, int flags) |
| Build netlink request message to request addition of new address. | |
| int | rtnl_addr_add (struct nl_handle *handle, struct rtnl_addr *addr, int flags) |
| Request addition of new address. | |
Deletion | |
| struct nl_msg * | rtnl_addr_build_delete_request (struct rtnl_addr *addr, int flags) |
| Build a netlink request message to request deletion of an address. | |
| int | rtnl_addr_delete (struct nl_handle *handle, struct rtnl_addr *addr, int flags) |
| Request deletion of an address. | |
Attributes | |
| void | rtnl_addr_set_label (struct rtnl_addr *addr, const char *label) |
| char * | rtnl_addr_get_label (struct rtnl_addr *addr) |
| void | rtnl_addr_set_ifindex (struct rtnl_addr *addr, int ifindex) |
| int | rtnl_addr_get_ifindex (struct rtnl_addr *addr) |
| void | rtnl_addr_set_family (struct rtnl_addr *addr, int family) |
| int | rtnl_addr_get_family (struct rtnl_addr *addr) |
| void | rtnl_addr_set_prefixlen (struct rtnl_addr *addr, int prefix) |
| int | rtnl_addr_get_prefixlen (struct rtnl_addr *addr) |
| void | rtnl_addr_set_scope (struct rtnl_addr *addr, int scope) |
| int | rtnl_addr_get_scope (struct rtnl_addr *addr) |
| void | rtnl_addr_set_flags (struct rtnl_addr *addr, unsigned int flags) |
| void | rtnl_addr_unset_flags (struct rtnl_addr *addr, unsigned int flags) |
| unsigned int | rtnl_addr_get_flags (struct rtnl_addr *addr) |
| int | rtnl_addr_set_local (struct rtnl_addr *addr, struct nl_addr *local) |
| struct nl_addr * | rtnl_addr_get_local (struct rtnl_addr *addr) |
| int | rtnl_addr_set_peer (struct rtnl_addr *addr, struct nl_addr *peer) |
| struct nl_addr * | rtnl_addr_get_peer (struct rtnl_addr *addr) |
| int | rtnl_addr_set_broadcast (struct rtnl_addr *addr, struct nl_addr *bcast) |
| struct nl_addr * | rtnl_addr_get_broadcast (struct rtnl_addr *addr) |
| int | rtnl_addr_set_anycast (struct rtnl_addr *addr, struct nl_addr *anycast) |
| struct nl_addr * | rtnl_addr_get_anycast (struct rtnl_addr *addr) |
| int | rtnl_addr_set_multicast (struct rtnl_addr *addr, struct nl_addr *multicast) |
| struct nl_addr * | rtnl_addr_get_multicast (struct rtnl_addr *addr) |
| struct rtnl_addr * rtnl_addr_alloc | ( | void | ) |
Definition at line 625 of file addr.c.
| void rtnl_addr_put | ( | struct rtnl_addr * | addr | ) |
Definition at line 630 of file addr.c.
| struct nl_cache * rtnl_addr_alloc_cache | ( | struct nl_handle * | handle | ) |
Definition at line 642 of file addr.c.
| struct nl_msg * rtnl_addr_build_add_request | ( | struct rtnl_addr * | addr, |
| int | flags | ||
| ) |
| addr | Address object representing the new address. |
| flags | Additional netlink message flags. |
Builds a new netlink message requesting the addition of a new address. 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.
Minimal required attributes:
The scope will default to universe except for loopback addresses in which case a host scope is used if not specified otherwise.
Definition at line 737 of file addr.c.
References NLM_F_CREATE.
Referenced by rtnl_addr_add().
| int rtnl_addr_add | ( | struct nl_handle * | handle, |
| struct rtnl_addr * | addr, | ||
| int | flags | ||
| ) |
| handle | Netlink handle. |
| addr | Address object representing the new address. |
| flags | Additional netlink message flags. |
Builds a netlink message by calling rtnl_addr_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 fullfilled.
Definition at line 765 of file addr.c.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_addr_build_add_request().
| struct nl_msg * rtnl_addr_build_delete_request | ( | struct rtnl_addr * | addr, |
| int | flags | ||
| ) |
| addr | Address object to be deleteted. |
| flags | Additional netlink message flags. |
Builds a new netlink message requesting a deletion of an address. 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.
Minimal required attributes:
Optional attributes:
Definition at line 811 of file addr.c.
Referenced by rtnl_addr_delete().
| int rtnl_addr_delete | ( | struct nl_handle * | handle, |
| struct rtnl_addr * | addr, | ||
| int | flags | ||
| ) |
| handle | Netlink handle. |
| addr | Address object to be deleted. |
| flags | Additional netlink message flags. |
Builds a netlink message by calling rtnl_addr_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 fullfilled.
Definition at line 838 of file addr.c.
References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_addr_build_delete_request().
| void rtnl_addr_set_label | ( | struct rtnl_addr * | addr, |
| const char * | label | ||
| ) |
| char * rtnl_addr_get_label | ( | struct rtnl_addr * | addr | ) |
| void rtnl_addr_set_ifindex | ( | struct rtnl_addr * | addr, |
| int | ifindex | ||
| ) |
| int rtnl_addr_get_ifindex | ( | struct rtnl_addr * | addr | ) |
| void rtnl_addr_set_family | ( | struct rtnl_addr * | addr, |
| int | family | ||
| ) |
| int rtnl_addr_get_family | ( | struct rtnl_addr * | addr | ) |
| void rtnl_addr_set_prefixlen | ( | struct rtnl_addr * | addr, |
| int | prefix | ||
| ) |
| int rtnl_addr_get_prefixlen | ( | struct rtnl_addr * | addr | ) |
| void rtnl_addr_set_scope | ( | struct rtnl_addr * | addr, |
| int | scope | ||
| ) |
| int rtnl_addr_get_scope | ( | struct rtnl_addr * | addr | ) |
| void rtnl_addr_set_flags | ( | struct rtnl_addr * | addr, |
| unsigned int | flags | ||
| ) |
| void rtnl_addr_unset_flags | ( | struct rtnl_addr * | addr, |
| unsigned int | flags | ||
| ) |
| unsigned int rtnl_addr_get_flags | ( | struct rtnl_addr * | addr | ) |
| int rtnl_addr_set_local | ( | struct rtnl_addr * | addr, |
| struct nl_addr * | local | ||
| ) |
Definition at line 970 of file addr.c.
| struct nl_addr * rtnl_addr_get_local | ( | struct rtnl_addr * | addr | ) |
| int rtnl_addr_set_peer | ( | struct rtnl_addr * | addr, |
| struct nl_addr * | peer | ||
| ) |
Definition at line 994 of file addr.c.
| struct nl_addr * rtnl_addr_get_peer | ( | struct rtnl_addr * | addr | ) |
| int rtnl_addr_set_broadcast | ( | struct rtnl_addr * | addr, |
| struct nl_addr * | bcast | ||
| ) |
| struct nl_addr * rtnl_addr_get_broadcast | ( | struct rtnl_addr * | addr | ) |
| int rtnl_addr_set_anycast | ( | struct rtnl_addr * | addr, |
| struct nl_addr * | anycast | ||
| ) |
| struct nl_addr * rtnl_addr_get_anycast | ( | struct rtnl_addr * | addr | ) |
| int rtnl_addr_set_multicast | ( | struct rtnl_addr * | addr, |
| struct nl_addr * | multicast | ||
| ) |
| struct nl_addr * rtnl_addr_get_multicast | ( | struct rtnl_addr * | addr | ) |
| char * rtnl_addr_flags2str | ( | int | flags, |
| char * | buf, | ||
| size_t | size | ||
| ) |