Deleted Added
sdiff udiff text old ( 110916 ) new ( 145522 )
full compact
1/*
2 * Copyright (C) 1997-2001 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * $Id: ip_proxy.h,v 2.8.2.4 2000/12/02 00:15:03 darrenr Exp $
7 * $FreeBSD: head/sys/contrib/ipfilter/netinet/ip_proxy.h 110916 2003-02-15 06:25:25Z darrenr $
8 */
9
10#ifndef __IP_PROXY_H__
11#define __IP_PROXY_H__
12
13#ifndef SOLARIS
14#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
15#endif

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

60#define aps_sel aps_un.apu_tcp.apt_sel
61#define aps_seqoff aps_un.apu_tcp.apt_seqoff
62#define aps_seqmin aps_un.apu_tcp.apt_seqmin
63#define aps_state aps_un.apu_tcp.apt_state
64#define aps_ackoff aps_un.apu_tcp.apt_ackoff
65#define aps_ackmin aps_un.apu_tcp.apt_ackmin
66
67
68typedef struct aproxy {
69 struct aproxy *apr_next;
70 char apr_label[APR_LABELLEN]; /* Proxy label # */
71 u_char apr_p; /* protocol */
72 int apr_ref; /* +1 per rule referencing it */
73 int apr_flags;
74 int (* apr_init) __P((void));
75 void (* apr_fini) __P((void));
76 int (* apr_new) __P((fr_info_t *, ip_t *,
77 ap_session_t *, struct nat *));
78 void (* apr_del) __P((ap_session_t *));
79 int (* apr_inpkt) __P((fr_info_t *, ip_t *,
80 ap_session_t *, struct nat *));
81 int (* apr_outpkt) __P((fr_info_t *, ip_t *,
82 ap_session_t *, struct nat *));
83 int (* apr_match) __P((fr_info_t *, ap_session_t *, struct nat *));
84} aproxy_t;
85
86#define APR_DELETE 1
87
88#define APR_ERR(x) (((x) & 0xffff) << 16)
89#define APR_EXIT(x) (((x) >> 16) & 0xffff)
90#define APR_INC(x) ((x) & 0xffff)
91
92#define FTP_BUFSZ 160
93/*
94 * For the ftp proxy.
95 */
96typedef struct ftpside {
97 char *ftps_rptr;
98 char *ftps_wptr;
99 u_32_t ftps_seq[2];
100 u_32_t ftps_len;
101 int ftps_junk;
102 int ftps_cmds;
103 int ftps_cmd;
104 char ftps_buf[FTP_BUFSZ];
105} ftpside_t;
106
107typedef struct ftpinfo {
108 int ftp_passok;
109 int ftp_incok;
110 ftpside_t ftp_side[2];
111} ftpinfo_t;
112
113/*
114 * Real audio proxy structure and #defines
115 */
116typedef struct raudio_s {
117 int rap_seenpna;
118 int rap_seenver;
119 int rap_version;
120 int rap_eos; /* End Of Startup */
121 int rap_gotid;

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

136#define RA_ID_UDP 1
137#define RA_ID_ROBUST 7
138
139#define RAP_M_UDP 1
140#define RAP_M_ROBUST 2
141#define RAP_M_TCP 4
142#define RAP_M_UDP_ROBUST (RAP_M_UDP|RAP_M_ROBUST)
143
144/*
145 * IPSec proxy
146 */
147typedef u_32_t ipsec_cookie_t[2];
148
149typedef struct ipsec_pxy {
150 ipsec_cookie_t ipsc_icookie;
151 ipsec_cookie_t ipsc_rcookie;
152 int ipsc_rckset;
153 ipnat_t ipsc_rule;
154 nat_t *ipsc_nat;
155 ipstate_t *ipsc_state;
156} ipsec_pxy_t;
157
158extern ap_session_t *ap_sess_tab[AP_SESS_SIZE];
159extern ap_session_t *ap_sess_list;
160extern aproxy_t ap_proxies[];
161extern int ippr_ftp_pasvonly;
162
163extern int appr_add __P((aproxy_t *));
164extern int appr_del __P((aproxy_t *));
165extern int appr_init __P((void));
166extern void appr_unload __P((void));
167extern int appr_ok __P((ip_t *, tcphdr_t *, struct ipnat *));
168extern int appr_match __P((fr_info_t *, struct nat *));
169extern void appr_free __P((aproxy_t *));
170extern void aps_free __P((ap_session_t *));
171extern int appr_check __P((ip_t *, fr_info_t *, struct nat *));
172extern aproxy_t *appr_lookup __P((u_int, char *));
173extern int appr_new __P((fr_info_t *, ip_t *, struct nat *));
174
175#endif /* __IP_PROXY_H__ */