Changeset 7715994 in mainline for uspace/srv/net/il/ip/ip_module.c
- Timestamp:
- 2010-03-13T12:17:02Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ba20a6b
- Parents:
- d0febca (diff), 2070570 (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/il/ip/ip_module.c
rd0febca r7715994 58 58 #define NAME "IP protocol" 59 59 60 /** Prints the module name. 61 * @see NAME 60 /** IP module global data. 62 61 */ 63 void module_print_name( void ); 64 65 /** Starts the IP module. 66 * 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. 67 * @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. 68 * @returns EOK on successful module termination. 69 * @returns Other error codes as defined for the ip_initialize() function. 70 * @returns Other error codes as defined for the REGISTER_ME() macro function. 71 */ 72 int module_start( async_client_conn_t client_connection ); 62 extern ip_globals_t ip_globals; 73 63 74 64 /** Processes the IP message. … … 80 70 * @returns Other error codes as defined for the ip_message() function. 81 71 */ 82 int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);72 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count); 83 73 84 /** IP module global data. 74 /** Prints the module name. 75 * @see NAME 85 76 */ 86 extern ip_globals_t ip_globals;77 void module_print_name(void); 87 78 88 void module_print_name( void ){ 89 printf( "%s", NAME ); 79 /** Starts the IP module. 80 * 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. 81 * @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. 82 * @returns EOK on successful module termination. 83 * @returns Other error codes as defined for the ip_initialize() function. 84 * @returns Other error codes as defined for the REGISTER_ME() macro function. 85 */ 86 int module_start(async_client_conn_t client_connection); 87 88 int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 89 return ip_message(callid, call, answer, answer_count); 90 90 } 91 91 92 int module_start( async_client_conn_t client_connection ){ 92 void module_print_name(void){ 93 printf("%s", NAME); 94 } 95 96 int module_start(async_client_conn_t client_connection){ 93 97 ERROR_DECLARE; 94 98 95 ipcarg_t 99 ipcarg_t phonehash; 96 100 97 async_set_client_connection( client_connection);98 ip_globals.net_phone = net_connect_module( SERVICE_NETWORKING);99 ERROR_PROPAGATE( 100 if( ERROR_OCCURRED( ip_initialize( client_connection))101 || ERROR_OCCURRED( REGISTER_ME( SERVICE_IP, & phonehash))){101 async_set_client_connection(client_connection); 102 ip_globals.net_phone = net_connect_module(SERVICE_NETWORKING); 103 ERROR_PROPAGATE(pm_init()); 104 if(ERROR_OCCURRED(ip_initialize(client_connection)) 105 || ERROR_OCCURRED(REGISTER_ME(SERVICE_IP, &phonehash))){ 102 106 pm_destroy(); 103 107 return ERROR_CODE; … … 110 114 } 111 115 112 int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){113 return ip_message( callid, call, answer, answer_count );114 }115 116 116 /** @} 117 117 */
Note:
See TracChangeset
for help on using the changeset viewer.