diff options
Diffstat (limited to 'networking/udhcp/script.c')
-rw-r--r-- | networking/udhcp/script.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/networking/udhcp/script.c b/networking/udhcp/script.c index 24688b518..b7d78624c 100644 --- a/networking/udhcp/script.c +++ b/networking/udhcp/script.c | |||
@@ -55,7 +55,7 @@ static inline int upper_length(int length, int opt_index) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | ||
58 | static int sprintip(char *dest, char *pre, unsigned char *ip) | 58 | static int sprintip(char *dest, char *pre, uint8_t *ip) |
59 | { | 59 | { |
60 | return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]); | 60 | return sprintf(dest, "%s%d.%d.%d.%d", pre, ip[0], ip[1], ip[2], ip[3]); |
61 | } | 61 | } |
@@ -74,12 +74,12 @@ static int mton(struct in_addr *mask) | |||
74 | 74 | ||
75 | 75 | ||
76 | /* Fill dest with the text of option 'option'. */ | 76 | /* Fill dest with the text of option 'option'. */ |
77 | static void fill_options(char *dest, unsigned char *option, struct dhcp_option *type_p) | 77 | static void fill_options(char *dest, uint8_t *option, struct dhcp_option *type_p) |
78 | { | 78 | { |
79 | int type, optlen; | 79 | int type, optlen; |
80 | u_int16_t val_u16; | 80 | uint16_t val_u16; |
81 | int16_t val_s16; | 81 | int16_t val_s16; |
82 | u_int32_t val_u32; | 82 | uint32_t val_u32; |
83 | int32_t val_s32; | 83 | int32_t val_s32; |
84 | int len = option[OPT_LEN - 2]; | 84 | int len = option[OPT_LEN - 2]; |
85 | 85 | ||
@@ -138,7 +138,7 @@ static char **fill_envp(struct dhcpMessage *packet) | |||
138 | int num_options = 0; | 138 | int num_options = 0; |
139 | int i, j; | 139 | int i, j; |
140 | char **envp; | 140 | char **envp; |
141 | unsigned char *temp; | 141 | uint8_t *temp; |
142 | struct in_addr subnet; | 142 | struct in_addr subnet; |
143 | char over = 0; | 143 | char over = 0; |
144 | 144 | ||
@@ -168,7 +168,7 @@ static char **fill_envp(struct dhcpMessage *packet) | |||
168 | if (packet == NULL) return envp; | 168 | if (packet == NULL) return envp; |
169 | 169 | ||
170 | envp[j] = xmalloc(sizeof("ip=255.255.255.255")); | 170 | envp[j] = xmalloc(sizeof("ip=255.255.255.255")); |
171 | sprintip(envp[j++], "ip=", (unsigned char *) &packet->yiaddr); | 171 | sprintip(envp[j++], "ip=", (uint8_t *) &packet->yiaddr); |
172 | 172 | ||
173 | 173 | ||
174 | for (i = 0; dhcp_options[i].code; i++) { | 174 | for (i = 0; dhcp_options[i].code; i++) { |
@@ -186,7 +186,7 @@ static char **fill_envp(struct dhcpMessage *packet) | |||
186 | } | 186 | } |
187 | if (packet->siaddr) { | 187 | if (packet->siaddr) { |
188 | envp[j] = xmalloc(sizeof("siaddr=255.255.255.255")); | 188 | envp[j] = xmalloc(sizeof("siaddr=255.255.255.255")); |
189 | sprintip(envp[j++], "siaddr=", (unsigned char *) &packet->siaddr); | 189 | sprintip(envp[j++], "siaddr=", (uint8_t *) &packet->siaddr); |
190 | } | 190 | } |
191 | if (!(over & FILE_FIELD) && packet->file[0]) { | 191 | if (!(over & FILE_FIELD) && packet->file[0]) { |
192 | /* watch out for invalid packets */ | 192 | /* watch out for invalid packets */ |