le_mdc_interface.h File Reference
#include "legato.h"

Go to the source code of this file.

Macros

#define LE_MDC_INTERFACE_NAME_MAX_LEN   20
 
#define LE_MDC_INTERFACE_NAME_MAX_BYTES   21
 
#define LE_MDC_IPV4_ADDR_MAX_LEN   15
 
#define LE_MDC_IPV4_ADDR_MAX_BYTES   16
 
#define LE_MDC_IPV6_ADDR_MAX_LEN   45
 
#define LE_MDC_IPV6_ADDR_MAX_BYTES   46
 
#define LE_MDC_APN_NAME_MAX_LEN   100
 
#define LE_MDC_APN_NAME_MAX_BYTES   101
 
#define LE_MDC_USER_NAME_MAX_LEN   64
 
#define LE_MDC_USER_NAME_MAX_BYTES   65
 
#define LE_MDC_PASSWORD_NAME_MAX_LEN   100
 
#define LE_MDC_PASSWORD_NAME_MAX_BYTES   101
 
#define LE_MDC_DEFAULT_PROFILE   -1
 
#define LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE   -2
 

Typedefs

typedef struct le_mdc_Profile * le_mdc_ProfileRef_t
 
typedef struct le_mdc_SessionStateHandler * le_mdc_SessionStateHandlerRef_t
 
typedef struct le_mdc_MtPdpSessionStateHandler * le_mdc_MtPdpSessionStateHandlerRef_t
 
typedef void(* le_mdc_SessionStateHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)
 
typedef void(* le_mdc_MtPdpSessionStateHandlerFunc_t) (le_mdc_ConState_t ConnectionState, void *contextPtr)
 

Enumerations

enum  le_mdc_DataBearerTechnology_t {
  LE_MDC_DATA_BEARER_TECHNOLOGY_UNKNOWN, LE_MDC_DATA_BEARER_TECHNOLOGY_GSM, LE_MDC_DATA_BEARER_TECHNOLOGY_GPRS, LE_MDC_DATA_BEARER_TECHNOLOGY_EGPRS,
  LE_MDC_DATA_BEARER_TECHNOLOGY_WCDMA, LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA, LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA_PLUS, LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA_PLUS,
  LE_MDC_DATA_BEARER_TECHNOLOGY_LTE, LE_MDC_DATA_BEARER_TECHNOLOGY_TD_SCDMA, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_1X, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO,
  LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO_REVA, LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EHRPD
}
 
enum  le_mdc_Pdp_t { LE_MDC_PDP_UNKNOWN, LE_MDC_PDP_IPV4, LE_MDC_PDP_IPV6, LE_MDC_PDP_IPV4V6 }
 
enum  le_mdc_Auth_t { LE_MDC_AUTH_NONE, LE_MDC_AUTH_PAP, LE_MDC_AUTH_CHAP }
 
enum  le_mdc_ConState_t {
  LE_MDC_DISCONNECTED, LE_MDC_AUTHENTICATING, LE_MDC_CONNECTED, LE_MDC_SUSPENDING,
  LE_MDC_INCOMING
}
 
