Electroneum
Loading...
Searching...
No Matches
nftnlrdr.h
Go to the documentation of this file.
1/*
2 * MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2015 Tomofumi Hayashi
5 *
6 * This software is subject to the conditions detailed
7 * in the LICENCE file provided within the distribution.
8 */
9
10#ifndef NFTNLRDR_H_INCLUDED
11#define NFTNLRDR_H_INCLUDED
12
13#include "../commonrdr.h"
14int init_redirect(void);
16
17int
18add_redirect_rule2(const char * ifname,
19 const char * rhost, unsigned short eport,
20 const char * iaddr, unsigned short iport, int proto,
21 const char * desc, unsigned int timestamp);
22
23int
24add_peer_redirect_rule2(const char * ifname,
25 const char * rhost, unsigned short rport,
26 const char * eaddr, unsigned short eport,
27 const char * iaddr, unsigned short iport, int proto,
28 const char * desc, unsigned int timestamp);
29
30int
31add_filter_rule2(const char * ifname,
32 const char * rhost, const char * iaddr,
33 unsigned short eport, unsigned short iport,
34 int proto, const char * desc);
35
36int
37delete_redirect_and_filter_rules(unsigned short eport, int proto);
38
39int
40add_peer_dscp_rule2(const char * ifname,
41 const char * rhost, unsigned short rport,
42 unsigned char dscp,
43 const char * iaddr, unsigned short iport, int proto,
44 const char * desc, unsigned int timestamp);
45
46int
48 char * ifname, unsigned short * eport,
49 char * iaddr, int iaddrlen, unsigned short * iport,
50 int * proto, char * desc, int desclen,
51 char * rhost, int rhostlen, unsigned short * rport,
52 unsigned int * timestamp,
53 u_int64_t * packets, u_int64_t * bytes);
54int
55get_nat_redirect_rule(const char * nat_chain_name, const char * ifname,
56 unsigned short eport, int proto,
57 char * iaddr, int iaddrlen, unsigned short * iport,
58 char * desc, int desclen,
59 char * rhost, int rhostlen,
60 unsigned int * timestamp,
61 u_int64_t * packets, u_int64_t * bytes);
62int
64 char * ifname, unsigned short * eport,
65 char * iaddr, int iaddrlen, unsigned short * iport,
66 int * proto, char * desc, int desclen,
67 char * rhost, int rhostlen,
68 unsigned int * timestamp,
69 u_int64_t * packets, u_int64_t * bytes);
70
71unsigned short *
72get_portmappings_in_range(unsigned short startport, unsigned short endport,
73 int proto, unsigned int * number);
74
75/* in nfct_get.c */
76int get_nat_ext_addr(struct sockaddr* src, struct sockaddr *dst, uint8_t proto,
77 struct sockaddr* ret_ext);
78
79/* for debug */
80int
81list_redirect_rule(const char * ifname);
82
83#endif
84
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)
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 delete_redirect_and_filter_rules(unsigned short eport, int proto)
unsigned short * get_portmappings_in_range(unsigned short startport, unsigned short endport, int proto, unsigned int *number)
void shutdown_redirect(void)
int get_nat_ext_addr(struct sockaddr *src, struct sockaddr *dst, uint8_t proto, struct sockaddr *ret_ext)
int list_redirect_rule(const char *ifname)
int get_redirect_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 int *timestamp, u_int64_t *packets, u_int64_t *bytes)
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 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_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 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)
int init_redirect(void)
unsigned char uint8_t
Definition stdint.h:124