30 #include <vnet/ip-neighbor/ip_neighbor.api_enum.h> 31 #include <vnet/ip-neighbor/ip_neighbor.api_types.h> 34 #define REPLY_MSG_ID_BASE msg_id_base 47 static vl_api_ip_neighbor_flags_t
103 static f64 last_time;
110 clib_warning (
"ip6 nd event for %U to pid %d: queue stuffed!",
217 flags, &stats_index);
235 vl_api_want_ip_neighbor_events_reply_t *rmp;
255 REPLY_MACRO (VL_API_WANT_IP_NEIGHBOR_EVENTS_REPLY);
261 vl_api_ip_neighbor_config_reply_t *rmp;
275 #define vl_msg_name_crc_list 276 #include <vnet/ip-neighbor/ip_neighbor.api.h> 277 #undef vl_msg_name_crc_list 279 #include <vnet/ip-neighbor/ip_neighbor.api.c> Enable/disable periodic IP neighbor scan.
static void ip_neighbor_encode(vl_api_ip_neighbor_t *api, const ip_neighbor_t *ipn)
vl_api_address_family_t af
void mac_address_encode(const mac_address_t *in, u8 *out)
vl_api_ip_neighbor_t neighbor
static ip_neighbor_flags_t ip_neighbor_flags_decode(vl_api_ip_neighbor_flags_t v)
int ip_neighbor_add(const ip46_address_t *ip, ip46_type_t type, const mac_address_t *mac, u32 sw_if_index, ip_neighbor_flags_t flags, u32 *stats_index)
#define REPLY_MACRO2(t, body)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static f64 vlib_time_now(vlib_main_t *vm)
static void vl_api_send_msg(vl_api_registration_t *rp, u8 *elem)
static walk_rc_t send_ip_neighbor_details(index_t ipni, void *arg)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
int ip_neighbor_config(ip46_type_t type, u32 limit, u32 age, bool recycle)
enum ip_address_family_t_ ip_address_family_t
void * vl_msg_api_alloc(int nbytes)
int ip_neighbor_del(const ip46_address_t *ip, ip46_type_t type, u32 sw_if_index)
enum walk_rc_t_ walk_rc_t
Walk return code.
static int vl_api_can_send_msg(vl_api_registration_t *rp)
vl_api_interface_index_t sw_if_index
static void vl_api_ip_neighbor_config_t_handler(vl_api_ip_neighbor_config_t *mp)
A representation of an IP neighbour/peer.
void ip_neighbor_handle_event(const ip_neighbor_event_t *ipne)
From the watcher to the API to publish a new neighbor.
static void vl_api_ip_neighbor_add_del_t_handler(vl_api_ip_neighbor_add_del_t *mp, vlib_main_t *vm)
ip46_type_t ip_address_decode(const vl_api_address_t *in, ip46_address_t *out)
void ip_neighbor_watch(const ip46_address_t *ip, ip46_type_t type, u32 sw_if_index, const ip_neighbor_watcher_t *watch)
vl_api_fib_path_type_t type
static clib_error_t * ip_neighbor_api_init(vlib_main_t *vm)
vl_api_interface_index_t sw_if_index[default=0xffffffff]
VLIB_API_INIT_FUNCTION(ip_neighbor_api_init)
mac_address_t ipn_mac
The learned MAC address of the neighbour.
format_function_t format_ip46_address
An API client registration, only in vpp/vlib.
static void vl_api_want_ip_neighbor_events_t_handler(vl_api_want_ip_neighbor_events_t *mp)
#define BAD_SW_IF_INDEX_LABEL
vl_api_registration_t * reg
void ip_neighbor_walk(ip46_type_t type, u32 sw_if_index, ip_neighbor_walk_cb_t cb, void *ctx)
#define clib_warning(format, args...)
IP neighbor add / del reply.
Tell client about an IP4 ARP resolution event or MAC/IP info from ARP requests in L2 BDs...
static vl_api_registration_t * vl_api_client_index_to_registration(u32 index)
static vl_api_ip_neighbor_flags_t ip_neighbor_flags_encode(ip_neighbor_flags_t f)
IP neighbor add / del request.
import vnet interface_types api
#define REPLY_MSG_ID_BASE
ip_neighbor_key_t * ipn_key
The idempotent key.
static void vl_api_ip_neighbor_dump_t_handler(vl_api_ip_neighbor_dump_t *mp)
IP neighboors dump response.
static vlib_main_t * vlib_get_main(void)
vl_api_ip_neighbor_t neighbor
Register for IP4 ARP resolution event on receing ARP reply or MAC/IP info from ARP requests in L2 BDs...
vl_api_ip_neighbor_t neighbor
struct ip_neighbor_dump_ctx_t_ ip_neighbor_dump_ctx_t
vl_api_interface_index_t sw_if_index[default=0xffffffff]
ip_neighbor_flags_t ipn_flags
Falgs for this object.
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
int ip_address_family_decode(int _af, ip_address_family_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
ip_neighbor_t * ip_neighbor_get(index_t ipni)
static void setup_message_id_table(snat_main_t *sm, api_main_t *am)
vl_api_address_family_t af
static ip46_type_t ip46_type_from_af(ip_address_family_t af)
enum ip_neighbor_flags_t_ ip_neighbor_flags_t
void mac_address_decode(const u8 *in, mac_address_t *out)
Conversion functions to/from (decode/encode) API types to VPP internal types.
#define ip46_address_initializer
ip_neighbor_watcher_t ipne_watch
#define VALIDATE_SW_IF_INDEX(mp)
void ip_neighbor_unwatch(const ip46_address_t *ip, ip46_type_t type, u32 sw_if_index, const ip_neighbor_watcher_t *watch)