]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospfd.h
Merge pull request #5549 from donaldsharp/automated
[mirror_frr.git] / ospfd / ospfd.h
index bc9c68d570d758155730035e595d4661870332e2..5e91e6f8e6f73dcde6b513dfa9db1ba5c1d3e94e 100644 (file)
@@ -117,6 +117,14 @@ struct ospf_redist {
 #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>]'
@@ -151,12 +159,8 @@ struct ospf {
        /* 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;
@@ -202,7 +206,6 @@ struct ospf {
        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 */
@@ -233,7 +236,6 @@ struct ospf {
        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 */
@@ -502,8 +504,9 @@ extern struct zebra_privs_t ospfd_privs;
 /* 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);
@@ -561,6 +564,8 @@ extern void ospf_area_del_if(struct ospf_area *, struct ospf_interface *);
 
 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);
 
@@ -572,4 +577,5 @@ extern void ospf_vrf_unlink(struct ospf *ospf, struct vrf *vrf);
 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 */