summaryrefslogtreecommitdiffstats
path: root/ripd/ripd.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-05-09 06:34:58 +0200
committerRenato Westphal <renato@opensourcerouting.org>2018-10-27 20:16:12 +0200
commit8c9226c216f9bf3ee0ca28f8db52ef9d0956f411 (patch)
tree7dbbfccaa7e26222511de026a802f65ed46a491c /ripd/ripd.h
parentyang, ripd: add 'frr-ripd.yang' and associated stub callbacks (diff)
downloadfrr-8c9226c216f9bf3ee0ca28f8db52ef9d0956f411.tar.xz
frr-8c9226c216f9bf3ee0ca28f8db52ef9d0956f411.zip
ripd: retrofit the 'router rip' command to the new northbound model
* Implement the northbound callbacks associated to the '/frr-ripd:ripd/instance' YANG path (the code is mostly a copy and paste from the original "router rip" DEFUNs); * Move rip_create_socket() out of rip_create() since creating a socket is an error-prone operation and thus needs to be performed separately during the NB_EV_PREPARE phase; * On rip_create(), fetch the defaults from the frr-ripd YANG model; * Convert the "[no] router rip" CLI commands to be dumb wrappers around the northbound callbacks; * On config_write_rip(), write logic to call all 'cli_show' northbound callbacks defined under the '/frr-ripd:ripd/instance' YANG path. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r--ripd/ripd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ripd/ripd.h b/ripd/ripd.h
index 78a204eb7..8e34939f2 100644
--- a/ripd/ripd.h
+++ b/ripd/ripd.h
@@ -383,11 +383,14 @@ extern void rip_zclient_stop(void);
extern void rip_zclient_reset(void);
extern void rip_offset_init(void);
extern int if_check_address(struct in_addr addr);
+extern int rip_create(int socket);
extern int rip_request_send(struct sockaddr_in *, struct interface *, uint8_t,
struct connected *);
extern int rip_neighbor_lookup(struct sockaddr_in *);
+extern int rip_create_socket(void);
+
extern int rip_redistribute_check(int);
extern void rip_redistribute_add(int type, int sub_type, struct prefix_ipv4 *p,
struct nexthop *nh, unsigned int metric,