/*===========================================================================
FILE: 
   GobiNASAPI.h

DESCRIPTION:
   Gobi Wireless Data Service APIs

Copyright (C) 2015 Sierra Wireless Incorporated. All rights reserved.
                   Sierra Wireless Proprietary/GTDR
==========================================================================*/

#ifndef __GOBI_WDS_API_H__
#define __GOBI_WDS_API_H__
/*=========================================================================*/
// Definitions
/*=========================================================================*/

/** 
* \defgroup GroupWDS Wireless Data Service
*/
/*@{*/

/*=========================================================================*/
// Structs
/*=========================================================================*/
#ifdef __cplusplus
	extern "C" {
#endif

/*=========================================================================*/
// Callbacks
/*=========================================================================*/

#ifdef __cplusplus
	};
#endif

/*=========================================================================*/
// Prototypes
/*=========================================================================*/
//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the CM API client IP preference, it translates to QMI WDS message
/// QMI_WDS_SET_CLIENT_IP_FAMILY_PREF_MSG 0x004D
///
/// \param	prefIPFamily   
///         [ I ] - IP address family preference
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetClientIPFamilyPreference( ULONG prefIPFamily );

//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the dormancy status callback function
/// QMI_WDS_SET_EVENT_REPORT_IND 0x0001 TLV 0x18
///
/// \param	pCallback   [ I ] - Callback function (0 = disable)
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDormancyStatusCallback( 
   tFNDormancyStatus          pCallback );


//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the RX/TX byte counts callback function
/// QMI_WDS_SET_EVENT_REPORT_REQ 0x0001 TLV 0x11
/// QMI_WDS_SET_EVENT_REPORT_IND 0x0001 TLV 0x10, 0x11
///
/// \param	pCallback   [ I ] - Callback function (0 = disable)
/// \param	interval    [ I ] - Interval in seconds (ignored when disabling)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetByteTotalsCallback( 
   tFNByteTotals              pCallback,
   BYTE                       interval );
  
//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the session state callback function
/// QMI_WDS_GET_PKT_SRVC_STATUS_IND 0x22
///
/// \param	pCallback   [ I ] - Callback function (0 = disable)
/// Current link status. Values:
///			\li 1 – DISCONNECTED
///			\li 2 – CONNECTED
///			\li 3 – SUSPENDED
///			\li 4 – AUTHENTICATING
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetSessionStateCallback( tFNSessionState pCallback );


//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the mobile IP status callback function
/// placeholder function
///
/// \param	pCallback   [ I ] - Callback function (0 = disable)
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetMobileIPStatusCallback( 
   tFNMobileIPStatus          pCallback );

   
//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the data bearer status callback function with 
/// QMI_WDS_SET_EVENT_REPORT_REQ 0x0001 TLV 0x12
/// QMI_WDS_SET_EVENT_REPORT_IND 0x0001 TLV 0x17
///
/// \param	pCallback   [ I ] - Callback function (0 = disable)
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDataBearerCallback( tFNDataBearer pCallback );

//////////////////////////////////////////////////////////////////////////////
///
/// This function retrieves the current data bearer technology (only
/// valid when connected)
/// QMI_WDS_GET_DATA_BEARER_TECHNOLOGY_MSG =          0x0037
///
/// \param	pDataBearer      [ O ] - The data bearer technology
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDataBearerTechnology( ULONG * pDataBearer );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the state of the current packet data session
/// QMI_WDS_GET_PKT_SRVC_STATUS_MSG =                 0x0022
/// 
/// \param	pState      
/// [ O ] - State of the current packet session
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetSessionState( ULONG * pState );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the duration of the current packet data session
/// QMI_WDS_GET_CALL_DURATION_MSG =					0x0035
/// 
/// \param	pDuration   [ O ] - Duration of the current packet session
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetSessionDuration( ULONGLONG * pDuration );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the dormancy state of the current packet 
/// data session (when connected)
/// QMI_WDS_GET_DORMANCY_STATUS_MSG =                 0x0030
/// \param	pState      [ O ] - Dormancy state of the current packet session
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDormancyState( ULONG * pState );

//////////////////////////////////////////////////////////////////////////////
///
/// GetAutoconnect (Deprecated)
/// This function returns the current autoconnect data session setting
/// QMI_WDS_GET_AUTOCONNECT_SETTING_MSG =             0x0034
///
/// \param	pSetting    [ O ] - NDIS autoconnect setting
///
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetAutoconnect( ULONG * pSetting );

