|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
47 #define foreach_vpe_api_msg \
48 _(SR_MPLS_POLICY_DEL, sr_mpls_policy_del) \
49 _(SR_MPLS_STEERING_ADD_DEL, sr_mpls_steering_add_del) \
50 _(SR_MPLS_POLICY_ASSIGN_ENDPOINT_COLOR, sr_mpls_policy_assign_endpoint_color)
56 vl_api_sr_mpls_policy_add_reply_t *rmp;
66 clib_memcpy (seg, &this_address,
sizeof (this_address));
80 vl_api_sr_mpls_policy_mod_reply_t *rmp;
90 clib_memcpy (seg, &this_address,
sizeof (this_address));
105 vl_api_sr_mpls_policy_del_reply_t *rmp;
115 vl_api_sr_mpls_steering_add_del_reply_t *rmp;
117 ip46_address_t next_hop;
144 REPLY_MACRO (VL_API_SR_MPLS_STEERING_ADD_DEL_REPLY);
150 vl_api_sr_mpls_policy_assign_endpoint_color_reply_t *rmp;
163 REPLY_MACRO (VL_API_SR_MPLS_POLICY_ASSIGN_ENDPOINT_COLOR_REPLY);
171 #define vl_msg_name_crc_list
173 #undef vl_msg_name_crc_list
178 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
179 foreach_vl_msg_name_crc_sr_mpls;
189 vl_msg_api_set_handlers(VL_API_##N, #n, \
190 vl_api_##n##_t_handler, \
192 vl_api_##n##_t_endian, \
193 vl_api_##n##_t_print, \
194 sizeof(vl_api_##n##_t), 1);
203 "sr_mpls_policy_add",
206 vl_api_sr_mpls_policy_add_t_endian,
214 "sr_mpls_policy_mod",
217 vl_api_sr_mpls_policy_mod_t_endian,
218 vl_api_sr_mpls_policy_mod_t_print, 256, 1);
bool is_del[default=false]
int sr_mpls_policy_assign_endpoint_color(mpls_label_t bsid, ip46_address_t *endpoint, u8 endpoint_type, u32 color)
Update the Endpoint,Color tuple of an SR policy.
#define clib_memcpy(d, s, n)
static void vl_api_sr_mpls_steering_add_del_t_handler(vl_api_sr_mpls_steering_add_del_t *mp)
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
Segment Routing MPLS data structures definitions.
MPLS SR steering add/del.
static void vl_api_sr_mpls_policy_mod_t_handler(vl_api_sr_mpls_policy_mod_t *mp)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
vl_api_address_t endpoint
vl_api_address_t next_hop
MPLS SR steering add/del.
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
int sr_mpls_policy_add(mpls_label_t bsid, mpls_label_t *segments, u8 behavior, u32 weight)
Create a new SR policy.
static void setup_message_id_table(api_main_t *am)
static clib_error_t * sr_mpls_api_hookup(vlib_main_t *vm)
void ip_prefix_decode(const vl_api_prefix_t *in, fib_prefix_t *out)
static api_main_t * vlibapi_get_main(void)
static void vl_api_sr_mpls_policy_del_t_handler(vl_api_sr_mpls_policy_del_t *mp)
sll srl srl sll sra u16x4 i
int sr_mpls_steering_policy_add(mpls_label_t bsid, u32 table_id, ip46_address_t *prefix, u32 mask_width, u8 traffic_type, ip46_address_t *next_hop, u8 nh_type, u32 color, char co_bits, mpls_label_t vpn_label)
Steer traffic L3 traffic through a given SR-MPLS policy.
void vl_msg_api_set_handlers(int msg_id, char *msg_name, void *handler, void *cleanup, void *endian, void *print, int msg_size, int traced)
static void vl_api_sr_mpls_policy_assign_endpoint_color_t_handler(vl_api_sr_mpls_policy_assign_endpoint_color_t *mp)
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
static void * vl_api_sr_mpls_policy_add_t_print(vl_api_sr_mpls_policy_add_t *mp, void *handle)
void vl_noop_handler(void *mp)
vl_api_sr_policy_op_t operation
vl_api_address_t endpoint
static void vl_api_sr_mpls_policy_add_t_handler(vl_api_sr_mpls_policy_add_t *mp)
#define foreach_vpe_api_msg
int sr_mpls_steering_policy_del(ip46_address_t *prefix, u32 mask_width, u8 traffic_type, u32 table_id, u32 color)
Delete steering rule for an SR-MPLS policy.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u32 mpls_label_t
A label value only, i.e.
int sr_mpls_policy_del(mpls_label_t bsid)
Delete a SR policy.
VLIB_API_INIT_FUNCTION(sr_mpls_api_hookup)
Aggregate type for a prefix.
MPLS SR policy modification.
int sr_mpls_policy_mod(mpls_label_t bsid, u8 operation, mpls_label_t *segments, u32 sl_index, u32 weight)
Modify an existing SR policy.