9#ifndef SQUID_TOOLS_SQUIDCLIENT_TRANSPORT_H
10#define SQUID_TOOLS_SQUIDCLIENT_TRANSPORT_H
14#if HAVE_GNUTLS_GNUTLS_H
15#include <gnutls/gnutls.h>
112ssize_t
Write(
const void *buf,
size_t len);
116ssize_t
Read(
void *buf,
size_t len);
parameters controlling outgoing connection
const char * localHost
the local hostname to bind as for outgoing IP
gnutls_session_t session
TLS session state.
int ioTimeout
I/O operation timeout.
void usage()
display Transport Options command line help to stderr
gnutls_certificate_credentials_t certCredentials
bool tlsEnabled
whether to enable TLS on the server connection
gnutls_anon_client_credentials_t anonCredentials
anonymous client credentials
bool parseCommandOpts(int argc, char *argv[], int c, int &optIndex)
std::list< std::string > certFiles
const char * hostname
the destination server host name to contact
std::list< std::string > caFiles
bool tlsAnonymous
whether to do anonymous TLS (non-authenticated)
uint16_t port
port on the server to contact
ssize_t Read(void *buf, size_t len)
bool MaybeStartTls(const char *hostname)
void ShutdownTls()
De-initialize TLS library environment when necessary.
ssize_t Write(const void *buf, size_t len)
void InitTls()
Initialize TLS library environment when necessary.
bool Connect()
locate and connect to the configured server
void CloseConnection()
close the current connection