Speedify SDK for Desktop  14.8.0
Data Structures | Typedefs | Enumerations | Functions
types.h File Reference
#include "sdkdefines.h"
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include <netinet/ip.h>
#include <arpa/inet.h>

Data Structures

struct  SpeedifySDK_CreateSettings
 SDK creation settings structure. More...
 
struct  SpeedifySDK_Version
 Version structure. More...
 
struct  SpeedifySDK_ServerInformation
 Detailed information about a server. More...
 
struct  SpeedifySDK_AccountingData
 Data on an account. More...
 
struct  SpeedifySDK_AdapterUsageData
 Information about the data usage and limits of a network adapter. More...
 
struct  SpeedifySDK_AdapterData
 Information about a network adapter. More...
 
struct  SpeedifySDK_ServerSettings
 Automatic server selection method settings. More...
 
struct  SpeedifySDK_ProtocolPortPair
 A protocol/port pair. More...
 
struct  SpeedifySDK_Subnet
 A subnet. More...
 
struct  SpeedifySDK_PerConnectionEncryption
 Adapter setting for per-connection encryption. More...
 
struct  SpeedifySDK_PerConnectionExposeDscp
 Adapter setting for per-connection expose DSCP. More...
 
struct  SpeedifySDK_PerConnectionParallelSockets
 Adapter setting for per-connection parallel sockets. More...
 
struct  SpeedifySDK_Settings
 Speedify settings. More...
 
struct  SpeedifySDK_PrivacySettings
 Privacy settings. More...
 
struct  SpeedifySDK_ConnectionStats
 Statistics about a connection. More...
 
struct  SpeedifySDK_ConnectionStatsGroup
 A grouping of ConnectionStats. More...
 
struct  SpeedifySDK_TunStats
 Contains stats regarding the TUN, for use in session stats. More...
 
struct  SpeedifySDK_HandlerStats
 Contains stats regarding the packet handler, for use in session stats. More...
 
struct  SpeedifySDK_CaptivePortalStats
 Contains stats regarding the captive portal. More...
 
struct  SpeedifySDK_StreamingSessionStats
 Contains session stats regarding streaming mode. More...
 
struct  SpeedifySDK_SessionStats
 Statistics for a period. More...
 
struct  SpeedifySDK_SessionStatPeriods
 Statistics for sessions over various time periods. More...
 
struct  SpeedifySDK_LocalProxyDomainWatchlistItem
 Local proxy domain watchlist item. More...
 
struct  SpeedifySDK_LocalProxySettings
 Settings for the local proxy. More...
 
struct  SpeedifySDK_StreamingSettings
 Settings for the priority streaming. More...
 
struct  SpeedifySDK_FirewallSettings
 Firewall settings. More...
 
struct  SpeedifySDK_StreamStats
 Statistics for a single stream. More...
 
struct  SpeedifySDK_StreamingStats
 Streaming mode stats. More...
 
struct  SpeedifySDK_DisconnectEvent
 Information about a disconnect event. More...
 
struct  SpeedifySDK_DaemonLogSettings
 Settings for logging in the daemon. More...
 
struct  SpeedifySDK_DirectorySettings
 Directory settings. More...
 
struct  SpeedifySDK_SpeedTestResultData
 Results of a speed test. More...
 
struct  SpeedifySDK_NetworkSharingSettings
 Network sharing settings. More...
 
struct  SpeedifySDK_NetworkSharingUsage
 Network sharing usage data. More...
 
struct  SpeedifySDK_NetworkSharingConnection
 Network sharing connection. More...
 
struct  SpeedifySDK_NetworkSharePeer
 Represents a network share peer. More...
 

Typedefs

typedef char SpeedifySDK_IPAddressString[SPEEDIFYSDK_MAX_IP_STRING_LENGTH]
 String representation of an IP address. More...
 
typedef char SpeedifySDK_DomainString[SPEEDIFYSDK_MAX_DOMAIN_LENGTH]
 String representation of a domain or hostname. More...
 
typedef char SpeedifySDK_AppNameString[SPEEDIFYSDK_MAX_APP_NAME_LENGTH]
 String representation of a SDK App name. More...
 
typedef SpeedifySDK_ServerInformation SpeedifySDK_ServerInformationDetailed
 Information about a. More...
 