enum  le_mdc_DisconnectionReason_t {
  LE_MDC_DISC_NO_SERVICE, LE_MDC_DISC_OPERATOR_DETERMINED_BARRING, LE_MDC_DISC_INSUFFICIENT_MBMS_CAPABILITIES, LE_MDC_DISC_LLC_SNDCP_FAILURE,
  LE_MDC_DISC_INSUFFICIENT_RESOURCES, LE_MDC_DISC_MISSING_OR_UNKNOWN_APN, LE_MDC_DISC_UNKNOWN_PDP_ADDR_OR_TYPE, LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE,
  LE_MDC_DISC_ACTIVATION_REJECTED_BY_GGSN_OR_GW, LE_MDC_DISC_ACTIVATION_REJECTED_UNSPECIFIED, LE_MDC_DISC_SERVICE_OPTION_NOT_SUPPORTED, LE_MDC_DISC_REQUESTED_SERVICE_OPTION_UNSUBSCRIBED,
  LE_MDC_DISC_REQUESTED_SERVICE_OPTION_OUT_OF_ORDER, LE_MDC_DISC_NSAPI_ALREADY_USED, LE_MDC_DISC_REGULAR_DEACTIVATION, LE_MDC_DISC_QOS_NOT_ACCEPTED,
  LE_MDC_DISC_NETWORK_FAILURE, LE_MDC_DISC_REACTIVATION_REQUESTED, LE_MDC_DISC_FEATURE_NOT_SUPPORTED, LE_MDC_DISC_TFT_SEMANTIC_ERROR,
  LE_MDC_DISC_TFT_SYNTACTICAL_ERROR, LE_MDC_DISC_UNKNOWN_PDP_CONTEXT, LE_MDC_DISC_PACKET_FILTER_SEMANTIC_ERROR, LE_MDC_DISC_PACKET_FILTER_SYNTACTICAL_ERROR,
  LE_MDC_DISC_PDP_CONTEXT_WITHOUT_ACTIVE_TFT, LE_MDC_DISC_MULTICAST_TIME_OUT, LE_MDC_DISC_BEARER_CONTROL_MODE_VIOLATION, LE_MDC_DISC_IPV4_ONLY_ALLOWED,
  LE_MDC_DISC_IPV6_ONLY_ALLOWED, LE_MDC_DISC_SINGLE_ADDR_ONLY_ALLOWED, LE_MDC_DISC_COLLISION_WITH_NETWORK_INITIATED_REQ, LE_MDC_DISC_BEARER_HANDLING_UNSUPPORTED,
  LE_MDC_DISC_MAX_PDP_CONTEXTS, LE_MDC_DISC_APN_UNSUPPORTED_FOR_RAT_AND_PLMN, LE_MDC_DISC_INCOMPATIBLE_APN, LE_MDC_DISC_INVALID_TRANSACTION_ID,
  LE_MDC_DISC_MESSAGE_INCORRECT_SEMANTIC, LE_MDC_DISC_INVALID_MANDATORY_INFORMATION, LE_MDC_DISC_UNSUPPORTED_MESSAGE_TYPE, LE_MDC_DISC_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE,
  LE_MDC_DISC_UNKNOWN_INFORMATION_ELEMENT, LE_MDC_DISC_CONDITIONAL_IE_ERROR, LE_MDC_DISC_MESSAGE_AND_STATE_UNCOMPATIBLE, LE_MDC_DISC_PROTOCOL_ERROR_UNSPECIFIED,
  LE_MDC_DISC_PLATFORM_SPECIFIC, LE_MDC_DISC_UNDEFINED
}
 

Functions

void le_mdc_ConnectService (void)
 
void le_mdc_DisconnectService (void)
 
le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler (le_mdc_ProfileRef_t profileRef, le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mdc_RemoveSessionStateHandler (le_mdc_SessionStateHandlerRef_t addHandlerRef)
 
le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler (le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
 
void le_mdc_RemoveMtPdpSessionStateHandler (le_mdc_MtPdpSessionStateHandlerRef_t addHandlerRef)
 
le_mdc_ProfileRef_t le_mdc_GetProfile (uint32_t index)
 
uint32_t le_mdc_GetProfileIndex (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_StartSession (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_StopSession (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_RejectMtPdpSession (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetSessionState (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t *connectionStatePtr)
 
le_result_t le_mdc_GetInterfaceName (le_mdc_ProfileRef_t profileRef, char *interfaceName, size_t interfaceNameNumElements)
 
le_result_t le_mdc_GetIPv4Address (le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrNumElements)
 
le_result_t le_mdc_GetIPv4GatewayAddress (le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrNumElements)
 
le_result_t le_mdc_GetIPv4DNSAddresses (le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrNumElements, char *dns2AddrStr, size_t dns2AddrStrNumElements)
 
le_result_t le_mdc_GetIPv6Address (le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrNumElements)
 
le_result_t le_mdc_GetIPv6GatewayAddress (le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrNumElements)
 
le_result_t le_mdc_GetIPv6DNSAddresses (le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrNumElements, char *dns2AddrStr, size_t dns2AddrStrNumElements)
 
bool le_mdc_IsIPv4 (le_mdc_ProfileRef_t profileRef)
 
bool le_mdc_IsIPv6 (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetDataBearerTechnology (le_mdc_ProfileRef_t profileRef, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtrPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtrPtr)
 
le_result_t le_mdc_GetBytesCounters (uint64_t *rxBytesPtr, uint64_t *txBytesPtr)
 
le_result_t le_mdc_ResetBytesCounter (void)
 
le_result_t le_mdc_SetPDP (le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdp)
 
le_mdc_Pdp_t le_mdc_GetPDP (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_SetAPN (le_mdc_ProfileRef_t profileRef, const char *apnStr)
 
le_result_t le_mdc_SetDefaultAPN (le_mdc_ProfileRef_t profileRef)
 
le_result_t le_mdc_GetAPN (le_mdc_ProfileRef_t profileRef, char *apnStr, size_t apnStrNumElements)
 
le_result_t le_mdc_SetAuthentication (le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t type, const char *userName, const char *password)
 
le_result_t le_mdc_GetAuthentication (le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t *typePtr, char *userName, size_t userNameNumElements, char *password, size_t passwordNumElements)
 
uint32_t le_mdc_NumProfiles (void)
 
le_result_t le_mdc_GetProfileFromApn (const char *apnStr, le_mdc_ProfileRef_t *profileRefPtr)
 
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason (le_mdc_ProfileRef_t profileRef)
 
int32_t le_mdc_GetPlatformSpecificDisconnectionCode (le_mdc_ProfileRef_t profileRef)
 

Detailed Description

Legato Modem Data Control include file.

Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.

Macro Definition Documentation

#define LE_MDC_APN_NAME_MAX_BYTES   101

Maximum number of bytes in a apn name (including the null-terminator).

#define LE_MDC_APN_NAME_MAX_LEN   100

Maximum number of bytes in a apn name (not including the null-terminator).

#define LE_MDC_DEFAULT_PROFILE   -1

Default profile definition.

#define LE_MDC_INTERFACE_NAME_MAX_BYTES   21

Maximum number of bytes in a profile name (including the null-terminator).

#define LE_MDC_INTERFACE_NAME_MAX_LEN   20

Maximum number of bytes in a interface name (not including the null-terminator).

#define LE_MDC_IPV4_ADDR_MAX_BYTES   16

Maximum number of bytes in an IPv4 address (including the null-terminator).

#define LE_MDC_IPV4_ADDR_MAX_LEN   15

Maximum number of bytes in an IPv4 address (not including the null-terminator).

#define LE_MDC_IPV6_ADDR_MAX_BYTES   46

Maximum number of bytes in an IPv6 address (including the null-terminator).

#define LE_MDC_IPV6_ADDR_MAX_LEN   45

Maximum number of bytes in an IPv6 address (not including the null-terminator).

#define LE_MDC_PASSWORD_NAME_MAX_BYTES   101

Maximum number of bytes in a password name (including the null-terminator).

#define LE_MDC_PASSWORD_NAME_MAX_LEN   100

Maximum number of bytes in a password name (not including the null-terminator).

#define LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE   -2

Default profile definition for Bearer Independent Protocol (BIP).

#define LE_MDC_USER_NAME_MAX_BYTES   65

Maximum number of bytes in a user name (including the null-terminator).

#define LE_MDC_USER_NAME_MAX_LEN   64

Maximum number of bytes in a user name (not including the null-terminator).

Typedef Documentation

typedef void(* le_mdc_MtPdpSessionStateHandlerFunc_t) (le_mdc_ConState_t ConnectionState, void *contextPtr)

Handler for MT-PDP Data session connection state changes.

Parameters
ConnectionStateMT-PDP Data session connection state.
contextPtr
typedef struct le_mdc_MtPdpSessionStateHandler* le_mdc_MtPdpSessionStateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_mdc_MtPdpSessionState'

typedef struct le_mdc_Profile* le_mdc_ProfileRef_t

Reference to a modem data connection profile.

typedef void(* le_mdc_SessionStateHandlerFunc_t) (le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)

Handler for Data session connection state changes.

Parameters
profileRefProfile reference
ConnectionStateData session connection state.
contextPtr
typedef struct le_mdc_SessionStateHandler* le_mdc_SessionStateHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'le_mdc_SessionState'

Enumeration Type Documentation

Enumeration of Authentication.

Enumerator
LE_MDC_AUTH_NONE 

no authentication

LE_MDC_AUTH_PAP 

PAP protocol.

LE_MDC_AUTH_CHAP 

CHAP protocol.

Enumeration of connection state.

Enumerator
LE_MDC_DISCONNECTED 

Data session is disconnected.

LE_MDC_AUTHENTICATING 

Authenticating data session.

LE_MDC_CONNECTED 

Data session is connected.

LE_MDC_SUSPENDING 

Suspending data session.

LE_MDC_INCOMING 

Incoming data session (MT-PDP context request)

Enumeration of data bearer technologies.

Enumerator
LE_MDC_DATA_BEARER_TECHNOLOGY_UNKNOWN 

Unknown.

LE_MDC_DATA_BEARER_TECHNOLOGY_GSM 

GSM.

LE_MDC_DATA_BEARER_TECHNOLOGY_GPRS 

GPRS.

LE_MDC_DATA_BEARER_TECHNOLOGY_EGPRS 

Enhanced GPRS (EDGE)

LE_MDC_DATA_BEARER_TECHNOLOGY_WCDMA 

WCDMA (UMTS)

LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA 

HSPA.

LE_MDC_DATA_BEARER_TECHNOLOGY_HSPA_PLUS 

HSPA+.

LE_MDC_DATA_BEARER_TECHNOLOGY_DC_HSPA_PLUS 

Dual Cell - HSPA+.

LE_MDC_DATA_BEARER_TECHNOLOGY_LTE 

LTE.

LE_MDC_DATA_BEARER_TECHNOLOGY_TD_SCDMA 

TD-SCDMA.

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_1X 

CDMA2000 1X.

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO 

CDMA2000 HRPD (1xEV-DO)

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EVDO_REVA 

CDMA2000 HRPD (1xEV-DO RevA)

LE_MDC_DATA_BEARER_TECHNOLOGY_CDMA2000_EHRPD 

CDMA2000 EHRPD.

Enumeration of the possible reasons for the disconnection.

Enumerator
LE_MDC_DISC_NO_SERVICE 

Modem has no service.

LE_MDC_DISC_OPERATOR_DETERMINED_BARRING 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INSUFFICIENT_MBMS_CAPABILITIES 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_LLC_SNDCP_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INSUFFICIENT_RESOURCES 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MISSING_OR_UNKNOWN_APN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_UNKNOWN_PDP_ADDR_OR_TYPE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_ACTIVATION_REJECTED_BY_GGSN_OR_GW 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_ACTIVATION_REJECTED_UNSPECIFIED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_SERVICE_OPTION_NOT_SUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REQUESTED_SERVICE_OPTION_UNSUBSCRIBED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REQUESTED_SERVICE_OPTION_OUT_OF_ORDER 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_NSAPI_ALREADY_USED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REGULAR_DEACTIVATION 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_QOS_NOT_ACCEPTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_NETWORK_FAILURE 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_REACTIVATION_REQUESTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_FEATURE_NOT_SUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_TFT_SEMANTIC_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_TFT_SYNTACTICAL_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_UNKNOWN_PDP_CONTEXT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PACKET_FILTER_SEMANTIC_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PACKET_FILTER_SYNTACTICAL_ERROR 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_PDP_CONTEXT_WITHOUT_ACTIVE_TFT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MULTICAST_TIME_OUT 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_BEARER_CONTROL_MODE_VIOLATION 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_IPV4_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_IPV6_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_SINGLE_ADDR_ONLY_ALLOWED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_COLLISION_WITH_NETWORK_INITIATED_REQ 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_BEARER_HANDLING_UNSUPPORTED 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_MAX_PDP_CONTEXTS 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_APN_UNSUPPORTED_FOR_RAT_AND_PLMN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INCOMPATIBLE_APN 

cf. 3GPP 24.008 Annex I1

LE_MDC_DISC_INVALID_TRANSACTION_ID 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_INCORRECT_SEMANTIC 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_INVALID_MANDATORY_INFORMATION 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_UNSUPPORTED_MESSAGE_TYPE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_UNKNOWN_INFORMATION_ELEMENT 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_CONDITIONAL_IE_ERROR 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_MESSAGE_AND_STATE_UNCOMPATIBLE 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_PROTOCOL_ERROR_UNSPECIFIED 

cf. 3GPP 24.008 Annex I2

LE_MDC_DISC_PLATFORM_SPECIFIC 

Platform specific code.

LE_MDC_DISC_UNDEFINED 

Undefined reason.

Enumeration of Packet Data Protocol.

Enumerator
LE_MDC_PDP_UNKNOWN 

Unknown.

LE_MDC_PDP_IPV4 

IPv4.

LE_MDC_PDP_IPV6 

IPv6.

LE_MDC_PDP_IPV4V6 

IPv4 and IPv6.

Function Documentation

le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler ( le_mdc_SessionStateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_mdc_MtPdpSessionState'

This event provides information on data session connection state changes for the given profileRef.

Parameters
[in]handlerPtr
[in]contextPtr
le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler ( le_mdc_ProfileRef_t  profileRef,
le_mdc_SessionStateHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'le_mdc_SessionState'

This event provides information on data session connection state changes for the given profileRef.

Parameters
[in]profileRefThe profile object of interest
[in]handlerPtr
[in]contextPtr
void le_mdc_ConnectService ( void  )

Connect the current client thread to the service providing this API.

This function must be called before any other functions in this API. Normally, it's automatically called for the main thread, but must be explicitly called for other threads. For details, see Client-specific Functions.

This function is created automatically.

void le_mdc_DisconnectService ( void  )

Disconnect the current client thread from the service providing this API.

Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.

This function is created automatically.

le_result_t le_mdc_GetAPN ( le_mdc_ProfileRef_t  profileRef,
char *  apnStr,
size_t  apnStrNumElements 
)

Get the Access Point Name (APN) for the given profile.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_OVERFLOW if the APN is is too long
  • LE_FAULT on failed
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]apnStrThe Access Point Name
[in]apnStrNumElements
le_result_t le_mdc_GetAuthentication ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Auth_t typePtr,
char *  userName,
size_t  userNameNumElements,
char *  password,
size_t  passwordNumElements 
)

Get authentication property

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_OVERFLOW userName or password are too small
  • LE_FAULT on failed
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]typePtrAuthentication type
[out]userNameUserName used by authentication
[in]userNameNumElements
[out]passwordPassword used by authentication
[in]passwordNumElements
le_result_t le_mdc_GetBytesCounters ( uint64_t *  rxBytesPtr,
uint64_t *  txBytesPtr 
)

Get number of bytes received/transmitted without error since the last reset.

Returns
  • LE_OK on success
  • LE_FAULT for all other errors
Note
  • The process exits, if an invalid pointer is given
Parameters
[out]rxBytesPtrbytes amount received since the last counter reset
[out]txBytesPtrbytes amount transmitted since the last counter reset
le_result_t le_mdc_GetDataBearerTechnology ( le_mdc_ProfileRef_t  profileRef,
le_mdc_DataBearerTechnology_t downlinkDataBearerTechPtrPtr,
le_mdc_DataBearerTechnology_t uplinkDataBearerTechPtrPtr 
)

Get the Data Bearer Technology for the given profile, if the data session is connected.

Returns
  • LE_OK on success
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]downlinkDataBearerTechPtrPtrdownlink data bearer technology
[out]uplinkDataBearerTechPtrPtruplink data bearer technology
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason ( le_mdc_ProfileRef_t  profileRef)

Called to get the disconnection reason.

Returns
The disconnection reason.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefprofile reference
le_result_t le_mdc_GetInterfaceName ( le_mdc_ProfileRef_t  profileRef,
char *  interfaceName,
size_t  interfaceNameNumElements 
)

Get the network interface name, if the data session is connected.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the interface name would not fit in interfaceNameStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]interfaceNameThe name of the network interface
[in]interfaceNameNumElements
le_result_t le_mdc_GetIPv4Address ( le_mdc_ProfileRef_t  profileRef,
char *  ipAddr,
size_t  ipAddrNumElements 
)

Get the IPv4 address for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in ipAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]ipAddrThe IP address in dotted format
[in]ipAddrNumElements
le_result_t le_mdc_GetIPv4DNSAddresses ( le_mdc_ProfileRef_t  profileRef,
char *  dns1AddrStr,
size_t  dns1AddrStrNumElements,
char *  dns2AddrStr,
size_t  dns2AddrStrNumElements 
)

Get the primary/secondary DNS v4 addresses for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in buffer
  • LE_FAULT for all other errors
Note
  • If only one DNS address is available, then it will be returned, and an empty string will be returned for the unavailable address
  • The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]dns1AddrStrThe primary DNS IP address in dotted format
[in]dns1AddrStrNumElements
[out]dns2AddrStrThe secondary DNS IP address in dotted format
[in]dns2AddrStrNumElements
le_result_t le_mdc_GetIPv4GatewayAddress ( le_mdc_ProfileRef_t  profileRef,
char *  gatewayAddr,
size_t  gatewayAddrNumElements 
)

Get the gateway IPv4 address for the given profile, if the data session is connected and has an IPv4 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]gatewayAddrThe gateway IP address in dotted format
[in]gatewayAddrNumElements
le_result_t le_mdc_GetIPv6Address ( le_mdc_ProfileRef_t  profileRef,
char *  ipAddr,
size_t  ipAddrNumElements 
)

Get the IPv6 address for the given profile, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in ipAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]ipAddrThe IP address in dotted format
[in]ipAddrNumElements
le_result_t le_mdc_GetIPv6DNSAddresses ( le_mdc_ProfileRef_t  profileRef,
char *  dns1AddrStr,
size_t  dns1AddrStrNumElements,
char *  dns2AddrStr,
size_t  dns2AddrStrNumElements 
)

Get the primary/secondary DNS v6 addresses, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address can't fit in buffer
  • LE_FAULT for all other errors
Note
  • If only one DNS address is available, it will be returned, and an empty string will be returned for the unavailable address.
  • The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]dns1AddrStrThe primary DNS IP address in dotted format
