[PATCH 2/3] route/link/vxlan: Rename VXLAN_HAS_ prefix and vxi_mask
David Ahern
dsa at cumulusnetworks.com
Fri Oct 30 15:08:40 PDT 2015
Global search and replace of VXLAN_HAS_ for VXLAN_ATTR_
and vxi_mask for ce_mask. Preparation step for using ATTR_DIFF
infrastructure in a vxlan_compare.
Signed-off-by: Balki Raman <ramanb at cumulusnetworks.com>
Signed-off-by: David Ahern <dsa at cumulusnetworks.com>
---
lib/route/link/vxlan.c | 168 ++++++++++++++++++++++++-------------------------
1 file changed, 84 insertions(+), 84 deletions(-)
diff --git a/lib/route/link/vxlan.c b/lib/route/link/vxlan.c
index 127d2dd81c7a..7e4fe5e30116 100644
--- a/lib/route/link/vxlan.c
+++ b/lib/route/link/vxlan.c
@@ -34,20 +34,20 @@
#include <linux/if_link.h>
/** @cond SKIP */
-#define VXLAN_HAS_ID (1<<0)
-#define VXLAN_HAS_GROUP (1<<1)
-#define VXLAN_HAS_LINK (1<<2)
-#define VXLAN_HAS_LOCAL (1<<3)
-#define VXLAN_HAS_TTL (1<<4)
-#define VXLAN_HAS_TOS (1<<5)
-#define VXLAN_HAS_LEARNING (1<<6)
-#define VXLAN_HAS_AGEING (1<<7)
-#define VXLAN_HAS_LIMIT (1<<8)
-#define VXLAN_HAS_PORT_RANGE (1<<9)
-#define VXLAN_HAS_PROXY (1<<10)
-#define VXLAN_HAS_RSC (1<<11)
-#define VXLAN_HAS_L2MISS (1<<12)
-#define VXLAN_HAS_L3MISS (1<<13)
+#define VXLAN_ATTR_ID (1<<0)
+#define VXLAN_ATTR_GROUP (1<<1)
+#define VXLAN_ATTR_LINK (1<<2)
+#define VXLAN_ATTR_LOCAL (1<<3)
+#define VXLAN_ATTR_TTL (1<<4)
+#define VXLAN_ATTR_TOS (1<<5)
+#define VXLAN_ATTR_LEARNING (1<<6)
+#define VXLAN_ATTR_AGEING (1<<7)
+#define VXLAN_ATTR_LIMIT (1<<8)
+#define VXLAN_ATTR_PORT_RANGE (1<<9)
+#define VXLAN_ATTR_PROXY (1<<10)
+#define VXLAN_ATTR_RSC (1<<11)
+#define VXLAN_ATTR_L2MISS (1<<12)
+#define VXLAN_ATTR_L3MISS (1<<13)
struct vxlan_info
{
@@ -65,7 +65,7 @@ struct vxlan_info
uint8_t vxi_rsc;
uint8_t vxi_l2miss;
uint8_t vxi_l3miss;
- uint32_t vxi_mask;
+ uint32_t ce_mask;
};
/** @endcond */
@@ -122,75 +122,75 @@ static int vxlan_parse(struct rtnl_link *link, struct nlattr *data,
if (tb[IFLA_VXLAN_ID]) {
vxi->vxi_id = nla_get_u32(tb[IFLA_VXLAN_ID]);
- vxi->vxi_mask |= VXLAN_HAS_ID;
+ vxi->ce_mask |= VXLAN_ATTR_ID;
}
if (tb[IFLA_VXLAN_GROUP]) {
nla_memcpy(&vxi->vxi_group, tb[IFLA_VXLAN_GROUP],
sizeof(vxi->vxi_group));
- vxi->vxi_mask |= VXLAN_HAS_GROUP;
+ vxi->ce_mask |= VXLAN_ATTR_GROUP;
}
if (tb[IFLA_VXLAN_LINK]) {
vxi->vxi_link = nla_get_u32(tb[IFLA_VXLAN_LINK]);
- vxi->vxi_mask |= VXLAN_HAS_LINK;
+ vxi->ce_mask |= VXLAN_ATTR_LINK;
}
if (tb[IFLA_VXLAN_LOCAL]) {
nla_memcpy(&vxi->vxi_local, tb[IFLA_VXLAN_LOCAL],
sizeof(vxi->vxi_local));
- vxi->vxi_mask |= VXLAN_HAS_LOCAL;
+ vxi->ce_mask |= VXLAN_ATTR_LOCAL;
}
if (tb[IFLA_VXLAN_TTL]) {
vxi->vxi_ttl = nla_get_u8(tb[IFLA_VXLAN_TTL]);
- vxi->vxi_mask |= VXLAN_HAS_TTL;
+ vxi->ce_mask |= VXLAN_ATTR_TTL;
}
if (tb[IFLA_VXLAN_TOS]) {
vxi->vxi_tos = nla_get_u8(tb[IFLA_VXLAN_TOS]);
- vxi->vxi_mask |= VXLAN_HAS_TOS;
+ vxi->ce_mask |= VXLAN_ATTR_TOS;
}
if (tb[IFLA_VXLAN_LEARNING]) {
vxi->vxi_learning = nla_get_u8(tb[IFLA_VXLAN_LEARNING]);
- vxi->vxi_mask |= VXLAN_HAS_LEARNING;
+ vxi->ce_mask |= VXLAN_ATTR_LEARNING;
}
if (tb[IFLA_VXLAN_AGEING]) {
vxi->vxi_ageing = nla_get_u32(tb[IFLA_VXLAN_AGEING]);
- vxi->vxi_mask |= VXLAN_HAS_AGEING;
+ vxi->ce_mask |= VXLAN_ATTR_AGEING;
}
if (tb[IFLA_VXLAN_LIMIT]) {
vxi->vxi_limit = nla_get_u32(tb[IFLA_VXLAN_LIMIT]);
- vxi->vxi_mask |= VXLAN_HAS_LIMIT;
+ vxi->ce_mask |= VXLAN_ATTR_LIMIT;
}
if (tb[IFLA_VXLAN_PORT_RANGE]) {
nla_memcpy(&vxi->vxi_port_range, tb[IFLA_VXLAN_PORT_RANGE],
sizeof(vxi->vxi_port_range));
- vxi->vxi_mask |= VXLAN_HAS_PORT_RANGE;
+ vxi->ce_mask |= VXLAN_ATTR_PORT_RANGE;
}
if (tb[IFLA_VXLAN_PROXY]) {
vxi->vxi_proxy = nla_get_u8(tb[IFLA_VXLAN_PROXY]);
- vxi->vxi_mask |= VXLAN_HAS_PROXY;
+ vxi->ce_mask |= VXLAN_ATTR_PROXY;
}
if (tb[IFLA_VXLAN_RSC]) {
vxi->vxi_rsc = nla_get_u8(tb[IFLA_VXLAN_RSC]);
- vxi->vxi_mask |= VXLAN_HAS_RSC;
+ vxi->ce_mask |= VXLAN_ATTR_RSC;
}
if (tb[IFLA_VXLAN_L2MISS]) {
vxi->vxi_l2miss = nla_get_u8(tb[IFLA_VXLAN_L2MISS]);
- vxi->vxi_mask |= VXLAN_HAS_L2MISS;
+ vxi->ce_mask |= VXLAN_ATTR_L2MISS;
}
if (tb[IFLA_VXLAN_L3MISS]) {
vxi->vxi_l3miss = nla_get_u8(tb[IFLA_VXLAN_L3MISS]);
- vxi->vxi_mask |= VXLAN_HAS_L3MISS;
+ vxi->ce_mask |= VXLAN_ATTR_L3MISS;
}
err = 0;
@@ -221,7 +221,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, " vxlan-id %u\n", vxi->vxi_id);
- if (vxi->vxi_mask & VXLAN_HAS_GROUP) {
+ if (vxi->ce_mask & VXLAN_ATTR_GROUP) {
nl_dump(p, " group ");
if(inet_ntop(AF_INET, &vxi->vxi_group, addr, sizeof(addr)))
nl_dump_line(p, "%s\n", addr);
@@ -229,7 +229,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_group));
}
- if (vxi->vxi_mask & VXLAN_HAS_LINK) {
+ if (vxi->ce_mask & VXLAN_ATTR_LINK) {
nl_dump(p, " link ");
name = rtnl_link_get_name(link);
if (name)
@@ -238,7 +238,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "%u\n", vxi->vxi_link);
}
- if (vxi->vxi_mask & VXLAN_HAS_LOCAL) {
+ if (vxi->ce_mask & VXLAN_ATTR_LOCAL) {
nl_dump(p, " local ");
if(inet_ntop(AF_INET, &vxi->vxi_local, addr, sizeof(addr)))
nl_dump_line(p, "%s\n", addr);
@@ -246,7 +246,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "%#x\n", ntohs(vxi->vxi_local));
}
- if (vxi->vxi_mask & VXLAN_HAS_TTL) {
+ if (vxi->ce_mask & VXLAN_ATTR_TTL) {
nl_dump(p, " ttl ");
if(vxi->vxi_ttl)
nl_dump_line(p, "%u\n", vxi->vxi_ttl);
@@ -254,7 +254,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "inherit\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_TOS) {
+ if (vxi->ce_mask & VXLAN_ATTR_TOS) {
nl_dump(p, " tos ");
if (vxi->vxi_tos == 1)
nl_dump_line(p, "inherit\n", vxi->vxi_tos);
@@ -262,7 +262,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "%#x\n", vxi->vxi_tos);
}
- if (vxi->vxi_mask & VXLAN_HAS_LEARNING) {
+ if (vxi->ce_mask & VXLAN_ATTR_LEARNING) {
nl_dump(p, " learning ");
if (vxi->vxi_learning)
nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_learning);
@@ -270,7 +270,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "disabled\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_AGEING) {
+ if (vxi->ce_mask & VXLAN_ATTR_AGEING) {
nl_dump(p, " ageing ");
if (vxi->vxi_ageing)
nl_dump_line(p, "%u seconds\n", vxi->vxi_ageing);
@@ -278,7 +278,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "disabled\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_LIMIT) {
+ if (vxi->ce_mask & VXLAN_ATTR_LIMIT) {
nl_dump(p, " limit ");
if (vxi->vxi_limit)
nl_dump_line(p, "%u\n", vxi->vxi_limit);
@@ -286,12 +286,12 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "unlimited\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_PORT_RANGE)
+ if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE)
nl_dump_line(p, " port range %u - %u\n",
ntohs(vxi->vxi_port_range.low),
ntohs(vxi->vxi_port_range.high));
- if (vxi->vxi_mask & VXLAN_HAS_PROXY) {
+ if (vxi->ce_mask & VXLAN_ATTR_PROXY) {
nl_dump(p, " proxy ");
if (vxi->vxi_proxy)
nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_proxy);
@@ -299,7 +299,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "disabled\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_RSC) {
+ if (vxi->ce_mask & VXLAN_ATTR_RSC) {
nl_dump(p, " rsc ");
if (vxi->vxi_rsc)
nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_rsc);
@@ -307,7 +307,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "disabled\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_L2MISS) {
+ if (vxi->ce_mask & VXLAN_ATTR_L2MISS) {
nl_dump(p, " l2miss ");
if (vxi->vxi_l2miss)
nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_l2miss);
@@ -315,7 +315,7 @@ static void vxlan_dump_details(struct rtnl_link *link, struct nl_dump_params *p)
nl_dump_line(p, "disabled\n");
}
- if (vxi->vxi_mask & VXLAN_HAS_L3MISS) {
+ if (vxi->ce_mask & VXLAN_ATTR_L3MISS) {
nl_dump(p, " l3miss ");
if (vxi->vxi_l3miss)
nl_dump_line(p, "enabled (%#x)\n", vxi->vxi_l3miss);
@@ -350,47 +350,47 @@ static int vxlan_put_attrs(struct nl_msg *msg, struct rtnl_link *link)
if (!(data = nla_nest_start(msg, IFLA_INFO_DATA)))
return -NLE_MSGSIZE;
- if (vxi->vxi_mask & VXLAN_HAS_ID)
+ if (vxi->ce_mask & VXLAN_ATTR_ID)
NLA_PUT_U32(msg, IFLA_VXLAN_ID, vxi->vxi_id);
- if (vxi->vxi_mask & VXLAN_HAS_GROUP)
+ if (vxi->ce_mask & VXLAN_ATTR_GROUP)
NLA_PUT(msg, IFLA_VXLAN_GROUP, sizeof(vxi->vxi_group), &vxi->vxi_group);
- if (vxi->vxi_mask & VXLAN_HAS_LINK)
+ if (vxi->ce_mask & VXLAN_ATTR_LINK)
NLA_PUT_U32(msg, IFLA_VXLAN_LINK, vxi->vxi_link);
- if (vxi->vxi_mask & VXLAN_HAS_LOCAL)
+ if (vxi->ce_mask & VXLAN_ATTR_LOCAL)
NLA_PUT(msg, IFLA_VXLAN_LOCAL, sizeof(vxi->vxi_local), &vxi->vxi_local);
- if (vxi->vxi_mask & VXLAN_HAS_TTL)
+ if (vxi->ce_mask & VXLAN_ATTR_TTL)
NLA_PUT_U8(msg, IFLA_VXLAN_TTL, vxi->vxi_ttl);
- if (vxi->vxi_mask & VXLAN_HAS_TOS)
+ if (vxi->ce_mask & VXLAN_ATTR_TOS)
NLA_PUT_U8(msg, IFLA_VXLAN_TOS, vxi->vxi_tos);
- if (vxi->vxi_mask & VXLAN_HAS_LEARNING)
+ if (vxi->ce_mask & VXLAN_ATTR_LEARNING)
NLA_PUT_U8(msg, IFLA_VXLAN_LEARNING, vxi->vxi_learning);
- if (vxi->vxi_mask & VXLAN_HAS_AGEING)
+ if (vxi->ce_mask & VXLAN_ATTR_AGEING)
NLA_PUT_U32(msg, IFLA_VXLAN_AGEING, vxi->vxi_ageing);
- if (vxi->vxi_mask & VXLAN_HAS_LIMIT)
+ if (vxi->ce_mask & VXLAN_ATTR_LIMIT)
NLA_PUT_U32(msg, IFLA_VXLAN_LIMIT, vxi->vxi_limit);
- if (vxi->vxi_mask & VXLAN_HAS_PORT_RANGE)
+ if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE)
NLA_PUT(msg, IFLA_VXLAN_PORT_RANGE, sizeof(vxi->vxi_port_range),
&vxi->vxi_port_range);
- if (vxi->vxi_mask & VXLAN_HAS_PROXY)
+ if (vxi->ce_mask & VXLAN_ATTR_PROXY)
NLA_PUT_U8(msg, IFLA_VXLAN_PROXY, vxi->vxi_proxy);
- if (vxi->vxi_mask & VXLAN_HAS_RSC)
+ if (vxi->ce_mask & VXLAN_ATTR_RSC)
NLA_PUT_U8(msg, IFLA_VXLAN_RSC, vxi->vxi_rsc);
- if (vxi->vxi_mask & VXLAN_HAS_L2MISS)
+ if (vxi->ce_mask & VXLAN_ATTR_L2MISS)
NLA_PUT_U8(msg, IFLA_VXLAN_L2MISS, vxi->vxi_l2miss);
- if (vxi->vxi_mask & VXLAN_HAS_L3MISS)
+ if (vxi->ce_mask & VXLAN_ATTR_L3MISS)
NLA_PUT_U8(msg, IFLA_VXLAN_L3MISS, vxi->vxi_l3miss);
nla_nest_end(msg, data);
@@ -475,7 +475,7 @@ int rtnl_link_vxlan_set_id(struct rtnl_link *link, uint32_t id)
return -NLE_INVAL;
vxi->vxi_id = id;
- vxi->vxi_mask |= VXLAN_HAS_ID;
+ vxi->ce_mask |= VXLAN_ATTR_ID;
return 0;
}
@@ -496,7 +496,7 @@ int rtnl_link_vxlan_get_id(struct rtnl_link *link, uint32_t *id)
if(!id)
return -NLE_INVAL;
- if (vxi->vxi_mask & VXLAN_HAS_ID)
+ if (vxi->ce_mask & VXLAN_ATTR_ID)
*id = vxi->vxi_id;
else
return -NLE_AGAIN;
@@ -523,7 +523,7 @@ int rtnl_link_vxlan_set_group(struct rtnl_link *link, struct nl_addr *addr)
memcpy(&vxi->vxi_group, nl_addr_get_binary_addr(addr),
sizeof(vxi->vxi_group));
- vxi->vxi_mask |= VXLAN_HAS_GROUP;
+ vxi->ce_mask |= VXLAN_ATTR_GROUP;
return 0;
}
@@ -544,7 +544,7 @@ int rtnl_link_vxlan_get_group(struct rtnl_link *link, struct nl_addr **addr)
if (!addr)
return -NLE_INVAL;
- if (!(vxi->vxi_mask & VXLAN_HAS_GROUP))
+ if (!(vxi->ce_mask & VXLAN_ATTR_GROUP))
return -NLE_AGAIN;
*addr = nl_addr_build(AF_INET, &vxi->vxi_group, sizeof(vxi->vxi_group));
@@ -566,7 +566,7 @@ int rtnl_link_vxlan_set_link(struct rtnl_link *link, uint32_t index)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_link = index;
- vxi->vxi_mask |= VXLAN_HAS_LINK;
+ vxi->ce_mask |= VXLAN_ATTR_LINK;
return 0;
}
@@ -587,7 +587,7 @@ int rtnl_link_vxlan_get_link(struct rtnl_link *link, uint32_t *index)
if (!index)
return -NLE_INVAL;
- if (!(vxi->vxi_mask & VXLAN_HAS_LINK))
+ if (!(vxi->ce_mask & VXLAN_ATTR_LINK))
return -NLE_AGAIN;
*index = vxi->vxi_link;
@@ -614,7 +614,7 @@ int rtnl_link_vxlan_set_local(struct rtnl_link *link, struct nl_addr *addr)
memcpy(&vxi->vxi_local, nl_addr_get_binary_addr(addr),
sizeof(vxi->vxi_local));
- vxi->vxi_mask |= VXLAN_HAS_LOCAL;
+ vxi->ce_mask |= VXLAN_ATTR_LOCAL;
return 0;
}
@@ -635,7 +635,7 @@ int rtnl_link_vxlan_get_local(struct rtnl_link *link, struct nl_addr **addr)
if (!addr)
return -NLE_INVAL;
- if (!(vxi->vxi_mask & VXLAN_HAS_LOCAL))
+ if (!(vxi->ce_mask & VXLAN_ATTR_LOCAL))
return -NLE_AGAIN;
*addr = nl_addr_build(AF_INET, &vxi->vxi_local, sizeof(vxi->vxi_local));
@@ -657,7 +657,7 @@ int rtnl_link_vxlan_set_ttl(struct rtnl_link *link, uint8_t ttl)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_ttl = ttl;
- vxi->vxi_mask |= VXLAN_HAS_TTL;
+ vxi->ce_mask |= VXLAN_ATTR_TTL;
return 0;
}
@@ -674,7 +674,7 @@ int rtnl_link_vxlan_get_ttl(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_TTL))
+ if (!(vxi->ce_mask & VXLAN_ATTR_TTL))
return -NLE_AGAIN;
return vxi->vxi_ttl;
@@ -694,7 +694,7 @@ int rtnl_link_vxlan_set_tos(struct rtnl_link *link, uint8_t tos)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_tos = tos;
- vxi->vxi_mask |= VXLAN_HAS_TOS;
+ vxi->ce_mask |= VXLAN_ATTR_TOS;
return 0;
}
@@ -711,7 +711,7 @@ int rtnl_link_vxlan_get_tos(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_TOS))
+ if (!(vxi->ce_mask & VXLAN_ATTR_TOS))
return -NLE_AGAIN;
return vxi->vxi_tos;
@@ -731,7 +731,7 @@ int rtnl_link_vxlan_set_learning(struct rtnl_link *link, uint8_t learning)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_learning = learning;
- vxi->vxi_mask |= VXLAN_HAS_LEARNING;
+ vxi->ce_mask |= VXLAN_ATTR_LEARNING;
return 0;
}
@@ -748,7 +748,7 @@ int rtnl_link_vxlan_get_learning(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_LEARNING))
+ if (!(vxi->ce_mask & VXLAN_ATTR_LEARNING))
return -NLE_AGAIN;
return vxi->vxi_learning;
@@ -790,7 +790,7 @@ int rtnl_link_vxlan_set_ageing(struct rtnl_link *link, uint32_t expiry)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_ageing = expiry;
- vxi->vxi_mask |= VXLAN_HAS_AGEING;
+ vxi->ce_mask |= VXLAN_ATTR_AGEING;
return 0;
}
@@ -811,7 +811,7 @@ int rtnl_link_vxlan_get_ageing(struct rtnl_link *link, uint32_t *expiry)
if (!expiry)
return -NLE_INVAL;
- if (vxi->vxi_mask & VXLAN_HAS_AGEING)
+ if (vxi->ce_mask & VXLAN_ATTR_AGEING)
*expiry = vxi->vxi_ageing;
else
return -NLE_AGAIN;
@@ -833,7 +833,7 @@ int rtnl_link_vxlan_set_limit(struct rtnl_link *link, uint32_t limit)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_limit = limit;
- vxi->vxi_mask |= VXLAN_HAS_LIMIT;
+ vxi->ce_mask |= VXLAN_ATTR_LIMIT;
return 0;
}
@@ -854,7 +854,7 @@ int rtnl_link_vxlan_get_limit(struct rtnl_link *link, uint32_t *limit)
if (!limit)
return -NLE_INVAL;
- if (vxi->vxi_mask & VXLAN_HAS_LIMIT)
+ if (vxi->ce_mask & VXLAN_ATTR_LIMIT)
*limit = vxi->vxi_limit;
else
return -NLE_AGAIN;
@@ -880,7 +880,7 @@ int rtnl_link_vxlan_set_port_range(struct rtnl_link *link,
return -NLE_INVAL;
memcpy(&vxi->vxi_port_range, range, sizeof(vxi->vxi_port_range));
- vxi->vxi_mask |= VXLAN_HAS_PORT_RANGE;
+ vxi->ce_mask |= VXLAN_ATTR_PORT_RANGE;
return 0;
}
@@ -902,7 +902,7 @@ int rtnl_link_vxlan_get_port_range(struct rtnl_link *link,
if (!range)
return -NLE_INVAL;
- if (vxi->vxi_mask & VXLAN_HAS_PORT_RANGE)
+ if (vxi->ce_mask & VXLAN_ATTR_PORT_RANGE)
memcpy(range, &vxi->vxi_port_range, sizeof(*range));
else
return -NLE_AGAIN;
@@ -924,7 +924,7 @@ int rtnl_link_vxlan_set_proxy(struct rtnl_link *link, uint8_t proxy)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_proxy = proxy;
- vxi->vxi_mask |= VXLAN_HAS_PROXY;
+ vxi->ce_mask |= VXLAN_ATTR_PROXY;
return 0;
}
@@ -941,7 +941,7 @@ int rtnl_link_vxlan_get_proxy(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_PROXY))
+ if (!(vxi->ce_mask & VXLAN_ATTR_PROXY))
return -NLE_AGAIN;
return vxi->vxi_proxy;
@@ -983,7 +983,7 @@ int rtnl_link_vxlan_set_rsc(struct rtnl_link *link, uint8_t rsc)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_rsc = rsc;
- vxi->vxi_mask |= VXLAN_HAS_RSC;
+ vxi->ce_mask |= VXLAN_ATTR_RSC;
return 0;
}
@@ -1000,7 +1000,7 @@ int rtnl_link_vxlan_get_rsc(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_RSC))
+ if (!(vxi->ce_mask & VXLAN_ATTR_RSC))
return -NLE_AGAIN;
return vxi->vxi_rsc;
@@ -1042,7 +1042,7 @@ int rtnl_link_vxlan_set_l2miss(struct rtnl_link *link, uint8_t miss)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_l2miss = miss;
- vxi->vxi_mask |= VXLAN_HAS_L2MISS;
+ vxi->ce_mask |= VXLAN_ATTR_L2MISS;
return 0;
}
@@ -1059,7 +1059,7 @@ int rtnl_link_vxlan_get_l2miss(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_L2MISS))
+ if (!(vxi->ce_mask & VXLAN_ATTR_L2MISS))
return -NLE_AGAIN;
return vxi->vxi_l2miss;
@@ -1101,7 +1101,7 @@ int rtnl_link_vxlan_set_l3miss(struct rtnl_link *link, uint8_t miss)
IS_VXLAN_LINK_ASSERT(link);
vxi->vxi_l3miss = miss;
- vxi->vxi_mask |= VXLAN_HAS_L3MISS;
+ vxi->ce_mask |= VXLAN_ATTR_L3MISS;
return 0;
}
@@ -1118,7 +1118,7 @@ int rtnl_link_vxlan_get_l3miss(struct rtnl_link *link)
IS_VXLAN_LINK_ASSERT(link);
- if (!(vxi->vxi_mask & VXLAN_HAS_L3MISS))
+ if (!(vxi->ce_mask & VXLAN_ATTR_L3MISS))
return -NLE_AGAIN;
return vxi->vxi_l3miss;
--
2.1.4
More information about the libnl
mailing list