Changeset 774e6d1a in mainline for uspace/srv/net/tl/tcp/tcp.c


Ignore:
Timestamp:
2011-01-09T23:24:53Z (13 years ago)
Author:
martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b86dac
Parents:
3c106e88
Message:

partial networking stack overhaul

  • a lot of coding style changes (comments, indentation, etc.)
  • convert several ints to unsigned ints or size_t values
  • streamline many of the IPC-related macros (they no longer dereference the call structure by themselves)
  • get rid of netif_interface.h (containing only aliases for remote functions and not serving any purpose)
  • rename netif_local.{c|h} to netif_skel.{c|h} (it is really just a skeleton)
  • drop the "_remote" and "_standalone" suffixes from most of the netif_ functions (they do not serve any purpose anymore)
  • implement netif_client_connection() as a common framework function for all netif modules
    • update the lo module accordingly
  • ip module now reports the default gateway to the user whenever it is being set
File:
1 edited

Legend:

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

    r3c106e88 r774e6d1a  
    12621262int
    12631263tcp_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)
    12651265{
    12661266        packet_t *packet;
     
    12761276//              fibril_rwlock_read_lock(&tcp_globals.lock);
    12771277                rc = packet_translate_remote(tcp_globals.net_phone, &packet,
    1278                     IPC_GET_PACKET(call));
     1278                    IPC_GET_PACKET(*call));
    12791279                if (rc != EOK) {
    12801280//                      fibril_rwlock_read_unlock(&tcp_globals.lock);
    12811281                        return rc;
    12821282                }
    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));
    12851285//              fibril_rwlock_read_unlock(&tcp_globals.lock);
    12861286                return rc;
     
    13231323        bool keep_on_going = true;
    13241324        socket_cores_t local_sockets;
    1325         int app_phone = IPC_GET_PHONE(&call);
     1325        int app_phone = IPC_GET_PHONE(call);
    13261326        struct sockaddr *addr;
    13271327        int socket_id;
     
    13301330        fibril_rwlock_t lock;
    13311331        ipc_call_t answer;
    1332         int answer_count;
     1332        size_t answer_count;
    13331333        tcp_socket_data_t *socket_data;
    13341334        socket_core_t *socket;
     
    25022502        while (true) {
    25032503                ipc_call_t answer;
    2504                 int answer_count;
     2504                size_t answer_count;
    25052505
    25062506                /* Clear the answer structure */
Note: See TracChangeset for help on using the changeset viewer.