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/config/controlRemove.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'hicn-light/src/hicn/config/controlRemove.c') diff --git a/hicn-light/src/hicn/config/controlRemove.c b/hicn-light/src/hicn/config/controlRemove.c index d33d57206..af833dc8b 100644 --- a/hicn-light/src/hicn/config/controlRemove.c +++ b/hicn-light/src/hicn/config/controlRemove.c @@ -30,6 +30,9 @@ #include #include #include +#ifdef WITH_POLICY +#include +#endif /* WITH_POLICY */ static void _controlRemove_Init(CommandParser *parser, CommandOps *ops); static CommandReturn _controlRemove_Execute(CommandParser *parser, @@ -61,16 +64,25 @@ static CommandReturn _controlRemove_HelpExecute(CommandParser *parser, CommandOps *ops_remove_connection = controlRemoveConnection_Create(NULL); CommandOps *ops_remove_route = controlRemoveRoute_Create(NULL); CommandOps *ops_remove_punting = controlRemovePunting_Create(NULL); +#ifdef WITH_POLICY + CommandOps *ops_remove_policy = controlRemovePolicy_Create(NULL); +#endif /* WITH_POLICY */ printf("Available commands:\n"); printf(" %s\n", ops_remove_connection->command); printf(" %s\n", ops_remove_route->command); printf(" %s\n", ops_remove_punting->command); +#ifdef WITH_POLICY + printf(" %s\n", ops_remove_policy->command); +#endif /* WITH_POLICY */ printf("\n"); commandOps_Destroy(&ops_remove_connection); commandOps_Destroy(&ops_remove_route); commandOps_Destroy(&ops_remove_punting); +#ifdef WITH_POLICY + commandOps_Destroy(&ops_remove_policy); +#endif /* WITH_POLICY */ return CommandReturn_Success; } @@ -83,6 +95,10 @@ static void _controlRemove_Init(CommandParser *parser, CommandOps *ops) { controlState_RegisterCommand(state, controlRemoveRoute_Create(state)); controlState_RegisterCommand(state, controlRemovePunting_Create(state)); controlState_RegisterCommand(state, controlRemovePunting_HelpCreate(state)); +#ifdef WITH_POLICY + controlState_RegisterCommand(state, controlRemovePolicy_HelpCreate(state)); + controlState_RegisterCommand(state, controlRemovePolicy_Create(state)); +#endif /* WITH_POLICY */ } static CommandReturn _controlRemove_Execute(CommandParser *parser, -- cgit 1.2.3-korg