//////////////////////////////////////////////////////////////////////////////
///
/// SetAutoconnect (Deprecated)
/// This function sets the autoconnect data session setting
/// QMI_WDS_START_NETWORK_INTERFACE_MSG =             0x0020
///
/// \param	setting     [ I ] - NDIS autoconnect disabled (0) or enabled (non-zero)
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////

IMPORTGOBI ULONG GOBICMAPI SetAutoconnect( ULONG setting );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the current autoconnect data session setting
/// QMI_WDS_GET_AUTOCONNECT_SETTING_MSG =             0x0034
///
/// \param  pSetting       [ O ] - NDIS autoconnect setting
/// \param  pRoamSetting   [ O ] - NDIS autoconnect roam setting 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetEnhancedAutoconnect( 
   ULONG *                    pSetting,
   ULONG *                    pRoamSetting );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the autoconnect data session setting
///
/// \param	setting        [ I ] - NDIS autoconnect setting
/// \param	pRoamSetting   [ I ] - (Optional) NDIS autoconnect roam setting 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetEnhancedAutoconnect( 
   ULONG                      setting,
   ULONG *                    pRoamSetting );

//////////////////////////////////////////////////////////////////////////////
///
/// This function writes the default profile settings to the device, the 
/// default profile is used during autoconnect
/// QMI_WDS_MODIFY_PROFILE_SETTINGS_MSG =             0x0028
/// \param	profileType       [ I ] - Profile type being written
/// \param	pPDPType          [ I ] - (Optional) PDP type
/// \param	pIPAddress        [ I ] - (Optional) Preferred assigned IPv4 address
/// \param	pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv4 address 
/// \param	pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv4 address 
/// \param	pAuthentication   [ I ] - (Optional) Authentication algorithm bitmap
/// \param	pName             [ I ] - (Optional) The profile name or description 
/// \param	pAPNName          [ I ] - (Optional) Access point name 
/// \param	pUsername         [ I ] - (Optional) Username used during authentication
/// \param	pPassword         [ I ] - (Optional) Password used during authentication
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDefaultProfile( 
   ULONG                      profileType,
   ULONG *                    pPDPType, 
   ULONG *                    pIPAddress, 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS, 
   ULONG *                    pAuthentication, 
   CHAR *                     pName, 
   CHAR *                     pAPNName, 
   CHAR *                     pUsername,
   CHAR *                     pPassword );

//////////////////////////////////////////////////////////////////////////////
///
/// This function reads the default profile settings from the device, the 
/// default profile is used during autoconnect
/// QMI_WDS_GET_DEFAULT_SETTINGS_MSG =                0x002C
/// \param	profileType       [ I ] - Profile type being read
/// \param	pPDPType          [ O ] - PDP type
/// \param	pIPAddress        [ O ] - Preferred assigned IPv4 address
/// \param	pPrimaryDNS       [ O ] - Primary DNS IPv4 address 
/// \param	pSecondaryDNS     [ O ] - Secondary DNS IPv4 address 
/// \param	pAuthentication   [ O ] - Authentication algorithm bitmap
/// \param	nameSize          [ I ] - The maximum number of characters (including 
///                          NULL terminator) that the profile name array 
///                          can contain
/// \param	pName             [ O ] - The profile name or description 
/// \param	apnSize           [ I ] - The maximum number of characters (including 
///                          NULL terminator) that the APN name array 
///                          can contain
/// \param	pAPNName          [ O ] - Access point name represented as a NULL 
///                           terminated string (empty string returned when 
///                           unknown)
/// \param	userSize          [ I ] - The maximum number of characters (including 
///                          NULL terminator) that the username array 
///                          can contain
/// \param	pUsername         [ O ] - Username used during authentication
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////

IMPORTGOBI ULONG GOBICMAPI GetDefaultProfile( 
   ULONG                      profileType,
   ULONG *                    pPDPType, 
   ULONG *                    pIPAddress, 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS, 
   ULONG *                    pAuthentication, 
   BYTE                       nameSize,
   CHAR *                     pName, 
   BYTE                       apnSize,
   CHAR *                     pAPNName, 
   BYTE                       userSize,
   CHAR *                     pUsername );

