Annotation of embedaddon/mpd/src/nat.h, revision 1.1.1.2
1.1 misho 1:
2: /*
3: * nat.h
4: *
5: * Written by Alexander Motin <mav@FreeBSD.org>
6: */
7:
8: #ifndef _NAT_H_
9: #define _NAT_H_
10:
11: #include <netgraph/ng_nat.h>
12:
13: #ifdef NG_NAT_DESC_LENGTH
14: /* max. number of red-port rules */
1.1.1.2 ! misho 15: #define NM_PORT 32
1.1 misho 16: /* max. number of red-addr rules */
17: #define NM_ADDR 8
18: /* max. number of red-proto rules */
19: #define NM_PROTO 8
20: #endif
21:
22: /* Configuration options */
23:
24: enum {
25: NAT_CONF_LOG,
26: NAT_CONF_INCOMING,
27: NAT_CONF_SAME_PORTS,
28: NAT_CONF_UNREG_ONLY
29: };
30:
31: struct natstate {
32: struct optinfo options; /* Configuration options */
33: struct u_addr alias_addr; /* Alias IP address */
34: struct u_addr target_addr; /* Target IP address */
35: #ifdef NG_NAT_DESC_LENGTH
36: struct ng_nat_redirect_port nrpt[NM_PORT]; /* NAT redirect port */
37: int nrpt_id[NM_PORT]; /* NAT redirect port ID's */
38: struct ng_nat_redirect_addr nrad[NM_ADDR]; /* NAT redirect address */
39: int nrad_id[NM_ADDR]; /* NAT redirect address ID's */
40: struct ng_nat_redirect_proto nrpr[NM_PROTO];/* NAT redirect proto */
41: int nrpr_id[NM_PROTO]; /* NAT redirect proto ID's */
42: #endif
43: };
44: typedef struct natstate *NatState;
45:
46: /*
47: * VARIABLES
48: */
49:
50: extern const struct cmdtab NatSetCmds[];
1.1.1.2 ! misho 51: #ifdef NG_NAT_DESC_LENGTH
! 52: extern const struct cmdtab NatUnSetCmds[];
! 53: #endif
1.1 misho 54:
55: extern void NatInit(Bund b);
56: extern int NatStat(Context ctx, int ac, char *av[], void *arg);
57:
58: #endif
59:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>