Ignore:
Timestamp:
2010-04-23T21:42:26Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c39a907
Parents:
38aaacc2 (diff), 80badbe (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/lib/net/netif/netif_nil_bundle.c

    r38aaacc2 rf4f866c  
    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
    47 /** Distributes the messages between the module parts.
    48  *  @param[in] callid The message identifier.
    49  *  @param[in] call The message parameters.
    50  *  @param[out] answer The message answer parameters.
    51  *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
    52  *  @returns EOK on success.
    53  *  @returns ENOTSUP if the message is not known.
    54  *  @returns Other error codes as defined for each specific module message function.
     47/** Distribute the messages between the module parts.
     48 *
     49 * @param[in]  name         Module name.
     50 * @param[in]  callid       The message identifier.
     51 * @param[in]  call         The message parameters.
     52 * @param[out] answer       The message answer parameters.
     53 * @param[out] answer_count The last parameter for the actual
     54 *                          answer in the answer parameter.
     55 *
     56 * @return EOK on success.
     57 * @return ENOTSUP if the message is not known.
     58 * @return Other error codes as defined for each specific module message function.
     59 *
    5560 */
    56 int netif_nil_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
    57         if(IS_NET_NIL_MESSAGE(call) || (IPC_GET_METHOD(*call) == IPC_M_CONNECT_TO_ME)){
    58                 return nil_message(callid, call, answer, answer_count);
    59         }else{
    60                 return netif_message(callid, call, answer, answer_count);
    61         }
     61int netif_nil_module_message(const char *name, ipc_callid_t callid,
     62    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
     63{
     64        if ((IS_NET_NIL_MESSAGE(call))
     65            || (IPC_GET_METHOD(*call) == IPC_M_CONNECT_TO_ME))
     66                return nil_message_standalone(name, callid, call, answer,
     67                    answer_count);
     68        else
     69                return netif_module_message_standalone(name, callid, call, answer,
     70                    answer_count);
    6271}
    6372
    64 /** Starts the bundle network interface module.
    65  *  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.
    66  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    67  *  @returns EOK on success.
    68  *  @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 *
    6987 */
    70 int netif_nil_module_start(async_client_conn_t client_connection){
     88int netif_nil_module_start(async_client_conn_t client_connection)
     89{
    7190        ERROR_DECLARE;
    72 
     91       
    7392        ERROR_PROPAGATE(netif_init_module(client_connection));
    74         if(ERROR_OCCURRED(nil_initialize(netif_globals.net_phone))){
     93        if (ERROR_OCCURRED(nil_initialize(netif_globals.net_phone))) {
    7594                pm_destroy();
    7695                return ERROR_CODE;
    7796        }
    78         return netif_run_module();
     97       
     98        async_manager();
     99       
     100        pm_destroy();
     101        return EOK;
    79102}
    80103
Note: See TracChangeset for help on using the changeset viewer.