typedef SpeedifySDK_ProtocolPortPair SpeedifySDK_ForwardedPort
 A forwarded port. More...
 
typedef char SpeedifySDK_HostnameString[SPEEDIFYSDK_MAX_HOSTNAME_LENGTH]
 String representation of an IP address. More...
 
typedef SpeedifySDK_ProtocolPortPair SpeedifySDK_LocalProxyPort
 A proxied port. More...
 
typedef SpeedifySDK_ProtocolPortPair SpeedifySDK_StreamingPort
 A streaming port. More...
 
typedef SpeedifySDK_ProtocolPortPair SpeedifySDK_FirewallPort
 A firewall port. More...
 
typedef char SpeedifySDK_NetworkSharingConnectCode[SPEEDIFYSDK_MAX_NETWORKSHARING_CONNECT_CODE_LENGTH]
 Connect code for network sharing. More...
 
typedef char SpeedifySDK_NetworkSharingDisplayName[SPEEDIFYSDK_MAX_NETWORKSHARING_DISPLAY_NAME_LENGTH]
 The public display name for this device. More...
 
typedef char SpeedifySDK_NetworkSharingPeerUuid[SPEEDIFYSDK_NETWORKSHARING_PEER_UUID_LENGTH]
 Peer UUID for network sharing peer data. More...
 

Enumerations

enum  SpeedifySDK_State {
  STATE_LOGGED_OUT, STATE_LOGGING_IN, STATE_LOGGED_IN, STATE_AUTO_CONNECTING,
  STATE_CONNECTING, STATE_DISCONNECTING, STATE_CONNECTED, STATE_OVERLIMIT,
  STATE_UNKNOWN
}
 State of the VPN. More...
 
enum  SpeedifySDK_AutoConnectMethod {
  ACM_CLOSEST, ACM_CLOSESTPRIVATE, ACM_CLOSESTPUBLIC, ACM_LAST,
  ACM_P2P, ACM_BYSETTING, ACM_COUNTRYCITYSERVER, ACM_EXACT,
  ACM_PROXY, ACM_IGNORELAST
}
 Methods for automatic server selection. More...
 
enum  SpeedifySDK_AccountPaymentType { APT_FREE, APT_MONTHLY, APT_YEARLY }
 Information on an account's payment type. More...
 
enum  SpeedifySDK_ConnectionState { CSTATE_DISCONNECTED, CSTATE_CONNECTING, CSTATE_CONNECTED }
 State of Speedify on a given connection (network adapter). More...
 
enum  SpeedifySDK_NetworkType {
  NETWORKTYPE_WIFI, NETWORKTYPE_ETHERNET, NETWORKTYPE_CELLULAR, NETWORKTYPE_VPN,
  NETWORKTYPE_LOOPBACK, NETWORKTYPE_BLUETOOTH, NETWORKTYPE_NETWORKSHARE_CLIENT, NETWORKTYPE_NETWORKSHARE_HOST,
  NETWORKTYPE_UNKNOWN
}
 Type of network adapter. More...
 
enum  SpeedifySDK_ConnectionPriority {
  CP_ALWAYS, CP_SECONDARY, CP_BACKUP, CP_NEVER,
  CP_AUTOMATIC
}
 How a connection should be combined. More...
 
enum  SpeedifySDK_BondingMode { BMODE_SPEED, BMODE_REDUNDANT, BMODE_STREAMING }
 Mode of the VPN tunnel. More...
 
enum  SpeedifySDK_TransportMode {
  TMODE_TCP, TMODE_UDP, TMODE_AUTO, TMODE_HTTPS,
  TMODE_MULTITCP, TMODE_PROXY, TMODE_SHARE
}
 Transport Protocol modes. More...
 
enum  SpeedifySDK_PortProtocol { PPROTO_TCP, PPROTO_UDP }
 Protocol for ports. More...
 
