Changeset 61bfc370 in mainline for uspace/srv/net/il/ip/ip.c
- Timestamp:
- 2011-01-07T18:57:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e08a733
- Parents:
- 7c34b28f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.c
r7c34b28f r61bfc370 275 275 if (rc != EOK) 276 276 goto out; 277 rc = add_module(NULL, &ip_globals.modules, ARP_NAME, ARP_FILENAME,278 SERVICE_ARP, 0, arp_connect_module);277 rc = add_module(NULL, &ip_globals.modules, (uint8_t *) ARP_NAME, 278 (uint8_t *) ARP_FILENAME, SERVICE_ARP, 0, arp_connect_module); 279 279 280 280 out: … … 312 312 measured_string_t names[] = { 313 313 { 314 ( char*) "IPV",314 (uint8_t *) "IPV", 315 315 3 316 316 }, 317 317 { 318 ( char*) "IP_CONFIG",318 (uint8_t *) "IP_CONFIG", 319 319 9 320 320 }, 321 321 { 322 ( char*) "IP_ADDR",322 (uint8_t *) "IP_ADDR", 323 323 7 324 324 }, 325 325 { 326 ( char*) "IP_NETMASK",326 (uint8_t *) "IP_NETMASK", 327 327 10 328 328 }, 329 329 { 330 ( char*) "IP_GATEWAY",330 (uint8_t *) "IP_GATEWAY", 331 331 10 332 332 }, 333 333 { 334 ( char*) "IP_BROADCAST",334 (uint8_t *) "IP_BROADCAST", 335 335 12 336 336 }, 337 337 { 338 ( char*) "ARP",338 (uint8_t *) "ARP", 339 339 3 340 340 }, 341 341 { 342 ( char*) "IP_ROUTING",342 (uint8_t *) "IP_ROUTING", 343 343 10 344 344 } … … 346 346 measured_string_t *configuration; 347 347 size_t count = sizeof(names) / sizeof(measured_string_t); 348 char*data;348 uint8_t *data; 349 349 measured_string_t address; 350 350 ip_route_t *route; … … 368 368 if (configuration) { 369 369 if (configuration[0].value) 370 ip_netif->ipv = strtol( configuration[0].value, NULL, 0);371 372 ip_netif->dhcp = !str_lcmp( configuration[1].value, "dhcp",370 ip_netif->ipv = strtol((char *) configuration[0].value, NULL, 0); 371 372 ip_netif->dhcp = !str_lcmp((char *) configuration[1].value, "dhcp", 373 373 configuration[1].length); 374 374 … … 394 394 } 395 395 396 if ((inet_pton(AF_INET, configuration[2].value,396 if ((inet_pton(AF_INET, (char *) configuration[2].value, 397 397 (uint8_t *) &route->address.s_addr) != EOK) || 398 (inet_pton(AF_INET, configuration[3].value,398 (inet_pton(AF_INET, (char *) configuration[3].value, 399 399 (uint8_t *) &route->netmask.s_addr) != EOK) || 400 (inet_pton(AF_INET, configuration[4].value,400 (inet_pton(AF_INET, (char *) configuration[4].value, 401 401 (uint8_t *) &gateway.s_addr) == EINVAL) || 402 (inet_pton(AF_INET, configuration[5].value,402 (inet_pton(AF_INET, (char *) configuration[5].value, 403 403 (uint8_t *) &ip_netif->broadcast.s_addr) == EINVAL)) 404 404 { … … 441 441 if (ip_netif->arp) { 442 442 if (route) { 443 address.value = ( char*) &route->address.s_addr;443 address.value = (uint8_t *) &route->address.s_addr; 444 444 address.length = sizeof(in_addr_t); 445 445 … … 997 997 measured_string_t destination; 998 998 measured_string_t *translation; 999 char*data;999 uint8_t *data; 1000 1000 int phone; 1001 1001 int rc; … … 1004 1004 if (netif->arp && (route->address.s_addr != dest.s_addr)) { 1005 1005 destination.value = route->gateway.s_addr ? 1006 ( char *) &route->gateway.s_addr : (char*) &dest.s_addr;1006 (uint8_t *) &route->gateway.s_addr : (uint8_t *) &dest.s_addr; 1007 1007 destination.length = sizeof(dest.s_addr); 1008 1008 … … 1756 1756 (header->destination_address & route->netmask.s_addr))) { 1757 1757 // clear the ARP mapping if any 1758 address.value = ( char*) &header->destination_address;1758 address.value = (uint8_t *) &header->destination_address; 1759 1759 address.length = sizeof(header->destination_address); 1760 1760 arp_clear_address_req(netif->arp->phone,
Note:
See TracChangeset
for help on using the changeset viewer.