Diff for /embedaddon/miniupnpd/upnpredirect.h between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/05/29 12:55:57 version 1.1.1.3, 2013/07/22 00:32:35
Line 1 Line 1
 /* $Id$ */  /* $Id$ */
 /* MiniUPnP project  /* MiniUPnP project
  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/   * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * (c) 2006-2011 Thomas Bernard  * (c) 2006-2012 Thomas Bernard
  * This software is subject to the conditions detailed   * This software is subject to the conditions detailed
  * in the LICENCE file provided within the distribution */   * in the LICENCE file provided within the distribution */
   
#ifndef __UPNPREDIRECT_H__#ifndef UPNPREDIRECT_H_INCLUDED
#define __UPNPREDIRECT_H__#define UPNPREDIRECT_H_INCLUDED
   
 /* for u_int64_t */  /* for u_int64_t */
 #include <sys/types.h>  #include <sys/types.h>
Line 17 Line 17
 int reload_from_lease_file(void);  int reload_from_lease_file(void);
 #endif  #endif
   
/* upnp_redirect() /* upnp_redirect()
  * calls OS/fw dependant implementation of the redirection.   * calls OS/fw dependant implementation of the redirection.
  * protocol should be the string "TCP" or "UDP"   * protocol should be the string "TCP" or "UDP"
  * returns: 0 on success   * returns: 0 on success
Line 26  int reload_from_lease_file(void); Line 26  int reload_from_lease_file(void);
  *          -3 permission check failed   *          -3 permission check failed
  */   */
 int  int
upnp_redirect(const char * rhost, unsigned short eport, upnp_redirect(const char * rhost, unsigned short eport,
               const char * iaddr, unsigned short iport,                const char * iaddr, unsigned short iport,
               const char * protocol, const char * desc,                const char * protocol, const char * desc,
               unsigned int leaseduration);                unsigned int leaseduration);
Line 55  upnp_get_redirection_infos(unsigned short eport, const Line 55  upnp_get_redirection_infos(unsigned short eport, const
 int  int
 upnp_get_redirection_infos_by_index(int index,  upnp_get_redirection_infos_by_index(int index,
                                     unsigned short * eport, char * protocol,                                      unsigned short * eport, char * protocol,
                                    unsigned short * iport,                                     unsigned short * iport,
                                     char * iaddr, int iaddrlen,                                      char * iaddr, int iaddrlen,
                                     char * desc, int desclen,                                      char * desc, int desclen,
                                     char * rhost, int rhostlen,                                      char * rhost, int rhostlen,
Line 81  struct rule_state Line 81  struct rule_state
         struct rule_state * next;          struct rule_state * next;
         unsigned short eport;          unsigned short eport;
         unsigned char proto;          unsigned char proto;
        unsigned char to_remove;         unsigned char to_remove;
 };  };
   
 /* return a linked list of all rules  /* return a linked list of all rules
Line 107  upnp_get_portmappings_in_range(unsigned short startpor Line 107  upnp_get_portmappings_in_range(unsigned short startpor
                                unsigned short endport,                                 unsigned short endport,
                                const char * protocol,                                 const char * protocol,
                                unsigned int * number);                                 unsigned int * number);
   
 #ifdef ENABLE_6FC_SERVICE  
 /* function to be used by WANIPv6_FirewallControl implementation */  
   
 /* retreive outbound pinhole timeout*/  
 int  
 upnp_check_outbound_pinhole(int proto, int * timeout);  
   
 /* add an inbound pinehole  
  * return value :  
  *  1 = success  
  * -1 = Pinhole space exhausted  
  * .. = error */  
 int  
 upnp_add_inboundpinhole(const char * raddr, unsigned short rport,  
               const char * iaddr, unsigned short iport,  
               const char * protocol, const char * leaseTime, int * uid);  
   
 int  
 upnp_add_inboundpinhole_internal(const char * raddr, unsigned short rport,  
                        const char * iaddr, unsigned short iport,  
                        const char * proto, int * uid);  
   
 /*  
  * return values :  
  *  -4 not found  
  *  -5 in another table  
  *  -6 in another chain  
  *  -7 in a chain but not a rule. (chain policy)  
  * */  
 int  
 upnp_get_pinhole_info(const char * raddr, unsigned short rport, char * iaddr, unsigned short * iport, char * proto, const char * uid, char * lt);  
   
 /* update the lease time */  
 int  
 upnp_update_inboundpinhole(const char * uid, const char * leasetime);  
   
 /* remove the inbound pinhole */  
 int  
 upnp_delete_inboundpinhole(const char * uid);  
   
 /* ... */  
 int  
 upnp_check_pinhole_working(const char * uid, char * eaddr, char * iaddr, unsigned short * eport, unsigned short * iport, char * protocol, int * rulenum_used);  
   
 /* number of packets that went through the pinhole */  
 int  
 upnp_get_pinhole_packets(const char * uid, int * packets);  
   
 /* ? */  
 int  
 upnp_clean_expiredpinhole(void);  
   
 #endif /* ENABLE_6FC_SERVICE */  
   
 /* stuff for responding to miniupnpdctl */  /* stuff for responding to miniupnpdctl */
 #ifdef USE_MINIUPNPDCTL  #ifdef USE_MINIUPNPDCTL

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>