Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth_module.c

    r849ed54 r14f1db0  
    4646#include <net_interface.h>
    4747#include <packet/packet.h>
    48 #include <nil_standalone.h>
     48#include <nil_local.h>
    4949
    5050#include "eth.h"
     
    5858 *  @returns Other error codes as defined for the REGISTER_ME() macro function.
    5959 */
    60 int nil_module_start(async_client_conn_t client_connection){
     60int nil_module_start_standalone(async_client_conn_t client_connection)
     61{
    6162        ERROR_DECLARE;
    62 
     63       
     64        async_set_client_connection(client_connection);
     65        int net_phone = net_connect_module(SERVICE_NETWORKING);
     66        ERROR_PROPAGATE(pm_init());
     67       
    6368        ipcarg_t phonehash;
    64         int net_phone;
    65 
    66         async_set_client_connection(client_connection);
    67         net_phone = net_connect_module(SERVICE_NETWORKING);
    68         ERROR_PROPAGATE(pm_init());
    69         if(ERROR_OCCURRED(nil_initialize(net_phone))
    70                 || ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))){
     69        if (ERROR_OCCURRED(nil_initialize(net_phone))
     70            || ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
    7171                pm_destroy();
    7272                return ERROR_CODE;
    7373        }
    74 
     74       
    7575        async_manager();
    76 
     76       
    7777        pm_destroy();
    7878        return EOK;
    7979}
    8080
    81 /** Passes the parameters to the module specific nil_message() function.
    82  *  @param[in] callid The message identifier.
    83  *  @param[in] call The message parameters.
    84  *  @param[out] answer The message answer parameters.
    85  *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
    86  *  @returns EOK on success.
    87  *  @returns ENOTSUP if the message is not known.
    88  *  @returns Other error codes as defined for each specific module message function.
     81/** Pass the parameters to the module specific nil_message() function.
     82 *
     83 * @param[in]  name         Module name.
     84 * @param[in]  callid       The message identifier.
     85 * @param[in]  call         The message parameters.
     86 * @param[out] answer       The message answer parameters.
     87 * @param[out] answer_count The last parameter for the actual answer
     88 *                          in the answer parameter.
     89 *
     90 * @return EOK on success.
     91 * @return ENOTSUP if the message is not known.
     92 * @return Other error codes as defined for each
     93 *         specific module message function.
     94 *
    8995 */
    90 int nil_module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
    91         return nil_message(callid, call, answer, answer_count);
     96int nil_module_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
     97    ipc_call_t *answer, int *answer_count)
     98{
     99        return nil_message_standalone(name, callid, call, answer, answer_count);
    92100}
    93101
Note: See TracChangeset for help on using the changeset viewer.