summaryrefslogtreecommitdiff
path: root/zebra/irdp_packet.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 15:13:34 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-27 15:13:34 -0400
commitd7c0a89a3a5697783a6dd89333ab660074790890 (patch)
treeeefa73e502f919b524b8a345437260d4acc23083 /zebra/irdp_packet.c
parent28ac5a038101c66e4275a9b1ef6fb37b4f74fb6a (diff)
*: 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 'zebra/irdp_packet.c')
-rw-r--r--zebra/irdp_packet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index 11bc9b0440..b0dde96cce 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -175,7 +175,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
}
}
-static int irdp_recvmsg(int sock, u_char *buf, int size, int *ifindex)
+static int irdp_recvmsg(int sock, uint8_t *buf, int size, int *ifindex)
{
struct msghdr msg;
struct iovec iov;
@@ -226,7 +226,7 @@ int irdp_read_raw(struct thread *r)
thread_add_read(zebrad.master, irdp_read_raw, NULL, irdp_sock,
&t_irdp_raw);
- ret = irdp_recvmsg(irdp_sock, (u_char *)buf, IRDP_RX_BUF, &ifindex);
+ ret = irdp_recvmsg(irdp_sock, (uint8_t *)buf, IRDP_RX_BUF, &ifindex);
if (ret < 0)
zlog_warn("IRDP: RX Error length = %d", ret);
@@ -263,8 +263,8 @@ int irdp_read_raw(struct thread *r)
return ret;
}
-void send_packet(struct interface *ifp, struct stream *s, u_int32_t dst,
- struct prefix *p, u_int32_t ttl)
+void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
+ struct prefix *p, uint32_t ttl)
{
static struct sockaddr_in sockdst = {AF_INET};
struct ip *ip;
@@ -275,8 +275,8 @@ void send_packet(struct interface *ifp, struct stream *s, u_int32_t dst,
char msgbuf[256];
char buf[256];
struct in_pktinfo *pktinfo;
- u_long src;
- u_char on;
+ unsigned long src;
+ uint8_t on;
if (!(ifp->flags & IFF_UP))
return;