Changeset 8b5690f in mainline for uspace/lib/net/include/il_skel.h
- Timestamp:
- 2011-02-03T05:11:01Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba38f72c
- Parents:
- 22027b6e (diff), 86d7bfa (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
r22027b6e r8b5690f 1 1 /* 2 * Copyright (c) 20 08 Lukas Mejdrech2 * Copyright (c) 2010 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup tcp29 /** @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 * TCP 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 * @see module.c 37 * Internetwork layer module skeleton. 38 * The skeleton has to be part of each internetwork layer module. 39 39 */ 40 40 41 #include "tcp.h"42 #include "tcp_module.h"43 44 41 #include <async.h> 45 #include <stdio.h> 46 #include <errno.h> 47 #include <ipc/ipc.h> 42 #include <fibril_synch.h> 48 43 #include <ipc/services.h> 49 44 50 #include < net/ip_protocols.h>51 #include <net/ modules.h>45 #include <adt/measured_strings.h> 46 #include <net/device.h> 52 47 #include <net/packet.h> 53 #include <net_interface.h>54 48 55 #include <ip_interface.h> 56 #include <tl_local.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); 57 61 58 /** TCP module global data. */ 59 extern tcp_globals_t tcp_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); 60 77 61 int tl_module_start_standalone(async_client_conn_t client_connection) 62 { 63 sysarg_t phonehash; 64 int rc; 78 extern int il_module_start(int); 65 79 66 async_set_client_connection(client_connection); 67 tcp_globals.net_phone = net_connect_module(); 68 69 rc = pm_init(); 70 if (rc != EOK) 71 return rc; 72 73 rc = tcp_initialize(client_connection); 74 if (rc != EOK) 75 goto out; 76 77 rc = ipc_connect_to_me(PHONE_NS, SERVICE_TCP, 0, 0, &phonehash); 78 if (rc != EOK) 79 goto out; 80 81 async_manager(); 82 83 out: 84 pm_destroy(); 85 return rc; 86 } 87 88 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call, 89 ipc_call_t *answer, int *answer_count) 90 { 91 return tcp_message_standalone(callid, call, answer, answer_count); 92 } 80 #endif 93 81 94 82 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.