/* called from natpmp.c too */ int _upnp_delete_redir(unsigned short eport, int proto) { int r; #if defined(__linux__) r = delete_redirect_and_filter_rules(eport, proto); #else r = delete_redirect_rule(ext_if_name, eport, proto); delete_filter_rule(ext_if_name, eport, proto); #endif #ifdef ENABLE_LEASEFILE lease_file_remove( eport, proto); #endif #ifdef ENABLE_EVENTS upnp_event_var_change_notify(EWanIPC); #endif return r; }
/* called from natpmp.c too */ int _upnp_delete_redir(unsigned short eport, int proto) { int r; #ifdef MBB_FEATURE_PCP int wan_status; PARA_TO_PCP_PROC_ST pcp_para; #endif #ifdef MBB_FEATURE_PCP wan_status = MgntGetWanState(); if (WAN_STATUS_CONNECTED == wan_status) { memset(&pcp_para, 0, sizeof(pcp_para)); //eport是pcp的iport fill_pcp_process_para(&pcp_para, 0, NULL, eport, proto, 0, 0, NULL); send_msg_to_pcp_client(ATP_MSG_PCP_DELETE_PORTMAP, &pcp_para); } #endif #if defined(__linux__) NP_UPNP_INFO("enter _upnp_delete_redir()\n"); NP_UPNP_DEBUG("defined(__linux__), call delete_redirect_and_filter_rules()\n"); r = delete_redirect_and_filter_rules(eport, proto); #else r = delete_redirect_rule(ext_if_name, eport, proto); delete_filter_rule(ext_if_name, eport, proto); #endif #ifdef ENABLE_LEASEFILE lease_file_remove( eport, proto); #endif #ifdef ENABLE_EVENTS upnp_event_var_change_notify(EWanIPC); #endif return r; }