summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj_internal.h
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-16 02:44:05 -0800
committerNeale Ranns <neale.ranns@cisco.com>2018-02-16 02:44:08 -0800
commitc819fc612f9a79eaba2981dc2e8f7c31552db5ea (patch)
treeba19a3f7b2f223ebd28e3fe87ad5f73ef81d9745 /src/vnet/adj/adj_internal.h
parent25d417f28680c78a709792d997884dd80227bb70 (diff)
Allow providers to override glean behaviour
and update glean address on local interface MAC change Change-Id: I530826d60c7e9db2b0fa2d45754139d82c5ea807 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj_internal.h')
-rw-r--r--src/vnet/adj/adj_internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/adj/adj_internal.h b/src/vnet/adj/adj_internal.h
index e6d276e4d02..3b7ddb2f10c 100644
--- a/src/vnet/adj/adj_internal.h
+++ b/src/vnet/adj/adj_internal.h
@@ -78,6 +78,21 @@ adj_fib_proto_2_nd (fib_protocol_t fp)
return (0);
}
+static inline ip46_type_t
+adj_proto_to_46 (fib_protocol_t proto)
+{
+ switch (proto)
+ {
+ case FIB_PROTOCOL_IP4:
+ return (IP46_TYPE_IP4);
+ case FIB_PROTOCOL_IP6:
+ return (IP46_TYPE_IP6);
+ default:
+ return (IP46_TYPE_IP4);
+ }
+ return (IP46_TYPE_IP4);
+}
+
/**
* @brief
* Get a pointer to an adjacency object from its index