summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 8524292215..7c60749d7e 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -101,7 +101,7 @@ static void ospf6_interface_lsdb_hook_remove(struct ospf6_lsa *lsa)
ospf6_interface_lsdb_hook(lsa, ospf6_lsremove_to_spf_reason(lsa));
}
-static u_char ospf6_default_iftype(struct interface *ifp)
+static uint8_t ospf6_default_iftype(struct interface *ifp)
{
if (if_is_pointopoint(ifp))
return OSPF_IFTYPE_POINTOPOINT;
@@ -111,11 +111,11 @@ static u_char ospf6_default_iftype(struct interface *ifp)
return OSPF_IFTYPE_BROADCAST;
}
-static u_int32_t ospf6_interface_get_cost(struct ospf6_interface *oi)
+static uint32_t ospf6_interface_get_cost(struct ospf6_interface *oi)
{
/* If all else fails, use default OSPF cost */
- u_int32_t cost;
- u_int32_t bw, refbw;
+ uint32_t cost;
+ uint32_t bw, refbw;
/* interface speed and bw can be 0 in some platforms,
* use ospf default bw. If bw is configured then it would
@@ -134,7 +134,7 @@ static u_int32_t ospf6_interface_get_cost(struct ospf6_interface *oi)
if (CHECK_FLAG(oi->flag, OSPF6_INTERFACE_NOAUTOCOST))
cost = oi->cost;
else {
- cost = (u_int32_t)((double)refbw / (double)bw + (double)0.5);
+ cost = (uint32_t)((double)refbw / (double)bw + (double)0.5);
if (cost < 1)
cost = 1;
else if (cost > UINT32_MAX)
@@ -161,7 +161,7 @@ static void ospf6_interface_force_recalculate_cost(struct ospf6_interface *oi)
static void ospf6_interface_recalculate_cost(struct ospf6_interface *oi)
{
- u_int32_t newcost;
+ uint32_t newcost;
newcost = ospf6_interface_get_cost(oi);
if (newcost == oi->cost)
@@ -494,10 +494,10 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(oi->area);
}
-static void ospf6_interface_state_change(u_char next_state,
+static void ospf6_interface_state_change(uint8_t next_state,
struct ospf6_interface *oi)
{
- u_char prev_state;
+ uint8_t prev_state;
prev_state = oi->state;
oi->state = next_state;
@@ -610,12 +610,12 @@ static struct ospf6_neighbor *better_drouter(struct ospf6_neighbor *a,
return a;
}
-static u_char dr_election(struct ospf6_interface *oi)
+static uint8_t dr_election(struct ospf6_interface *oi)
{
struct listnode *node, *nnode;
struct ospf6_neighbor *on, *drouter, *bdrouter, myself;
struct ospf6_neighbor *best_drouter, *best_bdrouter;
- u_char next_state = 0;
+ uint8_t next_state = 0;
drouter = bdrouter = NULL;
best_drouter = best_bdrouter = NULL;
@@ -1346,7 +1346,7 @@ DEFUN (auto_cost_reference_bandwidth,
struct ospf6_area *oa;
struct ospf6_interface *oi;
struct listnode *i, *j;
- u_int32_t refbw;
+ uint32_t refbw;
refbw = strtol(argv[idx_number]->arg, NULL, 10);
if (refbw < 1 || refbw > 4294967) {