|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
26 #include <vnet/ip/punt.api_enum.h>
27 #include <vnet/ip/punt.api_types.h>
29 #define REPLY_MSG_ID_BASE punt_main.msg_id_base
35 in = clib_net_to_host_u32 (in);
40 case PUNT_API_TYPE_##v: \
41 *out = PUNT_TYPE_##v; \
50 static vl_api_punt_type_t
59 pt = PUNT_API_TYPE_##v; \
65 return (clib_host_to_net_u32 (pt));
79 out->
port = clib_net_to_host_u16 (in->port);
104 out->
reason = clib_net_to_host_u32 (in->id);
124 case PUNT_TYPE_EXCEPTION:
127 case PUNT_TYPE_IP_PROTO:
140 out->port = clib_net_to_host_u16 (in->
port);
145 vl_api_punt_ip_proto_t * out)
153 vl_api_punt_exception_t * out)
155 out->id = clib_host_to_net_u32 (in->
reason);
168 case PUNT_TYPE_IP_PROTO:
171 case PUNT_TYPE_EXCEPTION:
173 &out->punt.exception);
181 vl_api_set_punt_reply_t *rmp;
286 vl_api_punt_socket_deregister_reply_t *rmp;
337 mp->
reason.id = clib_host_to_net_u32 (
id);
365 #include <vnet/ip/punt.api.c>
enum vlib_punt_reason_t_ vlib_punt_reason_t
The 'syatem' defined punt reasons.
static clib_error_t * punt_api_hookup(vlib_main_t *vm)
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static int vl_api_punt_exception_decode(const vl_api_punt_exception_t *in, punt_exception_t *out)
#define REPLY_MSG_ID_BASE
#define REPLY_MACRO2(t, body)
A registration, by a client, to direct punted traffic to a given node.
struct punt_socket_send_ctx_t_ punt_socket_send_ctx_t
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
vl_api_punt_reason_t reason
static int vl_api_punt_decode(const vl_api_punt_t *in, punt_reg_t *out)
Punt traffic to the host via socket.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void punt_reason_walk(punt_reason_walk_cb_t cb, void *ctx)
vl_api_ip_proto_t ip_proto_encode(ip_protocol_t ipp)
#define clib_error_report(e)
VLIB_API_INIT_FUNCTION(punt_api_hookup)
char * vnet_punt_get_server_pathname(void)
#define vec_cmp(v1, v2)
Compare two vectors (only applicable to vectors of signed numbers).
static void vl_api_punt_exception_encode(const punt_exception_t *in, vl_api_punt_exception_t *out)
static void vl_api_punt_socket_register_t_handler(vl_api_punt_socket_register_t *mp)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static vl_api_punt_type_t vl_api_punt_type_encode(punt_type_t in)
int ip_address_family_decode(vl_api_address_family_t af, ip_address_family_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
static int punt_reason_dump_walk_cb(vlib_punt_reason_t id, const u8 *name, void *args)
punt_exception_t exception
An API client registration, only in vpp/vlib.
vl_api_punt_reason_t reason
static void setup_message_id_table(api_main_t *am)
vl_api_registration_t * reg
void punt_client_walk(punt_type_t pt, punt_client_walk_cb_t cb, void *ctx)
Dump all or one of the exception punt reasons.
static void vl_api_punt_socket_deregister_t_handler(vl_api_punt_socket_deregister_t *mp)
clib_error_t * vnet_punt_socket_del(vlib_main_t *vm, const punt_reg_t *pr)
static void vl_api_punt_socket_dump_t_handler(vl_api_punt_socket_dump_t *mp)
vl_api_address_family_t ip_address_family_encode(ip_address_family_t af)
static walk_rc_t vl_api_punt_socket_send_details(const punt_client_t *pc, void *args)
static void vl_api_punt_l4_encode(const punt_l4_t *in, vl_api_punt_l4_t *out)
static void vl_api_punt_ip_proto_encode(const punt_ip_proto_t *in, vl_api_punt_ip_proto_t *out)
static void vl_api_punt_reason_dump_t_handler(vl_api_punt_reason_dump_t *mp)
#define vec_free(V)
Free vector's memory (no header).
static int vl_api_punt_type_decode(vl_api_punt_type_t in, punt_type_t *out)
static int vl_api_punt_l4_decode(const vl_api_punt_l4_t *in, punt_l4_t *out)
Definitions for punt infrastructure.
clib_error_t * vnet_punt_add_del(vlib_main_t *vm, const punt_reg_t *pr, bool is_add)
static void vl_api_set_punt_t_handler(vl_api_set_punt_t *mp)
int vl_api_vec_to_api_string(const u8 *vec, vl_api_string_t *str)
vlib_punt_reason_t reason
enum punt_type_t_ punt_type_t
u8 * vl_api_from_api_to_new_vec(void *mp, vl_api_string_t *astr)
clib_error_t * vnet_punt_socket_add(vlib_main_t *vm, u32 header_version, const punt_reg_t *pr, char *client_pathname)
Punt traffic to the host.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
struct punt_reason_dump_walk_ctx_t_ punt_reason_dump_walk_ctx_t
static vlib_main_t * vlib_get_main(void)
int ip_proto_decode(vl_api_ip_proto_t ipp, ip_protocol_t *out)
static void vl_api_punt_encode(const punt_reg_t *in, vl_api_punt_t *out)
int vlib_punt_reason_validate(vlib_punt_reason_t reason)
Validate that a punt reason is assigned.
static int vl_api_punt_ip_proto_decode(const vl_api_punt_ip_proto_t *in, punt_ip_proto_t *out)
enum walk_rc_t_ walk_rc_t
Walk return code.
void * vl_msg_api_alloc(int nbytes)
vl_api_registration_t * reg