📄 ppp_main.h
字号:
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* PPP_MAIN.H
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file describes the main function of PPP task.
*
* Author:
* -------
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef _PPP_MAIN_H
#define _PPP_MAIN_H
//#ifndef __PRODUCTION_RELEASE__
#define DBG_ASSERT(X) ASSERT(X)
//#else
//#define DGB_ASSERT(X)
//#endif /* ~__PRODUCTION_RELEASE__ */
#define PPP_CTX(x) (ppp_ctx_ptr->x)
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* Removed to ppp_l4_enums.h */
/*
* PPP timer pool id
*/
typedef enum
{
PPP_CSD_LCP_TIMER,
PPP_CSD_AUTH_TIMER,
PPP_CSD_IPCP_TIMER,
PPP_GPRS_LCP_TIMER,
PPP_GPRS_AUTH_TIMER,
PPP_GPRS_IPCP_TIMER,
PPP_TIMER_POOL_SIZE
} ppp_timer_pool_enum;
typedef struct
{
stack_timer_struct ppp_base_timer;
event_scheduler *ppp_event_scheduler_ptr;
} ppp_timer_context_struct;
typedef struct ppp_gprs_s {
kal_uint8 phase;
ppp_fsm_struct fsm[PPP_FSM_SIZE];
/*
* GPRS Dial up Service Parameters
*/
kal_uint8 src_id; /* Keep for L4C used */
kal_uint8 port; /* Keep for L4C UART port used */
kal_uint8 context_id; /* Keep for TCM PDP context activation From L4C */
kal_uint8 pdp_type; /* RFU PDP type context */
kal_bool is_static_ip; /* Static IP is requested */
kal_bool is_waitforpdp; /* Wait for PDP CTX ACT */
kal_uint32 ip_addr; /* IP ADDRESS */
kal_uint32 dns_addr_1st; /* DNS ADDRESS 1 */
kal_uint32 dns_addr_2nd; /* DNS ADDRESS 2 */
kal_uint16 auth_protocol; /* Auth type requested by L4C */
kal_uint8 pap_config_option[50]; /* This is used for PDP CTX ACT */
kal_uint8 pap_config_option_len;
kal_uint8 chap_config_option[50]; /* This is used for PDP CTX ACT */
kal_uint8 chap_config_option_len;
kal_bool is_data_mode; /* Use FLC mechanism after PPP negotiation */
kal_bool is_pdp_context_activated;
ppp_deactivate_cause_enum deact_cause; /* Use to log the deactivate source */
/*
* UL Datapath parameters
*/
ppp_buff_head_struct * ibuff_head_ptr;
kal_bool GPRS_FLC_UL_LOCKED; /* The FLC UL buffer is not available)*/
peer_buff_struct * gprs_flc_ul_buff_ptr; /* If NULL, FLC_UL_LOCKED */
/*
* DL Datapath parameters
* if GPRS_FLC_DL_LOCKED we should enqueue the FLC peer buff from TCM
*/
ppp_buff_head_struct * obuff_head_ptr;
kal_bool GPRS_FLC_DL_LOCKED; /* While uart writed len < data len */
ppp_flc_buffq_struct * gprs_dl_input_queue;
/*
* PPP Framer Structure
*/
ppp_framer_struct ppp_framer;
} ppp_gprs_mod_struct;
typedef struct ppp_csd_s {
kal_uint8 phase;
ppp_fsm_struct fsm[PPP_FSM_SIZE];
/*
* CSD Service Parameters
*/
kal_char userame[32];
kal_char passwd[32];
kal_uint8 csd_mod_id; /* L2R or TDT */
kal_uint8 is_data_mode; /* Use FLC mechanism after PPP negotiation */
/*
* UL Datapath parameters
*/
ppp_buff_head_struct * obuff_head_ptr;
kal_bool CSD_FLC_UL_LOCKED; /* While the CSD FLC buffer is not available */
peer_buff_struct * csd_flc_ul_buff_ptr; /* If NULL, enqueue data from TCPIP */
ppp_flc_buffq_struct * csd_ul_input_queue;
/*
* DL Datapath paremeters
*/
ppp_buff_head_struct * ibuff_head_ptr;
kal_bool CSD_FLC_DL_LOCKED; /* While the TCPIP FLC buffer is not available)*/
peer_buff_struct * csd_flc_dl_buff_ptr; /* If NULL, enqueue data from CSD */
ppp_flc_buffq_struct * csd_dl_input_queue;
/*
* PPP Framer Structure
*/
ppp_framer_struct ppp_framer;
} ppp_csd_mod_struct;
typedef struct {
ppp_gprs_mod_struct gprs;
ppp_csd_mod_struct csd;
} ppp_context_struct;
void ppp_main(ilm_struct * ilm_ptr);
extern void ppp_send_ilm(module_type,kal_uint16,void *, void *);
/* Global variable */
extern ppp_context_struct * ppp_ctx_ptr;
extern ppp_timer_context_struct ppp_timer_ctx_g;
#endif /* ~PPP_MAIN_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -