Coda Distributed File System
Classes | Macros | Typedefs | Enumerations | Functions
codatunnel.private.h File Reference
#include <sys/types.h>
#include <sys/socket.h>
#include <assert.h>
#include <sys/time.h>
#include <uv.h>
#include <gnutls/gnutls.h>
Include dependency graph for codatunnel.private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  codatunnel_packet
 
struct  enq_data_t
 
struct  remotedest
 

Macros

#define DEBUG(...)
 
#define ERROR(...)
 
#define MAXRECEIVE   (4500 + sizeof(ctp_t))
 
#define UVBUFLIMIT   10 /* drop packets beyond this limit */
 

Typedefs

typedef struct codatunnel_packet ctp_t
 
typedef struct remotedest dest_t
 

Enumerations

enum  deststate {
  FREE = 0 , ALLOCATED = 1 , TCPATTEMPTING = 2 , TLSHANDSHAKE = 3 ,
  TCPACTIVE = 4 , TLSERROR = 5 , TCPCLOSING = 6
}
 

Functions

int mapthread (uv_thread_t)
 
void codatunneld (int codatunnel_sockfd, const char *tcp_bindaddr, const char *udp_bindaddr, const char *bind_service, int onlytcp, const char *sslcertdir) __attribute__((noreturn))
 
const char * tcpstatename (enum deststate)
 
void outbound_worker_cb (uv_async_t *async)
 
void initdestarray ()
 
dest_tgetdest (const struct sockaddr_storage *, socklen_t)
 
dest_tcreatedest (const struct sockaddr_storage *, socklen_t, const char *peername)
 
void free_dest (dest_t *d)
 
void enq_element (dest_t *, const uv_buf_t *, int)
 
ssize_t eat_uvbytes (gnutls_transport_ptr_t, void *, size_t)
 
int poll_uvbytes (gnutls_transport_ptr_t gtp, unsigned int ms)
 
void drain_outbound_queues (dest_t *d)
 
void hexdump (char *desc, void *addr, int len)
 
void printsockaddr (const struct sockaddr_storage *, socklen_t)
 

Macro Definition Documentation

◆ DEBUG

#define DEBUG (   ...)

◆ ERROR

#define ERROR (   ...)
Value:
do { \
fprintf(stderr, "%s:%d ", __FUNCTION__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
fflush(stderr); \
} while (0)
stderr
Definition: gensrvstats.py:48
#define __LINE__
Definition: odytypes.h:68

◆ MAXRECEIVE

#define MAXRECEIVE   (4500 + sizeof(ctp_t))

◆ UVBUFLIMIT

#define UVBUFLIMIT   10 /* drop packets beyond this limit */

Typedef Documentation

◆ ctp_t

typedef struct codatunnel_packet ctp_t

◆ dest_t

typedef struct remotedest dest_t

Enumeration Type Documentation

◆ deststate

enum deststate
Enumerator
FREE 
ALLOCATED 
TCPATTEMPTING 
TLSHANDSHAKE 
TCPACTIVE 
TLSERROR 
TCPCLOSING 

Function Documentation

◆ codatunneld()

void codatunneld ( int  codatunnel_sockfd,
const char *  tcp_bindaddr,
const char *  udp_bindaddr,
const char *  bind_service,
int  onlytcp,
const char *  sslcertdir 
)

◆ createdest()

dest_t * createdest ( const struct sockaddr_storage x,
socklen_t  xlen,
const char *  peername 
)

◆ drain_outbound_queues()

void drain_outbound_queues ( dest_t d)

◆ eat_uvbytes()

ssize_t eat_uvbytes ( gnutls_transport_ptr_t  gtp,
void *  tlsbuf,
size_t  nread 
)

◆ enq_element()

void enq_element ( dest_t d,
const uv_buf_t *  thisbuf,
int  nb 
)

◆ free_dest()

void free_dest ( dest_t d)

◆ getdest()

dest_t * getdest ( const struct sockaddr_storage x,
socklen_t  xlen 
)

◆ hexdump()

void hexdump ( char *  desc,
void *  addr,
int  len 
)

◆ initdestarray()

void initdestarray ( )

◆ mapthread()

int mapthread ( uv_thread_t  t)

◆ outbound_worker_cb()

void outbound_worker_cb ( uv_async_t *  async)

◆ poll_uvbytes()

int poll_uvbytes ( gnutls_transport_ptr_t  gtp,
unsigned int  ms 
)

◆ printsockaddr()

void printsockaddr ( const struct sockaddr_storage ,
socklen_t   
)

◆ tcpstatename()

const char * tcpstatename ( enum  deststate)