//////////////////////////////////////////////////////////////////////////////
///
/// This function writes the default profile IPv6 settings to the device, the 
/// default profile is used during autoconnect
/// QMI_WDS_MODIFY_PROFILE_SETTINGS_MSG =             0x0028
/// 
/// \param	profileType       [ I ] - Profile type being written
/// \param	pIPAddress        [ I ] - (Optional) Preferred assigned IPv6 address
/// \param	pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv6 address 
/// \param	pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv6 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDefaultIPv6Profile( 
   ULONG                      profileType,
   USHORT *                   pIPAddress, 
   USHORT *                   pPrimaryDNS, 
   USHORT *                   pSecondaryDNS );

//////////////////////////////////////////////////////////////////////////////
///
/// This function reads the default profile IPv6 settings from the device, the 
/// default profile is used during autoconnect
/// QMI_WDS_GET_DEFAULT_SETTINGS_MSG =                0x002C
/// 
/// \param	profileType       [ I ] - Profile type being read
/// \param	pIPAddress        [ O ] - Preferred assigned IPv6 address
/// \param	pPrimaryDNS       [ O ] - Primary DNS IPv6 address 
/// \param	pSecondaryDNS     [ O ] - Secondary DNS IPv6 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDefaultIPv6Profile(
   ULONG                      profileType,
   USHORT *                   pIPAddress,
   USHORT *                   pPrimaryDNS,
   USHORT *                   pSecondaryDNS );

//////////////////////////////////////////////////////////////////////////////
///
///  This function activates a packet data session
/// QMI_WDS_START_NETWORK_INTERFACE_MSG =             0x0020
/// 
/// \param	
/// pTechnology       [ I ] - (Optional) Technology bitmap
/// \li 0:3GPP
/// \li 1:3GPP2
/// \param	
/// pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv4 address 
/// \param	
/// pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv4 address 
/// \param	
/// pPrimaryNBNS      [ I ] - (Optional) Primary NetBIOS NS IPv4 address
/// \param	
/// pSecondaryNBNS    [ I ] - (Optional) Secondary NetBIOS NS IPv4 address
/// \param	
/// pAPNName          [ I ] - (Optional) Access point name 
/// \param	
/// pIPAddress        [ I ] - (Optional) Preferred assigned IPv4 address
/// \param	
/// pAuthentication   [ I ] - (Optional) Authentication algorithm bitmap
/// \param	
/// pUsername         [ I ] - (Optional) Username used during authentication
/// \param	
/// pPassword         [ I ] - (Optional) Password used during authentication
/// \param	
/// pSessionId        [ O ] - The assigned session ID
/// \param	
/// pFailureReason    [ O ] - Upon call failure the failure reason provided
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI StartDataSession2( 
   ULONG *                    pTechnology, 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS, 
   ULONG *                    pPrimaryNBNS, 
   ULONG *                    pSecondaryNBNS, 
   CHAR *                     pAPNName, 
   ULONG *                    pIPAddress, 
   ULONG *                    pAuthentication, 
   CHAR *                     pUsername, 
   CHAR *                     pPassword,
   ULONG *                    pSessionId,
   ULONG *                    pFailureReason );

//////////////////////////////////////////////////////////////////////////////
///
/// This functions activate a packet data session
/// QMI_WDS_START_NETWORK_INTERFACE_MSG =             0x0020
///
/// \param	pTechnology       [ I ] - (Optional) Technology bitmap
/// \li 0:3GPP
/// \li 1:3GPP2
/// \param	pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv4 address 
/// \param	pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv4 address 
/// \param	pPrimaryNBNS      [ I ] - (Optional) Primary NetBIOS NS IPv4 address
/// \param	pSecondaryNBNS    [ I ] - (Optional) Secondary NetBIOS NS IPv4 address
/// \param	pAPNName          [ I ] - (Optional) Access point name 
/// \param	pIPAddress        [ I ] - (Optional) Preferred assigned IPv4 address
/// \param	pAuthentication   [ I ] - (Optional) Authentication algorithm bitmap
/// \param	pUsername         [ I ] - (Optional) Username used during authentication
/// \param	pPassword         [ I ] - (Optional) Password used during authentication
/// \param	pSessionId        [ O ] - The assigned session ID
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI StartDataSession( 
   ULONG *                    pTechnology, 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS, 
   ULONG *                    pPrimaryNBNS, 
   ULONG *                    pSecondaryNBNS, 
   CHAR *                     pAPNName, 
   ULONG *                    pIPAddress, 
   ULONG *                    pAuthentication, 
   CHAR *                     pUsername, 
   CHAR *                     pPassword,
   ULONG *                    pSessionId );

