Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4306 → Rev 4307

/branches/network/uspace/srv/net/il/arp/arp_module.c
46,6 → 46,8
#include "../../err.h"
#include "../../modules.h"
 
#include "../../include/net_interface.h"
 
#include "../../structures/packet/packet.h"
 
#include "arp.h"
58,7 → 60,7
/** Prints the module name.
* @see NAME
*/
void arp_print_name( void );
void module_print_name( void );
 
/** Starts the ARP module.
* 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,23 → 69,24
* @returns Other error codes as defined for the arp_initialize() function.
* @returns Other error codes as defined for the REGISTER_ME() macro function.
*/
int arp_start_module( async_client_conn_t client_connection );
int module_start( async_client_conn_t client_connection );
int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
 
/** ARP module global data.
*/
extern arp_globals_t arp_globals;
 
void arp_print_name( void ){
void module_print_name( void ){
printf( "%s", NAME );
}
 
int arp_start_module( async_client_conn_t client_connection ){
int module_start( async_client_conn_t client_connection ){
ERROR_DECLARE;
 
ipcarg_t phonehash;
 
async_set_client_connection( client_connection );
arp_globals.networking_phone = connect_to_service( SERVICE_NETWORKING );
arp_globals.net_phone = net_connect_module( SERVICE_NETWORKING );
ERROR_PROPAGATE( pm_init());
if( ERROR_OCCURRED( arp_initialize())
|| ERROR_OCCURRED( REGISTER_ME( SERVICE_ARP, & phonehash ))){
97,5 → 100,9
return EOK;
}
 
int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
return arp_message( callid, call, answer, answer_count );
}
 
/** @}
*/