RTRlib
Modules | Data Structures | Typedefs | Enumerations | Enumerator | Variables
Transport sockets

Modules

 SSH transport socket
 
 TCP transport socket
 

Data Structures

struct  tr_socket
 

Typedefs

typedef void(* tr_close_fp) (void *socket)
 
typedef void(* tr_free_fp) (struct tr_socket *tr_sock)
 
typedef int(* tr_open_fp) (void *socket)
 
typedef int(* tr_recv_fp) (const void *socket, void *pdu, const size_t len, const time_t timeout)
 
typedef int(* tr_send_fp) (const void *socket, const void *pdu, const size_t len, const time_t timeout)
 

Enumerations

enum  tr_rtvals {
  TR_SUCCESS = 0, TR_ERROR = -1, TR_WOULDBLOCK = -2, TR_INTR = -3,
  TR_CLOSED = -4
}
 

Variables

tr_close_fp tr_socket::close_fp
 
tr_free_fp tr_socket::free_fp
 
tr_ident_fp tr_socket::ident_fp
 
tr_open_fp tr_socket::open_fp
 
tr_recv_fp tr_socket::recv_fp
 
tr_send_fp tr_socket::send_fp
 
void * tr_socket::socket
 
const typedef char *(* tr_ident_fp )(void *socket)
 

Detailed Description

Before using the transport socket, a tr_socket must be initialized based on a protocol-dependent init function (e.g., tr_tcp_init()).
The tr_* functions call the corresponding function pointers, which are passed in the tr_socket struct, and forward the remaining arguments.

Typedef Documentation

◆ tr_close_fp

typedef void(* tr_close_fp) (void *socket)

A function pointer to a technology specific close function.

See also
tr_close

◆ tr_free_fp

typedef void(* tr_free_fp) (struct tr_socket *tr_sock)

A function pointer to a technology specific free function. All memory associated with the tr_socket will be freed.

See also
tr_free

◆ tr_open_fp

typedef int(* tr_open_fp) (void *socket)

A function pointer to a technology specific open function.

See also
tr_open

◆ tr_recv_fp

typedef int(* tr_recv_fp) (const void *socket, void *pdu, const size_t len, const time_t timeout)

A function pointer to a technology specific recv function.

See also
tr_recv

◆ tr_send_fp

typedef int(* tr_send_fp) (const void *socket, const void *pdu, const size_t len, const time_t timeout)

A function pointer to a technology specific send function.

See also
tr_send

Enumeration Type Documentation

◆ tr_rtvals

enum tr_rtvals

The return values for tr_ functions.

Enumerator
TR_SUCCESS 

Operation was successful.

TR_ERROR 

Error occured.

TR_WOULDBLOCK 

No data is available on the socket.

TR_INTR 

Call was interrupted from a signal

TR_CLOSED 

Connection closed

Variable Documentation

◆ tr_ident_fp

const typedef char*(* tr_ident_fp) (void *socket)

A function pointer to a technology specific info function.

See also
tr_send