• Home
  • Raw
  • Download

Lines Matching full:link

2  * lib/route/link/vxlan.c	VXLAN Link Info
13 * @ingroup link
15 * Virtual eXtensible Local Area Network link module
18 * \b Link Type Name: "vxlan"
31 #include <netlink-private/route/link/api.h>
32 #include <netlink/route/link/vxlan.h>
125 static int vxlan_alloc(struct rtnl_link *link) in vxlan_alloc() argument
129 if (link->l_info) in vxlan_alloc()
130 memset(link->l_info, 0, sizeof(*vxi)); in vxlan_alloc()
135 link->l_info = vxi; in vxlan_alloc()
141 static int vxlan_parse(struct rtnl_link *link, struct nlattr *data, in vxlan_parse() argument
148 NL_DBG(3, "Parsing VXLAN link info\n"); in vxlan_parse()
153 if ((err = vxlan_alloc(link)) < 0) in vxlan_parse()
156 vxi = link->l_info; in vxlan_parse()
300 static void vxlan_free(struct rtnl_link *link) in vxlan_free() argument
302 struct vxlan_info *vxi = link->l_info; in vxlan_free()
305 link->l_info = NULL; in vxlan_free()
308 static void vxlan_dump_line(struct rtnl_link *link, struct nl_dump_params *p) in vxlan_dump_line() argument
310 struct vxlan_info *vxi = link->l_info; in vxlan_dump_line()
315 static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p) in vxlan_dump_details() argument
317 struct vxlan_info *vxi = link->l_info; in vxlan_dump_details()
338 nl_dump(p, " link "); in vxlan_dump_details()
341 parent = link_lookup(link->ce_cache, vxi->vxi_link); in vxlan_dump_details()
529 static int vxlan_put_attrs(struct nl_msg *msg, struct rtnl_link *link) in vxlan_put_attrs() argument
531 struct vxlan_info *vxi = link->l_info; in vxlan_put_attrs()
638 diff |= VXLAN_DIFF(LINK, a->vxi_link != b->vxi_link); in vxlan_compare()
684 #define IS_VXLAN_LINK_ASSERT(link) \ argument
685 if ((link)->l_info_ops != &vxlan_info_ops) { \
686 APPBUG("Link is not a vxlan link. set type \"vxlan\" first."); \
697 * Allocate link object of type VXLAN
699 * @return Allocated link object or NULL.
703 struct rtnl_link *link; in rtnl_link_vxlan_alloc() local
706 if (!(link = rtnl_link_alloc())) in rtnl_link_vxlan_alloc()
709 if ((err = rtnl_link_set_type(link, "vxlan")) < 0) { in rtnl_link_vxlan_alloc()
710 rtnl_link_put(link); in rtnl_link_vxlan_alloc()
714 return link; in rtnl_link_vxlan_alloc()
718 * Check if link is a VXLAN link
719 * @arg link Link object
721 * @return True if link is a VXLAN link, otherwise false is returned.
723 int rtnl_link_is_vxlan(struct rtnl_link *link) in rtnl_link_is_vxlan() argument
725 return link->l_info_ops && !strcmp(link->l_info_ops->io_name, "vxlan"); in rtnl_link_is_vxlan()
730 * @arg link Link object
735 int rtnl_link_vxlan_set_id(struct rtnl_link *link, uint32_t id) in rtnl_link_vxlan_set_id() argument
737 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_id()
739 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_id()
752 * @arg link Link object
757 int rtnl_link_vxlan_get_id(struct rtnl_link *link, uint32_t *id) in rtnl_link_vxlan_get_id() argument
759 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_id()
761 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_id()
776 * @arg link Link object
781 int rtnl_link_vxlan_set_group(struct rtnl_link *link, struct nl_addr *addr) in rtnl_link_vxlan_set_group() argument
783 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_group()
785 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_group()
807 * @arg link Link object
812 int rtnl_link_vxlan_get_group(struct rtnl_link *link, struct nl_addr **addr) in rtnl_link_vxlan_get_group() argument
814 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_group()
816 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_group()
833 * @arg link Link object
838 int rtnl_link_vxlan_set_link(struct rtnl_link *link, uint32_t index) in rtnl_link_vxlan_set_link() argument
840 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_link()
842 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_link()
852 * @arg link Link object
857 int rtnl_link_vxlan_get_link(struct rtnl_link *link, uint32_t *index) in rtnl_link_vxlan_get_link() argument
859 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_link()
861 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_link()
876 * @arg link Link object
881 int rtnl_link_vxlan_set_local(struct rtnl_link *link, struct nl_addr *addr) in rtnl_link_vxlan_set_local() argument
883 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_local()
885 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_local()
907 * @arg link Link object
912 int rtnl_link_vxlan_get_local(struct rtnl_link *link, struct nl_addr **addr) in rtnl_link_vxlan_get_local() argument
914 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_local()
916 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_local()
933 * @arg link Link object
938 int rtnl_link_vxlan_set_ttl(struct rtnl_link *link, uint8_t ttl) in rtnl_link_vxlan_set_ttl() argument
940 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_ttl()
942 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_ttl()
952 * @arg link Link object
956 int rtnl_link_vxlan_get_ttl(struct rtnl_link *link) in rtnl_link_vxlan_get_ttl() argument
958 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_ttl()
960 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_ttl()
970 * @arg link Link object
975 int rtnl_link_vxlan_set_tos(struct rtnl_link *link, uint8_t tos) in rtnl_link_vxlan_set_tos() argument
977 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_tos()
979 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_tos()
989 * @arg link Link object
993 int rtnl_link_vxlan_get_tos(struct rtnl_link *link) in rtnl_link_vxlan_get_tos() argument
995 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_tos()
997 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_tos()
1007 * @arg link Link object
1012 int rtnl_link_vxlan_set_learning(struct rtnl_link *link, uint8_t learning) in rtnl_link_vxlan_set_learning() argument
1014 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_learning()
1016 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_learning()
1026 * @arg link Link object
1030 int rtnl_link_vxlan_get_learning(struct rtnl_link *link) in rtnl_link_vxlan_get_learning() argument
1032 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_learning()
1034 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_learning()
1044 * @arg link Link object
1048 int rtnl_link_vxlan_enable_learning(struct rtnl_link *link) in rtnl_link_vxlan_enable_learning() argument
1050 return rtnl_link_vxlan_set_learning(link, 1); in rtnl_link_vxlan_enable_learning()
1055 * @arg link Link object
1059 int rtnl_link_vxlan_disable_learning(struct rtnl_link *link) in rtnl_link_vxlan_disable_learning() argument
1061 return rtnl_link_vxlan_set_learning(link, 0); in rtnl_link_vxlan_disable_learning()
1066 * @arg link Link object
1071 int rtnl_link_vxlan_set_ageing(struct rtnl_link *link, uint32_t expiry) in rtnl_link_vxlan_set_ageing() argument
1073 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_ageing()
1075 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_ageing()
1085 * @arg link Link object
1090 int rtnl_link_vxlan_get_ageing(struct rtnl_link *link, uint32_t *expiry) in rtnl_link_vxlan_get_ageing() argument
1092 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_ageing()
1094 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_ageing()
1109 * @arg link Link object
1114 int rtnl_link_vxlan_set_limit(struct rtnl_link *link, uint32_t limit) in rtnl_link_vxlan_set_limit() argument
1116 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_limit()
1118 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_limit()
1128 * @arg link Link object
1133 int rtnl_link_vxlan_get_limit(struct rtnl_link *link, uint32_t *limit) in rtnl_link_vxlan_get_limit() argument
1135 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_limit()
1137 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_limit()
1152 * @arg link Link object
1157 int rtnl_link_vxlan_set_port_range(struct rtnl_link *link, in rtnl_link_vxlan_set_port_range() argument
1160 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_port_range()
1162 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_port_range()
1175 * @arg link Link object
1180 int rtnl_link_vxlan_get_port_range(struct rtnl_link *link, in rtnl_link_vxlan_get_port_range() argument
1183 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_port_range()
1185 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_port_range()
1200 * @arg link Link object
1205 int rtnl_link_vxlan_set_proxy(struct rtnl_link *link, uint8_t proxy) in rtnl_link_vxlan_set_proxy() argument
1207 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_proxy()
1209 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_proxy()
1219 * @arg link Link object
1223 int rtnl_link_vxlan_get_proxy(struct rtnl_link *link) in rtnl_link_vxlan_get_proxy() argument
1225 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_proxy()
1227 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_proxy()
1237 * @arg link Link object
1241 int rtnl_link_vxlan_enable_proxy(struct rtnl_link *link) in rtnl_link_vxlan_enable_proxy() argument
1243 return rtnl_link_vxlan_set_proxy(link, 1); in rtnl_link_vxlan_enable_proxy()
1248 * @arg link Link object
1252 int rtnl_link_vxlan_disable_proxy(struct rtnl_link *link) in rtnl_link_vxlan_disable_proxy() argument
1254 return rtnl_link_vxlan_set_proxy(link, 0); in rtnl_link_vxlan_disable_proxy()
1259 * @arg link Link object
1264 int rtnl_link_vxlan_set_rsc(struct rtnl_link *link, uint8_t rsc) in rtnl_link_vxlan_set_rsc() argument
1266 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_rsc()
1268 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_rsc()
1278 * @arg link Link object
1282 int rtnl_link_vxlan_get_rsc(struct rtnl_link *link) in rtnl_link_vxlan_get_rsc() argument
1284 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_rsc()
1286 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_rsc()
1296 * @arg link Link object
1300 int rtnl_link_vxlan_enable_rsc(struct rtnl_link *link) in rtnl_link_vxlan_enable_rsc() argument
1302 return rtnl_link_vxlan_set_rsc(link, 1); in rtnl_link_vxlan_enable_rsc()
1307 * @arg link Link object
1311 int rtnl_link_vxlan_disable_rsc(struct rtnl_link *link) in rtnl_link_vxlan_disable_rsc() argument
1313 return rtnl_link_vxlan_set_rsc(link, 0); in rtnl_link_vxlan_disable_rsc()
1318 * @arg link Link object
1323 int rtnl_link_vxlan_set_l2miss(struct rtnl_link *link, uint8_t miss) in rtnl_link_vxlan_set_l2miss() argument
1325 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_l2miss()
1327 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_l2miss()
1337 * @arg link Link object
1341 int rtnl_link_vxlan_get_l2miss(struct rtnl_link *link) in rtnl_link_vxlan_get_l2miss() argument
1343 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_l2miss()
1345 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_l2miss()
1355 * @arg link Link object
1359 int rtnl_link_vxlan_enable_l2miss(struct rtnl_link *link) in rtnl_link_vxlan_enable_l2miss() argument
1361 return rtnl_link_vxlan_set_l2miss(link, 1); in rtnl_link_vxlan_enable_l2miss()
1366 * @arg link Link object
1370 int rtnl_link_vxlan_disable_l2miss(struct rtnl_link *link) in rtnl_link_vxlan_disable_l2miss() argument
1372 return rtnl_link_vxlan_set_l2miss(link, 0); in rtnl_link_vxlan_disable_l2miss()
1377 * @arg link Link object
1382 int rtnl_link_vxlan_set_l3miss(struct rtnl_link *link, uint8_t miss) in rtnl_link_vxlan_set_l3miss() argument
1384 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_l3miss()
1386 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_l3miss()
1396 * @arg link Link object
1400 int rtnl_link_vxlan_get_l3miss(struct rtnl_link *link) in rtnl_link_vxlan_get_l3miss() argument
1402 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_l3miss()
1404 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_l3miss()
1414 * @arg link Link object
1418 int rtnl_link_vxlan_enable_l3miss(struct rtnl_link *link) in rtnl_link_vxlan_enable_l3miss() argument
1420 return rtnl_link_vxlan_set_l3miss(link, 1); in rtnl_link_vxlan_enable_l3miss()
1425 * @arg link Link object
1429 int rtnl_link_vxlan_disable_l3miss(struct rtnl_link *link) in rtnl_link_vxlan_disable_l3miss() argument
1431 return rtnl_link_vxlan_set_l3miss(link, 0); in rtnl_link_vxlan_disable_l3miss()
1436 * @arg link Link object
1441 int rtnl_link_vxlan_set_port(struct rtnl_link *link, uint32_t port) in rtnl_link_vxlan_set_port() argument
1443 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_port()
1445 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_port()
1455 * @arg link Link object
1460 int rtnl_link_vxlan_get_port(struct rtnl_link *link, uint32_t *port) in rtnl_link_vxlan_get_port() argument
1462 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_port()
1464 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_port()
1479 * @arg link Link object
1484 int rtnl_link_vxlan_set_udp_csum(struct rtnl_link *link, uint8_t csum) in rtnl_link_vxlan_set_udp_csum() argument
1486 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_csum()
1488 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_udp_csum()
1498 * @arg link Link object
1502 int rtnl_link_vxlan_get_udp_csum(struct rtnl_link *link) in rtnl_link_vxlan_get_udp_csum() argument
1504 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_csum()
1506 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_udp_csum()
1516 * @arg link Link object
1521 int rtnl_link_vxlan_set_udp_zero_csum6_tx(struct rtnl_link *link, uint8_t csum) in rtnl_link_vxlan_set_udp_zero_csum6_tx() argument
1523 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_zero_csum6_tx()
1525 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_udp_zero_csum6_tx()
1535 * @arg link Link object
1539 int rtnl_link_vxlan_get_udp_zero_csum6_tx(struct rtnl_link *link) in rtnl_link_vxlan_get_udp_zero_csum6_tx() argument
1541 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_zero_csum6_tx()
1543 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_udp_zero_csum6_tx()
1553 * @arg link Link object
1558 int rtnl_link_vxlan_set_udp_zero_csum6_rx(struct rtnl_link *link, uint8_t csum) in rtnl_link_vxlan_set_udp_zero_csum6_rx() argument
1560 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_zero_csum6_rx()
1562 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_udp_zero_csum6_rx()
1572 * @arg link Link object
1576 int rtnl_link_vxlan_get_udp_zero_csum6_rx(struct rtnl_link *link) in rtnl_link_vxlan_get_udp_zero_csum6_rx() argument
1578 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_zero_csum6_rx()
1580 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_udp_zero_csum6_rx()
1590 * @arg link Link object
1595 int rtnl_link_vxlan_set_remcsum_tx(struct rtnl_link *link, uint8_t csum) in rtnl_link_vxlan_set_remcsum_tx() argument
1597 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_remcsum_tx()
1599 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_remcsum_tx()
1609 * @arg link Link object
1613 int rtnl_link_vxlan_get_remcsum_tx(struct rtnl_link *link) in rtnl_link_vxlan_get_remcsum_tx() argument
1615 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_remcsum_tx()
1617 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_remcsum_tx()
1627 * @arg link Link object
1632 int rtnl_link_vxlan_set_remcsum_rx(struct rtnl_link *link, uint8_t csum) in rtnl_link_vxlan_set_remcsum_rx() argument
1634 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_remcsum_rx()
1636 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_remcsum_rx()
1646 * @arg link Link object
1650 int rtnl_link_vxlan_get_remcsum_rx(struct rtnl_link *link) in rtnl_link_vxlan_get_remcsum_rx() argument
1652 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_remcsum_rx()
1654 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_remcsum_rx()
1664 * @arg link Link object
1669 int rtnl_link_vxlan_set_collect_metadata(struct rtnl_link *link, uint8_t collect) in rtnl_link_vxlan_set_collect_metadata() argument
1671 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_collect_metadata()
1673 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_collect_metadata()
1683 * @arg link Link object
1687 int rtnl_link_vxlan_get_collect_metadata(struct rtnl_link *link) in rtnl_link_vxlan_get_collect_metadata() argument
1689 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_collect_metadata()
1691 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_collect_metadata()
1701 * @arg link Link object
1706 int rtnl_link_vxlan_set_label(struct rtnl_link *link, uint32_t label) in rtnl_link_vxlan_set_label() argument
1708 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_label()
1710 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_label()
1720 * @arg link Link object
1725 int rtnl_link_vxlan_get_label(struct rtnl_link *link, uint32_t *label) in rtnl_link_vxlan_get_label() argument
1727 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_label()
1729 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_label()
1744 * @arg link Link object
1750 int rtnl_link_vxlan_set_flags(struct rtnl_link *link, uint32_t flags, int enable) in rtnl_link_vxlan_set_flags() argument
1752 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_flags()
1754 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_set_flags()
1769 * @arg link Link object
1774 int rtnl_link_vxlan_get_flags(struct rtnl_link *link, uint32_t *out_flags) in rtnl_link_vxlan_get_flags() argument
1776 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_flags()
1778 IS_VXLAN_LINK_ASSERT(link); in rtnl_link_vxlan_get_flags()