#include "legato.h"
#include "le_mdc.h"
#include "le_mdm_defs.h"
Go to the source code of this file.
|
| le_result_t | pa_mdc_ReadProfile (uint32_t profileIndex, pa_mdc_ProfileData_t *profileDataPtr) |
| |
| le_result_t | pa_mdc_WriteProfile (uint32_t profileIndex, pa_mdc_ProfileData_t *profileDataPtr) |
| |
| le_result_t | pa_mdc_StartSessionIPV4 (uint32_t profileIndex, uint32_t *callRefPtr) |
| |
| le_result_t | pa_mdc_StartSessionIPV6 (uint32_t profileIndex, uint32_t *callRefPtr) |
| |
| le_result_t | pa_mdc_StartSessionIPV4V6 (uint32_t profileIndex, uint32_t *callRefPtr) |
| |
| le_result_t | pa_mdc_GetSessionType (uint32_t profileIndex, pa_mdc_SessionType_t *sessionIpPtr) |
| |
| le_result_t | pa_mdc_StopSession (uint32_t callRef) |
| |
| le_result_t | pa_mdc_GetSessionState (uint32_t profileIndex, pa_mdc_SessionState_t *sessionStatePtr) |
| |
| void | pa_mdc_SetSessionStateHandler (pa_mdc_SessionStateHandler_t handlerRef) |
| |
| le_result_t | pa_mdc_GetInterfaceName (uint32_t profileIndex, char *interfaceNameStr, size_t interfaceNameStrSize) |
| |
| le_result_t | pa_mdc_GetIPAddress (uint32_t profileIndex, le_IpVersion_t ipVersion, char *ipAddrStr, size_t ipAddrStrSize) |
| |
| le_result_t | pa_mdc_GetGatewayAddress (uint32_t profileIndex, le_IpVersion_t ipVersion, char *gatewayAddrStr, size_t gatewayAddrStrSize) |
| |
| le_result_t | pa_mdc_GetDNSAddresses (uint32_t profileIndex, le_IpVersion_t ipVersion, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize) |
| |
| le_result_t | pa_mdc_GetAccessPointName (uint32_t profileIndex, char *apnNameStr, size_t apnNameStrSize) |
| |
| le_result_t | pa_mdc_GetDataBearerTechnology (uint32_t profileIndex, le_mdc_dataBearerTechnology_t *dataBearerTechnologyPtr) |
| |
| le_result_t | pa_mdc_GetDataFlowStatistics (pa_mdc_PktStatistics_t *dataStatisticsPtr) |
| |
| le_result_t | pa_mdc_ResetDataFlowStatistics (void) |
| |
Legato Modem Data Control Platform Adapter API include file.
Copyright (C) Sierra Wireless, Inc. 2013. All rights reserved. Use of this work is subject to license.
Define the maximum length for an APN null-ended string
| #define PA_MDC_APN_MAX_LEN 100 |
Define the maximum length for an APN entry
| #define PA_MDC_MAX_PROFILE 5 |
Maximum number of profile objects supported
Define the maximum length for a Profile Name null-ended string
Define the maximum size of various modem data profile related fields. Define the maximum length for a Profile Name entry
Define the maximum length for an password null-ended string
| #define PA_MDC_PWD_MAX_LEN 100 |
Define the maximum length for a password entry
Define the maximum length for an userName null-ended string
| #define PA_MDC_USERNAME_MAX_LEN 64 |
Define the maximum length for an userName entry
Prototype for data session state handler function.
This handler will receive reports of any changes to the data session state.
- Parameters
-
| sessionStatePtr | The session state. Must be freed using le_mem_Release() when done. |
Enumerates the possible values for the authentication type
| Enumerator |
|---|
| PA_MDC_AUTH_NONE |
no authentication
|
| PA_MDC_AUTH_PAP |
PAP protocol.
|
| PA_MDC_AUTH_CHAP |
CHAP protocol.
|
Enumerates the possible values for the data session state
| Enumerator |
|---|
| PA_MDC_CONNECTED |
Data session is connected.
|
| PA_MDC_DISCONNECTED |
Data session is disconnected.
|
Session IP family
| Enumerator |
|---|
| PA_MDC_SESSION_IPV4 |
IP V4.
|
| PA_MDC_SESSION_IPV6 |
IP V6.
|
| PA_MDC_SESSION_IPV4V6 |
IP V4-V6.
|
| le_result_t pa_mdc_GetAccessPointName |
( |
uint32_t |
profileIndex, |
|
|
char * |
apnNameStr, |
|
|
size_t |
apnNameStrSize |
|
) |
| |
Get the Access Point Name for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_OVERFLOW if the Access Point Name would not fit in apnNameStr
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | apnNameStr | The Access Point Name |
| [in] | apnNameStrSize | The size in bytes of the address buffer |
Get the Data Bearer Technology for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | dataBearerTechnologyPtr | The data bearer technology |
Get data flow statistics since the last reset.
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [out] | dataStatisticsPtr | Statistics data |
| le_result_t pa_mdc_GetDNSAddresses |
( |
uint32_t |
profileIndex, |
|
|
le_IpVersion_t |
ipVersion, |
|
|
char * |
dns1AddrStr, |
|
|
size_t |
dns1AddrStrSize, |
|
|
char * |
dns2AddrStr, |
|
|
size_t |
dns2AddrStrSize |
|
) |
| |
Get the primary/secondary DNS addresses for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_OVERFLOW if the IP address would not fit in buffer
- LE_NOT_POSSIBLE 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
- Parameters
-
| [in] | profileIndex | The profile to use |
| [in] | ipVersion | IP Version |
| [out] | dns1AddrStr | The primary DNS IP address in dotted format |
| [in] | dns1AddrStrSize | The size in bytes of the dns1AddrStr buffer |
| [out] | dns2AddrStr | The secondary DNS IP address in dotted format |
| [in] | dns2AddrStrSize | The size in bytes of the dns2AddrStr buffer |
| le_result_t pa_mdc_GetGatewayAddress |
( |
uint32_t |
profileIndex, |
|
|
le_IpVersion_t |
ipVersion, |
|
|
char * |
gatewayAddrStr, |
|
|
size_t |
gatewayAddrStrSize |
|
) |
| |
Get the gateway IP address for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [in] | profileIndex | The profile to use |
| [in] | ipVersion | IP Version |
| [out] | gatewayAddrStr | The gateway IP address in dotted format |
| [in] | gatewayAddrStrSize | The size in bytes of the address buffer |
| le_result_t pa_mdc_GetInterfaceName |
( |
uint32_t |
profileIndex, |
|
|
char * |
interfaceNameStr, |
|
|
size_t |
interfaceNameStrSize |
|
) |
| |
Get the name of the network interface for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_OVERFLOW if the interface name would not fit in interfaceNameStr
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | interfaceNameStr | The name of the network interface |
| [in] | interfaceNameStrSize | The size in bytes of the name buffer |
| le_result_t pa_mdc_GetIPAddress |
( |
uint32_t |
profileIndex, |
|
|
le_IpVersion_t |
ipVersion, |
|
|
char * |
ipAddrStr, |
|
|
size_t |
ipAddrStrSize |
|
) |
| |
Get the IP address for the given profile, if the data session is connected.
- Returns
- LE_OK on success
- LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
- LE_NOT_POSSIBLE for all other errors
- Parameters
-
| [in] | profileIndex | The profile to use |
| [in] | ipVersion | IP Version |
| [out] | ipAddrStr | The IP address in dotted format |
| [in] | ipAddrStrSize | The size in bytes of the address buffer |
Get the session state for the given profile
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE on error
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | sessionStatePtr | The data session state |
Get session type for the given profile ( IP V4 or V6 )
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE for other failures
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | sessionIpPtr | IP family session |
Read the profile data for the given profile
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE on failure
- Parameters
-
| [in] | profileIndex | The profile to read |
| [out] | profileDataPtr | The profile data |
Reset data flow statistics
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE for all other errors
Register a handler for session state notifications.
If the handler is NULL, then the previous handler will be removed.
- Note
- The process exits on failure
- Parameters
-
| [in] | handlerRef | The session state handler function. |
| le_result_t pa_mdc_StartSessionIPV4 |
( |
uint32_t |
profileIndex, |
|
|
uint32_t * |
callRefPtr |
|
) |
| |
Start a data session with the given profile using IPV4
- Returns
- LE_OK on success
- LE_DUPLICATE if the data session is already connected
- LE_NOT_POSSIBLE for other failures
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | callRefPtr | Reference used for stopping the data session |
| le_result_t pa_mdc_StartSessionIPV4V6 |
( |
uint32_t |
profileIndex, |
|
|
uint32_t * |
callRefPtr |
|
) |
| |
Start a data session with the given profile using IPV4-V6
- Returns
- LE_OK on success
- LE_DUPLICATE if the data session is already connected
- LE_NOT_POSSIBLE for other failures
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | callRefPtr | Reference used for stopping the data session |
| le_result_t pa_mdc_StartSessionIPV6 |
( |
uint32_t |
profileIndex, |
|
|
uint32_t * |
callRefPtr |
|
) |
| |
Start a data session with the given profile using IPV6
- Returns
- LE_OK on success
- LE_DUPLICATE if the data session is already connected
- LE_NOT_POSSIBLE for other failures
- Parameters
-
| [in] | profileIndex | The profile to use |
| [out] | callRefPtr | Reference used for stopping the data session |
Stop a data session for the given profile
- Returns
- LE_OK on success
- LE_DUPLICATE if the data session has already been stopped (i.e. it is disconnected)
- LE_NOT_POSSIBLE for other failures
- Parameters
-
| [in] | callRef | The call reference returned when starting the sessions |
Write the profile data for the given profile
- Returns
- LE_OK on success
- LE_NOT_POSSIBLE on failure
- Parameters
-
| [in] | profileIndex | The profile to write |
| [in] | profileDataPtr | The profile data |