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 the56 * identification number (ICCID). If no match is found in the database using the ICCID, the search78 * le_mdc_MapProfileOnNetworkInterface() may be used to map a data session with a network interface.92 * The current state of a data session can be queried using le_mdc_GetSessionState(). An application100 * the application takes responsibility to trigger the data session for that MT PDP request using141 * These values correspond to the number of bytes received/transmitted since the last software reset182 //--------------------------------------------------------------------------------------------------186 //--------------------------------------------------------------------------------------------------189 //--------------------------------------------------------------------------------------------------192 * Connect the current client thread to the service providing this API. Block until the service is195 * For each thread that wants to use this API, either ConnectService or TryConnectService must be196 * called before any other functions in this API. Normally, ConnectService is automatically called201 //--------------------------------------------------------------------------------------------------207 //--------------------------------------------------------------------------------------------------210 * Try to connect the current client thread to the service providing this API. Return with an error213 * For each thread that wants to use this API, either ConnectService or TryConnectService must be214 * called before any other functions in this API. Normally, ConnectService is automatically called223 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).226 //--------------------------------------------------------------------------------------------------232 //--------------------------------------------------------------------------------------------------236 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants239 //--------------------------------------------------------------------------------------------------246 //--------------------------------------------------------------------------------------------------252 * longer a connection to the service, and the functions in this API can't be used. For details, see257 //--------------------------------------------------------------------------------------------------264 //--------------------------------------------------------------------------------------------------268 //--------------------------------------------------------------------------------------------------271 //--------------------------------------------------------------------------------------------------275 //--------------------------------------------------------------------------------------------------278 //--------------------------------------------------------------------------------------------------282 //--------------------------------------------------------------------------------------------------285 //--------------------------------------------------------------------------------------------------289 //--------------------------------------------------------------------------------------------------292 //--------------------------------------------------------------------------------------------------296 //--------------------------------------------------------------------------------------------------299 //--------------------------------------------------------------------------------------------------303 //--------------------------------------------------------------------------------------------------306 //--------------------------------------------------------------------------------------------------310 //--------------------------------------------------------------------------------------------------313 //--------------------------------------------------------------------------------------------------317 //--------------------------------------------------------------------------------------------------320 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------327 //--------------------------------------------------------------------------------------------------331 //--------------------------------------------------------------------------------------------------334 //--------------------------------------------------------------------------------------------------338 //--------------------------------------------------------------------------------------------------341 //--------------------------------------------------------------------------------------------------345 //--------------------------------------------------------------------------------------------------348 //--------------------------------------------------------------------------------------------------352 //--------------------------------------------------------------------------------------------------355 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------362 //--------------------------------------------------------------------------------------------------366 //--------------------------------------------------------------------------------------------------370 //--------------------------------------------------------------------------------------------------374 //--------------------------------------------------------------------------------------------------409 //--------------------------------------------------------------------------------------------------413 //--------------------------------------------------------------------------------------------------428 //--------------------------------------------------------------------------------------------------432 //--------------------------------------------------------------------------------------------------442 //--------------------------------------------------------------------------------------------------446 //--------------------------------------------------------------------------------------------------463 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------566 //--------------------------------------------------------------------------------------------------570 //--------------------------------------------------------------------------------------------------574 //--------------------------------------------------------------------------------------------------578 //--------------------------------------------------------------------------------------------------582 //--------------------------------------------------------------------------------------------------586 //--------------------------------------------------------------------------------------------------588 (597 //--------------------------------------------------------------------------------------------------601 //--------------------------------------------------------------------------------------------------603 (610 //--------------------------------------------------------------------------------------------------615 //--------------------------------------------------------------------------------------------------617 (626 //--------------------------------------------------------------------------------------------------630 * This event provides information on data session connection state changes for the given profileRef.633 //--------------------------------------------------------------------------------------------------644 //--------------------------------------------------------------------------------------------------648 //--------------------------------------------------------------------------------------------------655 //--------------------------------------------------------------------------------------------------659 * This event provides information on data session connection state changes for the given profileRef.662 //--------------------------------------------------------------------------------------------------671 //--------------------------------------------------------------------------------------------------675 //--------------------------------------------------------------------------------------------------682 //--------------------------------------------------------------------------------------------------696 //--------------------------------------------------------------------------------------------------703 //--------------------------------------------------------------------------------------------------713 //--------------------------------------------------------------------------------------------------720 //--------------------------------------------------------------------------------------------------733 //--------------------------------------------------------------------------------------------------740 //--------------------------------------------------------------------------------------------------747 //--------------------------------------------------------------------------------------------------758 //--------------------------------------------------------------------------------------------------770 //--------------------------------------------------------------------------------------------------777 //--------------------------------------------------------------------------------------------------784 //--------------------------------------------------------------------------------------------------795 //--------------------------------------------------------------------------------------------------807 //--------------------------------------------------------------------------------------------------814 //--------------------------------------------------------------------------------------------------826 //--------------------------------------------------------------------------------------------------835 //--------------------------------------------------------------------------------------------------847 //--------------------------------------------------------------------------------------------------858 //--------------------------------------------------------------------------------------------------871 //--------------------------------------------------------------------------------------------------882 //--------------------------------------------------------------------------------------------------884 * Get the gateway IPv4 address for the given profile, if the data session is connected and has an895 //--------------------------------------------------------------------------------------------------906 //--------------------------------------------------------------------------------------------------921 //--------------------------------------------------------------------------------------------------936 //--------------------------------------------------------------------------------------------------949 //--------------------------------------------------------------------------------------------------960 //--------------------------------------------------------------------------------------------------962 * Get the gateway IPv6 address for the given profile, if the data session is connected and has an973 //--------------------------------------------------------------------------------------------------984 //--------------------------------------------------------------------------------------------------999 //--------------------------------------------------------------------------------------------------1014 //--------------------------------------------------------------------------------------------------1016 * Allow the caller to know if the given profile is actually supporting IPv4, if the data session1024 //--------------------------------------------------------------------------------------------------1031 //--------------------------------------------------------------------------------------------------1033 * Allow the caller to know if the given profile is actually supporting IPv6, if the data session1041 //--------------------------------------------------------------------------------------------------1048 //--------------------------------------------------------------------------------------------------1059 //--------------------------------------------------------------------------------------------------1070 //--------------------------------------------------------------------------------------------------1081 //--------------------------------------------------------------------------------------------------1090 //--------------------------------------------------------------------------------------------------1098 //--------------------------------------------------------------------------------------------------1104 //--------------------------------------------------------------------------------------------------1116 //--------------------------------------------------------------------------------------------------1125 //--------------------------------------------------------------------------------------------------1135 //--------------------------------------------------------------------------------------------------1142 //--------------------------------------------------------------------------------------------------1158 //--------------------------------------------------------------------------------------------------1168 //--------------------------------------------------------------------------------------------------1182 //--------------------------------------------------------------------------------------------------1189 //--------------------------------------------------------------------------------------------------1202 //--------------------------------------------------------------------------------------------------1213 //--------------------------------------------------------------------------------------------------1227 * @note Both PAP and CHAP authentification can be set for 3GPP network: in this case, the device1232 //--------------------------------------------------------------------------------------------------1246 //--------------------------------------------------------------------------------------------------1259 //--------------------------------------------------------------------------------------------------1276 //--------------------------------------------------------------------------------------------------1283 //--------------------------------------------------------------------------------------------------1289 //--------------------------------------------------------------------------------------------------1298 //--------------------------------------------------------------------------------------------------1308 //--------------------------------------------------------------------------------------------------1317 //--------------------------------------------------------------------------------------------------1324 //--------------------------------------------------------------------------------------------------1333 //--------------------------------------------------------------------------------------------------1340 //--------------------------------------------------------------------------------------------------1347 //--------------------------------------------------------------------------------------------------1358 //--------------------------------------------------------------------------------------------------1368 //--------------------------------------------------------------------------------------------------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)void(* le_mdc_MtPdpSessionStateHandlerFunc_t)(le_mdc_ConState_t ConnectionState, void *contextPtr)Definition: le_mdc_interface.h:603le_result_t le_mdc_GetDataBearerTechnology(le_mdc_ProfileRef_t profileRef, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtrPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtrPtr)struct le_mdc_SessionStateHandler * le_mdc_SessionStateHandlerRef_tDefinition: le_mdc_interface.h:571bool le_mdc_IsIPv4(le_mdc_ProfileRef_t profileRef)void(* le_mdc_SessionStateHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)Definition: le_mdc_interface.h:588le_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)void le_mdc_SetServerDisconnectHandler(le_mdc_DisconnectHandler_t disconnectHandler, void *contextPtr)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)cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:554void le_mdc_ConnectService(void)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:474void le_mdc_StopSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:544le_result_t le_mdc_GetInterfaceName(le_mdc_ProfileRef_t profileRef, char *interfaceName, size_t interfaceNameSize)le_result_t le_mdc_SetPDP(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdp)bool le_mdc_IsIPv6(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:522le_result_t le_mdc_GetBytesCounters(uint64_t *rxBytesPtr, uint64_t *txBytesPtr)le_result_t le_mdc_MapProfileOnNetworkInterface(le_mdc_ProfileRef_t profileRef, const char *interfaceName)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:494cf. 3GPP 24.008 Annex I2Definition: le_mdc_interface.h:548CDMA2000 HRPD (1xEV-DO)Definition: le_mdc_interface.h:399cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:536le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:516void(* le_mdc_DisconnectHandler_t)(void *)Definition: le_mdc_interface.h:187le_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)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:492void le_mdc_GetPlatformSpecificFailureConnectionReason(le_mdc_ProfileRef_t profileRef, int32_t *failureTypePtr, int32_t *failureCodePtr)void le_mdc_RemoveSessionStateHandler(le_mdc_SessionStateHandlerRef_t handlerRef)void le_mdc_RemoveMtPdpSessionStateHandler(le_mdc_MtPdpSessionStateHandlerRef_t handlerRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:484le_result_t le_mdc_TryConnectService(void)le_mdc_ProfileRef_t le_mdc_GetProfile(uint32_t index)int32_t le_mdc_GetPlatformSpecificDisconnectionCode(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_StartSession(le_mdc_ProfileRef_t profileRef)le_result_t le_mdc_ResetBytesCounter(void)void le_mdc_DisconnectService(void)struct le_mdc_MtPdpSessionStateHandler * le_mdc_MtPdpSessionStateHandlerRef_tDefinition: le_mdc_interface.h:579le_result_t le_mdc_GetIPv4Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler(le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)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_GetIPv6GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)le_result_t le_mdc_GetProfileFromApn(const char *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)void(* le_mdc_SessionHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_result_t result, void *contextPtr)Definition: le_mdc_interface.h:617le_result_t le_mdc_RejectMtPdpSession(le_mdc_ProfileRef_t profileRef)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:530CDMA2000 HRPD (1xEV-DO RevA)Definition: le_mdc_interface.h:401le_result_t le_mdc_SetAPN(le_mdc_ProfileRef_t profileRef, const char *apnStr)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:518le_result_t le_mdc_GetIPv6DNSAddresses(le_mdc_ProfileRef_t profileRef, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:488cf. 3GPP 24.008 Annex I1Definition: le_mdc_interface.h:486