Annotation of embedaddon/quagga/zebra/zserv.h, revision 1.1.1.3

1.1       misho       1: /* Zebra daemon server header.
                      2:  * Copyright (C) 1997, 98 Kunihiro Ishiguro
                      3:  *
                      4:  * This file is part of GNU Zebra.
                      5:  *
                      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
                      9:  * later version.
                     10:  *
                     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.
                     15:  *
                     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
                     19:  * 02111-1307, USA.  
                     20:  */
                     21: 
                     22: #ifndef _ZEBRA_ZSERV_H
                     23: #define _ZEBRA_ZSERV_H
                     24: 
                     25: #include "rib.h"
                     26: #include "if.h"
                     27: #include "workqueue.h"
1.1.1.3 ! misho      28: #include "vrf.h"
1.1       misho      29: 
                     30: /* Default port information. */
                     31: #define ZEBRA_VTY_PORT                2601
                     32: 
                     33: /* Default configuration filename. */
                     34: #define DEFAULT_CONFIG_FILE "zebra.conf"
                     35: 
                     36: /* Client structure. */
                     37: struct zserv
                     38: {
                     39:   /* Client file descriptor. */
                     40:   int sock;
                     41: 
                     42:   /* Input/output buffer to the client. */
                     43:   struct stream *ibuf;
                     44:   struct stream *obuf;
                     45: 
                     46:   /* Buffer of data waiting to be written to client. */
                     47:   struct buffer *wb;
                     48: 
                     49:   /* Threads for read/write. */
                     50:   struct thread *t_read;
                     51:   struct thread *t_write;
                     52: 
                     53:   /* Thread for delayed close. */
                     54:   struct thread *t_suicide;
                     55: 
                     56:   /* default routing table this client munges */
                     57:   int rtm_table;
                     58: 
                     59:   /* This client's redistribute flag. */
1.1.1.3 ! misho      60:   vrf_bitmap_t redist[ZEBRA_ROUTE_MAX];
1.1       misho      61: 
                     62:   /* Redistribute default route flag. */
1.1.1.3 ! misho      63:   vrf_bitmap_t redist_default;
1.1       misho      64: 
                     65:   /* Interface information. */
1.1.1.3 ! misho      66:   vrf_bitmap_t ifinfo;
1.1       misho      67: 
                     68:   /* Router-id information. */
1.1.1.3 ! misho      69:   vrf_bitmap_t ridinfo;
1.1       misho      70: };
                     71: 
                     72: /* Zebra instance */
                     73: struct zebra_t
                     74: {
                     75:   /* Thread master */
                     76:   struct thread_master *master;
                     77:   struct list *client_list;
                     78: 
                     79:   /* default table */
                     80:   int rtm_table_default;
                     81: 
                     82:   /* rib work queue */
                     83:   struct work_queue *ribq;
                     84:   struct meta_queue *mq;
                     85: };
                     86: 
                     87: /* Count prefix size from mask length */
                     88: #define PSIZE(a) (((a) + 7) / (8))
                     89: 
                     90: /* Prototypes. */
                     91: extern void zebra_init (void);
                     92: extern void zebra_if_init (void);
1.1.1.2   misho      93: extern void zebra_zserv_socket_init (char *path);
1.1       misho      94: extern void hostinfo_get (void);
                     95: extern void rib_init (void);
1.1.1.3 ! misho      96: extern void interface_list (struct zebra_vrf *);
        !            97: extern void route_read (struct zebra_vrf *);
        !            98: extern void kernel_init (struct zebra_vrf *);
        !            99: extern void kernel_terminate (struct zebra_vrf *);
1.1       misho     100: extern void zebra_route_map_init (void);
                    101: extern void zebra_snmp_init (void);
                    102: extern void zebra_vty_init (void);
                    103: 
                    104: extern int zsend_interface_add (struct zserv *, struct interface *);
                    105: extern int zsend_interface_delete (struct zserv *, struct interface *);
                    106: extern int zsend_interface_address (int, struct zserv *, struct interface *,
                    107:                                     struct connected *);
                    108: extern int zsend_interface_update (int, struct zserv *, struct interface *);
                    109: extern int zsend_route_multipath (int, struct zserv *, struct prefix *, 
                    110:                                   struct rib *);
1.1.1.3 ! misho     111: extern int zsend_router_id_update (struct zserv *, struct prefix *,
        !           112:                                    vrf_id_t);
1.1       misho     113: 
                    114: extern pid_t pid;
                    115: 
                    116: #endif /* _ZEBRA_ZEBRA_H */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>