Use standard C99 types

This commit is contained in:
Eric Andersen
2004-01-30 23:45:53 +00:00
parent 1a834be1ce
commit ad95373efc
19 changed files with 117 additions and 117 deletions

View File

@@ -78,7 +78,7 @@ static void init_packet(struct dhcpMessage *packet, char type)
memcpy(packet->chaddr, client_config.arp, 6);
add_option_string(packet->options, client_config.clientid);
if (client_config.hostname) add_option_string(packet->options, client_config.hostname);
add_option_string(packet->options, (unsigned char *) &vendor_id);
add_option_string(packet->options, (uint8_t *) &vendor_id);
}
@@ -179,8 +179,8 @@ int get_raw_packet(struct dhcpMessage *payload, int fd)
{
int bytes;
struct udp_dhcp_packet packet;
u_int32_t source, dest;
u_int16_t check;
uint32_t source, dest;
uint16_t check;
memset(&packet, 0, sizeof(struct udp_dhcp_packet));
bytes = read(fd, &packet, sizeof(struct udp_dhcp_packet));
@@ -207,7 +207,7 @@ int get_raw_packet(struct dhcpMessage *payload, int fd)
if (packet.ip.protocol != IPPROTO_UDP || packet.ip.version != IPVERSION ||
packet.ip.ihl != sizeof(packet.ip) >> 2 || packet.udp.dest != htons(CLIENT_PORT) ||
bytes > (int) sizeof(struct udp_dhcp_packet) ||
ntohs(packet.udp.len) != (short) (bytes - sizeof(packet.ip))) {
ntohs(packet.udp.len) != (uint16_t) (bytes - sizeof(packet.ip))) {
DEBUG(LOG_INFO, "unrelated/bogus packet");
return -2;
}