Monero
Loading...
Searching...
No Matches
ipfrdr.h
Go to the documentation of this file.
1/* $Id: ipfrdr.h,v 1.3 2007/11/02 22:54:01 nanard Exp $ */
2/* MiniUPnP project
3 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
4 * (c) 2006-2007 Thomas Bernard
5 * This software is subject to the conditions detailed
6 * in the LICENCE file provided within the distribution */
7#ifndef IPFRDR_H_INCLUDED
8#define IPFRDR_H_INCLUDED
9
10#include "../commonrdr.h"
11
12int
13add_redirect_rule2(const char * ifname, const char * rhost, unsigned short eport,
14 const char * iaddr, unsigned short iport, int proto,
15 const char * desc, unsigned int timestamp);
16
17int
18add_filter_rule2(const char * ifname, const char * rhost, const char * iaddr,
19 unsigned short eport, unsigned short iport,
20 int proto, const char * desc);
21
22
23/* get_redirect_rule() gets internal IP and port from
24 * interface, external port and protocl
25 */
26#if 0
27int
28get_redirect_rule(const char * ifname, unsigned short eport, int proto,
29 char * iaddr, int iaddrlen, unsigned short * iport,
30 char * desc, int desclen,
31 u_int64_t * packets, u_int64_t * bytes);
32
33int
35 char * ifname, unsigned short * eport,
36 char * iaddr, int iaddrlen, unsigned short * iport,
37 int * proto, char * desc, int desclen,
38 u_int64_t * packets, u_int64_t * bytes);
39#endif
40
41/* delete_redirect_rule()
42 */
43int
44delete_redirect_rule(const char * ifname, unsigned short eport, int proto);
45
46/* delete_filter_rule()
47 */
48int
49delete_filter_rule(const char * ifname, unsigned short eport, int proto);
50
51int
53
54#endif
55
int get_redirect_rule(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)
Definition ipfrdr.c:323
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)
Definition ipfrdr.c:403
int add_filter_rule2(const char *ifname, const char *rhost, const char *iaddr, unsigned short eport, unsigned short iport, int proto, const char *desc)
Definition ipfrdr.c:564
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)
Definition ipfrdr.c:230
int delete_filter_rule(const char *ifname, unsigned short eport, int proto)
Definition ipfrdr.c:654
int clear_redirect_rules(void)
int delete_redirect_rule(const char *ifname, unsigned short eport, int proto)
Definition ipfrdr.c:552
static const char * ifname
Definition testipfwrdr.c:17