13#include <netlink/cli/utils.h> 
   14#include <netlink/cli/link.h> 
   28struct nl_cache *nl_cli_link_alloc_cache_family_flags(
struct nl_sock *sock,
 
   32        struct nl_cache *cache;
 
   44struct nl_cache *nl_cli_link_alloc_cache_family(
struct nl_sock *sock, 
int family)
 
   46        return nl_cli_link_alloc_cache_family_flags(sock, family, 0);
 
   49struct nl_cache *nl_cli_link_alloc_cache(
struct nl_sock *sock)
 
   51        return nl_cli_link_alloc_cache_family(sock, AF_UNSPEC);
 
   54struct nl_cache *nl_cli_link_alloc_cache_flags(
struct nl_sock *sock,
 
   57        return nl_cli_link_alloc_cache_family_flags(sock, AF_UNSPEC, flags);
 
   60void nl_cli_link_parse_family(
struct rtnl_link *link, 
char *arg)
 
   64        if ((family = nl_str2af(arg)) < 0)
 
   66                             "Unable to translate address family \"%s\"", arg);
 
   71void nl_cli_link_parse_name(
struct rtnl_link *link, 
char *arg)
 
   76void nl_cli_link_parse_mtu(
struct rtnl_link *link, 
char *arg)
 
   82void nl_cli_link_parse_ifindex(
struct rtnl_link *link, 
char *arg)
 
   88void nl_cli_link_parse_txqlen(
struct rtnl_link *link, 
char *arg)
 
   94void nl_cli_link_parse_weight(
struct rtnl_link *link, 
char *arg)
 
   98void nl_cli_link_parse_ifalias(
struct rtnl_link *link, 
char *arg)
 
  100        if (strlen(arg) > IFALIASZ)
 
  102                        "Link ifalias too big, must not exceed %u in length.",
 
void nl_cache_mngt_provide(struct nl_cache *cache)
Provide a cache for global use.
 
void nl_cli_fatal(int err, const char *fmt,...)
Print error message and quit application.
 
uint32_t nl_cli_parse_u32(const char *arg)
Parse a text based 32 bit unsigned integer argument.
 
void rtnl_link_set_mtu(struct rtnl_link *link, unsigned int mtu)
Set Maximum Transmission Unit of link object.
 
struct rtnl_link * rtnl_link_alloc(void)
Allocate link object.
 
void rtnl_link_set_ifalias(struct rtnl_link *link, const char *alias)
Set alias name of link object (SNMP IfAlias)
 
void rtnl_link_set_name(struct rtnl_link *link, const char *name)
Set name of link object.
 
int rtnl_link_alloc_cache_flags(struct nl_sock *sk, int family, struct nl_cache **result, unsigned int flags)
Allocate link cache and fill in all configured links.
 
void rtnl_link_set_family(struct rtnl_link *link, int family)
Set address family of link object.
 
void rtnl_link_set_txqlen(struct rtnl_link *link, unsigned int txqlen)
Set transmission queue length.
 
void rtnl_link_set_ifindex(struct rtnl_link *link, int ifindex)
Set interface index of link object.