wireless: add network_vlan config attribute
[project/netifd.git] / system.c
index dd9ab50d6e7fb93235b1e25b413ab5150d252e89..32597c14e29145a5187d0642769f6eb5e9458aa7 100644 (file)
--- a/system.c
+++ b/system.c
@@ -38,6 +38,16 @@ static const struct blobmsg_policy vxlan_data_attrs[__VXLAN_DATA_ATTR_MAX] = {
        [VXLAN_DATA_ATTR_MACADDR] = { .name = "macaddr", .type = BLOBMSG_TYPE_STRING },
        [VXLAN_DATA_ATTR_RXCSUM] = { .name = "rxcsum", .type = BLOBMSG_TYPE_BOOL },
        [VXLAN_DATA_ATTR_TXCSUM] = { .name = "txcsum", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_SRCPORTMIN] = { .name = "srcportmin", .type = BLOBMSG_TYPE_INT32 },
+       [VXLAN_DATA_ATTR_SRCPORTMAX] = { .name = "srcportmax", .type = BLOBMSG_TYPE_INT32 },
+       [VXLAN_DATA_ATTR_LEARNING] = { .name = "learning", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_RSC] = { .name = "rsc", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_PROXY] = { .name = "proxy", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_L2MISS] = { .name = "l2miss", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_L3MISS] = { .name = "l3miss", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_GBP] = { .name = "gbp", .type = BLOBMSG_TYPE_BOOL },
+       [VXLAN_DATA_ATTR_AGEING] = { .name = "ageing", .type = BLOBMSG_TYPE_INT32 },
+       [VXLAN_DATA_ATTR_LIMIT] = { .name = "maxaddress", .type = BLOBMSG_TYPE_INT32 },
 };
 
 const struct uci_blob_param_list vxlan_data_attr_list = {
@@ -70,6 +80,15 @@ const struct uci_blob_param_list vti_data_attr_list = {
        .params = vti_data_attrs,
 };
 
+static const struct blobmsg_policy xfrm_data_attrs[__XFRM_DATA_ATTR_MAX] = {
+       [XFRM_DATA_IF_ID] = { .name = "ifid", .type = BLOBMSG_TYPE_INT32 },
+};
+
+const struct uci_blob_param_list xfrm_data_attr_list = {
+       .n_params = __XFRM_DATA_ATTR_MAX,
+       .params = xfrm_data_attrs,
+};
+
 static const struct blobmsg_policy sixrd_data_attrs[__SIXRD_DATA_ATTR_MAX] = {
        [SIXRD_DATA_PREFIX] = { .name = "prefix", .type = BLOBMSG_TYPE_STRING },
        [SIXRD_DATA_RELAY_PREFIX] = { .name = "relay-prefix", .type = BLOBMSG_TYPE_STRING },
@@ -102,6 +121,16 @@ const struct uci_blob_param_list fmr_data_attr_list = {
        .params = fmr_data_attrs,
 };
 
+const char * const bonding_policy_str[__BONDING_MODE_MAX] = {
+       [BONDING_MODE_BALANCE_RR] = "balance-rr",
+       [BONDING_MODE_ACTIVE_BACKUP] = "active-backup",
+       [BONDING_MODE_BALANCE_XOR] = "balance-xor",
+       [BONDING_MODE_BROADCAST] = "broadcast",
+       [BONDING_MODE_8023AD] = "802.3ad",
+       [BONDING_MODE_BALANCE_TLB] = "balance-tlb",
+       [BONDING_MODE_BALANCE_ALB] = "balance-alb",
+};
+
 void system_fd_set_cloexec(int fd)
 {
 #ifdef FD_CLOEXEC