]>
git.proxmox.com Git - mirror_frr.git/blob - zebra/zserv.h
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
25 /* Default port information. */
26 #define ZEBRA_PORT 2600
27 #define ZEBRA_VTY_PORT 2601
28 #define ZEBRA_VTYSH_PATH "/tmp/.zebra"
29 #define ZEBRA_SERV_PATH "/tmp/.zserv"
31 /* Default configuration filename. */
32 #define DEFAULT_CONFIG_FILE "zebra.conf"
34 /* Client structure. */
37 /* Client file descriptor. */
40 /* Input/output buffer to the client. */
44 /* Threads for read/write. */
45 struct thread
*t_read
;
46 struct thread
*t_write
;
48 /* default routing table this client munges */
51 /* This client's redistribute flag. */
52 u_char redist
[ZEBRA_ROUTE_MAX
];
54 /* Redistribute default route flag. */
55 u_char redist_default
;
57 /* Interface information. */
61 /* Count prefix size from mask length */
62 #define PSIZE(a) (((a) + 7) / (8))
66 void zebra_if_init ();
69 void interface_list ();
73 void zebra_snmp_init ();
76 zsend_interface_add (struct zserv
*, struct interface
*);
78 zsend_interface_delete (struct zserv
*, struct interface
*);
81 zsend_interface_address_add (struct zserv
*, struct interface
*,
85 zsend_interface_address_delete (struct zserv
*, struct interface
*,
89 zsend_interface_up (struct zserv
*, struct interface
*);
92 zsend_interface_down (struct zserv
*, struct interface
*);
95 zsend_ipv4_add (struct zserv
*client
, int type
, int flags
,
96 struct prefix_ipv4
*p
, struct in_addr
*nexthop
,
97 unsigned int ifindex
);
100 zsend_ipv4_delete (struct zserv
*client
, int type
, int flags
,
101 struct prefix_ipv4
*p
, struct in_addr
*nexthop
,
102 unsigned int ifindex
);
105 zsend_ipv4_add_multipath (struct zserv
*, struct prefix
*, struct rib
*);
108 zsend_ipv4_delete_multipath (struct zserv
*, struct prefix
*, struct rib
*);
112 zsend_ipv6_add (struct zserv
*client
, int type
, int flags
,
113 struct prefix_ipv6
*p
, struct in6_addr
*nexthop
,
114 unsigned int ifindex
);
117 zsend_ipv6_delete (struct zserv
*client
, int type
, int flags
,
118 struct prefix_ipv6
*p
, struct in6_addr
*nexthop
,
119 unsigned int ifindex
);
122 zsend_ipv6_add_multipath (struct zserv
*, struct prefix
*, struct rib
*);
125 zsend_ipv6_delete_multipath (struct zserv
*, struct prefix
*, struct rib
*);
127 #endif /* HAVE_IPV6 */
130 extern pid_t old_pid
;
132 #endif /* _ZEBRA_ZEBRA_H */