Annotation of embedaddon/miniupnpd/commonrdr.h, revision 1.1.1.2
1.1.1.2 ! misho 1: /* $Id: commonrdr.h,v 1.7 2011/06/22 20:34:39 nanard Exp $ */
1.1 misho 2: /* MiniUPnP project
1.1.1.2 ! misho 3: * (c) 2006-2011 Thomas Bernard
1.1 misho 4: * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
5: * This software is subject to the conditions detailed
6: * in the LICENCE file provided within the distribution */
7: #ifndef __COMMONRDR_H__
8: #define __COMMONRDR_H__
9:
10: #include "config.h"
11:
12: /* init and shutdown functions */
13: int
14: init_redirect(void);
15:
16: void
17: shutdown_redirect(void);
18:
19: /* get_redirect_rule() gets internal IP and port from
20: * interface, external port and protocl
21: */
22: int
23: get_redirect_rule(const char * ifname, unsigned short eport, int proto,
24: char * iaddr, int iaddrlen, unsigned short * iport,
25: char * desc, int desclen,
1.1.1.2 ! misho 26: char * rhost, int rhostlen,
! 27: unsigned int * timestamp,
1.1 misho 28: u_int64_t * packets, u_int64_t * bytes);
29:
30: int
31: get_redirect_rule_by_index(int index,
32: char * ifname, unsigned short * eport,
33: char * iaddr, int iaddrlen, unsigned short * iport,
34: int * proto, char * desc, int desclen,
1.1.1.2 ! misho 35: char * rhost, int rhostlen,
! 36: unsigned int * timestamp,
1.1 misho 37: u_int64_t * packets, u_int64_t * bytes);
38:
1.1.1.2 ! misho 39: /* return an (malloc'ed) array of "external" port for which there is
! 40: * a port mapping. number is the size of the array */
! 41: unsigned short *
! 42: get_portmappings_in_range(unsigned short startport, unsigned short endport,
! 43: int proto, unsigned int * number);
! 44:
1.1 misho 45: #endif
46:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>