All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pa_mdc.h
Go to the documentation of this file.
1 
31 //--------------------------------------------------------------------------------------------------
39 #ifndef LEGATO_PA_MDC_INCLUDE_GUARD
40 #define LEGATO_PA_MDC_INCLUDE_GUARD
41 
42 #include "legato.h"
43 #include "interfaces.h"
44 
45 
46 //--------------------------------------------------------------------------------------------------
50 //--------------------------------------------------------------------------------------------------
51 #define PA_MDC_MAX_PROFILE 5
52 
53 
54 //--------------------------------------------------------------------------------------------------
58 //--------------------------------------------------------------------------------------------------
59 
60 //--------------------------------------------------------------------------------------------------
66 //--------------------------------------------------------------------------------------------------
67 #define PA_MDC_APN_MAX_LEN LE_MDC_APN_NAME_MAX_LEN
68 
69 //--------------------------------------------------------------------------------------------------
73 //--------------------------------------------------------------------------------------------------
74 #define PA_MDC_APN_MAX_BYTES (PA_MDC_APN_MAX_LEN+1)
75 
76 //--------------------------------------------------------------------------------------------------
82 //--------------------------------------------------------------------------------------------------
83 #define PA_MDC_USERNAME_MAX_LEN LE_MDC_USER_NAME_MAX_LEN
84 
85 //--------------------------------------------------------------------------------------------------
89 //--------------------------------------------------------------------------------------------------
90 #define PA_MDC_USERNAME_MAX_BYTES (PA_MDC_USERNAME_MAX_LEN+1)
91 
92 //--------------------------------------------------------------------------------------------------
98 //--------------------------------------------------------------------------------------------------
99 #define PA_MDC_PWD_MAX_LEN LE_MDC_PASSWORD_NAME_MAX_LEN
100 
101 //--------------------------------------------------------------------------------------------------
105 //--------------------------------------------------------------------------------------------------
106 #define PA_MDC_PWD_MAX_BYTES (PA_MDC_PWD_MAX_LEN+1)
107 
108 //--------------------------------------------------------------------------------------------------
112 //--------------------------------------------------------------------------------------------------
113 typedef struct {
115  char userName[PA_MDC_USERNAME_MAX_BYTES];
116  char password[PA_MDC_APN_MAX_BYTES];
117 }
119 
120 //--------------------------------------------------------------------------------------------------
124 //--------------------------------------------------------------------------------------------------
125 typedef enum {
129 }
131 
132 //--------------------------------------------------------------------------------------------------
136 //--------------------------------------------------------------------------------------------------
137 typedef struct {
141 }
143 
144 
145 //--------------------------------------------------------------------------------------------------
149 //--------------------------------------------------------------------------------------------------
150 typedef enum
151 {
154 }
156 
157 
158 //--------------------------------------------------------------------------------------------------
162 //--------------------------------------------------------------------------------------------------
163 typedef struct {
164  uint32_t profileIndex;
166 }
168 
169 //--------------------------------------------------------------------------------------------------
173 //--------------------------------------------------------------------------------------------------
174 typedef struct {
177 }
179 
180 //--------------------------------------------------------------------------------------------------
189 //--------------------------------------------------------------------------------------------------
190 typedef void (*pa_mdc_SessionStateHandler_t)
191 (
192  pa_mdc_SessionStateData_t* sessionStatePtr
193 );
194 
195 //--------------------------------------------------------------------------------------------------
203 //--------------------------------------------------------------------------------------------------
205 (
206  uint32_t profileIndex,
207  pa_mdc_ProfileData_t* profileDataPtr
208 );
209 
210 
211 //--------------------------------------------------------------------------------------------------
219 //--------------------------------------------------------------------------------------------------
221 (
222  uint32_t profileIndex,
223  pa_mdc_ProfileData_t* profileDataPtr
224 );
225 
226 
227 //--------------------------------------------------------------------------------------------------
236 //--------------------------------------------------------------------------------------------------
238 (
239  uint32_t profileIndex,
240  uint32_t* callRefPtr
241 );
242 
243 //--------------------------------------------------------------------------------------------------
252 //--------------------------------------------------------------------------------------------------
254 (
255  uint32_t profileIndex,
256  uint32_t* callRefPtr
257 );
258 
259 //--------------------------------------------------------------------------------------------------
268 //--------------------------------------------------------------------------------------------------
270 (
271  uint32_t profileIndex,
272  uint32_t* callRefPtr
273 );
274 
275 
276 //--------------------------------------------------------------------------------------------------
284 //--------------------------------------------------------------------------------------------------
286 (
287  uint32_t profileIndex,
288  pa_mdc_SessionType_t* sessionIpPtr
289 );
290 
291 //--------------------------------------------------------------------------------------------------
300 //--------------------------------------------------------------------------------------------------
302 (
303  uint32_t callRef
304 );
305 
306 
307 //--------------------------------------------------------------------------------------------------
315 //--------------------------------------------------------------------------------------------------
317 (
318  uint32_t profileIndex,
319  pa_mdc_SessionState_t* sessionStatePtr
320 );
321 
322 
323 //--------------------------------------------------------------------------------------------------
332 //--------------------------------------------------------------------------------------------------
334 (
335  pa_mdc_SessionStateHandler_t handlerRef
336 );
337 
338 
339 //--------------------------------------------------------------------------------------------------
348 //--------------------------------------------------------------------------------------------------
350 (
351  uint32_t profileIndex,
352  char* interfaceNameStr,
353  size_t interfaceNameStrSize
354 );
355 
356 
357 //--------------------------------------------------------------------------------------------------
366 //--------------------------------------------------------------------------------------------------
368 (
369  uint32_t profileIndex,
370  le_mdmDefs_IpVersion_t ipVersion,
371  char* ipAddrStr,
372  size_t ipAddrStrSize
373 );
374 
375 //--------------------------------------------------------------------------------------------------
384 //--------------------------------------------------------------------------------------------------
386 (
387  uint32_t profileIndex,
388  le_mdmDefs_IpVersion_t ipVersion,
389  char* gatewayAddrStr,
390  size_t gatewayAddrStrSize
391 );
392 
393 //--------------------------------------------------------------------------------------------------
406 //--------------------------------------------------------------------------------------------------
408 (
409  uint32_t profileIndex,
410  le_mdmDefs_IpVersion_t ipVersion,
411  char* dns1AddrStr,
412  size_t dns1AddrStrSize,
413  char* dns2AddrStr,
414  size_t dns2AddrStrSize
415 );
416 
417 //--------------------------------------------------------------------------------------------------
426 //--------------------------------------------------------------------------------------------------
428 (
429  uint32_t profileIndex,
430  char* apnNameStr,
431  size_t apnNameStrSize
432 );
433 
434 //--------------------------------------------------------------------------------------------------
442 //--------------------------------------------------------------------------------------------------
444 (
445  uint32_t profileIndex,
446  le_mdc_DataBearerTechnology_t* downlinkDataBearerTechPtr,
447  le_mdc_DataBearerTechnology_t* uplinkDataBearerTechPtr
448 );
449 
450 //--------------------------------------------------------------------------------------------------
459 //--------------------------------------------------------------------------------------------------
461 (
462  pa_mdc_PktStatistics_t *dataStatisticsPtr
463 );
464 
465 //--------------------------------------------------------------------------------------------------
474 //--------------------------------------------------------------------------------------------------
476 (
477  void
478 );
479 
480 #endif // LEGATO_PA_MDC_INCLUDE_GUARD
481 
IP V4-V6.
Definition: pa_mdc.h:128
pa_mdc_Authentication_t authentication
Authentication.
Definition: pa_mdc.h:139
le_mdc_DataBearerTechnology_t
Definition: le_mdc_interface.h:198
le_mdmDefs_IpVersion_t
Definition: le_mdmDefs_interface.h:39
#define PA_MDC_APN_MAX_BYTES
Definition: pa_mdc.h:74
le_result_t pa_mdc_GetIPAddress(uint32_t profileIndex, le_mdmDefs_IpVersion_t ipVersion, char *ipAddrStr, size_t ipAddrStrSize)
le_result_t pa_mdc_WriteProfile(uint32_t profileIndex, pa_mdc_ProfileData_t *profileDataPtr)
le_result_t pa_mdc_StopSession(uint32_t callRef)
le_result_t
Definition: le_basics.h:34
pa_mdc_SessionState_t
Definition: pa_mdc.h:150
le_result_t pa_mdc_ReadProfile(uint32_t profileIndex, pa_mdc_ProfileData_t *profileDataPtr)
le_mdc_Pdp_t
Definition: le_mdc_interface.h:248
#define PA_MDC_USERNAME_MAX_BYTES
Definition: pa_mdc.h:90
le_result_t pa_mdc_GetDNSAddresses(uint32_t profileIndex, le_mdmDefs_IpVersion_t ipVersion, char *dns1AddrStr, size_t dns1AddrStrSize, char *dns2AddrStr, size_t dns2AddrStrSize)
le_result_t pa_mdc_StartSessionIPV4V6(uint32_t profileIndex, uint32_t *callRefPtr)
pa_mdc_SessionState_t newState
New data session state.
Definition: pa_mdc.h:165
le_result_t pa_mdc_GetInterfaceName(uint32_t profileIndex, char *interfaceNameStr, size_t interfaceNameStrSize)
Definition: pa_mdc.h:137
Data session is connected.
Definition: pa_mdc.h:152
le_result_t pa_mdc_GetDataFlowStatistics(pa_mdc_PktStatistics_t *dataStatisticsPtr)
uint64_t transmittedBytesCount
Number of bytes transmitted without error.
Definition: pa_mdc.h:175
uint32_t profileIndex
Profile that had the state change.
Definition: pa_mdc.h:164
le_result_t pa_mdc_StartSessionIPV4(uint32_t profileIndex, uint32_t *callRefPtr)
void(* pa_mdc_SessionStateHandler_t)(pa_mdc_SessionStateData_t *sessionStatePtr)
Definition: pa_mdc.h:191
le_mdc_Pdp_t pdp
PDP type.
Definition: pa_mdc.h:140
le_result_t pa_mdc_ResetDataFlowStatistics(void)
le_result_t pa_mdc_GetAccessPointName(uint32_t profileIndex, char *apnNameStr, size_t apnNameStrSize)
void pa_mdc_SetSessionStateHandler(pa_mdc_SessionStateHandler_t handlerRef)
le_mdc_Auth_t type
Authentication using PAP.
Definition: pa_mdc.h:114
le_result_t pa_mdc_GetSessionState(uint32_t profileIndex, pa_mdc_SessionState_t *sessionStatePtr)
Data session is disconnected.
Definition: pa_mdc.h:153
le_mdc_Auth_t
Definition: le_mdc_interface.h:268
Definition: pa_mdc.h:174
le_result_t pa_mdc_GetSessionType(uint32_t profileIndex, pa_mdc_SessionType_t *sessionIpPtr)
IP V4.
Definition: pa_mdc.h:126
uint64_t receivedBytesCount
Number of bytes received without error.
Definition: pa_mdc.h:176
pa_mdc_SessionType_t
Definition: pa_mdc.h:125
le_result_t pa_mdc_GetGatewayAddress(uint32_t profileIndex, le_mdmDefs_IpVersion_t ipVersion, char *gatewayAddrStr, size_t gatewayAddrStrSize)
le_result_t pa_mdc_GetDataBearerTechnology(uint32_t profileIndex, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtr)
Definition: pa_mdc.h:113
le_result_t pa_mdc_StartSessionIPV6(uint32_t profileIndex, uint32_t *callRefPtr)
Definition: pa_mdc.h:163
IP V6.
Definition: pa_mdc.h:127