]> git.proxmox.com Git - mirror_frr.git/blob - ripd/rip_nb_notifications.c
ripd: fix another memtype mismatch
[mirror_frr.git] / ripd / rip_nb_notifications.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2018 NetDEF, Inc.
4 * Renato Westphal
5 */
6
7 #include <zebra.h>
8
9 #include "if.h"
10 #include "vrf.h"
11 #include "log.h"
12 #include "prefix.h"
13 #include "table.h"
14 #include "command.h"
15 #include "routemap.h"
16 #include "northbound.h"
17 #include "libfrr.h"
18
19 #include "ripd/ripd.h"
20 #include "ripd/rip_nb.h"
21 #include "ripd/rip_debug.h"
22 #include "ripd/rip_interface.h"
23
24 /*
25 * XPath: /frr-ripd:authentication-type-failure
26 */
27 void ripd_notif_send_auth_type_failure(const char *ifname)
28 {
29 const char *xpath = "/frr-ripd:authentication-type-failure";
30 struct list *arguments;
31 char xpath_arg[XPATH_MAXLEN];
32 struct yang_data *data;
33
34 arguments = yang_data_list_new();
35
36 snprintf(xpath_arg, sizeof(xpath_arg), "%s/interface-name", xpath);
37 data = yang_data_new_string(xpath_arg, ifname);
38 listnode_add(arguments, data);
39
40 nb_notification_send(xpath, arguments);
41 }
42
43 /*
44 * XPath: /frr-ripd:authentication-failure
45 */
46 void ripd_notif_send_auth_failure(const char *ifname)
47 {
48 const char *xpath = "/frr-ripd:authentication-failure";
49 struct list *arguments;
50 char xpath_arg[XPATH_MAXLEN];
51 struct yang_data *data;
52
53 arguments = yang_data_list_new();
54
55 snprintf(xpath_arg, sizeof(xpath_arg), "%s/interface-name", xpath);
56 data = yang_data_new_string(xpath_arg, ifname);
57 listnode_add(arguments, data);
58
59 nb_notification_send(xpath, arguments);
60 }