Changeset 8b655705 in mainline for uspace/srv/net/tl/tcp/tcp.c


Ignore:
Timestamp:
2011-04-15T19:38:07Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9dd730d1
Parents:
6b9e85b (diff), b2fb47f (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r6b9e85b r8b655705  
    4444#include <errno.h>
    4545
    46 #include <ipc/ipc.h>
    4746#include <ipc/services.h>
    4847#include <ipc/net.h>
     
    6463#include <ip_interface.h>
    6564#include <icmp_client.h>
    66 #include <icmp_interface.h>
     65#include <icmp_remote.h>
    6766#include <net_interface.h>
    6867#include <socket_core.h>
     
    300299                return tcp_release_and_return(packet, NO_DATA);
    301300
    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
    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 */
     1209void tl_connection(void)
     1210{
     1211}
     1212
    12061213/** Processes the TCP message.
    12071214 *
     
    12171224 * @see IS_NET_TCP_MESSAGE()
    12181225 */
    1219 int tl_module_message(ipc_callid_t callid, ipc_call_t *call,
     1226int tl_message(ipc_callid_t callid, ipc_call_t *call,
    12201227    ipc_call_t *answer, size_t *answer_count)
    12211228{
     
    14991506
    15001507        /* Release the application phone */
    1501         ipc_hangup(app_phone);
     1508        async_hangup(app_phone);
    15021509
    15031510        printf("release\n");
     
    17011708                if (socket->port > 0) {
    17021709                        socket_ports_exclude(&tcp_globals.sockets,
    1703                             socket->port);
     1710                            socket->port, free);
    17041711                        socket->port = 0;
    17051712                }
     
    24472454                                    SERVICE_TCP, IPC_GET_ERROR(*icall));
    24482455                       
    2449                         ipc_answer_0(iid, (sysarg_t) rc);
     2456                        async_answer_0(iid, (sysarg_t) rc);
    24502457                        break;
    24512458                default:
    2452                         ipc_answer_0(iid, (sysarg_t) ENOTSUP);
     2459                        async_answer_0(iid, (sysarg_t) ENOTSUP);
    24532460                }
    24542461               
     
    24722479        tcp_globals.net_phone = net_phone;
    24732480       
    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);
    24762482        tcp_globals.ip_phone = ip_bind_service(SERVICE_IP, IPPROTO_TCP,
    24772483            SERVICE_TCP, tcp_receiver);
     
    24872493        rc = packet_dimensions_initialize(&tcp_globals.dimensions);
    24882494        if (rc != EOK) {
    2489                 socket_ports_destroy(&tcp_globals.sockets);
     2495                socket_ports_destroy(&tcp_globals.sockets, free);
    24902496                goto out;
    24912497        }
Note: See TracChangeset for help on using the changeset viewer.