diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-23 12:19:50 +0100 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-23 12:19:50 +0100 |
commit | 93f0a26e1976c07434364dc630993f80c9629396 (patch) | |
tree | 8651f38ab611e52a691c758998a630d61d8eaf80 /ospfd/ospf_ri.c | |
parent | OSPFD: Update Segment Routing following reviews (diff) | |
download | frr-93f0a26e1976c07434364dc630993f80c9629396.tar.xz frr-93f0a26e1976c07434364dc630993f80c9629396.zip |
OSPFD: Set Segment Routing patch conform to C99
- Change all u_intXX_t typedef to standard type uintXX_t
- Correct removal of ZEBRA_OSPF_SR route in ospf_sr.c line 670
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_ri.c')
-rw-r--r-- | ospfd/ospf_ri.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 0a6917dce..db68ec9de 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -443,7 +443,7 @@ static void set_pce_cap_flag(u_int32_t cap, struct ospf_pce_info *pce) /* Segment Routing TLV setter */ /* Algorithm SubTLV - section 3.1 */ -static void set_sr_algorithm(u_int8_t algo) +static void set_sr_algorithm(uint8_t algo) { OspfRI.sr_info.algo.value[0] = algo; @@ -452,13 +452,13 @@ static void set_sr_algorithm(u_int8_t algo) /* Set TLV type and length == only 1 Algorithm */ TLV_TYPE(OspfRI.sr_info.algo) = htons(RI_SR_TLV_SR_ALGORITHM); - TLV_LEN(OspfRI.sr_info.algo) = htons(sizeof(u_int8_t)); + TLV_LEN(OspfRI.sr_info.algo) = htons(sizeof(uint8_t)); return; } /* unset Aglogithm SubTLV */ -static void unset_sr_algorithm(u_int8_t algo) +static void unset_sr_algorithm(uint8_t algo) { for (int i = 0; i < ALGORITHM_COUNT; i++) @@ -477,7 +477,7 @@ static void set_sr_sid_label_range(struct sr_srgb srgb) /* Set Header */ TLV_TYPE(OspfRI.sr_info.range) = htons(RI_SR_TLV_SID_LABEL_RANGE); TLV_LEN(OspfRI.sr_info.range) = - htons(SUBTLV_SID_LABEL_SIZE + sizeof(u_int32_t)); + htons(SUBTLV_SID_LABEL_SIZE + sizeof(uint32_t)); /* Set Range Size */ OspfRI.sr_info.range.size = htonl(SET_RANGE_SIZE(srgb.range_size)); /* Set Lower bound label SubTLV */ @@ -501,10 +501,10 @@ static void unset_sr_sid_label_range() } /* Set Maximum Stack Depth for this router */ -static void set_sr_node_msd(u_int8_t msd) +static void set_sr_node_msd(uint8_t msd) { TLV_TYPE(OspfRI.sr_info.msd) = htons(RI_SR_TLV_NODE_MSD); - TLV_LEN(OspfRI.sr_info.msd) = htons(sizeof(u_int32_t)); + TLV_LEN(OspfRI.sr_info.msd) = htons(sizeof(uint32_t)); OspfRI.sr_info.msd.value = msd; return; @@ -604,7 +604,7 @@ static int is_mandated_params_set(struct ospf_router_info ori) * * @return none */ -void ospf_router_info_update_sr(bool enable, struct sr_srgb srgb, u_int8_t msd) +void ospf_router_info_update_sr(bool enable, struct sr_srgb srgb, uint8_t msd) { /* First activate and initialize Router Information is necessary */ @@ -1234,7 +1234,7 @@ static u_int16_t show_vty_pce_info(struct vty *vty, struct tlv_header *ri, } /* Display Segment Routing Algorithm TLV information */ -static u_int16_t show_vty_sr_algorithm(struct vty *vty, struct tlv_header *tlvh) +static uint16_t show_vty_sr_algorithm(struct vty *vty, struct tlv_header *tlvh) { struct ri_sr_tlv_sr_algorithm *algo = (struct ri_sr_tlv_sr_algorithm *)tlvh; @@ -1281,7 +1281,7 @@ static u_int16_t show_vty_sr_algorithm(struct vty *vty, struct tlv_header *tlvh) } /* Display Segment Routing SID/Label Range TLV information */ -static u_int16_t show_vty_sr_range(struct vty *vty, struct tlv_header *tlvh) +static uint16_t show_vty_sr_range(struct vty *vty, struct tlv_header *tlvh) { struct ri_sr_tlv_sid_label_range *range = (struct ri_sr_tlv_sid_label_range *)tlvh; @@ -1306,7 +1306,7 @@ static u_int16_t show_vty_sr_range(struct vty *vty, struct tlv_header *tlvh) } /* Display Segment Routing Maximum Stack Depth TLV information */ -static u_int16_t show_vty_sr_msd(struct vty *vty, struct tlv_header *tlvh) +static uint16_t show_vty_sr_msd(struct vty *vty, struct tlv_header *tlvh) { struct ri_sr_tlv_node_msd *msd = (struct ri_sr_tlv_node_msd *)tlvh; |