@@ -225,122 +225,111 @@ enum lsid_status { LSID_AVAILABLE = 0, LSID_CHANGE, LSID_NOT_AVAILABLE };
225
225
/* Prototypes. */
226
226
/* XXX: Eek, time functions, similar are in lib/thread.c */
227
227
extern struct timeval int2tv (int );
228
- extern struct timeval msec2tv (int );
228
+ extern struct timeval msec2tv (int a );
229
229
230
- extern int get_age (struct ospf_lsa * );
231
- extern uint16_t ospf_lsa_checksum (struct lsa_header * );
232
- extern int ospf_lsa_checksum_valid (struct lsa_header * );
233
- extern int ospf_lsa_refresh_delay (struct ospf_lsa * );
230
+ extern int get_age (struct ospf_lsa * lsa );
231
+ extern uint16_t ospf_lsa_checksum (struct lsa_header * lsah );
232
+ extern int ospf_lsa_checksum_valid (struct lsa_header * lsah );
233
+ extern int ospf_lsa_refresh_delay (struct ospf_lsa * lsa );
234
234
235
- extern const char * dump_lsa_key (struct ospf_lsa * );
236
- extern uint32_t lsa_seqnum_increment (struct ospf_lsa * );
237
- extern void lsa_header_set (struct stream * , uint8_t , uint8_t , struct in_addr ,
238
- struct in_addr );
239
- extern struct ospf_neighbor * ospf_nbr_lookup_ptop (struct ospf_interface * );
240
- extern int ospf_check_nbr_status (struct ospf * );
235
+ extern const char * dump_lsa_key (struct ospf_lsa * lsa );
236
+ extern uint32_t lsa_seqnum_increment (struct ospf_lsa * lsa );
237
+ extern void lsa_header_set (struct stream * s , uint8_t options , uint8_t type , struct in_addr id ,
238
+ struct in_addr router_id );
239
+ extern struct ospf_neighbor * ospf_nbr_lookup_ptop (struct ospf_interface * oi );
240
+ extern int ospf_check_nbr_status (struct ospf * ospf );
241
241
242
242
/* Prototype for LSA primitive. */
243
243
extern struct ospf_lsa * ospf_lsa_new (void );
244
244
extern struct ospf_lsa * ospf_lsa_new_and_data (size_t size );
245
- extern struct ospf_lsa * ospf_lsa_dup (struct ospf_lsa * );
246
- extern void ospf_lsa_free (struct ospf_lsa * );
247
- extern struct ospf_lsa * ospf_lsa_lock (struct ospf_lsa * );
248
- extern void ospf_lsa_unlock (struct ospf_lsa * * );
249
- extern void ospf_lsa_discard (struct ospf_lsa * );
250
- extern int ospf_lsa_flush_schedule (struct ospf * , struct ospf_lsa * );
251
- extern struct lsa_header * ospf_lsa_data_new (size_t );
252
- extern struct lsa_header * ospf_lsa_data_dup (struct lsa_header * );
253
- extern void ospf_lsa_data_free (struct lsa_header * );
245
+ extern struct ospf_lsa * ospf_lsa_dup (struct ospf_lsa * lsa );
246
+ extern void ospf_lsa_free (struct ospf_lsa * lsa );
247
+ extern struct ospf_lsa * ospf_lsa_lock (struct ospf_lsa * lsa );
248
+ extern void ospf_lsa_unlock (struct ospf_lsa * * lsa );
249
+ extern void ospf_lsa_discard (struct ospf_lsa * lsa );
250
+ extern int ospf_lsa_flush_schedule (struct ospf * ospf , struct ospf_lsa * lsa );
251
+ extern struct lsa_header * ospf_lsa_data_new (size_t size );
252
+ extern struct lsa_header * ospf_lsa_data_dup (struct lsa_header * lsah );
253
+ extern void ospf_lsa_data_free (struct lsa_header * lsah );
254
254
255
255
/* Prototype for various LSAs */
256
256
extern void ospf_router_lsa_body_set (struct stream * * s , struct ospf_area * area );
257
257
extern uint8_t router_lsa_flags (struct ospf_area * area );
258
- extern int ospf_router_lsa_update (struct ospf * );
259
- extern int ospf_router_lsa_update_area (struct ospf_area * );
258
+ extern int ospf_router_lsa_update (struct ospf * ospf );
259
+ extern int ospf_router_lsa_update_area (struct ospf_area * area );
260
260
261
- extern void ospf_network_lsa_update (struct ospf_interface * );
261
+ extern void ospf_network_lsa_update (struct ospf_interface * oi );
262
262
263
- extern struct ospf_lsa *
264
- ospf_summary_lsa_originate (struct prefix_ipv4 * , uint32_t , struct ospf_area * );
265
- extern struct ospf_lsa * ospf_summary_asbr_lsa_originate (struct prefix_ipv4 * ,
266
- uint32_t ,
267
- struct ospf_area * );
263
+ extern struct ospf_lsa * ospf_summary_lsa_originate (struct prefix_ipv4 * p , uint32_t metric ,
264
+ struct ospf_area * area );
265
+ extern struct ospf_lsa * ospf_summary_asbr_lsa_originate (struct prefix_ipv4 * p , uint32_t metric ,
266
+ struct ospf_area * area );
268
267
269
- extern struct ospf_lsa * ospf_lsa_install (struct ospf * , struct ospf_interface * ,
270
- struct ospf_lsa * );
268
+ extern struct ospf_lsa * ospf_lsa_install (struct ospf * ospf , struct ospf_interface * oi ,
269
+ struct ospf_lsa * lsa );
271
270
272
271
extern void ospf_nssa_lsa_flush (struct ospf * ospf , struct prefix_ipv4 * p );
273
- extern void ospf_external_lsa_flush (struct ospf * , uint8_t ,
274
- struct prefix_ipv4 * ,
272
+ extern void ospf_external_lsa_flush (struct ospf * ospf , uint8_t type , struct prefix_ipv4 * p ,
275
273
ifindex_t /* , struct in_addr nexthop */ );
276
274
277
- extern struct in_addr ospf_get_ip_from_ifp (struct ospf_interface * );
275
+ extern struct in_addr ospf_get_ip_from_ifp (struct ospf_interface * oi );
278
276
279
- extern struct ospf_lsa * ospf_external_lsa_originate (struct ospf * ,
280
- struct external_info * );
277
+ extern struct ospf_lsa * ospf_external_lsa_originate (struct ospf * ospf , struct external_info * ei );
281
278
extern struct ospf_lsa * ospf_nssa_lsa_originate (struct ospf_area * area ,
282
279
struct external_info * ei );
283
280
extern struct ospf_lsa * ospf_nssa_lsa_refresh (struct ospf_area * area ,
284
281
struct ospf_lsa * lsa ,
285
282
struct external_info * ei );
286
283
extern void ospf_external_lsa_rid_change (struct ospf * ospf );
287
- extern struct ospf_lsa * ospf_lsa_lookup (struct ospf * ospf , struct ospf_area * ,
288
- uint32_t , struct in_addr ,
289
- struct in_addr );
290
- extern struct ospf_lsa * ospf_lsa_lookup_by_id (struct ospf_area * , uint32_t ,
291
- struct in_addr );
292
- extern struct ospf_lsa * ospf_lsa_lookup_by_header (struct ospf_area * ,
293
- struct lsa_header * );
294
- extern int ospf_lsa_more_recent (struct ospf_lsa * , struct ospf_lsa * );
295
- extern int ospf_lsa_different (struct ospf_lsa * , struct ospf_lsa * ,
296
- bool ignore_rcvd_flag );
297
- extern void ospf_flush_self_originated_lsas_now (struct ospf * );
298
-
299
- extern int ospf_lsa_is_self_originated (struct ospf * , struct ospf_lsa * );
300
-
301
- extern struct ospf_lsa * ospf_lsa_lookup_by_prefix (struct ospf_lsdb * , uint8_t ,
302
- struct prefix_ipv4 * ,
303
- struct in_addr );
304
-
305
- extern void ospf_lsa_maxage (struct ospf * , struct ospf_lsa * );
306
- extern uint32_t get_metric (uint8_t * );
307
-
308
- extern void ospf_lsa_maxage_walker (struct event * thread );
309
- extern struct ospf_lsa * ospf_lsa_refresh (struct ospf * , struct ospf_lsa * );
310
-
311
- extern void ospf_external_lsa_refresh_default (struct ospf * );
312
-
313
- extern void ospf_external_lsa_refresh_type (struct ospf * , uint8_t ,
314
- unsigned short , int );
315
- extern struct ospf_lsa * ospf_external_lsa_refresh (struct ospf * ,
316
- struct ospf_lsa * ,
317
- struct external_info * , int ,
318
- bool aggr );
284
+ extern struct ospf_lsa * ospf_lsa_lookup (struct ospf * ospf , struct ospf_area * area , uint32_t type ,
285
+ struct in_addr id , struct in_addr adv_router );
286
+ extern struct ospf_lsa * ospf_lsa_lookup_by_id (struct ospf_area * area , uint32_t type ,
287
+ struct in_addr id );
288
+ extern struct ospf_lsa * ospf_lsa_lookup_by_header (struct ospf_area * area , struct lsa_header * lsah );
289
+ extern int ospf_lsa_more_recent (struct ospf_lsa * l1 , struct ospf_lsa * l2 );
290
+ extern int ospf_lsa_different (struct ospf_lsa * l1 , struct ospf_lsa * l2 , bool ignore_rcvd_flag );
291
+ extern void ospf_flush_self_originated_lsas_now (struct ospf * ospf );
292
+
293
+ extern int ospf_lsa_is_self_originated (struct ospf * ospf , struct ospf_lsa * lsa );
294
+
295
+ extern struct ospf_lsa * ospf_lsa_lookup_by_prefix (struct ospf_lsdb * lsdb , uint8_t type ,
296
+ struct prefix_ipv4 * p , struct in_addr router_id );
297
+
298
+ extern void ospf_lsa_maxage (struct ospf * ospf , struct ospf_lsa * lsa );
299
+ extern uint32_t get_metric (uint8_t * metric );
300
+
301
+ extern void ospf_lsa_maxage_walker (struct event * event );
302
+ extern struct ospf_lsa * ospf_lsa_refresh (struct ospf * ospf , struct ospf_lsa * lsa );
303
+
304
+ extern void ospf_external_lsa_refresh_default (struct ospf * ospf );
305
+
306
+ extern void ospf_external_lsa_refresh_type (struct ospf * ospf , uint8_t type , uint8_t instance ,
307
+ int force );
308
+ extern struct ospf_lsa * ospf_external_lsa_refresh (struct ospf * ospf , struct ospf_lsa * lsa ,
309
+ struct external_info * ei , int force , bool aggr );
319
310
extern enum lsid_status ospf_lsa_unique_id (struct ospf * ospf ,
320
311
struct ospf_lsdb * lsdb ,
321
312
uint8_t type , struct prefix_ipv4 * p ,
322
313
struct in_addr * addr );
323
- extern void ospf_schedule_lsa_flood_area (struct ospf_area * , struct ospf_lsa * );
324
- extern void ospf_schedule_lsa_flush_area (struct ospf_area * , struct ospf_lsa * );
314
+ extern void ospf_schedule_lsa_flood_area (struct ospf_area * area , struct ospf_lsa * lsa );
315
+ extern void ospf_schedule_lsa_flush_area (struct ospf_area * area , struct ospf_lsa * lsa );
325
316
326
- extern void ospf_refresher_register_lsa (struct ospf * , struct ospf_lsa * );
327
- extern void ospf_refresher_unregister_lsa (struct ospf * , struct ospf_lsa * );
328
- extern void ospf_lsa_refresh_walker (struct event * thread );
317
+ extern void ospf_refresher_register_lsa (struct ospf * ospf , struct ospf_lsa * lsa );
318
+ extern void ospf_refresher_unregister_lsa (struct ospf * ospf , struct ospf_lsa * lsa );
319
+ extern void ospf_lsa_refresh_walker (struct event * event );
329
320
330
- extern void ospf_lsa_maxage_delete (struct ospf * , struct ospf_lsa * );
321
+ extern void ospf_lsa_maxage_delete (struct ospf * ospf , struct ospf_lsa * lsa );
331
322
332
- extern void ospf_discard_from_db (struct ospf * , struct ospf_lsdb * ,
333
- struct ospf_lsa * );
323
+ extern void ospf_discard_from_db (struct ospf * ospf , struct ospf_lsdb * lsdb , struct ospf_lsa * lsa );
334
324
335
- extern int metric_type (struct ospf * , uint8_t , unsigned short );
336
- extern int metric_value (struct ospf * , uint8_t , unsigned short );
325
+ extern int metric_type (struct ospf * ospf , uint8_t src , unsigned short instance );
326
+ extern int metric_value (struct ospf * ospf , uint8_t src , unsigned short instance );
337
327
338
328
extern char link_info_set (struct stream * * s , struct in_addr id ,
339
329
struct in_addr data , uint8_t type , uint8_t tos ,
340
330
uint16_t cost );
341
331
342
- extern struct in_addr ospf_get_nssa_ip (struct ospf_area * );
343
- extern int ospf_translated_nssa_compare (struct ospf_lsa * , struct ospf_lsa * );
332
+ extern struct in_addr ospf_get_nssa_ip (struct ospf_area * area );
344
333
extern struct ospf_lsa * ospf_translated_nssa_refresh (struct ospf * ospf ,
345
334
struct ospf_lsa * type7 ,
346
335
struct ospf_lsa * type5 );
@@ -351,7 +340,7 @@ extern void ospf_check_and_gen_init_seq_lsa(struct ospf_interface *oi,
351
340
struct ospf_lsa * lsa );
352
341
extern void ospf_flush_lsa_from_area (struct ospf * ospf , struct in_addr area_id ,
353
342
int type );
354
- extern void ospf_maxage_lsa_remover (struct event * thread );
343
+ extern void ospf_maxage_lsa_remover (struct event * event );
355
344
extern bool ospf_check_dna_lsa (const struct ospf_lsa * lsa );
356
345
extern void ospf_refresh_area_self_lsas (struct ospf_area * area );
357
346
0 commit comments