diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-10-26 19:12:41 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-11-09 10:09:47 +0100 | 
| commit | ddd73a968dc61766b6a44442c0bccd7ff0a643a8 (patch) | |
| tree | 228365f0477115012e2ae36bf37b2181558c57ae /ospfd/ospf_ri.h | |
| parent | 2379dbecbd3b56ef1affc9127b8eb44f61d591fa (diff) | |
OSPF: Add support to multi-area to Router Info.
  Router Information needs to specify the area ID when flooding scope is set to
  AREA. However, this authorize only one AREA. Thus, Area Border Router (ABR) are
  unable to flood Router Information Opaque LSA in all areas they are belongs to.
  The path implies that the area ID is no more necessary for the command
  'router-info area'. It remains suported for compatibility, but mark as
  deprecated. Documentation has been updated accordingly.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_ri.h')
| -rw-r--r-- | ospfd/ospf_ri.h | 66 | 
1 files changed, 65 insertions, 1 deletions
diff --git a/ospfd/ospf_ri.h b/ospfd/ospf_ri.h index 26bcc1b62a..84511ac5e7 100644 --- a/ospfd/ospf_ri.h +++ b/ospfd/ospf_ri.h @@ -170,7 +170,71 @@ struct ri_pce_subtlv_cap_flag {  /* Structure to share flooding scope info for Segment Routing */  struct scope_info {  	uint8_t scope; -	struct in_addr area_id; +	struct list *areas; +}; + +/* Flags to manage the Router Information LSA. */ +#define RIFLG_LSA_INACTIVE		0x0 +#define RIFLG_LSA_ENGAGED		0x1 +#define RIFLG_LSA_FORCED_REFRESH	0x2 + +/* Store Router Information PCE TLV and SubTLV in network byte order. */ +struct ospf_pce_info { +	bool enabled; +	struct ri_tlv_pce pce_header; +	struct ri_pce_subtlv_address pce_address; +	struct ri_pce_subtlv_path_scope pce_scope; +	struct list *pce_domain; +	struct list *pce_neighbor; +	struct ri_pce_subtlv_cap_flag pce_cap_flag; +}; + +/* + * Store Router Information Segment Routing TLV and SubTLV + * in network byte order + */ +struct ospf_ri_sr_info { +	bool enabled; +	/* Algorithms supported by the node */ +	struct ri_sr_tlv_sr_algorithm algo; +	/* +	 * Segment Routing Global Block i.e. label range +	 * Only one range supported in this code +	 */ +	struct ri_sr_tlv_sid_label_range range; +	/* Maximum SID Depth supported by the node */ +	struct ri_sr_tlv_node_msd msd; +}; + +/* Store area information to flood LSA per area */ +struct ospf_ri_area_info { + +	uint32_t flags; + +	/* area pointer if flooding is Type 10 Null if flooding is AS scope */ +	struct ospf_area *area; +}; + +/* Following structure are internal use only. */ +struct ospf_router_info { +	bool enabled; + +	uint8_t registered; +	uint8_t scope; +	/* LSA flags are only used when scope is AS flooding */ +	uint32_t as_flags; + +	/* List of area info to flood RI LSA */ +	struct list *area_info; + +	/* Store Router Information Capabilities LSA */ +	struct ri_tlv_router_cap router_cap; + +	/* Store PCE capability LSA */ +	struct ospf_pce_info pce_info; + +	/* Store SR capability LSA */ +	struct ospf_ri_sr_info sr_info;  };  /* Prototypes. */  | 
