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