From 4ed5504a428fea4290cfe8594f5ff62edf50b878 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Mon, 1 Jun 2020 20:52:57 +0200 Subject: Added support for gateway ipv6 & cmd for sending unsollicited neighbor advertisement Change-Id: Iae35d3fa19ad7cf90d8c2e0c104b0e798ac34787 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/cmd_parser.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'VNFs/DPPD-PROX/cmd_parser.c') diff --git a/VNFs/DPPD-PROX/cmd_parser.c b/VNFs/DPPD-PROX/cmd_parser.c index 51a71f48..1f2d5fc1 100644 --- a/VNFs/DPPD-PROX/cmd_parser.c +++ b/VNFs/DPPD-PROX/cmd_parser.c @@ -2162,6 +2162,29 @@ static int parse_cmd_join_igmp(const char *str, struct input *input) return 0; } +static int parse_cmd_send_unsollicited_na(const char *str, struct input *input) +{ + unsigned lcores[RTE_MAX_LCORE], lcore_id, task_id, nb_cores; + + if (parse_cores_task(str, lcores, &task_id, &nb_cores)) + return -1; + + if (cores_task_are_valid(lcores, task_id, nb_cores)) { + for (unsigned int i = 0; i < nb_cores; i++) { + lcore_id = lcores[i]; + + if (!task_is_sub_mode(lcore_id, task_id, "ndp")) { + plog_err("Core %u task %u is not running ndp\n", lcore_id, task_id); + } + else { + struct task_base *tbase = lcore_cfg[lcore_id].tasks_all[task_id]; + send_unsollicited_neighbour_advertisement(tbase); + } + } + } + return 0; +} + static int parse_cmd_rx_tx_info(const char *str, struct input *input) { if (strcmp(str, "") != 0) { @@ -2301,6 +2324,7 @@ static struct cmd_str cmd_strings[] = { {"version", "", "Show version", parse_cmd_version}, {"join igmp", " ", "Send igmp membership report for group ", parse_cmd_join_igmp}, {"leave igmp", " ", "Send igmp leave group", parse_cmd_leave_igmp}, + {"send unsollicited na", " ", "Send Unsollicited Neighbor Advertisement", parse_cmd_send_unsollicited_na}, {0,0,0,0}, }; -- cgit 1.2.3-korg