1: /* $Id: commonrdr.h,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $ */
2: /* MiniUPnP project
3: * (c) 2006-2011 Thomas Bernard
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_INCLUDED
8: #define COMMONRDR_H_INCLUDED
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,
26: char * rhost, int rhostlen,
27: unsigned int * timestamp,
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,
35: char * rhost, int rhostlen,
36: unsigned int * timestamp,
37: u_int64_t * packets, u_int64_t * bytes);
38:
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:
45: #endif
46:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>