aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-10-23 22:47:10 +0000
committerGerrit Code Review <gerrit@fd.io>2019-10-23 22:47:10 +0000
commitbfa10d1d349d52b00997db0118468c2cdbb8bf15 (patch)
tree703b0b8464d4ccbfc5b07de241c68ba25e3d8a27 /ctrl/libhicnctrl/src
parent3bb2c48270045fb050266e393c14da55c921d880 (diff)
parent4f195f8ce71793e84934d9cb7455dc38097c4749 (diff)
Merge "[HICN-351] Support for new RemoveListener API in libhicnctrl + added missing commands in CLI"
Diffstat (limited to 'ctrl/libhicnctrl/src')
-rw-r--r--ctrl/libhicnctrl/src/cli.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ctrl/libhicnctrl/src/cli.c b/ctrl/libhicnctrl/src/cli.c
index edaa93057..81400f8ee 100644
--- a/ctrl/libhicnctrl/src/cli.c
+++ b/ctrl/libhicnctrl/src/cli.c
@@ -219,7 +219,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
goto ERR_PARAM;
}
/* NAME will be autogenerated (and currently not used) */
- //snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ //snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->face.face.type = face_type_from_str(argv[optind++]);
if (command->face.face.type == FACE_TYPE_UNDEFINED)
goto ERR_PARAM;
@@ -253,9 +253,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->face.id = atoi(argv[optind++]);
- snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
//} else if (is_symbolic_name(argv[optind])) {
- // snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ // snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;
@@ -319,7 +319,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
fprintf(stderr, "%s -l NAME TYPE LOCAL_ADDRESS LOCAL_PORT [INTERFACE_NAME]\n", argv[0]);
goto ERR_PARAM;
}
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->listener.type = connection_type_from_str(argv[optind++]);
if (command->listener.type == CONNECTION_TYPE_UNDEFINED)
goto ERR_PARAM;
@@ -347,9 +347,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->listener.id = atoi(argv[optind++]);
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else if (is_symbolic_name(argv[optind])) {
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;
@@ -385,7 +385,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
fprintf(stderr, "%s -c NAME TYPE LOCAL_ADDRESS LOCAL_PORT REMOTE_ADDRESS REMOTE_PORT [INTERFACE_NAME]\n", argv[0]);
goto ERR_PARAM;
}
- 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;
@@ -416,9 +416,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->connection.id = atoi(argv[optind++]);
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else if (is_symbolic_name(argv[optind])) {
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;