summaryrefslogtreecommitdiff
path: root/isisd/isis_bpf.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 /isisd/isis_bpf.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 'isisd/isis_bpf.c')
-rw-r--r--isisd/isis_bpf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/isisd/isis_bpf.c b/isisd/isis_bpf.c
index 872bc5bc72..2cc2fefd9a 100644
--- a/isisd/isis_bpf.c
+++ b/isisd/isis_bpf.c
@@ -54,20 +54,20 @@ struct bpf_insn llcfilter[] = {
3), /* check second byte */
BPF_STMT(BPF_LD + BPF_B + BPF_ABS, ETHER_HDR_LEN + 2),
BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x03, 0, 1), /* check third byte */
- BPF_STMT(BPF_RET + BPF_K, (u_int)-1),
+ BPF_STMT(BPF_RET + BPF_K, (unsigned int)-1),
BPF_STMT(BPF_RET + BPF_K, 0)};
-u_int readblen = 0;
-u_char *readbuff = NULL;
+unsigned int readblen = 0;
+uint8_t *readbuff = NULL;
/*
* Table 9 - Architectural constants for use with ISO 8802 subnetworks
* ISO 10589 - 8.4.8
*/
-u_char ALL_L1_ISS[6] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x14};
-u_char ALL_L2_ISS[6] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x15};
-u_char ALL_ISS[6] = {0x09, 0x00, 0x2B, 0x00, 0x00, 0x05};
-u_char ALL_ESS[6] = {0x09, 0x00, 0x2B, 0x00, 0x00, 0x04};
+uint8_t ALL_L1_ISS[6] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x14};
+uint8_t ALL_L2_ISS[6] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x15};
+uint8_t ALL_ISS[6] = {0x09, 0x00, 0x2B, 0x00, 0x00, 0x05};
+uint8_t ALL_ESS[6] = {0x09, 0x00, 0x2B, 0x00, 0x00, 0x04};
static char sock_buff[8192];
@@ -76,9 +76,9 @@ static int open_bpf_dev(struct isis_circuit *circuit)
int i = 0, fd;
char bpfdev[128];
struct ifreq ifr;
- u_int blen, immediate;
+ unsigned int blen, immediate;
#ifdef BIOCSSEESENT
- u_int seesent;
+ unsigned int seesent;
#endif
struct timeval timeout;
struct bpf_program bpf_prog;
@@ -214,10 +214,10 @@ end:
return retval;
}
-int isis_recv_pdu_bcast(struct isis_circuit *circuit, u_char *ssnpa)
+int isis_recv_pdu_bcast(struct isis_circuit *circuit, uint8_t *ssnpa)
{
int bytesread = 0, bytestoread, offset, one = 1, err = ISIS_OK;
- u_char *buff_ptr;
+ uint8_t *buff_ptr;
struct bpf_hdr *bpf_hdr;
assert(circuit->fd > 0);