Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4306 → Rev 4307

/branches/network/uspace/srv/net/tl/tcp/tcp_module.c
44,7 → 44,9
 
#include "../../structures/packet/packet.h"
 
#include "../../include/protocols.h"
#include "../../include/net_interface.h"
#include "../../include/ip_protocols.h"
#include "../../include/ip_interface.h"
 
#include "tcp.h"
#include "tcp_module.h"
51,23 → 53,24
 
#define NAME "TCP protocol"
 
void tcp_print_name( void );
int tcp_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 tcp_globals_t tcp_globals;
 
void tcp_print_name( void ){
void module_print_name( void ){
printf( "%s", NAME );
}
 
int tcp_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 );
tcp_globals.networking_phone = connect_to_service( SERVICE_NETWORKING );
tcp_globals.ip_phone = bind_service( SERVICE_IP, IPPROTO_TCP, 0, 0, client_connection );
tcp_globals.net_phone = net_connect_module( SERVICE_NETWORKING );
tcp_globals.ip_phone = ip_bind_service( SERVICE_IP, IPPROTO_TCP, client_connection );
ERROR_PROPAGATE( pm_init());
if( ERROR_OCCURRED( tcp_initialize())
|| ERROR_OCCURRED( REGISTER_ME( SERVICE_TCP, & phonehash ))){
81,5 → 84,9
return EOK;
}
 
int module_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
return tcp_message( callid, call, answer, answer_count );
}
 
/** @}
*/