#include <dhcp/dhcp6_pd_client_dp.h>
#include <vnet/ip/ip.h>
#include <vnet/ip/ip6.h>
-#include <vnet/ip/ip6_neighbor.h>
+#include <vnet/ip/ip6_link.h>
+#include <vnet/ip6-nd/ip6_ra.h>
#include <float.h>
#include <math.h>
#include <string.h>
static void interrupt_process (void);
-static u32
-ip6_enable (u32 sw_if_index)
-{
- dhcp6_pd_client_cp_main_t *rm = &dhcp6_pd_client_cp_main;
- clib_error_t *rv;
-
- rv = enable_ip6_interface (rm->vlib_main, sw_if_index);
-
- return rv != 0;
-}
-
static u8
ip6_prefixes_equal (ip6_address_t * prefix1, ip6_address_t * prefix2, u8 len)
{
addr.as_u64[0] &= im->fib_masks[address_info->prefix_length].as_u64[0];
addr.as_u64[1] &= im->fib_masks[address_info->prefix_length].as_u64[1];
- rv = ip6_neighbor_ra_prefix (vm, address_info->sw_if_index,
- &addr, address_info->prefix_length,
- 0 /* use_default */ ,
- prefix_info->valid_lt,
- prefix_info->preferred_lt,
- 0 /* no_advertise */ ,
- 0 /* off_link */ ,
- 0 /* no_autoconfig */ ,
- 0 /* no_onlink */ ,
- enable == 0 /* is_no */ );
+ rv = ip6_ra_prefix (vm, address_info->sw_if_index,
+ &addr, address_info->prefix_length,
+ 0 /* use_default */ ,
+ prefix_info->valid_lt,
+ prefix_info->preferred_lt, 0 /* no_advertise */ ,
+ 0 /* off_link */ ,
+ 0 /* no_autoconfig */ ,
+ 0 /* no_onlink */ ,
+ enable == 0 /* is_no */ );
if (rv != 0)
{
clib_warning ("ip6_neighbor_ra_prefix returned %d", rv);
dhcp6_clients_enable_disable (1);
}
- ip6_enable (sw_if_index);
+ ip6_link_enable (sw_if_index);
send_client_message_start_stop (sw_if_index, ~0, DHCPV6_MSG_SOLICIT,
0, 1);
}
};
/* *INDENT-ON* */
+#include <vlib/unix/plugin.h>
+
static clib_error_t *
dhcp_pd_client_cp_init (vlib_main_t * vm)
{