Telematics SDK - Interface Specification  v1.46.10

Data Structures

struct  telux::data::net::BridgeInfo
 
class  telux::data::net::IBridgeManager
 IBridgeManager provides APIs to enable/disable and set/get/delete software bridges for various WLAN and Ethernet interfaces. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::IBridgeListener
 
class  telux::data::net::IFirewallManager
 FirewallManager is a primary interface that filters and controls the network traffic on a pre-configured set of rules. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::IFirewallEntry
 Firewall entry class is used for configuring firewall rules. More...
 
class  telux::data::net::IFirewallListener
 
struct  telux::data::net::L2tpSessionConfig
 
struct  telux::data::net::L2tpTunnelConfig
 
struct  telux::data::net::L2tpSysConfig
 
class  telux::data::net::IL2tpManager
 L2tpManager is a primary interface for configuring L2TP Service. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::IL2tpListener
 
struct  telux::data::net::NatConfig
 
class  telux::data::net::INatManager
 NatManager is a primary interface for configuring static network address translation(SNAT) and DMZ (demilitarized zone). It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::INatListener
 
class  telux::data::net::ISocksManager
 SocksManager is a primary interface for configuring legacy Socks proxy server. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::ISocksListener
 
class  telux::data::net::IVlanManager
 VlanManager is a primary interface for configuring VLAN (Virtual Local Area Network). it provide APIs for create, query, remove VLAN interfaces and associate or disassociate with profile IDs. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready. More...
 
class  telux::data::net::IVlanListener
 

Typedefs

using telux::data::net::BridgeInfoResponseCb = std::function< void(const std::vector< BridgeInfo > &infos, telux::common::ErrorCode error)>
 
using telux::data::net::FirewallStatusCb = std::function< void(bool enable, bool allowPackets, telux::common::ErrorCode error)>
 
using telux::data::net::FirewallEntriesCb = std::function< void(std::vector< std::shared_ptr< IFirewallEntry >> entries, telux::common::ErrorCode error)>
 
using telux::data::net::DmzEntriesCb = std::function< void(std::vector< std::string > dmzEntries, telux::common::ErrorCode error)>
 
using telux::data::net::L2tpConfigCb = std::function< void(const L2tpSysConfig &l2tpSysConfig, telux::common::ErrorCode error)>
 
using telux::data::net::StaticNatEntriesCb = std::function< void(const std::vector< NatConfig > &snatEntries, telux::common::ErrorCode error)>
 
using telux::data::net::CreateVlanCb = std::function< void(bool isAccelerated, telux::common::ErrorCode error)>
 
using telux::data::net::QueryVlanResponseCb = std::function< void(const std::vector< VlanConfig > &configs, telux::common::ErrorCode error)>
 
using telux::data::net::VlanMappingResponseCb = std::function< void(const std::list< std::pair< int, int >> &mapping, telux::common::ErrorCode error)>
 

Enumerations

enum  telux::data::net::BridgeIFaceType { telux::data::net::BridgeIFaceType::UNKNOWN = 0, telux::data::net::BridgeIFaceType::WLAN_AP = 1, telux::data::net::BridgeIFaceType::WLAN_STA = 2, telux::data::net::BridgeIFaceType::ETH = 3 }
 
enum  telux::data::net::L2tpProtocol { telux::data::net::L2tpProtocol::NONE = 0, telux::data::net::L2tpProtocol::IP = 0x01, telux::data::net::L2tpProtocol::UDP = 0x02 }
 

Detailed Description

This section contains APIs related to data network configuration.


Data Structure Documentation

struct telux::data::net::BridgeInfo

Structure to configure a software bridge for an interface

Data Fields
string ifaceName

Interface name

BridgeIFaceType ifaceType

Interface type

uint32_t bandwidth

Bandwidth(in Mbps) required for software bridge

class telux::data::net::IBridgeManager

