diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2020-09-23 10:43:16 +0200 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-09-23 12:02:12 +0000 |
commit | d63f73b8393b086d21a5197d1e02fac243867a93 (patch) | |
tree | 7442b7c98fc64f220070216ccf8d4f9bdf59d49a /src/plugins/cnat/cnat_types.h | |
parent | 8eb69407c8075e101b773d5a27ea21bd3fc906d7 (diff) |
cnat: Disable default scanner process
Type: feature
Change-Id: Iba9d9f384eaa35c5522e828e3cbe4516416294db
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_types.h')
-rw-r--r-- | src/plugins/cnat/cnat_types.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/cnat/cnat_types.h b/src/plugins/cnat/cnat_types.h index d81548d0c30..ab59aaf2f37 100644 --- a/src/plugins/cnat/cnat_types.h +++ b/src/plugins/cnat/cnat_types.h @@ -127,6 +127,15 @@ typedef struct cnat_main_ /* Longest prefix Match table for source NATing */ cnat_snat_pfx_table_t snat_pfx_table; + + /* Index of the scanner process node */ + uword scanner_node_index; + + /* Did we do lazy init ? */ + u8 lazy_init_done; + + /* Enable or Disable the scanner on startup */ + u8 default_scanner_state; } cnat_main_t; typedef struct cnat_timestamp_t_ @@ -167,6 +176,23 @@ typedef enum CNAT_N_ERROR, } cnat_error_t; +typedef enum cnat_scanner_cmd_t_ +{ + CNAT_SCANNER_OFF, + CNAT_SCANNER_ON, +} cnat_scanner_cmd_t; + +/** + * Lazy initialization when first adding a translation + * or using snat + */ +extern void cnat_lazy_init (); + +/** + * Enable/Disable session cleanup + */ +extern void cnat_enable_disable_scanner (cnat_scanner_cmd_t event_type); + /* Dataplane functions */ |