cnat: Prepare extended snat policies
[vpp.git] / src / plugins / cnat / cnat_types.c
index b6c6628..837f400 100644 (file)
@@ -181,10 +181,12 @@ cnat_config (vlib_main_t * vm, unformat_input_t * input)
   cm->translation_hash_buckets = CNAT_DEFAULT_TRANSLATION_BUCKETS;
   cm->snat_hash_memory = CNAT_DEFAULT_SNAT_MEMORY;
   cm->snat_hash_buckets = CNAT_DEFAULT_SNAT_BUCKETS;
+  cm->snat_if_map_length = CNAT_DEFAULT_SNAT_IF_MAP_LEN;
   cm->scanner_timeout = CNAT_DEFAULT_SCANNER_TIMEOUT;
   cm->session_max_age = CNAT_DEFAULT_SESSION_MAX_AGE;
   cm->tcp_max_age = CNAT_DEFAULT_TCP_MAX_AGE;
   cm->default_scanner_state = CNAT_SCANNER_ON;
+  cm->maglev_len = CNAT_DEFAULT_MAGLEV_LEN;
   cm->lazy_init_done = 0;
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
@@ -203,6 +205,8 @@ cnat_config (vlib_main_t * vm, unformat_input_t * input)
        ;
       else if (unformat (input, "snat-db-buckets %u", &cm->snat_hash_buckets))
        ;
+      else if (unformat (input, "snat-if-map-len %u", &cm->snat_if_map_length))
+       ;
       else if (unformat (input, "snat-db-memory %U",
                         unformat_memory_size, &cm->snat_hash_memory))
        ;
@@ -217,6 +221,8 @@ cnat_config (vlib_main_t * vm, unformat_input_t * input)
        ;
       else if (unformat (input, "tcp-max-age %u", &cm->tcp_max_age))
        ;
+      else if (unformat (input, "maglev-len %u", &cm->maglev_len))
+       ;
       else
        return clib_error_return (0, "unknown input '%U'",
                                  format_unformat_error, input);