00001
00011 #ifndef __GOBI_API_WDS_H__
00012 #define __GOBI_API_WDS_H__
00013
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017
00018 #define IPV6_ADDRESS_ARRAY_SIZE 8
00019
00087 ULONG StartDataSession(
00088 ULONG *pTechnology,
00089 ULONG *pPrimaryDNS,
00090 ULONG *pSecondaryDNS,
00091 ULONG *pPrimaryNBNS,
00092 ULONG *pSecondaryNBNS,
00093 CHAR *pAPNName,
00094 ULONG *pIPAddress,
00095 ULONG *pAuthentication,
00096 CHAR *pUsername,
00097 CHAR *pPassword,
00098 ULONG *pSessionId );
00099
00172 ULONG StartDataSession2(
00173 ULONG *pTechnology,
00174 ULONG *pPrimaryDNS,
00175 ULONG *pSecondaryDNS,
00176 ULONG *pPrimaryNBNS,
00177 ULONG *pSecondaryNBNS,
00178 CHAR *pAPNName,
00179 ULONG *pIPAddress,
00180 ULONG *pAuthentication,
00181 CHAR *pUsername,
00182 CHAR *pPassword,
00183 ULONG *pSessionId,
00184 ULONG *pFailureReason );
00185
00268 ULONG StartDataSessionLTE(
00269 ULONG *pTechnology,
00270 ULONG *pPrimaryDNSv4,
00271 ULONG *pSecondaryDNSv4,
00272 ULONG *pPrimaryNBNSv4,
00273 ULONG *pSecondaryNBNSv4,
00274 USHORT *pPrimaryDNSv6,
00275 USHORT *pSecondaryDNSv6,
00276 CHAR *pAPNName,
00277 ULONG *pIPAddressv4,
00278 USHORT *pIPAddressv6,
00279 ULONG *pAuthentication,
00280 CHAR *pUsername,
00281 CHAR *pPassword,
00282 ULONG *pSessionId,
00283 ULONG *pFailureReason,
00284 BYTE IPFamilyPreference );
00285
00301 ULONG StopDataSession( ULONG sessionId );
00302
00321 ULONG SetMobileIP( ULONG mode );
00322
00341 ULONG GetMobileIP( ULONG *pMode );
00342
00391 ULONG SetMobileIPParameters(
00392 CHAR *pSPC,
00393 ULONG *pMode,
00394 BYTE *pRetryLimit,
00395 BYTE *pRetryInterval,
00396 BYTE *pReRegPeriod,
00397 BYTE *pReRegTraffic,
00398 BYTE *pHAAuthenticator,
00399 BYTE *pHA2002bis );
00400
00419 ULONG SetAutoconnect( ULONG setting );
00420
00438 ULONG GetAutoconnect( ULONG *pSetting );
00439
00502 ULONG SetDefaultProfile(
00503 ULONG profileType,
00504 ULONG *pPDPType,
00505 ULONG *pIPAddress,
00506 ULONG *pPrimaryDNS,
00507 ULONG *pSecondaryDNS,
00508 ULONG *pAuthentication,
00509 CHAR *pName,
00510 CHAR *pAPNName,
00511 CHAR *pUsername,
00512 CHAR *pPassword );
00513
00585 ULONG SetDefaultProfileLTE(
00586 ULONG profileType,
00587 ULONG *pPDPType,
00588 ULONG *pIPAddressv4,
00589 ULONG *pPrimaryDNSv4,
00590 ULONG *pSecondaryDNSv4,
00591 USHORT *pIPAddressv6,
00592 USHORT *PrimaryDNSv6,
00593 USHORT *pSecondaryDNSv6,
00594 ULONG *pAuthentication,
00595 CHAR *pName,
00596 CHAR *pAPNName,
00597 CHAR *pUsername,
00598 CHAR *pPassword);
00599
00671 ULONG GetDefaultProfile(
00672 ULONG profileType,
00673 ULONG *pPDPType,
00674 ULONG *pIPAddress,
00675 ULONG *pPrimaryDNS,
00676 ULONG *pSecondaryDNS,
00677 ULONG *pAuthentication,
00678 BYTE nameSize,
00679 CHAR *pName,
00680 BYTE apnSize,
00681 CHAR *pAPNName,
00682 BYTE userSize,
00683 CHAR *pUsername );
00684
00778 ULONG GetDefaultProfileLTE(
00779 ULONG profileType,
00780 ULONG *pPDPType,
00781 ULONG *pIPAddressv4,
00782 ULONG *pPrimaryDNSv4,
00783 ULONG *pSecondaryDNSv4,
00784 USHORT *pIPAddressv6,
00785 USHORT *pPrimaryDNSv6,
00786 USHORT *pSecondaryDNSv6,
00787 ULONG *pAuthentication,
00788 BYTE nameSize,
00789 CHAR *pName,
00790 BYTE apnSize,
00791 CHAR *pAPNName,
00792 BYTE userSize,
00793 CHAR *pUsername );
00794
00814 ULONG GetSessionState(
00815 ULONG *pState );
00816
00848 ULONG GetPacketStatus(
00849 ULONG *pTXPacketSuccesses,
00850 ULONG *pRXPacketSuccesses,
00851 ULONG *pTXPacketErrors,
00852 ULONG *pRXPacketErrors,
00853 ULONG *pTXPacketOverflows,
00854 ULONG *pRXPacketOverflows );
00855
00875 ULONG GetByteTotals(
00876 ULONGLONG *pTXTotalBytes,
00877 ULONGLONG *pRXTotalBytes );
00878
00897 ULONG GetDormancyState(
00898 ULONG *pDormancyState );
00899
00931 ULONG GetDataBearerTechnology(
00932 ULONG *pDataBearer );
00933
00934
00978 typedef struct dataBearerTechnology
00979 {
00980 BYTE currentNetwork;
00981 ULONG ratMask;
00982 ULONG soMask;
00983 } QmiWDSDataBearerTechnology;
00984
00989 enum qmiDataBearerMasks
00990 {
00991 QMI_WDS_CURRENT_CALL_DB_MASK = 0x01,
00992 QMI_WDS_LAST_CALL_DB_MASK = 0x02
00993 };
00994
01013 typedef struct dataBearers
01014 {
01015 BYTE dataBearerMask;
01016 QmiWDSDataBearerTechnology *pCurDataBearerTechnology;
01017 QmiWDSDataBearerTechnology *pLastCallDataBearerTechnology;
01018 } QmiWDSDataBearers;
01019
01037 ULONG SLQSGetDataBearerTechnology( QmiWDSDataBearers *pDataBearers );
01038
01054 ULONG GetSessionDuration(
01055 ULONGLONG *pDuration );
01056
01073 ULONG GetIPAddress( ULONG *pIPAddress );
01074
01112 ULONG GetIPAddressLTE(
01113 ULONG *pIPAddressV4,
01114 USHORT *pIPAddressV6,
01115 BYTE *pIPv6prefixlen);
01116
01143 ULONG GetConnectionRate(
01144 ULONG *pCurrentChannelTXRate,
01145 ULONG *pCurrentChannelRXRate,
01146 ULONG *pMaxChannelTXRate,
01147 ULONG *pMaxChannelRXRate );
01148
01216 ULONG GetMobileIPProfile(
01217 BYTE index,
01218 BYTE *pEnabled,
01219 ULONG *pAddress,
01220 ULONG *pPrimaryHA,
01221 ULONG *pSecondaryHA,
01222 BYTE *pRevTunneling,
01223 BYTE naiSize,
01224 CHAR *pNAI,
01225 ULONG *pHASPI,
01226 ULONG *pAAASPI,
01227 ULONG *pHAState,
01228 ULONG *pAAAState );
01229
01247 ULONG GetLastMobileIPError( ULONG *pError );
01248
01268 ULONG SetActiveMobileIPProfile(
01269 CHAR *pSPC,
01270 BYTE index );
01271
01287 ULONG GetActiveMobileIPProfile(
01288 BYTE *pIndex );
01289
01342 ULONG SetMobileIPProfile(
01343 CHAR *pSPC,
01344 BYTE index,
01345 BYTE *pEnabled,
01346 ULONG *pAddress,
01347 ULONG *pPrimaryHA,
01348 ULONG *pSecondaryHA,
01349 BYTE *pRevTunneling,
01350 CHAR *pNAI,
01351 ULONG *pHASPI,
01352 ULONG *pAAASPI,
01353 CHAR *pMNHA,
01354 CHAR *pMNAAA );
01355
01424 ULONG GetMobileIPProfile2(
01425 BYTE index,
01426 BYTE *pEnabled,
01427 ULONG *pAddress,
01428 ULONG *pPrimaryHA,
01429 ULONG *pSecondaryHA,
01430 BYTE *pRevTunneling,
01431 BYTE naiSize,
01432 CHAR *pNAI,
01433 ULONG *pHASPI,
01434 ULONG *pAAASPI,
01435 ULONG *pHAState,
01436 ULONG *pAAAState );
01437
01488 ULONG GetMobileIPParameters(
01489 ULONG *pMode,
01490 BYTE *pRetryLimit,
01491 BYTE *pRetryInterval,
01492 BYTE *pReRegPeriod,
01493 BYTE *pReRegTraffic,
01494 BYTE *pHAAuthenticator,
01495 BYTE *pHA2002bis );
01496
01578 struct UMTSQoS
01579 {
01580 BYTE trafficClass;
01581 ULONG maxUplinkBitrate;
01582 ULONG maxDownlinkBitrate;
01583 ULONG grntUplinkBitrate;
01584 ULONG grntDownlinkBitrate;
01585 BYTE qosDeliveryOrder;
01586 ULONG maxSDUSize;
01587 BYTE sduErrorRatio;
01588 BYTE resBerRatio;
01589 BYTE deliveryErrSDU;
01590 ULONG transferDelay;
01591 ULONG trafficPriority;
01592 };
01593
01610 struct ProfileIdentifier
01611 {
01612 BYTE profileType;
01613 BYTE profileIndex;
01614 };
01615
01637 struct GPRSQoS
01638 {
01639 ULONG precedenceClass;
01640 ULONG delayClass;
01641 ULONG reliabilityClass;
01642 ULONG peakThroughputClass;
01643 ULONG meanThroughputClass;
01644 };
01645
01655 struct PCSCFIPv4ServerAddressList
01656 {
01657 BYTE numInstances;
01658 ULONG pscsfIPv4Addr[64];
01659 };
01660
01670 struct PCSCFFQDNAddress
01671 {
01672 WORD fqdnLen;
01673 CHAR fqdnAddr[256];
01674 };
01675
01685 struct PCSCFFQDNAddressList
01686 {
01687 BYTE numInstances;
01688 struct PCSCFFQDNAddress pcsfFQDNAddress[10];
01689 };
01690
01700 struct Domain
01701 {
01702 WORD domainLen;
01703 CHAR domainName[256];
01704 };
01705
01715 struct DomainNameList
01716 {
01717 BYTE numInstances;
01718 struct Domain domain[10];
01719 };
01720
01734 struct IPV6AddressInfo
01735 {
01736 BYTE IPV6PrefixLen;
01737 USHORT IPAddressV6[8];
01738 };
01739
01752 struct IPV6GWAddressInfo
01753 {
01754 BYTE gwV6PrefixLen;
01755 USHORT gwAddressV6[8];
01756 };
01757
01861 struct WdsRunTimeSettings
01862 {
01863 CHAR *pProfileName;
01864 ULONG *pPDPType;
01865 CHAR *pAPNName;
01866 ULONG *pPrimaryDNSV4;
01867 ULONG *pSecondaryDNSV4;
01868 struct UMTSQoS *pUMTSGrantedQoS;
01869 struct GPRSQoS *pGPRSGrantedQoS;
01870 CHAR *pUsername;
01871 ULONG *pAuthentication;
01872 ULONG *pIPAddressV4;
01873 struct ProfileIdentifier *pProfileID;
01874 ULONG *pGWAddressV4;
01875 ULONG *pSubnetMaskV4;
01876 BYTE *pPCSCFAddrPCO;
01877 struct PCSCFIPv4ServerAddressList *pServerAddrList;
01878 struct PCSCFFQDNAddressList *pPCSCFFQDNAddrList;
01879 USHORT *pPrimaryDNSV6;
01880 USHORT *pSecondaryDNSV6;
01881 ULONG *pMtu;
01882 struct DomainNameList *pDomainList;
01883 BYTE *pIPFamilyPreference;
01884 BYTE *pIMCNflag;
01885 WORD *pTechnology;
01886 struct IPV6AddressInfo *pIPV6AddrInfo;
01887 struct IPV6GWAddressInfo *pIPV6GWAddrInfo;
01888 };
01889
01905 ULONG SLQSGetRuntimeSettings (
01906 struct WdsRunTimeSettings *pRunTimeSettings );
01907
01973 ULONG SLQSSetProfile(
01974 ULONG profileType,
01975 BYTE profileId,
01976 ULONG *pPDPType,
01977 ULONG *pIPAddress,
01978 ULONG *pPrimaryDNS,
01979 ULONG *pSecondaryDNS,
01980 ULONG *pAuthentication,
01981 CHAR *pName,
01982 CHAR *pAPNName,
01983 CHAR *pUsername,
01984 CHAR *pPassword );
01985
02068 ULONG SLQSGetProfile(
02069 ULONG profileType,
02070 BYTE profileId,
02071 ULONG *pPDPType,
02072 ULONG *pIPAddress,
02073 ULONG *pPrimaryDNS,
02074 ULONG *pSecondaryDNS,
02075 ULONG *pAuthentication,
02076 BYTE nameSize,
02077 CHAR *pName,
02078 BYTE apnSize,
02079 CHAR *pAPNName,
02080 BYTE userSize,
02081 CHAR *pUsername,
02082 WORD *pExtendedErrorCode );
02083
02138 struct ssdatasession_params{
02139 BOOL action;
02140 ULONG *pTechnology;
02141 ULONG *pProfileId3GPP;
02142 ULONG *pProfileId3GPP2;
02143 ULONG sessionId;
02144 ULONG failureReason;
02145 ULONG failureReasonv4;
02146 ULONG failureReasonv6;
02147 ULONG rcv4;
02148 ULONG rcv6;
02149 ULONG v4sessionId;
02150 ULONG v6sessionId;
02151 };
02152
02172 ULONG SLQSStartStopDataSession(
02173 struct ssdatasession_params *pin );
02174
02193 ULONG SLQSSetIPFamilyPreference(
02194 BYTE IPFamilyPreference );
02195
02209 struct SLQSDeleteProfileParams{
02210 BYTE profileType;
02211 BYTE profileIndex;
02212 };
02213
02239 ULONG SLQSDeleteProfile(
02240 struct SLQSDeleteProfileParams *pProfileToDelete,
02241 WORD *pExtendedErrorCode );
02242
02444 struct Profile3GPP
02445 {
02446 CHAR *pProfilename;
02447 WORD *pProfilenameSize;
02448 BYTE *pPDPtype;
02449 BYTE *pPdpHdrCompType;
02450 BYTE *pPdpDataCompType;
02451 CHAR *pAPNName;
02452 WORD *pAPNnameSize;
02453 ULONG *pPriDNSIPv4AddPref;
02454 ULONG *pSecDNSIPv4AddPref;
02455 struct UMTSQoS *pUMTSReqQoS;
02456 struct UMTSQoS *pUMTSMinQoS;
02457 struct GPRSRequestedQoS *pGPRSRequestedQos;
02458 struct GPRSRequestedQoS *pGPRSMinimumQoS;
02459 CHAR *pUsername;
02460 WORD *pUsernameSize;
02461 CHAR *pPassword;
02462 WORD *pPasswordSize;
02463 BYTE *pAuthenticationPref;
02464 ULONG *pIPv4AddrPref;
02465 BYTE *pPcscfAddrUsingPCO;
02466 BYTE *pPdpAccessConFlag;
02467 BYTE *pPcscfAddrUsingDhcp;
02468 BYTE *pImCnFlag;
02469 struct TFTIDParams *pTFTID1Params;
02470 struct TFTIDParams *pTFTID2Params;
02471 BYTE *pPdpContext;
02472 BYTE *pSecondaryFlag;
02473 BYTE *pPrimaryID;
02474 USHORT *pIPv6AddPref;
02475 struct UMTSReqQoSSigInd *pUMTSReqQoSSigInd;
02476 struct UMTSReqQoSSigInd *pUMTSMinQosSigInd;
02477 USHORT *pPriDNSIPv6addpref;
02478 USHORT *pSecDNSIPv6addpref;
02479 BYTE *pAddrAllocPref;
02480 struct QosClassID *pQosClassID;
02481 BYTE *pAPNDisabledFlag;
02482 ULONG *pPDNInactivTimeout;
02483 BYTE *pAPNClass;
02484 };
02669 struct Profile3GPP2
02670 {
02671 BYTE *pNegoDnsSrvrPref;
02672 ULONG *pPppSessCloseTimerDO;
02673 ULONG *pPppSessCloseTimer1x;
02674 BYTE *pAllowLinger;
02675 USHORT *pLcpAckTimeout;
02676 USHORT *pIpcpAckTimeout;
02677 USHORT *pAuthTimeout;
02678 BYTE *pLcpCreqRetryCount;
02679 BYTE *pIpcpCreqRetryCount;
02680 BYTE *pAuthRetryCount;
02681 BYTE *pAuthProtocol;
02682 CHAR *pUserId;
02683 WORD *pUserIdSize;
02684 CHAR *pAuthPassword;
02685 WORD *pAuthPasswordSize;
02686 BYTE *pDataRate;
02687 ULONG *pAppType;
02688 BYTE *pDataMode;
02689 BYTE *pAppPriority;
02690 CHAR *pApnString;
02691 WORD *pApnStringSize;
02692 BYTE *pPdnType;
02693 BYTE *pIsPcscfAddressNedded;
02694 ULONG *pPrimaryV4DnsAddress;
02695 ULONG *pSecondaryV4DnsAddress;
02696 USHORT *pPriV6DnsAddress;
02697 USHORT *pSecV6DnsAddress;
02698 BYTE *pRATType;
02699 BYTE *pAPNEnabled3GPP2;
02700 ULONG *pPDNInactivTimeout3GPP2;
02701 BYTE *pAPNClass3GPP2;
02702 };
02703
02709 typedef union WdsProfileParam
02710 {
02711 struct Profile3GPP SlqsProfile3GPP;
02712 struct Profile3GPP2 SlqsProfile3GPP2;
02713 }QmiProfileInfo;
02714
02737 struct CreateProfileIn
02738 {
02739 BYTE *pProfileID;
02740 BYTE *pProfileType;
02741 QmiProfileInfo curProfile;
02742 };
02743
02822 struct UMTSMinQoS
02823 {
02824 BYTE trafficClass;
02825 ULONG maxUplinkBitrate;
02826 ULONG maxDownlinkBitrate;
02827 ULONG grntUplinkBitrate;
02828 ULONG grntDownlinkBitrate;
02829 BYTE qosDeliveryOrder;
02830 ULONG maxSDUSize;
02831 BYTE sduErrorRatio;
02832 BYTE resBerRatio;
02833 BYTE deliveryErrSDU;
02834 ULONG transferDelay;
02835 ULONG trafficPriority;
02836 };
02837
02857 struct GPRSRequestedQoS
02858 {
02859 ULONG precedenceClass;
02860 ULONG delayClass;
02861 ULONG reliabilityClass;
02862 ULONG peakThroughputClass;
02863 ULONG meanThroughputClass;
02864 };
02865
02915 struct TFTIDParams
02916 {
02917 BYTE filterId;
02918 BYTE eValid;
02919 BYTE ipVersion;
02920 WORD *pSourceIP;
02921 BYTE sourceIPMask;
02922 BYTE nextHeader;
02923 WORD destPortRangeStart;
02924 WORD destPortRangeEnd;
02925 WORD srcPortRangeStart;
02926 WORD srcPortRangeEnd;
02927 ULONG IPSECSPI;
02928 WORD tosMask;
02929 ULONG flowLabel;
02930 };
02931
02945 struct UMTSReqQoSSigInd
02946 {
02947 struct UMTSQoS UMTSReqQoS;
02948 BYTE SigInd;
02949 };
02950
02976 struct QosClassID
02977 {
02978 BYTE QCI;
02979 ULONG gDlBitRate;
02980 ULONG maxDlBitRate;
02981 ULONG gUlBitRate;
02982 ULONG maxUlBitRate;
02983 };
02984
03000 struct CreateProfileOut
03001 {
03002 BYTE *pProfileType;
03003 BYTE *pProfileIndex;
03004 USHORT *pExtErrorCode;
03005 };
03006
03031 ULONG SLQSCreateProfile(
03032 struct CreateProfileIn *pReq,
03033 struct CreateProfileOut *pResp );
03034
03053 struct slqsautoconnect{
03054 BOOL action;
03055 BYTE acsetting;
03056 BYTE acroamsetting;
03057 };
03058
03074 ULONG SLQSAutoConnect( struct slqsautoconnect *pacreq );
03075
03093 struct ModifyProfileIn
03094 {
03095 BYTE *pProfileID;
03096 BYTE *pProfileType;
03097 QmiProfileInfo curProfile;
03098 };
03099
03111 struct ModifyProfileOut
03112 {
03113 USHORT *pExtErrorCode;
03114 };
03115
03135 ULONG SLQSModifyProfile(
03136 struct ModifyProfileIn *pReq,
03137 struct ModifyProfileOut *pResp );
03138
03186 typedef struct _slqs3GPPConfigItem
03187 {
03188 WORD *pLTEAttachProfile;
03189 WORD *pProfileList;
03190 BYTE *pDefaultPDNEnabled;
03191 BYTE *p3gppRelease;
03192 } slqs3GPPConfigItem;
03193
03209 ULONG SLQSSet3GPPConfigItem( slqs3GPPConfigItem *pSLQS3GPPConfigItem );
03210
03226 ULONG SLQSGet3GPPConfigItem( slqs3GPPConfigItem *pSLQS3GPPConfigItem );
03227
03240 typedef struct _GetProfileSettingIn
03241 {
03242 BYTE ProfileType;
03243 BYTE ProfileID;
03244 }GetProfileSettingIn;
03245
03262 typedef struct _GetProfileSettingOut
03263 {
03264 QmiProfileInfo curProfile;
03265 WORD *pExtErrCode;
03266 }GetProfileSettingOut;
03267
03289 ULONG SLQSGetProfileSettings(
03290 GetProfileSettingIn *pReq,
03291 GetProfileSettingOut *pResp );
03292
03318 typedef struct
03319 {
03320 BYTE statsPeriod;
03321 ULONG statsMask;
03322 } TrStatInd;
03323
03381 typedef struct
03382 {
03383 BYTE *pCurrChannelRateInd;
03384 TrStatInd *pTransferStatInd;
03385 BYTE *pDataBearerTechInd;
03386 BYTE *pDormancyStatusInd;
03387 BYTE *pMIPStatusInd;
03388 BYTE *pCurrDataBearerTechInd;
03389 BYTE *pDataCallStatusChangeInd;
03390 BYTE *pCurrPrefDataSysInd;
03391 BYTE *pEVDOPageMonPerChangeInd;
03392 BYTE *pDataSystemStatusChangeInd;
03393 } wdsSetEventReportReq;
03394
03419 ULONG SLQSWdsSetEventReport( wdsSetEventReportReq *pSetEventReportReq );
03420
03428 typedef struct
03429 {
03430 BYTE contextId;
03431 } swiPDPRuntimeSettingsReq;
03432
03505 typedef struct
03506 {
03507 BYTE *pContextId;
03508 BYTE *pBearerId;
03509 CHAR *pAPNName;
03510 ULONG *pIPv4Address;
03511 ULONG *pIPv4GWAddress;
03512 ULONG *pPrDNSIPv4Address;
03513 ULONG *pSeDNSIPv4Address;
03514 struct IPV6AddressInfo *pIPv6Address;
03515 struct IPV6AddressInfo *pIPv6GWAddress;
03516 WORD *pPrDNSIPv6Address;
03517 WORD *pSeDNSIPv6Address;
03518 ULONG *pPrPCSCFIPv4Address;
03519 ULONG *pSePCSCFIPv4Address;
03520 WORD *pPrPCSCFIPv6Address;
03521 WORD *pSePCSCFIPv6Address;
03522 } swiPDPRuntimeSettingsResp;
03523
03544 ULONG SLQSWdsSwiPDPRuntimeSettings(
03545 swiPDPRuntimeSettingsReq *pPDPRuntimeSettingsReq,
03546 swiPDPRuntimeSettingsResp *pPDPRuntimeSettingsResp );
03547
03548 #ifdef __cplusplus
03549 }
03550 #endif
03551
03552 #endif