mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-08-02 08:33:36 +00:00
zebra: Make zserv.h the true api for zapi northbound
zserv.c had a grab bag of function declarations that did not belong in it. Move those to where they better belong. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
c0d136aec2
commit
05f7f5db89
@ -313,6 +313,8 @@ static inline void zebra_if_set_ziftype(struct interface *ifp,
|
||||
#define IS_ZEBRA_IF_VRF_SLAVE(ifp) \
|
||||
(((struct zebra_if *)(ifp->info))->zif_slave_type == ZEBRA_IF_SLAVE_VRF)
|
||||
|
||||
extern void zebra_if_init(void);
|
||||
|
||||
extern struct interface *if_lookup_by_index_per_ns(struct zebra_ns *,
|
||||
u_int32_t);
|
||||
extern struct interface *if_lookup_by_name_per_ns(struct zebra_ns *,
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/kernel_netlink.h"
|
||||
#include "zebra/rt_netlink.h"
|
||||
|
||||
@ -435,4 +435,8 @@ static inline void rib_tables_iter_cleanup(rib_tables_iter_t *iter)
|
||||
DECLARE_HOOK(rib_update, (struct route_node * rn, const char *reason),
|
||||
(rn, reason))
|
||||
|
||||
|
||||
extern void zebra_vty_init(void);
|
||||
extern pid_t pid;
|
||||
|
||||
#endif /*_ZEBRA_RIB_H */
|
||||
|
||||
14
zebra/rt.h
14
zebra/rt.h
@ -112,4 +112,18 @@ extern int kernel_add_neigh(struct interface *ifp, struct ipaddr *ip,
|
||||
struct ethaddr *mac);
|
||||
extern int kernel_del_neigh(struct interface *ifp, struct ipaddr *ip);
|
||||
|
||||
/*
|
||||
* Southbound Initialization routines to get initial starting
|
||||
* state.
|
||||
*/
|
||||
extern void interface_list(struct zebra_ns *zns);
|
||||
extern void kernel_init(struct zebra_ns *zns);
|
||||
extern void kernel_terminate(struct zebra_ns *zns);
|
||||
extern void macfdb_read(struct zebra_ns *zns);
|
||||
extern void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
|
||||
struct interface *br_if);
|
||||
extern void neigh_read(struct zebra_ns *zns);
|
||||
extern void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *ifp);
|
||||
extern void route_read(struct zebra_ns *zns);
|
||||
|
||||
#endif /* _ZEBRA_RT_H */
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include "vty.h"
|
||||
|
||||
#include "zebra/rib.h"
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/rt.h"
|
||||
|
||||
/* Thank you, Solaris, for polluting application symbol namespace. */
|
||||
#undef hook_register
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#ifdef GNU_LINUX
|
||||
|
||||
#include "vty.h"
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/rt_netlink.h"
|
||||
|
||||
void route_read(struct zebra_ns *zns)
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
#include "log.h"
|
||||
#include "vrf.h"
|
||||
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/kernel_socket.h"
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "zebra_ns.h"
|
||||
#include "zebra_vrf.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "rt.h"
|
||||
|
||||
DEFINE_MTYPE(ZEBRA, ZEBRA_NS, "Zebra Name Space")
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#ifndef __ZEBRA_ROUTEMAP_H__
|
||||
#define __ZEBRA_ROUTEMAP_H__
|
||||
|
||||
extern void zebra_route_map_init(void);
|
||||
extern void zebra_routemap_config_write_protocol(struct vty *vty);
|
||||
extern char *zebra_get_import_table_route_map(afi_t afi, uint32_t table);
|
||||
extern void zebra_add_import_table_route_map(afi_t afi, const char *rmap_name,
|
||||
|
||||
@ -149,21 +149,7 @@ extern unsigned int multipath_num;
|
||||
|
||||
/* Prototypes. */
|
||||
extern void zserv_init(void);
|
||||
extern void zebra_if_init(void);
|
||||
extern void zebra_zserv_socket_init(char *path);
|
||||
extern void hostinfo_get(void);
|
||||
extern void rib_init(void);
|
||||
extern void interface_list(struct zebra_ns *);
|
||||
extern void route_read(struct zebra_ns *);
|
||||
extern void macfdb_read(struct zebra_ns *);
|
||||
extern void macfdb_read_for_bridge(struct zebra_ns *, struct interface *,
|
||||
struct interface *);
|
||||
extern void neigh_read(struct zebra_ns *);
|
||||
extern void neigh_read_for_vlan(struct zebra_ns *, struct interface *);
|
||||
extern void kernel_init(struct zebra_ns *);
|
||||
extern void kernel_terminate(struct zebra_ns *);
|
||||
extern void zebra_route_map_init(void);
|
||||
extern void zebra_vty_init(void);
|
||||
|
||||
extern int zsend_vrf_add(struct zserv *, struct zebra_vrf *);
|
||||
extern int zsend_vrf_delete(struct zserv *, struct zebra_vrf *);
|
||||
@ -189,8 +175,6 @@ extern int zsend_route_notify_owner(u_char proto, u_short instance,
|
||||
vrf_id_t vrf_id, struct prefix *p,
|
||||
enum zapi_route_notify_owner note);
|
||||
|
||||
extern pid_t pid;
|
||||
|
||||
extern void zserv_create_header(struct stream *s, uint16_t cmd,
|
||||
vrf_id_t vrf_id);
|
||||
extern void zserv_nexthop_num_warn(const char *, const struct prefix *,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user