enum  SpeedifySDK_ErrorType {
  ET_OK = 0, ET_NETWORK = 1, ET_SERVER = 2, ET_CREDENTIAL = 3,
  ET_DIRECTORY = 4, ET_ACCOUNT = 5, ET_RATELIMITED = 6, ET_TOKEN_EXPIRED = 7,
  ET_VPN_ADAPTER = 8, ET_DEVICE_LIMIT = 10, ET_LOCK_TEAM =11, ET_LOCK_ACCOUNT =12,
  ET_INVALID_ARGUMENT =13, ET_SDK_ASYNC = 0xE00, ET_SDK_ERROR = 0xF00, ET_SDK_TIMEOUT,
  ET_SDK_INVALID_ARGUMENT, ET_SDK_CALLBACK_REQUIRED, ET_SDK_PLATFORM_NO_SUPPORT, ET_SDK_NO_CONNECTION,
  ET_SDK_SYNC_FROM_ASYNC, ET_SDK_SETTING_LOCKED_TEAM = ET_LOCK_TEAM, ET_SDK_SETTING_LOCKED_ACCOUNT = ET_LOCK_ACCOUNT
}
 Type classification for errors. More...
 
enum  SpeedifySDK_ProxyMatchMode { PMM_ALLOWLIST, PMM_DENYLIST }
 How local proxy treats matches. More...
 
enum  SpeedifySDK_FirewallMode { FWM_OFF, FWM_ALLOWLIST, FWM_DENYLIST }
 How firewall treats matches. More...
 
enum  SpeedifySDK_StreamHealth { SH_STOPPED, SH_POOR, SH_GOOD }
 Stream health indicator. More...
 
enum  SpeedifySDK_DisconnectReason {
  DR_UNKNOWN, DR_CONNECTIVITY, DR_AIRPLANE, DR_REBOOT,
  DR_UPDATE, DR_CRASH, DR_SLEEP, DR_USERINITIATED,
  DR_TORRENT, DR_SERVICESTOP, DR_STARTTIMEOUT, DR_INACTIVETIMEOUT,
  DR_SETTINGCHANGERECONNECT, DR_DNSTIMEOUT, DR_TUNNELTIMEOUT, DR_OVERQUOTA,
  DR_SAFENETWORK, DR_NONE
}
 Reason for a disconnect. More...
 
enum  SpeedifySDK_LogLevel { LL_VERBOSE, LL_INFO, LL_WARN, LL_ERROR }
 Log levels in the SDK. More...
 
enum  SpeedifySDK_SafeBrowsingError {
  CUJO_OK, CUJO_ERR_NO_ENDPOINT_URL, CUJO_ERR_NOT_CONFIGURED, CUJO_ERR_TIMED_OUT,
  CUJO_ERR_RETRIABLE_SERVER_ERROR, CUJO_ERR_HTTP_STATUS, CUJO_ERR_CURL, CUJO_ERR_NO_MEMORY,
  CUJO_ERR_BAD_FUNCTION_ARGUMENT, CUJO_ERR_PARSE_ERROR, CUJO_ERR_CURL_INIT_FAILURE, CUJO_ERR_CURL_EASY_INIT_FAILURE,
  CUJO_ERR_CURL_HEADER_APPEND_FAILURE, CUJO_ERR_JSON_SET_FAILURE, CUJO_ERR_UV_LOOP_INIT_FAILURE, CUJO_ERR_ALREADY_IN_PROGRESS,
  CUJO_ERR_INVALID_NSP_TOKEN, CUJO_ERR_ON_PROTECTED_NETWORK, CUJO_ERR_ASYNC_INIT_FAILURE, CUJO_ERR_INTERRUPTED_EVENT_LOOP
}
 Safe browsing errors. More...
 
enum  SpeedifySDK_SafeBrowsingLogLevel {
  CUJO_LOG_DEBUG, CUJO_LOG_INFO, CUJO_LOG_ERROR, CUJO_LOG_TRACE,
  CUJO_LOG_WARNING
}
 Log levels in the SDK. More...
 
enum  SpeedifySDK_SafeBrowsingSafeNetworkOverride { SN_OVERRIDE_NONE, SN_OVERRIDE_UNSAFE, SN_OVERRIDE_SAFE }
 Override safe network decisions. More...
 
enum  SpeedifySDK_SpeedTestType { TEST_SPEED, TEST_STREAMING }
 Internal speed test types. More...
 
enum  SpeedifySDK_NetworkSharingPeerRole { PR_CLIENT, PR_HOST }
 peer role More...
 
enum  SpeedifySDK_NetworkSharingPairRequestBehavior { PRB_ASK, PRB_ACCEPT, PRB_REJECT }
 pair request behavior types More...
 
