Changeset efedee77 in mainline for uspace/srv/net/nil/eth/eth_module.c
- Timestamp:
- 2010-11-02T22:38:46Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/nil/eth/eth_module.c
raab02fb refedee77 36 36 */ 37 37 38 #include "eth.h" 39 38 40 #include <async.h> 39 41 #include <stdio.h> 42 #include <err.h> 40 43 41 44 #include <ipc/ipc.h> 42 45 #include <ipc/services.h> 43 46 44 #include <net_err.h> 45 #include <net_modules.h> 47 #include <net/modules.h> 46 48 #include <net_interface.h> 47 #include < packet/packet.h>49 #include <net/packet.h> 48 50 #include <nil_local.h> 49 51 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 */60 52 int nil_module_start_standalone(async_client_conn_t client_connection) 61 53 { … … 63 55 64 56 async_set_client_connection(client_connection); 65 int net_phone = net_connect_module( SERVICE_NETWORKING);57 int net_phone = net_connect_module(); 66 58 ERROR_PROPAGATE(pm_init()); 67 59 68 60 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))) { 71 63 pm_destroy(); 72 64 return ERROR_CODE; … … 79 71 } 80 72 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) 73 int 74 nil_module_message_standalone(const char *name, ipc_callid_t callid, 75 ipc_call_t *call, ipc_call_t *answer, int *answer_count) 98 76 { 99 77 return nil_message_standalone(name, callid, call, answer, answer_count);
Note:
See TracChangeset
for help on using the changeset viewer.