Annotation of embedaddon/quagga/ospf6d/ospf6_interface.h, revision 1.1.1.3

1.1       misho       1: /*
                      2:  * Copyright (C) 2003 Yasuhiro Ohara
                      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 
                     18:  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
                     19:  * Boston, MA 02111-1307, USA.  
                     20:  */
                     21: 
                     22: #ifndef OSPF6_INTERFACE_H
                     23: #define OSPF6_INTERFACE_H
                     24: 
                     25: #include "if.h"
                     26: 
                     27: /* Debug option */
                     28: extern unsigned char conf_debug_ospf6_interface;
                     29: #define OSPF6_DEBUG_INTERFACE_ON() \
                     30:   (conf_debug_ospf6_interface = 1)
                     31: #define OSPF6_DEBUG_INTERFACE_OFF() \
                     32:   (conf_debug_ospf6_interface = 0)
                     33: #define IS_OSPF6_DEBUG_INTERFACE \
                     34:   (conf_debug_ospf6_interface)
                     35: 
                     36: /* Interface structure */
                     37: struct ospf6_interface
                     38: {
                     39:   /* IF info from zebra */
                     40:   struct interface *interface;
                     41: 
                     42:   /* back pointer */
                     43:   struct ospf6_area *area;
                     44: 
                     45:   /* list of ospf6 neighbor */
                     46:   struct list *neighbor_list;
                     47: 
                     48:   /* linklocal address of this I/F */
                     49:   struct in6_addr *linklocal_addr;
                     50: 
                     51:   /* Interface ID; use interface->ifindex */
                     52: 
                     53:   /* ospf6 instance id */
                     54:   u_char instance_id;
                     55: 
                     56:   /* I/F transmission delay */
                     57:   u_int32_t transdelay;
                     58: 
                     59:   /* Router Priority */
                     60:   u_char priority;
                     61: 
                     62:   /* Time Interval */
                     63:   u_int16_t hello_interval;
                     64:   u_int16_t dead_interval;
                     65:   u_int32_t rxmt_interval;
                     66: 
1.1.1.3 ! misho      67:   u_int32_t state_change;
        !            68: 
1.1       misho      69:   /* Cost */
                     70:   u_int32_t cost;
                     71: 
                     72:   /* I/F MTU */
                     73:   u_int32_t ifmtu;
                     74: 
                     75:   /* Interface State */
                     76:   u_char state;
                     77: 
                     78:   /* OSPF6 Interface flag */
                     79:   char flag;
                     80: 
                     81:   /* MTU mismatch check */
                     82:   u_char mtu_ignore;
                     83: 
                     84:   /* Decision of DR Election */
                     85:   u_int32_t drouter;
                     86:   u_int32_t bdrouter;
                     87:   u_int32_t prev_drouter;
                     88:   u_int32_t prev_bdrouter;
                     89: 
                     90:   /* Linklocal LSA Database: includes Link-LSA */
                     91:   struct ospf6_lsdb *lsdb;
                     92:   struct ospf6_lsdb *lsdb_self;
                     93: 
                     94:   struct ospf6_lsdb *lsupdate_list;
                     95:   struct ospf6_lsdb *lsack_list;
                     96: 
                     97:   /* Ongoing Tasks */
                     98:   struct thread *thread_send_hello;
                     99:   struct thread *thread_send_lsupdate;
                    100:   struct thread *thread_send_lsack;
                    101: 
                    102:   struct thread *thread_network_lsa;
                    103:   struct thread *thread_link_lsa;
                    104:   struct thread *thread_intra_prefix_lsa;
                    105: 
                    106:   struct ospf6_route_table *route_connected;
                    107: 
                    108:   /* prefix-list name to filter connected prefix */
                    109:   char *plist_name;
                    110: };
                    111: 
                    112: /* interface state */
                    113: #define OSPF6_INTERFACE_NONE             0
                    114: #define OSPF6_INTERFACE_DOWN             1
                    115: #define OSPF6_INTERFACE_LOOPBACK         2
                    116: #define OSPF6_INTERFACE_WAITING          3
                    117: #define OSPF6_INTERFACE_POINTTOPOINT     4
                    118: #define OSPF6_INTERFACE_DROTHER          5
                    119: #define OSPF6_INTERFACE_BDR              6
                    120: #define OSPF6_INTERFACE_DR               7
                    121: #define OSPF6_INTERFACE_MAX              8
                    122: 
                    123: extern const char *ospf6_interface_state_str[];
                    124: 
                    125: /* flags */
                    126: #define OSPF6_INTERFACE_DISABLE      0x01
                    127: #define OSPF6_INTERFACE_PASSIVE      0x02
                    128: 
1.1.1.2   misho     129: /* default values */
                    130: #define OSPF6_INTERFACE_HELLO_INTERVAL 10
                    131: #define OSPF6_INTERFACE_DEAD_INTERVAL  40
                    132: #define OSPF6_INTERFACE_RXMT_INTERVAL  5
                    133: #define OSPF6_INTERFACE_COST           1
                    134: #define OSPF6_INTERFACE_PRIORITY       1
                    135: #define OSPF6_INTERFACE_TRANSDELAY     1
                    136: #define OSPF6_INTERFACE_INSTANCE_ID    0
                    137: 
1.1       misho     138: 
                    139: /* Function Prototypes */
                    140: 
                    141: extern struct ospf6_interface *ospf6_interface_lookup_by_ifindex (int);
                    142: extern struct ospf6_interface *ospf6_interface_create (struct interface *);
                    143: extern void ospf6_interface_delete (struct ospf6_interface *);
                    144: 
                    145: extern void ospf6_interface_enable (struct ospf6_interface *);
                    146: extern void ospf6_interface_disable (struct ospf6_interface *);
                    147: 
                    148: extern void ospf6_interface_if_add (struct interface *);
                    149: extern void ospf6_interface_if_del (struct interface *);
                    150: extern void ospf6_interface_state_update (struct interface *);
                    151: extern void ospf6_interface_connected_route_update (struct interface *);
                    152: 
                    153: /* interface event */
                    154: extern int interface_up (struct thread *);
                    155: extern int interface_down (struct thread *);
                    156: extern int wait_timer (struct thread *);
                    157: extern int backup_seen (struct thread *);
                    158: extern int neighbor_change (struct thread *);
                    159: 
                    160: extern void ospf6_interface_init (void);
                    161: 
                    162: extern int config_write_ospf6_debug_interface (struct vty *vty);
                    163: extern void install_element_ospf6_debug_interface (void);
                    164: 
                    165: #endif /* OSPF6_INTERFACE_H */

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