2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2002-12-13 21:15:29 +01:00
|
|
|
/*
|
|
|
|
* OSPF Flooding -- RFC2328 Section 13.
|
|
|
|
* Copyright (C) 1999, 2000 Toshiaki Takada
|
|
|
|
*/
|
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
#ifndef _ZEBRA_OSPF_FLOOD_H
|
|
|
|
#define _ZEBRA_OSPF_FLOOD_H
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2024-07-05 22:44:30 +02:00
|
|
|
#include "typesafe.h"
|
|
|
|
|
2024-05-31 16:08:04 +02:00
|
|
|
/*
|
|
|
|
* OSPF Temporal LSA List
|
|
|
|
*/
|
|
|
|
PREDECL_DLIST(ospf_lsa_list);
|
|
|
|
|
|
|
|
struct ospf_lsa_list_entry {
|
|
|
|
/* Linkage for LSA List */
|
|
|
|
struct ospf_lsa_list_item list_linkage;
|
|
|
|
|
2024-07-05 22:44:30 +02:00
|
|
|
union {
|
|
|
|
/*
|
|
|
|
* Time associated with the list entry. For example, for a
|
|
|
|
* neigbhor link retransmission list, this is the
|
|
|
|
* retransmission time.
|
|
|
|
*/
|
|
|
|
struct timeval list_entry_timeval;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Destanation address specific to the LSA list. For example,
|
|
|
|
* the distination for an associated direct LS acknowledgment.
|
|
|
|
*/
|
|
|
|
struct in_addr list_entry_dst_addr;
|
|
|
|
} u;
|
2024-05-31 16:08:04 +02:00
|
|
|
|
|
|
|
struct ospf_lsa *lsa;
|
|
|
|
};
|
2024-07-05 22:44:30 +02:00
|
|
|
#define list_entry_time u.list_entry_timeval
|
|
|
|
#define list_entry_dst u.list_entry_dst_addr
|
2024-05-31 16:08:04 +02:00
|
|
|
|
|
|
|
DECLARE_DLIST(ospf_lsa_list, struct ospf_lsa_list_entry, list_linkage);
|
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern int ospf_flood(struct ospf *, struct ospf_neighbor *, struct ospf_lsa *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern int ospf_flood_through(struct ospf *, struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern int ospf_flood_through_area(struct ospf_area *, struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern int ospf_flood_through_as(struct ospf *, struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
2021-05-31 15:27:51 +02:00
|
|
|
extern int ospf_flood_through_interface(struct ospf_interface *oi,
|
|
|
|
struct ospf_neighbor *inbr,
|
|
|
|
struct ospf_lsa *lsa);
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern unsigned long ospf_ls_request_count(struct ospf_neighbor *);
|
|
|
|
extern int ospf_ls_request_isempty(struct ospf_neighbor *);
|
|
|
|
extern struct ospf_lsa *ospf_ls_request_new(struct lsa_header *);
|
|
|
|
extern void ospf_ls_request_free(struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_request_add(struct ospf_neighbor *, struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_request_delete(struct ospf_neighbor *, struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_request_delete_all(struct ospf_neighbor *);
|
|
|
|
extern struct ospf_lsa *ospf_ls_request_lookup(struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern unsigned long ospf_ls_retransmit_count(struct ospf_neighbor *);
|
|
|
|
extern unsigned long ospf_ls_retransmit_count_self(struct ospf_neighbor *, int);
|
|
|
|
extern int ospf_ls_retransmit_isempty(struct ospf_neighbor *);
|
|
|
|
extern void ospf_ls_retransmit_add(struct ospf_neighbor *, struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_retransmit_delete(struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_retransmit_clear(struct ospf_neighbor *);
|
2024-05-31 16:08:04 +02:00
|
|
|
extern void ospf_ls_retransmit_set_timer(struct ospf_neighbor *nbr);
|
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern struct ospf_lsa *ospf_ls_retransmit_lookup(struct ospf_neighbor *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_retransmit_delete_nbr_area(struct ospf_area *,
|
|
|
|
struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_retransmit_delete_nbr_as(struct ospf *, struct ospf_lsa *);
|
|
|
|
extern void ospf_ls_retransmit_add_nbr_all(struct ospf_interface *,
|
2002-12-13 21:15:29 +01:00
|
|
|
struct ospf_lsa *);
|
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern void ospf_flood_lsa_area(struct ospf_lsa *, struct ospf_area *);
|
|
|
|
extern void ospf_flood_lsa_as(struct ospf_lsa *);
|
|
|
|
extern void ospf_lsa_flush_area(struct ospf_lsa *, struct ospf_area *);
|
|
|
|
extern void ospf_lsa_flush_as(struct ospf *, struct ospf_lsa *);
|
ospfd: Fix maxage/flush to not try flood twice, remember maxages for longer
2006-05-30 Paul Jakma <paul.jakma@sun.com>
* (general) Fix confusion around MaxAge-ing and problem with
high-latency networks. Analysis and suggested fixes by
Phillip Spagnolo, in [quagga-dev 4132], on which this commit
expands slightly.
* ospf_flood.{c,h}: (ospf_lsa_flush) new function.
Scope-general form of existing flush functions, essentially
the dormant ospf_maxage_flood() but without the ambiguity of
whether it is responsible for flooding.
* ospf_lsa.c: (ospf_lsa_maxage) Role minimised to simply setup
LSA on the Maxage list and schedule removal - no more.
ospf_lsa_flush* being the primary way to kick-off flushes
of LSAs.
Don't hardcode the remover-timer value, which was too
short for very high-latency networks.
(ospf_maxage_lsa_remover) Just do what needs to be done to
remove maxage LSAs from the maxage list, remove the call
to ospf_flood_through().
Don't hardcode remove-timer value.
(ospf_lsa_{install,flush_schedule}) ospf_lsa_flush is the correct
entrypoint to flushing maxaged LSAs.
(lsa_header_set) Use a define for the initial age, useful for
testing.
* ospf_opaque.c: (ospf_opaque_lsa_refresh) ditto.
(ospf_opaque_lsa_flush_schedule) ditto.
* ospfd.h: ({struct ospf,ospf_new}) Add maxage_delay parameter,
interval to wait before running the maxage_remover. Supply a
suitable default.
Add a define for OSPF_LSA_INITIAL_AGE, see lsa_header_set().
2010-01-25 00:36:20 +01:00
|
|
|
extern void ospf_lsa_flush(struct ospf *, struct ospf_lsa *);
|
2017-08-25 22:51:12 +02:00
|
|
|
extern struct external_info *ospf_external_info_check(struct ospf *,
|
|
|
|
struct ospf_lsa *);
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
extern void ospf_lsdb_init(struct ospf_lsdb *);
|
2022-11-21 13:50:16 +01:00
|
|
|
extern void ospf_area_update_fr_state(struct ospf_area *area);
|
|
|
|
extern void ospf_refresh_dna_type5_and_type7_lsas(struct ospf *ospf);
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2005-05-06 23:37:42 +02:00
|
|
|
#endif /* _ZEBRA_OSPF_FLOOD_H */
|