Changeset 1ffa73b in mainline for uspace/srv/net/tl
- Timestamp:
- 2011-01-10T16:33:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b207803
- Parents:
- 863d45e (diff), 6610565b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/srv/net/tl
- Files:
-
- 9 edited
-
icmp/icmp.c (modified) (8 diffs)
-
icmp/icmp_module.c (modified) (1 diff)
-
icmp/icmp_module.h (modified) (1 diff)
-
tcp/tcp.c (modified) (10 diffs)
-
tcp/tcp_module.c (modified) (1 diff)
-
tcp/tcp_module.h (modified) (1 diff)
-
udp/udp.c (modified) (8 diffs)
-
udp/udp_module.c (modified) (1 diff)
-
udp/udp_module.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
r863d45e r1ffa73b 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 … … 696 696 case NET_ICMP_DEST_UNREACH: 697 697 rc = packet_translate_remote(icmp_globals.net_phone, &packet, 698 IPC_GET_PACKET( call));698 IPC_GET_PACKET(*call)); 699 699 if (rc != EOK) 700 700 return rc; 701 701 return icmp_destination_unreachable_msg_local(0, 702 ICMP_GET_CODE( call), ICMP_GET_MTU(call), packet);702 ICMP_GET_CODE(*call), ICMP_GET_MTU(*call), packet); 703 703 case NET_ICMP_SOURCE_QUENCH: 704 704 rc = packet_translate_remote(icmp_globals.net_phone, &packet, 705 IPC_GET_PACKET( call));705 IPC_GET_PACKET(*call)); 706 706 if (rc != EOK) 707 707 return rc; … … 709 709 case NET_ICMP_TIME_EXCEEDED: 710 710 rc = packet_translate_remote(icmp_globals.net_phone, &packet, 711 IPC_GET_PACKET( call));711 IPC_GET_PACKET(*call)); 712 712 if (rc != EOK) 713 713 return rc; 714 return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE( call),714 return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(*call), 715 715 packet); 716 716 case NET_ICMP_PARAMETERPROB: 717 717 rc = packet_translate_remote(icmp_globals.net_phone, &packet, 718 IPC_GET_PACKET( call));718 IPC_GET_PACKET(*call)); 719 719 if (rc != EOK) 720 720 return rc; 721 return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE( call),722 ICMP_GET_POINTER( call), packet);721 return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(*call), 722 ICMP_GET_POINTER(*call), packet); 723 723 default: 724 724 return ENOTSUP; … … 787 787 bool keep_on_going = true; 788 788 ipc_call_t answer; 789 int answer_count;789 size_t answer_count; 790 790 size_t length; 791 791 struct sockaddr *addr; … … 894 894 */ 895 895 int icmp_message_standalone(ipc_callid_t callid, ipc_call_t *call, 896 ipc_call_t *answer, int *answer_count)896 ipc_call_t *answer, size_t *answer_count) 897 897 { 898 898 packet_t *packet; … … 903 903 case NET_TL_RECEIVED: 904 904 rc = packet_translate_remote(icmp_globals.net_phone, &packet, 905 IPC_GET_PACKET( call));905 IPC_GET_PACKET(*call)); 906 906 if (rc != EOK) 907 907 return rc; 908 return icmp_received_msg_local(IPC_GET_DEVICE( call), packet,909 SERVICE_ICMP, IPC_GET_ERROR( call));908 return icmp_received_msg_local(IPC_GET_DEVICE(*call), packet, 909 SERVICE_ICMP, IPC_GET_ERROR(*call)); 910 910 911 911 case NET_ICMP_INIT: 912 return icmp_process_client_messages(callid, * call);912 return icmp_process_client_messages(callid, *call); 913 913 914 914 default: … … 936 936 while (true) { 937 937 ipc_call_t answer; 938 int answer_count;938 size_t answer_count; 939 939 940 940 /* Clear the answer structure */ -
uspace/srv/net/tl/icmp/icmp_module.c
r863d45e r1ffa73b 86 86 87 87 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call, 88 ipc_call_t *answer, int *answer_count)88 ipc_call_t *answer, size_t *count) 89 89 { 90 return icmp_message_standalone(callid, call, answer, answer_count);90 return icmp_message_standalone(callid, call, answer, count); 91 91 } 92 92 -
uspace/srv/net/tl/icmp/icmp_module.h
r863d45e r1ffa73b 44 44 extern int icmp_initialize(async_client_conn_t); 45 45 extern int icmp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *, 46 int *);46 size_t *); 47 47 48 48 #endif -
uspace/srv/net/tl/tcp/tcp.c
r863d45e r1ffa73b 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, … … 1262 1262 int 1263 1263 tcp_message_standalone(ipc_callid_t callid, ipc_call_t *call, 1264 ipc_call_t *answer, int *answer_count)1264 ipc_call_t *answer, size_t *answer_count) 1265 1265 { 1266 1266 packet_t *packet; … … 1276 1276 // fibril_rwlock_read_lock(&tcp_globals.lock); 1277 1277 rc = packet_translate_remote(tcp_globals.net_phone, &packet, 1278 IPC_GET_PACKET( call));1278 IPC_GET_PACKET(*call)); 1279 1279 if (rc != EOK) { 1280 1280 // fibril_rwlock_read_unlock(&tcp_globals.lock); 1281 1281 return rc; 1282 1282 } 1283 rc = tcp_received_msg(IPC_GET_DEVICE( call), packet, SERVICE_TCP,1284 IPC_GET_ERROR( call));1283 rc = tcp_received_msg(IPC_GET_DEVICE(*call), packet, SERVICE_TCP, 1284 IPC_GET_ERROR(*call)); 1285 1285 // fibril_rwlock_read_unlock(&tcp_globals.lock); 1286 1286 return rc; … … 1323 1323 bool keep_on_going = true; 1324 1324 socket_cores_t local_sockets; 1325 int app_phone = IPC_GET_PHONE( &call);1325 int app_phone = IPC_GET_PHONE(call); 1326 1326 struct sockaddr *addr; 1327 1327 int socket_id; … … 1330 1330 fibril_rwlock_t lock; 1331 1331 ipc_call_t answer; 1332 int answer_count;1332 size_t answer_count; 1333 1333 tcp_socket_data_t *socket_data; 1334 1334 socket_core_t *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; … … 2502 2502 while (true) { 2503 2503 ipc_call_t answer; 2504 int answer_count;2504 size_t answer_count; 2505 2505 2506 2506 /* Clear the answer structure */ -
uspace/srv/net/tl/tcp/tcp_module.c
r863d45e r1ffa73b 87 87 88 88 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call, 89 ipc_call_t *answer, int *answer_count)89 ipc_call_t *answer, size_t *count) 90 90 { 91 return tcp_message_standalone(callid, call, answer, answer_count);91 return tcp_message_standalone(callid, call, answer, count); 92 92 } 93 93 -
uspace/srv/net/tl/tcp/tcp_module.h
r863d45e r1ffa73b 44 44 extern int tcp_initialize(async_client_conn_t); 45 45 extern int tcp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *, 46 int *);46 size_t *); 47 47 48 48 #endif -
uspace/srv/net/tl/udp/udp.c
r863d45e r1ffa73b 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, … … 707 707 bool keep_on_going = true; 708 708 socket_cores_t local_sockets; 709 int app_phone = IPC_GET_PHONE( &call);709 int app_phone = IPC_GET_PHONE(call); 710 710 struct sockaddr *addr; 711 711 int socket_id; … … 713 713 size_t size = 0; 714 714 ipc_call_t answer; 715 int answer_count;715 size_t answer_count; 716 716 packet_dimension_t *packet_dimension; 717 717 … … 861 861 */ 862 862 int udp_message_standalone(ipc_callid_t callid, ipc_call_t *call, 863 ipc_call_t *answer, int *answer_count)863 ipc_call_t *answer, size_t *answer_count) 864 864 { 865 865 packet_t *packet; … … 871 871 case NET_TL_RECEIVED: 872 872 rc = packet_translate_remote(udp_globals.net_phone, &packet, 873 IPC_GET_PACKET( call));873 IPC_GET_PACKET(*call)); 874 874 if (rc != EOK) 875 875 return rc; 876 return udp_received_msg(IPC_GET_DEVICE( call), packet,877 SERVICE_UDP, IPC_GET_ERROR( call));876 return udp_received_msg(IPC_GET_DEVICE(*call), packet, 877 SERVICE_UDP, IPC_GET_ERROR(*call)); 878 878 case IPC_M_CONNECT_TO_ME: 879 return udp_process_client_messages(callid, * call);879 return udp_process_client_messages(callid, *call); 880 880 } 881 881 … … 898 898 while (true) { 899 899 ipc_call_t answer; 900 int answer_count;900 size_t answer_count; 901 901 902 902 /* Clear the answer structure */ -
uspace/srv/net/tl/udp/udp_module.c
r863d45e r1ffa73b 87 87 88 88 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call, 89 ipc_call_t *answer, int *answer_count)89 ipc_call_t *answer, size_t *count) 90 90 { 91 return udp_message_standalone(callid, call, answer, answer_count);91 return udp_message_standalone(callid, call, answer, count); 92 92 } 93 93 -
uspace/srv/net/tl/udp/udp_module.h
r863d45e r1ffa73b 44 44 extern int udp_initialize(async_client_conn_t); 45 45 extern int udp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *, 46 int *);46 size_t *); 47 47 48 48 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
