diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-06-08 16:38:36 -0400 | 
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-06-10 15:05:25 -0400 | 
| commit | c8b27f2ad98f71842e506b8ccff403971769d8cb (patch) | |
| tree | d94ecb6922ff738e8e975b9f894f157566a93484 /sharpd/sharp_vty.c | |
| parent | 478ff17be6ea9512670bd9cbbeffc9efd693a5ea (diff) | |
sharpd,zebra: unicast support for zapi messages
Distinguish between unicast and broadcast opaque messages
in zebra handler code. Add cli and internal api changes to
have sharpd send unicast opaque messages. Add opaque cli
commands to the sharp user doc.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'sharpd/sharp_vty.c')
| -rw-r--r-- | sharpd/sharp_vty.c | 30 | 
1 files changed, 29 insertions, 1 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index bad59d172f..72e9c22f17 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -557,7 +557,34 @@ DEFPY (send_opaque,         "Type code to send\n"         "Number of messages to send\n")  { -	sharp_opaque_send(type, count); +	sharp_opaque_send(type, 0, 0, 0, count); +	return CMD_SUCCESS; +} + +DEFPY (send_opaque_unicast, +       send_opaque_unicast_cmd, +       "sharp send opaque unicast type (1-255) \ +       " FRR_IP_REDIST_STR_ZEBRA "$proto_str \ +        [{instance (0-1000) | session (1-1000)}] (1-1000)$count", +       SHARP_STR +       "Send messages for testing\n" +       "Send opaque messages\n" +       "Send unicast messages\n" +       "Type code to send\n" +       "Type code to send\n" +       FRR_IP_REDIST_HELP_STR_ZEBRA +       "Daemon instance\n" +       "Daemon instance\n" +       "Session ID\n" +       "Session ID\n" +       "Number of messages to send\n") +{ +	uint32_t proto; + +	proto = proto_redistnum(AFI_IP, proto_str); + +	sharp_opaque_send(type, proto, instance, session, count); +  	return CMD_SUCCESS;  } @@ -600,6 +627,7 @@ void sharp_vty_init(void)  	install_element(ENABLE_NODE, &sharp_remove_lsp_prefix_v4_cmd);  	install_element(ENABLE_NODE, &logpump_cmd);  	install_element(ENABLE_NODE, &send_opaque_cmd); +	install_element(ENABLE_NODE, &send_opaque_unicast_cmd);  	install_element(ENABLE_NODE, &send_opaque_reg_cmd);  	install_element(VIEW_NODE, &show_debugging_sharpd_cmd);  | 
