#define ROUTEMAP(R) (R->route_map.map)
};
+/* ospf->config */
+enum {
+ OSPF_RFC1583_COMPATIBLE = (1 << 0),
+ OSPF_OPAQUE_CAPABLE = (1 << 2),
+ OSPF_LOG_ADJACENCY_CHANGES = (1 << 3),
+ OSPF_LOG_ADJACENCY_DETAIL = (1 << 4),
+};
+
/* OSPF instance structure. */
struct ospf {
/* OSPF's running state based on the '[no] router ospf [<instance>]'
/* NSSA ABR */
uint8_t anyNSSA; /* Bump for every NSSA attached. */
- /* Configured variables. */
+ /* Configuration bitmask, refer to enum above */
uint8_t config;
-#define OSPF_RFC1583_COMPATIBLE (1 << 0)
-#define OSPF_OPAQUE_CAPABLE (1 << 2)
-#define OSPF_LOG_ADJACENCY_CHANGES (1 << 3)
-#define OSPF_LOG_ADJACENCY_DETAIL (1 << 4)
/* Opaque-LSA administrative flags. */
uint8_t opaque;
struct ospf_lsdb *lsdb;
/* Flags. */
- int external_origin; /* AS-external-LSA origin flag. */
int ase_calc; /* ASE calculation flag. */
struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */
struct thread *t_distribute_update; /* Distirbute list update timer. */
struct thread *t_spf_calc; /* SPF calculation timer. */
struct thread *t_ase_calc; /* ASE calculation timer. */
- struct thread *t_external_lsa; /* AS-external-LSA origin timer. */
struct thread
*t_opaque_lsa_self; /* Type-11 Opaque-LSAs origin event. */
struct thread *t_sr_update; /* Segment Routing update timer */
/* Prototypes. */
extern const char *ospf_redist_string(unsigned int route_type);
extern struct ospf *ospf_lookup_instance(unsigned short);
-extern struct ospf *ospf_get(unsigned short instance, const char *name);
-extern struct ospf *ospf_get_instance(unsigned short);
+extern struct ospf *ospf_get(unsigned short instance, const char *name,
+ bool *created);
+extern struct ospf *ospf_get_instance(unsigned short, bool *created);
extern struct ospf *ospf_lookup_by_inst_name(unsigned short instance,
const char *name);
extern struct ospf *ospf_lookup_by_vrf_id(vrf_id_t vrf_id);
extern void ospf_interface_area_set(struct ospf *, struct interface *);
extern void ospf_interface_area_unset(struct ospf *, struct interface *);
+extern bool ospf_interface_area_is_already_set(struct ospf *ospf,
+ struct interface *ifp);
extern void ospf_route_map_init(void);
const char *ospf_vrf_id_to_name(vrf_id_t vrf_id);
int ospf_area_nssa_no_summary_set(struct ospf *, struct in_addr);
+const char *ospf_get_name(const struct ospf *ospf);
#endif /* _ZEBRA_OSPFD_H */