le_mdc_interface.h
Go to the documentation of this file.
41 * le_mdc_GetProfile() must be called with @c LE_MDC_DEFAULT_PROFILE to retrieve the default index43 * le_mdc_GetProfile() must be called with @c LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE to retrieve the47 * The list of supported PDP context identifiers (CID) are modem dependent and can be retrieved by58 * identification number (ICCID). If no match is found in the database using the ICCID, the search83 * le_mdc_MapProfileOnNetworkInterface() may be used to map a data session with a network interface.98 * The current state of a data session can be queried using le_mdc_GetSessionState(). An application106 * the application takes responsibility to trigger the data session for that MT PDP request using119 * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to135 * le_mdc_GetDisconnectionReasonExt() or le_mdc_GetPlatformSpecificDisconnectionCodeExt() let you get139 * le_mdc_GetPlatformSpecificFailureConnectionReasonExt() let you get the data session connection151 * The amount of received and transmitted data can be retrieved through le_mdc_GetBytesCounters().158 * @note The data statistics collection activation and the data counters are persistent even after199 //--------------------------------------------------------------------------------------------------203 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------209 * Connect the current client thread to the service providing this API. Block until the service is212 * For each thread that wants to use this API, either ConnectService or TryConnectService must be213 * called before any other functions in this API. Normally, ConnectService is automatically called218 //--------------------------------------------------------------------------------------------------224 //--------------------------------------------------------------------------------------------------227 * Try to connect the current client thread to the service providing this API. Return with an error230 * For each thread that wants to use this API, either ConnectService or TryConnectService must be231 * called before any other functions in this API. Normally, ConnectService is automatically called240 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).243 //--------------------------------------------------------------------------------------------------249 //--------------------------------------------------------------------------------------------------253 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants256 //--------------------------------------------------------------------------------------------------263 //--------------------------------------------------------------------------------------------------269 * longer a connection to the service, and the functions in this API can't be used. For details, see274 //--------------------------------------------------------------------------------------------------281 //--------------------------------------------------------------------------------------------------285 //--------------------------------------------------------------------------------------------------288 //--------------------------------------------------------------------------------------------------292 //--------------------------------------------------------------------------------------------------295 //--------------------------------------------------------------------------------------------------299 //--------------------------------------------------------------------------------------------------302 //--------------------------------------------------------------------------------------------------306 //--------------------------------------------------------------------------------------------------309 //--------------------------------------------------------------------------------------------------313 //--------------------------------------------------------------------------------------------------316 //--------------------------------------------------------------------------------------------------320 //--------------------------------------------------------------------------------------------------323 //--------------------------------------------------------------------------------------------------327 //--------------------------------------------------------------------------------------------------330 //--------------------------------------------------------------------------------------------------334 //--------------------------------------------------------------------------------------------------337 //--------------------------------------------------------------------------------------------------342 //--------------------------------------------------------------------------------------------------345 //--------------------------------------------------------------------------------------------------349 //--------------------------------------------------------------------------------------------------352 //--------------------------------------------------------------------------------------------------356 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------363 //--------------------------------------------------------------------------------------------------366 //--------------------------------------------------------------------------------------------------370 * This event provides information on data session connection state changes for the given profileRef.373 //--------------------------------------------------------------------------------------------------384 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------395 //--------------------------------------------------------------------------------------------------399 * This event provides information on data session connection state changes for the given profileRef.402 //--------------------------------------------------------------------------------------------------411 //--------------------------------------------------------------------------------------------------415 //--------------------------------------------------------------------------------------------------422 //--------------------------------------------------------------------------------------------------436 //--------------------------------------------------------------------------------------------------443 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------460 //--------------------------------------------------------------------------------------------------469 //--------------------------------------------------------------------------------------------------478 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------499 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------517 //--------------------------------------------------------------------------------------------------529 * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to532 //--------------------------------------------------------------------------------------------------539 //--------------------------------------------------------------------------------------------------546 //--------------------------------------------------------------------------------------------------557 //--------------------------------------------------------------------------------------------------570 * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to573 //--------------------------------------------------------------------------------------------------580 //--------------------------------------------------------------------------------------------------592 //--------------------------------------------------------------------------------------------------601 //--------------------------------------------------------------------------------------------------613 //--------------------------------------------------------------------------------------------------624 //--------------------------------------------------------------------------------------------------637 //--------------------------------------------------------------------------------------------------648 //--------------------------------------------------------------------------------------------------650 * Get the gateway IPv4 address for the given profile, if the data session is connected and has an661 //--------------------------------------------------------------------------------------------------672 //--------------------------------------------------------------------------------------------------687 //--------------------------------------------------------------------------------------------------702 //--------------------------------------------------------------------------------------------------715 //--------------------------------------------------------------------------------------------------726 //--------------------------------------------------------------------------------------------------728 * Get the gateway IPv6 address for the given profile, if the data session is connected and has an739 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------765 //--------------------------------------------------------------------------------------------------780 //--------------------------------------------------------------------------------------------------782 * Allow the caller to know if the given profile is actually supporting IPv4, if the data session790 //--------------------------------------------------------------------------------------------------797 //--------------------------------------------------------------------------------------------------799 * Allow the caller to know if the given profile is actually supporting IPv6, if the data session807 //--------------------------------------------------------------------------------------------------814 //--------------------------------------------------------------------------------------------------825 //--------------------------------------------------------------------------------------------------836 //--------------------------------------------------------------------------------------------------847 //--------------------------------------------------------------------------------------------------856 //--------------------------------------------------------------------------------------------------864 //--------------------------------------------------------------------------------------------------870 //--------------------------------------------------------------------------------------------------878 //--------------------------------------------------------------------------------------------------884 //--------------------------------------------------------------------------------------------------892 //--------------------------------------------------------------------------------------------------898 //--------------------------------------------------------------------------------------------------910 //--------------------------------------------------------------------------------------------------919 //--------------------------------------------------------------------------------------------------929 //--------------------------------------------------------------------------------------------------936 //--------------------------------------------------------------------------------------------------956 //--------------------------------------------------------------------------------------------------965 //--------------------------------------------------------------------------------------------------979 //--------------------------------------------------------------------------------------------------986 //--------------------------------------------------------------------------------------------------999 //--------------------------------------------------------------------------------------------------1010 //--------------------------------------------------------------------------------------------------1029 //--------------------------------------------------------------------------------------------------1042 //--------------------------------------------------------------------------------------------------1055 //--------------------------------------------------------------------------------------------------1072 //--------------------------------------------------------------------------------------------------1079 //--------------------------------------------------------------------------------------------------1085 //--------------------------------------------------------------------------------------------------1094 //--------------------------------------------------------------------------------------------------1103 //--------------------------------------------------------------------------------------------------1114 * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv61118 //--------------------------------------------------------------------------------------------------1127 //--------------------------------------------------------------------------------------------------1138 * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv61142 //--------------------------------------------------------------------------------------------------1151 //--------------------------------------------------------------------------------------------------1160 * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv61164 //--------------------------------------------------------------------------------------------------1177 //--------------------------------------------------------------------------------------------------1187 //--------------------------------------------------------------------------------------------------1196 //--------------------------------------------------------------------------------------------------1204 //--------------------------------------------------------------------------------------------------le_result_t le_mdc_GetSessionState(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t *connectionStatePtr)le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler(le_mdc_ProfileRef_t profileRef, le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)le_mdc_Pdp_t le_mdc_GetPDP(le_mdc_ProfileRef_t profileRef)void le_mdc_StartSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)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_SetAPN(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL apnStr)bool le_mdc_IsIPv4(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_GetIPv4GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)le_result_t le_mdc_StopSession(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_GetAPN(le_mdc_ProfileRef_t profileRef, char *apnStr, size_t apnStrSize)le_result_t le_mdc_GetIPv4DNSAddresses(le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)le_result_t le_mdc_GetIPv6Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)int32_t le_mdc_GetPlatformSpecificDisconnectionCodeExt(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)void le_mdc_ConnectService(void)void le_mdc_StopSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mdc_GetInterfaceName(le_mdc_ProfileRef_t profileRef, char *interfaceName, size_t interfaceNameSize)le_result_t le_mdc_GetProfileList(le_mdc_ProfileInfo_t *profileListPtr, size_t *profileListSizePtr)le_result_t le_mdc_SetPDP(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdp)le_result_t le_mdc_GetCidList(uint8_t *cidPtr, size_t *cidSizePtr)bool le_mdc_IsIPv6(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_GetBytesCounters(uint64_t *rxBytesPtr, uint64_t *txBytesPtr)void(* le_mdc_DisconnectHandler_t)(void *)Definition: le_mdc_interface.h:204le_result_t le_mdc_GetAuthentication(le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t *typePtr, char *userName, size_t userNameSize, char *password, size_t passwordSize)void le_mdc_RemoveSessionStateHandler(le_mdc_SessionStateHandlerRef_t handlerRef)void le_mdc_RemoveMtPdpSessionStateHandler(le_mdc_MtPdpSessionStateHandlerRef_t handlerRef)le_result_t le_mdc_TryConnectService(void)void le_mdc_GetPlatformSpecificFailureConnectionReasonExt(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType, int32_t *failureTypePtr, int32_t *failureCodePtr)le_mdc_ProfileRef_t le_mdc_GetProfile(uint32_t index)le_result_t le_mdc_StartSession(le_mdc_ProfileRef_t profileRef)LE_FULL_API void le_mdc_SetServerDisconnectHandler(le_mdc_DisconnectHandler_t disconnectHandler, void *contextPtr)le_result_t le_mdc_ResetBytesCounter(void)void le_mdc_DisconnectService(void)le_result_t le_mdc_GetIPv4Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)le_result_t le_mdc_StartBytesCounter(void)le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler(le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mdc_GetIPv6GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)le_result_t le_mdc_SetAuthentication(le_mdc_ProfileRef_t profileRef, le_mdc_Auth_t type, const char *LE_NONNULL userName, const char *LE_NONNULL password)le_result_t le_mdc_GetProfileFromApn(const char *LE_NONNULL apnStr, le_mdc_ProfileRef_t *profileRefPtr)uint32_t le_mdc_GetProfileIndex(le_mdc_ProfileRef_t profileRef)uint32_t le_mdc_NumProfiles(void)le_result_t le_mdc_SetDefaultAPN(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_StopBytesCounter(void)le_result_t le_mdc_RejectMtPdpSession(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_MapProfileOnNetworkInterface(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL interfaceName)le_result_t le_mdc_GetIPv6DNSAddresses(le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReasonExt(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)