enum  SpeedifySDK_NetworkSharingAutoPairBehavior { APB_MANUAL, APB_AUTO_USER, APB_AUTO_USER_TEAM }
 Auto pair behavior types. More...
 
enum  SpeedifySDK_NetworkSharingPeerStatus { NPS_DISCONNECTED, NPS_UNAUTHENTICATED, NPS_AUTHENTICATED }
 Status of a NetworkSharing Peer Connection. More...
 
enum  SpeedifySDK_NetworkSharingTunnelStatus {
  NTS_INACTIVE, NTS_ACTIVE, NTS_DISABLED_ON_CLIENT, NTS_DISABLED_ON_HOST,
  NTS_NO_NETWORKS, NTS_TUNNEL_ERROR, NTS_NOT_AUTHENTICATED, NTS_NETWORKS_OVERLIMIT,
  NTS_VPN_NOT_CONNECTED, NTS_PAUSED
}
 Status of a NetworkSharing tunnel. More...
 

Functions

void SpeedifySDK_InitializeCreateSettings (SpeedifySDK_CreateSettings *settings)
 Initialize an SpeedifySDK_CreateSettings object to defaults. More...
 
const char * SpeedifySDK_Version_toString (SpeedifySDK_Version state)
 String representation of a SpeedifySDK_Version. More...
 
const char * SpeedifySDK_State_toString (SpeedifySDK_State state)
 String representation of a SpeedifySDK_State. More...
 
const char * SpeedifySDK_AutoConnectMethod_toString (SpeedifySDK_AutoConnectMethod method)
 String representation of a SpeedifySDK_AutoConnectMethod. More...
 
const char * SpeedifySDK_ServerInformation_GetCountryName (SpeedifySDK_ServerInformation server)
 String representation of a SpeedifySDK_ServerInformation's country. More...
 
const char * SpeedifySDK_ServerInformation_GetCityName (SpeedifySDK_ServerInformation server)
 String representation of a SpeedifySDK_ServerInformation's city. More...
 
const char * SpeedifySDK_ServerInformation_toString (SpeedifySDK_ServerInformation server)
 String representation of a SpeedifySDK_ServerInformation. More...
 
const char * SpeedifySDK_ServerInformationDetailed_GetCountryName (SpeedifySDK_ServerInformationDetailed server)
 String representation of a SpeedifySDK_ServerInformationDetailed's country. More...
 
const char * SpeedifySDK_ServerInformationDetailed_GetCityName (SpeedifySDK_ServerInformationDetailed server)
 String representation of a SpeedifySDK_ServerInformationDetailed's city. More...
 
const char * SpeedifySDK_ServerInformationDetailed_toString (SpeedifySDK_ServerInformationDetailed server)
 String representation of a SpeedifySDK_ServerInformationDetailed. More...
 
const char * SpeedifySDK_AccountPaymentType_toString (SpeedifySDK_AccountPaymentType paymentType)
 String representation of a SpeedifySDK_AccountPaymentType. More...
 
const char * SpeedifySDK_ConnectionState_toString (SpeedifySDK_ConnectionState state)
 String representation of a SpeedifySDK_ConnectionState. More...
 
const char * SpeedifySDK_NetworkType_toString (SpeedifySDK_NetworkType type)
 String representation of a SpeedifySDK_NetworkType. More...
 
const char * SpeedifySDK_ConnectionPriority_toString (SpeedifySDK_ConnectionPriority priority)
 String representation of a SpeedifySDK_ConnectionPriority. More...
 
const char * SpeedifySDK_BondingMode_toString (SpeedifySDK_BondingMode priority)
 String representation of a SpeedifySDK_BondingMode. More...
 
const char * SpeedifySDK_TransportMode_toString (SpeedifySDK_TransportMode priority)
 String representation of a SpeedifySDK_TransportMode. More...
 
const char * SpeedifySDK_PortProtocol_toString (SpeedifySDK_PortProtocol portProto)
 String representation of a SpeedifySDK_PortProtocol. More...
 
const char * SpeedifySDK_ErrorType_toString (SpeedifySDK_ErrorType error)
 String representation of a SpeedifySDK_ErrorType. More...
 
