X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fadj%2Fadj_internal.h;h=3b7ddb2f10cd725879994cb563c721f54930a78d;hb=c819fc612f9a79eaba2981dc2e8f7c31552db5ea;hp=e6d276e4d0246792f18c691fe2fcd772e8548d64;hpb=25d417f28680c78a709792d997884dd80227bb70;p=vpp.git 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