Changeset 61bfc370 in mainline for uspace/srv
- 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
- Location:
- uspace/srv
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.c
r7c34b28f r61bfc370 550 550 if ((length < ETH_MIN_PACK_SIZE) || (length > ETH_MAX_PACK_SIZE_TAGGED)) { 551 551 printf("Packet with strange length arrived: %zu\n", length); 552 next = curr;552 next = curr; 553 553 } else if ((next < dep->de_startpage) || (next >= dep->de_stoppage)) { 554 554 printf("Strange next page\n"); 555 next = curr;555 next = curr; 556 556 } else if (header.dr_status & RSR_FO) { 557 557 /* -
uspace/srv/hw/netif/dp8390/dp8390_module.c
r7c34b28f r61bfc370 213 213 return rc; 214 214 215 address->value = ( char *) (&((dpeth_t *) device->specific)->de_address);215 address->value = (uint8_t *) &((dpeth_t *) device->specific)->de_address; 216 216 address->length = sizeof(ether_addr_t); 217 217 return EOK; -
uspace/srv/hw/netif/dp8390/dp8390_port.h
r7c34b28f r61bfc370 43 43 #include <libarch/ddi.h> 44 44 #include <sys/types.h> 45 46 /** Compares two memory blocks.47 * @param[in] first The first memory block.48 * @param[in] second The second memory block.49 * @param[in] size The blocks size in bytes.50 * @returns 0 if equeal.51 * @returns -1 if the first is greater than the second.52 * @returns 1 if the second is greater than the first.53 */54 #define memcmp(first, second, size) bcmp((char *) (first), (char *) (second), (size))55 45 56 46 /** Reads 1 byte. -
uspace/srv/hw/netif/dp8390/ne2000.c
r7c34b28f r61bfc370 241 241 buf[i] = inb_ne(dep, NE_DATA); 242 242 243 return ( memcmp(buf, pat, 4) == 0);243 return (bcmp(buf, pat, 4) == 0); 244 244 } 245 245 … … 280 280 *(uint16_t *)(buf + i) = inw_ne(dep, NE_DATA); 281 281 282 return ( memcmp(buf, pat, 4) == 0);282 return (bcmp(buf, pat, 4) == 0); 283 283 } 284 284 -
uspace/srv/net/il/arp/arp.c
r7c34b28f r61bfc370 215 215 (*proto)->service = service; 216 216 (*proto)->addr = address; 217 (*proto)->addr_data = (uint8_t *)address->value;217 (*proto)->addr_data = address->value; 218 218 219 219 rc = arp_addr_initialize(&(*proto)->addresses); … … 267 267 free(proto->addr_data); 268 268 proto->addr = address; 269 proto->addr_data = (uint8_t *)address->value;269 proto->addr_data = address->value; 270 270 } else { 271 271 rc = arp_proto_create(&proto, protocol, address); … … 482 482 des_hw = src_proto + header->protocol_length; 483 483 des_proto = des_hw + header->hardware_length; 484 trans = arp_addr_find(&proto->addresses, (char *)src_proto,484 trans = arp_addr_find(&proto->addresses, src_proto, 485 485 header->protocol_length); 486 486 /* Exists? */ … … 493 493 if (proto->addr->length != header->protocol_length) 494 494 return EINVAL; 495 if (!str_lcmp(proto->addr->value, (char *) des_proto,496 495 496 if (!bcmp(proto->addr->value, des_proto, proto->addr->length)) { 497 497 /* Not already updated? */ 498 498 if (!trans) { … … 502 502 trans->hw_addr = NULL; 503 503 fibril_condvar_initialize(&trans->cv); 504 rc = arp_addr_add(&proto->addresses, (char *)src_proto,504 rc = arp_addr_add(&proto->addresses, src_proto, 505 505 header->protocol_length, trans); 506 506 if (rc != EOK) { … … 510 510 } 511 511 if (!trans->hw_addr) { 512 trans->hw_addr = measured_string_create_bulk( 513 (char *) src_hw,header->hardware_length);512 trans->hw_addr = measured_string_create_bulk(src_hw, 513 header->hardware_length); 514 514 if (!trans->hw_addr) 515 515 return ENOMEM; 516 516 517 517 /* Notify the fibrils that wait for the translation. */ 518 518 fibril_condvar_broadcast(&trans->cv); … … 681 681 measured_string_t *address; 682 682 measured_string_t *translation; 683 char*data;683 uint8_t *data; 684 684 packet_t *packet; 685 685 packet_t *next; … … 748 748 749 749 case NET_IL_RECEIVED: 750 750 751 rc = packet_translate_remote(arp_globals.net_phone, &packet, 751 752 IPC_GET_PACKET(call)); -
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, -
uspace/srv/net/net/net.c
r7c34b28f r61bfc370 90 90 * 91 91 */ 92 int add_configuration(measured_strings_t *configuration, const char*name,93 const char*value)92 int add_configuration(measured_strings_t *configuration, const uint8_t *name, 93 const uint8_t *value) 94 94 { 95 95 int rc; … … 119 119 } 120 120 121 static int parse_line(measured_strings_t *configuration, char*line)121 static int parse_line(measured_strings_t *configuration, uint8_t *line) 122 122 { 123 123 int rc; 124 124 125 125 /* From the beginning */ 126 char*name = line;126 uint8_t *name = line; 127 127 128 128 /* Skip comments and blank lines */ … … 135 135 136 136 /* Remember the name start */ 137 char*value = name;137 uint8_t *value = name; 138 138 139 139 /* Skip the name */ … … 186 186 187 187 /* Construct the full filename */ 188 char line[BUFFER_SIZE];189 if (snprintf( line, BUFFER_SIZE, "%s/%s", directory, filename) > BUFFER_SIZE)188 char fname[BUFFER_SIZE]; 189 if (snprintf(fname, BUFFER_SIZE, "%s/%s", directory, filename) > BUFFER_SIZE) 190 190 return EOVERFLOW; 191 191 192 192 /* Open the file */ 193 FILE *cfg = fopen( line, "r");193 FILE *cfg = fopen(fname, "r"); 194 194 if (!cfg) 195 195 return ENOENT; … … 201 201 unsigned int line_number = 0; 202 202 size_t index = 0; 203 uint8_t line[BUFFER_SIZE]; 204 203 205 while (!ferror(cfg) && !feof(cfg)) { 204 206 int read = fgetc(cfg); … … 207 209 line[BUFFER_SIZE - 1] = '\0'; 208 210 fprintf(stderr, "%s: Configuration line %u too " 209 "long: %s\n", NAME, line_number, line);211 "long: %s\n", NAME, line_number, (char *) line); 210 212 211 213 /* No space left in the line buffer */ … … 213 215 } 214 216 /* Append the character */ 215 line[index] = ( char) read;217 line[index] = (uint8_t) read; 216 218 index++; 217 219 } else { … … 221 223 if (parse_line(configuration, line) != EOK) { 222 224 fprintf(stderr, "%s: Configuration error on " 223 "line %u: %s\n", NAME, line_number, line);225 "line %u: %s\n", NAME, line_number, (char *) line); 224 226 } 225 227 … … 282 284 return rc; 283 285 284 rc = add_module(NULL, &net_globals.modules, LO_NAME, LO_FILENAME,285 SERVICE_LO, 0, connect_to_service);286 if (rc != EOK) 287 return rc; 288 rc = add_module(NULL, &net_globals.modules, DP8390_NAME,289 DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service);290 if (rc != EOK) 291 return rc; 292 rc = add_module(NULL, &net_globals.modules, ETHERNET_NAME,293 ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service);294 if (rc != EOK) 295 return rc; 296 rc = add_module(NULL, &net_globals.modules, NILDUMMY_NAME,297 NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service);286 rc = add_module(NULL, &net_globals.modules, (uint8_t *) LO_NAME, 287 (uint8_t *) LO_FILENAME, SERVICE_LO, 0, connect_to_service); 288 if (rc != EOK) 289 return rc; 290 rc = add_module(NULL, &net_globals.modules, (uint8_t *) DP8390_NAME, 291 (uint8_t *) DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service); 292 if (rc != EOK) 293 return rc; 294 rc = add_module(NULL, &net_globals.modules, (uint8_t *) ETHERNET_NAME, 295 (uint8_t *) ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service); 296 if (rc != EOK) 297 return rc; 298 rc = add_module(NULL, &net_globals.modules, (uint8_t *) NILDUMMY_NAME, 299 (uint8_t *) NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service); 298 300 if (rc != EOK) 299 301 return rc; … … 364 366 */ 365 367 static int net_get_conf(measured_strings_t *netif_conf, 366 measured_string_t *configuration, size_t count, char**data)368 measured_string_t *configuration, size_t count, uint8_t **data) 367 369 { 368 370 if (data) … … 390 392 391 393 int net_get_conf_req(int net_phone, measured_string_t **configuration, 392 size_t count, char**data)394 size_t count, uint8_t **data) 393 395 { 394 396 if (!configuration || (count <= 0)) … … 399 401 400 402 int net_get_device_conf_req(int net_phone, device_id_t device_id, 401 measured_string_t **configuration, size_t count, char**data)403 measured_string_t **configuration, size_t count, uint8_t **data) 402 404 { 403 405 if ((!configuration) || (count == 0)) … … 411 413 } 412 414 413 void net_free_settings(measured_string_t *settings, char*data)415 void net_free_settings(measured_string_t *settings, uint8_t *data) 414 416 { 415 417 } … … 437 439 /* Mandatory netif */ 438 440 measured_string_t *setting = 439 measured_strings_find(&netif->configuration, CONF_NETIF, 0);441 measured_strings_find(&netif->configuration, (uint8_t *) CONF_NETIF, 0); 440 442 441 443 netif->driver = get_running_module(&net_globals.modules, setting->value); … … 447 449 448 450 /* Optional network interface layer */ 449 setting = measured_strings_find(&netif->configuration, CONF_NIL, 0);451 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_NIL, 0); 450 452 if (setting) { 451 453 netif->nil = get_running_module(&net_globals.modules, setting->value); … … 459 461 460 462 /* Mandatory internet layer */ 461 setting = measured_strings_find(&netif->configuration, CONF_IL, 0);463 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_IL, 0); 462 464 netif->il = get_running_module(&net_globals.modules, setting->value); 463 465 if (!netif->il) { … … 468 470 469 471 /* Hardware configuration */ 470 setting = measured_strings_find(&netif->configuration, CONF_IRQ, 0);471 int irq = setting ? strtol( setting->value, NULL, 10) : 0;472 473 setting = measured_strings_find(&netif->configuration, CONF_IO, 0);474 int io = setting ? strtol( setting->value, NULL, 16) : 0;472 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_IRQ, 0); 473 int irq = setting ? strtol((char *) setting->value, NULL, 10) : 0; 474 475 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_IO, 0); 476 int io = setting ? strtol((char *) setting->value, NULL, 16) : 0; 475 477 476 478 rc = netif_probe_req_remote(netif->driver->phone, netif->id, irq, io); … … 481 483 services_t internet_service; 482 484 if (netif->nil) { 483 setting = measured_strings_find(&netif->configuration, CONF_MTU, 0);485 setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_MTU, 0); 484 486 if (!setting) 485 487 setting = measured_strings_find(&net_globals.configuration, 486 CONF_MTU, 0);487 488 int mtu = setting ? strtol( setting->value, NULL, 10) : 0;488 (uint8_t *) CONF_MTU, 0); 489 490 int mtu = setting ? strtol((char *) setting->value, NULL, 10) : 0; 489 491 490 492 rc = nil_device_req(netif->nil->phone, netif->id, mtu, … … 558 560 /* Mandatory name */ 559 561 measured_string_t *setting = 560 measured_strings_find(&netif->configuration, CONF_NAME, 0);562 measured_strings_find(&netif->configuration, (uint8_t *) CONF_NAME, 0); 561 563 if (!setting) { 562 564 fprintf(stderr, "%s: Network interface name is missing\n", NAME); … … 602 604 printf("%s: Network interface started (name: %s, id: %d, driver: %s, " 603 605 "nil: %s, il: %s)\n", NAME, netif->name, netif->id, 604 netif->driver->name, netif->nil ?netif->nil->name : "[none]",606 netif->driver->name, netif->nil ? (char *) netif->nil->name : "[none]", 605 607 netif->il->name); 606 608 } … … 628 630 { 629 631 measured_string_t *strings; 630 char*data;632 uint8_t *data; 631 633 int rc; 632 634 -
uspace/srv/net/net/net.h
r7c34b28f r61bfc370 105 105 module_t *driver; 106 106 107 device_id_t id; 108 module_t *il; 109 char *name;/**< System-unique network interface name. */110 module_t *nil; 107 device_id_t id; /**< System-unique network interface identifier. */ 108 module_t *il; /**< Serving internet layer module index. */ 109 uint8_t *name; /**< System-unique network interface name. */ 110 module_t *nil; /**< Serving link layer module index. */ 111 111 } netif_t; 112 112 … … 133 133 } net_globals_t; 134 134 135 extern int add_configuration(measured_strings_t *, const char *, const char *); 135 extern int add_configuration(measured_strings_t *, const uint8_t *, 136 const uint8_t *); 136 137 extern int net_module_message(ipc_callid_t, ipc_call_t *, ipc_call_t *, int *); 137 138 extern int net_initialize_build(async_client_conn_t); -
uspace/srv/net/net/net_standalone.c
r7c34b28f r61bfc370 63 63 int rc; 64 64 65 task_id_t task_id = spawn("/srv/ip");65 task_id_t task_id = net_spawn((uint8_t *) "/srv/ip"); 66 66 if (!task_id) 67 67 return EINVAL; 68 68 69 rc = add_module(NULL, &net_globals.modules, IP_NAME,70 IP_FILENAME, SERVICE_IP, task_id, ip_connect_module);69 rc = add_module(NULL, &net_globals.modules, (uint8_t *) IP_NAME, 70 (uint8_t *) IP_FILENAME, SERVICE_IP, task_id, ip_connect_module); 71 71 if (rc != EOK) 72 72 return rc; 73 73 74 if (! spawn("/srv/icmp"))74 if (!net_spawn((uint8_t *) "/srv/icmp")) 75 75 return EINVAL; 76 76 77 if (! spawn("/srv/udp"))77 if (!net_spawn((uint8_t *) "/srv/udp")) 78 78 return EINVAL; 79 79 80 if (! spawn("/srv/tcp"))80 if (!net_spawn((uint8_t *) "/srv/tcp")) 81 81 return EINVAL; 82 82 -
uspace/srv/net/netif/lo/lo.c
r7c34b28f r61bfc370 53 53 54 54 /** Default hardware address. */ 55 #define DEFAULT_ADDR "\0\0\0\0\0\0"55 #define DEFAULT_ADDR 0 56 56 57 57 /** Default address length. */ 58 #define DEFAULT_ADDR_LEN (sizeof(DEFAULT_ADDR) / sizeof(char))58 #define DEFAULT_ADDR_LEN 6 59 59 60 60 /** Loopback module name. */ … … 62 62 63 63 /** Network interface global data. */ 64 netif_globals_t 64 netif_globals_t netif_globals; 65 65 66 66 int netif_specific_message(ipc_callid_t callid, ipc_call_t *call, … … 74 74 if (!address) 75 75 return EBADMEM; 76 77 address->value = str_dup(DEFAULT_ADDR); 76 77 uint8_t *addr = (uint8_t *) malloc(DEFAULT_ADDR_LEN); 78 memset(addr, DEFAULT_ADDR, DEFAULT_ADDR_LEN); 79 80 address->value = addr; 78 81 address->length = DEFAULT_ADDR_LEN; 79 82 80 83 return EOK; 81 84 } -
uspace/srv/net/nil/eth/eth.c
r7c34b28f r61bfc370 201 201 202 202 eth_globals.broadcast_addr = 203 measured_string_create_bulk( "\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR);203 measured_string_create_bulk((uint8_t *) "\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR); 204 204 if (!eth_globals.broadcast_addr) { 205 205 rc = ENOMEM; … … 284 284 measured_string_t names[2] = { 285 285 { 286 ( char*) "ETH_MODE",286 (uint8_t *) "ETH_MODE", 287 287 8 288 288 }, 289 289 { 290 ( char*) "ETH_DUMMY",290 (uint8_t *) "ETH_DUMMY", 291 291 9 292 292 } … … 294 294 measured_string_t *configuration; 295 295 size_t count = sizeof(names) / sizeof(measured_string_t); 296 char*data;296 uint8_t *data; 297 297 eth_proto_t *proto; 298 298 int rc; … … 358 358 359 359 if (configuration) { 360 if (!str_lcmp( configuration[0].value, "DIX",360 if (!str_lcmp((char *) configuration[0].value, "DIX", 361 361 configuration[0].length)) { 362 362 device->flags |= ETH_DIX; 363 } else if(!str_lcmp( configuration[0].value, "8023_2_LSAP",363 } else if(!str_lcmp((char *) configuration[0].value, "8023_2_LSAP", 364 364 configuration[0].length)) { 365 365 device->flags |= ETH_8023_2_LSAP; -
uspace/srv/net/tl/icmp/icmp.c
r7c34b28f r61bfc370 405 405 measured_string_t names[] = { 406 406 { 407 ( char*) "ICMP_ERROR_REPORTING",407 (uint8_t *) "ICMP_ERROR_REPORTING", 408 408 20 409 409 }, 410 410 { 411 ( char*) "ICMP_ECHO_REPLYING",411 (uint8_t *) "ICMP_ECHO_REPLYING", 412 412 18 413 413 } … … 415 415 measured_string_t *configuration; 416 416 size_t count = sizeof(names) / sizeof(measured_string_t); 417 char*data;417 uint8_t *data; 418 418 int rc; 419 419 -
uspace/srv/net/tl/tcp/tcp.c
r7c34b28f r61bfc370 154 154 155 155 /** Port map key. */ 156 char*key;156 uint8_t *key; 157 157 158 158 /** Port map key length. */ … … 358 358 /* Find the destination socket */ 359 359 socket = socket_port_find(&tcp_globals.sockets, 360 ntohs(header->destination_port), ( const char*) src, addrlen);360 ntohs(header->destination_port), (uint8_t *) src, addrlen); 361 361 if (!socket) { 362 362 /* Find the listening destination socket */ 363 363 socket = socket_port_find(&tcp_globals.sockets, 364 ntohs(header->destination_port), SOCKET_MAP_KEY_LISTENING,365 0);364 ntohs(header->destination_port), 365 (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0); 366 366 } 367 367 … … 998 998 /* Find the destination socket */ 999 999 listening_socket = socket_port_find(&tcp_globals.sockets, 1000 listening_port, SOCKET_MAP_KEY_LISTENING, 0);1000 listening_port, (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0); 1001 1001 if (!listening_socket || 1002 1002 (listening_socket->socket_id != listening_socket_id)) { … … 1022 1022 1023 1023 rc = socket_port_add(&tcp_globals.sockets, listening_port, socket, 1024 ( const char*) socket_data->addr, socket_data->addrlen);1024 (uint8_t *) socket_data->addr, socket_data->addrlen); 1025 1025 assert(socket == socket_port_find(&tcp_globals.sockets, listening_port, 1026 ( const char*) socket_data->addr, socket_data->addrlen));1026 (uint8_t *) socket_data->addr, socket_data->addrlen)); 1027 1027 1028 1028 // rc = socket_bind_free_port(&tcp_globals.sockets, socket, … … 2109 2109 2110 2110 /* Copy the key */ 2111 operation_timeout->key = (( char*) operation_timeout) +2111 operation_timeout->key = ((uint8_t *) operation_timeout) + 2112 2112 sizeof(*operation_timeout); 2113 2113 operation_timeout->key_length = socket->key_length; -
uspace/srv/net/tl/udp/udp.c
r7c34b28f r61bfc370 104 104 measured_string_t names[] = { 105 105 { 106 ( char*) "UDP_CHECKSUM_COMPUTING",106 (uint8_t *) "UDP_CHECKSUM_COMPUTING", 107 107 22 108 108 }, 109 109 { 110 ( char*) "UDP_AUTOBINDING",110 (uint8_t *) "UDP_AUTOBINDING", 111 111 15 112 112 } … … 114 114 measured_string_t *configuration; 115 115 size_t count = sizeof(names) / sizeof(measured_string_t); 116 char*data;116 uint8_t *data; 117 117 int rc; 118 118 … … 283 283 /* Find the destination socket */ 284 284 socket = socket_port_find(&udp_globals.sockets, 285 ntohs(header->destination_port),SOCKET_MAP_KEY_LISTENING, 0);285 ntohs(header->destination_port), (uint8_t *) SOCKET_MAP_KEY_LISTENING, 0); 286 286 if (!socket) { 287 287 if (tl_prepare_icmp_packet(udp_globals.net_phone,
Note:
See TracChangeset
for help on using the changeset viewer.