uint32_t IPCP_destroy ( IP_IF_PTR if_ptr /* [IN] the IP interface structure */ ) { /* Body */ #if RTCSCFG_ENABLE_IP4 IPCP_CFG_STRUCT_PTR ipcp_ptr = if_ptr->HANDLE; PPP_unregister(ipcp_ptr->HANDLE, PPP_PROT_IP); PPP_unregister(ipcp_ptr->HANDLE, PPP_PROT_IPCP); PPPFSM_lowerdown(&ipcp_ptr->FSM); PPPFSM_destroy(&ipcp_ptr->FSM); _mem_free(ipcp_ptr); if_ptr->HANDLE = NULL; return RTCS_OK; #else return RTCSERR_IP_IS_DISABLED; #endif /* RTCSCFG_ENABLE_IP4 */ } /* Endbody */
void PPP_lowerdown ( _ppp_handle handle /* [IN] - the PPP state structure */ ) { /* Body */ #if RTCSCFG_ENABLE_IP4 PPP_CFG_PTR ppp_ptr = handle; PPPFSM_lowerdown(&ppp_ptr->LCP_FSM); #endif /* RTCSCFG_ENABLE_IP4 */ } /* Endbody */
static void IPCP_lowerdown ( pointer fsm /* [IN] - IPCP automaton */ ) { /* Body */ IP_IF_PTR if_ptr = ((PPPFSM_CFG_PTR)fsm)->PRIVATE; IPCP_CFG_STRUCT_PTR ipcp_ptr = if_ptr->HANDLE; /* Call the previous PPP_LINK_DOWN callback */ if (ipcp_ptr->CALLDOWN) { ipcp_ptr->CALLDOWN(ipcp_ptr->PARAMDOWN); } /* Endif */ /* Start IPCP */ PPPFSM_lowerdown(fsm); } /* Endbody */
uint_32 IPCP_destroy ( IP_IF_PTR if_ptr /* [IN] the IP interface structure */ ) { /* Body */ IPCP_CFG_STRUCT_PTR ipcp_ptr = if_ptr->HANDLE; PPP_unregister(ipcp_ptr->HANDLE, PPP_PROT_IP); PPP_unregister(ipcp_ptr->HANDLE, PPP_PROT_IPCP); PPPFSM_lowerdown(&ipcp_ptr->FSM); PPPFSM_destroy(&ipcp_ptr->FSM); _mem_free(ipcp_ptr); if_ptr->HANDLE = NULL; return RTCS_OK; } /* Endbody */