From 0a1c6b5565e20167d1f1f33a5a8b597f420b18b0 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Fri, 26 Jul 2019 23:20:30 +0200 Subject: [HICN-252] Add per-application policy framework to hicn-light forwarder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0531cd7a7de179581295ae34766c81cd9cf3e172 Signed-off-by: Jordan Augé Signed-off-by: Mauro Sardara Co-authored-by: Mauro Sardara --- hicn-light/src/hicn/command_line/controller/CMakeLists.txt | 1 + .../src/hicn/command_line/controller/hicnLightControl_main.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'hicn-light/src/hicn/command_line/controller') diff --git a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt index c0a584dae..405654052 100644 --- a/hicn-light/src/hicn/command_line/controller/CMakeLists.txt +++ b/hicn-light/src/hicn/command_line/controller/CMakeLists.txt @@ -20,4 +20,5 @@ build_executable(${HICN_LIGHT_CONTROL} LINK_LIBRARIES ${HICN_LIGHT_LINK_LIBRARIES} DEPENDS ${LIBHICN_LIGHT_STATIC} COMPONENT ${HICN_LIGHT} + DEFINITIONS ${COMPILER_DEFINITIONS} ) diff --git a/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c b/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c index 8cbccde34..f704d237e 100644 --- a/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c +++ b/hicn-light/src/hicn/command_line/controller/hicnLightControl_main.c @@ -74,7 +74,15 @@ static int payloadLengthController[LAST_COMMAND_VALUE] = { sizeof(mapme_activator_command), sizeof(mapme_activator_command), sizeof(mapme_timing_command), - sizeof(mapme_timing_command)}; + sizeof(mapme_timing_command), + sizeof(connection_set_admin_state_command), +#ifdef WITH_POLICY + sizeof(add_policy_command), + sizeof(list_policies_command), + sizeof(remove_policy_command), + sizeof(update_connection_command), +#endif +}; typedef struct controller_main_state { ControlState *controlState; @@ -320,9 +328,11 @@ int main(int argc, char *argv[]) { char **commandOutputMain = controlState_GetCommandOutput(mainState.controlState); if (commandOutputMain != NULL && commandOutputLen > 0) { +#if 0 for (size_t j = 0; j < commandOutputLen; j++) { printf("Output %zu: %s \n", j, commandOutputMain[j]); } +#endif controlState_ReleaseCommandOutput(mainState.controlState, commandOutputMain, commandOutputLen); } -- cgit 1.2.3-korg