9#include <netlink/netlink.h>
22extern struct nl_addr *
nl_addr_build(
int,
const void *,
size_t);
23extern int nl_addr_parse(
const char *,
int,
struct nl_addr **);
27extern struct nl_addr *
nl_addr_get(
struct nl_addr *);
32 const struct nl_addr *);
34 const struct nl_addr *);
39 struct sockaddr *, socklen_t *);
55extern char * nl_af2str(
int,
char *,
size_t);
56extern int nl_str2af(
const char *);
59extern char *
nl_addr2str(
const struct nl_addr *,
char *,
size_t);
int nl_addr_info(const struct nl_addr *, struct addrinfo **)
Call getaddrinfo() for an abstract address object.
int nl_addr_iszero(const struct nl_addr *)
Returns true if the address consists of all zeros.
int nl_addr_fill_sockaddr(const struct nl_addr *, struct sockaddr *, socklen_t *)
Fill out sockaddr structure with values from abstract address object.
void nl_addr_set_prefixlen(struct nl_addr *, int)
Set the prefix length of an abstract address.
struct nl_addr * nl_addr_get(struct nl_addr *)
Increase the reference counter of an abstract address.
struct nl_addr * nl_addr_build(int, const void *, size_t)
Allocate abstract address based on a binary address.
struct nl_addr * nl_addr_alloc_attr(const struct nlattr *, int)
Allocate abstract address based on Netlink attribute.
int nl_addr_resolve(const struct nl_addr *, char *, size_t)
Resolve abstract address object to a name using getnameinfo().
void * nl_addr_get_binary_addr(const struct nl_addr *)
Get binary address of abstract address object.
int nl_addr_cmp(const struct nl_addr *, const struct nl_addr *)
Compare abstract addresses.
struct nl_addr * nl_addr_alloc(size_t)
Allocate empty abstract address.
int nl_addr_parse(const char *, int, struct nl_addr **)
Allocate abstract address based on character string.
struct nl_addr * nl_addr_clone(const struct nl_addr *)
Clone existing abstract address object.
int nl_addr_set_binary_addr(struct nl_addr *, const void *, size_t)
Set binary address of abstract address object.
int nl_addr_get_family(const struct nl_addr *)
Return address family.
int nl_addr_cmp_prefix(const struct nl_addr *, const struct nl_addr *)
Compare the prefix of two abstract addresses.
char * nl_addr2str(const struct nl_addr *, char *, size_t)
Convert abstract address object to character string.
int nl_addr_valid(const char *, int)
Check if address string is parseable for a specific address family.
unsigned int nl_addr_get_prefixlen(const struct nl_addr *)
Return prefix length of abstract address object.
unsigned int nl_addr_get_len(const struct nl_addr *)
Get length of binary address of abstract address object.
void nl_addr_put(struct nl_addr *)
Decrease the reference counter of an abstract address.
void nl_addr_set_family(struct nl_addr *, int)
Set address family.
int nl_addr_shared(const struct nl_addr *)
Check whether an abstract address is shared.
int nl_addr_guess_family(const struct nl_addr *)
Guess address family of abstract address based on address size.