const char * SpeedifySDK_ProxyMatchMode_toString (SpeedifySDK_ProxyMatchMode matchMode)
 String representation of a SpeedifySDK_ProxyMatchMode. More...
 
const char * SpeedifySDK_FirewallMode_toString (SpeedifySDK_FirewallMode matchMode)
 String representation of a SpeedifySDK_ProxyMatchMode. More...
 
const char * SpeedifySDK_StreamHealth_toString (SpeedifySDK_StreamHealth health)
 String representation of a SpeedifySDK_StreamHealth. More...
 
const char * SpeedifySDK_DisconnectReason_toString (SpeedifySDK_DisconnectReason reason)
 
const char * SpeedifySDK_LogLevel_toString (SpeedifySDK_LogLevel level)
 
const char * SpeedifySDK_SafeBrowsing_LogLevel_toString (SpeedifySDK_SafeBrowsingLogLevel level)
 
const char * SpeedifySDK_SafeBrowsing_SafeNetworkOverride_toString (SpeedifySDK_SafeBrowsingSafeNetworkOverride level)
 
const char * SpeedifySDK_SpeedTestType_toString (SpeedifySDK_SpeedTestType type)
 String representation of a SpeedifySDK_SpeedTestType. More...
 
const char * SpeedifySDK_NetworkSharingPeerRole_toString (SpeedifySDK_NetworkSharingPeerRole role)
 String representation of a SpeedifySDK_NetworkSharingPeerRole. More...
 
const char * SpeedifySDK_NetworkSharingPairRequestBehavior_toString (SpeedifySDK_NetworkSharingPairRequestBehavior behavior)
 String representation of a SpeedifySDK_NetworkSharingPairRequestBehavior. More...
 
const char * SpeedifySDK_NetworkSharingAutoPairBehavior_toString (SpeedifySDK_NetworkSharingAutoPairBehavior behavior)
 String representation of a SpeedifySDK_NetworkSharingAutoPairBehavior. More...
 
const char * SpeedifySDK_NetworkSharingPeerStatus_toString (SpeedifySDK_NetworkSharingPeerStatus status)
 String representation of a SpeedifySDK_NetworkSharingTunnelStatus. More...
 
const char * SpeedifySDK_NetworkSharingTunnelStatus_toString (SpeedifySDK_NetworkSharingTunnelStatus status)
 String representation of a SpeedifySDK_NetworkSharingTunnelStatus. More...
 

Typedef Documentation

◆ SpeedifySDK_NetworkSharingConnectCode

typedef char SpeedifySDK_NetworkSharingConnectCode[SPEEDIFYSDK_MAX_NETWORKSHARING_CONNECT_CODE_LENGTH]

Connect code for network sharing.

Since
14.0

◆ SpeedifySDK_NetworkSharingDisplayName

typedef char SpeedifySDK_NetworkSharingDisplayName[SPEEDIFYSDK_MAX_NETWORKSHARING_DISPLAY_NAME_LENGTH]

The public display name for this device.

Since
14.0

◆ SpeedifySDK_NetworkSharingPeerUuid

typedef char SpeedifySDK_NetworkSharingPeerUuid[SPEEDIFYSDK_NETWORKSHARING_PEER_UUID_LENGTH]

Peer UUID for network sharing peer data.

Since
14.0

Enumeration Type Documentation

◆ SpeedifySDK_NetworkSharingAutoPairBehavior

Auto pair behavior types.

Since
14.8
Enumerator
APB_MANUAL 

no automatic pairing

Since
14.8
APB_AUTO_USER 

Automatically pair with devices from the same user.

Since
14.8
APB_AUTO_USER_TEAM 

Automatically pair with devices from the same user and/or team.

Since
14.8

◆ SpeedifySDK_NetworkSharingPairRequestBehavior

pair request behavior types

Since
14.0
Enumerator
PRB_ASK 

always ask

Since
14.0
PRB_ACCEPT 

automatically accept

Since
14.0
PRB_REJECT 

automatically reject

Since
14.0

◆ SpeedifySDK_NetworkSharingPeerRole

peer role

Since
14.0
Enumerator
PR_CLIENT 

client

Since
14.0
PR_HOST 

host

Since
14.0

◆ SpeedifySDK_NetworkSharingPeerStatus

Status of a NetworkSharing Peer Connection.

Since
14.0
Enumerator
NPS_DISCONNECTED 

