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/controlList.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/controlList.c')
-rw-r--r-- | hicn-light/src/hicn/config/controlList.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/hicn-light/src/hicn/config/controlList.c b/hicn-light/src/hicn/config/controlList.c index 8ec47ad23..c45f05428 100644 --- a/hicn-light/src/hicn/config/controlList.c +++ b/hicn-light/src/hicn/config/controlList.c @@ -31,6 +31,9 @@ //#include <hicn/config/controlListInterfaces.h> #include <hicn/config/controlListListeners.h> #include <hicn/config/controlListRoutes.h> +#ifdef WITH_POLICY +#include <hicn/config/controlListPolicies.h> +#endif /* WITH_POLICY */ static void _controlList_Init(CommandParser *parser, CommandOps *ops); static CommandReturn _controlList_Execute(CommandParser *parser, @@ -59,18 +62,27 @@ static CommandReturn _controlList_HelpExecute(CommandParser *parser, // CommandOps *ops_list_interfaces = controlListInterfaces_HelpCreate(NULL); CommandOps *ops_list_routes = controlListRoutes_HelpCreate(NULL); CommandOps *ops_list_listeners = controlListListeners_HelpCreate(NULL); +#ifdef WITH_POLICY + CommandOps *ops_list_policies = controlListPolicies_HelpCreate(NULL); +#endif /* WITH_POLICY */ printf("Available commands:\n"); printf(" %s\n", ops_list_connections->command); // printf(" %s\n", ops_list_interfaces->command); printf(" %s\n", ops_list_routes->command); printf(" %s\n", ops_list_listeners->command); +#ifdef WITH_POLICY + printf(" %s\n", ops_list_policies->command); +#endif /* WITH_POLICY */ printf("\n"); commandOps_Destroy(&ops_list_connections); // commandOps_Destroy(&ops_list_interfaces); commandOps_Destroy(&ops_list_routes); commandOps_Destroy(&ops_list_listeners); +#ifdef WITH_POLICY + commandOps_Destroy(&ops_list_policies); +#endif /* WITH_POLICY */ return CommandReturn_Success; } @@ -86,6 +98,10 @@ static void _controlList_Init(CommandParser *parser, CommandOps *ops) { // controlState_RegisterCommand(state, controlListInterfaces_Create(state)); controlState_RegisterCommand(state, controlListRoutes_Create(state)); controlState_RegisterCommand(state, controlListListeners_Create(state)); +#ifdef WITH_POLICY + controlState_RegisterCommand(state, controlListPolicies_HelpCreate(state)); + controlState_RegisterCommand(state, controlListPolicies_Create(state)); +#endif /* WITH_POLICY */ } static CommandReturn _controlList_Execute(CommandParser *parser, |