ospfd.h 19 KB

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