X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fethernet%2Fethernet.h;h=9a97817262c82f8bb8cbbe067701a61285dca0d6;hb=b795bd0c5cadfc6734ee8b2355cbc3965be0a1c1;hp=9ca256c94ce8462bdb03916ab073411b39ea2ae4;hpb=15ac81c16fba83033090299413a3a2dbb848a0f9;p=vpp.git diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h index 9ca256c94ce..9a97817262c 100644 --- a/src/vnet/ethernet/ethernet.h +++ b/src/vnet/ethernet/ethernet.h @@ -61,6 +61,12 @@ ethernet_mac_address_is_multicast_u64 (u64 a) return (a & (1ULL << (5 * 8))) != 0; } +static inline int +ethernet_mac_address_is_zero (u8 * mac) +{ + return ((*((u32 *) mac) == 0) && (*((u16 *) (mac + 4)) == 0)); +} + static_always_inline int ethernet_frame_is_tagged (u16 type) { @@ -271,7 +277,7 @@ typedef struct uword *bm_loopback_instances; } ethernet_main_t; -ethernet_main_t ethernet_main; +extern ethernet_main_t ethernet_main; always_inline ethernet_type_info_t * ethernet_get_type_info (ethernet_main_t * em, ethernet_type_t type) @@ -543,6 +549,8 @@ int vnet_add_del_ip4_arp_change_event (vnet_main_t * vnm, uword type_opaque, uword data, int is_add); +void wc_arp_set_publisher_node (uword inode_index, uword event_type); + void ethernet_arp_change_mac (u32 sw_if_index); void ethernet_ndp_change_mac (u32 sw_if_index); @@ -557,6 +565,13 @@ const u8 *ethernet_ip6_mcast_dst_addr (void); extern vlib_node_registration_t ethernet_input_node; +typedef struct +{ + u32 sw_if_index; + u32 ip4; + u8 mac[6]; +} wc_arp_report_t; + #endif /* included_ethernet_h */ /*