Changeset 609243f4 in mainline for uspace/srv/net/tl


Ignore:
Timestamp:
2011-10-07T15:46:01Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2c50e1
Parents:
f51b1d3
Message:

cherrypick general networking improvements from lp:~helenos-nicf/helenos/nicf (after sanitization)
remove obsolete networking drivers
this renders the networking non-functional for the time being

Location:
uspace/srv/net/tl
Files:
3 edited

Legend:

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

    rf51b1d3 r609243f4  
    169169static int tcp_release_after_timeout(void *);
    170170
    171 static int tcp_process_packet(device_id_t, packet_t *, services_t);
     171static int tcp_process_packet(nic_device_id_t, packet_t *, services_t);
    172172static int tcp_connect_core(socket_core_t *, socket_cores_t *,
    173173    struct sockaddr *, socklen_t);
     
    177177    size_t);
    178178static packet_t *tcp_get_packets_to_send(socket_core_t *, tcp_socket_data_t *);
    179 static void tcp_send_packets(device_id_t, packet_t *);
     179static void tcp_send_packets(nic_device_id_t, packet_t *);
    180180
    181181static void tcp_process_acknowledgement(socket_core_t *, tcp_socket_data_t *,
     
    205205static void tcp_queue_received_end_of_data(socket_core_t *socket);
    206206
    207 static int tcp_received_msg(device_id_t, packet_t *, services_t, services_t);
     207static int tcp_received_msg(nic_device_id_t, packet_t *, services_t, services_t);
    208208static int tcp_process_client_messages(async_sess_t *, ipc_callid_t,
    209209    ipc_call_t);
     
    220220tcp_globals_t tcp_globals;
    221221
    222 int tcp_received_msg(device_id_t device_id, packet_t *packet,
     222int tcp_received_msg(nic_device_id_t device_id, packet_t *packet,
    223223    services_t receiver, services_t error)
    224224{
     
    238238}
    239239
    240 int tcp_process_packet(device_id_t device_id, packet_t *packet, services_t error)
     240int tcp_process_packet(nic_device_id_t device_id, packet_t *packet, services_t error)
    241241{
    242242        size_t length;
     
    12511251        bzero(socket_data, sizeof(*socket_data));
    12521252        socket_data->state = TCP_SOCKET_INITIAL;
    1253         socket_data->device_id = DEVICE_INVALID_ID;
     1253        socket_data->device_id = NIC_DEVICE_INVALID_ID;
    12541254        socket_data->window = NET_DEFAULT_TCP_WINDOW;
    12551255        socket_data->treshold = socket_data->window;
     
    13351335                        }
    13361336                        if (tl_get_ip_packet_dimension(tcp_globals.ip_sess,
    1337                             &tcp_globals.dimensions, DEVICE_INVALID_ID,
     1337                            &tcp_globals.dimensions, NIC_DEVICE_INVALID_ID,
    13381338                            &packet_dimension) == EOK) {
    13391339                                SOCKET_SET_DATA_FRAGMENT_SIZE(answer,
     
    16511651        /* Sent packet? */
    16521652        packet = pq_find(socket_data->outgoing, sequence_number);
    1653         printf("retransmit %d\n", packet_get_id(packet));
     1653        printf("retransmit %lu\n", packet_get_id(packet));
    16541654        if (packet) {
    16551655                pq_get_order(packet, NULL, &data_length);
     
    17901790
    17911791                        /* Send the packet */
    1792                         printf("connecting %d\n", packet_get_id(packet));
     1792                        printf("connecting %lu\n", packet_get_id(packet));
    17931793                        tcp_send_packets(socket_data->device_id, packet);
    17941794
     
    20042004}
    20052005
    2006 void tcp_send_packets(device_id_t device_id, packet_t *packet)
     2006void tcp_send_packets(nic_device_id_t device_id, packet_t *packet)
    20072007{
    20082008        packet_t *next;
  • uspace/srv/net/tl/tcp/tcp.h

    rf51b1d3 r609243f4  
    182182       
    183183        /** Device identifier. */
    184         device_id_t device_id;
     184        nic_device_id_t device_id;
    185185       
    186186        /**
  • uspace/srv/net/tl/udp/udp.c

    rf51b1d3 r609243f4  
    124124 *                      ip_client_process_packet() function.
    125125 */
    126 static int udp_process_packet(device_id_t device_id, packet_t *packet,
     126static int udp_process_packet(nic_device_id_t device_id, packet_t *packet,
    127127    services_t error)
    128128{
     
    322322 *                      udp_process_packet() function.
    323323 */
    324 static int udp_received_msg(device_id_t device_id, packet_t *packet,
     324static int udp_received_msg(nic_device_id_t device_id, packet_t *packet,
    325325    services_t receiver, services_t error)
    326326{
     
    499499        void *ip_header;
    500500        size_t headerlen;
    501         device_id_t device_id;
     501        nic_device_id_t device_id;
    502502        packet_dimension_t *packet_dimension;
    503503        size_t size;
     
    617617                    htons(flip_checksum(compact_checksum(checksum)));
    618618                free(ip_header);
    619         } else {
    620                 device_id = DEVICE_INVALID_ID;
    621         }
     619        } else
     620                device_id = NIC_DEVICE_INVALID_ID;
    622621
    623622        /* Prepare the first packet fragment */
     
    806805                        size = MAX_UDP_FRAGMENT_SIZE;
    807806                        if (tl_get_ip_packet_dimension(udp_globals.ip_sess,
    808                             &udp_globals.dimensions, DEVICE_INVALID_ID,
     807                            &udp_globals.dimensions, NIC_DEVICE_INVALID_ID,
    809808                            &packet_dimension) == EOK) {
    810809                                if (packet_dimension->content < size)
Note: See TracChangeset for help on using the changeset viewer.