]> 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 b31ad303758d175f4e80abfa0f986da016a1ef69..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;
@@ -500,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);
@@ -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 */