IBridgeManager provides APIs to enable/disable and set/get/delete software bridges for various WLAN and Ethernet interfaces. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status enableBridge (bool enable, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status addBridge (BridgeInfo config, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status requestBridgeInfo (BridgeInfoResponseCb callback)=0
 
virtual telux::common::Status removeBridge (std::string ifaceName, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IBridgeListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IBridgeListener > listener)=0
 
virtual ~IBridgeManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IBridgeManager::~IBridgeManager ( )
virtual

Destructor for IBridgeManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::IBridgeManager::getServiceStatus ( )
pure virtual

Checks the status of Bridge manager and returns the result.

Returns
SERVICE_AVAILABLE If Bridge manager object is ready for service. SERVICE_UNAVAILABLE If Bridge manager object is temporarily unavailable. SERVICE_FAILED If Bridge manager object encountered an irrecoverable failure.
virtual bool telux::data::net::IBridgeManager::isSubsystemReady ( )
pure virtual

Checks if the Bridge manager subsystem is ready.

Returns
True if the Bridge Manager is ready for service, otherwise returns false.
Deprecated:
Use getServiceStatus API.
virtual std::future<bool> telux::data::net::IBridgeManager::onSubsystemReady ( )
pure virtual

Wait for Bridge manager subsystem to be ready.

Returns
A future that caller can wait until the Bridge Manager succeed/fail to be ready.
Deprecated:
Use InitResponseCb callback in factory API getBridgeManager.
virtual telux::common::Status telux::data::net::IBridgeManager::enableBridge ( bool  enable,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Enable/Disable the software bridge in the system. It will affect all the configured software bridges for various interfaces.

Parameters
[in]enableTRUE to enable, FALSE to disable the bridge
[in]callbackOptional callback to get the response for enableBridge
Returns
Status of enableBridge request i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IBridgeManager::addBridge ( BridgeInfo  config,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Add software bridge configuration for an interface.

Parameters
[in]configconfiguration for an interface
[in]callbackOptional callback to get the response for addBridge
Returns
Status of addBridge request i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IBridgeManager::requestBridgeInfo ( BridgeInfoResponseCb  callback)
pure virtual

Request information about all the software bridge configurations in the system

Parameters
[in]callbackResponse callback with list of bridge configurations
Returns
Status of requestBridgeInfo request i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IBridgeManager::removeBridge ( std::string  ifaceName,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Delete a software bridge configuration for an interface.

Parameters
[in]ifaceNameName of the interface whose configuration needs to be deleted
[in]callbackOptional callback to get the response for removeBridge
Returns
Status of removeBridge request i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IBridgeManager::registerListener ( std::weak_ptr< IBridgeListener listener)
pure virtual

Register Bridge Manager as listener for Data Service heath events like data service available or data service not available.

Parameters
[in]listenerpointer of IBridgeListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::IBridgeManager::deregisterListener ( std::weak_ptr< IBridgeListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of IBridgeListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
class telux::data::net::IBridgeListener

Interface for Bridge listener object. Client needs to implement this interface to get access to Bridge services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual ~IBridgeListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IBridgeListener::~IBridgeListener ( )
virtual

Destructor for IBridgeListener

Member Function Documentation

virtual void telux::data::net::IBridgeListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
class telux::data::net::IFirewallManager

FirewallManager is a primary interface that filters and controls the network traffic on a pre-configured set of rules. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status setFirewall (int profileId, bool enable, bool allowPackets, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status requestFirewallStatus (int profileId, FirewallStatusCb callback, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status addFirewallEntry (int profileId, std::shared_ptr< IFirewallEntry > entry, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status requestFirewallEntries (int profileId, FirewallEntriesCb callback, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status removeFirewallEntry (int profileId, uint32_t handle, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status enableDmz (int profileId, const std::string ipAddr, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status disableDmz (int profileId, const telux::data::IpFamilyType ipType, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status requestDmzEntry (int profileId, DmzEntriesCb dmzCb, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IFirewallListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IFirewallListener > listener)=0
 
virtual telux::data::OperationType getOperationType ()=0
 
virtual ~IFirewallManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IFirewallManager::~IFirewallManager ( )
virtual

Destructor for IFirewallManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::IFirewallManager::getServiceStatus ( )
pure virtual

Checks the status of Firewall manager and returns the result.

Returns
SERVICE_AVAILABLE If Firewall manager object is ready for service. SERVICE_UNAVAILABLE If Firewall manager object is temporarily unavailable. SERVICE_FAILED If Firewall manager object encountered an irrecoverable failure.
virtual bool telux::data::net::IFirewallManager::isSubsystemReady ( )
pure virtual

Checks if the Firewall manager subsystem is ready.

Returns
True if Firewall Manager is ready for service, otherwise returns false.
Deprecated:
Use getServiceStatus API.
virtual std::future<bool> telux::data::net::IFirewallManager::onSubsystemReady ( )
pure virtual

Wait for Firewall manager subsystem to be ready.

Returns
A future that caller can wait on to be notified when firewall manager is ready.
Deprecated:
Use InitResponseCb callback in factory API getFirewallManager.
virtual telux::common::Status telux::data::net::IFirewallManager::setFirewall ( int  profileId,
bool  enable,
bool  allowPackets,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Sets firewall configuration to enable or disable and update configuration to drop or accept the packets matching the rules.

Parameters
[in]profileIdProfile identifier on which firewall will be set.
[in]enableIndicates whether the firewall is enabled
[in]allowPacketsIndicates whether to accept or drop packets matching the rules
[in]callbackoptional callback to get the response setFirewall
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of setFirewall i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::requestFirewallStatus ( int  profileId,
FirewallStatusCb  callback,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Request status of firewall

Parameters
[in]profileIdProfile identifier for which firewall status is requested.
[in]callbackcallback to get the response of requestFirewallStatus
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of requestFirewallStatus i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::addFirewallEntry ( int  profileId,
std::shared_ptr< IFirewallEntry entry,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Adds the firewall rule

Parameters
[in]profileIdProfile identifier on which firewall rule will be added.
[in]entryFirewall entry based on protocol type
[in]callbackoptional callback to get the response addFirewallEntry
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of addFirewallEntry i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::requestFirewallEntries ( int  profileId,
FirewallEntriesCb  callback,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Request Firewall rules

Parameters
[in]profileIdProfile identifier on which firewall entries are retrieved.
[in]callbackcallback to get the response requestFirewallEntries.
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of requestFirewallEntries i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::removeFirewallEntry ( int  profileId,
uint32_t  handle,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Remove firewall entry

Parameters
[in]profileIdProfile identifier on which firewall entry will be removed.
[in]handlehandle of Firewall entry to be removed. To retrieve the handle, first use requestFirewallEntries() to get the list of entries added in the system. And then use IFirewallEntry::getHandle()
[in]callbackcallback to get the response removeFirewallEntry
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of removeFirewallEntry i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::enableDmz ( int  profileId,
const std::string  ipAddr,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Enable demilitarized zone (DMZ)

Parameters
[in]profileIdProfile identifier on which DMZ will be enabled.
[in]ipAddrIP address for which DMZ will be enabled
[in]callbackoptional callback to get the response addDmz
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of enableDmz i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::disableDmz ( int  profileId,
const telux::data::IpFamilyType  ipType,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Disable demilitarized zone (DMZ)

Parameters
[in]profileIdProfile identifier on which DMZ will be disabled.
[in]ipTypeSpecify IP type of the DMZ to be disabled
[in]callbackoptional callback to get the response removeDmz
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of disableDmz i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::requestDmzEntry ( int  profileId,
DmzEntriesCb  dmzCb,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Request DMZ entry that was previously set using enableDmz API

Parameters
[in]profileIdProfile identifier on which DMZ entries are requested.
[in]dmzCbcallback to get the response requestDmzEntry
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of requestDmzEntry i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IFirewallManager::registerListener ( std::weak_ptr< IFirewallListener listener)
pure virtual

Register Firewall Manager as listener for Data Service heath events like data service available or data service not available.

Parameters
[in]listenerpointer of IFirewallListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::IFirewallManager::deregisterListener ( std::weak_ptr< IFirewallListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of IFirewallListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
virtual telux::data::OperationType telux::data::net::IFirewallManager::getOperationType ( )
pure virtual

Get the associated operation type for this instance.

Returns
OperationType of getOperationType i.e. LOCAL or REMOTE.
class telux::data::net::IFirewallEntry

Firewall entry class is used for configuring firewall rules.

Public Member Functions

virtual std::shared_ptr< IIpFiltergetIProtocolFilter ()=0
 
virtual telux::data::Direction getDirection ()=0
 
virtual telux::data::IpFamilyType getIpFamilyType ()=0
 
virtual uint32_t getHandle ()=0
 
virtual ~IFirewallEntry ()
 

Static Public Attributes

static const uint32_t INVALID_HANDLE = 0
 

Constructor & Destructor Documentation

virtual telux::data::net::IFirewallEntry::~IFirewallEntry ( )
virtual

Destructor for IFirewallEntry

Member Function Documentation

virtual std::shared_ptr<IIpFilter> telux::data::net::IFirewallEntry::getIProtocolFilter ( )
pure virtual

Get IProtocol filter type

Returns
telux::data::IIpFilter.
virtual telux::data::Direction telux::data::net::IFirewallEntry::getDirection ( )
pure virtual

Get firewall direction

Returns
telux::data::Direction.
virtual telux::data::IpFamilyType telux::data::net::IFirewallEntry::getIpFamilyType ( )
pure virtual

Get Ip FamilyType

Returns
telux::data::IpFamilyType.
virtual uint32_t telux::data::net::IFirewallEntry::getHandle ( )
pure virtual

Get the unique handle identifying this Firewall entry in the system

Returns
uint32_t handle if initialized or INVALID_HANDLE otherwise

Field Documentation

const uint32_t telux::data::net::IFirewallEntry::INVALID_HANDLE = 0
static
class telux::data::net::IFirewallListener

Interface for Firewall listener object. Client needs to implement this interface to get access to Firewall services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual ~IFirewallListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IFirewallListener::~IFirewallListener ( )
virtual

Destructor for IFirewallListener

Member Function Documentation

virtual void telux::data::net::IFirewallListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
struct telux::data::net::L2tpSessionConfig

L2TP tunnel sessions configuration

Data Fields
uint32_t locId

Local session id

uint32_t peerId

Peer session id

struct telux::data::net::L2tpTunnelConfig

L2TP tunnel configuration

Data Fields
L2tpProtocol prot

Encapsulation protocols

uint32_t locId

Local tunnel id

uint32_t peerId

Peer tunnel id

uint32_t localUdpPort

Local udp port - if UDP encapsulation is used

uint32_t peerUdpPort

Peer udp port - if IP encapsulation is used

string peerIpv6Addr

Peer IPv6 Address - for Ipv6 tunnels

string peerIpv4Addr

Peer IPv4 Address - for Ipv4 tunnels

string locIface

interface name to create L2TP tunnel on

IpFamilyType ipType

Ip family type telux::data::IpFamilyType

vector< L2tpSessionConfig > sessionConfig

List of L2tp tunnel sessions

struct telux::data::net::L2tpSysConfig

L2TP Configuration

Data Fields
vector< L2tpTunnelConfig > configList

List of L2tp tunnel configurations

bool enableMtu

Enable MTU size setting on underlying interfaces to avoid segmentation

bool enableTcpMss

Enable TCP MSS clampping on L2TP interfaces to avoid segmentation

uint32_t mtuSize

Current MTU size in bytes

class telux::data::net::IL2tpManager

L2tpManager is a primary interface for configuring L2TP Service. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status setConfig (bool enable, bool enableMss, bool enableMtu, telux::common::ResponseCallback callback=nullptr, uint32_t mtuSize=0)=0
 
virtual telux::common::Status addTunnel (const L2tpTunnelConfig &l2tpTunnelConfig, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status requestConfig (L2tpConfigCb l2tpConfigCb)=0
 
virtual telux::common::Status removeTunnel (uint32_t tunnelId, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IL2tpListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IL2tpListener > listener)=0
 
virtual ~IL2tpManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IL2tpManager::~IL2tpManager ( )
virtual

Destructor for IL2tpManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::IL2tpManager::getServiceStatus ( )
pure virtual

Checks the status of L2tp manager and returns the result.

Returns
SERVICE_AVAILABLE If L2tp manager is ready for service. SERVICE_UNAVAILABLE If L2tp manager is temporarily unavailable. SERVICE_FAILED - If L2tp manager encountered an irrecoverable failure.
virtual bool telux::data::net::IL2tpManager::isSubsystemReady ( )
pure virtual

Checks if the L2tp manager subsystem is ready.

Returns
True if L2tp Manager is ready for service, otherwise returns false.
Note
This API will be deprecated. getServiceStatus API is recommended as an alternative
virtual std::future<bool> telux::data::net::IL2tpManager::onSubsystemReady ( )
pure virtual

Wait for L2tp manager subsystem to be ready.

Returns
A future that caller can wait on to be notified when L2tp manager is ready.
Note
This API will be deprecated. Callback of type InitResponseCb argument in data factory API getL2tpManager is recommended as an alternative.
virtual telux::common::Status telux::data::net::IL2tpManager::setConfig ( bool  enable,
bool  enableMss,
bool  enableMtu,
telux::common::ResponseCallback  callback = nullptr,
uint32_t  mtuSize = 0 
)
pure virtual

Enable L2TP for unmanaged Tunnel State

Parameters
[in]enableEnable/Disable L2TP for unmanaged tunnels.
[in]enableMssEnable/Disable TCP MSS to be clamped on L2TP interfaces to avoid Segmentation
[in]enableMtuEnable/Disable MTU size to be set on underlying interfaces to avoid fragmentation
[in]callbackoptional callback to get the response setConfig
[in]mtuSizeoptional MTU size in bytes. If not set, MTU size will be set to default 1422 bytes
Returns
Status of setConfig i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IL2tpManager::addTunnel ( const L2tpTunnelConfig l2tpTunnelConfig,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Set L2TP Configuration for one tunnel

Parameters
[in]l2tpTunnelConfigConfiguration to be set telux::net::L2tpTunnelConfig
[in]callbackOptional callback to get the response addTunnel
Returns
Status of addTunnel i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IL2tpManager::requestConfig ( L2tpConfigCb  l2tpConfigCb)
pure virtual

Get Current L2TP Configuration

Parameters
[in]l2tpConfigCbAsynchronous callback to get current L2TP configurations
Returns
Status of requestConfig i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IL2tpManager::removeTunnel ( uint32_t  tunnelId,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Remove L2TP Tunnel

Parameters
[in]tunnelIdTunnel ID to be removed
[in]callbackoptional callback to get the response removeConfig
Returns
Status of removeTunnel i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IL2tpManager::registerListener ( std::weak_ptr< IL2tpListener listener)
pure virtual

Register L2TP Manager as listener for Data Service heath events like data service available or data service not available.

Parameters
[in]listenerpointer of IL2tpListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::IL2tpManager::deregisterListener ( std::weak_ptr< IL2tpListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of IL2tpListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
class telux::data::net::IL2tpListener

Interface for L2TP listener object. Client needs to implement this interface to get access to L2TP services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual ~IL2tpListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IL2tpListener::~IL2tpListener ( )
virtual

Destructor for IL2tpListener

Member Function Documentation

virtual void telux::data::net::IL2tpListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
struct telux::data::net::NatConfig

Structure represents Network Address Translation (NAT) configuration

Data Fields
string addr

Private IP address

uint16_t port

Private port

uint16_t globalPort

Global port

IpProtocol proto

IP protocol telux::net::IpProtocol

class telux::data::net::INatManager

NatManager is a primary interface for configuring static network address translation(SNAT) and DMZ (demilitarized zone). It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status addStaticNatEntry (int profileId, const NatConfig &snatConfig, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status removeStaticNatEntry (int profileId, const NatConfig &snatConfig, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status requestStaticNatEntries (int profileId, StaticNatEntriesCb snatEntriesCb, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< INatListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< INatListener > listener)=0
 
virtual telux::data::OperationType getOperationType ()=0
 
virtual ~INatManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::INatManager::~INatManager ( )
virtual

Destructor for INatManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::INatManager::getServiceStatus ( )
pure virtual

Checks the status of NAT manager and returns the result.

Returns
SERVICE_AVAILABLE If Nat manager object is ready for service. SERVICE_UNAVAILABLE If Nat manager object is temporarily unavailable. SERVICE_FAILED - If Nat manager object encountered an irrecoverable failure.
virtual bool telux::data::net::INatManager::isSubsystemReady ( )
pure virtual

Checks if the NAT manager subsystem is ready.

Returns
True if NAT Manager is ready for service, otherwise returns false.
Deprecated:
Use getServiceStatus API.
virtual std::future<bool> telux::data::net::INatManager::onSubsystemReady ( )
pure virtual

Wait for NAT manager subsystem to be ready.

Returns
A future that caller can wait on to be notified when NAT manager is ready.
Deprecated:
Use InitResponseCb callback in factory API getNatManager.
virtual telux::common::Status telux::data::net::INatManager::addStaticNatEntry ( int  profileId,
const NatConfig snatConfig,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Adds a static Network Address Translation (NAT) entry in the NAT table, these entries are persistent across object, connection and reboot lifetimes. To remove an entry it needs a explicit call to removeStaticNatEntry() API, it supports both IPv4 and IPv6

Parameters
[in]profileIdProfile identifier to which static entry will be mapped to.
[in]snatConfigsnatConfiguration telux::net::NatConfig
[in]callbackoptional callback to get the response addStaticNatEntry
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of addStaticNatEntry i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::INatManager::removeStaticNatEntry ( int  profileId,
const NatConfig snatConfig,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Removes a static Network Address Translation (NAT) entry in the NAT table, it supports both IPv4 and IPv6

Parameters
[in]profileIdProfile identifier to which static entry will be removed from.
[in]snatConfigsnatConfiguration telux::net::NatConfig
[in]callbackoptional callback to get the response removeStaticNatEntry
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of removeStaticNatEntry i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::INatManager::requestStaticNatEntries ( int  profileId,
StaticNatEntriesCb  snatEntriesCb,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Request list of static nat entries available in the NAT table

Parameters
[in]profileIdProfile identifier to which static entries will be retrieved.
[in]snatEntriesCbAsynchronous callback to get the list of static Network Address Translation (NAT) entries
[in]slotIdSpecify slot id which has the sim that contains profile id
Returns
Status of requestStaticNatEntries i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::INatManager::registerListener ( std::weak_ptr< INatListener listener)
pure virtual

Register Nat Manager as listener for Data Service heath events like data service available or data service not available.

Parameters
[in]listenerpointer of INatListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::INatManager::deregisterListener ( std::weak_ptr< INatListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of INatListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
virtual telux::data::OperationType telux::data::net::INatManager::getOperationType ( )
pure virtual

Get the associated operation type for this instance.

Returns
OperationType of getOperationType i.e. LOCAL or REMOTE.
class telux::data::net::INatListener

Interface for Nat listener object. Client needs to implement this interface to get access to Nat services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual ~INatListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::INatListener::~INatListener ( )
virtual

Destructor for INatListener

Member Function Documentation

virtual void telux::data::net::INatListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
class telux::data::net::ISocksManager

SocksManager is a primary interface for configuring legacy Socks proxy server. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status enableSocks (bool enable, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< ISocksListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< ISocksListener > listener)=0
 
virtual telux::data::OperationType getOperationType ()=0
 
virtual ~ISocksManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::ISocksManager::~ISocksManager ( )
virtual

Destructor for Socks Manager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::ISocksManager::getServiceStatus ( )
pure virtual

Checks the status of SocksManager and returns the result.

Returns
SERVICE_AVAILABLE If Socks manager object is ready for service. SERVICE_UNAVAILABLE If Socks manager object is temporarily unavailable. SERVICE_FAILED - If Socks manager object encountered an irrecoverable failure.
virtual bool telux::data::net::ISocksManager::isSubsystemReady ( )
pure virtual

Checks if the SocksManager subsystem is ready.

Returns
True if SocksManager is ready for service, otherwise returns false.
Deprecated:
Use getServiceStatus API..
virtual std::future<bool> telux::data::net::ISocksManager::onSubsystemReady ( )
pure virtual

Wait for SocksManager subsystem to be ready.

Returns
A future that caller can wait on to be notified when Socksanager is ready.
Deprecated:
Use InitResponseCb callback in factory API getSocksManager.
virtual telux::common::Status telux::data::net::ISocksManager::enableSocks ( bool  enable,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Enable or Disable Socks proxy service.

Parameters
[in]enbletrue: enable proxy, false: disable proxy
[in]callbackoptional callback to get the operation error code if any
Returns
Status of proxy enablement i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::ISocksManager::registerListener ( std::weak_ptr< ISocksListener listener)
pure virtual

Register Socks Manager as listener for Data Service heath events like data service available or data service not available.

Parameters
[in]listenerpointer of ISocksListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::ISocksManager::deregisterListener ( std::weak_ptr< ISocksListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of ISocksListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
virtual telux::data::OperationType telux::data::net::ISocksManager::getOperationType ( )
pure virtual

Get the associated operation type for this instance.

Returns
OperationType of getOperationType i.e. LOCAL or REMOTE.
class telux::data::net::ISocksListener

Interface for Socks listener object. Client needs to implement this interface to get access to Socks services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual ~ISocksListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::ISocksListener::~ISocksListener ( )
virtual

Destructor for ISocksListener

Member Function Documentation

virtual void telux::data::net::ISocksListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
class telux::data::net::IVlanManager

VlanManager is a primary interface for configuring VLAN (Virtual Local Area Network). it provide APIs for create, query, remove VLAN interfaces and associate or disassociate with profile IDs. It also provides interface to Subsystem Restart events by registering as listener. Notifications will be received when modem is ready/not ready.

Public Member Functions

virtual telux::common::ServiceStatus getServiceStatus ()=0
 
virtual bool isSubsystemReady ()=0
 
virtual std::future< bool > onSubsystemReady ()=0
 
virtual telux::common::Status createVlan (const VlanConfig &vlanConfig, CreateVlanCb callback=nullptr)=0
 
virtual telux::common::Status removeVlan (int16_t vlanId, InterfaceType ifaceType, telux::common::ResponseCallback callback=nullptr)=0
 
virtual telux::common::Status queryVlanInfo (QueryVlanResponseCb callback)=0
 
virtual telux::common::Status bindWithProfile (int profileId, int vlanId, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status unbindFromProfile (int profileId, int vlanId, telux::common::ResponseCallback callback=nullptr, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status queryVlanMappingList (VlanMappingResponseCb callback, SlotId slotId=DEFAULT_SLOT_ID)=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IVlanListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IVlanListener > listener)=0
 
virtual telux::data::OperationType getOperationType ()=0
 
virtual ~IVlanManager ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IVlanManager::~IVlanManager ( )
virtual

Destructor for IVlanManager

Member Function Documentation

virtual telux::common::ServiceStatus telux::data::net::IVlanManager::getServiceStatus ( )
pure virtual

Checks the status of Vlan manager and returns the result.

Returns
SERVICE_AVAILABLE If Vlan manager object is ready for service. SERVICE_UNAVAILABLE If Vlan manager object is temporarily unavailable. SERVICE_FAILED - If Vlan manager object encountered an irrecoverable failure.
virtual bool telux::data::net::IVlanManager::isSubsystemReady ( )
pure virtual

Checks if the Vlan manager subsystem is ready.

Returns
True if VLAN Manager is ready for service, otherwise returns false.
Deprecated:
Use getServiceStatus API.
virtual std::future<bool> telux::data::net::IVlanManager::onSubsystemReady ( )
pure virtual

Wait for Vlan manager subsystem to be ready.

Returns
A future that caller can wait on to be notified when VLAN manager is ready.
Deprecated:
Use InitResponseCb callback in factory API getVlanManager.
virtual telux::common::Status telux::data::net::IVlanManager::createVlan ( const VlanConfig vlanConfig,
CreateVlanCb  callback = nullptr 
)
pure virtual

Create a VLAN associated with multiple interfaces

Note
if interface configured as VLAN for the first time, it may trigger auto reboot.
Parameters
[in]vlanConfigvlan configuration
[out]callbackoptional callback to get the response createVlan
Returns
Immediate status of createVlan() request sent i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IVlanManager::removeVlan ( int16_t  vlanId,
InterfaceType  ifaceType,
telux::common::ResponseCallback  callback = nullptr 
)
pure virtual

Remove VLAN configuration

Note
This will delete all clients associated with interface
Parameters
[in]vlanIdVLAN ID
[in]ifaceTypetelux::net::InterfaceType
[out]callbackoptional callback to get the response removeVlan
Returns
Immediate status of removeVlan() request sent i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IVlanManager::queryVlanInfo ( QueryVlanResponseCb  callback)
pure virtual

Query information about all the VLANs in the system

Parameters
[out]callbackResponse callback with list of configured VLANs
Returns
Immediate status of queryVlanInfo() request sent i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IVlanManager::bindWithProfile ( int  profileId,
int  vlanId,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Bind a Vlan with a particular profile ID and slot ID. When a WWAN network interface is brought up using IDataConnectionManager::startDataCall on that profile ID and slot ID, that interface will be accessible from this Vlan

Parameters
[in]profileIdprofile id for vlan association
[in]vlanIdsets vlan id
[out]callbackcallback to get the response of associateWithProfileId API
[in]slotIdSpecify slot id which has the sim that contains profile id.
Returns
Immediate status of associateWithProfileId() request sent i.e. success or suitable status code.
virtual telux::common::Status telux::data::net::IVlanManager::unbindFromProfile ( int  profileId,
int  vlanId,
telux::common::ResponseCallback  callback = nullptr,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Unbind VLAN id from given slot id and profile id

Parameters
[in]profileIdprofile id for vlan association
[in]vlanIdvlan id
[in]callbackcallback to get the response of associateWithProfileId API
[in]slotIdSpecify slot id which has the sim that contains profile id .
Returns
Immediate status of disassociateFromProfileId() request sent i.e. success or suitable status code
virtual telux::common::Status telux::data::net::IVlanManager::queryVlanMappingList ( VlanMappingResponseCb  callback,
SlotId  slotId = DEFAULT_SLOT_ID 
)
pure virtual

Query VLAN mapping of profile id and vlan id on specified sim

Parameters
[in]callbackcallback to get the response of queryVlanMappingList API
[in]slotIdSpecify slot id which has the sim that contains profile id mapping to vlan id.
Returns
Immediate status of queryVlanMappingList() request sent i.e. success or suitable status code
virtual telux::common::Status telux::data::net::IVlanManager::registerListener ( std::weak_ptr< IVlanListener listener)
pure virtual

Register Vlan Manager as a listener for Data Service health events like data service available or data service not available.

Parameters
[in]listenerpointer of IVlanListener object that processes the notification
Returns
Status of registerListener success or suitable status code
virtual telux::common::Status telux::data::net::IVlanManager::deregisterListener ( std::weak_ptr< IVlanListener listener)
pure virtual

Removes a previously added listener.

Parameters
[in]listenerpointer of IVlanListener object that needs to be removed
Returns
Status of deregisterListener success or suitable status code
virtual telux::data::OperationType telux::data::net::IVlanManager::getOperationType ( )
pure virtual

Get the associated operation type for this instance.

Returns
OperationType of getOperationType i.e. LOCAL or REMOTE.
class telux::data::net::IVlanListener

Interface for Vlan listener object. Client needs to implement this interface to get access to Socks services notifications like onServiceStatusChange.

The methods in listener can be invoked from multiple different threads. The implementation should be thread safe.

Public Member Functions

virtual void onServiceStatusChange (telux::common::ServiceStatus status)
 
virtual void onHwAccelerationChanged (const ServiceState state)
 
virtual ~IVlanListener ()
 

Constructor & Destructor Documentation

virtual telux::data::net::IVlanListener::~IVlanListener ( )
virtual

Destructor for IVlanListener

Member Function Documentation

virtual void telux::data::net::IVlanListener::onServiceStatusChange ( telux::common::ServiceStatus  status)
virtual

This function is called when service status changes.

Parameters
[in]status- ServiceStatus
virtual void telux::data::net::IVlanListener::onHwAccelerationChanged ( const ServiceState  state)
virtual

This function is called when there is a change in IPA Connection Manager daemon state.

Parameters
[in]stateNew state of IPA connection Manager daemon Active/Inactive

Typedef Documentation

using telux::data::net::BridgeInfoResponseCb = typedef std::function<void(const std::vector<BridgeInfo> &infos, telux::common::ErrorCode error)>

This function is called as a response to requestBridgeInfo

Parameters
[in]infosList of the software bridge configurations in the system
[in]errorReturn code which indicates whether the operation is succeeded or not telux::common::ErrorCode
using telux::data::net::FirewallStatusCb = typedef std::function<void(bool enable, bool allowPackets, telux::common::ErrorCode error)>

This function is called as a response to requestFirewallStatus()

Parameters
[in]enableIndicates whether the firewall is enabled
[in]allowPacketsIndicates whether to accept or drop packets matching the rules
[in]error- Return code which indicates whether the operation succeeded or not. telux::common::ErrorCode
using telux::data::net::FirewallEntriesCb = typedef std::function<void( std::vector<std::shared_ptr<IFirewallEntry>> entries, telux::common::ErrorCode error)>

This function is called as a response to requestFirewallEntries()

Parameters
[in]entrieslist of firewall entries
[in]error- Return code which indicates whether the operation succeeded or not. telux::common::ErrorCode
using telux::data::net::DmzEntriesCb = typedef std::function<void(std::vector<std::string> dmzEntries, telux::common::ErrorCode error)>

This function is called as a response to requestDmzEntries()

Parameters
[in]dmzEntrieslist of dmz entries
[in]errorReturn code which indicates whether the operation succeeded or not. telux::common::ErrorCode
using telux::data::net::L2tpConfigCb = typedef std::function<void(const L2tpSysConfig &l2tpSysConfig, telux::common::ErrorCode error)>

This function is called as a response to requestConfig()

Parameters
[in]l2tpSysConfigCurrent L2TP configuration
[in]errorReturn code which indicates whether the operation succeeded or not telux::common::ErrorCode
using telux::data::net::StaticNatEntriesCb = typedef std::function<void(const std::vector<NatConfig> &snatEntries, telux::common::ErrorCode error)>

This function is called as a response to requestStaticNatEntries()

Parameters
[in]snatEntrieslist of static Network Address Translation (NAT)
[in]errorReturn code which indicates whether the operation succeeded or not telux::common::ErrorCode
using telux::data::net::CreateVlanCb = typedef std::function<void(bool isAccelerated, telux::common::ErrorCode error)>

This function is called as a response to createVlan()

Parameters
[in]isAcceleratedOffload status returned by server
[in]errorReturn code which indicates whether the operation succeeded or not telux::common::ErrorCode
using telux::data::net::QueryVlanResponseCb = typedef std::function<void(const std::vector<VlanConfig> &configs, telux::common::ErrorCode error)>

This function is called as a response to queryVlanInfo()

Parameters
[in]configsList of VLAN configs
[in]errorReturn code which indicates whether the operation succeeded or not telux::common::ErrorCode
using telux::data::net::VlanMappingResponseCb = typedef std::function<void( const std::list<std::pair<int, int>> &mapping, telux::common::ErrorCode error)>

This function is called as a response to queryVlanMappingList()

Parameters
[in]mappingList of profile Id and Vlan id map Key is Profile Id and value is VLAN id
[in]errorReturn code which indicates whether the operation succeeded or not telux::common::ErrorCode

Enumeration Type Documentation

Interface types supported for bridge configuration

Enumerator
UNKNOWN 
WLAN_AP 

Wireless Local Area Network (WLAN) in AP mode

WLAN_STA 

Wireless Local Area Network (WLAN) in STA mode

ETH 

Ethernet (ETH)

L2TP encapsulation protocols

Enumerator
NONE 
IP 

IP Protocol used for encapsulation

UDP 

UDP Protocol used for encapsulation