Annotation of embedaddon/miniupnpd/ipfw/ipfwrdr.h, revision 1.1.1.1
1.1 misho 1: /*
2: * MiniUPnP project
3: * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4: * (c) 2009 Jardel Weyrich
5: * This software is subject to the conditions detailed
6: * in the LICENCE file provided within the distribution
7: */
8:
9: #ifndef __IPFWRDR_H__
10: #define __IPFWRDR_H__
11:
12: #include "../commonrdr.h"
13:
14: int add_redirect_rule2(
15: const char * ifname, // src interface (external)
16: unsigned short eport, // src port (external)
17: const char * iaddr, // dst address (internal)
18: unsigned short iport, // dst port (internal)
19: int proto,
20: const char * desc);
21:
22: int add_filter_rule2(
23: const char * ifname,
24: const char * iaddr,
25: unsigned short eport,
26: unsigned short iport,
27: int proto,
28: const char * desc);
29:
30: #if 0
31:
32: //
33: // get_redirect_rule() gets internal IP and port from
34: // interface, external port and protocl
35: //
36: int get_redirect_rule(
37: const char * ifname,
38: unsigned short eport,
39: int proto,
40: char * iaddr,
41: int iaddrlen,
42: unsigned short * iport,
43: char * desc,
44: int desclen,
45: u_int64_t * packets,
46: u_int64_t * bytes);
47:
48: int get_redirect_rule_by_index(
49: int index,
50: char * ifname,
51: unsigned short * eport,
52: char * iaddr,
53: int iaddrlen,
54: unsigned short * iport,
55: int * proto,
56: char * desc,
57: int desclen,
58: u_int64_t * packets,
59: u_int64_t * bytes);
60:
61: #endif
62:
63: //
64: // delete_redirect_rule()
65: //
66: int delete_redirect_rule(const char * ifname, unsigned short eport, int proto);
67:
68: //
69: // delete_filter_rule()
70: //
71: int delete_filter_rule(const char * ifname, unsigned short eport, int proto);
72:
73: int clear_redirect_rules(void);
74:
75: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>