aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r--src/vnet/ip/ip.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index 8959b4c09cc..38e53fdef75 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -96,73 +96,6 @@ ip_set (ip46_address_t * dst, void *src, u8 is_ip4)
sizeof (ip6_address_t));
}
-u8
-ip_interface_has_address (u32 sw_if_index, ip46_address_t * ip, u8 is_ip4)
-{
- ip_interface_address_t *ia = 0;
-
- if (is_ip4)
- {
- ip_lookup_main_t *lm4 = &ip4_main.lookup_main;
- ip4_address_t *ip4;
- /* *INDENT-OFF* */
- foreach_ip_interface_address (lm4, ia, sw_if_index, 1 /* unnumbered */ ,
- ({
- ip4 = ip_interface_address_get_address (lm4, ia);
- if (ip4_address_compare (ip4, &ip->ip4) == 0)
- return 1;
- }));
- /* *INDENT-ON* */
- }
- else
- {
- ip_lookup_main_t *lm6 = &ip6_main.lookup_main;
- ip6_address_t *ip6;
- /* *INDENT-OFF* */
- foreach_ip_interface_address (lm6, ia, sw_if_index, 1 /* unnumbered */ ,
- ({
- ip6 = ip_interface_address_get_address (lm6, ia);
- if (ip6_address_compare (ip6, &ip->ip6) == 0)
- return 1;
- }));
- /* *INDENT-ON* */
- }
- return 0;
-}
-
-void *
-ip_interface_get_first_ip (u32 sw_if_index, u8 is_ip4)
-{
- ip_lookup_main_t *lm4 = &ip4_main.lookup_main;
- ip_lookup_main_t *lm6 = &ip6_main.lookup_main;
- ip_interface_address_t *ia = 0;
-
- if (is_ip4)
- {
- /* *INDENT-OFF* */
- foreach_ip_interface_address (lm4, ia, sw_if_index, 1 /* unnumbered */ ,
- ({
- return ip_interface_address_get_address (lm4, ia);
- }));
- /* *INDENT-ON* */
- }
- else
- {
- /* *INDENT-OFF* */
- foreach_ip_interface_address (lm6, ia, sw_if_index, 1 /* unnumbered */ ,
- ({
- ip6_address_t *rv;
- rv = ip_interface_address_get_address (lm6, ia);
- /* Trying to use a link-local ip6 src address is a fool's errand */
- if (!ip6_address_is_link_local_unicast (rv))
- return rv;
- }));
- /* *INDENT-ON* */
- }
-
- return 0;
-}
-
u8 *
format_ip_address_family (u8 * s, va_list * args)
{