summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-03-27 13:39:01 +0100
committerDavid Lamparter <equinox@diac24.net>2020-07-14 11:16:01 +0200
commit858f9c0822bfd1dd9ca105c2f8d4462c3a95f227 (patch)
treef5879a4755868dbca07ba33f6336fd8a5dcd5391
parentbd0ab4d80aa026d065b93bc066a5b2e88a14970a (diff)
ospf6d: use in_addr_t for area/router IDs
Signed-off-by: David Lamparter <equinox@diac24.net>
-rw-r--r--ospf6d/ospf6_area.h2
-rw-r--r--ospf6d/ospf6_interface.h8
-rw-r--r--ospf6d/ospf6_intra.h10
-rw-r--r--ospf6d/ospf6_lsa.h4
-rw-r--r--ospf6d/ospf6_message.h12
-rw-r--r--ospf6d/ospf6_neighbor.h10
-rw-r--r--ospf6d/ospf6_route.h6
-rw-r--r--ospf6d/ospf6_top.h6
8 files changed, 29 insertions, 29 deletions
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h
index 5648b1dfec..c77b6d89a9 100644
--- a/ospf6d/ospf6_area.h
+++ b/ospf6d/ospf6_area.h
@@ -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
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h
index 05ba698a1b..6cbfe04c44 100644
--- a/ospf6d/ospf6_interface.h
+++ b/ospf6d/ospf6_interface.h
@@ -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;
diff --git a/ospf6d/ospf6_intra.h b/ospf6d/ospf6_intra.h
index 672e288bf3..9c29681dee 100644
--- a/ospf6d/ospf6_intra.h
+++ b/ospf6d/ospf6_intra.h
@@ -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) */
};
diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h
index 5519dd1b80..a85d7b0603 100644
--- a/ospf6d/ospf6_lsa.h
+++ b/ospf6d/ospf6_lsa.h
@@ -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 */
diff --git a/ospf6d/ospf6_message.h b/ospf6d/ospf6_message.h
index d24b7f8942..7ec8cb785f 100644
--- a/ospf6d/ospf6_message.h
+++ b/ospf6d/ospf6_message.h
@@ -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 */
diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h
index e221e9d82c..1a45a1966a 100644
--- a/ospf6d/ospf6_neighbor.h
+++ b/ospf6d/ospf6_neighbor.h
@@ -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];
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h
index 13b01a3487..95ba983e6b 100644
--- a/ospf6d/ospf6_route.h
+++ b/ospf6d/ospf6_route.h
@@ -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;
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index 18c0697025..806b4da1cf 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -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;