[in]dns1AddrStrNumElements
[out]dns2AddrStrThe secondary DNS IP address in dotted format
[in]dns2AddrStrNumElements
le_result_t le_mdc_GetIPv6GatewayAddress ( le_mdc_ProfileRef_t  profileRef,
char *  gatewayAddr,
size_t  gatewayAddrNumElements 
)

Get the gateway IPv6 address for the given profile, if the data session is connected and has an IPv6 address.

Returns
  • LE_OK on success
  • LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]gatewayAddrThe gateway IP address in dotted format
[in]gatewayAddrNumElements
le_mdc_Pdp_t le_mdc_GetPDP ( le_mdc_ProfileRef_t  profileRef)

Get the Packet Data Protocol (PDP) for the given profile.

Returns
  • packet data protocol value
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
int32_t le_mdc_GetPlatformSpecificDisconnectionCode ( le_mdc_ProfileRef_t  profileRef)

Called to get the platform specific disconnection code.

Returns
The platform specific disconnection code.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefprofile reference
le_mdc_ProfileRef_t le_mdc_GetProfile ( uint32_t  index)

Get Profile Reference for index

Warning
Ensure to check the list of supported data profiles for your specific platform.
Returns
  • Reference to the data profile
  • NULL if the profile index does not exist
Parameters
[in]indexindex of the profile.
le_result_t le_mdc_GetProfileFromApn ( const char *  apnStr,
le_mdc_ProfileRef_t profileRefPtr 
)

