blob: af83bfb952abb21b86f0a6ecf4cdc6dbea7abea0 [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;
xf.libdd93d52023-05-12 07:10:14 -070068 char is_ext;
lh9ed821d2023-04-07 01:36:19 -070069};
70
71/**
72 * @brief pdpÈ¥¼¤»îÐÅÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_DEACT_REQ
73 * @param c_id pdpÉÏÏÂÎĵıêʶ
74 */
75typedef struct {
76 int c_id;
77} AT_PDP_DEACT_REQ_INFO;
78
79
80/**
81 * @brief pdp¼¤»îÏìÓ¦ÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_ACT_RSP
82 * @param result ½á¹ûÂë AT_RSP_OK/AT_RSP_ERR
83 * @param cid pdpÉÏÏÂÎĵıêʶ
84 * @param errcode Èç¹ûpdp¼¤»îʧ°Ü£¬·µ»Ø´íÎóÂë
85 */
86typedef struct {
87 int result;
88 int cid;
89 int errcode;
90} AT_PDP_ACT_RSP_INFO;
91
92
93/**
94 * @brief pdpÈ¥¼¤»îÏìÓ¦ÏûÏ¢½á¹¹Ì壬¶ÔÓ¦ÏûÏ¢MSG_CMD_PDP_DEACT_RSP
95 * @param result ½á¹ûÂë AT_RSP_OK/AT_RSP_ERR
96 */
97typedef struct {
98 int result;
99} AT_PDP_DEACT_RSP_INFO;
100
101#endif