]> git.proxmox.com Git - mirror_frr.git/blob - ospfd/ospfd.h
5009355d48d3f2414631253e950f7ab9fd91b9fa
[mirror_frr.git] / ospfd / ospfd.h
1 /*
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 along
18 * with this program; see the file COPYING; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef _ZEBRA_OSPFD_H
23 #define _ZEBRA_OSPFD_H
24
25 #include <zebra.h>
26 #include "qobj.h"
27 #include "libospf.h"
28 #include "ldp_sync.h"
29
30 #include "filter.h"
31 #include "log.h"
32 #include "vrf.h"
33
34 #include "ospf_memory.h"
35 #include "ospf_dump_api.h"
36
37 #define OSPF_VERSION 2
38
39 /* VTY port number. */
40 #define OSPF_VTY_PORT 2604
41
42 /* IP TTL for OSPF protocol. */
43 #define OSPF_IP_TTL 1
44 #define OSPF_VL_IP_TTL 100
45
46 /* Default configuration file name for ospfd. */
47 #define OSPF_DEFAULT_CONFIG "ospfd.conf"
48
49 #define OSPF_NSSA_TRANS_STABLE_DEFAULT 40
50
51 #define OSPF_ALLSPFROUTERS 0xe0000005 /* 224.0.0.5 */
52 #define OSPF_ALLDROUTERS 0xe0000006 /* 224.0.0.6 */
53
54 /* OSPF Authentication Type. */
55 #define OSPF_AUTH_NULL 0
56 #define OSPF_AUTH_SIMPLE 1
57 #define OSPF_AUTH_CRYPTOGRAPHIC 2
58 /* For Interface authentication setting default */
59 #define OSPF_AUTH_NOTSET -1
60 /* For the consumption and sanity of the command handler */
61 /* DO NIOT REMOVE!!! Need to detect whether a value has
62 been given or not in VLink command handlers */
63 #define OSPF_AUTH_CMD_NOTSEEN -2
64
65 /* OSPF options. */
66 #define OSPF_OPTION_MT 0x01 /* M/T */
67 #define OSPF_OPTION_E 0x02
68 #define OSPF_OPTION_MC 0x04
69 #define OSPF_OPTION_NP 0x08
70 #define OSPF_OPTION_EA 0x10
71 #define OSPF_OPTION_DC 0x20
72 #define OSPF_OPTION_O 0x40
73 #define OSPF_OPTION_DN 0x80
74
75 /* OSPF Database Description flags. */
76 #define OSPF_DD_FLAG_MS 0x01
77 #define OSPF_DD_FLAG_M 0x02
78 #define OSPF_DD_FLAG_I 0x04
79 #define OSPF_DD_FLAG_ALL 0x07
80
81 #define OSPF_LS_REFRESH_SHIFT (60 * 15)
82 #define OSPF_LS_REFRESH_JITTER 60
83
84 struct ospf_external {
85 unsigned short instance;
86 struct route_table *external_info;
87 };
88
89 /* OSPF master for system wide configuration and variables. */
90 struct ospf_master {
91 /* OSPF instance. */
92 struct list *ospf;
93
94 /* OSPF thread master. */
95 struct thread_master *master;
96
97 /* Various OSPF global configuration. */
98 uint8_t options;
99 #define OSPF_MASTER_SHUTDOWN (1 << 0) /* deferred-shutdown */
100 };
101
102 struct ospf_redist {
103 unsigned short instance;
104
105 /* Redistribute metric info. */
106 struct {
107 int type; /* External metric type (E1 or E2). */
108 int value; /* Value for static metric (24-bit).
109 -1 means metric value is not set. */
110 } dmetric;
111
112 /* For redistribute route map. */
113 struct {
114 char *name;
115 struct route_map *map;
116 } route_map; /* +1 is for default-information */
117 #define ROUTEMAP_NAME(R) (R->route_map.name)
118 #define ROUTEMAP(R) (R->route_map.map)
119 };
120
121 /* ospf->config */
122 enum {
123 OSPF_RFC1583_COMPATIBLE = (1 << 0),
124 OSPF_OPAQUE_CAPABLE = (1 << 2),
125 OSPF_LOG_ADJACENCY_CHANGES = (1 << 3),
126 OSPF_LOG_ADJACENCY_DETAIL = (1 << 4),
127 };
128
129 /* OSPF instance structure. */
130 struct ospf {
131 /* OSPF's running state based on the '[no] router ospf [<instance>]'
132 * config. */
133 uint8_t oi_running;
134
135 /* OSPF instance ID */
136 unsigned short instance;
137
138 /* OSPF Router ID. */
139 struct in_addr router_id; /* Configured automatically. */
140 struct in_addr router_id_static; /* Configured manually. */
141 struct in_addr router_id_zebra;
142
143 vrf_id_t vrf_id; /* VRF Id */
144 char *name; /* VRF name */
145
146 /* ABR/ASBR internal flags. */
147 uint8_t flags;
148 #define OSPF_FLAG_ABR 0x0001
149 #define OSPF_FLAG_ASBR 0x0002
150
151 /* ABR type. */
152 uint8_t abr_type;
153 #define OSPF_ABR_UNKNOWN 0
154 #define OSPF_ABR_STAND 1
155 #define OSPF_ABR_IBM 2
156 #define OSPF_ABR_CISCO 3
157 #define OSPF_ABR_SHORTCUT 4
158 #define OSPF_ABR_DEFAULT OSPF_ABR_CISCO
159
160 /* NSSA ABR */
161 uint8_t anyNSSA; /* Bump for every NSSA attached. */
162
163 /* Configuration bitmask, refer to enum above */
164 uint8_t config;
165
166 /* Opaque-LSA administrative flags. */
167 uint8_t opaque;
168 #define OPAQUE_OPERATION_READY_BIT (1 << 0)
169
170 /* RFC3137 stub router. Configured time to stay stub / max-metric */
171 unsigned int stub_router_startup_time; /* seconds */
172 unsigned int stub_router_shutdown_time; /* seconds */
173 #define OSPF_STUB_ROUTER_UNCONFIGURED 0
174 uint8_t stub_router_admin_set;
175 #define OSPF_STUB_ROUTER_ADMINISTRATIVE_SET 1
176 #define OSPF_STUB_ROUTER_ADMINISTRATIVE_UNSET 0
177
178 #define OSPF_STUB_MAX_METRIC_SUMMARY_COST 0x00ff0000
179
180 /* LSA timers */
181 unsigned int min_ls_interval; /* minimum delay between LSAs (in msec) */
182 unsigned int min_ls_arrival; /* minimum interarrival time between LSAs
183 (in msec) */
184
185 /* SPF parameters */
186 unsigned int spf_delay; /* SPF delay time. */
187 unsigned int spf_holdtime; /* SPF hold time. */
188 unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
189 unsigned int
190 spf_hold_multiplier; /* Adaptive multiplier for hold time */
191
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 uint32_t ref_bandwidth; /* Reference Bandwidth (Kbps). */
197 struct route_table *networks; /* OSPF config networks. */
198 struct list *vlinks; /* Configured Virtual-Links. */
199 struct list *areas; /* OSPF areas. */
200 struct route_table *nbr_nbma;
201 struct ospf_area *backbone; /* Pointer to the Backbone Area. */
202
203 struct list *oiflist; /* ospf interfaces */
204 uint8_t passive_interface_default; /* passive-interface default */
205
206 /* LSDB of AS-external-LSAs. */
207 struct ospf_lsdb *lsdb;
208
209 /* Flags. */
210 int ase_calc; /* ASE calculation flag. */
211
212 struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */
213
214 /* Routing tables. */
215 struct route_table *old_table; /* Old routing table. */
216 struct route_table *new_table; /* Current routing table. */
217
218 struct route_table *old_rtrs; /* Old ABR/ASBR RT. */
219 struct route_table *new_rtrs; /* New ABR/ASBR RT. */
220
221 struct route_table *new_external_route; /* New External Route. */
222 struct route_table *old_external_route; /* Old External Route. */
223
224 struct route_table *external_lsas; /* Database of external LSAs,
225 prefix is LSA's adv. network*/
226
227 /* Time stamps */
228 struct timeval ts_spf; /* SPF calculation time stamp. */
229 struct timeval ts_spf_duration; /* Execution time of last SPF */
230
231 struct route_table *maxage_lsa; /* List of MaxAge LSA for deletion. */
232 int redistribute; /* Num of redistributed protocols. */
233
234 /* Threads. */
235 struct thread *t_abr_task; /* ABR task timer. */
236 struct thread *t_asbr_check; /* ASBR check timer. */
237 struct thread *t_distribute_update; /* Distirbute list update timer. */
238 struct thread *t_spf_calc; /* SPF calculation timer. */
239 struct thread *t_ase_calc; /* ASE calculation timer. */
240 struct thread
241 *t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
242 struct thread *t_sr_update; /* Segment Routing update timer */
243
244 unsigned int maxage_delay; /* Delay on Maxage remover timer, sec */
245 struct thread *t_maxage; /* MaxAge LSA remover timer. */
246 struct thread *t_maxage_walker; /* MaxAge LSA checking timer. */
247
248 struct thread
249 *t_deferred_shutdown; /* deferred/stub-router shutdown timer*/
250
251 struct thread *t_write;
252 #define OSPF_WRITE_INTERFACE_COUNT_DEFAULT 20
253 struct thread *t_default_routemap_timer;
254
255 int write_oi_count; /* Num of packets sent per thread invocation */
256 struct thread *t_read;
257 int fd;
258 struct stream *ibuf;
259 struct list *oi_write_q;
260
261 /* Distribute lists out of other route sources. */
262 struct {
263 char *name;
264 struct access_list *list;
265 } dlist[ZEBRA_ROUTE_MAX];
266 #define DISTRIBUTE_NAME(O,T) (O)->dlist[T].name
267 #define DISTRIBUTE_LIST(O,T) (O)->dlist[T].list
268
269 /* OSPF redistribute configuration */
270 struct list *redist[ZEBRA_ROUTE_MAX + 1];
271
272 /* Redistribute tag info. */
273 route_tag_t
274 dtag[ZEBRA_ROUTE_MAX + 1]; // Pending: cant configure as of now
275
276 int default_metric; /* Default metric for redistribute. */
277
278 #define OSPF_LSA_REFRESHER_GRANULARITY 10
279 #define OSPF_LSA_REFRESHER_SLOTS \
280 ((OSPF_LS_REFRESH_TIME + OSPF_LS_REFRESH_SHIFT) \
281 / OSPF_LSA_REFRESHER_GRANULARITY \
282 + 1)
283 struct {
284 uint16_t index;
285 struct list *qs[OSPF_LSA_REFRESHER_SLOTS];
286 } lsa_refresh_queue;
287
288 struct thread *t_lsa_refresher;
289 time_t lsa_refresher_started;
290 #define OSPF_LSA_REFRESH_INTERVAL_DEFAULT 10
291 uint16_t lsa_refresh_interval;
292
293 /* Distance parameter. */
294 uint8_t distance_all;
295 uint8_t distance_intra;
296 uint8_t distance_inter;
297 uint8_t distance_external;
298
299 /* Statistics for LSA origination. */
300 uint32_t lsa_originate_count;
301
302 /* Statistics for LSA used for new instantiation. */
303 uint32_t rx_lsa_count;
304
305 /* Counter of "ip ospf area x.x.x.x" used
306 * for multual exclusion of network command under
307 * router ospf or ip ospf area x under interface. */
308 uint32_t if_ospf_cli_count;
309
310 struct route_table *distance_table;
311
312 /* Used during ospf instance going down send LSDB
313 * update to neighbors immediatly */
314 uint8_t inst_shutdown;
315
316 /* Enable or disable sending proactive ARP requests. */
317 bool proactive_arp;
318 #define OSPF_PROACTIVE_ARP_DEFAULT true
319
320 /* Redistributed external information. */
321 struct list *external[ZEBRA_ROUTE_MAX + 1];
322 #define EXTERNAL_INFO(E) (E->external_info)
323
324 /* Gracefull restart Helper supported configs*/
325 /* Supported grace interval*/
326 uint32_t supported_grace_time;
327
328 /* Helper support
329 * Supported : True
330 * Not Supported : False.
331 */
332 bool is_helper_supported;
333
334 /* Support for strict LSA check.
335 * if it is set,Helper aborted
336 * upon a TOPO change.
337 */
338 bool strict_lsa_check;
339
340 /* Support as HELPER only for
341 * planned restarts.
342 */
343 bool only_planned_restart;
344
345 /* This list contains the advertisement
346 * routerids which are not support for HELPERs.
347 */
348 struct hash *enable_rtr_list;
349
350 /* HELPER for number of active
351 * RESTARTERs.
352 */
353 uint16_t active_restarter_cnt;
354
355 /* last HELPER exit reason */
356 uint32_t last_exit_reason;
357
358 /* MPLS LDP-IGP Sync */
359 struct ldp_sync_info_cmd ldp_sync_cmd;
360
361 QOBJ_FIELDS
362 };
363 DECLARE_QOBJ_TYPE(ospf)
364
365 /* OSPF area structure. */
366 struct ospf_area {
367 /* OSPF instance. */
368 struct ospf *ospf;
369
370 /* Zebra interface list belonging to the area. */
371 struct list *oiflist;
372
373 /* Area ID. */
374 struct in_addr area_id;
375
376 /* Area ID format. */
377 int area_id_fmt;
378 #define OSPF_AREA_ID_FMT_DOTTEDQUAD 1
379 #define OSPF_AREA_ID_FMT_DECIMAL 2
380
381 /* Address range. */
382 struct list *address_range;
383
384 /* Configured variables. */
385 int external_routing; /* ExternalRoutingCapability. */
386 int no_summary; /* Don't inject summaries into stub.*/
387 int shortcut_configured; /* Area configured as shortcut. */
388 #define OSPF_SHORTCUT_DEFAULT 0
389 #define OSPF_SHORTCUT_ENABLE 1
390 #define OSPF_SHORTCUT_DISABLE 2
391 int shortcut_capability; /* Other ABRs agree on S-bit */
392 uint32_t default_cost; /* StubDefaultCost. */
393 int auth_type; /* Authentication type. */
394
395
396 uint8_t NSSATranslatorRole; /* NSSA configured role */
397 #define OSPF_NSSA_ROLE_NEVER 0
398 #define OSPF_NSSA_ROLE_CANDIDATE 1
399 #define OSPF_NSSA_ROLE_ALWAYS 2
400 uint8_t NSSATranslatorState; /* NSSA operational role */
401 #define OSPF_NSSA_TRANSLATE_DISABLED 0
402 #define OSPF_NSSA_TRANSLATE_ENABLED 1
403 int NSSATranslatorStabilityInterval;
404
405 uint8_t transit; /* TransitCapability. */
406 #define OSPF_TRANSIT_FALSE 0
407 #define OSPF_TRANSIT_TRUE 1
408 struct route_table *ranges; /* Configured Area Ranges. */
409
410 /* RFC3137 stub router state flags for area */
411 uint8_t stub_router_state;
412 #define OSPF_AREA_ADMIN_STUB_ROUTED (1 << 0) /* admin stub-router set */
413 #define OSPF_AREA_IS_STUB_ROUTED (1 << 1) /* stub-router active */
414 #define OSPF_AREA_WAS_START_STUB_ROUTED (1 << 2) /* startup SR was done */
415 /* Area related LSDBs[Type1-4]. */
416 struct ospf_lsdb *lsdb;
417
418 /* Self-originated LSAs. */
419 struct ospf_lsa *router_lsa_self;
420 struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */
421
422 /* Area announce list. */
423 struct {
424 char *name;
425 struct access_list *list;
426 } _export;
427 #define EXPORT_NAME(A) (A)->_export.name
428 #define EXPORT_LIST(A) (A)->_export.list
429
430 /* Area acceptance list. */
431 struct {
432 char *name;
433 struct access_list *list;
434 } import;
435 #define IMPORT_NAME(A) (A)->import.name
436 #define IMPORT_LIST(A) (A)->import.list
437
438 /* Type 3 LSA Area prefix-list. */
439 struct {
440 char *name;
441 struct prefix_list *list;
442 } plist_in;
443 #define PREFIX_LIST_IN(A) (A)->plist_in.list
444 #define PREFIX_NAME_IN(A) (A)->plist_in.name
445
446 struct {
447 char *name;
448 struct prefix_list *list;
449 } plist_out;
450 #define PREFIX_LIST_OUT(A) (A)->plist_out.list
451 #define PREFIX_NAME_OUT(A) (A)->plist_out.name
452
453 /* Shortest Path Tree. */
454 struct vertex *spf;
455 struct list *spf_vertex_list;
456
457 bool spf_dry_run; /* flag for checking if the SPF calculation is
458 intended for the local RIB */
459 bool spf_root_node; /* flag for checking if the calculating node is the
460 root node of the SPF tree */
461
462 /* Threads. */
463 struct thread *t_stub_router; /* Stub-router timer */
464 struct thread *t_opaque_lsa_self; /* Type-10 Opaque-LSAs origin. */
465
466 /* Statistics field. */
467 uint32_t spf_calculation; /* SPF Calculation Count. */
468
469 /* Time stamps. */
470 struct timeval ts_spf; /* SPF calculation time stamp. */
471
472 /* Router count. */
473 uint32_t abr_count; /* ABR router in this area. */
474 uint32_t asbr_count; /* ASBR router in this area. */
475
476 /* Counters. */
477 uint32_t act_ints; /* Active interfaces. */
478 uint32_t full_nbrs; /* Fully adjacent neighbors. */
479 uint32_t full_vls; /* Fully adjacent virtual neighbors. */
480 };
481
482 /* OSPF config network structure. */
483 struct ospf_network {
484 /* Area ID. */
485 struct in_addr area_id;
486 int area_id_fmt;
487 };
488
489 /* OSPF NBMA neighbor structure. */
490 struct ospf_nbr_nbma {
491 /* Neighbor IP address. */
492 struct in_addr addr;
493
494 /* OSPF interface. */
495 struct ospf_interface *oi;
496
497 /* OSPF neighbor structure. */
498 struct ospf_neighbor *nbr;
499
500 /* Neighbor priority. */
501 uint8_t priority;
502
503 /* Poll timer value. */
504 uint32_t v_poll;
505
506 /* Poll timer thread. */
507 struct thread *t_poll;
508
509 /* State change. */
510 uint32_t state_change;
511 };
512
513 /* Macro. */
514 #define OSPF_AREA_SAME(X, Y) \
515 (memcmp((X->area_id), (Y->area_id), IPV4_MAX_BYTELEN) == 0)
516
517 #define IS_OSPF_ABR(O) ((O)->flags & OSPF_FLAG_ABR)
518 #define IS_OSPF_ASBR(O) ((O)->flags & OSPF_FLAG_ASBR)
519
520 #define OSPF_IS_AREA_ID_BACKBONE(I) ((I).s_addr == OSPF_AREA_BACKBONE)
521 #define OSPF_IS_AREA_BACKBONE(A) OSPF_IS_AREA_ID_BACKBONE ((A)->area_id)
522
523 #ifdef roundup
524 # define ROUNDUP(val, gran) roundup(val, gran)
525 #else /* roundup */
526 # define ROUNDUP(val, gran) (((val) - 1 | (gran) - 1) + 1)
527 #endif /* roundup */
528
529 #define LSA_OPTIONS_GET(area) \
530 (((area)->external_routing == OSPF_AREA_DEFAULT) ? OSPF_OPTION_E : 0)
531 #define LSA_OPTIONS_NSSA_GET(area) \
532 (((area)->external_routing == OSPF_AREA_NSSA) ? OSPF_OPTION_NP : 0)
533
534 #define OSPF_TIMER_ON(T,F,V) thread_add_timer (master,(F),ospf,(V),&(T))
535 #define OSPF_AREA_TIMER_ON(T,F,V) thread_add_timer (master, (F), area, (V), &(T))
536 #define OSPF_POLL_TIMER_ON(T,F,V) thread_add_timer (master, (F), nbr_nbma, (V), &(T))
537 #define OSPF_POLL_TIMER_OFF(X) OSPF_TIMER_OFF((X))
538 #define OSPF_TIMER_OFF(X) \
539 do { \
540 if (X) { \
541 thread_cancel(X); \
542 (X) = NULL; \
543 } \
544 } while (0)
545
546 /* Extern variables. */
547 extern struct ospf_master *om;
548 extern const int ospf_redistributed_proto_max;
549 extern struct zclient *zclient;
550 extern struct thread_master *master;
551 extern int ospf_zlog;
552 extern struct zebra_privs_t ospfd_privs;
553
554 /* Prototypes. */
555 extern const char *ospf_redist_string(unsigned int route_type);
556 extern struct ospf *ospf_lookup_instance(unsigned short);
557 extern struct ospf *ospf_get(unsigned short instance, const char *name,
558 bool *created);
559 extern struct ospf *ospf_get_instance(unsigned short, bool *created);
560 extern struct ospf *ospf_lookup_by_inst_name(unsigned short instance,
561 const char *name);
562 extern struct ospf *ospf_lookup_by_vrf_id(vrf_id_t vrf_id);
563 extern void ospf_finish(struct ospf *);
564 extern void ospf_router_id_update(struct ospf *ospf);
565 extern int ospf_network_set(struct ospf *, struct prefix_ipv4 *, struct in_addr,
566 int);
567 extern int ospf_network_unset(struct ospf *, struct prefix_ipv4 *,
568 struct in_addr);
569 extern int ospf_area_display_format_set(struct ospf *, struct ospf_area *area,
570 int df);
571 extern int ospf_area_stub_set(struct ospf *, struct in_addr);
572 extern int ospf_area_stub_unset(struct ospf *, struct in_addr);
573 extern int ospf_area_no_summary_set(struct ospf *, struct in_addr);
574 extern int ospf_area_no_summary_unset(struct ospf *, struct in_addr);
575 extern int ospf_area_nssa_set(struct ospf *, struct in_addr);
576 extern int ospf_area_nssa_unset(struct ospf *, struct in_addr, int);
577 extern int ospf_area_nssa_translator_role_set(struct ospf *, struct in_addr,
578 int);
579 extern int ospf_area_export_list_set(struct ospf *, struct ospf_area *,
580 const char *);
581 extern int ospf_area_export_list_unset(struct ospf *, struct ospf_area *);
582 extern int ospf_area_import_list_set(struct ospf *, struct ospf_area *,
583 const char *);
584 extern int ospf_area_import_list_unset(struct ospf *, struct ospf_area *);
585 extern int ospf_area_shortcut_set(struct ospf *, struct ospf_area *, int);
586 extern int ospf_area_shortcut_unset(struct ospf *, struct ospf_area *);
587 extern int ospf_timers_refresh_set(struct ospf *, int);
588 extern int ospf_timers_refresh_unset(struct ospf *);
589 extern int ospf_nbr_nbma_set(struct ospf *, struct in_addr);
590 extern int ospf_nbr_nbma_unset(struct ospf *, struct in_addr);
591 extern int ospf_nbr_nbma_priority_set(struct ospf *, struct in_addr, uint8_t);
592 extern int ospf_nbr_nbma_priority_unset(struct ospf *, struct in_addr);
593 extern int ospf_nbr_nbma_poll_interval_set(struct ospf *, struct in_addr,
594 unsigned int);
595 extern int ospf_nbr_nbma_poll_interval_unset(struct ospf *, struct in_addr);
596 extern void ospf_prefix_list_update(struct prefix_list *);
597 extern void ospf_init(void);
598 extern void ospf_if_update(struct ospf *, struct interface *);
599 extern void ospf_ls_upd_queue_empty(struct ospf_interface *);
600 extern void ospf_terminate(void);
601 extern void ospf_nbr_nbma_if_update(struct ospf *, struct ospf_interface *);
602 extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup(struct ospf *,
603 struct in_addr);
604 extern struct ospf_nbr_nbma *ospf_nbr_nbma_lookup_next(struct ospf *,
605 struct in_addr *, int);
606 extern int ospf_oi_count(struct interface *);
607
608 extern struct ospf_area *ospf_area_get(struct ospf *, struct in_addr);
609 extern void ospf_area_check_free(struct ospf *, struct in_addr);
610 extern struct ospf_area *ospf_area_lookup_by_area_id(struct ospf *,
611 struct in_addr);
612 extern void ospf_area_add_if(struct ospf_area *, struct ospf_interface *);
613 extern void ospf_area_del_if(struct ospf_area *, struct ospf_interface *);
614
615 extern void ospf_interface_area_set(struct ospf *, struct interface *);
616 extern void ospf_interface_area_unset(struct ospf *, struct interface *);
617 extern bool ospf_interface_area_is_already_set(struct ospf *ospf,
618 struct interface *ifp);
619
620 extern void ospf_route_map_init(void);
621
622 extern void ospf_master_init(struct thread_master *master);
623 extern void ospf_vrf_init(void);
624 extern void ospf_vrf_terminate(void);
625 extern void ospf_vrf_link(struct ospf *ospf, struct vrf *vrf);
626 extern void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf);
627 const char *ospf_vrf_id_to_name(vrf_id_t vrf_id);
628 int ospf_area_nssa_no_summary_set(struct ospf *, struct in_addr);
629
630 const char *ospf_get_name(const struct ospf *ospf);
631 #endif /* _ZEBRA_OSPFD_H */