summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-10-23 15:23:09 +0000
committerGerrit Code Review <gerrit@fd.io>2019-10-23 15:23:09 +0000
commitcf3d6ef0cbda50c9917421213a77097250f3d67b (patch)
tree1cff039e162cd21a192cce43d3bf7b834ca43c94
parentfba3b02aecd0c20af67b37e9e55e28158e7fc800 (diff)
parentb8eca5937fc110e85d426cefba4feff00a20a04a (diff)
Merge "[HICN-350] Minor cleanup in control API"
-rw-r--r--ctrl/facemgr/src/interfaces/hicn_light/hicn_light.c4
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h10
-rw-r--r--ctrl/libhicnctrl/src/api.c40
-rw-r--r--ctrl/libhicnctrl/src/cli.c4
-rw-r--r--hicn-light/src/hicn/config/configuration.c8
-rw-r--r--hicn-light/src/hicn/config/configurationListeners.c10
-rw-r--r--hicn-light/src/hicn/config/controlAddListener.c2
-rw-r--r--hicn-light/src/hicn/config/controlListListeners.c12
-rw-r--r--hicn-light/src/hicn/config/controlRemoveListener.c2
-rw-r--r--hicn-light/src/hicn/utils/commands.h34
10 files changed, 65 insertions, 61 deletions
diff --git a/ctrl/facemgr/src/interfaces/hicn_light/hicn_light.c b/ctrl/facemgr/src/interfaces/hicn_light/hicn_light.c
index 3ebbee4a1..2fdc3f7c3 100644
--- a/ctrl/facemgr/src/interfaces/hicn_light/hicn_light.c
+++ b/ctrl/facemgr/src/interfaces/hicn_light/hicn_light.c
@@ -221,8 +221,8 @@ int hl_on_event(interface_t * interface, const facelet_t * facelet)
ERROR("Face to update has not been found");
goto ERR;
}
- char conn_id_or_name[NAME_LEN];
- snprintf(conn_id_or_name, NAME_LEN, "%d", face_found->id);
+ char conn_id_or_name[SYMBOLIC_NAME_LEN];
+ snprintf(conn_id_or_name, SYMBOLIC_NAME_LEN, "%d", face_found->id);
free(face_found);
printf("Face id = %d\n", face_found->id);
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index 07c98514d..c1db751fb 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -380,9 +380,9 @@ int hc_sock_reset(hc_sock_t * s);
#define NULLTERM 1
#endif
-#define NAME_LEN 16 /* NULL-terminated right ? */
+#define SYMBOLIC_NAME_LEN 16 /* NULL-terminated right ? */
#define INTERFACE_LEN 16
-#define MAXSZ_HC_NAME_ NAME_LEN
+#define MAXSZ_HC_NAME_ SYMBOLIC_NAME_LEN
#define MAXSZ_HC_NAME MAXSZ_HC_NAME_ + NULLTERM
#define MAXSZ_HC_ID_ 10 /* Number of digits for MAX_INT */
@@ -445,7 +445,7 @@ typedef int (*HC_PARSE)(const u8 *, u8 *);
// FIXME the listener should not require any port for hICN...
typedef struct {
- char name[NAME_LEN]; /* K.w */ // XXX clarify what used for
+ char name[SYMBOLIC_NAME_LEN]; /* K.w */ // XXX clarify what used for
char interface_name[INTERFACE_LEN]; /* Kr. */
u32 id;
hc_connection_type_t type; /* .rw */
@@ -485,7 +485,7 @@ int hc_listener_snprintf(char * s, size_t size, hc_listener_t * listener);
*/
typedef struct {
u32 id; /* Kr. */
- char name[NAME_LEN]; /* K.w */
+ char name[SYMBOLIC_NAME_LEN]; /* K.w */
char interface_name[INTERFACE_LEN]; /* Kr. */
hc_connection_type_t type; /* .rw */
int family; /* .rw */
@@ -547,7 +547,7 @@ int hc_connection_snprintf(char * s, size_t size, const hc_connection_t * connec
typedef struct {
u8 id;
- char name[NAME_LEN];
+ char name[SYMBOLIC_NAME_LEN];
face_t face; // or embed ?
//face_id_t parent; /* Pointer from connection to listener */
} hc_face_t;
diff --git a/ctrl/libhicnctrl/src/api.c b/ctrl/libhicnctrl/src/api.c
index aa1ec8edd..983dd9b5e 100644
--- a/ctrl/libhicnctrl/src/api.c
+++ b/ctrl/libhicnctrl/src/api.c
@@ -913,7 +913,7 @@ _hc_listener_create(hc_sock_t * s, hc_listener_t * listener, bool async)
}
};
- snprintf(msg.payload.symbolic, NAME_LEN, "%s", listener->name);
+ snprintf(msg.payload.symbolic, SYMBOLIC_NAME_LEN, "%s", listener->name);
snprintf(msg.payload.interfaceName, INTERFACE_LEN, "%s", listener->interface_name);
hc_command_params_t params = {
@@ -990,16 +990,16 @@ _hc_listener_delete(hc_sock_t * s, hc_listener_t * listener, bool async)
};
if (listener->id) {
- snprintf(msg.payload.symbolicOrListenerid, NAME_LEN, "%d", listener->id);
+ snprintf(msg.payload.symbolicOrListenerid, SYMBOLIC_NAME_LEN, "%d", listener->id);
} else if (*listener->name) {
- snprintf(msg.payload.symbolicOrListenerid, NAME_LEN, "%s", listener->name);
+ snprintf(msg.payload.symbolicOrListenerid, SYMBOLIC_NAME_LEN, "%s", listener->name);
} else {
hc_listener_t * listener_found;
if (hc_listener_get(s, listener, &listener_found) < 0)
return -1;
if (!listener_found)
return -1;
- snprintf(msg.payload.symbolicOrListenerid, NAME_LEN, "%d", listener_found->id);
+ snprintf(msg.payload.symbolicOrListenerid, SYMBOLIC_NAME_LEN, "%d", listener_found->id);
free(listener_found);
}
@@ -1122,7 +1122,7 @@ hc_listener_parse(void * in, hc_listener_t * listener)
.local_addr = UNION_CAST(cmd->address, ip_address_t),
.local_port = ntohs(cmd->port),
};
- snprintf(listener->name, NAME_LEN, "%s", cmd->listenerName);
+ snprintf(listener->name, SYMBOLIC_NAME_LEN, "%s", cmd->listenerName);
snprintf(listener->interface_name, INTERFACE_LEN, "%s", cmd->interfaceName);
return 0;
}
@@ -1184,7 +1184,7 @@ _hc_connection_create(hc_sock_t * s, hc_connection_t * connection, bool async)
.connectionType = (u8)map_to_connection_type[connection->type],
}
};
- snprintf(msg.payload.symbolic, NAME_LEN, "%s", connection->name);
+ snprintf(msg.payload.symbolic, SYMBOLIC_NAME_LEN, "%s", connection->name);
hc_command_params_t params = {
.cmd = ACTION_CREATE,
@@ -1260,16 +1260,16 @@ _hc_connection_delete(hc_sock_t * s, hc_connection_t * connection, bool async)
};
if (connection->id) {
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%d", connection->id);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%d", connection->id);
} else if (*connection->name) {
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%s", connection->name);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%s", connection->name);
} else {
hc_connection_t * connection_found;
if (hc_connection_get(s, connection, &connection_found) < 0)
return -1;
if (!connection_found)
return -1;
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%d", connection_found->id);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%d", connection_found->id);
free(connection_found);
}
@@ -1412,7 +1412,7 @@ hc_connection_parse(void * in, hc_connection_t * connection)
#endif /* WITH_POLICY */
.state = state,
};
- snprintf(connection->name, NAME_LEN, "%s", cmd->connectionData.symbolic);
+ snprintf(connection->name, SYMBOLIC_NAME_LEN, "%s", cmd->connectionData.symbolic);
snprintf(connection->interface_name, INTERFACE_LEN, "%s", cmd->interfaceName);
return 0;
}
@@ -1468,7 +1468,7 @@ _hc_connection_set_admin_state(hc_sock_t * s, const char * conn_id_or_name,
.admin_state = state,
},
};
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%s", conn_id_or_name);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%s", conn_id_or_name);
hc_command_params_t params = {
.cmd = ACTION_SET,
@@ -1530,7 +1530,7 @@ _hc_route_create(hc_sock_t * s, hc_route_t * route, bool async)
* The route commands expects the ID (or name that we don't use) as part of
* the symbolicOrConnid attribute.
*/
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%d", route->face_id);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%d", route->face_id);
hc_command_params_t params = {
.cmd = ACTION_CREATE,
@@ -1756,7 +1756,7 @@ hc_face_to_connection(const hc_face_t * face, hc_connection_t * connection, bool
.tags = f->tags,
#endif /* WITH_POLICY */
};
- snprintf(connection->name, NAME_LEN, "%s",
+ snprintf(connection->name, SYMBOLIC_NAME_LEN, "%s",
f->netdevice.name);
snprintf(connection->interface_name, INTERFACE_LEN, "%s",
f->netdevice.name);
@@ -1776,9 +1776,9 @@ hc_face_to_connection(const hc_face_t * face, hc_connection_t * connection, bool
#endif /* WITH_POLICY */
};
if (generate_name) {
- snprintf(connection->name, NAME_LEN, "tcp%u", RANDBYTE());
+ snprintf(connection->name, SYMBOLIC_NAME_LEN, "tcp%u", RANDBYTE());
} else {
- memset(connection->name, 0, NAME_LEN);
+ memset(connection->name, 0, SYMBOLIC_NAME_LEN);
}
snprintf(connection->interface_name, INTERFACE_LEN, "%s",
f->netdevice.name);
@@ -1798,9 +1798,9 @@ hc_face_to_connection(const hc_face_t * face, hc_connection_t * connection, bool
#endif /* WITH_POLICY */
};
if (generate_name) {
- snprintf(connection->name, NAME_LEN, "udp%u", RANDBYTE());
+ snprintf(connection->name, SYMBOLIC_NAME_LEN, "udp%u", RANDBYTE());
} else {
- memset(connection->name, 0, NAME_LEN);
+ memset(connection->name, 0, SYMBOLIC_NAME_LEN);
}
snprintf(connection->interface_name, INTERFACE_LEN, "%s",
f->netdevice.name);
@@ -1879,7 +1879,7 @@ hc_connection_to_face(const hc_connection_t * connection, hc_face_t * face)
}
face->face.netdevice.name[0] = '\0';
face->face.netdevice.index = 0;
- snprintf(face->name, NAME_LEN, "%s", connection->name);
+ snprintf(face->name, SYMBOLIC_NAME_LEN, "%s", connection->name);
snprintf(face->face.netdevice.name, INTERFACE_LEN, "%s", connection->interface_name);
netdevice_update_index(&face->face.netdevice);
return 0;
@@ -1897,7 +1897,7 @@ hc_connection_to_local_listener(const hc_connection_t * connection, hc_listener_
.local_addr = connection->local_addr,
.local_port = connection->local_port,
};
- snprintf(listener->name, NAME_LEN, "lst%u", RANDBYTE()); // generate name
+ snprintf(listener->name, SYMBOLIC_NAME_LEN, "lst%u", RANDBYTE()); // generate name
snprintf(listener->interface_name, INTERFACE_LEN, "%s", connection->interface_name);
return 0;
}
@@ -2238,7 +2238,7 @@ _hc_punting_create(hc_sock_t * s, hc_punting_t * punting, bool async)
.len = punting->prefix_len,
}
};
- snprintf(msg.payload.symbolicOrConnid, NAME_LEN, "%d", punting->face_id);
+ snprintf(msg.payload.symbolicOrConnid, SYMBOLIC_NAME_LEN, "%d", punting->face_id);
hc_command_params_t params = {
.cmd = ACTION_CREATE,
diff --git a/ctrl/libhicnctrl/src/cli.c b/ctrl/libhicnctrl/src/cli.c
index 6798b5aec..b8e90f40e 100644
--- a/ctrl/libhicnctrl/src/cli.c
+++ b/ctrl/libhicnctrl/src/cli.c
@@ -147,7 +147,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
switch(command->action) {
case ACTION_CREATE:
/* NAME TYPE LOCAL_ADDRESS LOCAL_PORT */
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
// conn type
command->listener.type = connection_type_from_str(argv[optind++]);
if (command->listener.type == CONNECTION_TYPE_UNDEFINED)
@@ -174,7 +174,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
switch(command->action) {
case ACTION_CREATE:
/* NAME TYPE LOCAL_ADDRESS LOCAL_PORT REMOTE_ADDRESS REMOTE_PORT */
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->connection.type = connection_type_from_str(argv[optind++]);
if (command->connection.type == CONNECTION_TYPE_UNDEFINED)
goto ERR_PARAM;
diff --git a/hicn-light/src/hicn/config/configuration.c b/hicn-light/src/hicn/config/configuration.c
index 2b63a32a0..4771c4073 100644
--- a/hicn-light/src/hicn/config/configuration.c
+++ b/hicn-light/src/hicn/config/configuration.c
@@ -688,10 +688,10 @@ struct iovec *configuration_ProcessConnectionList(Configuration *config,
listConnectionsCommand->connid = connection_GetConnectionId(original);
const char *connectionName = symbolicNameTable_GetNameByIndex(config->symbolicNameTable, connection_GetConnectionId(original));
- snprintf(listConnectionsCommand->connectionName, 16, "%s", connectionName);
+ snprintf(listConnectionsCommand->connectionName, SYMBOLIC_NAME_LEN, "%s", connectionName);
_strlwr(listConnectionsCommand->connectionName);
- snprintf(listConnectionsCommand->interfaceName, 16, "%s", ioOperations_GetInterfaceName(connection_GetIoOperations(original)));
+ snprintf(listConnectionsCommand->interfaceName, SYMBOLIC_NAME_LEN, "%s", ioOperations_GetInterfaceName(connection_GetIoOperations(original)));
listConnectionsCommand->state =
connection_IsUp(original) ? IFACE_UP : IFACE_DOWN;
@@ -801,11 +801,11 @@ struct iovec *configuration_ProcessListenersList(Configuration *config,
}
const char * listenerName = listenerEntry->getListenerName(listenerEntry);
- snprintf(listListenersCommand->listenerName, 16, "%s", listenerName);
+ snprintf(listListenersCommand->listenerName, SYMBOLIC_NAME_LEN, "%s", listenerName);
if (listenerEntry->getEncapType(listenerEntry) == ENCAP_TCP ||
listenerEntry->getEncapType(listenerEntry) == ENCAP_UDP) {
const char * interfaceName = listenerEntry->getInterfaceName(listenerEntry);
- snprintf(listListenersCommand->interfaceName, 16, "%s", interfaceName);
+ snprintf(listListenersCommand->interfaceName, SYMBOLIC_NAME_LEN, "%s", interfaceName);
}
}
diff --git a/hicn-light/src/hicn/config/configurationListeners.c b/hicn-light/src/hicn/config/configurationListeners.c
index c321007e2..8abbeb781 100644
--- a/hicn-light/src/hicn/config/configurationListeners.c
+++ b/hicn-light/src/hicn/config/configurationListeners.c
@@ -595,11 +595,11 @@ void configurationListeners_SetupAll(const Configuration *config, uint16_t port,
const Address *address = addressListGetItem(addresses, j);
// Do not start on link address
- char listenerName[16];
+ char listenerName[SYMBOLIC_NAME_LEN];
#ifdef __ANDROID__
- snprintf(listenerName, 16, "local_%zu", i);
+ snprintf(listenerName, SYMBOLIC_NAME_LEN, "local_%zu", i);
#else
- snprintf(listenerName, 16, "local_%ld", i);
+ snprintf(listenerName, SYMBOLIC_NAME_LEN, "local_%ld", i);
#endif
if (addressGetType(address) != ADDR_LINK) {
_setupListenersOnAddress(forwarder, listenerName, address, port,
@@ -617,8 +617,8 @@ void configurationListeners_SetutpLocalIPv4(const Configuration *config,
in_addr_t addr = inet_addr("127.0.0.1");
uint16_t network_byte_order_port = htons(port);
- char listenerNameUdp[16] = "lo_udp";
- char listenerNameTcp[16] = "lo_tcp";
+ char listenerNameUdp[SYMBOLIC_NAME_LEN] = "lo_udp";
+ char listenerNameTcp[SYMBOLIC_NAME_LEN] = "lo_tcp";
char *loopback_interface = "lo";
_setupUdpListenerOnInet(forwarder, listenerNameUdp,(ipv4_addr_t *)&(addr),
&network_byte_order_port, loopback_interface);
diff --git a/hicn-light/src/hicn/config/controlAddListener.c b/hicn-light/src/hicn/config/controlAddListener.c
index cfd061131..1a94ff252 100644
--- a/hicn-light/src/hicn/config/controlAddListener.c
+++ b/hicn-light/src/hicn/config/controlAddListener.c
@@ -120,7 +120,7 @@ static CommandReturn _CreateListener(CommandParser *parser, CommandOps *ops,
}
// Fill remaining payload fields
- memcpy(addListenerCommand->interfaceName, interfaceName, 16);
+ memcpy(addListenerCommand->interfaceName, interfaceName, SYMBOLIC_NAME_LEN);
addListenerCommand->listenerMode = mode;
addListenerCommand->connectionType = type;
addListenerCommand->port = htons((uint16_t)atoi(port));
diff --git a/hicn-light/src/hicn/config/controlListListeners.c b/hicn-light/src/hicn/config/controlListListeners.c
index 5be7b0a9b..1489470a8 100644
--- a/hicn-light/src/hicn/config/controlListListeners.c
+++ b/hicn-light/src/hicn/config/controlListListeners.c
@@ -95,7 +95,7 @@ static CommandReturn _controlListListeners_Execute(CommandParser *parser,
char *addrString = NULL;
if (receivedHeader->length > 0) {
- printf("%6.6s %16s %50.70s %6s %10s\n", "iface", "name", "address", "type", "interface");
+ printf("%6.6s %.*s %50.70s %6s %10s\n", "iface", SYMBOLIC_NAME_LEN, "name", "address", "type", "interface");
} else {
printf(" --- No entry in the list \n");
@@ -114,15 +114,17 @@ static CommandReturn _controlListListeners_Execute(CommandParser *parser,
if (strcmp(listenerType[listListenersCommand->encapType], "UDP") == 0 ||
strcmp(listenerType[listListenersCommand->encapType], "TCP") == 0) {
- parcBufferComposer_Format(composer, "%6u %16s %50.70s %6s %10s",
+ parcBufferComposer_Format(composer, "%6u %.*s %50.70s %6s %10s",
listListenersCommand->connid,
- listListenersCommand->listenerName,addrString,
+ SYMBOLIC_NAME_LEN, listListenersCommand->listenerName,
+ addrString,
listenerType[listListenersCommand->encapType],
listListenersCommand->interfaceName);
} else {
- parcBufferComposer_Format(composer, "%6u %16s %50.70s %6s",
+ parcBufferComposer_Format(composer, "%6u %.*s %50.70s %6s",
listListenersCommand->connid,
- listListenersCommand->listenerName,addrString,
+ SYMBOLIC_NAME_LEN, listListenersCommand->listenerName,
+ addrString,
listenerType[listListenersCommand->encapType]);
}
diff --git a/hicn-light/src/hicn/config/controlRemoveListener.c b/hicn-light/src/hicn/config/controlRemoveListener.c
index 50581a8d9..545e189c0 100644
--- a/hicn-light/src/hicn/config/controlRemoveListener.c
+++ b/hicn-light/src/hicn/config/controlRemoveListener.c
@@ -99,7 +99,7 @@ if (!utils_ValidateSymbolicName(listenerId) &&
parcMemory_AllocateAndClear(sizeof(remove_listener_command));
// fill payload
//removeListenerCommand->listenerId = atoi(listenerId);
- strncpy(removeListenerCommand->symbolicOrListenerid, listenerId, strlen(listenerId));
+ snprintf(removeListenerCommand->symbolicOrListenerid, SYMBOLIC_NAME_LEN, "%s", listenerId);
// send message and receive response
struct iovec *response =
diff --git a/hicn-light/src/hicn/utils/commands.h b/hicn-light/src/hicn/utils/commands.h
index 1a313de6a..60d4cd5fa 100644
--- a/hicn-light/src/hicn/utils/commands.h
+++ b/hicn-light/src/hicn/utils/commands.h
@@ -35,6 +35,8 @@
#include <hicn/policy.h>
#endif /* WITH_POLICY */
+#define SYMBOLIC_NAME_LEN 16
+
typedef struct in6_addr ipv6_addr_t;
typedef uint32_t ipv4_addr_t;
@@ -115,8 +117,8 @@ typedef struct {
typedef enum { ETHER_MODE, IP_MODE, HICN_MODE } listener_mode;
typedef struct {
- char symbolic[16];
- char interfaceName[16];
+ char symbolic[SYMBOLIC_NAME_LEN];
+ char interfaceName[SYMBOLIC_NAME_LEN];
union commandAddr address;
uint16_t port;
// uint16_t etherType;
@@ -130,8 +132,8 @@ typedef struct {
//========== [01] ADD CONNECTION ==========
typedef struct {
- char symbolic[16];
- //char interfaceName[16];
+ char symbolic[SYMBOLIC_NAME_LEN];
+ //char interfaceName[SYMBOLIC_NAME_LEN];
union commandAddr remoteIp;
union commandAddr localIp;
uint16_t remotePort;
@@ -168,8 +170,8 @@ typedef struct {
uint32_t connid;
uint8_t state;
uint8_t admin_state;
- char interfaceName[16];
- char connectionName[16];
+ char interfaceName[SYMBOLIC_NAME_LEN];
+ char connectionName[SYMBOLIC_NAME_LEN];
} list_connections_command;
// SIZE=80
@@ -177,7 +179,7 @@ typedef struct {
//========== [03] ADD ROUTE ==========
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
union commandAddr address;
uint16_t cost;
uint8_t addressType;
@@ -200,12 +202,12 @@ typedef struct {
//========== [05] REMOVE CONNECTION ==========
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
} remove_connection_command;
//========== [06] REMOVE LISTENER ==========
typedef struct {
- char symbolicOrListenerid[16];
+ char symbolicOrListenerid[SYMBOLIC_NAME_LEN];
} remove_listener_command;
// SIZE=16
@@ -213,7 +215,7 @@ typedef struct {
//========== [07] REMOVE ROUTE ==========
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
union commandAddr address;
uint8_t addressType;
uint8_t len;
@@ -259,7 +261,7 @@ typedef struct {
//========== [11] SET WLDR ==========
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
uint8_t activate;
} set_wldr_command;
@@ -268,7 +270,7 @@ typedef struct {
//========== [12] ADD PUNTING ==========
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
union commandAddr address;
uint8_t addressType;
uint8_t len;
@@ -280,8 +282,8 @@ typedef struct {
typedef struct {
union commandAddr address;
- char listenerName[16];
- char interfaceName[16];
+ char listenerName[SYMBOLIC_NAME_LEN];
+ char interfaceName[SYMBOLIC_NAME_LEN];
uint32_t connid;
uint16_t port;
uint8_t addressType;
@@ -307,7 +309,7 @@ typedef struct {
// SIZE=1
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
uint8_t admin_state;
uint16_t pad16;
} connection_set_admin_state_command;
@@ -335,7 +337,7 @@ typedef struct {
} remove_policy_command;
typedef struct {
- char symbolicOrConnid[16];
+ char symbolicOrConnid[SYMBOLIC_NAME_LEN];
uint8_t admin_state;
policy_tags_t tags;
} update_connection_command;