19 #include <netlink/cli/utils.h>
20 #include <netlink/cli/link.h>
34 struct nl_cache *nl_cli_link_alloc_cache_family(
struct nl_sock *sock,
int family)
36 struct nl_cache *cache;
48 struct nl_cache *nl_cli_link_alloc_cache(
struct nl_sock *sock)
50 return nl_cli_link_alloc_cache_family(sock, AF_UNSPEC);
53 void nl_cli_link_parse_family(
struct rtnl_link *link,
char *arg)
57 if ((family = nl_str2af(arg)) < 0)
59 "Unable to translate address family \"%s\"", arg);
64 void nl_cli_link_parse_name(
struct rtnl_link *link,
char *arg)
69 void nl_cli_link_parse_mtu(
struct rtnl_link *link,
char *arg)
75 void nl_cli_link_parse_ifindex(
struct rtnl_link *link,
char *arg)
81 void nl_cli_link_parse_txqlen(
struct rtnl_link *link,
char *arg)
87 void nl_cli_link_parse_weight(
struct rtnl_link *link,
char *arg)
91 void nl_cli_link_parse_ifalias(
struct rtnl_link *link,
char *arg)
93 if (strlen(arg) > IFALIASZ)
95 "Link ifalias too big, must not exceed %u in length.",