Ignore:
Timestamp:
2010-04-09T12:54:57Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1caa3c2
Parents:
24ab58b3
Message:

networking overhaul:

  • separation of conserns
  • removal of (almost all) overlaping symbols, libnetif is not needed anymore
  • again, it is possible to build the networking in multiple architecture configurations (however, currently only the bundling netif and nil layers is supported, more to come)
  • code style updates and fixes (still a huge amount of work to do)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/netif/netif_nil_bundle.c

    r24ab58b3 r14f1db0  
    4141#include <net_messages.h>
    4242#include <packet/packet.h>
    43 #include <nil_module.h>
    4443#include <netif_nil_bundle.h>
    45 #include <netif.h>
     44#include <netif_local.h>
     45#include <nil_local.h>
    4646
    4747/** Distribute the messages between the module parts.
     
    6262    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
    6363{
    64         if (IS_NET_NIL_MESSAGE(call)
     64        if ((IS_NET_NIL_MESSAGE(call))
    6565            || (IPC_GET_METHOD(*call) == IPC_M_CONNECT_TO_ME))
    66                 return nil_message(name, callid, call, answer, answer_count);
     66                return nil_message_standalone(name, callid, call, answer,
     67                    answer_count);
    6768        else
    68                 return netif_message(name, callid, call, answer, answer_count);
     69                return netif_module_message_standalone(name, callid, call, answer,
     70                    answer_count);
    6971}
    7072
    71 /** Starts the bundle network interface module.
    72  *  Initializes the client connection serving function, initializes both module parts, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
    73  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    74  *  @returns EOK on success.
    75  *  @returns Other error codes as defined for each specific module message function.
     73/** Start the bundle network interface module.
     74 *
     75 * Initialize the client connection serving function, initialize
     76 * both module parts, register the module service and start the
     77 * async manager, processing IPC messages in an infinite loop.
     78 *
     79 * @param[in] client_connection The client connection processing
     80 *                              function. The module skeleton propagates
     81 *                              its own one.
     82 *
     83 * @return EOK on success.
     84 * @return Other error codes as defined for each specific module message
     85 *         function.
     86 *
    7687 */
    77 int netif_nil_module_start(async_client_conn_t client_connection){
     88int netif_nil_module_start(async_client_conn_t client_connection)
     89{
    7890        ERROR_DECLARE;
    79 
     91       
    8092        ERROR_PROPAGATE(netif_init_module(client_connection));
    81         if(ERROR_OCCURRED(nil_initialize(netif_globals.net_phone))){
     93        if (ERROR_OCCURRED(nil_initialize(netif_globals.net_phone))) {
    8294                pm_destroy();
    8395                return ERROR_CODE;
    8496        }
    85         return netif_run_module();
     97       
     98        async_manager();
     99       
     100        pm_destroy();
     101        return EOK;
    86102}
    87103
Note: See TracChangeset for help on using the changeset viewer.