1 /* Zebra daemon server header.
2 * Copyright (C) 1997, 98 Kunihiro Ishiguro
4 * This file is part of GNU Zebra.
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GNU Zebra; see the file COPYING. If not, write to the Free
18 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 #ifndef _ZEBRA_ZSERV_H
23 #define _ZEBRA_ZSERV_H
27 #include "workqueue.h"
29 /* Default port information. */
30 #define ZEBRA_VTY_PORT 2601
32 /* Default configuration filename. */
33 #define DEFAULT_CONFIG_FILE "zebra.conf"
35 /* Client structure. */
38 /* Client file descriptor. */
41 /* Input/output buffer to the client. */
45 /* Buffer of data waiting to be written to client. */
48 /* Threads for read/write. */
49 struct thread
*t_read
;
50 struct thread
*t_write
;
52 /* Thread for delayed close. */
53 struct thread
*t_suicide
;
55 /* default routing table this client munges */
58 /* This client's redistribute flag. */
59 u_char redist
[ZEBRA_ROUTE_MAX
];
61 /* Redistribute default route flag. */
62 u_char redist_default
;
64 /* Interface information. */
67 /* Router-id information. */
75 struct thread_master
*master
;
76 struct list
*client_list
;
79 int rtm_table_default
;
82 struct work_queue
*ribq
;
83 struct meta_queue
*mq
;
86 /* Count prefix size from mask length */
87 #define PSIZE(a) (((a) + 7) / (8))
90 extern void zebra_init (void);
91 extern void zebra_if_init (void);
92 extern void hostinfo_get (void);
93 extern void rib_init (void);
94 extern void interface_list (void);
95 extern void kernel_init (void);
96 extern void route_read (void);
97 extern void zebra_route_map_init (void);
98 extern void zebra_snmp_init (void);
99 extern void zebra_vty_init (void);
101 extern int zsend_interface_add (struct zserv
*, struct interface
*);
102 extern int zsend_interface_delete (struct zserv
*, struct interface
*);
103 extern int zsend_interface_address (int, struct zserv
*, struct interface
*,
105 extern int zsend_interface_update (int, struct zserv
*, struct interface
*);
106 extern int zsend_route_multipath (int, struct zserv
*, struct prefix
*,
108 extern int zsend_router_id_update(struct zserv
*, struct prefix
*);
112 #endif /* _ZEBRA_ZEBRA_H */