Changeset b5e68c8 in mainline for uspace/lib/net/include/il_skel.h
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (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 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/include/il_skel.h
re80329d6 rb5e68c8 1 1 /* 2 * Copyright (c) 20 09 Lukas Mejdrech2 * Copyright (c) 2010 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup ip29 /** @addtogroup libnet 30 30 * @{ 31 31 */ 32 32 33 #ifndef LIBNET_IL_SKEL_H_ 34 #define LIBNET_IL_SKEL_H_ 35 33 36 /** @file 34 * IP standalone module implementation. 35 * Contains skeleton module functions mapping. 36 * The functions are used by the module skeleton as module specific entry 37 * points. 38 * 39 * @see module.c 37 * Internetwork layer module skeleton. 38 * The skeleton has to be part of each internetwork layer module. 40 39 */ 41 40 42 41 #include <async.h> 43 #include <stdio.h> 44 #include <ipc/ipc.h> 42 #include <fibril_synch.h> 45 43 #include <ipc/services.h> 46 #include <err.h>47 44 48 #include < net/modules.h>49 #include <net _interface.h>45 #include <adt/measured_strings.h> 46 #include <net/device.h> 50 47 #include <net/packet.h> 51 #include <il_local.h>52 48 53 #include "ip.h" 54 #include "ip_module.h" 49 /** Module initialization. 50 * 51 * This has to be implemented in user code. 52 * 53 * @param[in] net_phone Networking module phone. 54 * 55 * @return EOK on success. 56 * @return Other error codes as defined for each specific module 57 * initialize function. 58 * 59 */ 60 extern int il_initialize(int net_phone); 55 61 56 /** IP module global data. */ 57 extern ip_globals_t ip_globals; 62 /** Process the internetwork layer module message. 63 * 64 * This has to be implemented in user code. 65 * 66 * @param[in] callid Message identifier. 67 * @param[in] call Message parameters. 68 * @param[out] answer Answer. 69 * @param[out] count Number of arguments of the answer. 70 * 71 * @return EOK on success. 72 * @return Other error codes as defined for each specific module. 73 * 74 */ 75 extern int il_module_message(ipc_callid_t callid, ipc_call_t *call, 76 ipc_call_t *answer, size_t *answer_count); 58 77 59 int 60 il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call, 61 ipc_call_t *answer, int *answer_count) 62 { 63 return ip_message_standalone(callid, call, answer, answer_count); 64 } 78 extern int il_module_start(int); 65 79 66 int il_module_start_standalone(async_client_conn_t client_connection) 67 { 68 ERROR_DECLARE; 69 70 async_set_client_connection(client_connection); 71 ip_globals.net_phone = net_connect_module(); 72 ERROR_PROPAGATE(pm_init()); 73 74 ipcarg_t phonehash; 75 if (ERROR_OCCURRED(ip_initialize(client_connection)) || 76 ERROR_OCCURRED(REGISTER_ME(SERVICE_IP, &phonehash))) { 77 pm_destroy(); 78 return ERROR_CODE; 79 } 80 81 async_manager(); 82 83 pm_destroy(); 84 return EOK; 85 } 80 #endif 86 81 87 82 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.