Changeset efedee77 in mainline for uspace/srv/net/nil/eth/eth_module.c


Ignore:
Timestamp:
2010-11-02T22:38:46Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af894a21
Parents:
aab02fb (diff), e06ef614 (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/srv/net/nil/eth/eth_module.c

    raab02fb refedee77  
    3636 */
    3737
     38#include "eth.h"
     39
    3840#include <async.h>
    3941#include <stdio.h>
     42#include <err.h>
    4043
    4144#include <ipc/ipc.h>
    4245#include <ipc/services.h>
    4346
    44 #include <net_err.h>
    45 #include <net_modules.h>
     47#include <net/modules.h>
    4648#include <net_interface.h>
    47 #include <packet/packet.h>
     49#include <net/packet.h>
    4850#include <nil_local.h>
    4951
    50 #include "eth.h"
    51 
    52 /** Starts the Ethernet module.
    53  *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
    54  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    55  *  @returns EOK on success.
    56  *  @returns Other error codes as defined for the pm_init() function.
    57  *  @returns Other error codes as defined for the nil_initialize() function.
    58  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
    59  */
    6052int nil_module_start_standalone(async_client_conn_t client_connection)
    6153{
     
    6355       
    6456        async_set_client_connection(client_connection);
    65         int net_phone = net_connect_module(SERVICE_NETWORKING);
     57        int net_phone = net_connect_module();
    6658        ERROR_PROPAGATE(pm_init());
    6759       
    6860        ipcarg_t phonehash;
    69         if (ERROR_OCCURRED(nil_initialize(net_phone))
    70             || ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
     61        if (ERROR_OCCURRED(nil_initialize(net_phone)) ||
     62            ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
    7163                pm_destroy();
    7264                return ERROR_CODE;
     
    7971}
    8072
    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  *
    95  */
    96 int nil_module_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
    97     ipc_call_t *answer, int *answer_count)
     73int
     74nil_module_message_standalone(const char *name, ipc_callid_t callid,
     75    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
    9876{
    9977        return nil_message_standalone(name, callid, call, answer, answer_count);
Note: See TracChangeset for help on using the changeset viewer.