//////////////////////////////////////////////////////////////////////////////
///
/// This function cancels an in-progress packet data session activation
/// QMI_WDS_ABORT_MSG =                               0x0002
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI CancelDataSession();

//////////////////////////////////////////////////////////////////////////////
///
/// This function stops the current data session
/// QMI_WDS_STOP_NETWORK_INTERFACE_MSG =              0x0021
/// \param	
/// sessionId   [ I ] - The ID of the session to terminate
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI StopDataSession( ULONG sessionId );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the current packet data session IP address
/// QMI_WDS_GET_RUNTIME_SETTINGS_MSG =                0x002D
/// \param	
/// pIPAddress        [ O ] - Assigned IPv4 address
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetIPAddress( ULONG * pIPAddress );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns connection rate information for the packet data 
/// connection
/// QMI_WDS_GET_CURRENT_CHANNEL_RATE_MSG =            0x0023
/// \param	pCurrentChannelTXRate   [ O ] - Current channel TX rate (bps)
/// \param	pCurrentChannelRXRate   [ O ] - Current channel RX rate (bps)
/// \param	pMaxChannelTXRate       [ O ] - Maximum channel TX rate (bps)
/// \param	pMaxChannelRXRate       [ O ] - Maximum channel RX rate (bps)
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetConnectionRate(
   ULONG *                    pCurrentChannelTXRate,
   ULONG *                    pCurrentChannelRXRate,
   ULONG *                    pMaxChannelTXRate,
   ULONG *                    pMaxChannelRXRate );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the packet data transfer statistics since the start 
/// of the current packet data session
/// QMI_WDS_GET_PKT_STATISTICS_MSG =                  0x0024
/// 
/// \param	pTXPacketSuccesses   [ O ] - Packets transmitted without error
/// \param	pRXPacketSuccesses   [ O ] - Packets received without error
/// \param	pTXPacketErrors      [ O ] - Outgoing packets with framing errors
/// \param	pRXPacketErrors      [ O ] - Incoming packets with framing errors
/// \param	pTXPacketOverflows   [ O ] - Packets dropped because TX buffer overflowed 
/// \param	pRXPacketOverflows   [ O ] - Packets dropped because RX buffer overflowed
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetPacketStatus(  
   ULONG *                    pTXPacketSuccesses, 
   ULONG *                    pRXPacketSuccesses, 
   ULONG *                    pTXPacketErrors, 
   ULONG *                    pRXPacketErrors, 
   ULONG *                    pTXPacketOverflows, 
   ULONG *                    pRXPacketOverflows );

//////////////////////////////////////////////////////////////////////////////
///
/// This function returns the RX/TX byte counts since the start of the 
/// current packet data session
/// 
/// \param	pTXTotalBytes  [ O ] - Bytes transmitted without error
/// \param	pRXTotalBytes  [ O ] - Bytes received without error
/// \return	See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////

IMPORTGOBI ULONG GOBICMAPI GetByteTotals(   
   ULONGLONG *                pTXTotalBytes, 
   ULONGLONG *                pRXTotalBytes );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the current mobile IP setting
/// QMI_WDS_SET_MIP_MODE_MSG =                        0x002E
/// \param	mode        [ I ] - Desired mobile IP setting
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetMobileIP( ULONG mode );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the current mobile IP setting
/// QMI_WDS_GET_MIP_MODE_MSG =                        0x002F
///
/// \param	pMode       [ O ] - Current mobile IP setting
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetMobileIP( ULONG * pMode );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the active mobile IP profile index
/// QMI_WDS_SET_ACTIVE_PROFILE_MSG =					0x003D
/// 
/// \param	pSPC        [ I ] - Six digit service programming code
/// \param	index       [ I ] - Desired mobile IP profile index
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetActiveMobileIPProfile( 
   CHAR *                     pSPC,
   BYTE                       index );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the the active mobile IP profile index
///    
/// \param	pIndex      [ O ] - Active mobile IP profile index
/// 
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetActiveMobileIPProfile( BYTE * pIndex );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the specified mobile IP profile settings
/// QMI_WDS_MODIFY_MIP_PROFILE_MSG =					0x003F
///    
/// \param	
/// pSPC           [ I ] - Six digit service programming code
/// \param	
/// index          [ I ] - Mobile IP profile ID
/// \param	
/// pEnabled       [ I ] - (Optional) Enable MIP profile?
/// \param	
/// pAddress       [ I ] - (Optional) Home IPv4 address
/// \param	
/// pPrimaryHA     [ I ] - (Optional) Primary home agent IPv4 address
/// \param	
/// pSecondaryHA   [ I ] - (Optional) Secondary home agent IPv4 address
/// \param	
/// pRevTunneling  [ I ] - (Optional) Enable reverse tunneling?
/// \param	
/// pNAI           [ I ] - (Optional) Network access identifier string
/// \param	
/// pHASPI         [ I ] - (Optional) HA security parameter index
/// \param	
/// pAAASPI        [ I ] - (Optional) AAA security parameter index
/// \param	
/// pMNHA          [ I ] - (Optional) MN-HA string
/// \param	
/// pMNAAA         [ I ] - (Optional) MN-AAA string
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////

