Changeset 858fc90 in mainline for uspace/srv/net/il/ip/ip_module.c


Ignore:
Timestamp:
2010-03-15T19:35:25Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6092b56e
Parents:
92307f1 (diff), 4684368 (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 from bzr://bzr.helenos.org/head.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/ip/ip_module.c

    r92307f1 r858fc90  
    5858#define NAME    "IP protocol"
    5959
    60 /** Prints the module name.
    61  *  @see NAME
     60/** IP module global data.
    6261 */
    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 );
     62extern ip_globals_t     ip_globals;
    7363
    7464/** Processes the IP message.
     
    8070 *  @returns Other error codes as defined for the ip_message() function.
    8171 */
    82 int     module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
     72int module_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
    8373
    84 /** IP module global data.
     74/** Prints the module name.
     75 *  @see NAME
    8576 */
    86 extern ip_globals_t     ip_globals;
     77void module_print_name(void);
    8778
    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 */
     86int module_start(async_client_conn_t client_connection);
     87
     88int 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);
    9090}
    9191
    92 int module_start( async_client_conn_t client_connection ){
     92void module_print_name(void){
     93        printf("%s", NAME);
     94}
     95
     96int module_start(async_client_conn_t client_connection){
    9397        ERROR_DECLARE;
    9498
    95         ipcarg_t        phonehash;
     99        ipcarg_t phonehash;
    96100
    97         async_set_client_connection( client_connection );
    98         ip_globals.net_phone = net_connect_module( SERVICE_NETWORKING );
    99         ERROR_PROPAGATE( pm_init());
    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))){
    102106                pm_destroy();
    103107                return ERROR_CODE;
     
    110114}
    111115
    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 
    116116/** @}
    117117 */
Note: See TracChangeset for help on using the changeset viewer.