RTRlib
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Typedefs | Enumerations | Functions
RTR socket

Data Structures

struct  rtr_socket
 

Typedefs

typedef void(* rtr_connection_state_fp )(const struct rtr_socket *rtr_socket, const enum rtr_socket_state state, void *connection_state_fp_param_config, void *connection_state_fp_param_group)
 

Enumerations

enum  rtr_interval_mode { RTR_INTERVAL_MODE_IGNORE_ANY, RTR_INTERVAL_MODE_ACCEPT_ANY, RTR_INTERVAL_MODE_DEFAULT_MIN_MAX, RTR_INTERVAL_MODE_IGNORE_ON_FAILURE }
 
enum  rtr_rtvals { RTR_SUCCESS = 0, RTR_ERROR = -1, RTR_INVALID_PARAM = -2 }
 
enum  rtr_socket_state {
  RTR_CONNECTING, RTR_ESTABLISHED, RTR_RESET, RTR_SYNC,
  RTR_FAST_RECONNECT, RTR_ERROR_NO_DATA_AVAIL, RTR_ERROR_NO_INCR_UPDATE_AVAIL, RTR_ERROR_FATAL,
  RTR_ERROR_TRANSPORT, RTR_SHUTDOWN, RTR_CLOSED
}
 

Functions

enum rtr_interval_mode rtr_get_interval_mode (struct rtr_socket *rtr_socket)
 
void rtr_set_interval_mode (struct rtr_socket *rtr_socket, enum rtr_interval_mode option)
 
const char * rtr_state_to_str (enum rtr_socket_state state)
 

Detailed Description

One rtr_socket communicates with a single RPKI-RTR server.

Enumeration Type Documentation

States of the RTR socket.

Enumerator
RTR_CONNECTING 

Socket is establishing the transport connection.

RTR_ESTABLISHED 

Connection is established, socket is waiting for a Serial Notify or expiration of the refresh_interval timer

RTR_RESET 

Resetting RTR connection.

RTR_SYNC 

Receiving validation records from the RTR server.

RTR_FAST_RECONNECT 

Reconnect without any waiting period

RTR_ERROR_NO_DATA_AVAIL 

No validation records are available on the RTR server.

RTR_ERROR_NO_INCR_UPDATE_AVAIL 

Server was unable to answer the last serial or reset query.

RTR_ERROR_FATAL 

Fatal protocol error occurred.

RTR_ERROR_TRANSPORT 

Error on the transport socket occurred.

RTR_SHUTDOWN 

RTR Socket was started, but now has shut down.

RTR_CLOSED 

RTR Socket has not been started yet. Initial state after rtr_init

Function Documentation

enum rtr_interval_mode rtr_get_interval_mode ( struct rtr_socket rtr_socket)

Get the current interval mode.

Parameters
[in]rtr_socketThe target socket.
Returns
The value of the interval_option variable.
void rtr_set_interval_mode ( struct rtr_socket rtr_socket,
enum rtr_interval_mode  option 
)

Set the interval option to the desired one. It's either RTR_INTERVAL_MODE_IGNORE_ANY, RTR_INTERVAL_MODE_APPLY_ANY, RTR_INTERVAL_MODE_DEFAULT_MIN_MAX or RTR_INTERVAL_MODE_IGNORE_ON_FAILURE.

Parameters
[in]rtr_socketThe target socket.
[in]optionThe new interval option that should be applied.
const char* rtr_state_to_str ( enum rtr_socket_state  state)

Converts a rtr_socket_state to a String.

Parameters
[in]statestate to convert to a string
Returns
NULL If state isn't a valid rtr_socket_state
!=NULL The rtr_socket_state as String.