summaryrefslogtreecommitdiffstats
path: root/ripd/ripd.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-05-09 06:34:57 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-10-27 20:16:12 +0200
commit707656ec85360602d849fbbe7fe54c717194f4d5 (patch)
tree8393290ee162977eb3e9f53b84dd5b21c69c085f /ripd/ripd.h
parentlib: retrofit interface commands to the new northbound model (diff)
downloadfrr-707656ec85360602d849fbbe7fe54c717194f4d5.tar.xz
frr-707656ec85360602d849fbbe7fe54c717194f4d5.zip
yang, ripd: add 'frr-ripd.yang' and associated stub callbacks
Introduce frr-ripd.yang, which defines a model for managing the FRR ripd daemon. Also add frr-route-types.yang which defines typedefs for FRR route types. Update the 'frr_yang_module_info' array of ripd with the new 'frr-ripd' module. Add two new files (rip_cli.[ch]) which should contain all ripd commands converted to the new northbound model. Centralizing all commands in a single place will facilitate the process of moving the CLI to a separate program in the future. Add automatically generated stub callbacks in rip_northbound.c. These callbacks will be implemented gradually in the following commits. Add example JSON/XML ripd configurations in yang/examples/. Add the confd.frr-ripd.yang YANG module with annotations specific to the ConfD daemon. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.h')
-rw-r--r--ripd/ripd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 784b06460..78a204eb7 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -98,6 +98,10 @@
#define RIP_AUTH_MD5_SIZE 16
#define RIP_AUTH_MD5_COMPAT_SIZE RIP_RTE_SIZE
+/* YANG paths */
+#define RIP_INSTANCE "/frr-ripd:ripd/instance"
+#define RIP_IFACE "/frr-interface:lib/interface/frr-ripd:rip"
+
/* RIP structure. */
struct rip {
/* RIP socket. */
@@ -437,4 +441,8 @@ extern long rip_global_queries;
DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc))
DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc))
+/* Northbound. */
+extern void rip_cli_init(void);
+extern const struct frr_yang_module_info frr_ripd_info;
+
#endif /* _ZEBRA_RIP_H */