Electroneum
iptcrdr.h
Go to the documentation of this file.
1 /* $Id: iptcrdr.h,v 1.18 2012/03/05 20:36:20 nanard Exp $ */
2 /* MiniUPnP project
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 */
7 
8 #ifndef IPTCRDR_H_INCLUDED
9 #define IPTCRDR_H_INCLUDED
10 
11 #include "../commonrdr.h"
12 
13 int
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);
18 
19 int
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);
25 
26 int
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);
31 
32 int
33 delete_redirect_and_filter_rules(unsigned short eport, int proto);
34 
35 int
36 add_peer_dscp_rule2(const char * ifname,
37  const char * rhost, unsigned short rport,
38  unsigned char dscp,
39  const char * iaddr, unsigned short iport, int proto,
40  const char * desc, unsigned int timestamp);
41 
42 int get_nat_ext_addr(struct sockaddr* src, struct sockaddr *dst, uint8_t proto,
43  struct sockaddr* ret_ext);
44 int
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);
52 int
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);
59 
60 /* for debug */
61 int
62 list_redirect_rule(const char * ifname);
63 
64 #endif
65 
int delete_redirect_and_filter_rules(unsigned short eport, int proto)
int get_peer_rule_by_index(int index, char *ifname, unsigned short *eport, char *iaddr, int iaddrlen, unsigned short *iport, int *proto, char *desc, int desclen, char *rhost, int rhostlen, unsigned short *rport, unsigned int *timestamp, u_int64_t *packets, u_int64_t *bytes)
unsigned char uint8_t
Definition: stdint.h:124
int get_nat_redirect_rule(const char *nat_chain_name, const char *ifname, unsigned short eport, int proto, char *iaddr, int iaddrlen, unsigned short *iport, char *desc, int desclen, char *rhost, int rhostlen, unsigned int *timestamp, u_int64_t *packets, u_int64_t *bytes)
int list_redirect_rule(const char *ifname)
int get_nat_ext_addr(struct sockaddr *src, struct sockaddr *dst, uint8_t proto, struct sockaddr *ret_ext)
int add_redirect_rule2(const char *ifname, const char *rhost, unsigned short eport, const char *iaddr, unsigned short iport, int proto, const char *desc, unsigned int timestamp)
int add_filter_rule2(const char *ifname, const char *rhost, const char *iaddr, unsigned short eport, unsigned short iport, int proto, const char *desc)
int add_peer_dscp_rule2(const char *ifname, const char *rhost, unsigned short rport, unsigned char dscp, const char *iaddr, unsigned short iport, int proto, const char *desc, unsigned int timestamp)
int add_peer_redirect_rule2(const char *ifname, const char *rhost, unsigned short rport, const char *eaddr, unsigned short eport, const char *iaddr, unsigned short iport, int proto, const char *desc, unsigned int timestamp)