|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
22 #include <map/map.api_enum.h>
23 #include <map/map.api_types.h>
31 #define REPLY_MSG_ID_BASE mm->msg_id_base
49 (ip6_address_t *) & mp->
ip6_src.address,
66 vl_api_map_del_domain_reply_t *rmp;
78 vl_api_map_del_domain_reply_t *rmp;
110 sizeof (rmp->
ip6_src.address));
118 rmp->
mtu = htons (d->
mtu);
119 memcpy (rmp->
tag, de->
tag, tag_len - 1);
120 rmp->
tag[tag_len - 1] =
'\0';
158 send_domain_details (cursor, rp, mp->context);
190 if (
dst.as_u64[0] == 0 &&
dst.as_u64[1] == 0)
197 rmp->
psid = htons (
i);
221 rmp->_vl_msg_id = htons (VL_API_MAP_SUMMARY_STATS_REPLY + mm->
msg_id_base);
232 clib_memset (total_bytes, 0,
sizeof (total_bytes));
288 vl_api_map_param_set_fragmentation_reply_t *rmp;
293 REPLY_MACRO (VL_API_MAP_PARAM_SET_FRAGMENTATION_REPLY);
302 if (icmp_src_address == 0)
315 vl_api_map_param_set_icmp_reply_t *rmp;
338 vl_api_map_param_set_icmp6_reply_t *rmp;
352 vl_api_map_param_add_del_pre_resolve_reply_t *rmp;
358 REPLY_MACRO (VL_API_MAP_PARAM_ADD_DEL_PRE_RESOLVE_REPLY);
377 vl_api_map_param_set_security_check_reply_t *rmp;
382 REPLY_MACRO (VL_API_MAP_PARAM_SET_SECURITY_CHECK_REPLY);
402 vl_api_map_param_set_traffic_class_reply_t *rmp;
407 REPLY_MACRO (VL_API_MAP_PARAM_SET_TRAFFIC_CLASS_REPLY);
426 vl_api_map_param_set_tcp_reply_t *rmp;
446 rmp->_vl_msg_id = htons (VL_API_MAP_PARAM_GET_REPLY + mm->
msg_id_base);
482 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
484 is_enable = ! !is_enable;
499 if (is_translation ==
false)
504 is_enable ? 1 : 0, 0, 0);
506 is_enable ? 1 : 0, 0, 0);
516 is_enable ? 1 : 0, 0, 0);
518 is_enable ? 1 : 0, 0, 0);
532 vl_api_map_if_enable_disable_reply_t *rmp;
547 #include <map/map.api.c>
map_domain_extra_t * domain_extras
#define VALIDATE_SW_IF_INDEX(mp)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
vl_api_ip6_address_t ip6_dst
#define REPLY_MACRO2_END(t, body)
static void vl_api_map_add_domain_t_handler(vl_api_map_add_domain_t *mp)
#define clib_memcpy(d, s, n)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
Request for a single block of MAP parameters.
ip4_address_t icmp4_src_address
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vl_api_ip6_prefix_t ip6_src
static void vl_api_map_rule_dump_t_handler(vl_api_map_rule_dump_t *mp)
vl_api_ip6_prefix_t ip6_prefix
int map_param_set_traffic_class(bool copy, u8 tc)
Enable or disable a MAP interface.
Reply for map_summary_stats request.
static void vl_api_map_param_set_icmp6_t_handler(vl_api_map_param_set_icmp6_t *mp)
int map_param_set_icmp(ip4_address_t *icmp_src_address)
bool icmp6_enable_unreachable
vl_api_ip4_prefix_t ip4_prefix
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
uword * bm_encap_enabled_by_sw_if
static void vl_api_map_add_del_rule_t_handler(vl_api_map_add_del_rule_t *mp)
clib_error_t * map_plugin_api_hookup(vlib_main_t *vm)
int ip6_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
int map_param_set_icmp6(u8 enable_unreachable)
int map_add_del_psid(u32 map_domain_index, u16 psid, ip6_address_t *tep, bool is_add)
int ip4_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
static void vl_api_map_if_enable_disable_t_handler(vl_api_map_if_enable_disable_t *mp)
void map_pre_resolve(ip4_address_t *ip4, ip6_address_t *ip6, bool is_del)
Request for a single block of summary stats.
int map_delete_domain(u32 map_domain_index)
Set MAP fragmentation parameters.
static void map_domain_counter_lock(map_main_t *mm)
vl_api_ip6_address_t ip6_dst
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static void setup_message_id_table(api_main_t *am)
static void vl_api_map_param_set_traffic_class_t_handler(vl_api_map_param_set_traffic_class_t *mp)
static void vl_api_map_domains_get_t_handler(vl_api_map_domains_get_t *mp)
static void vl_api_map_param_set_security_check_t_handler(vl_api_map_param_set_security_check_t *mp)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static void map_domain_counter_unlock(map_main_t *mm)
IPv6 shallow virtual reassembly.
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
IPv4 shallow virtual reassembly.
static void vl_api_map_domain_dump_t_handler(vl_api_map_domain_dump_t *mp)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
Combined counter to hold both packets and byte differences.
vl_api_ip4_prefix_t ip4_prefix
An API client registration, only in vpp/vlib.
int ip6_full_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
static void vl_api_map_param_add_del_pre_resolve_t_handler(vl_api_map_param_add_del_pre_resolve_t *mp)
#define REPLY_MACRO_DETAILS4(t, rp, context, body)
static void vl_api_map_param_get_t_handler(vl_api_map_param_get_t *mp)
static void send_domain_details(u32 map_domain_index, vl_api_registration_t *rp, u32 context)
u64 map_error_counter_get(u32 node_index, map_error_t map_error)
vlib_combined_counter_main_t * domain_counters
sll srl srl sll sra u16x4 i
vl_api_ip4_address_t icmp_ip4_err_relay_src
Details about a single MAP domain.
vnet_feature_config_main_t * cm
#define REPLY_AND_DETAILS_MACRO(t, p, body)
vl_api_ip4_address_t ip4_nh_address
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, u8 *tag)
int map_param_set_fragmentation(bool inner, bool ignore_df)
Add/delete MAP pre-resolve IP addresses parameters.
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap.
static void vl_api_map_param_set_fragmentation_t_handler(vl_api_map_param_set_fragmentation_t *mp)
counter_t packets
packet counter
vnet_sw_interface_t * sw_interfaces
static void vl_api_map_param_set_icmp_t_handler(vl_api_map_param_set_icmp_t *mp)
#define BAD_SW_IF_INDEX_LABEL
Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
u32 vlib_combined_counter_n_counters(const vlib_combined_counter_main_t *cm)
The number of counters (not the number of per-thread counters)
static void vlib_get_combined_counter(const 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 per-thr...
vl_api_ip6_address_t ip6_nh_address
int map_if_enable_disable(bool is_enable, u32 sw_if_index, bool is_translation)
Set MAP security-check parameters.
#define pool_foreach_index(i, v)
A collection of combined counters.
counter_t bytes
byte counter
#define vec_foreach(var, vec)
Vector iterator.
vlib_node_registration_t ip4_map_node
(constructor) VLIB_REGISTER_NODE (ip4_map_node)
static uword pool_elts(void *v)
Number of active elements in a pool.
vl_api_ip6_address_t ip6_nh_address
Reply for map_param_get request.
uword * bm_trans_enabled_by_sw_if
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
Reply for MAP domain add.
static void vl_api_map_summary_stats_t_handler(vl_api_map_summary_stats_t *mp)
int map_param_set_tcp(u16 tcp_mss)
int map_param_set_security_check(bool enable, bool fragments)
vl_api_ip4_address_t ip4_nh_address
vl_api_interface_index_t sw_if_index
u64 total_security_check[2]
Set MAP traffic class parameters.
vl_api_interface_index_t sw_if_index
static void vl_api_map_param_set_tcp_t_handler(vl_api_map_param_set_tcp_t *mp)
vnet_interface_main_t interface_main
static void vl_api_map_del_domain_t_handler(vl_api_map_del_domain_t *mp)
Set MAP ICMP6 parameters.
vl_api_ip6_prefix_t ip6_src
void * vl_msg_api_alloc(int nbytes)
vl_api_ip4_address_t ip4_err_relay_src
vl_api_wireguard_peer_flags_t flags
vl_api_ip6_prefix_t ip6_prefix