The connection is disconnected.

Since
14.0
NPS_UNAUTHENTICATED 

connected, but not authenticated

Since
14.0
NPS_AUTHENTICATED 

connected and authenticated

Since
14.0

◆ SpeedifySDK_NetworkSharingTunnelStatus

Status of a NetworkSharing tunnel.

Since
14.0
Enumerator
NTS_INACTIVE 

No active tunnels.

Since
14.0
NTS_ACTIVE 

active tunnels

Since
14.0
NTS_DISABLED_ON_CLIENT 

disallowed on client

Since
14.0
NTS_DISABLED_ON_HOST 

disallowed on host

Since
14.0
NTS_NO_NETWORKS 

no networks available

Since
14.0
NTS_TUNNEL_ERROR 

general error

Since
14.0
NTS_NOT_AUTHENTICATED 

not authenticated

Since
14.0
NTS_NETWORKS_OVERLIMIT 

All networks are over data limit.

Since
14.0
NTS_VPN_NOT_CONNECTED 

Host's VPN not connected.

Since
14.0
NTS_PAUSED 

Active but paused.

Since
14.7

◆ SpeedifySDK_SafeBrowsingLogLevel

Log levels in the SDK.

Since
10.8
Enumerator
CUJO_LOG_DEBUG 
CUJO_LOG_INFO 
CUJO_LOG_ERROR 
CUJO_LOG_TRACE 
Since
11.2.2
CUJO_LOG_WARNING 
Since
11.4

◆ SpeedifySDK_SafeBrowsingSafeNetworkOverride

Override safe network decisions.

Since
11.1
Enumerator
SN_OVERRIDE_NONE 
SN_OVERRIDE_UNSAFE 
SN_OVERRIDE_SAFE 

◆ SpeedifySDK_SpeedTestType

Internal speed test types.

Since
11.5
Enumerator
TEST_SPEED 
TEST_STREAMING 

Function Documentation

◆ SpeedifySDK_NetworkSharingAutoPairBehavior_toString()

const char* SpeedifySDK_NetworkSharingAutoPairBehavior_toString ( SpeedifySDK_NetworkSharingAutoPairBehavior  behavior)

String representation of a SpeedifySDK_NetworkSharingAutoPairBehavior.

Since
14.8

◆ SpeedifySDK_NetworkSharingPairRequestBehavior_toString()

const char* SpeedifySDK_NetworkSharingPairRequestBehavior_toString ( SpeedifySDK_NetworkSharingPairRequestBehavior  behavior)

String representation of a SpeedifySDK_NetworkSharingPairRequestBehavior.

Since
14.0

◆ SpeedifySDK_NetworkSharingPeerRole_toString()

const char* SpeedifySDK_NetworkSharingPeerRole_toString ( SpeedifySDK_NetworkSharingPeerRole  role)

String representation of a SpeedifySDK_NetworkSharingPeerRole.

Since
14.0

◆ SpeedifySDK_NetworkSharingPeerStatus_toString()

const char* SpeedifySDK_NetworkSharingPeerStatus_toString ( SpeedifySDK_NetworkSharingPeerStatus  status)

String representation of a SpeedifySDK_NetworkSharingTunnelStatus.

Since
14.0

◆ SpeedifySDK_NetworkSharingTunnelStatus_toString()

const char* SpeedifySDK_NetworkSharingTunnelStatus_toString ( SpeedifySDK_NetworkSharingTunnelStatus  status)

String representation of a SpeedifySDK_NetworkSharingTunnelStatus.

Since
14.0

◆ SpeedifySDK_SafeBrowsing_LogLevel_toString()

const char* SpeedifySDK_SafeBrowsing_LogLevel_toString ( SpeedifySDK_SafeBrowsingLogLevel  level)

◆ SpeedifySDK_SafeBrowsing_SafeNetworkOverride_toString()

const char* SpeedifySDK_SafeBrowsing_SafeNetworkOverride_toString ( SpeedifySDK_SafeBrowsingSafeNetworkOverride  level)

◆ SpeedifySDK_SpeedTestType_toString()

const char* SpeedifySDK_SpeedTestType_toString ( SpeedifySDK_SpeedTestType  type)

String representation of a SpeedifySDK_SpeedTestType.

Since
11.5