summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_neighbor.c
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-05-03 10:03:50 +0200
committerOle Trøan <otroan@employees.org>2018-05-14 10:20:24 +0000
commit5257452d38a3441b5cc22c010c3c586523919433 (patch)
treebed9790d8d7f20f73f9b38a68873e079e5525194 /src/vnet/ip/ip6_neighbor.c
parent17e5cfbe8d9b1f47b18eb1a43976fe322e3987a2 (diff)
Rework CP and DP communication in IPv6 RD (VPP-1256)
Replace binary API communication between CP and DP with direct communication using function calls and callbacks. Change-Id: Ib54f09062217c028e5ee0e96ae2449cf7e9224e3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip6_neighbor.c')
-rw-r--r--src/vnet/ip/ip6_neighbor.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 6b63e6fbbf6..5e98475f94d 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -230,6 +230,7 @@ typedef union
} ip6_icmp_neighbor_discovery_event_data_t;
static ip6_neighbor_main_t ip6_neighbor_main;
+ip6_neighbor_public_main_t ip6_neighbor_public_main;
static ip6_address_t ip6a_zero; /* ip6 address 0 */
static void wc_nd_signal_report (wc_nd_report_t * r);
@@ -1417,6 +1418,23 @@ ip6_neighbor_syslog (vlib_main_t * vm, int priority, char *fmt, ...)
return;
}
+clib_error_t *
+call_ip6_neighbor_callbacks (void *data,
+ _vnet_ip6_neighbor_function_list_elt_t * elt)
+{
+ clib_error_t *error = 0;
+
+ while (elt)
+ {
+ error = elt->fp (data);
+ if (error)
+ return error;
+ elt = elt->next_ip6_neighbor_function;
+ }
+
+ return error;
+}
+
/* ipv6 neighbor discovery - router advertisements */
typedef enum
{
@@ -2434,9 +2452,9 @@ icmp6_send_router_solicitation (vlib_main_t * vm, u32 sw_if_index, u8 stop,
rai = nm->if_radv_pool_index_by_sw_if_index[sw_if_index];
ra = pool_elt_at_index (nm->if_radv_pool, rai);
- if (stop)
- stop_sending_rs (vm, ra);
- else
+ stop_sending_rs (vm, ra);
+
+ if (!stop)
{
ra->keep_sending_rs = 1;
ra->params = *params;