Line data Source code
1 : /*
2 : * Copyright (C) 2018 NetDEF, Inc.
3 : * Renato Westphal
4 : *
5 : * This program is free software; you can redistribute it and/or modify it
6 : * under the terms of the GNU General Public License as published by the Free
7 : * Software Foundation; either version 2 of the License, or (at your option)
8 : * any later version.
9 : *
10 : * This program is distributed in the hope that it will be useful, but WITHOUT
11 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 : * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 : * more details.
14 : *
15 : * You should have received a copy of the GNU General Public License along
16 : * with this program; see the file COPYING; if not, write to the Free Software
17 : * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 : */
19 :
20 : #include <zebra.h>
21 :
22 : #include "if.h"
23 : #include "vrf.h"
24 : #include "log.h"
25 : #include "prefix.h"
26 : #include "table.h"
27 : #include "command.h"
28 : #include "routemap.h"
29 : #include "northbound.h"
30 : #include "libfrr.h"
31 :
32 : #include "ripd/ripd.h"
33 : #include "ripd/rip_nb.h"
34 : #include "ripd/rip_debug.h"
35 : #include "ripd/rip_interface.h"
36 :
37 : /*
38 : * XPath: /frr-ripd:authentication-type-failure
39 : */
40 0 : void ripd_notif_send_auth_type_failure(const char *ifname)
41 : {
42 0 : const char *xpath = "/frr-ripd:authentication-type-failure";
43 0 : struct list *arguments;
44 0 : char xpath_arg[XPATH_MAXLEN];
45 0 : struct yang_data *data;
46 :
47 0 : arguments = yang_data_list_new();
48 :
49 0 : snprintf(xpath_arg, sizeof(xpath_arg), "%s/interface-name", xpath);
50 0 : data = yang_data_new_string(xpath_arg, ifname);
51 0 : listnode_add(arguments, data);
52 :
53 0 : nb_notification_send(xpath, arguments);
54 0 : }
55 :
56 : /*
57 : * XPath: /frr-ripd:authentication-failure
58 : */
59 0 : void ripd_notif_send_auth_failure(const char *ifname)
60 : {
61 0 : const char *xpath = "/frr-ripd:authentication-failure";
62 0 : struct list *arguments;
63 0 : char xpath_arg[XPATH_MAXLEN];
64 0 : struct yang_data *data;
65 :
66 0 : arguments = yang_data_list_new();
67 :
68 0 : snprintf(xpath_arg, sizeof(xpath_arg), "%s/interface-name", xpath);
69 0 : data = yang_data_new_string(xpath_arg, ifname);
70 0 : listnode_add(arguments, data);
71 :
72 0 : nb_notification_send(xpath, arguments);
73 0 : }
|