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

directconn.c File Reference

functions to help in attempt to make direct connection More...

#include "directconn.h"
#include "directconn_private.h"
#include <stdlib.h>
#include <pthread.h>
#include "util.h"
#include "debug.h"
#include "berkeleyapi.h"
#include <unistd.h>

Go to the source code of this file.

Functions

errorcode start_direct_conn (peer_conn_info_t *info)
 starts the direct connection process by creating a detached thread to make the connection
void * run_direct_conn_connect (void *arg)
 the entry point for the started thread that actually creates the direct connection


Detailed Description

functions to help in attempt to make direct connection

Author:
Daniel Ferullo (ferullo@cmu.edu)

Definition in file directconn.c.


Function Documentation

void* run_direct_conn_connect void *  arg  ) 
 

the entry point for the started thread that actually creates the direct connection

Parameters:
arg the sole argument allowed in a pthread. Will be cast to a direct_conn_connect_arg_t pointer and freed a thread exit
Returns:
SUCCESS, errorcode on failure

Definition at line 63 of file directconn.c.

References peer_conn_info::buddy, peer_sock_desc::buddy, CHECK_NOT_NULL, DBG_DIR_CONN, DEBUG, direct_conn_connect_arg_t, peer_conn_info::direct_conn_status, ERROR_NULL_ARG_1, buddy_info::ext_ip, buddy_info::ext_port, direct_conn_connect_arg::info, safe_free(), and peer_conn_info::socks.

Referenced by start_direct_conn().

errorcode start_direct_conn peer_conn_info_t info  ) 
 

starts the direct connection process by creating a detached thread to make the connection

Allocates a direct_conn_arg_t structure that it expects the started thread to free.

Parameters:
info pointer to the peer_conn_info_t structure will all the info
Returns:
SUCCESS, errorcode on failure

Definition at line 34 of file directconn.c.

References CHECK_NOT_NULL, direct_conn_connect_arg_t, ERROR_NULL_ARG_1, errorcode, direct_conn_connect_arg::info, peer_conn_info_t, run_direct_conn_connect(), and safe_free().

Referenced by peer_fsm_start_direct_conn().


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