Mercurial > hg > dhcpcd
changeset 272:fc66fea57edc draft
Default all int entries in the dhcp header to unsigned.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 09 Jan 2008 10:12:59 +0000 |
| parents | 5c372b376105 |
| children | 56f6b2b029de |
| files | client.c dhcp.c dhcp.h |
| diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/client.c Wed Jan 09 10:02:28 2008 +0000 +++ b/client.c Wed Jan 09 10:12:59 2008 +0000 @@ -247,7 +247,7 @@ int mode = SOCKET_CLOSED; int state = STATE_INIT; struct timeval tv; - int xid = 0; + uint32_t xid = 0; long timeout = 0; fd_set rset; int maxfd;
--- a/dhcp.c Wed Jan 09 10:02:28 2008 +0000 +++ b/dhcp.c Wed Jan 09 10:12:59 2008 +0000 @@ -124,7 +124,7 @@ case ARPHRD_IEEE1394: case ARPHRD_INFINIBAND: if (message->ciaddr == 0) - message->flags = (int16_t) htons (BROADCAST_FLAG); + message->flags = htons (BROADCAST_FLAG); message->hwlen = 0; break; default:
--- a/dhcp.h Wed Jan 09 10:02:28 2008 +0000 +++ b/dhcp.h Wed Jan 09 10:12:59 2008 +0000 @@ -189,13 +189,13 @@ unsigned char hwtype; /* hardware address type */ unsigned char hwlen; /* hardware address length */ unsigned char hwopcount; /* should be zero in client message */ - int32_t xid; /* transaction id */ - int16_t secs; /* elapsed time in sec. from boot */ - int16_t flags; - int32_t ciaddr; /* (previously allocated) client IP */ - int32_t yiaddr; /* 'your' client IP address */ - int32_t siaddr; /* should be zero in client's messages */ - int32_t giaddr; /* should be zero in client's messages */ + uint32_t xid; /* transaction id */ + uint16_t secs; /* elapsed time in sec. from boot */ + uint16_t flags; + uint32_t ciaddr; /* (previously allocated) client IP */ + uint32_t yiaddr; /* 'your' client IP address */ + uint32_t siaddr; /* should be zero in client's messages */ + uint32_t giaddr; /* should be zero in client's messages */ unsigned char chaddr[DHCP_CHADDR_LEN]; /* client's hardware address */ unsigned char servername[SERVERNAME_LEN]; /* server host name */ unsigned char bootfile[BOOTFILE_LEN]; /* boot file name */
