Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified uspace/srv/net/tl/tcp/tcp.c

    r28a3e74 r014dd57b  
    4444#include <errno.h>
    4545
     46#include <ipc/ipc.h>
    4647#include <ipc/services.h>
    4748#include <ipc/net.h>
     
    6364#include <ip_interface.h>
    6465#include <icmp_client.h>
    65 #include <icmp_remote.h>
     66#include <icmp_interface.h>
    6667#include <net_interface.h>
    6768#include <socket_core.h>
     
    299300                return tcp_release_and_return(packet, NO_DATA);
    300301
    301 #if 0
    302         printf("header len %d, port %d \n", TCP_HEADER_LENGTH(header),
    303             ntohs(header->destination_port));
    304 #endif
     302//      printf("header len %d, port %d \n", TCP_HEADER_LENGTH(header),
     303//          ntohs(header->destination_port));
     304
    305305        result = packet_get_addr(packet, (uint8_t **) &src, (uint8_t **) &dest);
    306306        if (result <= 0)
     
    10631063        tcp_process_acknowledgement(socket, socket_data, header);
    10641064
    1065         socket_data->next_incoming = ntohl(header->sequence_number); /* + 1; */
     1065        socket_data->next_incoming = ntohl(header->sequence_number);    // + 1;
    10661066        pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
    10671067        socket_data->state = TCP_SOCKET_ESTABLISHED;
     
    12041204}
    12051205
    1206 /** Per-connection initialization
    1207  *
    1208  */
    1209 void tl_connection(void)
    1210 {
    1211 }
    1212 
    12131206/** Processes the TCP message.
    12141207 *
     
    12241217 * @see IS_NET_TCP_MESSAGE()
    12251218 */
    1226 int tl_message(ipc_callid_t callid, ipc_call_t *call,
     1219int tl_module_message(ipc_callid_t callid, ipc_call_t *call,
    12271220    ipc_call_t *answer, size_t *answer_count)
    12281221{
     
    15061499
    15071500        /* Release the application phone */
    1508         async_hangup(app_phone);
     1501        ipc_hangup(app_phone);
    15091502
    15101503        printf("release\n");
     
    17081701                if (socket->port > 0) {
    17091702                        socket_ports_exclude(&tcp_globals.sockets,
    1710                             socket->port, free);
     1703                            socket->port);
    17111704                        socket->port = 0;
    17121705                }
     
    24542447                                    SERVICE_TCP, IPC_GET_ERROR(*icall));
    24552448                       
    2456                         async_answer_0(iid, (sysarg_t) rc);
     2449                        ipc_answer_0(iid, (sysarg_t) rc);
    24572450                        break;
    24582451                default:
    2459                         async_answer_0(iid, (sysarg_t) ENOTSUP);
     2452                        ipc_answer_0(iid, (sysarg_t) ENOTSUP);
    24602453                }
    24612454               
     
    24792472        tcp_globals.net_phone = net_phone;
    24802473       
    2481         tcp_globals.icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT);
     2474        tcp_globals.icmp_phone = icmp_connect_module(SERVICE_ICMP,
     2475            ICMP_CONNECT_TIMEOUT);
    24822476        tcp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_TCP,
    24832477            SERVICE_TCP, tcp_receiver);
     
    24932487        rc = packet_dimensions_initialize(&tcp_globals.dimensions);
    24942488        if (rc != EOK) {
    2495                 socket_ports_destroy(&tcp_globals.sockets, free);
     2489                socket_ports_destroy(&tcp_globals.sockets);
    24962490                goto out;
    24972491        }
Note: See TracChangeset for help on using the changeset viewer.