Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4306 → Rev 4307

/branches/network/uspace/srv/net/nil/eth/eth_module.c
42,6 → 42,8
#include "../../err.h"
#include "../../modules.h"
 
#include "../../include/net_interface.h"
 
#include "../../structures/packet/packet.h"
 
#include "../nil_module.h"
50,25 → 52,26
 
#define NAME "Ethernet protocol"
 
void eth_print_name( void );
int eth_start_module( async_client_conn_t client_connection );
void module_print_name( void );
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 );
 
extern eth_globals_t eth_globals;
 
void eth_print_name( void ){
void module_print_name( void ){
printf( "%s", NAME );
}
 
int eth_start_module( async_client_conn_t client_connection ){
int module_start( async_client_conn_t client_connection ){
ERROR_DECLARE;
 
ipcarg_t phonehash;
int networking_phone;
int net_phone;
 
async_set_client_connection( client_connection );
networking_phone = connect_to_service( SERVICE_NETWORKING );
net_phone = net_connect_module( SERVICE_NETWORKING );
ERROR_PROPAGATE( pm_init());
if( ERROR_OCCURRED( nil_initialize( networking_phone ))
if( ERROR_OCCURRED( nil_initialize( net_phone ))
|| ERROR_OCCURRED( REGISTER_ME( SERVICE_ETHERNET, & phonehash ))){
pm_destroy();
return ERROR_CODE;
80,5 → 83,9
return EOK;
}
 
int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
return nil_message( callid, call, answer, answer_count );
}
 
/** @}
*/