IMPORTGOBI ULONG GOBICMAPI SetMobileIPProfile( 
   CHAR *                     pSPC,
   BYTE                       index,
   BYTE *                     pEnabled,
   ULONG *                    pAddress,
   ULONG *                    pPrimaryHA,
   ULONG *                    pSecondaryHA,
   BYTE *                     pRevTunneling,
   CHAR *                     pNAI,
   ULONG *                    pHASPI,
   ULONG *                    pAAASPI,
   CHAR *                     pMNHA,
   CHAR *                     pMNAAA );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the specified mobile IP profile settings
/// QMI_WDS_READ_MIP_PROFILE_MSG =					0x003E
/// \param	index          [ I ] - Mobile IP profile ID
/// \param	pEnabled       [ O ] - Mobile IP profile enabled?
/// \param	pAddress       [ O ] - Home IPv4 address
/// \param	pPrimaryHA     [ O ] - Primary home agent IPv4 address
/// \param	pSecondaryHA   [ O ] - Secondary home agent IPv4 address
/// \param	pRevTunneling  [ O ] - Reverse tunneling enabled?
/// \param	naiSize        [ I ] - The maximum number of characters (including NULL 
///                        terminator) that the NAI array can contain
/// \param	pNAI           [ O ] - Network access identifier string
/// \param	pHASPI         [ O ] - HA security parameter index
/// \param	pAAASPI        [ O ] - AAA security parameter index
/// \param	pHAState       [ O ] - HA key state
/// \param	pAAAState      [ O ] - AAA key state
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetMobileIPProfile2( 
   BYTE                       index,
   BYTE *                     pEnabled,
   ULONG *                    pAddress,
   ULONG *                    pPrimaryHA,
   ULONG *                    pSecondaryHA,
   BYTE *                     pRevTunneling,
   BYTE                       naiSize,
   CHAR *                     pNAI,
   ULONG *                    pHASPI,
   ULONG *                    pAAASPI,
   ULONG *                    pHAState,
   ULONG *                    pAAAState );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the specified mobile IP profile settings
/// QMI_WDS_READ_MIP_PROFILE_MSG =					0x003E
/// \param	
/// index          [ I ] - Mobile IP profile ID
/// \param	
/// pEnabled       [ O ] - Mobile IP profile enabled?
/// \param	
/// pAddress       [ O ] - Home IPv4 address
/// \param	
/// pPrimaryHA     [ O ] - Primary home agent IPv4 address
/// \param	
/// pSecondaryHA   [ O ] - Secondary home agent IPv4 address
/// \param	
/// pRevTunneling  [ O ] - Reverse tunneling enabled?
/// \param	
/// naiSize        [ I ] - The maximum number of characters (including NULL 
///                        terminator) that the NAI array can contain
/// \param	
/// pNAI           [ O ] - Network access identifier string
/// \param	
/// pHASPI         [ O ] - HA security parameter index
/// \param	
/// pAAASPI        [ O ] - AAA security parameter index
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetMobileIPProfile( 
   BYTE                       index,
   BYTE *                     pEnabled,
   ULONG *                    pAddress,
   ULONG *                    pPrimaryHA,
   ULONG *                    pSecondaryHA,
   BYTE *                     pRevTunneling,
   BYTE                       naiSize,
   CHAR *                     pNAI,
   ULONG *                    pHASPI,
   ULONG *                    pAAASPI );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the specified mobile IP parameters
