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