le_mdc_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_mdc Modem Data Control
14  *
15  * @ref le_mdc_interface.h "API Reference"
16  *
17  * <HR>
18  *
19  * A data session is useful for applications that need to send or receive data over a network
20  * where SMS messages are insufficient. To start a data session, a data profile must
21  * be configured as specified by the target network.
22  *
23  * The Modem Data Control (mdc) API is used to manage data profiles and data sessions.
24  *
25  * @section le_mdc_binding IPC interfaces binding
26  *
27  * All the functions of this API are provided by the @b modemService service.
28  *
29  * Here's a code sample binding to modem services:
30  * @verbatim
31  bindings:
32  {
33  clientExe.clientComponent.le_mdc -> modemService.le_mdc
34  }
35  @endverbatim
36  *
37  * @section le_mdc_profile Data Profiles
38  *
39  * If a pre-defined data profile has been configured then this profile can
40  * be loaded using le_mdc_GetProfile().
41  * le_mdc_GetProfile() must be called with @c LE_MDC_DEFAULT_PROFILE to retrieve the default index
42  * used by the modem for data connection.
43  * le_mdc_GetProfile() must be called with @c LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE to retrieve the
44  * default index used by the modem for Bearer Independent Protocol (BIP).
45  * The maximum number of data profiles supported is modem dependent and can be retrieved with
46  * le_mdc_NumProfiles().
47  *
48  * @note le_mdc_GetProfile() creates a new profile if the profile's index can't be found.
49  *
50  * @warning 0 is not a valid index.
51  *
52  * A pre-defined data profile can be retrieved using le_mdc_GetProfileFromApn() thanks to its
53  * APN.
54  *
55  * A default APN can be set for a defined profile with le_mdc_SetDefaultAPN(), based on the SIM
56  * identification number (ICCID). If no match is found in the database using the ICCID, the search
57  * falls back on the home network (MCC/MNC) to determine the default APN.
58  *
59  * @warning Ensure to check the list of supported data profiles for your specific platform.
60  *
61  * The following data profile parameters can be retrieved:
62  * - Packet Data Protocol using le_mdc_GetPDP().
63  * - Access Point Name using le_mdc_GetAPN().
64  * - Authentication settings using le_mdc_GetAuthentication().
65  *
66  * The following data profile parameters can be set:
67  * - Packet Data Protocol using le_mdc_SetPDP().
68  * - Access Point Name using le_mdc_SetAPN().
69  * - Authentication settings using le_mdc_SetAuthentication().
70  *
71  * @warning The maximum APN length might be limited by the platform.
72  * Please refer to the platform documentation.
73  *
74  * A sample code can be seen in the following page:
75  * - @subpage c_mdcDataProfiles
76  *
77  * @section le_mdc_session Data Sessions
78  *
79  * @subsection le_mdc_session_MO Mobile Originated (MO-PDP context activation)
80  *
81  * le_mdc_MapProfileOnNetworkInterface() may be used to map a data session with a network interface.
82  * To take effect, this API has to be called before starting the data session. Otherwise, the
83  * mapping will be taken into account at the next start of the data profile.
84  *
85  * A data session can be started using le_mdc_StartSession(). To start a data session, a
86  * data profile must be created and written to the modem, or an existing data profile
87  * can be used. A data session can be stopped using le_mdc_StopSession(). The number of
88  * simultaneous data sessions supported is dependent on the modem, but cannot be more than the
89  * maximum number of supported profiles.
90  *
91  * A data session can be started using le_mdc_StartSessionAsync() and stopped using
92  * le_mdc_StopSessionAsync(). These functions are not blocking. The response will be returned
93  * with the @c le_mdc_SessionHandlerFunc_t handler function.
94  *
95  * The current state of a data session can be queried using le_mdc_GetSessionState(). An application
96  * can also a register handler to be notified when the session state changes. The handler
97  * can be managed using le_mdc_AddSessionStateHandler() and le_mdc_RemoveSessionStateHandler().
98  *
99  * @subsection le_mdc_session_MT Mobile Terminated (MT-PDP context activation)
100  * To be notified by the MT-PDP context request, the application has to subscribe to the state
101  * handler using le_mdc_AddMtPdpSessionStateHandler().
102  * When the incoming MT-PDP context request is notified,
103  * the application takes responsibility to trigger the data session for that MT PDP request using
104  * le_mdc_StartSession(). That data session can be stopped using le_mdc_StopSession().
105  *
106  * The network interface settings of that MT-PDP context can be retrieved using the provided
107  * Data Profile.
108  * Please refer to @ref le_mdc_session_networkItf.
109  *
110  * A data session can be rejected using le_mdc_RejectMtPdpSession().
111  * The number of simultaneous data sessions supported is dependent on the modem,
112  * but cannot be more than the maximum number of supported profiles.
113  *
114  * The handler can be released using le_mdc_RemoveMtPdpSessionStateHandler().
115  *
116  * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to
117  * @ref MT-PDP_context section for full details.
118  *
119  * @subsection le_mdc_session_networkItf Network interface settings
120  * Once a data session starts, a Linux network interface is created. It's the application's
121  * responsibility to configure the network interface, usually through a DHCP client. Query the
122  * interface name using le_mdc_GetInterfaceName(). The IP Preference can be checked with
123  * le_mdc_IsIPv4() or le_mdc_IsIPv6() when the profile is connected. The IP address for the
124  * current data session
125  * can be retrieved by le_mdc_GetIPv4Address() or le_mdc_GetIPv6Address(). The Gateway and
126  * DNS
127  * addresses can be retrieved using le_mdc_GetIPv4GatewayAddress(),
128  * le_mdc_GetIPv4DNSAddresses() or le_mdc_GetIPv6GatewayAddress(), le_mdc_GetIPv6DNSAddresses().
129  * The Access Point Name can be retrieved by le_mdc_GetAPN(). The Data bearer
130  * Technology can be retrieved by le_mdc_GetDataBearerTechnology().
131  *
132  * le_mdc_GetDisconnectionReason() or le_mdc_GetPlatformSpecificDisconnectionCode() let you get
133  * the reason for disconnection of data session by retrieving the call end failure code
134  * from @c le_mdc_ProfileRef_t.
135  *
136  * le_mdc_GetPlatformSpecificFailureConnectionReason() let you get the data session connection
137  * failure reason by retrieving the call connection failure code and type from
138  * @c le_mdc_ProfileRef_t.
139  *
140  * Please refer to @ref platformConstraintsSpecificErrorCodes for platform specific
141  * disconnection code description.
142  *
143  * A sample code can be seen in the following page:
144  * - @subpage c_mdcDataSessions
145  *
146  * The following extended functions should be used to get the disconnection reason instead.
147  * A pdpType parameter is required to specify which session's(IPv4 or IPv6 session) disconnect
148  * reason to get for IPv4v6 mode. For IPv4 and IPv6 mode, the pdpType is ignored because there
149  * is only one session.
150  * - le_mdc_GetDisconnectionReasonExt()
151  * - le_mdc_GetPlatformSpecificDisconnectionCodeExt()
152  * - le_mdc_GetPlatformSpecificFailureConnectionReasonExt()
153  *
154  * @section le_mdc_dataStatistics Data Statistics
155  *
156  * The amount of received and transmitted data can be retrieved through le_mdc_GetBytesCounters().
157  * The returned values correspond to the number of received and transmitted
158  * bytes since the last call to le_mdc_ResetBytesCounter().
159  *
160  * The data statistics collection can be enabled with le_mdc_StartBytesCounter() and disabled
161  * without resetting the counters with le_mdc_StopBytesCounter().
162  *
163  * @note The data statistics collection activation and the data counters are persistent even after
164  * a reboot of the platform.
165  *
166  * A sample code can be seen in the following page:
167  * - @subpage c_mdcDataStatistics
168  *
169  * <HR>
170  *
171  * Copyright (C) Sierra Wireless Inc.
172  */
173 /**
174  * @page c_mdcDataProfiles Sample code for Data Profiles
175  *
176  * @snippet "apps/test/modemServices/mdc/mdcIntegrationTest/mdcTestComp/mdcTest.c" Profiles
177  */
178 /**
179  * @page c_mdcDataSessions Sample code for network interface settings
180  *
181  * @snippet "apps/test/modemServices/mdc/mdcIntegrationTest/mdcTestComp/mdcTest.c" Sessions
182  */
183 /**
184  * @page c_mdcDataStatistics Sample code for Data Statistics
185  *
186  * @snippet "apps/test/modemServices/mdc/mdcIntegrationTest/mdcTestComp/mdcTest.c" Statistics
187  */
188 /**
189  * @file le_mdc_interface.h
190  *
191  * Legato @ref c_mdc include file.
192  *
193  * Copyright (C) Sierra Wireless Inc.
194  */
195 
196 #ifndef LE_MDC_INTERFACE_H_INCLUDE_GUARD
197 #define LE_MDC_INTERFACE_H_INCLUDE_GUARD
198 
199 
200 #include "legato.h"
201 
202 
203 //--------------------------------------------------------------------------------------------------
204 /**
205  * Type for handler called when a server disconnects.
206  */
207 //--------------------------------------------------------------------------------------------------
208 typedef void (*le_mdc_DisconnectHandler_t)(void *);
209 
210 //--------------------------------------------------------------------------------------------------
211 /**
212  *
213  * Connect the current client thread to the service providing this API. Block until the service is
214  * available.
215  *
216  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
217  * called before any other functions in this API. Normally, ConnectService is automatically called
218  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
219  *
220  * This function is created automatically.
221  */
222 //--------------------------------------------------------------------------------------------------
224 (
225  void
226 );
227 
228 //--------------------------------------------------------------------------------------------------
229 /**
230  *
231  * Try to connect the current client thread to the service providing this API. Return with an error
232  * if the service is not available.
233  *
234  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
235  * called before any other functions in this API. Normally, ConnectService is automatically called
236  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
237  *
238  * This function is created automatically.
239  *
240  * @return
241  * - LE_OK if the client connected successfully to the service.
242  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
243  * bound.
244  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
245  * - LE_COMM_ERROR if the Service Directory cannot be reached.
246  */
247 //--------------------------------------------------------------------------------------------------
249 (
250  void
251 );
252 
253 //--------------------------------------------------------------------------------------------------
254 /**
255  * Set handler called when server disconnection is detected.
256  *
257  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
258  * to continue without exiting, it should call longjmp() from inside the handler.
259  */
260 //--------------------------------------------------------------------------------------------------
262 (
263  le_mdc_DisconnectHandler_t disconnectHandler,
264  void *contextPtr
265 );
266 
267 //--------------------------------------------------------------------------------------------------
268 /**
269  *
270  * Disconnect the current client thread from the service providing this API.
271  *
272  * Normally, this function doesn't need to be called. After this function is called, there's no
273  * longer a connection to the service, and the functions in this API can't be used. For details, see
274  * @ref apiFilesC_client.
275  *
276  * This function is created automatically.
277  */
278 //--------------------------------------------------------------------------------------------------
280 (
281  void
282 );
283 
284 
285 //--------------------------------------------------------------------------------------------------
286 /**
287  * Maximum number of bytes in a interface name (not including the null-terminator).
288  */
289 //--------------------------------------------------------------------------------------------------
290 #define LE_MDC_INTERFACE_NAME_MAX_LEN 20
291 
292 //--------------------------------------------------------------------------------------------------
293 /**
294  * Maximum number of bytes in a profile name (including the null-terminator).
295  */
296 //--------------------------------------------------------------------------------------------------
297 #define LE_MDC_INTERFACE_NAME_MAX_BYTES 21
298 
299 //--------------------------------------------------------------------------------------------------
300 /**
301  * Maximum number of bytes in an IPv4 address (not including the null-terminator).
302  */
303 //--------------------------------------------------------------------------------------------------
304 #define LE_MDC_IPV4_ADDR_MAX_LEN 15
305 
306 //--------------------------------------------------------------------------------------------------
307 /**
308  * Maximum number of bytes in an IPv4 address (including the null-terminator).
309  */
310 //--------------------------------------------------------------------------------------------------
311 #define LE_MDC_IPV4_ADDR_MAX_BYTES 16
312 
313 //--------------------------------------------------------------------------------------------------
314 /**
315  * Maximum number of bytes in an IPv6 address (not including the null-terminator).
316  */
317 //--------------------------------------------------------------------------------------------------
318 #define LE_MDC_IPV6_ADDR_MAX_LEN 45
319 
320 //--------------------------------------------------------------------------------------------------
321 /**
322  * Maximum number of bytes in an IPv6 address (including the null-terminator).
323  */
324 //--------------------------------------------------------------------------------------------------
325 #define LE_MDC_IPV6_ADDR_MAX_BYTES 46
326 
327 //--------------------------------------------------------------------------------------------------
328 /**
329  * Maximum number of bytes in a apn name (not including the null-terminator).
330  */
331 //--------------------------------------------------------------------------------------------------
332 #define LE_MDC_APN_NAME_MAX_LEN 100
333 
334 //--------------------------------------------------------------------------------------------------
335 /**
336  * Maximum number of bytes in a apn name (including the null-terminator).
337  */
338 //--------------------------------------------------------------------------------------------------
339 #define LE_MDC_APN_NAME_MAX_BYTES 101
340 
341 //--------------------------------------------------------------------------------------------------
342 /**
343  * Maximum number of bytes in a user name (not including the null-terminator).
344  */
345 //--------------------------------------------------------------------------------------------------
346 #define LE_MDC_USER_NAME_MAX_LEN 64
347 
348 //--------------------------------------------------------------------------------------------------
349 /**
350  * Maximum number of bytes in a user name (including the null-terminator).
351  */
352 //--------------------------------------------------------------------------------------------------
353 #define LE_MDC_USER_NAME_MAX_BYTES 65
354 
355 //--------------------------------------------------------------------------------------------------
356 /**
357  * Maximum number of bytes in a password name (not including the null-terminator).
358  */
359 //--------------------------------------------------------------------------------------------------
360 #define LE_MDC_PASSWORD_NAME_MAX_LEN 100
361 
362 //--------------------------------------------------------------------------------------------------
363 /**
364  * Maximum number of bytes in a password name (including the null-terminator).
365  */
366 //--------------------------------------------------------------------------------------------------
367 #define LE_MDC_PASSWORD_NAME_MAX_BYTES 101
368 
369 //--------------------------------------------------------------------------------------------------
370 /**
371  * Default profile definition.
372  */
373 //--------------------------------------------------------------------------------------------------
374 #define LE_MDC_DEFAULT_PROFILE -1
375 
376 //--------------------------------------------------------------------------------------------------
377 /**
378  * Default profile definition for Bearer Independent Protocol (BIP).
379  */
380 //--------------------------------------------------------------------------------------------------
381 #define LE_MDC_SIMTOOLKIT_BIP_DEFAULT_PROFILE -2
382 
383 //--------------------------------------------------------------------------------------------------
384 /**
385  * @deprecated LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE is deprecated.
386  * LE_MDC_DISC_USER_AUTHENTICATION_FAILURE should be used instead.
387  */
388 //--------------------------------------------------------------------------------------------------
389 #define LE_MDC_DISC_USER_AUTHENTIFICATION_FAILURE 7
390 
391 //--------------------------------------------------------------------------------------------------
392 /**
393  * Reference to a modem data connection profile.
394  */
395 //--------------------------------------------------------------------------------------------------
396 typedef struct le_mdc_Profile* le_mdc_ProfileRef_t;
397 
398 
399 //--------------------------------------------------------------------------------------------------
400 /**
401  * Enumeration of data bearer technologies.
402  */
403 //--------------------------------------------------------------------------------------------------
404 typedef enum
405 {
407  ///< Unknown
409  ///< GSM
411  ///< GPRS
413  ///< Enhanced GPRS (EDGE)
415  ///< WCDMA (UMTS)
417  ///< HSPA
419  ///< HSPA+
421  ///< Dual Cell - HSPA+
423  ///< HSDPA
425  ///< HSUPA
427  ///< Dual Cell - HSUPA
429  ///< Dual Cell - HSPA
431  ///< LTE
433  ///< LTE FDD
435  ///< LTE TDD
437  ///< LTE CA DL
439  ///< LTE CA UL
441  ///< TD-SCDMA
443  ///< CDMA2000 1X
445  ///< CDMA2000 HRPD (1xEV-DO)
447  ///< CDMA2000 HRPD (1xEV-DO RevA)
449  ///< CDMA2000 EHRPD
451  ///< IS95 1X
453  ///< HDR REV0 DPA
455  ///< HDR REVA DPA
457  ///< HDR REVB DPA
459  ///< HDR REVA MPA
461  ///< HDR REVB MPA
463  ///< HDR REVA EMPA
465  ///< HDR REVB EMPA
467  ///< HDR REVB MMPA
469  ///< HDR EVDO FMC
471  ///< 64 QAM
473  ///< S2B
474 }
476 
477 
478 //--------------------------------------------------------------------------------------------------
479 /**
480  * Enumeration of Packet Data Protocol.
481  */
482 //--------------------------------------------------------------------------------------------------
483 typedef enum
484 {
486  ///< Unknown
488  ///< IPv4
490  ///< IPv6
492  ///< IPv4 and IPv6
493 }
495 
496 
497 //--------------------------------------------------------------------------------------------------
498 /**
499  * Authentication bit mask.
500  */
501 //--------------------------------------------------------------------------------------------------
502 typedef enum
503 {
504  LE_MDC_AUTH_NONE = 0x1, ///< no authentication
505  LE_MDC_AUTH_PAP = 0x2, ///< PAP protocol
506  LE_MDC_AUTH_CHAP = 0x4 ///< CHAP protocol
507 }
509 
510 
511 //--------------------------------------------------------------------------------------------------
512 /**
513  * Enumeration of connection state.
514  */
515 //--------------------------------------------------------------------------------------------------
516 typedef enum
517 {
519  ///< Data session is disconnected
521  ///< Authenticating data session
523  ///< Data session is connected
525  ///< Suspending data session
527  ///< Incoming data session (MT-PDP context request)
528 }
530 
531 
532 //--------------------------------------------------------------------------------------------------
533 /**
534  * Enumeration of the possible reasons for the disconnection.
535  */
536 //--------------------------------------------------------------------------------------------------
537 typedef enum
538 {
540  ///< Modem has no service
542  ///< cf. 3GPP 24.008 Annex I1
544  ///< cf. 3GPP 24.008 Annex I1
546  ///< cf. 3GPP 24.008 Annex I1
548  ///< cf. 3GPP 24.008 Annex I1
550  ///< cf. 3GPP 24.008 Annex I1
552  ///< cf. 3GPP 24.008 Annex I1
554  ///< cf. 3GPP 24.008 Annex I1
556  ///< cf. 3GPP 24.008 Annex I1
558  ///< cf. 3GPP 24.008 Annex I1
560  ///< cf. 3GPP 24.008 Annex I1
562  ///< cf. 3GPP 24.008 Annex I1
564  ///< cf. 3GPP 24.008 Annex I1
566  ///< cf. 3GPP 24.008 Annex I1
568  ///< cf. 3GPP 24.008 Annex I1
570  ///< cf. 3GPP 24.008 Annex I1
572  ///< cf. 3GPP 24.008 Annex I1
574  ///< cf. 3GPP 24.008 Annex I1
576  ///< cf. 3GPP 24.008 Annex I1
578  ///< cf. 3GPP 24.008 Annex I1
580  ///< cf. 3GPP 24.008 Annex I1
582  ///< cf. 3GPP 24.008 Annex I1
584  ///< cf. 3GPP 24.008 Annex I1
586  ///< cf. 3GPP 24.008 Annex I1
588  ///< cf. 3GPP 24.008 Annex I1
590  ///< cf. 3GPP 24.008 Annex I1
592  ///< cf. 3GPP 24.008 Annex I1
594  ///< cf. 3GPP 24.008 Annex I1
596  ///< cf. 3GPP 24.008 Annex I1
598  ///< cf. 3GPP 24.008 Annex I1
600  ///< cf. 3GPP 24.008 Annex I1
602  ///< cf. 3GPP 24.008 Annex I1
604  ///< cf. 3GPP 24.008 Annex I1
606  ///< cf. 3GPP 24.008 Annex I1
608  ///< cf. 3GPP 24.008 Annex I1
610  ///< cf. 3GPP 24.008 Annex I2
612  ///< cf. 3GPP 24.008 Annex I2
614  ///< cf. 3GPP 24.008 Annex I2
616  ///< cf. 3GPP 24.008 Annex I2
618  ///< cf. 3GPP 24.008 Annex I2
620  ///< cf. 3GPP 24.008 Annex I2
622  ///< cf. 3GPP 24.008 Annex I2
624  ///< cf. 3GPP 24.008 Annex I2
626  ///< cf. 3GPP 24.008 Annex I2
628  ///< Platform specific code.
630  ///< Undefined reason.
631 }
633 
634 
635 //--------------------------------------------------------------------------------------------------
636 /**
637  * Reference type used by Add/Remove functions for EVENT 'le_mdc_SessionState'
638  */
639 //--------------------------------------------------------------------------------------------------
640 typedef struct le_mdc_SessionStateHandler* le_mdc_SessionStateHandlerRef_t;
641 
642 
643 //--------------------------------------------------------------------------------------------------
644 /**
645  * Reference type used by Add/Remove functions for EVENT 'le_mdc_MtPdpSessionState'
646  */
647 //--------------------------------------------------------------------------------------------------
648 typedef struct le_mdc_MtPdpSessionStateHandler* le_mdc_MtPdpSessionStateHandlerRef_t;
649 
650 
651 //--------------------------------------------------------------------------------------------------
652 /**
653  * Handler for Data session connection state changes.
654  */
655 //--------------------------------------------------------------------------------------------------
656 typedef void (*le_mdc_SessionStateHandlerFunc_t)
657 (
658  le_mdc_ProfileRef_t profileRef,
659  ///< Profile reference
660  le_mdc_ConState_t ConnectionState,
661  ///< Data session connection state.
662  void* contextPtr
663  ///<
664 );
665 
666 //--------------------------------------------------------------------------------------------------
667 /**
668  * Handler for MT-PDP Data session connection state changes.
669  */
670 //--------------------------------------------------------------------------------------------------
672 (
673  le_mdc_ConState_t ConnectionState,
674  ///< MT-PDP Data session connection state.
675  void* contextPtr
676  ///<
677 );
678 
679 //--------------------------------------------------------------------------------------------------
680 /**
681  * Handler for asynchronous session start and stop result response
682  *
683  */
684 //--------------------------------------------------------------------------------------------------
685 typedef void (*le_mdc_SessionHandlerFunc_t)
686 (
687  le_mdc_ProfileRef_t profileRef,
688  ///< Profile reference
689  le_result_t result,
690  ///< Session start or stop result response
691  void* contextPtr
692  ///<
693 );
694 
695 //--------------------------------------------------------------------------------------------------
696 /**
697  * Add handler function for EVENT 'le_mdc_SessionState'
698  *
699  * This event provides information on data session connection state changes for the given profileRef.
700  *
701  */
702 //--------------------------------------------------------------------------------------------------
704 (
705  le_mdc_ProfileRef_t profileRef,
706  ///< [IN] The profile object of interest
708  ///< [IN]
709  void* contextPtr
710  ///< [IN]
711 );
712 
713 //--------------------------------------------------------------------------------------------------
714 /**
715  * Remove handler function for EVENT 'le_mdc_SessionState'
716  */
717 //--------------------------------------------------------------------------------------------------
719 (
721  ///< [IN]
722 );
723 
724 //--------------------------------------------------------------------------------------------------
725 /**
726  * Add handler function for EVENT 'le_mdc_MtPdpSessionState'
727  *
728  * This event provides information on data session connection state changes for the given profileRef.
729  *
730  */
731 //--------------------------------------------------------------------------------------------------
733 (
735  ///< [IN]
736  void* contextPtr
737  ///< [IN]
738 );
739 
740 //--------------------------------------------------------------------------------------------------
741 /**
742  * Remove handler function for EVENT 'le_mdc_MtPdpSessionState'
743  */
744 //--------------------------------------------------------------------------------------------------
746 (
748  ///< [IN]
749 );
750 
751 //--------------------------------------------------------------------------------------------------
752 /**
753  * Get Profile Reference for index
754  *
755  * @note Create a new profile if the profile's index can't be found.
756  *
757  * @warning 0 is not a valid index.
758  *
759  * @warning Ensure to check the list of supported data profiles for your specific platform.
760  *
761  * @return
762  * - Reference to the data profile
763  * - NULL if the profile index does not exist
764  */
765 //--------------------------------------------------------------------------------------------------
767 (
768  uint32_t index
769  ///< [IN] index of the profile.
770 );
771 
772 //--------------------------------------------------------------------------------------------------
773 /**
774  * Get the index for the given Profile.
775  *
776  * @return
777  * - index of the profile in the modem
778  *
779  * @note
780  * The process exits, if an invalid profile object is given
781  */
782 //--------------------------------------------------------------------------------------------------
783 uint32_t le_mdc_GetProfileIndex
784 (
785  le_mdc_ProfileRef_t profileRef
786  ///< [IN] Query this profile object
787 );
788 
789 //--------------------------------------------------------------------------------------------------
790 /**
791  * Start profile data session.
792  *
793  * @return
794  * - LE_OK on success
795  * - LE_BAD_PARAMETER if input parameter is incorrect
796  * - LE_DUPLICATE if the data session is already connected for the given profile
797  * - LE_FAULT for other failures
798  *
799  * @note
800  * The process exits, if an invalid profile object is given
801  */
802 //--------------------------------------------------------------------------------------------------
804 (
805  le_mdc_ProfileRef_t profileRef
806  ///< [IN] Start data session for this profile object
807 );
808 
809 //--------------------------------------------------------------------------------------------------
810 /**
811  * Start profile data session.
812  *
813  * @note
814  * The process exits, if an invalid profile object is given
815  */
816 //--------------------------------------------------------------------------------------------------
818 (
819  le_mdc_ProfileRef_t profileRef,
820  ///< [IN] Start data session for this profile object
821  le_mdc_SessionHandlerFunc_t handlerPtr,
822  ///< [IN] Handler for start data session result
823  void* contextPtr
824  ///< [IN]
825 );
826 
827 //--------------------------------------------------------------------------------------------------
828 /**
829  * Stop profile data session.
830  *
831  * @return
832  * - LE_OK on success
833  * - LE_BAD_PARAMETER if the input parameter is not valid
834  * - LE_FAULT for other failures
835  *
836  * @note
837  * The process exits, if an invalid profile object is given
838  *
839  * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to
840  * @ref MT-PDP_context section for full details.
841  */
842 //--------------------------------------------------------------------------------------------------
844 (
845  le_mdc_ProfileRef_t profileRef
846  ///< [IN] Stop data session for this profile object
847 );
848 
849 //--------------------------------------------------------------------------------------------------
850 /**
851  * Stop profile data session.
852  *
853  * @note
854  * The process exits, if an invalid profile object is given
855  */
856 //--------------------------------------------------------------------------------------------------
858 (
859  le_mdc_ProfileRef_t profileRef,
860  ///< [IN] Stop data session for this profile object
861  le_mdc_SessionHandlerFunc_t handlerPtr,
862  ///< [IN] Handler for stop data session result
863  void* contextPtr
864  ///< [IN]
865 );
866 
867 //--------------------------------------------------------------------------------------------------
868 /**
869  * Reject MT-PDP profile data session.
870  *
871  * @return
872  * - LE_OK on success
873  * - LE_BAD_PARAMETER if the input parameter is not valid
874  * - LE_UNSUPPORTED if not supported by the target
875  * - LE_FAULT for other failures
876  *
877  * @note
878  * The process exits, if an invalid profile object is given
879  *
880  * @warning The MT-PDP context activation feature is not supported on all platforms. Please refer to
881  * @ref MT-PDP_context section for full details.
882  */
883 //--------------------------------------------------------------------------------------------------
885 (
886  le_mdc_ProfileRef_t profileRef
887  ///< [IN] Reject MT-PDP data session for this profile object
888 );
889 
890 //--------------------------------------------------------------------------------------------------
891 /**
892  * Get the current data session state.
893  *
894  * @return
895  * - LE_OK on success
896  * - LE_BAD_PARAMETER if an input parameter is not valid
897  * - LE_FAULT on failure
898  *
899  * @note
900  * The process exits, if an invalid profile object is given
901  */
902 //--------------------------------------------------------------------------------------------------
904 (
905  le_mdc_ProfileRef_t profileRef,
906  ///< [IN] Query this profile object
907  le_mdc_ConState_t* connectionStatePtr
908  ///< [OUT] The data session state
909 );
910 
911 //--------------------------------------------------------------------------------------------------
912 /**
913  * Get the network interface name, if the data session is connected.
914  *
915  * @return
916  * - LE_OK on success
917  * - LE_OVERFLOW if the interface name would not fit in interfaceNameStr
918  * - LE_FAULT for all other errors
919  *
920  * @note
921  * The process exits, if an invalid profile object is given
922  */
923 //--------------------------------------------------------------------------------------------------
925 (
926  le_mdc_ProfileRef_t profileRef,
927  ///< [IN] Query this profile object
928  char* interfaceName,
929  ///< [OUT] The name of the network interface
930  size_t interfaceNameSize
931  ///< [IN]
932 );
933 
934 //--------------------------------------------------------------------------------------------------
935 /**
936  * Get the IPv4 address for the given profile, if the data session is connected and has an IPv4
937  * address.
938  *
939  * @return
940  * - LE_OK on success
941  * - LE_OVERFLOW if the IP address would not fit in ipAddrStr
942  * - LE_FAULT for all other errors
943  *
944  * @note
945  * The process exits, if an invalid profile object is given
946  */
947 //--------------------------------------------------------------------------------------------------
949 (
950  le_mdc_ProfileRef_t profileRef,
951  ///< [IN] Query this profile object
952  char* ipAddr,
953  ///< [OUT] The IP address in dotted format
954  size_t ipAddrSize
955  ///< [IN]
956 );
957 
958 //--------------------------------------------------------------------------------------------------
959 /**
960  * Get the gateway IPv4 address for the given profile, if the data session is connected and has an
961  * IPv4 address.
962  *
963  * @return
964  * - LE_OK on success
965  * - LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
966  * - LE_FAULT for all other errors
967  *
968  * @note
969  * The process exits, if an invalid profile object is given
970  */
971 //--------------------------------------------------------------------------------------------------
973 (
974  le_mdc_ProfileRef_t profileRef,
975  ///< [IN] Query this profile object
976  char* gatewayAddr,
977  ///< [OUT] The gateway IP address in dotted format
978  size_t gatewayAddrSize
979  ///< [IN]
980 );
981 
982 //--------------------------------------------------------------------------------------------------
983 /**
984  * Get the primary/secondary DNS v4 addresses for the given profile, if the data session is
985  * connected and has an IPv4 address.
986  *
987  * @return
988  * - LE_OK on success
989  * - LE_OVERFLOW if the IP address would not fit in buffer
990  * - LE_FAULT for all other errors
991  *
992  * @note
993  * - If only one DNS address is available, then it will be returned, and an empty string will
994  * be returned for the unavailable address
995  * - The process exits, if an invalid profile object is given
996  */
997 //--------------------------------------------------------------------------------------------------
999 (
1000  le_mdc_ProfileRef_t profileRef,
1001  ///< [IN] Query this profile object
1002  char* dns1AddrStr,
1003  ///< [OUT] The primary DNS IP address in dotted format
1004  size_t dns1AddrStrSize,
1005  ///< [IN]
1006  char* dns2AddrStr,
1007  ///< [OUT] The secondary DNS IP address in dotted format
1008  size_t dns2AddrStrSize
1009  ///< [IN]
1010 );
1011 
1012 //--------------------------------------------------------------------------------------------------
1013 /**
1014  * Get the IPv6 address for the given profile, if the data session is connected and has an IPv6
1015  * address.
1016  *
1017  * @return
1018  * - LE_OK on success
1019  * - LE_OVERFLOW if the IP address would not fit in ipAddrStr
1020  * - LE_FAULT for all other errors
1021  *
1022  * @note
1023  * The process exits, if an invalid profile object is given
1024  */
1025 //--------------------------------------------------------------------------------------------------
1027 (
1028  le_mdc_ProfileRef_t profileRef,
1029  ///< [IN] Query this profile object
1030  char* ipAddr,
1031  ///< [OUT] The IP address in dotted format
1032  size_t ipAddrSize
1033  ///< [IN]
1034 );
1035 
1036 //--------------------------------------------------------------------------------------------------
1037 /**
1038  * Get the gateway IPv6 address for the given profile, if the data session is connected and has an
1039  * IPv6 address.
1040  *
1041  * @return
1042  * - LE_OK on success
1043  * - LE_OVERFLOW if the IP address would not fit in gatewayAddrStr
1044  * - LE_FAULT for all other errors
1045  *
1046  * @note
1047  * The process exits, if an invalid profile object is given
1048  */
1049 //--------------------------------------------------------------------------------------------------
1051 (
1052  le_mdc_ProfileRef_t profileRef,
1053  ///< [IN] Query this profile object
1054  char* gatewayAddr,
1055  ///< [OUT] The gateway IP address in dotted format
1056  size_t gatewayAddrSize
1057  ///< [IN]
1058 );
1059 
1060 //--------------------------------------------------------------------------------------------------
1061 /**
1062  * Get the primary/secondary DNS v6 addresses, if the data session is connected and has an IPv6
1063  * address.
1064  *
1065  * @return
1066  * - LE_OK on success
1067  * - LE_OVERFLOW if the IP address can't fit in buffer
1068  * - LE_FAULT for all other errors
1069  *
1070  * @note
1071  * - If only one DNS address is available, it will be returned, and an empty string will
1072  * be returned for the unavailable address.
1073  * - The process exits, if an invalid profile object is given
1074  */
1075 //--------------------------------------------------------------------------------------------------
1077 (
1078  le_mdc_ProfileRef_t profileRef,
1079  ///< [IN] Query this profile object
1080  char* dns1AddrStr,
1081  ///< [OUT] The primary DNS IP address in dotted format
1082  size_t dns1AddrStrSize,
1083  ///< [IN]
1084  char* dns2AddrStr,
1085  ///< [OUT] The secondary DNS IP address in dotted format
1086  size_t dns2AddrStrSize
1087  ///< [IN]
1088 );
1089 
1090 //--------------------------------------------------------------------------------------------------
1091 /**
1092  * Allow the caller to know if the given profile is actually supporting IPv4, if the data session
1093  * is connected.
1094  *
1095  * @return TRUE if PDP type is IPv4, FALSE otherwise.
1096  *
1097  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1098  * function will not return.
1099  */
1100 //--------------------------------------------------------------------------------------------------
1101 bool le_mdc_IsIPv4
1102 (
1103  le_mdc_ProfileRef_t profileRef
1104  ///< [IN] Query this profile object
1105 );
1106 
1107 //--------------------------------------------------------------------------------------------------
1108 /**
1109  * Allow the caller to know if the given profile is actually supporting IPv6, if the data session
1110  * is connected.
1111  *
1112  * @return TRUE if PDP type is IPv6, FALSE otherwise.
1113  *
1114  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1115  * function will not return.
1116  */
1117 //--------------------------------------------------------------------------------------------------
1118 bool le_mdc_IsIPv6
1119 (
1120  le_mdc_ProfileRef_t profileRef
1121  ///< [IN] Query this profile object
1122 );
1123 
1124 //--------------------------------------------------------------------------------------------------
1125 /**
1126  * Get the Data Bearer Technology for the given profile, if the data session is connected.
1127  *
1128  * @return
1129  * - LE_OK on success
1130  * - LE_FAULT for all other errors
1131  *
1132  * @note
1133  * The process exits, if an invalid profile object is given
1134  */
1135 //--------------------------------------------------------------------------------------------------
1137 (
1138  le_mdc_ProfileRef_t profileRef,
1139  ///< [IN] Query this profile object
1140  le_mdc_DataBearerTechnology_t* downlinkDataBearerTechPtrPtr,
1141  ///< [OUT] downlink data bearer technology
1142  le_mdc_DataBearerTechnology_t* uplinkDataBearerTechPtrPtr
1143  ///< [OUT] uplink data bearer technology
1144 );
1145 
1146 //--------------------------------------------------------------------------------------------------
1147 /**
1148  * Get number of bytes received/transmitted without error since the last reset.
1149  *
1150  * @return
1151  * - LE_OK on success
1152  * - LE_FAULT for all other errors
1153  *
1154  * @note
1155  * - The process exits, if an invalid pointer is given
1156  */
1157 //--------------------------------------------------------------------------------------------------
1159 (
1160  uint64_t* rxBytesPtr,
1161  ///< [OUT] bytes amount received since the last counter reset
1162  uint64_t* txBytesPtr
1163  ///< [OUT] bytes amount transmitted since the last counter reset
1164 );
1165 
1166 //--------------------------------------------------------------------------------------------------
1167 /**
1168  * Reset received/transmitted data flow statistics
1169  *
1170  * @return
1171  * - LE_OK on success
1172  * - LE_FAULT for all other errors
1173  */
1174 //--------------------------------------------------------------------------------------------------
1176 (
1177  void
1178 );
1179 
1180 //--------------------------------------------------------------------------------------------------
1181 /**
1182  * Stop collecting received/transmitted data flow statistics
1183  *
1184  * @return
1185  * - LE_OK on success
1186  * - LE_FAULT for all other errors
1187  */
1188 //--------------------------------------------------------------------------------------------------
1190 (
1191  void
1192 );
1193 
1194 //--------------------------------------------------------------------------------------------------
1195 /**
1196  * Start collecting received/transmitted data flow statistics
1197  *
1198  * @return
1199  * - LE_OK on success
1200  * - LE_FAULT for all other errors
1201  */
1202 //--------------------------------------------------------------------------------------------------
1204 (
1205  void
1206 );
1207 
1208 //--------------------------------------------------------------------------------------------------
1209 /**
1210  * Set the Packet Data Protocol (PDP) for the given profile.
1211  *
1212  * @return
1213  * - LE_OK on success
1214  * - LE_BAD_PARAMETER if the PDP is not supported
1215  * - LE_FAULT if the data session is currently connected for the given profile
1216  *
1217  * @note
1218  * The process exits, if an invalid profile object is given
1219  */
1220 //--------------------------------------------------------------------------------------------------
1222 (
1223  le_mdc_ProfileRef_t profileRef,
1224  ///< [IN] Query this profile object
1225  le_mdc_Pdp_t pdp
1226  ///< [IN] The Packet Data Protocol
1227 );
1228 
1229 //--------------------------------------------------------------------------------------------------
1230 /**
1231  * Get the Packet Data Protocol (PDP) for the given profile.
1232  *
1233  * @return
1234  * - packet data protocol value
1235  *
1236  * @note
1237  * The process exits, if an invalid profile object is given
1238  */
1239 //--------------------------------------------------------------------------------------------------
1241 (
1242  le_mdc_ProfileRef_t profileRef
1243  ///< [IN] Query this profile object
1244 );
1245 
1246 //--------------------------------------------------------------------------------------------------
1247 /**
1248  * Set the Access Point Name (APN) for the given profile.
1249  *
1250  * The APN must be an ASCII string.
1251  *
1252  * @return
1253  * - LE_OK on success
1254  * - LE_BAD_PARAMETER if an input parameter is not valid
1255  * - LE_FAULT if the data session is currently connected for the given profile
1256  *
1257  * @note If APN is too long (max APN_NAME_MAX_LEN digits), it is a fatal error, the
1258  * function will not return.
1259  *
1260  * @warning The maximum APN length might be limited by the platform.
1261  * Please refer to the platform documentation @ref platformConstraintsMdc.
1262  *
1263  * @note
1264  * The process exits, if an invalid profile object is given
1265  */
1266 //--------------------------------------------------------------------------------------------------
1268 (
1269  le_mdc_ProfileRef_t profileRef,
1270  ///< [IN] Query this profile object
1271  const char* LE_NONNULL apnStr
1272  ///< [IN] The Access Point Name
1273 );
1274 
1275 //--------------------------------------------------------------------------------------------------
1276 /**
1277  * Set the Access Point Name (APN) for the given profile according to the SIM identification
1278  * number (ICCID). If no APN is found using the ICCID, fall back on the home network (MCC/MNC)
1279  * to determine the default APN.
1280  *
1281  * @return
1282  * - LE_OK on success
1283  * - LE_BAD_PARAMETER if an input parameter is not valid
1284  * - LE_FAULT for all other errors
1285  *
1286  * @note
1287  * The process exits if an invalid profile object is given
1288  */
1289 //--------------------------------------------------------------------------------------------------
1291 (
1292  le_mdc_ProfileRef_t profileRef
1293  ///< [IN] Query this profile object
1294 );
1295 
1296 //--------------------------------------------------------------------------------------------------
1297 /**
1298  * Get the Access Point Name (APN) for the given profile.
1299  *
1300  * @return
1301  * - LE_OK on success
1302  * - LE_BAD_PARAMETER if an input parameter is not valid
1303  * - LE_OVERFLOW if the APN is is too long
1304  * - LE_FAULT on failed
1305  *
1306  * @note
1307  * The process exits, if an invalid profile object is given
1308  */
1309 //--------------------------------------------------------------------------------------------------
1311 (
1312  le_mdc_ProfileRef_t profileRef,
1313  ///< [IN] Query this profile object
1314  char* apnStr,
1315  ///< [OUT] The Access Point Name
1316  size_t apnStrSize
1317  ///< [IN]
1318 );
1319 
1320 //--------------------------------------------------------------------------------------------------
1321 /**
1322  * Set authentication property
1323  *
1324  * @return
1325  * - LE_OK on success
1326  *
1327  * @note
1328  * - The process exits, if userName or password are NULL when type is not PA_MDC_AUTH_NONE
1329  * - The process exits, if an invalid profile object is given
1330  * @note If userName is too long (max USER_NAME_MAX_LEN digits), it is a fatal error, the
1331  * function will not return.
1332  * @note If password is too long (max PASSWORD_NAME_MAX_LEN digits), it is a fatal error, the
1333  * function will not return.
1334  * @note Both PAP and CHAP authentication can be set for 3GPP network: in this case, the device
1335  * decides which authentication procedure is performed. For example, the device can have a
1336  * policy to select the most secure authentication mechanism.
1337  *
1338  */
1339 //--------------------------------------------------------------------------------------------------
1341 (
1342  le_mdc_ProfileRef_t profileRef,
1343  ///< [IN] Query this profile object
1344  le_mdc_Auth_t type,
1345  ///< [IN] Authentication type
1346  const char* LE_NONNULL userName,
1347  ///< [IN] UserName used by authentication
1348  const char* LE_NONNULL password
1349  ///< [IN] Password used by authentication
1350 );
1351 
1352 //--------------------------------------------------------------------------------------------------
1353 /**
1354  * Get authentication property
1355  *
1356  * @return
1357  * - LE_OK on success
1358  * - LE_BAD_PARAMETER if an input parameter is not valid
1359  * - LE_OVERFLOW userName or password are too small
1360  * - LE_FAULT on failed
1361  *
1362  * @note
1363  * The process exits, if an invalid profile object is given
1364  */
1365 //--------------------------------------------------------------------------------------------------
1367 (
1368  le_mdc_ProfileRef_t profileRef,
1369  ///< [IN] Query this profile object
1370  le_mdc_Auth_t* typePtr,
1371  ///< [OUT] Authentication type
1372  char* userName,
1373  ///< [OUT] UserName used by authentication
1374  size_t userNameSize,
1375  ///< [IN]
1376  char* password,
1377  ///< [OUT] Password used by authentication
1378  size_t passwordSize
1379  ///< [IN]
1380 );
1381 
1382 //--------------------------------------------------------------------------------------------------
1383 /**
1384  * Get the number of profiles on the modem.
1385  *
1386  * @return
1387  * - number of profiles existing on modem
1388  */
1389 //--------------------------------------------------------------------------------------------------
1390 uint32_t le_mdc_NumProfiles
1391 (
1392  void
1393 );
1394 
1395 //--------------------------------------------------------------------------------------------------
1396 /**
1397  * Get a profile selected by its APN
1398  *
1399  * @return
1400  * - LE_OK on success
1401  * - LE_BAD_PARAMETER if an input parameter is not valid
1402  * - LE_NOT_FOUND if the requested APN is not found
1403  */
1404 //--------------------------------------------------------------------------------------------------
1406 (
1407  const char* LE_NONNULL apnStr,
1408  ///< [IN] The Access Point Name
1409  le_mdc_ProfileRef_t* profileRefPtr
1410  ///< [OUT] profile reference
1411 );
1412 
1413 //--------------------------------------------------------------------------------------------------
1414 /**
1415  * Called to get the disconnection reason.
1416  *
1417  * @return The disconnection reason.
1418  *
1419  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1420  * function will not return.
1421  *
1422  * @deprecated This function is deprecated, le_mdc_GetDisconnectionReasonExt should be used for the
1423  * new code.
1424  */
1425 //--------------------------------------------------------------------------------------------------
1427 (
1428  le_mdc_ProfileRef_t profileRef
1429  ///< [IN] profile reference
1430 );
1431 
1432 //--------------------------------------------------------------------------------------------------
1433 /**
1434  * Called to get the platform specific disconnection code.
1435  *
1436  * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific
1437  * disconnection code description.
1438  *
1439  * @return The platform specific disconnection code.
1440  *
1441  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1442  * function will not return.
1443  *
1444  * @deprecated This function is deprecated, le_mdc_GetPlatformSpecificDisconnectionCodeExt should
1445  * be used for the new code.
1446  */
1447 //--------------------------------------------------------------------------------------------------
1449 (
1450  le_mdc_ProfileRef_t profileRef
1451  ///< [IN] profile reference
1452 );
1453 
1454 //--------------------------------------------------------------------------------------------------
1455 /**
1456  * Called to get the platform specific connection failure reason.
1457  *
1458  * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific
1459  * connection failure types and code descriptions.
1460  *
1461  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1462  * function will not return.
1463  *
1464  * @deprecated This function is deprecated, le_mdc_GetPlatformSpecificFailureConnectionReasonExt
1465  * should be used for new code.
1466  */
1467 //--------------------------------------------------------------------------------------------------
1469 (
1470  le_mdc_ProfileRef_t profileRef,
1471  ///< [IN] profile reference
1472  int32_t* failureTypePtr,
1473  ///< [OUT] platform specific failure type
1474  int32_t* failureCodePtr
1475  ///< [OUT] platform specific failure code
1476 );
1477 
1478 //--------------------------------------------------------------------------------------------------
1479 /**
1480  * Called to get the disconnection reason.
1481  *
1482  * @return The disconnection reason.
1483  *
1484  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1485  * function will not return.
1486  * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6
1487  * session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for
1488  * IPv4 and IPv6 mode.
1489  */
1490 //--------------------------------------------------------------------------------------------------
1492 (
1493  le_mdc_ProfileRef_t profileRef,
1494  ///< [IN] profile reference
1495  le_mdc_Pdp_t pdpType
1496  ///< [IN] pdp type of session
1497 );
1498 
1499 //--------------------------------------------------------------------------------------------------
1500 /**
1501  * Called to get the platform specific disconnection code.
1502  *
1503  * Refer to @ref platformConstraintsSpecificErrorCodes for platform specific
1504  * disconnection code description.
1505  *
1506  * @return The platform specific disconnection code.
1507  *
1508  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1509  * function will not return.
1510  * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6
1511  * session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for
1512  * IPv4 and IPv6 mode.
1513  */
1514 //--------------------------------------------------------------------------------------------------
1516 (
1517  le_mdc_ProfileRef_t profileRef,
1518  ///< [IN] profile reference
1519  le_mdc_Pdp_t pdpType
1520  ///< [IN] pdp type of session
1521 );
1522 
1523 //--------------------------------------------------------------------------------------------------
1524 /**
1525  * Called to get the platform specific connection failure reason.
1526  *
1527  * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
1528  * function will not return.
1529  * @note For IPv4v6 mode, pdpType specifies which session's disconnect reason to get(IPv4 or IPv6
1530  * session). For IPv4 and IPv6 mode, pdpType is ignored because there is only one session for
1531  * IPv4 and IPv6 mode.
1532  */
1533 //--------------------------------------------------------------------------------------------------
1535 (
1536  le_mdc_ProfileRef_t profileRef,
1537  ///< [IN] profile reference
1538  le_mdc_Pdp_t pdpType,
1539  ///< [IN] pdp type of session
1540  int32_t* failureTypePtr,
1541  ///< [OUT] platform specific failure type
1542  int32_t* failureCodePtr
1543  ///< [OUT] platform specific failure code
1544 );
1545 
1546 //--------------------------------------------------------------------------------------------------
1547 /**
1548  * Map a profile on a network interface
1549  *
1550  * * @return
1551  * - LE_OK on success
1552  * - LE_UNSUPPORTED if not supported by the target
1553  * - LE_FAULT for all other errors
1554  *
1555  */
1556 //--------------------------------------------------------------------------------------------------
1558 (
1559  le_mdc_ProfileRef_t profileRef,
1560  ///< [IN] Profile reference
1561  const char* LE_NONNULL interfaceName
1562  ///< [IN] Network interface name
1563 );
1564 
1565 #endif // LE_MDC_INTERFACE_H_INCLUDE_GUARD
le_result_t le_mdc_GetSessionState(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t *connectionStatePtr)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:593
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:553
le_mdc_SessionStateHandlerRef_t le_mdc_AddSessionStateHandler(le_mdc_ProfileRef_t profileRef, le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
Suspending data session.
Definition: le_mdc_interface.h:524
Data session is disconnected.
Definition: le_mdc_interface.h:518
le_mdc_DataBearerTechnology_t
Definition: le_mdc_interface.h:404
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:672
HDR REVB MPA.
Definition: le_mdc_interface.h:460
Dual Cell - HSPA+.
Definition: le_mdc_interface.h:420
le_result_t le_mdc_GetDataBearerTechnology(le_mdc_ProfileRef_t profileRef, le_mdc_DataBearerTechnology_t *downlinkDataBearerTechPtrPtr, le_mdc_DataBearerTechnology_t *uplinkDataBearerTechPtrPtr)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:581
le_result_t le_mdc_SetAPN(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL apnStr)
Data session is connected.
Definition: le_mdc_interface.h:522
Dual Cell - HSUPA.
Definition: le_mdc_interface.h:426
struct le_mdc_SessionStateHandler * le_mdc_SessionStateHandlerRef_t
Definition: le_mdc_interface.h:640
IPv4 and IPv6.
Definition: le_mdc_interface.h:491
le_result_t
Definition: le_basics.h:35
bool le_mdc_IsIPv4(le_mdc_ProfileRef_t profileRef)
IPv4.
Definition: le_mdc_interface.h:487
64 QAM
Definition: le_mdc_interface.h:470
void(* le_mdc_SessionStateHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_mdc_ConState_t ConnectionState, void *contextPtr)
Definition: le_mdc_interface.h:657
Incoming data session (MT-PDP context request)
Definition: le_mdc_interface.h:526
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:625
Platform specific code.
Definition: le_mdc_interface.h:627
LTE TDD.
Definition: le_mdc_interface.h:434
le_mdc_Pdp_t
Definition: le_mdc_interface.h:483
le_mdc_DisconnectionReason_t
Definition: le_mdc_interface.h:537
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:619
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:575
le_result_t le_mdc_GetIPv4GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)
HSUPA.
Definition: le_mdc_interface.h:424
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:607
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)
Undefined reason.
Definition: le_mdc_interface.h:629
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:623
int32_t le_mdc_GetPlatformSpecificDisconnectionCodeExt(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:547
void le_mdc_ConnectService(void)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:543
Authenticating data session.
Definition: le_mdc_interface.h:520
no authentication
Definition: le_mdc_interface.h:504
struct le_mdc_Profile * le_mdc_ProfileRef_t
Definition: le_mdc_interface.h:396
void le_mdc_StopSessionAsync(le_mdc_ProfileRef_t profileRef, le_mdc_SessionHandlerFunc_t handlerPtr, void *contextPtr)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:571
HDR REVB EMPA.
Definition: le_mdc_interface.h:464
HSPA+.
Definition: le_mdc_interface.h:418
S2B.
Definition: le_mdc_interface.h:472
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:613
le_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)
CHAP protocol.
Definition: le_mdc_interface.h:506
WCDMA (UMTS)
Definition: le_mdc_interface.h:414
HDR REVA DPA.
Definition: le_mdc_interface.h:454
HSPA.
Definition: le_mdc_interface.h:416
bool le_mdc_IsIPv6(le_mdc_ProfileRef_t profileRef)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:597
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:567
IS95 1X.
Definition: le_mdc_interface.h:450
Enhanced GPRS (EDGE)
Definition: le_mdc_interface.h:412
IPv6.
Definition: le_mdc_interface.h:489
Unknown.
Definition: le_mdc_interface.h:485
LTE FDD.
Definition: le_mdc_interface.h:432
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:591
Unknown.
Definition: le_mdc_interface.h:406
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:577
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:579
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:595
Dual Cell - HSPA.
Definition: le_mdc_interface.h:428
le_result_t le_mdc_GetBytesCounters(uint64_t *rxBytesPtr, uint64_t *txBytesPtr)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:563
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:617
CDMA2000 HRPD (1xEV-DO)
Definition: le_mdc_interface.h:444
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:605
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReason(le_mdc_ProfileRef_t profileRef)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:585
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:615
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:611
void(* le_mdc_DisconnectHandler_t)(void *)
Definition: le_mdc_interface.h:208
le_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 I1
Definition: le_mdc_interface.h:561
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:545
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:621
void 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 I1
Definition: le_mdc_interface.h:559
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)
HDR REVB MMPA.
Definition: le_mdc_interface.h:466
le_mdc_ProfileRef_t le_mdc_GetProfile(uint32_t index)
Modem has no service.
Definition: le_mdc_interface.h:539
int32_t le_mdc_GetPlatformSpecificDisconnectionCode(le_mdc_ProfileRef_t profileRef)
LTE CA DL.
Definition: le_mdc_interface.h:436
HDR REVA EMPA.
Definition: le_mdc_interface.h:462
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:541
HDR EVDO FMC.
Definition: le_mdc_interface.h:468
CDMA2000 EHRPD.
Definition: le_mdc_interface.h:448
le_result_t le_mdc_StartSession(le_mdc_ProfileRef_t profileRef)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:603
le_result_t le_mdc_ResetBytesCounter(void)
void le_mdc_DisconnectService(void)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:583
struct le_mdc_MtPdpSessionStateHandler * le_mdc_MtPdpSessionStateHandlerRef_t
Definition: le_mdc_interface.h:648
le_result_t le_mdc_GetIPv4Address(le_mdc_ProfileRef_t profileRef, char *ipAddr, size_t ipAddrSize)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:589
HDR REVB DPA.
Definition: le_mdc_interface.h:456
HSDPA.
Definition: le_mdc_interface.h:422
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:601
le_result_t le_mdc_StartBytesCounter(void)
le_mdc_MtPdpSessionStateHandlerRef_t le_mdc_AddMtPdpSessionStateHandler(le_mdc_SessionStateHandlerFunc_t handlerPtr, void *contextPtr)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:549
le_result_t le_mdc_GetIPv6GatewayAddress(le_mdc_ProfileRef_t profileRef, char *gatewayAddr, size_t gatewayAddrSize)
le_mdc_ConState_t
Definition: le_mdc_interface.h:516
LTE.
Definition: le_mdc_interface.h:430
le_mdc_Auth_t
Definition: le_mdc_interface.h:502
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)
GPRS.
Definition: le_mdc_interface.h:410
le_result_t le_mdc_GetProfileFromApn(const char *LE_NONNULL apnStr, le_mdc_ProfileRef_t *profileRefPtr)
HDR REVA MPA.
Definition: le_mdc_interface.h:458
PAP protocol.
Definition: le_mdc_interface.h:505
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)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:551
LTE CA UL.
Definition: le_mdc_interface.h:438
void(* le_mdc_SessionHandlerFunc_t)(le_mdc_ProfileRef_t profileRef, le_result_t result, void *contextPtr)
Definition: le_mdc_interface.h:686
le_result_t le_mdc_StopBytesCounter(void)
le_result_t le_mdc_RejectMtPdpSession(le_mdc_ProfileRef_t profileRef)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:599
CDMA2000 HRPD (1xEV-DO RevA)
Definition: le_mdc_interface.h:446
GSM.
Definition: le_mdc_interface.h:408
HDR REV0 DPA.
Definition: le_mdc_interface.h:452
TD-SCDMA.
Definition: le_mdc_interface.h:440
le_result_t le_mdc_MapProfileOnNetworkInterface(le_mdc_ProfileRef_t profileRef, const char *LE_NONNULL interfaceName)
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:573
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:587
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:569
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:565
cf. 3GPP 24.008 Annex I2
Definition: le_mdc_interface.h:609
CDMA2000 1X.
Definition: le_mdc_interface.h:442
le_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 I1
Definition: le_mdc_interface.h:557
cf. 3GPP 24.008 Annex I1
Definition: le_mdc_interface.h:555
le_mdc_DisconnectionReason_t le_mdc_GetDisconnectionReasonExt(le_mdc_ProfileRef_t profileRef, le_mdc_Pdp_t pdpType)