summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_evpn.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 21:13:34 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 21:13:34 +0200
commitd7c0a89a3a5697783a6dd89333ab660074790890 (patch)
treeeefa73e502f919b524b8a345437260d4acc23083 /bgpd/bgp_evpn.h
parenttools, doc: update checkpatch for u_int_* (diff)
downloadfrr-d7c0a89a3a5697783a6dd89333ab660074790890.tar.xz
frr-d7c0a89a3a5697783a6dd89333ab660074790890.zip
*: use C99 standard fixed-width integer types
The following types are nonstandard: - u_char - u_short - u_int - u_long - u_int8_t - u_int16_t - u_int32_t Replace them with the C99 standard types: - uint8_t - unsigned short - unsigned int - unsigned long - uint8_t - uint16_t - uint32_t Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn.h')
-rw-r--r--bgpd/bgp_evpn.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h
index 7c0d63832..343327a66 100644
--- a/bgpd/bgp_evpn.h
+++ b/bgpd/bgp_evpn.h
@@ -36,7 +36,7 @@ static inline int is_evpn_enabled(void)
static inline void vni2label(vni_t vni, mpls_label_t *label)
{
- u_char *tag = (u_char *)label;
+ uint8_t *tag = (uint8_t *)label;
tag[0] = (vni >> 16) & 0xFF;
tag[1] = (vni >> 8) & 0xFF;
@@ -45,12 +45,12 @@ static inline void vni2label(vni_t vni, mpls_label_t *label)
static inline vni_t label2vni(mpls_label_t *label)
{
- u_char *tag = (u_char *)label;
+ uint8_t *tag = (uint8_t *)label;
vni_t vni;
- vni = ((u_int32_t)*tag++ << 16);
- vni |= (u_int32_t)*tag++ << 8;
- vni |= (u_int32_t)(*tag & 0xFF);
+ vni = ((uint32_t)*tag++ << 16);
+ vni |= (uint32_t)*tag++ << 8;
+ vni |= (uint32_t)(*tag & 0xFF);
return vni;
}
@@ -86,14 +86,14 @@ extern void bgp_evpn_advertise_type5_routes(struct bgp *bgp_vrf, afi_t afi,
safi_t safi);
extern void bgp_evpn_vrf_delete(struct bgp *bgp_vrf);
extern void bgp_evpn_handle_router_id_update(struct bgp *bgp, int withdraw);
-extern char *bgp_evpn_label2str(mpls_label_t *label, u_int32_t num_labels,
+extern char *bgp_evpn_label2str(mpls_label_t *label, uint32_t num_labels,
char *buf, int len);
extern char *bgp_evpn_route2str(struct prefix_evpn *p, char *buf, int len);
extern void bgp_evpn_route2json(struct prefix_evpn *p, json_object *json);
extern void bgp_evpn_encode_prefix(struct stream *s, struct prefix *p,
struct prefix_rd *prd, mpls_label_t *label,
- u_int32_t num_labels, struct attr *attr,
- int addpath_encode, u_int32_t addpath_tx_id);
+ uint32_t num_labels, struct attr *attr,
+ int addpath_encode, uint32_t addpath_tx_id);
extern int bgp_nlri_parse_evpn(struct peer *peer, struct attr *attr,
struct bgp_nlri *packet, int withdraw);
extern int bgp_evpn_import_route(struct bgp *bgp, afi_t afi, safi_t safi,
@@ -105,7 +105,7 @@ extern int bgp_evpn_local_macip_del(struct bgp *bgp, vni_t vni,
struct ethaddr *mac, struct ipaddr *ip);
extern int bgp_evpn_local_macip_add(struct bgp *bgp, vni_t vni,
struct ethaddr *mac, struct ipaddr *ip,
- u_char flags);
+ uint8_t flags);
extern int bgp_evpn_local_l3vni_add(vni_t vni, vrf_id_t vrf_id,
struct ethaddr *rmac,
struct in_addr originator_ip, int filter);