IP-MAC,ND:wildcard events,fix sending multiple events
[vpp.git] / src / vnet / ethernet / ethernet.h
index 2fc5b80..a6846b1 100644 (file)
@@ -169,6 +169,7 @@ typedef struct
 #define SUBINT_CONFIG_MATCH_3_TAG (1<<3)
 #define SUBINT_CONFIG_VALID       (1<<4)
 #define SUBINT_CONFIG_L2          (1<<5)
+#define SUBINT_CONFIG_P2P         (1<<6)
 
 } subint_config_t;
 
@@ -352,7 +353,7 @@ ethernet_buffer_get_header (vlib_buffer_t * b)
  * the number of headers is not known.
  */
 #define ethernet_buffer_get_vlan_count(b) ( \
-    ((b)->flags & ETH_BUFFER_VLAN_BITS) >> LOG2_ETH_BUFFER_VLAN_1_DEEP \
+    ((b)->flags & VNET_BUFFER_FLAGS_VLAN_BITS) >> VNET_BUFFER_F_LOG2_VLAN_1_DEEP \
 )
 
 /** Sets the number of VLAN headers in the current Ethernet frame in the
@@ -360,8 +361,8 @@ ethernet_buffer_get_header (vlib_buffer_t * b)
  * the number of headers is not known.
  */
 #define ethernet_buffer_set_vlan_count(b, v) ( \
-    (b)->flags = ((b)->flags & ~ETH_BUFFER_VLAN_BITS) | \
-        (((v) << LOG2_ETH_BUFFER_VLAN_1_DEEP) & ETH_BUFFER_VLAN_BITS) \
+    (b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | \
+        (((v) << VNET_BUFFER_F_LOG2_VLAN_1_DEEP) & VNET_BUFFER_FLAGS_VLAN_BITS) \
 )
 
 /** Adjusts the vlan count by the delta in 'v' */
@@ -372,10 +373,10 @@ ethernet_buffer_get_header (vlib_buffer_t * b)
 
 /** Adjusts the vlan count by the header size byte delta in 'v' */
 #define ethernet_buffer_adjust_vlan_count_by_bytes(b, v) ( \
-    (b)->flags = ((b)->flags & ~ETH_BUFFER_VLAN_BITS) | (( \
-        ((b)->flags & ETH_BUFFER_VLAN_BITS) + \
-        ((v) << (LOG2_ETH_BUFFER_VLAN_1_DEEP - 2)) \
-    ) & ETH_BUFFER_VLAN_BITS) \
+    (b)->flags = ((b)->flags & ~VNET_BUFFER_FLAGS_VLAN_BITS) | (( \
+        ((b)->flags & VNET_BUFFER_FLAGS_VLAN_BITS) + \
+        ((v) << (VNET_BUFFER_F_LOG2_VLAN_1_DEEP - 2)) \
+    ) & VNET_BUFFER_FLAGS_VLAN_BITS) \
 )
 
 /**
@@ -542,6 +543,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);
 
@@ -556,6 +559,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 */
 
 /*