/* * ccp_open - CCP is allowed to come up. */ static void ccp_open( int unit) { fsm *f = &ccp_fsm[unit]; if (f->state != OPENED) ccp_flags_set(unit, 1, 0); /* * Find out which compressors the kernel supports before * deciding whether to open in silent mode. */ ccp_resetci(f); if (!ANY_COMPRESS(ccp_gotoptions[unit])) f->flags |= OPT_SILENT; fsm_open(f); }
/* * ccp_open - CCP is allowed to come up. */ void ccp_open(PPP_IF_VAR_T *pPppIf) { diag_printf("\n<ccp_open>\n"); fsm *f = &pPppIf->ccp_fsm; if (f->state != OPENED) ccp_flags_set(&pPppIf->pSc->sc_flags,1, 0); /* * Find out which compressors the kernel supports before * deciding whether to open in silent mode. */ ccp_resetci(f); if (!ANY_COMPRESS(f->pPppIf->ccp_gotoptions)) f->flags |= OPT_SILENT; { //Added by Eddy int ipmode = 0; CFG_get(CFG_WAN_IP_MODE, &ipmode); if (ipmode == PPPOEMODE) f->flags |= OPT_SILENT; #ifdef CONFIG_PPTP_PPPOE //Added by Haitao int pptp_wanif = 0; CFG_get(CFG_PTP_WANIF, &pptp_wanif); if(ipmode == PPTPMODE && pptp_wanif == 2 && !strcmp(pPppIf->pppname,"ppp0"))//for pptp over pppoe use ppp f->flags |= OPT_SILENT; #endif #ifdef CONFIG_L2TP_OVER_PPPOE int l2tp_wanif = 0; CFG_get(CFG_L2T_WANIF, &l2tp_wanif); if((ipmode == L2TPMODE) && (l2tp_wanif == 2) && (!strcmp(pPppIf->pppname,"ppp0")))//for l2tp over pppoe use ppp f->flags |= OPT_SILENT; #endif } fsm_open(f); }