blob: 30d276f8bab9bc4868a01aeb117960404ecff4b1 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
2 * OSPFd main header.
3 * Copyright (C) 1998, 99, 2000 Kunihiro Ishiguro, Toshiaki Takada
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 * 02111-1307, USA.
21 */
22
23#ifndef _ZEBRA_OSPFD_H
24#define _ZEBRA_OSPFD_H
25
26#include "filter.h"
hasso343f5cc2005-03-25 19:48:40 +000027#include "log.h"
paul718e3742002-12-13 20:15:29 +000028
29#define OSPF_VERSION 2
30
31/* Default protocol, port number. */
32#ifndef IPPROTO_OSPFIGP
33#define IPPROTO_OSPFIGP 89
34#endif /* IPPROTO_OSPFIGP */
35
paul68980082003-03-25 05:07:42 +000036/* IP precedence. */
37#ifndef IPTOS_PREC_INTERNETCONTROL
38#define IPTOS_PREC_INTERNETCONTROL 0xC0
39#endif /* IPTOS_PREC_INTERNETCONTROL */
40
paul718e3742002-12-13 20:15:29 +000041/* VTY port number. */
42#define OSPF_VTY_PORT 2604
paul718e3742002-12-13 20:15:29 +000043
44/* IP TTL for OSPF protocol. */
45#define OSPF_IP_TTL 1
46#define OSPF_VL_IP_TTL 100
47
48/* Default configuration file name for ospfd. */
49#define OSPF_DEFAULT_CONFIG "ospfd.conf"
50
51/* Architectual Constants */
52#ifdef DEBUG
53#define OSPF_LS_REFRESH_TIME 60
54#else
55#define OSPF_LS_REFRESH_TIME 1800
56#endif
57#define OSPF_MIN_LS_INTERVAL 5
58#define OSPF_MIN_LS_ARRIVAL 1
59#define OSPF_LSA_MAXAGE 3600
60#define OSPF_CHECK_AGE 300
61#define OSPF_LSA_MAXAGE_DIFF 900
62#define OSPF_LS_INFINITY 0xffffff
63#define OSPF_DEFAULT_DESTINATION 0x00000000 /* 0.0.0.0 */
64#define OSPF_INITIAL_SEQUENCE_NUMBER 0x80000001
65#define OSPF_MAX_SEQUENCE_NUMBER 0x7fffffff
66
67#define OSPF_LSA_MAXAGE_CHECK_INTERVAL 30
paul464c8202003-06-22 08:32:35 +000068#define OSPF_NSSA_TRANS_STABLE_DEFAULT 40
paul718e3742002-12-13 20:15:29 +000069
70#define OSPF_ALLSPFROUTERS 0xe0000005 /* 224.0.0.5 */
71#define OSPF_ALLDROUTERS 0xe0000006 /* 224.0.0.6 */
72
hassobeebba72004-06-20 21:00:27 +000073/* XXX Where is this used? And why it was used only if compiled with
74 * NSSA support. */
paul718e3742002-12-13 20:15:29 +000075#define OSPF_LOOPer 0x7f000000 /* 127.0.0.0 */
paul718e3742002-12-13 20:15:29 +000076
77#define OSPF_AREA_BACKBONE 0x00000000 /* 0.0.0.0 */
78
79/* OSPF Authentication Type. */
80#define OSPF_AUTH_NULL 0
81#define OSPF_AUTH_SIMPLE 1
82#define OSPF_AUTH_CRYPTOGRAPHIC 2
83/* For Interface authentication setting default */
84#define OSPF_AUTH_NOTSET -1
85/* For the consumption and sanity of the command handler */
86/* DO NIOT REMOVE!!! Need to detect whether a value has
87 been given or not in VLink command handlers */
88#define OSPF_AUTH_CMD_NOTSEEN -2
89
90/* OSPF SPF timer values. */
paul800d6152003-05-29 17:26:24 +000091#define OSPF_SPF_DELAY_DEFAULT 1
92#define OSPF_SPF_HOLDTIME_DEFAULT 1
paul718e3742002-12-13 20:15:29 +000093
94/* OSPF interface default values. */
95#define OSPF_OUTPUT_COST_DEFAULT 10
96#define OSPF_ROUTER_DEAD_INTERVAL_DEFAULT 40
97#define OSPF_HELLO_INTERVAL_DEFAULT 10
98#define OSPF_ROUTER_PRIORITY_DEFAULT 1
99#define OSPF_RETRANSMIT_INTERVAL_DEFAULT 5
100#define OSPF_TRANSMIT_DELAY_DEFAULT 1
101#define OSPF_DEFAULT_BANDWIDTH 10000 /* Kbps */
102
103#define OSPF_DEFAULT_REF_BANDWIDTH 100000 /* Kbps */
104
105#define OSPF_POLL_INTERVAL_DEFAULT 60
106#define OSPF_NEIGHBOR_PRIORITY_DEFAULT 0
107
108/* OSPF options. */
109#define OSPF_OPTION_T 0x01 /* TOS. */
110#define OSPF_OPTION_E 0x02
111#define OSPF_OPTION_MC 0x04
112#define OSPF_OPTION_NP 0x08
113#define OSPF_OPTION_EA 0x10
114#define OSPF_OPTION_DC 0x20
115#define OSPF_OPTION_O 0x40
116
117/* OSPF Database Description flags. */
118#define OSPF_DD_FLAG_MS 0x01
119#define OSPF_DD_FLAG_M 0x02
120#define OSPF_DD_FLAG_I 0x04
121#define OSPF_DD_FLAG_ALL 0x07
122
123/* Timer value. */
124#define OSPF_ROUTER_ID_UPDATE_DELAY 1
125
126#define OSPF_LS_REFRESH_SHIFT (60 * 15)
127#define OSPF_LS_REFRESH_JITTER 60
128
paul020709f2003-04-04 02:44:16 +0000129/* OSPF master for system wide configuration and variables. */
130struct ospf_master
131{
132 /* OSPF instance. */
133 struct list *ospf;
134
135 /* OSPF thread master. */
136 struct thread_master *master;
137
138 /* Zebra interface list. */
139 struct list *iflist;
140
141 /* Redistributed external information. */
142 struct route_table *external_info[ZEBRA_ROUTE_MAX + 1];
143#define EXTERNAL_INFO(T) om->external_info[T]
144
145 /* OSPF start time. */
146 time_t start_time;
147
148 /* Various OSPF global configuration. */
149 u_char options;
150};
151
paul718e3742002-12-13 20:15:29 +0000152/* OSPF instance structure. */
153struct ospf
154{
155 /* OSPF Router ID. */
156 struct in_addr router_id; /* Configured automatically. */
157 struct in_addr router_id_static; /* Configured manually. */
158
159 /* ABR/ASBR internal flags. */
160 u_char flags;
161#define OSPF_FLAG_ABR 0x0001
162#define OSPF_FLAG_ASBR 0x0002
163
164 /* ABR type. */
165 u_char abr_type;
166#define OSPF_ABR_UNKNOWN 0
167#define OSPF_ABR_STAND 1
168#define OSPF_ABR_IBM 2
169#define OSPF_ABR_CISCO 3
170#define OSPF_ABR_SHORTCUT 4
pauld57834f2005-07-12 20:04:22 +0000171#define OSPF_ABR_DEFAULT OSPF_ABR_CISCO
paul718e3742002-12-13 20:15:29 +0000172
173 /* NSSA ABR */
174 u_char anyNSSA; /* Bump for every NSSA attached. */
175
176 /* Configured variables. */
177 u_char config;
178#define OSPF_RFC1583_COMPATIBLE (1 << 0)
179#define OSPF_OPAQUE_CAPABLE (1 << 2)
180
181#ifdef HAVE_OPAQUE_LSA
182 /* Opaque-LSA administrative flags. */
183 u_char opaque;
184#define OPAQUE_OPERATION_READY_BIT (1 << 0)
185#define OPAQUE_BLOCK_TYPE_09_LSA_BIT (1 << 1)
186#define OPAQUE_BLOCK_TYPE_10_LSA_BIT (1 << 2)
187#define OPAQUE_BLOCK_TYPE_11_LSA_BIT (1 << 3)
188#endif /* HAVE_OPAQUE_LSA */
189
190 int spf_delay; /* SPF delay time. */
191 int spf_holdtime; /* SPF hold time. */
192 int default_originate; /* Default information originate. */
193#define DEFAULT_ORIGINATE_NONE 0
194#define DEFAULT_ORIGINATE_ZEBRA 1
195#define DEFAULT_ORIGINATE_ALWAYS 2
196 u_int32_t ref_bandwidth; /* Reference Bandwidth (Kbps). */
197 struct route_table *networks; /* OSPF config networks. */
hasso52dc7ee2004-09-23 19:18:23 +0000198 struct list *vlinks; /* Configured Virtual-Links. */
199 struct list *areas; /* OSPF areas. */
paul718e3742002-12-13 20:15:29 +0000200 struct route_table *nbr_nbma;
201 struct ospf_area *backbone; /* Pointer to the Backbone Area. */
202
hasso52dc7ee2004-09-23 19:18:23 +0000203 struct list *oiflist; /* ospf interfaces */
paul718e3742002-12-13 20:15:29 +0000204
205 /* LSDB of AS-external-LSAs. */
206 struct ospf_lsdb *lsdb;
207
paul718e3742002-12-13 20:15:29 +0000208 /* Flags. */
209 int external_origin; /* AS-external-LSA origin flag. */
210 int ase_calc; /* ASE calculation flag. */
211
212#ifdef HAVE_OPAQUE_LSA
hasso52dc7ee2004-09-23 19:18:23 +0000213 struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */
paul718e3742002-12-13 20:15:29 +0000214#endif /* HAVE_OPAQUE_LSA */
215
216 /* Routing tables. */
217 struct route_table *old_table; /* Old routing table. */
218 struct route_table *new_table; /* Current routing table. */
219
220 struct route_table *old_rtrs; /* Old ABR/ASBR RT. */
221 struct route_table *new_rtrs; /* New ABR/ASBR RT. */
222
223 struct route_table *new_external_route; /* New External Route. */
224 struct route_table *old_external_route; /* Old External Route. */
225
226 struct route_table *external_lsas; /* Database of external LSAs,
227 prefix is LSA's adv. network*/
228
229 /* Time stamps. */
230 time_t ts_spf; /* SPF calculation time stamp. */
231
hasso52dc7ee2004-09-23 19:18:23 +0000232 struct list *maxage_lsa; /* List of MaxAge LSA for deletion. */
paul718e3742002-12-13 20:15:29 +0000233 int redistribute; /* Num of redistributed protocols. */
234
235 /* Threads. */
236 struct thread *t_router_id_update; /* Router ID update timer. */
237 struct thread *t_router_lsa_update; /* router-LSA update timer. */
238 struct thread *t_abr_task; /* ABR task timer. */
239 struct thread *t_asbr_check; /* ASBR check timer. */
240 struct thread *t_distribute_update; /* Distirbute list update timer. */
241 struct thread *t_spf_calc; /* SPF calculation timer. */
242 struct thread *t_ase_calc; /* ASE calculation timer. */
243 struct thread *t_external_lsa; /* AS-external-LSA origin timer. */
244#ifdef HAVE_OPAQUE_LSA
245 struct thread *t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
246#endif /* HAVE_OPAQUE_LSA */
247 struct thread *t_maxage; /* MaxAge LSA remover timer. */
248 struct thread *t_maxage_walker; /* MaxAge LSA checking timer. */
249
250 struct thread *t_write;
251 struct thread *t_read;
252 int fd;
ajs5c333492005-02-23 15:43:01 +0000253 struct stream *ibuf;
hasso52dc7ee2004-09-23 19:18:23 +0000254 struct list *oi_write_q;
paul718e3742002-12-13 20:15:29 +0000255
256 /* Distribute lists out of other route sources. */
257 struct
258 {
259 char *name;
260 struct access_list *list;
261 } dlist[ZEBRA_ROUTE_MAX];
paul020709f2003-04-04 02:44:16 +0000262#define DISTRIBUTE_NAME(O,T) (O)->dlist[T].name
263#define DISTRIBUTE_LIST(O,T) (O)->dlist[T].list
paul718e3742002-12-13 20:15:29 +0000264
265 /* Redistribute metric info. */
266 struct
267 {
268 int type; /* External metric type (E1 or E2). */
269 int value; /* Value for static metric (24-bit).
270 -1 means metric value is not set. */
271 } dmetric [ZEBRA_ROUTE_MAX + 1];
272
273 /* For redistribute route map. */
274 struct
275 {
276 char *name;
277 struct route_map *map;
278 } route_map [ZEBRA_ROUTE_MAX + 1]; /* +1 is for default-information */
paul020709f2003-04-04 02:44:16 +0000279#define ROUTEMAP_NAME(O,T) (O)->route_map[T].name
280#define ROUTEMAP(O,T) (O)->route_map[T].map
paul718e3742002-12-13 20:15:29 +0000281
282 int default_metric; /* Default metric for redistribute. */
283
284#define OSPF_LSA_REFRESHER_GRANULARITY 10
285#define OSPF_LSA_REFRESHER_SLOTS ((OSPF_LS_REFRESH_TIME + \
286 OSPF_LS_REFRESH_SHIFT)/10 + 1)
287 struct
288 {
289 u_int16_t index;
hasso52dc7ee2004-09-23 19:18:23 +0000290 struct list *qs[OSPF_LSA_REFRESHER_SLOTS];
paul718e3742002-12-13 20:15:29 +0000291 } lsa_refresh_queue;
292
293 struct thread *t_lsa_refresher;
294 time_t lsa_refresher_started;
295#define OSPF_LSA_REFRESH_INTERVAL_DEFAULT 10
296 u_int16_t lsa_refresh_interval;
297
298 /* Distance parameter. */
299 u_char distance_all;
300 u_char distance_intra;
301 u_char distance_inter;
302 u_char distance_external;
303
304 /* Statistics for LSA origination. */
305 u_int32_t lsa_originate_count;
306
307 /* Statistics for LSA used for new instantiation. */
308 u_int32_t rx_lsa_count;
309
310 struct route_table *distance_table;
311};
312
313/* OSPF area structure. */
314struct ospf_area
315{
316 /* OSPF instance. */
paul68980082003-03-25 05:07:42 +0000317 struct ospf *ospf;
paul718e3742002-12-13 20:15:29 +0000318
319 /* Zebra interface list belonging to the area. */
hasso52dc7ee2004-09-23 19:18:23 +0000320 struct list *oiflist;
paul718e3742002-12-13 20:15:29 +0000321
322 /* Area ID. */
323 struct in_addr area_id;
324
325 /* Area ID format. */
326 char format;
327#define OSPF_AREA_ID_FORMAT_ADDRESS 1
328#define OSPF_AREA_ID_FORMAT_DECIMAL 2
329
330 /* Address range. */
hasso52dc7ee2004-09-23 19:18:23 +0000331 struct list *address_range;
paul718e3742002-12-13 20:15:29 +0000332
333 /* Configured variables. */
334 int external_routing; /* ExternalRoutingCapability. */
335#define OSPF_AREA_DEFAULT 0
336#define OSPF_AREA_STUB 1
337#define OSPF_AREA_NSSA 2
338#define OSPF_AREA_TYPE_MAX 3
339 int no_summary; /* Don't inject summaries into stub.*/
340 int shortcut_configured; /* Area configured as shortcut. */
341#define OSPF_SHORTCUT_DEFAULT 0
342#define OSPF_SHORTCUT_ENABLE 1
343#define OSPF_SHORTCUT_DISABLE 2
344 int shortcut_capability; /* Other ABRs agree on S-bit */
345 u_int32_t default_cost; /* StubDefaultCost. */
346 int auth_type; /* Authentication type. */
347
paul464c8202003-06-22 08:32:35 +0000348 u_char NSSATranslatorRole; /* NSSA configured role */
paul718e3742002-12-13 20:15:29 +0000349#define OSPF_NSSA_ROLE_NEVER 0
pauld4a53d52003-07-12 21:30:57 +0000350#define OSPF_NSSA_ROLE_CANDIDATE 1
351#define OSPF_NSSA_ROLE_ALWAYS 2
paul464c8202003-06-22 08:32:35 +0000352 u_char NSSATranslatorState; /* NSSA operational role */
pauld4a53d52003-07-12 21:30:57 +0000353#define OSPF_NSSA_TRANSLATE_DISABLED 0
354#define OSPF_NSSA_TRANSLATE_ENABLED 1
paul464c8202003-06-22 08:32:35 +0000355 int NSSATranslatorStabilityInterval;
356
paul718e3742002-12-13 20:15:29 +0000357 u_char transit; /* TransitCapability. */
358#define OSPF_TRANSIT_FALSE 0
359#define OSPF_TRANSIT_TRUE 1
360 struct route_table *ranges; /* Configured Area Ranges. */
361
362 /* Area related LSDBs[Type1-4]. */
363 struct ospf_lsdb *lsdb;
364
365 /* Self-originated LSAs. */
366 struct ospf_lsa *router_lsa_self;
367#ifdef HAVE_OPAQUE_LSA
hasso52dc7ee2004-09-23 19:18:23 +0000368 struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */
paul718e3742002-12-13 20:15:29 +0000369#endif /* HAVE_OPAQUE_LSA */
370
371 /* Area announce list. */
372 struct
373 {
374 char *name;
375 struct access_list *list;
376 } export;
377#define EXPORT_NAME(A) (A)->export.name
378#define EXPORT_LIST(A) (A)->export.list
379
380 /* Area acceptance list. */
381 struct
382 {
383 char *name;
384 struct access_list *list;
385 } import;
386#define IMPORT_NAME(A) (A)->import.name
387#define IMPORT_LIST(A) (A)->import.list
388
389 /* Type 3 LSA Area prefix-list. */
390 struct
391 {
392 char *name;
393 struct prefix_list *list;
394 } plist_in;
395#define PREFIX_LIST_IN(A) (A)->plist_in.list
396#define PREFIX_NAME_IN(A) (A)->plist_in.name
397
398 struct
399 {
400 char *name;
401 struct prefix_list *list;
402 } plist_out;
403#define PREFIX_LIST_OUT(A) (A)->plist_out.list
404#define PREFIX_NAME_OUT(A) (A)->plist_out.name
405
406 /* Shortest Path Tree. */
407 struct vertex *spf;
408
409 /* Threads. */
410 struct thread *t_router_lsa_self;/* Self-originated router-LSA timer. */
411#ifdef HAVE_OPAQUE_LSA
412 struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
413#endif /* HAVE_OPAQUE_LSA */
414
415 /* Statistics field. */
416 u_int32_t spf_calculation; /* SPF Calculation Count. */
417
418 /* Router count. */
419 u_int32_t abr_count; /* ABR router in this area. */
420 u_int32_t asbr_count; /* ASBR router in this area. */
421
422 /* Counters. */
423 u_int32_t act_ints; /* Active interfaces. */
424 u_int32_t full_nbrs; /* Fully adjacent neighbors. */
425 u_int32_t full_vls; /* Fully adjacent virtual neighbors. */
426};
427
428/* OSPF config network structure. */
429struct ospf_network
430{
431 /* Area ID. */
432 struct in_addr area_id;
433 int format;
434};
435
436/* OSPF NBMA neighbor structure. */
437struct ospf_nbr_nbma
438{
439 /* Neighbor IP address. */
440 struct in_addr addr;
441
442 /* OSPF interface. */
443 struct ospf_interface *oi;
444
445 /* OSPF neighbor structure. */
446 struct ospf_neighbor *nbr;
447
448 /* Neighbor priority. */
449 u_char priority;
450
451 /* Poll timer value. */
452 u_int32_t v_poll;
453
454 /* Poll timer thread. */
455 struct thread *t_poll;
456
457 /* State change. */
458 u_int32_t state_change;
459};
460
461/* Macro. */
462#define OSPF_AREA_SAME(X,Y) \
463 (memcmp ((X->area_id), (Y->area_id), IPV4_MAX_BYTELEN) == 0)
464
paul020709f2003-04-04 02:44:16 +0000465#define IS_OSPF_ABR(O) ((O)->flags & OSPF_FLAG_ABR)
466#define IS_OSPF_ASBR(O) ((O)->flags & OSPF_FLAG_ASBR)
paul718e3742002-12-13 20:15:29 +0000467
468#define OSPF_IS_AREA_ID_BACKBONE(I) ((I).s_addr == OSPF_AREA_BACKBONE)
469#define OSPF_IS_AREA_BACKBONE(A) OSPF_IS_AREA_ID_BACKBONE ((A)->area_id)
470
471#ifdef roundup
472# define ROUNDUP(val, gran) roundup(val, gran)
473#else /* roundup */
474# define ROUNDUP(val, gran) (((val) - 1 | (gran) - 1) + 1)
475#endif /* roundup */
476
477#define LSA_OPTIONS_GET(area) \
478 (((area)->external_routing == OSPF_AREA_DEFAULT) ? OSPF_OPTION_E : 0)
pauld4a53d52003-07-12 21:30:57 +0000479#define LSA_OPTIONS_NSSA_GET(area) \
480 (((area)->external_routing == OSPF_AREA_NSSA) ? OSPF_OPTION_NP : 0)
paul718e3742002-12-13 20:15:29 +0000481
482#define OSPF_TIMER_ON(T,F,V) \
483 do { \
484 if (!(T)) \
paul68980082003-03-25 05:07:42 +0000485 (T) = thread_add_timer (master, (F), ospf, (V)); \
paul718e3742002-12-13 20:15:29 +0000486 } while (0)
487
488#define OSPF_AREA_TIMER_ON(T,F,V) \
489 do { \
490 if (!(T)) \
491 (T) = thread_add_timer (master, (F), area, (V)); \
492 } while (0)
493
494#define OSPF_POLL_TIMER_ON(T,F,V) \
495 do { \
496 if (!(T)) \
497 (T) = thread_add_timer (master, (F), nbr_nbma, (V)); \
498 } while (0)
499
500#define OSPF_POLL_TIMER_OFF(X) OSPF_TIMER_OFF((X))
501
502#define OSPF_TIMER_OFF(X) \
503 do { \
504 if (X) \
505 { \
506 thread_cancel (X); \
507 (X) = NULL; \
508 } \
509 } while (0)
510
paul020709f2003-04-04 02:44:16 +0000511/* Extern variables. */
512extern struct ospf_master *om;
paul718e3742002-12-13 20:15:29 +0000513extern struct message ospf_ism_state_msg[];
514extern struct message ospf_nsm_state_msg[];
515extern struct message ospf_lsa_type_msg[];
516extern struct message ospf_link_state_id_type_msg[];
517extern struct message ospf_redistributed_proto[];
518extern struct message ospf_network_type_msg[];
519extern int ospf_ism_state_msg_max;
520extern int ospf_nsm_state_msg_max;
521extern int ospf_lsa_type_msg_max;
522extern int ospf_link_state_id_type_msg_max;
523extern int ospf_redistributed_proto_max;
524extern int ospf_network_type_msg_max;
525extern struct zclient *zclient;
526extern struct thread_master *master;
paul718e3742002-12-13 20:15:29 +0000527extern int ospf_zlog;
528
529/* Prototypes. */
paul4dadc292005-05-06 21:37:42 +0000530extern struct ospf *ospf_lookup (void);
531extern struct ospf *ospf_get (void);
532extern void ospf_finish (struct ospf *);
533extern int ospf_router_id_update_timer (struct thread *);
534extern void ospf_router_id_update (struct ospf *ospf);
535extern int ospf_network_match_iface (struct connected *, struct prefix *);
536extern int ospf_network_set (struct ospf *, struct prefix_ipv4 *,
537 struct in_addr);
538extern int ospf_network_unset (struct ospf *, struct prefix_ipv4 *,
539 struct in_addr);
540extern int ospf_area_stub_set (struct ospf *, struct in_addr);
541extern int ospf_area_stub_unset (struct ospf *, struct in_addr);
542extern int ospf_area_no_summary_set (struct ospf *, struct in_addr);
543extern int ospf_area_no_summary_unset (struct ospf *, struct in_addr);
544extern int ospf_area_nssa_set (struct ospf *, struct in_addr);
545extern int ospf_area_nssa_unset (struct ospf *, struct in_addr);
546extern int ospf_area_nssa_translator_role_set (struct ospf *, struct in_addr,
547 int);
548extern int ospf_area_export_list_set (struct ospf *, struct ospf_area *,
549 const char *);
550extern int ospf_area_export_list_unset (struct ospf *, struct ospf_area *);
551extern int ospf_area_import_list_set (struct ospf *, struct ospf_area *,
552 const char *);
553extern int ospf_area_import_list_unset (struct ospf *, struct ospf_area *);
554extern int ospf_area_shortcut_set (struct ospf *, struct ospf_area *, int);
555extern int ospf_area_shortcut_unset (struct ospf *, struct ospf_area *);
556extern int ospf_timers_spf_set (struct ospf *, u_int32_t, u_int32_t);
557extern int ospf_timers_spf_unset (struct ospf *);
558extern int ospf_timers_refresh_set (struct ospf *, int);
559extern int ospf_timers_refresh_unset (struct ospf *);
560extern int ospf_nbr_nbma_set (struct ospf *, struct in_addr);
561extern int ospf_nbr_nbma_unset (struct ospf *, struct in_addr);
562extern int ospf_nbr_nbma_priority_set (struct ospf *, struct in_addr, u_char);
563extern int ospf_nbr_nbma_priority_unset (struct ospf *, struct in_addr);
564extern int ospf_nbr_nbma_poll_interval_set (struct ospf *, struct in_addr,
565 unsigned int);
566extern int ospf_nbr_nbma_poll_interval_unset (struct ospf *, struct in_addr);
567extern void ospf_prefix_list_update (struct prefix_list *);
568extern void ospf_init (void);
569extern void ospf_if_update (struct ospf *);
570extern void ospf_ls_upd_queue_empty (struct ospf_interface *);
571extern void ospf_terminate (void);
572extern void ospf_nbr_nbma_if_update (struct ospf *, struct ospf_interface *);
573extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup (struct ospf *,
574 struct in_addr);
575extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup_next (struct ospf *,
576 struct in_addr *,
577 int);
578extern int ospf_oi_count (struct interface *);
paul718e3742002-12-13 20:15:29 +0000579
paul4dadc292005-05-06 21:37:42 +0000580extern struct ospf_area *ospf_area_get (struct ospf *, struct in_addr, int);
581extern void ospf_area_check_free (struct ospf *, struct in_addr);
582extern struct ospf_area *ospf_area_lookup_by_area_id (struct ospf *,
583 struct in_addr);
584extern void ospf_area_add_if (struct ospf_area *, struct ospf_interface *);
585extern void ospf_area_del_if (struct ospf_area *, struct ospf_interface *);
paul718e3742002-12-13 20:15:29 +0000586
paul4dadc292005-05-06 21:37:42 +0000587extern void ospf_route_map_init (void);
588extern void ospf_snmp_init (void);
paul718e3742002-12-13 20:15:29 +0000589
paul4dadc292005-05-06 21:37:42 +0000590extern void ospf_master_init (void);
paul020709f2003-04-04 02:44:16 +0000591
paul718e3742002-12-13 20:15:29 +0000592#endif /* _ZEBRA_OSPFD_H */