Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3845 → Rev 3846

/branches/network/uspace/srv/net/ip/ip_module.c
35,17 → 35,20
 
#include <async.h>
#include <stdio.h>
 
#include <ipc/ipc.h>
#include <ipc/services.h>
 
#include "../err.h"
#include "../modules.h"
 
#include "ip.h"
#include "ip_module.h"
 
#define NAME "IP protocol"
 
void ip_print_name( void );
int ip_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall ));
int ip_start_module( async_client_conn_t client_connection );
 
extern ip_globals_t ip_globals;
 
53,15 → 56,19
printf( NAME );
}
 
int ip_start_module( void ( * client_connection )( ipc_callid_t iid, ipc_call_t * icall )){
services_t need[ 2 ];
int * need_phone[ 2 ];
int ip_start_module( async_client_conn_t client_connection ){
ERROR_DECLARE;
 
need[ 0 ] = SERVICE_NETWORKING;
need[ 1 ] = NULL;
need_phone[ 0 ] = & ip_globals.networking_phone;
need_phone[ 1 ] = NULL;
return start_service( SERVICE_IP, need, need_phone, client_connection, ip_initialize );
ipcarg_t phonehash;
 
async_set_client_connection( client_connection );
ip_globals.networking_phone = connect_to_service( SERVICE_NETWORKING );
ERROR_PROPAGATE( ip_initialize());
ERROR_PROPAGATE( REGISTER_ME( SERVICE_IP, & phonehash ));
 
async_manager();
 
return EOK;
}
 
/** @}