/branches/network/uspace/srv/net/tl/tcp/tcp.c |
---|
42,7 → 42,7 |
#include "../../err.h" |
#include "../../messages.h" |
#include "../../modules.h" |
#include "../../structures/packet/packet.h" |
#include "../../structures/packet/packet_client.h" |
#include "../../il/ip/ip_messages.h" |
65,10 → 65,10 |
printf( "OK\n" ); |
printf( "\nTCP - testing to send packet to IP:\t" ); |
packet = packet_create( 20, 30, 20 ); |
packet = packet_get_5( tcp_globals.networking_phone, SERVICE_TCP, 6, 20, 30, 20 ); |
if( ! packet ) return ENOMEM; |
packet_copy_data( packet, "Hi, this is TCP", 16 ); |
ERROR_PROPAGATE( ip_send( tcp_globals.ip_phone, -1, packet )); |
ip_send( tcp_globals.ip_phone, -1, packet ); |
printf( "\tOK\n" ); |
return EOK; |
} |
/branches/network/uspace/srv/net/tl/tcp/tcp_module.c |
---|
42,6 → 42,8 |
#include "../../err.h" |
#include "../../modules.h" |
#include "../../structures/packet/packet.h" |
#include "../../include/protocols.h" |
#include "tcp.h" |
66,6 → 68,7 |
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 ); |
ERROR_PROPAGATE( pm_init()); |
ERROR_PROPAGATE( tcp_initialize()); |
ERROR_PROPAGATE( REGISTER_ME( SERVICE_TCP, & phonehash )); |
/branches/network/uspace/srv/net/tl/tcp/Makefile |
---|
46,7 → 46,8 |
$(NAME).c \ |
../../module.c \ |
../../modules.c \ |
../../structures/packet/packet.c |
../../structures/packet/packet.c \ |
../../structures/packet/packet_client.c |
DEFS += -D TCP_BUNDLE=1 -D $(NAME)_message=module_message -D $(NAME)_start_module=module_start -D $(NAME)_print_name=module_print_name |