• Home
  • Raw
  • Download

Lines Matching refs:vxi

127 	struct vxlan_info *vxi;  in vxlan_alloc()  local
130 memset(link->l_info, 0, sizeof(*vxi)); in vxlan_alloc()
132 if ((vxi = calloc(1, sizeof(*vxi))) == NULL) in vxlan_alloc()
135 link->l_info = vxi; in vxlan_alloc()
145 struct vxlan_info *vxi; in vxlan_parse() local
156 vxi = link->l_info; in vxlan_parse()
159 vxi->vxi_id = nla_get_u32(tb[IFLA_VXLAN_ID]); in vxlan_parse()
160 vxi->ce_mask |= VXLAN_ATTR_ID; in vxlan_parse()
164 nla_memcpy(&vxi->vxi_group6, tb[IFLA_VXLAN_GROUP6], in vxlan_parse()
165 sizeof(vxi->vxi_group6)); in vxlan_parse()
166 vxi->ce_mask |= VXLAN_ATTR_GROUP6; in vxlan_parse()
170 nla_memcpy(&vxi->vxi_group, tb[IFLA_VXLAN_GROUP], in vxlan_parse()
171 sizeof(vxi->vxi_group)); in vxlan_parse()
172 vxi->ce_mask |= VXLAN_ATTR_GROUP; in vxlan_parse()
173 vxi->ce_mask &= ~VXLAN_ATTR_GROUP6; in vxlan_parse()
177 vxi->vxi_link = nla_get_u32(tb[IFLA_VXLAN_LINK]); in vxlan_parse()
178 vxi->ce_mask |= VXLAN_ATTR_LINK; in vxlan_parse()
182 nla_memcpy(&vxi->vxi_local6, tb[IFLA_VXLAN_LOCAL6], in vxlan_parse()
183 sizeof(vxi->vxi_local6)); in vxlan_parse()
184 vxi->ce_mask |= VXLAN_ATTR_LOCAL6; in vxlan_parse()
188 nla_memcpy(&vxi->vxi_local, tb[IFLA_VXLAN_LOCAL], in vxlan_parse()
189 sizeof(vxi->vxi_local)); in vxlan_parse()
190 vxi->ce_mask |= VXLAN_ATTR_LOCAL; in vxlan_parse()
191 vxi->ce_mask &= ~VXLAN_ATTR_LOCAL6; in vxlan_parse()
195 vxi->vxi_ttl = nla_get_u8(tb[IFLA_VXLAN_TTL]); in vxlan_parse()
196 vxi->ce_mask |= VXLAN_ATTR_TTL; in vxlan_parse()
200 vxi->vxi_tos = nla_get_u8(tb[IFLA_VXLAN_TOS]); in vxlan_parse()
201 vxi->ce_mask |= VXLAN_ATTR_TOS; in vxlan_parse()
205 vxi->vxi_learning = nla_get_u8(tb[IFLA_VXLAN_LEARNING]); in vxlan_parse()
206 vxi->ce_mask |= VXLAN_ATTR_LEARNING; in vxlan_parse()
210 vxi->vxi_ageing = nla_get_u32(tb[IFLA_VXLAN_AGEING]); in vxlan_parse()
211 vxi->ce_mask |= VXLAN_ATTR_AGEING; in vxlan_parse()
215 vxi->vxi_limit = nla_get_u32(tb[IFLA_VXLAN_LIMIT]); in vxlan_parse()
216 vxi->ce_mask |= VXLAN_ATTR_LIMIT; in vxlan_parse()
220 nla_memcpy(&vxi->vxi_port_range, tb[IFLA_VXLAN_PORT_RANGE], in vxlan_parse()
221 sizeof(vxi->vxi_port_range)); in vxlan_parse()
222 vxi->ce_mask |= VXLAN_ATTR_PORT_RANGE; in vxlan_parse()
226 vxi->vxi_proxy = nla_get_u8(tb[IFLA_VXLAN_PROXY]); in vxlan_parse()
227 vxi->ce_mask |= VXLAN_ATTR_PROXY; in vxlan_parse()
231 vxi->vxi_rsc = nla_get_u8(tb[IFLA_VXLAN_RSC]); in vxlan_parse()
232 vxi->ce_mask |= VXLAN_ATTR_RSC; in vxlan_parse()
236 vxi->vxi_l2miss = nla_get_u8(tb[IFLA_VXLAN_L2MISS]); in vxlan_parse()
237 vxi->ce_mask |= VXLAN_ATTR_L2MISS; in vxlan_parse()
241 vxi->vxi_l3miss = nla_get_u8(tb[IFLA_VXLAN_L3MISS]); in vxlan_parse()
242 vxi->ce_mask |= VXLAN_ATTR_L3MISS; in vxlan_parse()
246 vxi->vxi_port = nla_get_u16(tb[IFLA_VXLAN_PORT]); in vxlan_parse()
247 vxi->ce_mask |= VXLAN_ATTR_PORT; in vxlan_parse()
251 vxi->vxi_udp_csum = nla_get_u8(tb[IFLA_VXLAN_UDP_CSUM]); in vxlan_parse()
252 vxi->ce_mask |= VXLAN_ATTR_UDP_CSUM; in vxlan_parse()
256 vxi->vxi_udp_zero_csum6_tx = nla_get_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_TX]); in vxlan_parse()
257 vxi->ce_mask |= VXLAN_ATTR_UDP_ZERO_CSUM6_TX; in vxlan_parse()
261 vxi->vxi_udp_zero_csum6_rx = nla_get_u8(tb[IFLA_VXLAN_UDP_ZERO_CSUM6_RX]); in vxlan_parse()
262 vxi->ce_mask |= VXLAN_ATTR_UDP_ZERO_CSUM6_RX; in vxlan_parse()
266 vxi->vxi_remcsum_tx = nla_get_u8(tb[IFLA_VXLAN_REMCSUM_TX]); in vxlan_parse()
267 vxi->ce_mask |= VXLAN_ATTR_REMCSUM_TX; in vxlan_parse()
271 vxi->vxi_remcsum_rx = nla_get_u8(tb[IFLA_VXLAN_REMCSUM_RX]); in vxlan_parse()
272 vxi->ce_mask |= VXLAN_ATTR_REMCSUM_RX; in vxlan_parse()
276 vxi->vxi_flags |= RTNL_LINK_VXLAN_F_GBP; in vxlan_parse()
279 vxi->vxi_flags |= RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL; in vxlan_parse()
282 vxi->vxi_collect_metadata = nla_get_u8(tb[IFLA_VXLAN_COLLECT_METADATA]); in vxlan_parse()
283 vxi->ce_mask |= VXLAN_ATTR_COLLECT_METADATA; in vxlan_parse()
287 vxi->vxi_label = nla_get_u32(tb[IFLA_VXLAN_LABEL]); in vxlan_parse()
288 vxi->ce_mask |= VXLAN_ATTR_LABEL; in vxlan_parse()
292 vxi->vxi_flags |= RTNL_LINK_VXLAN_F_GPE; in vxlan_parse()
302 struct vxlan_info *vxi = link->l_info; in vxlan_free() local
304 free(vxi); in vxlan_free()
310 struct vxlan_info *vxi = link->l_info; in vxlan_dump_line() local
312 nl_dump(p, "vxlan-id %u", vxi->vxi_id); in vxlan_dump_line()
317 struct vxlan_info *vxi = link->l_info; in vxlan_dump_details() local
321 nl_dump_line(p, " vxlan-id %u\n", vxi->vxi_id); in vxlan_dump_details()
323 if (vxi->ce_mask & VXLAN_ATTR_GROUP) { in vxlan_dump_details()
325 if (inet_ntop(AF_INET, &vxi->vxi_group, addr, sizeof(addr))) in vxlan_dump_details()
328 nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_group)); in vxlan_dump_details()
329 } else if (vxi->ce_mask & VXLAN_ATTR_GROUP6) { in vxlan_dump_details()
331 if (inet_ntop(AF_INET6, &vxi->vxi_group6, addr, sizeof(addr))) in vxlan_dump_details()
334 nl_dump_line(p, "%#x\n", vxi->vxi_group6); in vxlan_dump_details()
337 if (vxi->ce_mask & VXLAN_ATTR_LINK) { in vxlan_dump_details()
341 parent = link_lookup(link->ce_cache, vxi->vxi_link); in vxlan_dump_details()
348 nl_dump_line(p, "%u\n", vxi->vxi_link); in vxlan_dump_details()
351 if (vxi->ce_mask & VXLAN_ATTR_LOCAL) { in vxlan_dump_details()
353 if (inet_ntop(AF_INET, &vxi->vxi_local, addr, sizeof(addr))) in vxlan_dump_details()
356 nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_local)); in vxlan_dump_details()
357 } else if (vxi->ce_mask & VXLAN_ATTR_LOCAL6) { in vxlan_dump_details()
359 if (inet_ntop(AF_INET6, &vxi->vxi_local6, addr, sizeof(addr))) in vxlan_dump_details()
362 nl_dump_line(p, "%#x\n", vxi->vxi_local6); in vxlan_dump_details()
366 if (vxi->ce_mask & VXLAN_ATTR_TTL) { in vxlan_dump_details()
368 if(vxi->vxi_ttl) in vxlan_dump_details()
369 nl_dump_line(p, "%u\n", vxi->vxi_ttl); in vxlan_dump_details()
374 if (vxi->ce_mask & VXLAN_ATTR_TOS) { in vxlan_dump_details()
376 if (vxi->vxi_tos == 1) in vxlan_dump_details()
377 nl_dump_line(p, "inherit\n", vxi->vxi_tos); in vxlan_dump_details()
379 nl_dump_line(p, "%#x\n", vxi->vxi_tos); in vxlan_dump_details()
382 if (vxi->ce_mask & VXLAN_ATTR_LEARNING) { in vxlan_dump_details()
384 if (vxi->vxi_learning) in vxlan_dump_details()
385 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_learning); in vxlan_dump_details()
390 if (vxi->ce_mask & VXLAN_ATTR_AGEING) { in vxlan_dump_details()
392 if (vxi->vxi_ageing) in vxlan_dump_details()
393 nl_dump_line(p, "%u seconds\n", vxi->vxi_ageing); in vxlan_dump_details()
398 if (vxi->ce_mask & VXLAN_ATTR_LIMIT) { in vxlan_dump_details()
400 if (vxi->vxi_limit) in vxlan_dump_details()
401 nl_dump_line(p, "%u\n", vxi->vxi_limit); in vxlan_dump_details()
406 if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE) in vxlan_dump_details()
408 ntohs(vxi->vxi_port_range.low), in vxlan_dump_details()
409 ntohs(vxi->vxi_port_range.high)); in vxlan_dump_details()
411 if (vxi->ce_mask & VXLAN_ATTR_PROXY) { in vxlan_dump_details()
413 if (vxi->vxi_proxy) in vxlan_dump_details()
414 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_proxy); in vxlan_dump_details()
419 if (vxi->ce_mask & VXLAN_ATTR_RSC) { in vxlan_dump_details()
421 if (vxi->vxi_rsc) in vxlan_dump_details()
422 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_rsc); in vxlan_dump_details()
427 if (vxi->ce_mask & VXLAN_ATTR_L2MISS) { in vxlan_dump_details()
429 if (vxi->vxi_l2miss) in vxlan_dump_details()
430 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_l2miss); in vxlan_dump_details()
435 if (vxi->ce_mask & VXLAN_ATTR_L3MISS) { in vxlan_dump_details()
437 if (vxi->vxi_l3miss) in vxlan_dump_details()
438 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_l3miss); in vxlan_dump_details()
443 if (vxi->ce_mask & VXLAN_ATTR_PORT) { in vxlan_dump_details()
445 nl_dump_line(p, "%u\n", ntohs(vxi->vxi_port)); in vxlan_dump_details()
448 if (vxi->ce_mask & VXLAN_ATTR_UDP_CSUM) { in vxlan_dump_details()
450 if (vxi->vxi_udp_csum) in vxlan_dump_details()
451 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_udp_csum); in vxlan_dump_details()
456 if (vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_TX) { in vxlan_dump_details()
458 if (vxi->vxi_udp_zero_csum6_tx) in vxlan_dump_details()
459 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_udp_zero_csum6_tx); in vxlan_dump_details()
464 if (vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_RX) { in vxlan_dump_details()
466 if (vxi->vxi_udp_zero_csum6_rx) in vxlan_dump_details()
467 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_udp_zero_csum6_rx); in vxlan_dump_details()
472 if (vxi->ce_mask & VXLAN_ATTR_REMCSUM_TX) { in vxlan_dump_details()
474 if (vxi->vxi_remcsum_tx) in vxlan_dump_details()
475 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_remcsum_tx); in vxlan_dump_details()
480 if (vxi->ce_mask & VXLAN_ATTR_REMCSUM_RX) { in vxlan_dump_details()
482 if (vxi->vxi_remcsum_rx) in vxlan_dump_details()
483 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_remcsum_rx); in vxlan_dump_details()
488 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_GBP) in vxlan_dump_details()
491 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL) in vxlan_dump_details()
494 if (vxi->ce_mask & VXLAN_ATTR_COLLECT_METADATA) { in vxlan_dump_details()
496 if (vxi->vxi_collect_metadata) in vxlan_dump_details()
497 nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_collect_metadata); in vxlan_dump_details()
502 if (vxi->ce_mask & VXLAN_ATTR_LABEL) { in vxlan_dump_details()
504 nl_dump_line(p, "%u\n", ntohl(vxi->vxi_label)); in vxlan_dump_details()
507 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_GPE) in vxlan_dump_details()
531 struct vxlan_info *vxi = link->l_info; in vxlan_put_attrs() local
537 if (vxi->ce_mask & VXLAN_ATTR_ID) in vxlan_put_attrs()
538 NLA_PUT_U32(msg, IFLA_VXLAN_ID, vxi->vxi_id); in vxlan_put_attrs()
540 if (vxi->ce_mask & VXLAN_ATTR_GROUP) in vxlan_put_attrs()
541 NLA_PUT(msg, IFLA_VXLAN_GROUP, sizeof(vxi->vxi_group), &vxi->vxi_group); in vxlan_put_attrs()
543 if (vxi->ce_mask & VXLAN_ATTR_GROUP6) in vxlan_put_attrs()
544 NLA_PUT(msg, IFLA_VXLAN_GROUP6, sizeof(vxi->vxi_group6), &vxi->vxi_group6); in vxlan_put_attrs()
546 if (vxi->ce_mask & VXLAN_ATTR_LINK) in vxlan_put_attrs()
547 NLA_PUT_U32(msg, IFLA_VXLAN_LINK, vxi->vxi_link); in vxlan_put_attrs()
549 if (vxi->ce_mask & VXLAN_ATTR_LOCAL) in vxlan_put_attrs()
550 NLA_PUT(msg, IFLA_VXLAN_LOCAL, sizeof(vxi->vxi_local), &vxi->vxi_local); in vxlan_put_attrs()
552 if (vxi->ce_mask & VXLAN_ATTR_LOCAL6) in vxlan_put_attrs()
553 NLA_PUT(msg, IFLA_VXLAN_LOCAL6, sizeof(vxi->vxi_local6), &vxi->vxi_local6); in vxlan_put_attrs()
555 if (vxi->ce_mask & VXLAN_ATTR_TTL) in vxlan_put_attrs()
556 NLA_PUT_U8(msg, IFLA_VXLAN_TTL, vxi->vxi_ttl); in vxlan_put_attrs()
558 if (vxi->ce_mask & VXLAN_ATTR_TOS) in vxlan_put_attrs()
559 NLA_PUT_U8(msg, IFLA_VXLAN_TOS, vxi->vxi_tos); in vxlan_put_attrs()
561 if (vxi->ce_mask & VXLAN_ATTR_LEARNING) in vxlan_put_attrs()
562 NLA_PUT_U8(msg, IFLA_VXLAN_LEARNING, vxi->vxi_learning); in vxlan_put_attrs()
564 if (vxi->ce_mask & VXLAN_ATTR_AGEING) in vxlan_put_attrs()
565 NLA_PUT_U32(msg, IFLA_VXLAN_AGEING, vxi->vxi_ageing); in vxlan_put_attrs()
567 if (vxi->ce_mask & VXLAN_ATTR_LIMIT) in vxlan_put_attrs()
568 NLA_PUT_U32(msg, IFLA_VXLAN_LIMIT, vxi->vxi_limit); in vxlan_put_attrs()
570 if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE) in vxlan_put_attrs()
571 NLA_PUT(msg, IFLA_VXLAN_PORT_RANGE, sizeof(vxi->vxi_port_range), in vxlan_put_attrs()
572 &vxi->vxi_port_range); in vxlan_put_attrs()
574 if (vxi->ce_mask & VXLAN_ATTR_PROXY) in vxlan_put_attrs()
575 NLA_PUT_U8(msg, IFLA_VXLAN_PROXY, vxi->vxi_proxy); in vxlan_put_attrs()
577 if (vxi->ce_mask & VXLAN_ATTR_RSC) in vxlan_put_attrs()
578 NLA_PUT_U8(msg, IFLA_VXLAN_RSC, vxi->vxi_rsc); in vxlan_put_attrs()
580 if (vxi->ce_mask & VXLAN_ATTR_L2MISS) in vxlan_put_attrs()
581 NLA_PUT_U8(msg, IFLA_VXLAN_L2MISS, vxi->vxi_l2miss); in vxlan_put_attrs()
583 if (vxi->ce_mask & VXLAN_ATTR_L3MISS) in vxlan_put_attrs()
584 NLA_PUT_U8(msg, IFLA_VXLAN_L3MISS, vxi->vxi_l3miss); in vxlan_put_attrs()
586 if (vxi->ce_mask & VXLAN_ATTR_PORT) in vxlan_put_attrs()
587 NLA_PUT_U32(msg, IFLA_VXLAN_PORT, vxi->vxi_port); in vxlan_put_attrs()
589 if (vxi->ce_mask & VXLAN_ATTR_UDP_CSUM) in vxlan_put_attrs()
590 NLA_PUT_U8(msg, IFLA_VXLAN_UDP_CSUM, vxi->vxi_udp_csum); in vxlan_put_attrs()
592 if (vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_TX) in vxlan_put_attrs()
593 NLA_PUT_U8(msg, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, vxi->vxi_udp_zero_csum6_tx); in vxlan_put_attrs()
595 if (vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_RX) in vxlan_put_attrs()
596 NLA_PUT_U8(msg, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, vxi->vxi_udp_zero_csum6_rx); in vxlan_put_attrs()
598 if (vxi->ce_mask & VXLAN_ATTR_REMCSUM_TX) in vxlan_put_attrs()
599 NLA_PUT_U8(msg, IFLA_VXLAN_REMCSUM_TX, vxi->vxi_remcsum_tx); in vxlan_put_attrs()
601 if (vxi->ce_mask & VXLAN_ATTR_REMCSUM_RX) in vxlan_put_attrs()
602 NLA_PUT_U8(msg, IFLA_VXLAN_REMCSUM_RX, vxi->vxi_remcsum_rx); in vxlan_put_attrs()
604 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_GBP) in vxlan_put_attrs()
607 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_REMCSUM_NOPARTIAL) in vxlan_put_attrs()
610 if (vxi->ce_mask & VXLAN_ATTR_COLLECT_METADATA) in vxlan_put_attrs()
611 NLA_PUT_U8(msg, IFLA_VXLAN_COLLECT_METADATA, vxi->vxi_collect_metadata); in vxlan_put_attrs()
613 if (vxi->ce_mask & VXLAN_ATTR_LABEL) in vxlan_put_attrs()
614 NLA_PUT_U32(msg, IFLA_VXLAN_LABEL, vxi->vxi_label); in vxlan_put_attrs()
616 if (vxi->vxi_flags & RTNL_LINK_VXLAN_F_GPE) in vxlan_put_attrs()
737 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_id() local
744 vxi->vxi_id = id; in rtnl_link_vxlan_set_id()
745 vxi->ce_mask |= VXLAN_ATTR_ID; in rtnl_link_vxlan_set_id()
759 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_id() local
766 if (vxi->ce_mask & VXLAN_ATTR_ID) in rtnl_link_vxlan_get_id()
767 *id = vxi->vxi_id; in rtnl_link_vxlan_get_id()
783 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_group() local
788 (nl_addr_get_len(addr) == sizeof(vxi->vxi_group))) { in rtnl_link_vxlan_set_group()
789 memcpy(&vxi->vxi_group, nl_addr_get_binary_addr(addr), in rtnl_link_vxlan_set_group()
790 sizeof(vxi->vxi_group)); in rtnl_link_vxlan_set_group()
791 vxi->ce_mask |= VXLAN_ATTR_GROUP; in rtnl_link_vxlan_set_group()
792 vxi->ce_mask &= ~VXLAN_ATTR_GROUP6; in rtnl_link_vxlan_set_group()
794 (nl_addr_get_len(addr) == sizeof(vxi->vxi_group6))) { in rtnl_link_vxlan_set_group()
795 memcpy(&vxi->vxi_group6, nl_addr_get_binary_addr(addr), in rtnl_link_vxlan_set_group()
796 sizeof(vxi->vxi_group6)); in rtnl_link_vxlan_set_group()
797 vxi->ce_mask |= VXLAN_ATTR_GROUP6; in rtnl_link_vxlan_set_group()
798 vxi->ce_mask &= ~VXLAN_ATTR_GROUP; in rtnl_link_vxlan_set_group()
814 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_group() local
821 if (vxi->ce_mask & VXLAN_ATTR_GROUP) in rtnl_link_vxlan_get_group()
822 *addr = nl_addr_build(AF_INET, &vxi->vxi_group, sizeof(vxi->vxi_group)); in rtnl_link_vxlan_get_group()
823 else if (vxi->ce_mask & VXLAN_ATTR_GROUP6) in rtnl_link_vxlan_get_group()
824 *addr = nl_addr_build(AF_INET6, &vxi->vxi_group6, sizeof(vxi->vxi_group6)); in rtnl_link_vxlan_get_group()
840 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_link() local
844 vxi->vxi_link = index; in rtnl_link_vxlan_set_link()
845 vxi->ce_mask |= VXLAN_ATTR_LINK; in rtnl_link_vxlan_set_link()
859 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_link() local
866 if (!(vxi->ce_mask & VXLAN_ATTR_LINK)) in rtnl_link_vxlan_get_link()
869 *index = vxi->vxi_link; in rtnl_link_vxlan_get_link()
883 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_local() local
888 (nl_addr_get_len(addr) == sizeof(vxi->vxi_local))) { in rtnl_link_vxlan_set_local()
889 memcpy(&vxi->vxi_local, nl_addr_get_binary_addr(addr), in rtnl_link_vxlan_set_local()
890 sizeof(vxi->vxi_local)); in rtnl_link_vxlan_set_local()
891 vxi->ce_mask |= VXLAN_ATTR_LOCAL; in rtnl_link_vxlan_set_local()
892 vxi->ce_mask &= ~VXLAN_ATTR_LOCAL6; in rtnl_link_vxlan_set_local()
894 (nl_addr_get_len(addr) == sizeof(vxi->vxi_local6))) { in rtnl_link_vxlan_set_local()
895 memcpy(&vxi->vxi_local6, nl_addr_get_binary_addr(addr), in rtnl_link_vxlan_set_local()
896 sizeof(vxi->vxi_local6)); in rtnl_link_vxlan_set_local()
897 vxi->ce_mask |= VXLAN_ATTR_LOCAL6; in rtnl_link_vxlan_set_local()
898 vxi->ce_mask &= ~VXLAN_ATTR_LOCAL; in rtnl_link_vxlan_set_local()
914 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_local() local
921 if (vxi->ce_mask & VXLAN_ATTR_LOCAL) in rtnl_link_vxlan_get_local()
922 *addr = nl_addr_build(AF_INET, &vxi->vxi_local, sizeof(vxi->vxi_local)); in rtnl_link_vxlan_get_local()
923 else if (vxi->ce_mask & VXLAN_ATTR_LOCAL6) in rtnl_link_vxlan_get_local()
924 *addr = nl_addr_build(AF_INET6, &vxi->vxi_local6, sizeof(vxi->vxi_local6)); in rtnl_link_vxlan_get_local()
940 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_ttl() local
944 vxi->vxi_ttl = ttl; in rtnl_link_vxlan_set_ttl()
945 vxi->ce_mask |= VXLAN_ATTR_TTL; in rtnl_link_vxlan_set_ttl()
958 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_ttl() local
962 if (!(vxi->ce_mask & VXLAN_ATTR_TTL)) in rtnl_link_vxlan_get_ttl()
965 return vxi->vxi_ttl; in rtnl_link_vxlan_get_ttl()
977 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_tos() local
981 vxi->vxi_tos = tos; in rtnl_link_vxlan_set_tos()
982 vxi->ce_mask |= VXLAN_ATTR_TOS; in rtnl_link_vxlan_set_tos()
995 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_tos() local
999 if (!(vxi->ce_mask & VXLAN_ATTR_TOS)) in rtnl_link_vxlan_get_tos()
1002 return vxi->vxi_tos; in rtnl_link_vxlan_get_tos()
1014 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_learning() local
1018 vxi->vxi_learning = learning; in rtnl_link_vxlan_set_learning()
1019 vxi->ce_mask |= VXLAN_ATTR_LEARNING; in rtnl_link_vxlan_set_learning()
1032 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_learning() local
1036 if (!(vxi->ce_mask & VXLAN_ATTR_LEARNING)) in rtnl_link_vxlan_get_learning()
1039 return vxi->vxi_learning; in rtnl_link_vxlan_get_learning()
1073 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_ageing() local
1077 vxi->vxi_ageing = expiry; in rtnl_link_vxlan_set_ageing()
1078 vxi->ce_mask |= VXLAN_ATTR_AGEING; in rtnl_link_vxlan_set_ageing()
1092 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_ageing() local
1099 if (vxi->ce_mask & VXLAN_ATTR_AGEING) in rtnl_link_vxlan_get_ageing()
1100 *expiry = vxi->vxi_ageing; in rtnl_link_vxlan_get_ageing()
1116 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_limit() local
1120 vxi->vxi_limit = limit; in rtnl_link_vxlan_set_limit()
1121 vxi->ce_mask |= VXLAN_ATTR_LIMIT; in rtnl_link_vxlan_set_limit()
1135 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_limit() local
1142 if (vxi->ce_mask & VXLAN_ATTR_LIMIT) in rtnl_link_vxlan_get_limit()
1143 *limit = vxi->vxi_limit; in rtnl_link_vxlan_get_limit()
1160 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_port_range() local
1167 memcpy(&vxi->vxi_port_range, range, sizeof(vxi->vxi_port_range)); in rtnl_link_vxlan_set_port_range()
1168 vxi->ce_mask |= VXLAN_ATTR_PORT_RANGE; in rtnl_link_vxlan_set_port_range()
1183 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_port_range() local
1190 if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE) in rtnl_link_vxlan_get_port_range()
1191 memcpy(range, &vxi->vxi_port_range, sizeof(*range)); in rtnl_link_vxlan_get_port_range()
1207 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_proxy() local
1211 vxi->vxi_proxy = proxy; in rtnl_link_vxlan_set_proxy()
1212 vxi->ce_mask |= VXLAN_ATTR_PROXY; in rtnl_link_vxlan_set_proxy()
1225 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_proxy() local
1229 if (!(vxi->ce_mask & VXLAN_ATTR_PROXY)) in rtnl_link_vxlan_get_proxy()
1232 return vxi->vxi_proxy; in rtnl_link_vxlan_get_proxy()
1266 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_rsc() local
1270 vxi->vxi_rsc = rsc; in rtnl_link_vxlan_set_rsc()
1271 vxi->ce_mask |= VXLAN_ATTR_RSC; in rtnl_link_vxlan_set_rsc()
1284 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_rsc() local
1288 if (!(vxi->ce_mask & VXLAN_ATTR_RSC)) in rtnl_link_vxlan_get_rsc()
1291 return vxi->vxi_rsc; in rtnl_link_vxlan_get_rsc()
1325 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_l2miss() local
1329 vxi->vxi_l2miss = miss; in rtnl_link_vxlan_set_l2miss()
1330 vxi->ce_mask |= VXLAN_ATTR_L2MISS; in rtnl_link_vxlan_set_l2miss()
1343 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_l2miss() local
1347 if (!(vxi->ce_mask & VXLAN_ATTR_L2MISS)) in rtnl_link_vxlan_get_l2miss()
1350 return vxi->vxi_l2miss; in rtnl_link_vxlan_get_l2miss()
1384 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_l3miss() local
1388 vxi->vxi_l3miss = miss; in rtnl_link_vxlan_set_l3miss()
1389 vxi->ce_mask |= VXLAN_ATTR_L3MISS; in rtnl_link_vxlan_set_l3miss()
1402 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_l3miss() local
1406 if (!(vxi->ce_mask & VXLAN_ATTR_L3MISS)) in rtnl_link_vxlan_get_l3miss()
1409 return vxi->vxi_l3miss; in rtnl_link_vxlan_get_l3miss()
1443 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_port() local
1447 vxi->vxi_port = htons(port); in rtnl_link_vxlan_set_port()
1448 vxi->ce_mask |= VXLAN_ATTR_PORT; in rtnl_link_vxlan_set_port()
1462 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_port() local
1469 if (!(vxi->ce_mask & VXLAN_ATTR_PORT)) in rtnl_link_vxlan_get_port()
1472 *port = ntohs(vxi->vxi_port); in rtnl_link_vxlan_get_port()
1486 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_csum() local
1490 vxi->vxi_udp_csum = csum; in rtnl_link_vxlan_set_udp_csum()
1491 vxi->ce_mask |= VXLAN_ATTR_UDP_CSUM; in rtnl_link_vxlan_set_udp_csum()
1504 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_csum() local
1508 if (!(vxi->ce_mask & VXLAN_ATTR_UDP_CSUM)) in rtnl_link_vxlan_get_udp_csum()
1511 return vxi->vxi_udp_csum; in rtnl_link_vxlan_get_udp_csum()
1523 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_zero_csum6_tx() local
1527 vxi->vxi_udp_zero_csum6_tx = csum; in rtnl_link_vxlan_set_udp_zero_csum6_tx()
1528 vxi->ce_mask |= VXLAN_ATTR_UDP_ZERO_CSUM6_TX; in rtnl_link_vxlan_set_udp_zero_csum6_tx()
1541 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_zero_csum6_tx() local
1545 if (!(vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_TX)) in rtnl_link_vxlan_get_udp_zero_csum6_tx()
1548 return vxi->vxi_udp_zero_csum6_tx; in rtnl_link_vxlan_get_udp_zero_csum6_tx()
1560 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_udp_zero_csum6_rx() local
1564 vxi->vxi_udp_zero_csum6_rx = csum; in rtnl_link_vxlan_set_udp_zero_csum6_rx()
1565 vxi->ce_mask |= VXLAN_ATTR_UDP_ZERO_CSUM6_RX; in rtnl_link_vxlan_set_udp_zero_csum6_rx()
1578 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_udp_zero_csum6_rx() local
1582 if (!(vxi->ce_mask & VXLAN_ATTR_UDP_ZERO_CSUM6_RX)) in rtnl_link_vxlan_get_udp_zero_csum6_rx()
1585 return vxi->vxi_udp_zero_csum6_rx; in rtnl_link_vxlan_get_udp_zero_csum6_rx()
1597 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_remcsum_tx() local
1601 vxi->vxi_remcsum_tx = csum; in rtnl_link_vxlan_set_remcsum_tx()
1602 vxi->ce_mask |= VXLAN_ATTR_REMCSUM_TX; in rtnl_link_vxlan_set_remcsum_tx()
1615 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_remcsum_tx() local
1619 if (!(vxi->ce_mask & VXLAN_ATTR_REMCSUM_TX)) in rtnl_link_vxlan_get_remcsum_tx()
1622 return vxi->vxi_remcsum_tx; in rtnl_link_vxlan_get_remcsum_tx()
1634 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_remcsum_rx() local
1638 vxi->vxi_remcsum_rx = csum; in rtnl_link_vxlan_set_remcsum_rx()
1639 vxi->ce_mask |= VXLAN_ATTR_REMCSUM_RX; in rtnl_link_vxlan_set_remcsum_rx()
1652 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_remcsum_rx() local
1656 if (!(vxi->ce_mask & VXLAN_ATTR_REMCSUM_RX)) in rtnl_link_vxlan_get_remcsum_rx()
1659 return vxi->vxi_remcsum_rx; in rtnl_link_vxlan_get_remcsum_rx()
1671 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_collect_metadata() local
1675 vxi->vxi_collect_metadata = collect; in rtnl_link_vxlan_set_collect_metadata()
1676 vxi->ce_mask |= VXLAN_ATTR_COLLECT_METADATA; in rtnl_link_vxlan_set_collect_metadata()
1689 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_collect_metadata() local
1693 if (!(vxi->ce_mask & VXLAN_ATTR_COLLECT_METADATA)) in rtnl_link_vxlan_get_collect_metadata()
1696 return vxi->vxi_collect_metadata; in rtnl_link_vxlan_get_collect_metadata()
1708 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_label() local
1712 vxi->vxi_label = htonl(label); in rtnl_link_vxlan_set_label()
1713 vxi->ce_mask |= VXLAN_ATTR_LABEL; in rtnl_link_vxlan_set_label()
1727 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_label() local
1734 if (!(vxi->ce_mask & VXLAN_ATTR_LABEL)) in rtnl_link_vxlan_get_label()
1737 *label = ntohl(vxi->vxi_label); in rtnl_link_vxlan_get_label()
1752 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_set_flags() local
1760 vxi->vxi_flags |= flags; in rtnl_link_vxlan_set_flags()
1762 vxi->vxi_flags &= ~flags; in rtnl_link_vxlan_set_flags()
1776 struct vxlan_info *vxi = link->l_info; in rtnl_link_vxlan_get_flags() local
1780 *out_flags = vxi->vxi_flags; in rtnl_link_vxlan_get_flags()