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
52 if (f & IP_NEIGHBOR_FLAG_STATIC)
54 if (f & IP_NEIGHBOR_FLAG_NO_FIB_ENTRY)
103 static f64 last_time;
110 clib_warning (
"ip6 nd event for %U to pid %d: queue stuffed!",
182 f |= IP_NEIGHBOR_FLAG_STATIC;
184 f |= IP_NEIGHBOR_FLAG_NO_FIB_ENTRY;
208 if (!(flags & IP_NEIGHBOR_FLAG_STATIC) &&
209 !(flags & IP_NEIGHBOR_FLAG_DYNAMIC))
210 flags |= IP_NEIGHBOR_FLAG_DYNAMIC;
220 flags, &stats_index);
238 vl_api_want_ip_neighbor_events_reply_t *rmp;
258 REPLY_MACRO (VL_API_WANT_IP_NEIGHBOR_EVENTS_REPLY);
264 vl_api_ip_neighbor_config_reply_t *rmp;
282 vl_api_ip_neighbor_replace_begin_reply_t *rmp;
288 REPLY_MACRO (VL_API_IP_NEIGHBOR_REPLACE_BEGIN_REPLY);
295 vl_api_ip_neighbor_replace_end_reply_t *rmp;
301 REPLY_MACRO (VL_API_IP_NEIGHBOR_REPLACE_END_REPLY);
307 vl_api_ip_neighbor_flush_reply_t *rmp;
323 #define vl_msg_name_crc_list 324 #include <vnet/ip-neighbor/ip_neighbor.api.h> 325 #undef vl_msg_name_crc_list 327 #include <vnet/ip-neighbor/ip_neighbor.api.c> 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.
Enable/disable periodic IP neighbor scan.
static void ip_neighbor_encode(vl_api_ip_neighbor_t *api, const ip_neighbor_t *ipn)
f64 ipn_time_last_updated
Aging related data.
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)
void ip_neighbor_del_all(ip46_type_t type, u32 sw_if_index)
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)
void ip_neighbor_sweep(ip46_type_t type)
#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...
vl_api_interface_index_t sw_if_index[default=0xffffffff]
int ip_neighbor_config(ip46_type_t type, u32 limit, u32 age, bool recycle)
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)
Decode/Encode for struct/union types.
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]
void ip_neighbor_mark(ip46_type_t type)
VLIB_API_INIT_FUNCTION(ip_neighbor_api_init)
mac_address_t ipn_mac
The learned MAC address of the neighbour.
static void vl_api_ip_neighbor_flush_t_handler(vl_api_ip_neighbor_flush_t *mp)
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 void vl_api_ip_neighbor_replace_end_t_handler(vl_api_ip_neighbor_replace_end_t *mp)
static vl_api_ip_neighbor_flags_t ip_neighbor_flags_encode(ip_neighbor_flags_t f)
IP neighbor add / del request.
static f64 clib_host_to_net_f64(f64 x)
#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 neighbour replace end.
IP neighbors dump response.
static vlib_main_t * vlib_get_main(void)
enum ip_address_family_t_ ip_address_family_t
vl_api_ip_neighbor_t neighbor
Register for IP4 ARP resolution event on receiving ARP reply or MAC/IP info from ARP requests in L2 B...
vl_api_ip_neighbor_t neighbor
IP neighbor flush request - removes all neighbours.
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.
IP neighbour replace begin.
void ip_address_encode(const ip46_address_t *in, ip46_type_t type, vl_api_address_t *out)
static void vl_api_ip_neighbor_replace_begin_t_handler(vl_api_ip_neighbor_replace_begin_t *mp)
ip_neighbor_t * ip_neighbor_get(index_t ipni)
vl_api_address_family_t af
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)
import vnet interface_types api
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)