/* Disconnect PPPoE session */ void pppoe_session_disconnect(pppoe_session *_this) { struct timeval tv; if (_this->state != PPPOE_SESSION_STATE_DISPOSING) { pppoe_session_send_PADT(_this); /* free process should be par event */ timerclear(&tv); evtimer_add(&_this->ev_disposing, &tv); _this->state = PPPOE_SESSION_STATE_DISPOSING; } if (_this->ppp != NULL) ppp_phy_downed(_this->ppp); }
/* notify disconnection to ppp to terminate or free of ppp */ static void l2tp_call_notify_down(l2tp_call *_this) { if (_this->ppp != NULL) ppp_phy_downed(_this->ppp); }