diff options
author | Angelo Mantellini <angelo.mantellini@cisco.com> | 2021-01-08 08:44:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2021-01-08 08:44:35 +0000 |
commit | d80f1502caa07e77593f4e632a0028e450a6b0d8 (patch) | |
tree | f96e2981a795d10252132ce828abe3d58ae27f8b | |
parent | 52cc578d5341f35f9dc3197af4b72720f916a709 (diff) | |
parent | 2f46913d96f0a2b4107384c949d07f471f59df3e (diff) |
Merge "[HICN-669] policy_t yet used in mac os 11"
-rw-r--r-- | ctrl/libhicnctrl/includes/hicn/ctrl/api.h | 2 | ||||
-rw-r--r-- | ctrl/libhicnctrl/includes/hicn/ctrl/commands.h | 4 | ||||
-rw-r--r-- | hicn-light/src/hicn/config/controlAddPolicy.c | 2 | ||||
-rw-r--r-- | hicn-light/src/hicn/processor/fibEntry.c | 10 | ||||
-rw-r--r-- | hicn-light/src/hicn/processor/fibEntry.h | 4 | ||||
-rw-r--r-- | hicn-light/src/hicn/utils/commands.h | 4 | ||||
-rw-r--r-- | lib/includes/hicn/policy.h | 6 |
7 files changed, 16 insertions, 16 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h index bdb0c0a5f..f92b39ff3 100644 --- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h +++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h @@ -711,7 +711,7 @@ typedef struct { int family; /* Krw */ ip_address_t remote_addr; /* krw */ u8 len; /* krw */ - policy_t policy; /* .rw */ + hicn_policy_t policy; /* .rw */ } hc_policy_t; int hc_policy_parse(void *in, hc_policy_t *policy); diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h b/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h index d8e5329b3..3758f0f41 100644 --- a/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h +++ b/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h @@ -329,14 +329,14 @@ typedef struct { ip_address_t address; uint8_t addressType; uint8_t len; - policy_t policy; + hicn_policy_t policy; } add_policy_command; typedef struct { ip_address_t address; uint8_t addressType; uint8_t len; - policy_t policy; + hicn_policy_t policy; } list_policies_command; typedef struct { diff --git a/hicn-light/src/hicn/config/controlAddPolicy.c b/hicn-light/src/hicn/config/controlAddPolicy.c index 8618c6246..66439d29c 100644 --- a/hicn-light/src/hicn/config/controlAddPolicy.c +++ b/hicn-light/src/hicn/config/controlAddPolicy.c @@ -139,7 +139,7 @@ static CommandReturn _controlAddPolicy_Execute(CommandParser *parser, addPolicyCommand->len = len; - policy_t policy; + hicn_policy_t policy; snprintf((char*)policy.app_name, APP_NAME_LEN, "%s", (char*)parcList_GetAtIndex(args, 3)); for (int i=4; i < 11; i++) { const char *tag = parcList_GetAtIndex(args, i); diff --git a/hicn-light/src/hicn/processor/fibEntry.c b/hicn-light/src/hicn/processor/fibEntry.c index 077e33ff3..7412b4ccf 100644 --- a/hicn-light/src/hicn/processor/fibEntry.c +++ b/hicn-light/src/hicn/processor/fibEntry.c @@ -55,7 +55,7 @@ struct fib_entry { #ifdef WITH_POLICY NumberSet *nexthops; const Forwarder * forwarder; - policy_t policy; + hicn_policy_t policy; policy_counters_t policy_counters; // NumberSet *available_nexthops; #ifdef WITH_MAPME @@ -198,7 +198,7 @@ fibEntry_GetAvailableNextHops(const FibEntry *fibEntry, unsigned in_connection) ConnectionTable * table = forwarder_GetConnectionTable(fibEntry->forwarder); NumberSet * nexthops; bool dealloc_nexthops = false; - policy_t policy = fibEntry_GetPolicy(fibEntry); + hicn_policy_t policy = fibEntry_GetPolicy(fibEntry); /* Reset available next hops and start filtering */ NumberSet * available_nexthops = numberSet_Create(); @@ -465,11 +465,11 @@ fibEntry_GetAvailableNextHops(const FibEntry *fibEntry, unsigned in_connection) return priority_nexthops; } -policy_t fibEntry_GetPolicy(const FibEntry *fibEntry) { +hicn_policy_t fibEntry_GetPolicy(const FibEntry *fibEntry) { return fibEntry->policy; } -void fibEntry_SetPolicy(FibEntry *fibEntry, policy_t policy) { +void fibEntry_SetPolicy(FibEntry *fibEntry, hicn_policy_t policy) { fibEntry->policy = policy; mapme_reconsiderFibEntry(forwarder_getMapmeInstance(fibEntry->forwarder), fibEntry); } @@ -541,7 +541,7 @@ const NumberSet *fibEntry_GetNexthopsFromForwardingStrategy( ConnectionTable * table = forwarder_GetConnectionTable(fibEntry->forwarder); unsigned in_connection = message_GetIngressConnectionId(interestMessage); - policy_t policy = fibEntry_GetPolicy(fibEntry); + hicn_policy_t policy = fibEntry_GetPolicy(fibEntry); NumberSet * out; diff --git a/hicn-light/src/hicn/processor/fibEntry.h b/hicn-light/src/hicn/processor/fibEntry.h index 7a8699165..3f78f47dd 100644 --- a/hicn-light/src/hicn/processor/fibEntry.h +++ b/hicn-light/src/hicn/processor/fibEntry.h @@ -110,9 +110,9 @@ void fibEntry_ReceiveObjectMessage(const FibEntry *fibEntry, Ticks objReception); #ifdef WITH_POLICY -policy_t fibEntry_GetPolicy(const FibEntry *fibEntry); +hicn_policy_t fibEntry_GetPolicy(const FibEntry *fibEntry); void fibEntry_ReconsiderPolicy(FibEntry *fibEntry); -void fibEntry_SetPolicy(FibEntry *fibEntry, policy_t policy); +void fibEntry_SetPolicy(FibEntry *fibEntry, hicn_policy_t policy); void fibEntry_UpdateStats(FibEntry *fibEntry, uint64_t now); NumberSet * fibEntry_GetAvailableNextHops(const FibEntry *fibEntry, unsigned in_connection); NumberSet * fibEntry_GetPreviousNextHops(const FibEntry *fibEntry); diff --git a/hicn-light/src/hicn/utils/commands.h b/hicn-light/src/hicn/utils/commands.h index d8e5329b3..3758f0f41 100644 --- a/hicn-light/src/hicn/utils/commands.h +++ b/hicn-light/src/hicn/utils/commands.h @@ -329,14 +329,14 @@ typedef struct { ip_address_t address; uint8_t addressType; uint8_t len; - policy_t policy; + hicn_policy_t policy; } add_policy_command; typedef struct { ip_address_t address; uint8_t addressType; uint8_t len; - policy_t policy; + hicn_policy_t policy; } list_policies_command; typedef struct { diff --git a/lib/includes/hicn/policy.h b/lib/includes/hicn/policy.h index 51bab4241..3de34ee68 100644 --- a/lib/includes/hicn/policy.h +++ b/lib/includes/hicn/policy.h @@ -217,9 +217,9 @@ typedef struct { char app_name[APP_NAME_LEN]; policy_tag_state_t tags[POLICY_TAG_N]; policy_stats_t stats; -} policy_t; +} hicn_policy_t; -static const policy_t POLICY_NONE = { +static const hicn_policy_t POLICY_NONE = { .app_name = { 0 }, .tags = { #define _(x, y) [POLICY_TAG_ ## x] = { POLICY_STATE_NEUTRAL, 0 }, @@ -240,7 +240,7 @@ typedef struct { char ipv4_prefix[INET_ADDRSTRLEN + PFX_STRLEN]; char ipv6_prefix[INET6_ADDRSTRLEN + PFX_STRLEN]; }; - policy_t policy; + hicn_policy_t policy; } policy_description_t; #endif /* HICN_POLICY_H */ |