Allocation/Freeing | |
struct rtnl_addr * | rtnl_addr_alloc (void) |
void | rtnl_addr_put (struct rtnl_addr *addr) |
Cache Management | |
int | rtnl_addr_alloc_cache (struct nl_sock *sk, struct nl_cache **result) |
Addition | |
int | rtnl_addr_build_add_request (struct rtnl_addr *addr, int flags, struct nl_msg **result) |
Build netlink request message to request addition of new address. More... | |
int | rtnl_addr_add (struct nl_sock *sk, struct rtnl_addr *addr, int flags) |
Request addition of new address. More... | |
Deletion | |
int | rtnl_addr_build_delete_request (struct rtnl_addr *addr, int flags, struct nl_msg **result) |
Build a netlink request message to request deletion of an address. More... | |
int | rtnl_addr_delete (struct nl_sock *sk, struct rtnl_addr *addr, int flags) |
Request deletion of an address. More... | |
Flags Translations | |
char * | rtnl_addr_flags2str (int flags, char *buf, size_t size) |
int | rtnl_addr_str2flags (const char *name) |
Request addition of new address.
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.
References nl_send_auto_complete(), nlmsg_free(), and rtnl_addr_build_add_request().
Referenced by main().
References nl_object_alloc().
Referenced by nl_cli_addr_alloc().
Build netlink request message to request addition of new address.
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.
References NLE_MISSING_ATTR, NLM_F_CREATE, and RTM_NEWADDR.
Referenced by rtnl_addr_add().
Build a netlink request message to request deletion of an address.
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:
References NLE_MISSING_ATTR, and RTM_DELADDR.
Referenced by rtnl_addr_delete().
Request deletion of an address.
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.
References nl_send_auto_complete(), nlmsg_free(), and rtnl_addr_build_delete_request().
char* rtnl_addr_flags2str | ( | int | flags, |
char * | buf, | ||
size_t | size | ||
) |
References rtnl_addr::a_anycast.
References rtnl_addr::a_bcast.
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_cstamp.
References rtnl_addr::a_family.
Referenced by nl_cli_addr_parse_broadcast(), nl_cli_addr_parse_local(), and nl_cli_addr_parse_peer().
References rtnl_addr::a_flags.
References rtnl_addr::a_ifindex.
References rtnl_addr::a_label, and NULL.
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_tstamp.
References rtnl_addr::a_local.
References rtnl_addr::a_multicast.
References rtnl_addr::a_peer.
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_prefered.
References rtnl_addr::a_prefixlen.
References rtnl_addr::a_scope.
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_valid.
References rtnl_addr::a_anycast.
References rtnl_addr::a_bcast.
Referenced by nl_cli_addr_parse_broadcast().
References rtnl_addr::a_family.
Referenced by main(), and nl_cli_addr_parse_family().
References rtnl_addr::a_flag_mask, rtnl_addr::a_flags, and flags.
References rtnl_addr::a_ifindex.
Referenced by nl_cli_addr_parse_dev().
References rtnl_addr::a_label, and NLE_RANGE.
Referenced by nl_cli_addr_parse_label().
References rtnl_addr::a_local, rtnl_addr::a_prefixlen, and nl_addr_get_prefixlen().
Referenced by nl_cli_addr_parse_local().
References rtnl_addr::a_multicast.
References rtnl_addr::a_peer, rtnl_addr::a_prefixlen, and nl_addr_get_prefixlen().
Referenced by nl_cli_addr_parse_peer().
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_prefered.
Referenced by nl_cli_addr_parse_preferred().
References rtnl_addr::a_prefixlen.
References rtnl_addr::a_scope.
Referenced by nl_cli_addr_parse_scope().
References rtnl_addr::a_cacheinfo, and rtnl_addr_cacheinfo::aci_valid.
Referenced by nl_cli_addr_parse_valid().
int rtnl_addr_str2flags | ( | const char * | name | ) |
References rtnl_addr::a_flag_mask, rtnl_addr::a_flags, and flags.