Deleted Added
full compact
alias.h (59046) alias.h (59356)
1/*lint -save -library Flexelint comment for external headers */
2
3/*
4 Alias.h defines the outside world interfaces for the packet
5 aliasing software.
6
7 This software is placed into the public domain with no restrictions
8 on its distribution.
9
1/*lint -save -library Flexelint comment for external headers */
2
3/*
4 Alias.h defines the outside world interfaces for the packet
5 aliasing software.
6
7 This software is placed into the public domain with no restrictions
8 on its distribution.
9
10 $FreeBSD: head/sys/netinet/libalias/alias.h 59046 2000-04-05 14:23:42Z ru $
10 $FreeBSD: head/sys/netinet/libalias/alias.h 59356 2000-04-18 10:18:21Z ru $
11*/
12
13
14#ifndef _ALIAS_H_
15#define _ALIAS_H_
16
17/* Alias link representative (incomplete struct) */
18struct alias_link;

--- 30 unchanged lines hidden (view full) ---

49 PacketAliasRedirectPort(struct in_addr, u_short,
50 struct in_addr, u_short,
51 struct in_addr, u_short,
52 u_char);
53
54 extern int
55 PacketAliasPptp(struct in_addr);
56
11*/
12
13
14#ifndef _ALIAS_H_
15#define _ALIAS_H_
16
17/* Alias link representative (incomplete struct) */
18struct alias_link;

--- 30 unchanged lines hidden (view full) ---

49 PacketAliasRedirectPort(struct in_addr, u_short,
50 struct in_addr, u_short,
51 struct in_addr, u_short,
52 u_char);
53
54 extern int
55 PacketAliasPptp(struct in_addr);
56
57 extern struct alias_link *
58 PacketAliasRedirectPptp(struct in_addr, struct in_addr, struct in_addr);
57
58 extern struct alias_link *
59 PacketAliasRedirectAddr(struct in_addr,
60 struct in_addr);
61
62 extern void
63 PacketAliasRedirectDelete(struct alias_link *);
64

--- 43 unchanged lines hidden (view full) ---

108#define PKT_ALIAS_SAME_PORTS 0x04
109
110/* If PKT_ALIAS_USE_SOCKETS is set, then when partially specified
111 links (e.g. destination port and/or address is zero), the packet
112 aliasing engine will attempt to allocate a socket for the aliasing
113 port it chooses. This will avoid interference with the host
114 machine. Fully specified links do not require this. This bit
115 is set after a call to PacketAliasInit(), so it is a default
59
60 extern struct alias_link *
61 PacketAliasRedirectAddr(struct in_addr,
62 struct in_addr);
63
64 extern void
65 PacketAliasRedirectDelete(struct alias_link *);
66

--- 43 unchanged lines hidden (view full) ---

110#define PKT_ALIAS_SAME_PORTS 0x04
111
112/* If PKT_ALIAS_USE_SOCKETS is set, then when partially specified
113 links (e.g. destination port and/or address is zero), the packet
114 aliasing engine will attempt to allocate a socket for the aliasing
115 port it chooses. This will avoid interference with the host
116 machine. Fully specified links do not require this. This bit
117 is set after a call to PacketAliasInit(), so it is a default
116 mode of operation.*/
118 mode of operation. */
117#define PKT_ALIAS_USE_SOCKETS 0x08
118
119/* If PKT_ALIAS_UNREGISTERED_ONLY is set, then only packets with
119#define PKT_ALIAS_USE_SOCKETS 0x08
120
121/* If PKT_ALIAS_UNREGISTERED_ONLY is set, then only packets with
120 unregistered source addresses will be aliased (along with those
121 of the ppp host maching itself. Private addresses are those
122 in the following ranges:
122 unregistered source addresses will be aliased. Private
123 addresses are those in the following ranges:
123 10.0.0.0 -> 10.255.255.255
124 172.16.0.0 -> 172.31.255.255
125 192.168.0.0 -> 192.168.255.255 */
126#define PKT_ALIAS_UNREGISTERED_ONLY 0x10
127
128/* If PKT_ALIAS_RESET_ON_ADDR_CHANGE is set, then the table of dynamic
129 aliasing links will be reset whenever PacketAliasSetAddress()
130 changes the default aliasing address. If the default aliasing
124 10.0.0.0 -> 10.255.255.255
125 172.16.0.0 -> 172.31.255.255
126 192.168.0.0 -> 192.168.255.255 */
127#define PKT_ALIAS_UNREGISTERED_ONLY 0x10
128
129/* If PKT_ALIAS_RESET_ON_ADDR_CHANGE is set, then the table of dynamic
130 aliasing links will be reset whenever PacketAliasSetAddress()
131 changes the default aliasing address. If the default aliasing
131 address is left unchanged by this functions call, then the
132 address is left unchanged by this function call, then the
132 table of dynamic aliasing links will be left intact. This
133 bit is set after a call to PacketAliasInit(). */
134#define PKT_ALIAS_RESET_ON_ADDR_CHANGE 0x20
135
136#ifndef NO_FW_PUNCH
137/* If PKT_ALIAS_PUNCH_FW is set, active FTP and IRC DCC connections
138 will create a 'hole' in the firewall to allow the transfers to
139 work. Where (IPFW "line-numbers") the hole is created is

--- 6 unchanged lines hidden (view full) ---

146/* If PKT_ALIAS_PROXY_ONLY is set, then NAT will be disabled and only
147 transparent proxying performed */
148#define PKT_ALIAS_PROXY_ONLY 0x40
149
150/* If PKT_ALIAS_REVERSE is set, the actions of PacketAliasIn()
151 and PacketAliasOut() are reversed */
152#define PKT_ALIAS_REVERSE 0x80
153
133 table of dynamic aliasing links will be left intact. This
134 bit is set after a call to PacketAliasInit(). */
135#define PKT_ALIAS_RESET_ON_ADDR_CHANGE 0x20
136
137#ifndef NO_FW_PUNCH
138/* If PKT_ALIAS_PUNCH_FW is set, active FTP and IRC DCC connections
139 will create a 'hole' in the firewall to allow the transfers to
140 work. Where (IPFW "line-numbers") the hole is created is

--- 6 unchanged lines hidden (view full) ---

147/* If PKT_ALIAS_PROXY_ONLY is set, then NAT will be disabled and only
148 transparent proxying performed */
149#define PKT_ALIAS_PROXY_ONLY 0x40
150
151/* If PKT_ALIAS_REVERSE is set, the actions of PacketAliasIn()
152 and PacketAliasOut() are reversed */
153#define PKT_ALIAS_REVERSE 0x80
154
155/* If PKT_ALIAS_DENY_PPTP is set, then PPTP sessions will be
156 prevented by the aliasing engine. */
157#define PKT_ALIAS_DENY_PPTP 0x200
158
154/* Return Codes */
155#define PKT_ALIAS_ERROR -1
156#define PKT_ALIAS_OK 1
157#define PKT_ALIAS_IGNORED 2
158#define PKT_ALIAS_UNRESOLVED_FRAGMENT 3
159#define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4
160
161#endif
162/*lint -restore */
159/* Return Codes */
160#define PKT_ALIAS_ERROR -1
161#define PKT_ALIAS_OK 1
162#define PKT_ALIAS_IGNORED 2
163#define PKT_ALIAS_UNRESOLVED_FRAGMENT 3
164#define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4
165
166#endif
167/*lint -restore */