Get a profile selected by its APN

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_NOT_FOUND if the requested APN is not found
Parameters
[in]apnStrThe Access Point Name
[out]profileRefPtrprofile reference
uint32_t le_mdc_GetProfileIndex ( le_mdc_ProfileRef_t  profileRef)

Get the index for the given Profile.

Returns
  • index of the profile in the modem
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
le_result_t le_mdc_GetSessionState ( le_mdc_ProfileRef_t  profileRef,
le_mdc_ConState_t connectionStatePtr 
)

Get the current data session state.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT on failure
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[out]connectionStatePtrThe data session state
bool le_mdc_IsIPv4 ( le_mdc_ProfileRef_t  profileRef)

Allow the caller to know if the given profile is actually supporting IPv4, if the data session is connected.

Returns
TRUE if PDP type is IPv4, FALSE otherwise.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefQuery this profile object
bool le_mdc_IsIPv6 ( le_mdc_ProfileRef_t  profileRef)

Allow the caller to know if the given profile is actually supporting IPv6, if the data session is connected.

Returns
TRUE if PDP type is IPv6, FALSE otherwise.
Note
If the caller is passing a bad pointer into this function, it is a fatal error, the function will not return.
Parameters
[in]profileRefQuery this profile object
uint32_t le_mdc_NumProfiles ( void  )

