diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-07-26 23:20:30 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-07-29 17:13:35 +0200 |
commit | 0a1c6b5565e20167d1f1f33a5a8b597f420b18b0 (patch) | |
tree | 98c5da8f231fbd3dc2ce6502040e29c8333d9ffc /hicn-light/src/hicn/config/controlRoot.c | |
parent | 05ca0aa8f612ee48fb66d4dbebe596b7f1e03181 (diff) |
[HICN-252] Add per-application policy framework to hicn-light forwarder
Change-Id: I0531cd7a7de179581295ae34766c81cd9cf3e172
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Co-authored-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light/src/hicn/config/controlRoot.c')
-rw-r--r-- | hicn-light/src/hicn/config/controlRoot.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hicn-light/src/hicn/config/controlRoot.c b/hicn-light/src/hicn/config/controlRoot.c index 675fe4c6e..e135dfc50 100644 --- a/hicn-light/src/hicn/config/controlRoot.c +++ b/hicn-light/src/hicn/config/controlRoot.c @@ -31,6 +31,9 @@ #include <hicn/config/controlRoot.h> #include <hicn/config/controlSet.h> #include <hicn/config/controlUnset.h> +#ifdef WITH_POLICY +#include <hicn/config/controlUpdate.h> +#endif /* WITH_POLICY */ static void _controlRoot_Init(CommandParser *parser, CommandOps *ops); static CommandReturn _controlRoot_Execute(CommandParser *parser, @@ -79,6 +82,9 @@ static CommandReturn _controlRoot_HelpExecute(CommandParser *parser, CommandOps *ops_help_unset = controlUnset_HelpCreate(NULL); CommandOps *ops_help_cache = controlCache_HelpCreate(NULL); CommandOps *ops_help_mapme = controlMapMe_HelpCreate(NULL); +#ifdef WITH_POLICY + CommandOps *ops_help_update = controlUpdate_HelpCreate(NULL); +#endif /* WITH_POLICY */ printf("Available commands:\n"); printf(" %s\n", ops_help_add->command); @@ -89,6 +95,9 @@ static CommandReturn _controlRoot_HelpExecute(CommandParser *parser, printf(" %s\n", ops_help_unset->command); printf(" %s\n", ops_help_cache->command); printf(" %s\n", ops_help_mapme->command); +#ifdef WITH_POLICY + printf(" %s\n", ops_help_update->command); +#endif /* WITH_POLICY */ printf("\n"); commandOps_Destroy(&ops_help_add); @@ -99,6 +108,9 @@ static CommandReturn _controlRoot_HelpExecute(CommandParser *parser, commandOps_Destroy(&ops_help_unset); commandOps_Destroy(&ops_help_cache); commandOps_Destroy(&ops_help_mapme); +#ifdef WITH_POLICY + commandOps_Destroy(&ops_help_update); +#endif /* WITH_POLICY */ return CommandReturn_Success; } @@ -114,6 +126,9 @@ static void _controlRoot_Init(CommandParser *parser, CommandOps *ops) { controlState_RegisterCommand(state, controlUnset_HelpCreate(state)); controlState_RegisterCommand(state, controlCache_HelpCreate(state)); controlState_RegisterCommand(state, controlMapMe_HelpCreate(state)); +#ifdef WITH_POLICY + controlState_RegisterCommand(state, controlUpdate_HelpCreate(state)); +#endif /* WITH_POLICY */ controlState_RegisterCommand(state, webControlAdd_Create(state)); controlState_RegisterCommand(state, controlList_Create(state)); @@ -123,6 +138,9 @@ static void _controlRoot_Init(CommandParser *parser, CommandOps *ops) { controlState_RegisterCommand(state, controlUnset_Create(state)); controlState_RegisterCommand(state, controlCache_Create(state)); controlState_RegisterCommand(state, controlMapMe_Create(state)); +#ifdef WITH_POLICY + controlState_RegisterCommand(state, controlUpdate_Create(state)); +#endif /* WITH_POLICY */ } static CommandReturn _controlRoot_Execute(CommandParser *parser, |