summaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet/ethernet.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-09-30 10:53:31 +0000
committerOle Trøan <otroan@employees.org>2019-12-17 10:56:20 +0000
commitcbe25aab3be72154f2c706c39eeba6a77f34450f (patch)
tree131fb53b5ec973be045ffb9e2eb797af01d112a0 /src/vnet/ethernet/ethernet.h
parent96453fd2417ebd1d69354a7fb692976129cea80e (diff)
ip: Protocol Independent IP Neighbors
Type: feature - ip-neighbour: generic neighbour handling; APIs, DBs, event handling, aging - arp: ARP protocol implementation - ip6-nd; IPv6 neighbor discovery implementation; separate ND, MLD, RA - ip6-link; manage link-local addresses - l2-arp-term; events separated from IP neighbours, since they are not the same. vnet retains just enough education to perform ND/ARP packet construction. arp and ip6-nd to be moved to plugins soon. Change-Id: I88dedd0006b299344f4c7024a0aa5baa6b9a8bbe Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ethernet/ethernet.h')
-rw-r--r--src/vnet/ethernet/ethernet.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h
index cde6fb90038..2e5209c4423 100644
--- a/src/vnet/ethernet/ethernet.h
+++ b/src/vnet/ethernet/ethernet.h
@@ -257,8 +257,19 @@ typedef struct
u32 input_next_mpls;
} next_by_ethertype_t;
+struct ethernet_main_t_;
+
+typedef void (ethernet_address_change_function_t)
+ (struct ethernet_main_t_ * im, u32 sw_if_index, uword opaque);
+
typedef struct
{
+ ethernet_address_change_function_t *function;
+ uword function_opaque;
+} ethernet_address_change_ctx_t;
+
+typedef struct ethernet_main_t_
+{
vlib_main_t *vlib_main;
/* next node index for the L3 input node of each ethertype */
@@ -300,6 +311,10 @@ typedef struct
/* Allocated loopback instances */
uword *bm_loopback_instances;
+
+ /** Functions to call when interface hw address changes. */
+ ethernet_address_change_ctx_t *address_change_callbacks;
+
} ethernet_main_t;
extern ethernet_main_t ethernet_main;
@@ -552,8 +567,6 @@ void ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai);
u8 *ethernet_build_rewrite (vnet_main_t * vnm,
u32 sw_if_index,
vnet_link_t link_type, const void *dst_address);
-const u8 *ethernet_ip4_mcast_dst_addr (void);
-const u8 *ethernet_ip6_mcast_dst_addr (void);
void ethernet_input_init (vlib_main_t * vm, ethernet_main_t * em);
extern vlib_node_registration_t ethernet_input_node;