Get the number of profiles on the modem.

Returns
  • number of profiles existing on modem
le_result_t le_mdc_RejectMtPdpSession ( le_mdc_ProfileRef_t  profileRef)

Reject MT-PDP profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the input parameter is not valid
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefReject MT-PDP data session for this profile object
void le_mdc_RemoveMtPdpSessionStateHandler ( le_mdc_MtPdpSessionStateHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_mdc_MtPdpSessionState'

Parameters
[in]addHandlerRef
void le_mdc_RemoveSessionStateHandler ( le_mdc_SessionStateHandlerRef_t  addHandlerRef)

Remove handler function for EVENT 'le_mdc_SessionState'

Parameters
[in]addHandlerRef
le_result_t le_mdc_ResetBytesCounter ( void  )

Reset received/transmitted data flow statistics

Returns
  • LE_OK on success
  • LE_FAULT for all other errors
le_result_t le_mdc_SetAPN ( le_mdc_ProfileRef_t  profileRef,
const char *  apnStr 
)

Set the Access Point Name (APN) for the given profile.

The APN must be an ASCII string.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT if the data session is currently connected for the given profile
Note
If APN is too long (max APN_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[in]apnStrThe Access Point Name
le_result_t le_mdc_SetAuthentication ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Auth_t  type,
const char *  userName,
const char *  password 
)

Set authentication property

Returns
  • LE_OK on success
Note
  • The process exits, if userName or password are NULL when type is not PA_MDC_AUTH_NONE
  • The process exits, if an invalid profile object is given
If userName is too long (max USER_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
If password is too long (max PASSWORD_NAME_MAX_LEN digits), it is a fatal error, the function will not return.
Parameters
[in]profileRefQuery this profile object
[in]typeAuthentication type
[in]userNameUserName used by authentication
[in]passwordPassword used by authentication
le_result_t le_mdc_SetDefaultAPN ( le_mdc_ProfileRef_t  profileRef)

Set the Access Point Name (APN) for the given profile according to the home network mcc/mnc.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if an input parameter is not valid
  • LE_FAULT for all other errors
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
le_result_t le_mdc_SetPDP ( le_mdc_ProfileRef_t  profileRef,
le_mdc_Pdp_t  pdp 
)

Set the Packet Data Protocol (PDP) for the given profile.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the PDP is not supported
  • LE_FAULT if the data session is currently connected for the given profile
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefQuery this profile object
[in]pdpThe Packet Data Protocol
le_result_t le_mdc_StartSession ( le_mdc_ProfileRef_t  profileRef)

Start profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if input parameter is incorrect
  • LE_DUPLICATE if the data session is already connected for the given profile
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefStart data session for this profile object
le_result_t le_mdc_StopSession ( le_mdc_ProfileRef_t  profileRef)

Stop profile data session.

Returns
  • LE_OK on success
  • LE_BAD_PARAMETER if the input parameter is not valid
  • LE_FAULT for other failures
Note
The process exits, if an invalid profile object is given
Parameters
[in]profileRefStop data session for this profile object