/// QMI_WDS_SET_MIP_SETTINGS_MSG =					0x0041
/// \param	pSPC              [ I ] - Six digit service programming code
/// \param	pMode             [ I ] - (Optional) Desired mobile IP setting
/// \param	pRetryLimit       [ I ] - (Optional) Retry attempt limit
/// \param	pRetryInterval    [ I ] - (Optional) Retry attempt interval
/// \param	pReRegPeriod      [ I ] - (Optional) Re-registration period
/// \param	pReRegTraffic     [ I ] - (Optional) Re-registration only with traffic?
/// \param	pHAAuthenticator  [ I ] - (Optional) MH-HA authenticator calculator?
/// \param	pHA2002bis        [ I ] - (Optional) MH-HA RFC 2002bis authentication?
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetMobileIPParameters( 
   CHAR *                     pSPC,
   ULONG *                    pMode,
   BYTE *                     pRetryLimit,
   BYTE *                     pRetryInterval,
   BYTE *                     pReRegPeriod,
   BYTE *                     pReRegTraffic,
   BYTE *                     pHAAuthenticator,
   BYTE *                     pHA2002bis );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the mobile IP parameters
/// QMI_WDS_GET_MIP_SETTINGS_MSG =					0x0040
///
/// \param	pMode             [ O ] - Current mobile IP setting
/// \param	pRetryLimit       [ O ] - Retry attempt limit
/// \param	pRetryInterval    [ O ] - Retry attempt interval
/// \param	pReRegPeriod      [ O ] - Re-registration period
/// \param	pReRegTraffic     [ O ] - Re-registration only with traffic?
/// \param	pHAAuthenticator  [ O ] - MH-HA authenticator calculator?
/// \param	pHA2002bis        [ O ] - MH-HA RFC 2002bis authentication?
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetMobileIPParameters( 
   ULONG *                    pMode,
   BYTE *                     pRetryLimit,
   BYTE *                     pRetryInterval,
   BYTE *                     pReRegPeriod,
   BYTE *                     pReRegTraffic,
   BYTE *                     pHAAuthenticator,
   BYTE *                     pHA2002bis );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the last mobile IP error
/// QMI_WDS_GET_LAST_MIP_STATUS_MSG =					0x0042
/// 
/// \param	pError      [ O ] - Last mobile IP error
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetLastMobileIPError( ULONG * pError );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the DNS settings for the device
/// QMI_WDS_SET_DNS_SETTINGS_MSG =					0x0053
///
/// \param	pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv4 address 
/// \param	pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv4 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDNSSettings( 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS );

//////////////////////////////////////////////////////////////////////////////
///
/// This function gets the DNS settings for the device
/// QMI_WDS_GET_DNS_SETTINGS_MSG =					0x0052
///
/// \param	pPrimaryDNS       [ O ] - Primary DNS IPv4 address 
/// \param	pSecondaryDNS     [ O ] - Secondary DNS IPv4 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDNSSettings( 
   ULONG *                    pPrimaryDNS, 
   ULONG *                    pSecondaryDNS );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the DNS IPv6 settings for the device
/// QMI_WDS_SET_DNS_SETTINGS_MSG =					0x0053
/// 
/// 
/// \param	pPrimaryDNS       [ I ] - (Optional) Primary DNS IPv6 address 
/// \param	pSecondaryDNS     [ I ] - (Optional) Secondary DNS IPv6 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetDNSIPv6Settings( 
   USHORT *                   pPrimaryDNS, 
   USHORT *                   pSecondaryDNS );

/////////////////////////////////////////////////////////////////////////////
///
/// This function gets the DNS IPv6 settings for the device
/// QMI_WDS_GET_DNS_SETTINGS_MSG =					0x0052
///
/// \param	pPrimaryDNS       [ O ] - Primary DNS IPv6 address 
/// \param	pSecondaryDNS     [ O ] - Secondary DNS IPv6 address 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI GetDNSIPv6Settings( 
   USHORT *                   pPrimaryDNS, 
   USHORT *                   pSecondaryDNS );

//////////////////////////////////////////////////////////////////////////////
///
/// This function sets the CM API client IP preference
/// QMI_WDS_SET_CLIENT_IP_FAMILY_PREF_MSG =			0x004D
///
/// \param  prefIPFamily   [ I ] - IP address family preference
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI SetClientIPFamilyPreference( ULONG prefIPFamily );

//////////////////////////////////////////////////////////////////////////////
///
/// This function enables/disables the RX/TX Packet counts callback function
///
/// \param  pCallback   [ I ] - Callback function (0 = disable)
/// \param  interval    [ I ] - Interval in seconds (ignored when disabling)
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
QCIMPORT2K ULONG QCWWANAPI2K SetPacketTotalsCallback( 
   tFNPacketTotals              pCallback,
   BYTE                       interval );
/*@}*/ // End of WDS group
#endif