]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf6d: use in_addr_t for area/router IDs
authorDavid Lamparter <equinox@diac24.net>
Fri, 27 Mar 2020 12:39:01 +0000 (13:39 +0100)
committerDavid Lamparter <equinox@diac24.net>
Tue, 14 Jul 2020 09:16:01 +0000 (11:16 +0200)
Signed-off-by: David Lamparter <equinox@diac24.net>
ospf6d/ospf6_area.h
ospf6d/ospf6_interface.h
ospf6d/ospf6_intra.h
ospf6d/ospf6_lsa.h
ospf6d/ospf6_message.h
ospf6d/ospf6_neighbor.h
ospf6d/ospf6_route.h
ospf6d/ospf6_top.h

index 5648b1dfec3aa2fe123b6b52971c2688295af26b..c77b6d89a90c8264426751a50e22b3757484cbff 100644 (file)
@@ -28,7 +28,7 @@ struct ospf6_area {
        struct ospf6 *ospf6;
 
        /* Area-ID */
-       uint32_t area_id;
+       in_addr_t area_id;
 
 #define OSPF6_AREA_FMT_DOTTEDQUAD 1
 #define OSPF6_AREA_FMT_DECIMAL    2
index 05ba698a1b0858d9edabc342513d13c9b4003fc2..6cbfe04c441638e7dcac030107bd407f691327a2 100644 (file)
@@ -90,10 +90,10 @@ struct ospf6_interface {
        uint8_t mtu_ignore;
 
        /* Decision of DR Election */
-       uint32_t drouter;
-       uint32_t bdrouter;
-       uint32_t prev_drouter;
-       uint32_t prev_bdrouter;
+       in_addr_t drouter;
+       in_addr_t bdrouter;
+       in_addr_t prev_drouter;
+       in_addr_t prev_bdrouter;
 
        /* Linklocal LSA Database: includes Link-LSA */
        struct ospf6_lsdb *lsdb;
index 672e288bf3d9248b9e629f4ff68a37be5a05e636..9c29681dee56426995dc27e38a6c5907e3a7eacc 100644 (file)
@@ -23,8 +23,8 @@
 
 /* Debug option */
 extern unsigned char conf_debug_ospf6_brouter;
-extern uint32_t conf_debug_ospf6_brouter_specific_router_id;
-extern uint32_t conf_debug_ospf6_brouter_specific_area_id;
+extern in_addr_t conf_debug_ospf6_brouter_specific_router_id;
+extern in_addr_t conf_debug_ospf6_brouter_specific_area_id;
 #define OSPF6_DEBUG_BROUTER_SUMMARY         0x01
 #define OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER 0x02
 #define OSPF6_DEBUG_BROUTER_SPECIFIC_AREA   0x04
@@ -86,7 +86,7 @@ struct ospf6_router_lsdesc {
        uint16_t metric; /* output cost */
        uint32_t interface_id;
        uint32_t neighbor_interface_id;
-       uint32_t neighbor_router_id;
+       in_addr_t neighbor_router_id;
 };
 
 #define OSPF6_ROUTER_LSDESC_POINTTOPOINT       1
@@ -125,7 +125,7 @@ struct ospf6_network_lsa {
 /* Link State Description in Router-LSA */
 #define OSPF6_NETWORK_LSDESC_FIX_SIZE          4U
 struct ospf6_network_lsdesc {
-       uint32_t router_id;
+       in_addr_t router_id;
 };
 #define NETWORK_LSDESC_GET_NBR_ROUTERID(x)                                     \
        (((struct ospf6_network_lsdesc *)(x))->router_id)
@@ -146,7 +146,7 @@ struct ospf6_intra_prefix_lsa {
        uint16_t prefix_num;
        uint16_t ref_type;
        uint32_t ref_id;
-       uint32_t ref_adv_router;
+       in_addr_t ref_adv_router;
        /* followed by ospf6 prefix(es) */
 };
 
index 5519dd1b80d39a1d741019dc2640699001df5176..a85d7b06035f587ef79816e6415b06ad366268c4 100644 (file)
@@ -80,8 +80,8 @@
 struct ospf6_lsa_header {
        uint16_t age;   /* LS age */
        uint16_t type;       /* LS type */
-       uint32_t id;     /* Link State ID */
-       uint32_t adv_router; /* Advertising Router */
+       in_addr_t id;    /* Link State ID */
+       in_addr_t adv_router; /* Advertising Router */
        uint32_t seqnum;     /* LS sequence number */
        uint16_t checksum;   /* LS checksum */
        uint16_t length;     /* LSA length */
index d24b7f89420e68a1e790c1d20c31c91f55699832..7ec8cb785f87a914ab85cf44f7473890b22bc95b 100644 (file)
@@ -49,8 +49,8 @@ struct ospf6_header {
        uint8_t version;
        uint8_t type;
        uint16_t length;
-       uint32_t router_id;
-       uint32_t area_id;
+       in_addr_t router_id;
+       in_addr_t area_id;
        uint16_t checksum;
        uint8_t instance_id;
        uint8_t reserved;
@@ -66,8 +66,8 @@ struct ospf6_hello {
        uint8_t options[3];
        uint16_t hello_interval;
        uint16_t dead_interval;
-       uint32_t drouter;
-       uint32_t bdrouter;
+       in_addr_t drouter;
+       in_addr_t bdrouter;
        /* Followed by Router-IDs */
 };
 
@@ -94,8 +94,8 @@ struct ospf6_dbdesc {
 struct ospf6_lsreq_entry {
        uint16_t reserved;   /* Must Be Zero */
        uint16_t type;       /* LS type */
-       uint32_t id;     /* Link State ID */
-       uint32_t adv_router; /* Advertising Router */
+       in_addr_t id;    /* Link State ID */
+       in_addr_t adv_router; /* Advertising Router */
 };
 
 /* Link State Update */
index e221e9d82cc5dfb7a437509dd22ca17f48a83e61..1a45a1966a818bcb2d20732ca87d1d8f0e51e761 100644 (file)
@@ -48,7 +48,7 @@ struct ospf6_neighbor {
        struct timeval last_changed;
 
        /* Neighbor Router ID */
-       uint32_t router_id;
+       in_addr_t router_id;
 
        /* Neighbor Interface ID */
        ifindex_t ifindex;
@@ -56,10 +56,10 @@ struct ospf6_neighbor {
        /* Router Priority of this neighbor */
        uint8_t priority;
 
-       uint32_t drouter;
-       uint32_t bdrouter;
-       uint32_t prev_drouter;
-       uint32_t prev_bdrouter;
+       in_addr_t drouter;
+       in_addr_t bdrouter;
+       in_addr_t prev_drouter;
+       in_addr_t prev_bdrouter;
 
        /* Options field (Capability) */
        char options[3];
index 13b01a3487a3365a6a676392430a5ce0f1854e0c..95ba983e6bdabcc67e8c7604d747beec5f9d95a7 100644 (file)
@@ -64,8 +64,8 @@ struct ospf6_nexthop {
 /* Path */
 struct ospf6_ls_origin {
        uint16_t type;
-       uint32_t id;
-       uint32_t adv_router;
+       in_addr_t id;
+       in_addr_t adv_router;
 };
 
 struct ospf6_path {
@@ -82,7 +82,7 @@ struct ospf6_path {
        uint8_t prefix_options;
 
        /* Associated Area */
-       uint32_t area_id;
+       in_addr_t area_id;
 
        /* Path-type */
        uint8_t type;
index 18c069702523333f021b468cda2d1dca4141c42c..806b4da1cfbc80d0a4ca75521ad4c0291777037a 100644 (file)
@@ -26,7 +26,7 @@
 
 struct ospf6_master {
 
-       uint32_t zebra_router_id;
+       in_addr_t zebra_router_id;
 };
 
 /* ospf6->config_flags */
@@ -41,10 +41,10 @@ struct ospf6 {
        vrf_id_t vrf_id;
 
        /* my router id */
-       uint32_t router_id;
+       in_addr_t router_id;
 
        /* static router id */
-       uint32_t router_id_static;
+       in_addr_t router_id_static;
 
        struct in_addr router_id_zebra;