X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ospfd%2Fospfd.h;h=4df65ea759d65889cd3ca943ab9bbf7e8b39f4d3;hb=62bd2580e3e7934d3512b6a88aaf93528a1d2f26;hp=401a89fa38e402d0268be2449ceaa507f307a0ea;hpb=aef69e4f39d7f9d23f503907b4d4a3056ed2b537;p=mirror_frr.git diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 401a89fa3..4df65ea75 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -1,22 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * OSPFd main header. * Copyright (C) 1998, 99, 2000 Kunihiro Ishiguro, Toshiaki Takada - * - * This file is part of GNU Zebra. - * - * GNU Zebra is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * GNU Zebra is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; see the file COPYING; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _ZEBRA_OSPFD_H @@ -116,7 +101,25 @@ struct ospf_redist { struct route_map *map; } route_map; /* +1 is for default-information */ #define ROUTEMAP_NAME(R) (R->route_map.name) -#define ROUTEMAP(R) (R->route_map.map) +#define ROUTEMAP(R) (R->route_map.map) +}; + +/* OSPF area flood reduction info */ +struct ospf_area_fr_info { + bool enabled; /* Area support for Flood Reduction */ + bool configured; /* Flood Reduction configured per area knob */ + bool state_changed; /* flood reduction state change info */ + int router_lsas_recv_dc_bit; /* Number of unique router lsas + * received with DC bit set. + * (excluding self) + */ + bool area_ind_lsa_recvd; /* Indication lsa received in this area */ + bool area_dc_clear; /* Area has atleast one lsa with dc bit 0( + * excluding indication lsa) + */ + struct ospf_lsa *indication_lsa_self; /* Indication LSA generated + * in the area. + */ }; /* ospf->config */ @@ -255,6 +258,7 @@ struct ospf { /* Threads. */ struct thread *t_abr_task; /* ABR task timer. */ + struct thread *t_abr_fr; /* ABR FR timer. */ struct thread *t_asbr_check; /* ASBR check timer. */ struct thread *t_asbr_nssa_redist_update; /* ASBR NSSA redistribution update timer. */ @@ -313,6 +317,7 @@ struct ospf { time_t lsa_refresher_started; #define OSPF_LSA_REFRESH_INTERVAL_DEFAULT 10 uint16_t lsa_refresh_interval; + uint16_t lsa_refresh_timer; /* Distance parameter. */ uint8_t distance_all; @@ -405,6 +410,9 @@ struct ospf { bool ti_lfa_enabled; enum protection_type ti_lfa_protection_type; + /* Flood Reduction configuration state */ + bool fr_configured; + QOBJ_FIELDS; }; DECLARE_QOBJ_TYPE(ospf); @@ -590,6 +598,8 @@ struct ospf_area { uint32_t act_ints; /* Active interfaces. */ uint32_t full_nbrs; /* Fully adjacent neighbors. */ uint32_t full_vls; /* Fully adjacent virtual neighbors. */ + + struct ospf_area_fr_info fr_info; /* Flood reduction info. */ }; /* OSPF config network structure. */ @@ -647,8 +657,6 @@ struct ospf_nbr_nbma { #define OSPF_TIMER_ON(T,F,V) thread_add_timer (master,(F),ospf,(V),&(T)) #define OSPF_AREA_TIMER_ON(T,F,V) thread_add_timer (master, (F), area, (V), &(T)) #define OSPF_POLL_TIMER_ON(T,F,V) thread_add_timer (master, (F), nbr_nbma, (V), &(T)) -#define OSPF_POLL_TIMER_OFF(X) OSPF_TIMER_OFF((X)) -#define OSPF_TIMER_OFF(X) thread_cancel(&(X)) /* Extern variables. */ extern struct ospf_master *om;