diff options
author | 2019-11-05 12:56:37 +0100 | |
---|---|---|
committer | 2019-11-17 01:01:47 +0100 | |
commit | a2efba68e8fc25459ee524e31fc7228ee62d89ce (patch) | |
tree | b3dadbbd105b224d90f1a2abd6aaca39e52587fa /ctrl/facemgr/includes | |
parent | 5d45b1b26fd4671d8ad2dabee7631ab499862487 (diff) |
[HICN-378] Add a maximum number of reattempts in face manager before entering face ignore mode
Change-Id: Id6f8cc958d3c50027475d72d80eed6b65ac0996b
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/facemgr/includes')
-rw-r--r-- | ctrl/facemgr/includes/hicn/facemgr/facelet.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/ctrl/facemgr/includes/hicn/facemgr/facelet.h b/ctrl/facemgr/includes/hicn/facemgr/facelet.h index 476858eff..f2e3a82b4 100644 --- a/ctrl/facemgr/includes/hicn/facemgr/facelet.h +++ b/ctrl/facemgr/includes/hicn/facemgr/facelet.h @@ -33,6 +33,8 @@ #define MAXSZ_FACELET 1024 +#define FACELET_MAX_ERRORS 10 + /* NOTE: Any test should be sufficient */ #define IS_VALID_NETDEVICE(netdevice) ((netdevice.index != 0) && (netdevice.name[0] != '\0')) @@ -116,6 +118,23 @@ typedef enum { extern const char * facelet_status_str[]; +/* Facelet error reason */ +#define foreach_facelet_error_reason \ + _(UNDEFINED) \ + _(UNSPECIFIED_ERROR) \ + _(FORWARDER_OFFLINE) \ + _(PERMISSION_DENIED) \ + _(INTERNAL_ERROR) \ + _(N) + +typedef enum { +#define _(x) FACELET_ERROR_REASON_ ## x, + foreach_facelet_error_reason +#undef _ +} facelet_error_reason_t; + +extern const char * facelet_error_reason_str[]; + /* Facelet attribute status */ /* @@ -234,8 +253,9 @@ int facelet_merge(facelet_t * facelet, const facelet_t * facelet_to_merge); facelet_status_t facelet_get_status(const facelet_t * facelet); void facelet_set_status(facelet_t * facelet, facelet_status_t status); -void facelet_set_status_error(facelet_t * facelet, bool value); -bool facelet_get_status_error(const facelet_t * facelet); +void facelet_set_error(facelet_t * facelet, facelet_error_reason_t reason); +void facelet_unset_error(facelet_t * facelet); +bool facelet_get_error(const facelet_t * facelet); void facelet_set_bj_done(facelet_t * facelet); void facelet_unset_bj_done(facelet_t * facelet); |