Changes in uspace/srv/net/tl/tcp/tcp.c [014dd57b:28a3e74] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/tcp.c
r014dd57b r28a3e74 44 44 #include <errno.h> 45 45 46 #include <ipc/ipc.h>47 46 #include <ipc/services.h> 48 47 #include <ipc/net.h> … … 64 63 #include <ip_interface.h> 65 64 #include <icmp_client.h> 66 #include <icmp_ interface.h>65 #include <icmp_remote.h> 67 66 #include <net_interface.h> 68 67 #include <socket_core.h> … … 300 299 return tcp_release_and_return(packet, NO_DATA); 301 300 302 // printf("header len %d, port %d \n", TCP_HEADER_LENGTH(header), 303 // ntohs(header->destination_port)); 304 301 #if 0 302 printf("header len %d, port %d \n", TCP_HEADER_LENGTH(header), 303 ntohs(header->destination_port)); 304 #endif 305 305 result = packet_get_addr(packet, (uint8_t **) &src, (uint8_t **) &dest); 306 306 if (result <= 0) … … 1063 1063 tcp_process_acknowledgement(socket, socket_data, header); 1064 1064 1065 socket_data->next_incoming = ntohl(header->sequence_number); // + 1;1065 socket_data->next_incoming = ntohl(header->sequence_number); /* + 1; */ 1066 1066 pq_release_remote(tcp_globals.net_phone, packet_get_id(packet)); 1067 1067 socket_data->state = TCP_SOCKET_ESTABLISHED; … … 1204 1204 } 1205 1205 1206 /** Per-connection initialization 1207 * 1208 */ 1209 void tl_connection(void) 1210 { 1211 } 1212 1206 1213 /** Processes the TCP message. 1207 1214 * … … 1217 1224 * @see IS_NET_TCP_MESSAGE() 1218 1225 */ 1219 int tl_m odule_message(ipc_callid_t callid, ipc_call_t *call,1226 int tl_message(ipc_callid_t callid, ipc_call_t *call, 1220 1227 ipc_call_t *answer, size_t *answer_count) 1221 1228 { … … 1499 1506 1500 1507 /* Release the application phone */ 1501 ipc_hangup(app_phone);1508 async_hangup(app_phone); 1502 1509 1503 1510 printf("release\n"); … … 1701 1708 if (socket->port > 0) { 1702 1709 socket_ports_exclude(&tcp_globals.sockets, 1703 socket->port );1710 socket->port, free); 1704 1711 socket->port = 0; 1705 1712 } … … 2447 2454 SERVICE_TCP, IPC_GET_ERROR(*icall)); 2448 2455 2449 ipc_answer_0(iid, (sysarg_t) rc);2456 async_answer_0(iid, (sysarg_t) rc); 2450 2457 break; 2451 2458 default: 2452 ipc_answer_0(iid, (sysarg_t) ENOTSUP);2459 async_answer_0(iid, (sysarg_t) ENOTSUP); 2453 2460 } 2454 2461 … … 2472 2479 tcp_globals.net_phone = net_phone; 2473 2480 2474 tcp_globals.icmp_phone = icmp_connect_module(SERVICE_ICMP, 2475 ICMP_CONNECT_TIMEOUT); 2481 tcp_globals.icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT); 2476 2482 tcp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_TCP, 2477 2483 SERVICE_TCP, tcp_receiver); … … 2487 2493 rc = packet_dimensions_initialize(&tcp_globals.dimensions); 2488 2494 if (rc != EOK) { 2489 socket_ports_destroy(&tcp_globals.sockets );2495 socket_ports_destroy(&tcp_globals.sockets, free); 2490 2496 goto out; 2491 2497 }
Note:
See TracChangeset
for help on using the changeset viewer.