aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl/libhicnctrl')
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h2
-rw-r--r--ctrl/libhicnctrl/src/cli.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index 4a458c0ef..62cf98927 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -571,7 +571,7 @@ int hc_face_list_async(hc_sock_t * s); //, hc_data_t ** pdata);
#define MAX_FACE_ID 255
#define MAXSZ_FACE_ID_ 3
#define MAXSZ_FACE_ID MAXSZ_FACE_ID_ + NULLTERM
-#define MAXSZ_FACE_NAME_ NAME_LEN
+#define MAXSZ_FACE_NAME_ SYMBOLIC_NAME_LEN
#define MAXSZ_FACE_NAME MAXSZ_FACE_NAME_ + NULLTERM
#define MAXSZ_HC_FACE_ MAXSZ_FACE_ID_ + MAXSZ_FACE_NAME_ + MAXSZ_FACE_ + 5
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;