blob: 1b8b2da9a1fbb041f3d20572892fa413a38cf739 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/**
2 * @file at_pdp_api.h
3 * @brief ÌṩÁËPDPµÄOPENCPUÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ì嶨Òå
4 *
5 * Copyright (C) 2017 Sanechips Technology Co., Ltd.
6 * @author
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#ifndef __AT_PDP_API_H__
15#define __AT_PDP_API_H__
16
17
18/*******************************************************************************
19* Include header files *
20******************************************************************************/
21
22/*******************************************************************************
23* Macro definitions *
24******************************************************************************/
25
26/*******************************************************************************
27* Type definitions *
28******************************************************************************/
29
30
31/**
32* @brief pdp¼¤»îÐÅÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_ACT_REQ
33* @param ip_type IPÀàÐÍ£¬È¡ÖµÎª×Ö·û´®£¬"IP","IPV6","IPV4V6"£¬×¢ÒâÈ«²¿ÊÇ´óд£¬±ØÐëÌîд
34* @param apn ÍøÂç½ÓÈëµãÃû³Æ£¬±ØÐëÌîд
35* @param username Óû§Ãû£¬ÐèÒª¼øÈ¨Ê±Ìîд
36* @param password ÃÜÂ룬ÐèÒª¼øÈ¨Ê±Ìîд
37* @param challenge ¼øÈ¨·½Ê½ÊÇCHAP_AUTHʱʹÓã¬ÐèÒª¼øÈ¨Ê±Ìîд
38*/
39typedef struct {
40 char ip_type[10];
41 char apn[100];
42 int auth_type;
43 char username[65];
44 char password[65];
45 char challenge[50];
46 //int cfgt;//ÿ°ü·¢Ë͵ȴýʱ¼ä
47 //int cfgp;//Êý¾Ý°ü±»·¢Ë͵ÄÃÅÏÞÖµ
48} AT_PDP_ACT_REQ_INFO;
49
50/*Íⲿģ¿é·¢ËÍMSG_CMD_PDP_ACT_REQ£¬½á¹¹ÌåAT_PDP_ACT_INFOת»»³ÉÄÚ²¿Ê¹ÓõĽṹÌåstruct pdp_act_req*/
51struct pdp_act_req
52{
53 /*char ip_type[10];
54 char apn[70];
55 int auth_type;
56 char username[65];
57 char password[65];
58 char challenge[50];
59 //int at_fd; */
60 //½«Íⲿpdp¼¤»îÏûÏ¢ÖÐЯ´øµÄÄÚÈÝ£¬×÷ΪͨÓÃpdp¼¤»îÐÅÏ¢£¬volte_param2ºÍppp_cid×÷Ϊat_ctlÄÚ²¿¶¨ÖƲÎÊýʹÓÃ
61 AT_PDP_ACT_REQ_INFO comm_info;
62 int ext_cid; //ÓÃÓÚÍⲿģ¿éÖ¸¶¨cid ppp²¦ºÅ£¬½øÐÐPDP_EXT×éÍø£¬¸Ãcid±ØÐëʱԤÁôcid
63 int volte_param1;
64 int volte_param2;
65 int volte_param3;
66 int ppp_cid;//½öÓÃÓÚppp²¦ºÅʱºòÖ¸¶¨cidʹÓã¬ÆäËûʱºò¾ùΪ0
67 char default_flag;
68};
69
70/**
71 * @brief pdpÈ¥¼¤»îÐÅÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_DEACT_REQ
72 * @param c_id pdpÉÏÏÂÎĵıêʶ
73 */
74typedef struct {
75 int c_id;
76} AT_PDP_DEACT_REQ_INFO;
77
78
79/**
80 * @brief pdp¼¤»îÏìÓ¦ÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_ACT_RSP
81 * @param result ½á¹ûÂë AT_RSP_OK/AT_RSP_ERR
82 * @param cid pdpÉÏÏÂÎĵıêʶ
83 * @param errcode Èç¹ûpdp¼¤»îʧ°Ü£¬·µ»Ø´íÎóÂë
84 */
85typedef struct {
86 int result;
87 int cid;
88 int errcode;
89} AT_PDP_ACT_RSP_INFO;
90
91
92/**
93 * @brief pdpÈ¥¼¤»îÏìÓ¦ÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_DEACT_RSP
94 * @param result ½á¹ûÂë AT_RSP_OK/AT_RSP_ERR
95 */
96typedef struct {
97 int result;
98} AT_PDP_DEACT_RSP_INFO;
99
100#endif