X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fdslite%2Fdslite.h;fp=src%2Fplugins%2Fnat%2Fdslite.h;h=d512cf47c9bc95988dca85bf43baef2081a78aa7;hb=2c6639c695aebf0cd5ac74ad31fd331547fa0126;hp=65498eebd9da11093c36cde3767b1b3bdce0f732;hpb=72e31bc2d9b910147c09e1c329713fccc873a018;p=vpp.git diff --git a/src/plugins/nat/dslite.h b/src/plugins/nat/dslite/dslite.h similarity index 97% rename from src/plugins/nat/dslite.h rename to src/plugins/nat/dslite/dslite.h index 65498eebd9d..d512cf47c9b 100644 --- a/src/plugins/nat/dslite.h +++ b/src/plugins/nat/dslite/dslite.h @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include typedef struct { @@ -82,11 +84,13 @@ typedef struct ip6_address_t b4_ip6_addr; ip4_address_t b4_ip4_addr; dslite_per_thread_data_t *per_thread_data; - snat_address_t *addr_pool; u32 num_workers; u32 first_worker_index; u16 port_per_thread; + /* nat address pool */ + nat_ip4_pool_t pool; + /* counters/gauges */ vlib_simple_counter_main_t total_b4s; vlib_simple_counter_main_t total_sessions; @@ -99,6 +103,8 @@ typedef struct /* If set then the DSLite component behaves as CPE/B4 * otherwise it behaves as AFTR */ u8 is_ce; + + u16 msg_id_base; } dslite_main_t; typedef struct @@ -139,7 +145,6 @@ extern vlib_node_registration_t dslite_out2in_node; extern vlib_node_registration_t dslite_ce_encap_node; extern vlib_node_registration_t dslite_ce_decap_node; -void dslite_init (vlib_main_t * vm); void dslite_set_ce (dslite_main_t * dm, u8 set); int dslite_set_aftr_ip6_addr (dslite_main_t * dm, ip6_address_t * addr); int dslite_set_b4_ip6_addr (dslite_main_t * dm, ip6_address_t * addr);