📄 upnpredirect.h
字号:
/* $Id: upnpredirect.h,v 1.13 2007/11/01 00:44:00 nanard Exp $ *//* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */#ifndef __UPNPREDIRECT_H__#define __UPNPREDIRECT_H__/* upnp_redirect() * calls OS/fw dependant implementation of the redirection. * protocol should be the string "TCP" or "UDP" * returns: 0 on success * -1 failed to redirect * -2 already redirected * -3 permission check failed */intupnp_redirect(unsigned short eport, const char * iaddr, unsigned short iport, const char * protocol, const char * desc);/* upnp_redirect_internal() * same as upnp_redirect() without any check */intupnp_redirect_internal(unsigned short eport, const char * iaddr, unsigned short iport, int proto, const char * desc);/* upnp_get_redirection_infos() */intupnp_get_redirection_infos(unsigned short eport, const char * protocol, unsigned short * iport, char * iaddr, int iaddrlen, char * desc, int desclen);/* upnp_get_redirection_infos_by_index */intupnp_get_redirection_infos_by_index(int index, unsigned short * eport, char * protocol, unsigned short * iport, char * iaddr, int iaddrlen, char * desc, int desclen);/* upnp_delete_redirection() * returns: 0 on success * -1 on failure*/intupnp_delete_redirection(unsigned short eport, const char * protocol);/* _upnp_delete_redir() * same as above */int_upnp_delete_redir(unsigned short eport, int proto);/* Periodic cleanup functions */struct rule_state{ u_int64_t packets; u_int64_t bytes; struct rule_state * next; unsigned short eport; short proto;};struct rule_state *get_upnp_rules_state_list(int max_rules_number_target);/* remove_unused_rules() : * also free the list */voidremove_unused_rules(struct rule_state * list);/* stuff for responding to miniupnpdctl */#ifdef USE_MINIUPNPDCTLvoidwrite_ruleset_details(int s);#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -