1 /* $Id: iptcrdr.h,v 1.21 2014/03/28 12:03:37 nanard Exp $ */
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006-2011 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
8 #ifndef IPTCRDR_H_INCLUDED
9 #define IPTCRDR_H_INCLUDED
11 #include "../commonrdr.h"
14 add_redirect_rule2(const char * ifname
,
15 const char * rhost
, unsigned short eport
,
16 const char * iaddr
, unsigned short iport
, int proto
,
17 const char * desc
, unsigned int timestamp
);
20 add_peer_redirect_rule2(const char * ifname
,
21 const char * rhost
, unsigned short rport
,
22 const char * eaddr
, unsigned short eport
,
23 const char * iaddr
, unsigned short iport
, int proto
,
24 const char * desc
, unsigned int timestamp
);
27 add_filter_rule2(const char * ifname
,
28 const char * rhost
, const char * iaddr
,
29 unsigned short eport
, unsigned short iport
,
30 int proto
, const char * desc
);
33 delete_redirect_and_filter_rules(unsigned short eport
, int proto
);
36 add_peer_dscp_rule2(const char * ifname
,
37 const char * rhost
, unsigned short rport
,
39 const char * iaddr
, unsigned short iport
, int proto
,
40 const char * desc
, unsigned int timestamp
);
42 int get_nat_ext_addr(struct sockaddr
* src
, struct sockaddr
*dst
, uint8_t proto
,
43 struct sockaddr
* ret_ext
);
45 get_peer_rule_by_index(int index
,
46 char * ifname
, unsigned short * eport
,
47 char * iaddr
, int iaddrlen
, unsigned short * iport
,
48 int * proto
, char * desc
, int desclen
,
49 char * rhost
, int rhostlen
, unsigned short * rport
,
50 unsigned int * timestamp
,
51 u_int64_t
* packets
, u_int64_t
* bytes
);
53 get_nat_redirect_rule(const char * nat_chain_name
, const char * ifname
, unsigned short eport
, int proto
,
54 char * iaddr
, int iaddrlen
, unsigned short * iport
,
55 char * desc
, int desclen
,
56 char * rhost
, int rhostlen
,
57 unsigned int * timestamp
,
58 u_int64_t
* packets
, u_int64_t
* bytes
);
62 list_redirect_rule(const char * ifname
);