13 #ifndef TUNNELMANAGER_H
14 #define TUNNELMANAGER_H
56 typedef void (*
tunnel_cb) (
char started,
const char * tid,
const char * thingName,
const char * peerName,
57 const char * host, int16_t port, DATETIME startTime, DATETIME endTime,
58 uint64_t bytesSent, uint64_t bytesRcvd,
const char * type,
const char * msg,
void * userdata);
251 char * issuer_cn,
char * issuer_o,
char * issuer_ou);
twActiveTunnelList * twTunnelManager_ListActiveTunnels()
Return a list of the currently active tunnels.
Definition: twTunnelManager.c:1166
DATETIME startTime
Definition: twTunnelManager.h:71
void twTunnelManager_LoadClientCert(char *file)
Loads the local PEM or DER formatted certificate file used to validate the client to the server...
Definition: twTunnelManager.c:1280
char * host
Definition: twTunnelManager.h:69
int twTunnelManager_UpdateTunnelServerInfo(char *host, uint16_t port, char *appkey)
Updates the host, port, and appkey of the tunnels related to connecting to the server.
Definition: twTunnelManager.c:1047
char * tid
Definition: twTunnelManager.h:67
Wrappers for OS-specific functionality.
Linked list structure definition.
Definition: twList.h:46
void twTunnelManager_DisableEncryption(char state)
Passthru to notify the TLS library to disable encryption.
Definition: twTunnelManager.c:1231
Active tunnel structure definition.
Definition: twTunnelManager.h:65
char * peerName
Definition: twTunnelManager.h:68
void twTunnelManager_SetSelfSignedOk(char state)
Passthru to notify the TLS library to accept self-signed certificates.
Definition: twTunnelManager.c:1216
int twTunnelManager_Delete()
Frees all memory associated with the tunnel manager singleton and all its owned substructures.
Definition: twTunnelManager.c:816
int twTunnelManager_StopTunnel(char *id, char *msg)
Shuts down a tunnel.
Definition: twTunnelManager.c:999
void twTunnelManager_LoadCACert(const char *file, int type)
Loads the local PEM or DER formatted certificate file used to validate the server.
Definition: twTunnelManager.c:1271
DATETIME endTime
Definition: twTunnelManager.h:72
struct twActiveTunnel twActiveTunnel
Active tunnel structure definition.
int twTunnelManager_Create()
Creates the tunnel manager singleton.
Definition: twTunnelManager.c:785
void twTunnelManager_SetProxyInfo(char *proxyHost, uint16_t proxyPort, char *proxyUser, char *proxyPass)
Sets the proxy information to be used when making a connection.
Definition: twTunnelManager.c:1196
Default settings for ThingWorx C SDK.
Common definitions for C SDK.
int twTunnelManager_UnregisterTunnelCallback(tunnel_cb cb, char *id, void *userdata)
Unregisters a tunnel callback function that was registered via twTunnelManager_RegisterTunnelCallback...
Definition: twTunnelManager.c:1092
void twTunnelManager_DisableCertValidation(char state)
Passthru to notify the TLS library to not validate the server certificate.
Definition: twTunnelManager.c:1226
int twTunnelManager_StopAllTunnels()
Shuts down all tunnels.
Definition: twTunnelManager.c:1034
char * type
Definition: twTunnelManager.h:73
void twTunnelManager_SetX509Fields(char *subject_cn, char *subject_o, char *subject_ou, char *issuer_cn, char *issuer_o, char *issuer_ou)
Defines which fields of an X509 certificate will be validated. NULL parameteres will not be checked a...
Definition: twTunnelManager.c:1236
char * thingName
Definition: twTunnelManager.h:66
uint16_t port
Definition: twTunnelManager.h:70
int twTunnelManager_RegisterTunnelCallback(tunnel_cb cb, char *id, void *userdata)
Registers a function to be called when a tunnel state changes.
Definition: twTunnelManager.c:1071
void twTunnelManager_SetClientKey(const char *file, char *passphrase, int type)
Sets the key of the client.
Definition: twTunnelManager.c:1289
void twTunnelManager_TaskerFunction(DATETIME now, void *params)
Executes all functions required for proper operation of tunnels.
Definition: twTunnelManager.c:820
void(* tunnel_cb)(char started, const char *tid, const char *thingName, const char *peerName, const char *host, int16_t port, DATETIME startTime, DATETIME endTime, uint64_t bytesSent, uint64_t bytesRcvd, const char *type, const char *msg, void *userdata)
Signature of a callback function that is registered to be called when a tunnel state changes...
Definition: twTunnelManager.h:56
void twTunnelManager_EnableFipsMode(char state)
Passthru to enable FIPS mode for TLS providers that support to.
Definition: twTunnelManager.c:1221