Transport::TheConfig Class Reference

parameters controlling outgoing connection More...

#include <Transport.h>

Collaboration diagram for Transport::TheConfig:

Public Member Functions

 TheConfig ()
 
void usage ()
 display Transport Options command line help to stderr More...
 
bool parseCommandOpts (int argc, char *argv[], int c, int &optIndex)
 

Public Attributes

int ioTimeout
 I/O operation timeout. More...
 
const char * localHost
 the local hostname to bind as for outgoing IP More...
 
const char * hostname
 the destination server host name to contact More...
 
uint16_t port
 port on the server to contact More...
 
bool tlsEnabled
 whether to enable TLS on the server connnection More...
 
bool tlsAnonymous
 whether to do anonymous TLS (non-authenticated) More...
 
const char * params
 
std::list< std::string > certFiles
 
std::list< std::string > caFiles
 
gnutls_anon_client_credentials_t anonCredentials
 anonymous client credentials More...
 
gnutls_certificate_credentials_t certCredentials
 
gnutls_session_t session
 TLS session state. More...
 

Detailed Description

Definition at line 24 of file Transport.h.

Constructor & Destructor Documentation

◆ TheConfig()

Transport::TheConfig::TheConfig ( )
inline

Definition at line 27 of file Transport.h.

References hostname, params, parseCommandOpts(), and usage().

Member Function Documentation

◆ parseCommandOpts()

bool Transport::TheConfig::parseCommandOpts ( int  argc,
char *  argv[],
int  c,
int optIndex 
)

parse transport related command line options

Returns
true if there are other options still to parse

Definition at line 53 of file Transport.cc.

References CACHE_HTTP_PORT, caFiles, certFiles, hostname, Transport::InitTls(), ioTimeout, localHost, optarg, opterr, optind, params, port, shortOpStr, and tlsAnonymous.

Referenced by main(), and TheConfig().

◆ usage()

void Transport::TheConfig::usage ( )

Definition at line 29 of file Transport.cc.

References CACHE_HTTP_PORT.

Referenced by TheConfig(), and usage().

Member Data Documentation

◆ anonCredentials

gnutls_anon_client_credentials_t Transport::TheConfig::anonCredentials

Definition at line 81 of file Transport.h.

Referenced by Transport::InitTls(), Transport::ShutdownTls(), and tryTlsAnonymous().

◆ caFiles

std::list<std::string> Transport::TheConfig::caFiles

Definition at line 77 of file Transport.h.

Referenced by Transport::InitTls(), and parseCommandOpts().

◆ certCredentials

gnutls_certificate_credentials_t Transport::TheConfig::certCredentials

Definition at line 84 of file Transport.h.

Referenced by Transport::InitTls(), Transport::ShutdownTls(), and tryTlsCertificate().

◆ certFiles

std::list<std::string> Transport::TheConfig::certFiles

Definition at line 74 of file Transport.h.

Referenced by Transport::InitTls(), and parseCommandOpts().

◆ hostname

const char* Transport::TheConfig::hostname

◆ ioTimeout

int Transport::TheConfig::ioTimeout

Definition at line 50 of file Transport.h.

Referenced by main(), parseCommandOpts(), Transport::Read(), and Transport::Write().

◆ localHost

const char* Transport::TheConfig::localHost

Definition at line 53 of file Transport.h.

Referenced by parseCommandOpts(), and resolveDestination().

◆ params

const char* Transport::TheConfig::params

The TLS parameters (list of ciphers, versions, flags) Default is "NORMAL" unless tlsAnonymous is used, in which case it becomes "PERFORMANCE:+ANON-ECDH:+ANON-DH". see http://gnutls.org/manual/html_node/Priority-Strings.html

Definition at line 71 of file Transport.h.

Referenced by loadTlsParameters(), parseCommandOpts(), and TheConfig().

◆ port

uint16_t Transport::TheConfig::port

Definition at line 59 of file Transport.h.

Referenced by parseCommandOpts(), and resolveDestination().

◆ session

◆ tlsAnonymous

bool Transport::TheConfig::tlsAnonymous

Definition at line 65 of file Transport.h.

Referenced by Transport::MaybeStartTls(), and parseCommandOpts().

◆ tlsEnabled

bool Transport::TheConfig::tlsEnabled

The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors