ospfd.h 20 KB

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