26 u64 tmp = ((
u64) data << 32) | (
u64) value;
79 else if (ip->
protocol == IP_PROTOCOL_ICMP)
81 icmp46_header_t *icmp = (
void *) (ip + 1);
82 if (icmp->type == ICMP4_echo_request || icmp->type == ICMP4_echo_reply)
84 return *((
u16 *) (icmp + 1));
86 else if (clib_net_to_host_u16 (ip->
length) >= 64)
95 else if (ip->
protocol == IP_PROTOCOL_ICMP)
97 icmp46_header_t *icmp = (
void *) (ip + 1);
98 if (icmp->type == ICMP4_echo_request ||
99 icmp->type == ICMP4_echo_reply)
101 return *((
u16 *) (icmp + 1));
117 if (
ip6_parse (ip6, buffer_len, &l4_protocol, &l4_offset, &frag_offset))
128 if (l4_protocol == IP_PROTOCOL_TCP || l4_protocol == IP_PROTOCOL_UDP)
135 else if (l4_protocol == IP_PROTOCOL_ICMP6)
137 icmp46_header_t *icmp = (icmp46_header_t *) (l4);
138 if (icmp->type == ICMP6_echo_request)
142 else if (icmp->type == ICMP6_echo_reply)
173 if (ea_bits_len > 0 && (ip6_prefix_len + ea_bits_len) > 64)
179 if (ip6_src_len != 96)
181 clib_warning (
"MAP-T only supports ip6_src_len = 96 for now.");
187 if (ip6_src_len != 128)
190 (
"MAP-E requires a BR address, not a prefix (ip6_src_len should be 128).");
197 memset (d, 0,
sizeof (*d));
198 *map_domain_index = d - mm->
domains;
214 if (ip4_prefix_len + ea_bits_len < 32)
217 suffix_len = d->
suffix_shift = 32 - ip4_prefix_len - ea_bits_len;
222 suffix_len = 32 - ip4_prefix_len;
226 d->
psid_shift = 16 - psid_length - psid_offset;
231 memset (&adj, 0,
sizeof (adj));
236 p = (
uword *) & adj.rewrite_data[0];
237 *p = (
uword) (*map_domain_index);
242 ip4_prefix, ip4_prefix_len);
248 memset (&args4, 0,
sizeof (args4));
274 p = (
uword *) & adj6->rewrite_data[0];
283 memset (&args6, 0,
sizeof (args6));
332 clib_warning (
"MAP domain delete: domain does not exist: %d",
339 memset (&adj, 0,
sizeof (adj));
346 memset (&args4, 0,
sizeof (args4));
367 memset (&args6, 0,
sizeof (args6));
398 clib_warning (
"MAP rule: domain does not exist: %d", map_domain_index);
413 memset (d->
rules, 0, l);
418 clib_warning (
"MAP rule: PSID outside bounds: %d [%d]", psid,
425 d->
rules[psid] = *tep;
434 #ifdef MAP_SKIP_IP6_LOOKUP 470 else if (
unformat (line_input,
"on"))
495 else if (
unformat (line_input,
"on"))
513 u32 ip6_prefix_len = 0, ip4_prefix_len = 0, map_domain_index, ip6_src_len;
516 u32 ea_bits_len = 0, psid_offset = 0, psid_length = 0;
545 else if (
unformat (line_input,
"ea-bits-len %d", &ea_bits_len))
547 else if (
unformat (line_input,
"psid-offset %d", &psid_offset))
549 else if (
unformat (line_input,
"psid-len %d", &psid_length))
551 else if (
unformat (line_input,
"mtu %d", &mtu))
553 else if (
unformat (line_input,
"map-t"))
565 &ip6_prefix, ip6_prefix_len, &ip6_src, ip6_src_len,
566 ea_bits_len, psid_offset, psid_length, &map_domain_index,
578 u32 map_domain_index;
586 if (
unformat (line_input,
"index %d", &map_domain_index))
609 u32 psid = 0, map_domain_index;
617 if (
unformat (line_input,
"index %d", &map_domain_index))
619 else if (
unformat (line_input,
"psid %d", &psid))
640 #if MAP_SKIP_IP6_LOOKUP 651 memset (&ip4nh, 0,
sizeof (ip4nh));
652 memset (&ip6nh, 0,
sizeof (ip6nh));
724 else if (
unformat (line_input,
"off"))
754 else if (
unformat (line_input,
"outer"))
781 else if (
unformat (line_input,
"off"))
811 else if (
unformat (line_input,
"%x", &tc))
826 bool counters = va_arg (*args,
int);
831 memset (&ip6_prefix, 0,
sizeof (ip6_prefix));
836 "[%d] ip4-pfx %U/%d ip6-pfx %U/%d ip6-src %U/%d ea_bits_len %d psid-offset %d psid-len %d mtu %d %s",
883 f64 dt = (r->
ts + lifetime > now) ? (r->
ts + lifetime - now) : -1;
885 "ip4-reass src=%U dst=%U protocol=%d identifier=%d port=%d lifetime=%.3lf\n",
887 &k->dst.as_u8, k->protocol,
888 clib_net_to_host_u16 (k->fragment_id),
889 (r->
port >= 0) ? clib_net_to_host_u16 (r->
port) : -1, dt);
901 f64 dt = (r->
ts + lifetime > now) ? (r->
ts + lifetime - now) : -1;
903 "ip6-reass src=%U dst=%U protocol=%d identifier=%d lifetime=%.3lf\n",
905 &k->dst.as_u8, k->protocol,
906 clib_net_to_host_u32 (k->fragment_id), dt);
917 bool counters =
false;
918 u32 map_domain_index = ~0;
926 if (
unformat (line_input,
"counters"))
928 else if (
unformat (line_input,
"index %d", &map_domain_index))
939 if (map_domain_index == ~0)
942 pool_foreach(d, mm->
domains, ({vlib_cli_output(vm,
"%U", format_map_domain, d, counters);}));
988 ASSERT (ci < n->n_errors);
1000 int domains = 0, rules = 0, domaincount = 0, rulecount = 0;
1007 rulecount+= 0x1 << d->psid_length;
1008 rules += sizeof(ip6_address_t) * 0x1 << d->psid_length;
1010 domains +=
sizeof(*d);
1016 vlib_cli_output (vm,
"MAP domains: %d (%d bytes)\n", domaincount, domains);
1020 #if MAP_SKIP_IP6_LOOKUP 1022 "MAP pre-resolve: IP6 next-hop: %U (%u), IP4 next-hop: %U (%u)\n",
1033 "MAP IPv6 inbound security check: %s, fragmented packet security check: %s",
1034 mm->sec_check ?
"enabled" :
"disabled",
1035 mm->sec_check_frag ?
"enabled" :
"disabled");
1039 vlib_cli_output (vm,
"ICMP6 unreachables sent for unmatched packets: %s\n",
1040 mm->icmp6_enabled ?
"enabled" :
"disabled");
1042 mm->frag_inner ?
"enabled" :
"disabled");
1044 mm->frag_ignore_df ?
"enabled" :
"disabled");
1055 memset (total_pkts, 0,
sizeof (total_pkts));
1056 memset (total_bytes, 0,
sizeof (total_bytes));
1061 which = cm - mm->domain_counters;
1066 total_pkts[which] += v.
packets;
1067 total_bytes[which] += v.
bytes;
1074 total_bytes[MAP_DOMAIN_COUNTER_TX]);
1077 total_bytes[MAP_DOMAIN_COUNTER_RX]);
1093 u64 buffers = ~(0ull);
1094 u8 ip4 = 0, ip6 = 0;
1101 if (
unformat (line_input,
"lifetime %u", &lifetime))
1103 else if (
unformat (line_input,
"ht-ratio %lf", &ht_ratio))
1105 else if (
unformat (line_input,
"pool-size %u", &pool_size))
1107 else if (
unformat (line_input,
"buffers %llu", &buffers))
1109 else if (
unformat (line_input,
"ip4"))
1111 else if (
unformat (line_input,
"ip6"))
1160 u32 reass = 0, packets = 0;
1161 if (pool_size != ~0)
1170 "Setting ip4-reass pool-size (destroyed-reassembly=%u , dropped-fragments=%u)",
1183 "Setting ip4-reass ht-log2len (destroyed-reassembly=%u , dropped-fragments=%u)",
1194 if (buffers != ~(0ull))
1207 "Note: 'ip4-reass buffers' > pool-size * max-fragments-per-reassembly.");
1213 u32 reass = 0, packets = 0;
1214 if (pool_size != ~0)
1223 "Setting ip6-reass pool-size (destroyed-reassembly=%u , dropped-fragments=%u)",
1236 "Setting ip6-reass ht-log2len (destroyed-reassembly=%u , dropped-fragments=%u)",
1247 if (buffers != ~(0ull))
1260 "Note: 'ip6-reass buffers' > pool-size * max-fragments-per-reassembly.");
1281 format (s,
"MAP domain index: %d L4 port: %u", map_domain_index,
1282 clib_net_to_host_u16 (port));
1306 #define map_ip4_reass_pool_index(r) (r - map_main.ip4_reass_pool) 1353 u8 protocol,
u32 ** pi_to_drop)
1358 .dst.data_u32 = dst,
1359 .fragment_id = fragment_id,
1360 .protocol = protocol
1422 #ifdef MAP_IP4_REASS_COUNT_BYTES 1467 #define map_ip6_reass_pool_index(r) (r - map_main.ip6_reass_pool) 1523 u8 protocol,
u32 ** pi_to_drop)
1530 .fragment_id = fragment_id,
1531 .protocol = protocol
1536 for (i = 0; i < 10; i++)
1595 #ifdef MAP_IP6_REASS_COUNT_BYTES 1604 u16 data_offset,
u16 next_data_offset,
1605 u8 * data_start,
u16 data_len)
1608 u16 copied_len = (data_len > 20) ? 20 : data_len;
1630 else if (prev_f ==
NULL)
1635 if (!f || f->
pi != ~0)
1643 clib_memcpy (prev_f->next_data, data_start, copied_len);
1644 prev_f->next_data_len = copied_len;
1645 prev_f->next_data_offset = data_offset;
1649 if (((
ip4_header_t *) data_start)->ip_version_and_header_length != 0x45)
1671 if (dropped_packets)
1706 u32 desired_size = (
u32) (pool_size * ht_ratio);
1708 for (i = 1; i < 31; i++)
1709 if ((1 << i) >= desired_size)
1716 u32 * dropped_packets)
1733 u32 * dropped_packets)
1764 if (dropped_packets)
1799 u32 * dropped_packets)
1816 u32 * dropped_packets)
1845 .path =
"map params reassembly",
1846 .short_help =
"[ip4 | ip6] [lifetime <lifetime-ms>] [pool-size <pool-size>] [buffers <buffers>] [ht-ratio <ht-ratio>]",
1853 .path =
"map params traffic-class",
1855 "traffic-class {0x0-0xff | copy}",
1862 .path =
"map params pre-resolve",
1864 "pre-resolve {ip4-nh <address>} | {ip6-nh <address>}",
1871 .path =
"map params security-check",
1873 "security-check on|off",
1880 .path =
"map params icmp source-address",
1881 .short_help =
"source-address <ip4-address>",
1888 .path =
"map params icmp6 unreachables",
1889 .short_help =
"unreachables {on|off}",
1896 .path =
"map params fragment",
1897 .short_help =
"[inner|outer] [ignore-df [on|off]]",
1904 .path =
"map params fragment ignore-df",
1905 .short_help =
"on|off",
1912 .path =
"map params security-check fragments",
1921 .path =
"map add domain",
1923 "map add domain ip4-pfx <ip4-pfx> ip6-pfx <ip6-pfx> ip6-src <ip6-pfx> " 1924 "ea-bits-len <n> psid-offset <n> psid-len <n> [map-t] [mtu <mtu>]",
1931 .path =
"map add rule",
1933 "map add rule index <domain> psid <psid> ip6-dst <ip6-addr>",
1940 .path =
"map del domain",
1942 "map del domain index <domain>",
1949 .path =
"show map domain",
1956 .path =
"show map stats",
1963 .path =
"show map fragments",
1978 #ifdef MAP_SKIP_IP6_LOOKUP
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#define map_ip4_reass_lock()
static vlib_cli_command_t map_ip4_reass_lifetime_command
(constructor) VLIB_CLI_COMMAND (map_ip4_reass_lifetime_command)
map_ip4_reass_t * ip4_reass_pool
u64 packets
packet counter
u32 ip4_reass_conf_buffers
static vlib_cli_command_t map_icmp_relay_source_address_command
(constructor) VLIB_CLI_COMMAND (map_icmp_relay_source_address_command)
sll srl srl sll sra u16x4 i
static clib_error_t * map_fragment_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define MAP_IP6_REASS_CONF_BUFFERS_MAX
int map_delete_domain(u32 map_domain_index)
#define MAP_IP6_REASS_BUFFERS_DEFAULT
void vlib_validate_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
validate a combined counter
volatile u32 * ip6_reass_lock
static vlib_main_t * vlib_get_main(void)
u32 fragments[MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY]
#define MAP_IP6_REASS_LIFETIME_DEFAULT
static_always_inline map_ip6_reass_t * map_ip6_reass_lookup(map_ip6_reass_key_t *k, u32 bucket, f64 now)
#define pool_alloc(P, N)
Allocate N more free elements to pool (unspecified alignment).
ip_lookup_next_t lookup_next_index
vlib_counter_t * maxi
Shared wide counter pairs.
static u8 * format_map_domain(u8 *s, va_list *args)
static f64 vlib_time_now(vlib_main_t *vm)
static clib_error_t * show_map_domain_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void map_ip4_reass_reinit(u32 *trashed_reass, u32 *dropped_packets)
static clib_error_t * map_security_check_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u64 map_error_counter_get(u32 node_index, map_error_t map_error)
static_always_inline int ip6_parse(const ip6_header_t *ip6, u32 buff_len, u8 *l4_protocol, u16 *l4_offset, u16 *frag_hdr_offset)
static clib_error_t * map_fragment_df_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * show_map_fragments_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
i32 ip6_get_port(ip6_header_t *ip6, map_dir_e dir, u16 buffer_len)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static void map_domain_counter_unlock(map_main_t *mm)
Combined counter to hold both packets and byte differences.
static u64 clib_xxhash(u64 key)
static heap_elt_t * last(heap_header_t *h)
u32 ip4_reass_buffered_counter
static u8 * format_map_ip4_reass(u8 *s, va_list *args)
ip6_address_t preresolve_ip6
static u32 crc_u32(u32 data, u32 value)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static vlib_cli_command_t show_map_domain_command
(constructor) VLIB_CLI_COMMAND (show_map_domain_command)
int map_ip6_reass_conf_ht_ratio(f32 ht_ratio, u32 *trashed_reass, u32 *dropped_packets)
#define MAP_IP6_REASS_CONF_LIFETIME_MAX
map_ip6_reass_t * ip6_reass_pool
map_ip6_fragment_t fragments[MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY]
ip4_address_t preresolve_ip4
#define map_ip6_reass_unlock()
vnet_main_t * vnet_get_main(void)
#define MAP_IP4_REASS_MAX_FRAGMENTS_PER_REASSEMBLY
#define static_always_inline
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
static clib_error_t * map_pre_resolve_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define MAP_REASS_INDEX_NONE
#define VLIB_INIT_FUNCTION(x)
static clib_error_t * map_icmp_unreachables_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_combined_counter_main_t * domain_counters
static vlib_cli_command_t show_map_fragments_command
(constructor) VLIB_CLI_COMMAND (show_map_fragments_command)
static int ip4_get_fragment_offset(ip4_header_t *i)
ip4_address_t icmp4_src_address
static clib_error_t * map_add_domain_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t map_del_command
(constructor) VLIB_CLI_COMMAND (map_del_command)
u32 ip4_fib_lookup_with_table(ip4_main_t *im, u32 fib_index, ip4_address_t *dst, u32 disable_default_route)
vlib_simple_counter_main_t icmp_relayed
int map_ip4_reass_add_fragment(map_ip4_reass_t *r, u32 pi)
#define clib_warning(format, args...)
u32 table_index_or_table_id
u8 map_get_ht_log2len(f32 ht_ratio, u16 pool_size)
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V...
#define MAP_IP4_REASS_CONF_LIFETIME_MAX
void ip6_add_del_route(ip6_main_t *im, ip6_add_del_route_args_t *args)
static_always_inline map_ip4_reass_t * map_ip4_reass_lookup(map_ip4_reass_key_t *k, u32 bucket, f64 now)
int map_add_del_psid(u32 map_domain_index, u16 psid, ip6_address_t *tep, u8 is_add)
#define MAP_IP6_REASS_CONF_POOL_SIZE_MAX
ip6_address_t dst_address
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
Clear a combined counter Clears the set of per-thread u16 counters, and the shared vlib_counter_t...
int map_ip6_reass_conf_buffers(u32 buffers)
#define map_ip4_reass_pool_index(r)
static clib_error_t * map_add_rule_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int map_ip4_reass_conf_lifetime(u16 lifetime_ms)
vlib_error_main_t error_main
static u32 vlib_error_get_code(vlib_error_t e)
#define MAP_IP4_REASS_BUFFERS_DEFAULT
void * ip4_get_route(ip4_main_t *im, u32 fib_index_or_table_id, u32 flags, u8 *address, u32 address_length)
#define MAP_IP4_REASS_CONF_HT_RATIO_MAX
static u8 * format_map_ip6_reass(u8 *s, va_list *args)
volatile u32 * ip4_reass_lock
u16 ip4_reass_conf_pool_size
This packet needs to go to MAP - RFC7596, RFC7597.
static vlib_cli_command_t map_add_domain_command
(constructor) VLIB_CLI_COMMAND (map_add_domain_command)
int map_ip4_reass_conf_buffers(u32 buffers)
#define pool_put(P, E)
Free an object E in pool P.
int map_ip6_reass_conf_lifetime(u16 lifetime_ms)
map_ip4_reass_t * map_ip4_reass_get(u32 src, u32 dst, u16 fragment_id, u8 protocol, u32 **pi_to_drop)
static void vlib_get_combined_counter(vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of mini co...
int map_ip4_reass_conf_pool_size(u16 pool_size, u32 *trashed_reass, u32 *dropped_packets)
u16 * ip6_reass_hash_table
u16 * ip4_reass_hash_table
u32 ip6_get_route(ip6_main_t *im, u32 fib_index_or_table_id, u32 flags, ip6_address_t *address, u32 address_length)
static vlib_cli_command_t map_fragment_command
(constructor) VLIB_CLI_COMMAND (map_fragment_command)
i32 ip4_get_port(ip4_header_t *ip, map_dir_e dir, u16 buffer_len)
#define MAP_IP4_REASS_HT_RATIO_DEFAULT
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
void map_ip4_drop_pi(u32 pi)
#define pool_free(p)
Free a pool.
void map_ip4_reass_free(map_ip4_reass_t *r, u32 **pi_to_drop)
static vlib_cli_command_t map_icmp_unreachables_command
(constructor) VLIB_CLI_COMMAND (map_icmp_unreachables_command)
static clib_error_t * map_params_reass_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t map_pre_resolve_command
(constructor) VLIB_CLI_COMMAND (map_pre_resolve_command)
u16 ip6_reass_conf_pool_size
static_always_inline void map_ip4_reass_get_fragments(map_ip4_reass_t *r, u32 **pi)
map_ip6_reass_t * map_ip6_reass_get(ip6_address_t *src, ip6_address_t *dst, u32 fragment_id, u8 protocol, u32 **pi_to_drop)
#define MAP_IP6_REASS_POOL_SIZE_DEFAULT
#define vec_free(V)
Free vector's memory (no header).
int map_create_domain(ip4_address_t *ip4_prefix, u8 ip4_prefix_len, ip6_address_t *ip6_prefix, u8 ip6_prefix_len, ip6_address_t *ip6_src, u8 ip6_src_len, u8 ea_bits_len, u8 psid_offset, u8 psid_length, u32 *map_domain_index, u16 mtu, u8 flags)
static vlib_cli_command_t map_security_check_frag_command
(constructor) VLIB_CLI_COMMAND (map_security_check_frag_command)
static clib_error_t * map_icmp_relay_source_address_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
static vlib_cli_command_t map_fragment_df_command
(constructor) VLIB_CLI_COMMAND (map_fragment_df_command)
#define clib_memcpy(a, b, c)
u32 ip6_fib_lookup_with_table(ip6_main_t *im, u32 fib_index, ip6_address_t *dst)
#define IP6_ROUTE_FLAG_DEL
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define IP4_ROUTE_FLAG_DEL
int map_ip4_reass_conf_ht_ratio(f32 ht_ratio, u32 *trashed_reass, u32 *dropped_packets)
static clib_error_t * map_del_domain_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void map_domain_counter_lock(map_main_t *mm)
f32 ip4_reass_conf_ht_ratio
static vlib_cli_command_t map_security_check_command
(constructor) VLIB_CLI_COMMAND (map_security_check_command)
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
#define ip6_frag_hdr_offset(hdr)
int map_ip6_reass_conf_pool_size(u16 pool_size, u32 *trashed_reass, u32 *dropped_packets)
#define u8_ptr_add(ptr, index)
ip4_address_t dst_address
#define IP4_ROUTE_FLAG_ADD
ip_lookup_main_t lookup_main
void map_ip6_reass_reinit(u32 *trashed_reass, u32 *dropped_packets)
static void clib_mem_free(void *p)
#define map_ip4_reass_unlock()
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
u8 * format_map_trace(u8 *s, va_list *args)
#define MAP_IP6_REASS_HT_RATIO_DEFAULT
f32 ip6_reass_conf_ht_ratio
static clib_error_t * map_traffic_class_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
static vlib_cli_command_t show_map_stats_command
(constructor) VLIB_CLI_COMMAND (show_map_stats_command)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u16 ip6_reass_conf_lifetime_ms
#define map_ip6_reass_lock()
static vlib_cli_command_t map_traffic_class_command
(constructor) VLIB_CLI_COMMAND (map_traffic_class_command)
#define MAP_IP4_REASS_POOL_SIZE_DEFAULT
#define MAP_IP6_REASS_CONF_HT_RATIO_MAX
char * name
The counter collection's name.
u32 table_index_or_table_id
A collection of combined counters.
#define MAP_IP4_REASS_LIFETIME_DEFAULT
IP4 reassembly logic: One virtually reassembled flow requires a map_ip4_reass_t structure in order to...
#define MAP_IP4_REASS_CONF_POOL_SIZE_MAX
static u64 vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Get the value of a simple counter Scrapes the entire set of mini counters.
void map_ip6_reass_free(map_ip6_reass_t *r, u32 **pi_to_drop)
vlib_simple_counter_main_t * simple_domain_counters
static void * clib_mem_alloc_aligned(uword size, uword align)
ip4_main_t ip4_main
Global ip4 main structure.
#define MAP_IP6_REASS_MAX_FRAGMENTS_PER_REASSEMBLY
#define IP6_ROUTE_FLAG_ADD
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
u16 ip4_reass_conf_lifetime_ms
#define vec_foreach(var, vec)
Vector iterator.
i16 explicit_fib_index
Force re-lookup in a different FIB.
static clib_error_t * map_security_check_frag_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define MAP_IP4_REASS_CONF_BUFFERS_MAX
#define clib_error_return(e, args...)
void ip4_add_del_route(ip4_main_t *im, ip4_add_del_route_args_t *args)
This packet needs to go to MAP with Translation - RFC7599.
u32 ip6_reass_buffered_counter
#define CLIB_CACHE_LINE_BYTES
int map_ip6_reass_add_fragment(map_ip6_reass_t *r, u32 pi, u16 data_offset, u16 next_data_offset, u8 *data_start, u16 data_len)
static void map_pre_resolve(ip4_address_t *ip4, ip6_address_t *ip6)
clib_error_t * map_init(vlib_main_t *vm)
static clib_error_t * show_map_stats_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void map_ip6_drop_pi(u32 pi)
#define map_ip6_reass_pool_index(r)
static ip_adjacency_t * ip_get_adjacency(ip_lookup_main_t *lm, u32 adj_index)
static vlib_cli_command_t map_add_rule_command
(constructor) VLIB_CLI_COMMAND (map_add_rule_command)
u32 ip6_reass_conf_buffers
static uword pool_elts(void *v)
Number of active elements in a pool.