26 #include <stn/stn.api_enum.h> 27 #include <stn/stn.api_types.h> 29 #define REPLY_MSG_ID_BASE stn_main.msg_id_base 32 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 36 vl_print (handle, (char *)s); \ 44 vl_api_stn_add_del_rule_reply_t *rmp;
94 #include <stn/stn.api.c>
#define pool_foreach(VAR, POOL)
Iterate through pool.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
u32 sw_if_index
TX interface to send packets to.
int stn_rule_add_del(stn_rule_add_del_args_t *args)
Add or delete an stn rule.
static u8 ip46_address_is_ip4(const ip46_address_t *ip46)
void * vl_msg_api_alloc(int nbytes)
ip46_address_t address
Destination address of intercepted packets.
u8 del
Whether to delete the rule.
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
Decode/Encode for struct/union types.
vl_api_interface_index_t sw_if_index
vl_api_interface_index_t sw_if_index
static void vl_api_stn_add_del_rule_t_handler(vl_api_stn_add_del_rule_t *mp)
STN response to rules request.
static void vl_api_stn_rules_dump_t_handler(vl_api_stn_rules_dump_t *mp)
vl_api_address_t ip_address
An API client registration, only in vpp/vlib.
static void setup_message_id_table(api_main_t *am)
vl_api_address_t ip_address
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
clib_error_t * stn_api_init(vlib_main_t *vm, stn_main_t *sm)
static void send_stn_rules_details(stn_rule_t *r, vl_api_registration_t *reg, u32 context)