2 * Copyright (C) 1999 Yasuhiro Ohara
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
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
28 #ifndef HEADER_DEPENDENCY
29 /* Include other stuffs */
36 #include "sockunion.h"
47 #include "ospf6_hook.h"
48 #include "ospf6_types.h"
49 #include "ospf6_prefix.h"
50 #include "ospf6_lsa.h"
51 #include "ospf6_lsdb.h"
53 #include "ospf6_message.h"
54 #include "ospf6_proto.h"
55 #include "ospf6_spf.h"
56 #include "ospf6_top.h"
57 #include "ospf6_area.h"
58 #include "ospf6_interface.h"
59 #include "ospf6_neighbor.h"
60 #include "ospf6_ism.h"
61 #include "ospf6_nsm.h"
62 #include "ospf6_route.h"
63 #include "ospf6_dbex.h"
64 #include "ospf6_network.h"
65 #include "ospf6_zebra.h"
66 #include "ospf6_dump.h"
67 #include "ospf6_routemap.h"
68 #include "ospf6_asbr.h"
69 #include "ospf6_abr.h"
70 #include "ospf6_intra.h"
71 #endif /*HEADER_DEPENDENCY*/
74 #define MAXIOVLIST 1024
76 #define OSPF6_DAEMON_VERSION "0.9.6o"
78 #define AF_LINKSTATE 0xff
80 /* global variables */
81 extern char *progname
;
83 extern int daemon_mode
;
84 extern struct thread_master
*master
;
86 extern list nexthoplist
;
87 extern struct sockaddr_in6 allspfrouters6
;
88 extern struct sockaddr_in6 alldrouters6
;
89 extern int ospf6_sock
;
90 extern char *recent_reason
;
92 /* Default configuration file name for ospfd. */
93 #define OSPF6_DEFAULT_CONFIG "ospf6d.conf"
95 /* Default port values. */
96 #define OSPF6_VTY_PORT 2606
97 #define OSPF6_VTYSH_PATH "/tmp/.ospf6d"
101 #define IPV6_PKTINFO IPV6_RECVPKTINFO
102 #endif /* IPV6_PKTINFO */
103 #endif /* INRIA_IPV6 */
105 /* Historycal for KAME. */
106 #ifndef IPV6_JOIN_GROUP
107 #ifdef IPV6_ADD_MEMBERSHIP
108 #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
109 #endif /* IPV6_ADD_MEMBERSHIP. */
110 #ifdef IPV6_JOIN_MEMBERSHIP
111 #define IPV6_JOIN_GROUP IPV6_JOIN_MEMBERSHIP
112 #endif /* IPV6_JOIN_MEMBERSHIP. */
113 #endif /* ! IPV6_JOIN_GROUP*/
115 #ifndef IPV6_LEAVE_GROUP
116 #ifdef IPV6_DROP_MEMBERSHIP
117 #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
118 #endif /* IPV6_DROP_MEMBERSHIP */
119 #endif /* ! IPV6_LEAVE_GROUP */
121 #define OSPF6_CMD_CHECK_RUNNING() \
124 vty_out (vty, "OSPFv3 is not running%s", VTY_NEWLINE); \
125 return CMD_SUCCESS; \
128 #define OSPF6_LEVEL_NONE 0
129 #define OSPF6_LEVEL_NEIGHBOR 1
130 #define OSPF6_LEVEL_INTERFACE 2
131 #define OSPF6_LEVEL_AREA 3
132 #define OSPF6_LEVEL_TOP 4
133 #define OSPF6_LEVEL_MAX 5
135 #define OSPF6_PASSIVE_STR \
136 "Suppress routing updates on an interface\n"
137 #define OSPF6_PREFIX_LIST_STR \
138 "Advertise I/F Address only match entries of prefix-list\n"
140 #define OSPF6_AREA_STR "Area information\n"
141 #define OSPF6_AREA_ID_STR "Area ID (as an IPv4 notation)\n"
142 #define OSPF6_SPF_STR "Shortest Path First tree information\n"
143 #define OSPF6_ROUTER_ID_STR "Specify Router-ID\n"
144 #define OSPF6_LS_ID_STR "Specify Link State ID\n"
147 /* Function Prototypes */
149 ospf6_timeval_sub (const struct timeval
*t1
, const struct timeval
*t2
,
150 struct timeval
*result
);
152 ospf6_timeval_div (const struct timeval
*t1
, u_int by
,
153 struct timeval
*result
);
155 ospf6_timeval_sub_equal (const struct timeval
*t
, struct timeval
*result
);
157 ospf6_timeval_decode (const struct timeval
*t
, long *dayp
, long *hourp
,
158 long *minp
, long *secp
, long *msecp
, long *usecp
);
160 ospf6_timeval_string (struct timeval
*tv
, char *buf
, int size
);
162 ospf6_timeval_string_summary (struct timeval
*tv
, char *buf
, int size
);
165 ospf6_count_state (void *arg
, int val
, void *obj
);
168 void ospf6_terminate ();
170 void ospf6_maxage_remover ();
172 void *ospf6_lsa_get_scope (u_int16_t type
, struct ospf6_interface
*o6i
);
174 #endif /* OSPF6D_H */