Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

natblaster_peer.h File Reference

contains the peer's entrypoint into natblaster More...

#include "def.h"

Go to the source code of this file.

Functions

int natblaster_connect (ip_t helper_ip, port_t helper_port, ip_t peer_ip, port_t peer_port, ip_t buddy_ext_ip, ip_t buddy_int_ip, port_t buddy_int_port, char *device, flag_t random)
 the single function a peer must call to create a natblaster TCP connection


Detailed Description

contains the peer's entrypoint into natblaster

Author:
Daniel Ferullo (ferullo@cmu.edu)

Definition in file natblaster_peer.h.


Function Documentation

int natblaster_connect ip_t  helper_ip,
port_t  helper_port,
ip_t  peer_ip,
port_t  peer_port,
ip_t  buddy_ext_ip,
ip_t  buddy_int_ip,
port_t  buddy_int_port,
char *  device,
flag_t  random
 

the single function a peer must call to create a natblaster TCP connection

Parameters:
helper_ip the helper's IP
helper_port the helper's port
peer_ip the peer's IP
peer_port the port the peer wants to get a TCP connection to buddy on
buddy_ext_ip the external IP address of the buddy
buddy_int_ip the internal IP address of the buddy
buddy_int_port the internal port the buddy will create a TCP connection from
device the network device to use (if NULL it is auto detected)
random FLAG_SET to indicate the peer wants to have random port allocation. This is only for development testing, and should always be FLAG_UNSET in normal use.
Returns:
the TCP socket, negative if failure

Definition at line 34 of file natblaster_peer.c.

References peer_conn_info::bday, bindSocket(), peer_sock_desc::buddy, peer_conn_info::buddy, CHECK_FAILED, DBG_IP, DBG_PORT, DBG_VERBOSE, DEBUG, peer_conn_info::device, peer_conn_info::direct_conn_status, ERROR_1, ERROR_2, ERROR_3, ERROR_NO_DEV_FOUND, buddy_info::ext_ip, buddy_info::ext_port, buddy_info::ext_port_set, FAILED, findDevice(), FLAG_SET, peer_sock_desc::helper, peer_conn_info::helper, peer_conn_info::helper_conn, peer_sock_desc::helper_pred, buddy_info::identifier, buddy_info::int_ip, buddy_info::int_port, peer_info::ip, helper_info::ip, peer_conn_info::peer, peer_conn_info_t, peer_fsm_start(), helper_conn::persistent_port, peer_info::port, helper_info::port, PORT_ADD, helper_conn::prediction_port, peer_info::set, peer_conn_info::socks, and bday_peer::stop_synack_find.

Referenced by main().


Generated on Wed Mar 30 23:20:48 2005 for NATBLASTER by  doxygen 1.3.9.1