/* Stop PPPoE session */ void pppoe_session_stop(pppoe_session *_this) { if (_this->state != PPPOE_SESSION_STATE_DISPOSING) pppoe_session_disconnect(_this); }
/* stop PPPoE daemon */ void pppoed_stop(pppoed *_this) { pppoed_listener *plistener; hash_link *hl; pppoe_session *session; if (!pppoed_is_running(_this)) return; _this->state = PPPOED_STATE_STOPPED; if (_this->session_hash != NULL) { for (hl = hash_first(_this->session_hash); hl != NULL; hl = hash_next(_this->session_hash)) { session = (pppoe_session *)hl->item; pppoe_session_disconnect(session); pppoe_session_stop(session); } } for (slist_itr_first(&_this->listener); slist_itr_has_next(&_this->listener);) { plistener = slist_itr_next(&_this->listener); pppoed_listener_stop(plistener); free(plistener); slist_itr_remove(&_this->listener); } PPPOED_DBG((_this, LOG_DEBUG, "Stopped")); }
static void pppoe_session_close_by_ppp(npppd_ppp *ppp) { pppoe_session *_this; _this = ppp->phy_context; PPPOE_SESSION_ASSERT(_this != NULL); if (_this != NULL) /* do this before pptp_call_disconnect() */ _this->ppp = NULL; pppoe_session_disconnect(_this); }