]> 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 937d363b4c2030b293f006ec6889c6b5e0009072..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);