Exemplo n.º 1
0
Arquivo: ccp.c Projeto: rtemss/rtems
/*
 * ccp_protrej - peer doesn't talk CCP.
 */
static void
ccp_protrej(
    int unit)
{
    ccp_flags_set(unit, 0, 0);
    fsm_lowerdown(&ccp_fsm[unit]);
}
Exemplo n.º 2
0
Arquivo: ccp.c Projeto: rtemss/rtems
/*
 * ccp_close - Terminate CCP.
 */
static void
ccp_close(
    int unit,
    char *reason)
{
    ccp_flags_set(unit, 0, 0);
    fsm_close(&ccp_fsm[unit], reason);
}
Exemplo n.º 3
0
/*
 * ccp_close - Terminate CCP.
 */
void 
ccp_close(PPP_IF_VAR_T *pPppIf)
{
	fsm *f = &pPppIf->ccp_fsm;
	
    ccp_flags_set(&pPppIf->pSc->sc_flags,0, 0);
    //fsm_close(&ccp_fsm[unit], reason);
    fsm_close(f);
}
Exemplo n.º 4
0
Arquivo: ccp.c Projeto: rtemss/rtems
/*
 * 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);
}
Exemplo n.º 5
0
/*
 * 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);
}