/*
* Copyright (C) 1997-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: ip_proxy.h,v 2.31.2.3 2005/06/18 02:41:33 darrenr Exp $
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef __IP_PROXY_H__
#define __IP_PROXY_H__
#ifndef SOLARIS
#endif
#else
#endif
#ifndef APR_LABELLEN
#endif
struct nat;
struct ipnat;
struct ipstate;
typedef struct ap_tcp {
} ap_tcp_t;
typedef struct ap_udp {
} ap_udp_t;
typedef struct ap_session {
union {
} aps_un;
} ap_session_t;
typedef struct ap_control {
/*
* The following fields are upto the proxy's apr_ctl routine to deal
* with. When the proxy gets this in kernel space, apc_data will
* point to a malloc'd region of memory of apc_dsize bytes. If the
* proxy wants to keep that memory, it must set apc_data to NULL
* before it returns. It is expected if this happens that it will
* take care to free it in apr_fini or otherwise as appropriate.
* apc_cmd is provided as a standard place to put simple commands,
* with apc_arg being available to put a simple arg.
*/
void *apc_data;
} ap_ctl_t;
typedef struct aproxy {
int apr_flags;
} aproxy_t;
/*
* Generic #define's to cover missing things in the kernel
*/
#ifndef isdigit
#endif
#ifndef isupper
#endif
#ifndef islower
#endif
#ifndef isalpha
#endif
#ifndef toupper
#endif
#ifndef isspace
((x) == '\t') || ((x) == '\b'))
#endif
/*
* This is the scratch buffer size used to hold strings from the TCP stream
* that we may want to parse. It's an arbitrary size, really, but it must
* be at least as large as IPF_FTPBUFSZ.
*/
/*
* This buffer, however, doesn't need to be nearly so big. It just needs to
* be able to squeeze in the largest command it needs to rewrite, Which ones
* does it rewrite? EPRT, PORT, 227 replies.
*/
typedef struct ftpside {
char *ftps_rptr;
char *ftps_wptr;
void *ftps_ifp;
int ftps_cmds;
} ftpside_t;
typedef struct ftpinfo {
int ftp_passok;
int ftp_incok;
} ftpinfo_t;
/*
* For the irc proxy.
*/
typedef struct ircinfo {
char *irc_snick;
char *irc_dnick;
char *irc_type;
char *irc_arg;
char *irc_addr;
} ircinfo_t;
/*
* Real audio proxy structure and #defines
*/
typedef struct raudio_s {
int rap_seenpna;
int rap_seenver;
int rap_version;
int rap_gotid;
int rap_gotlen;
int rap_mode;
int rap_sdone;
* been filled
*/
} raudio_t;
#define RA_ID_END 0
/*
* MSN RPC proxy
*/
typedef struct msnrpcinfo {
} msnrpcinfo_t;
/*
* IPSec proxy
*/
typedef struct ipsec_pxy {
int ipsc_rckset;
} ipsec_pxy_t;
/*
* PPTP proxy
*/
typedef struct pptp_side {
int pptps_state;
int pptps_gothdr;
int pptps_len;
int pptps_bytes;
char *pptps_wptr;
} pptp_side_t;
typedef struct pptp_pxy {
} pptp_pxy_t;
/*
* Sun RPCBIND proxy
*/
/*
* These macros determine the number of bytes between p and the end of
* r->rs_buf relative to l.
*/
#define RPCB_BUF_GEQ(r, p, l) \
((RPCB_BUF_END((r)) > (char *)(p)) && \
((RPCB_BUF_END((r)) - (char *)(p)) >= (l)))
#define RPCB_BUF_EQ(r, p, l) \
(RPCB_BUF_END((r)) == ((char *)(p) + (l)))
/*
* The following correspond to RPC(B) detailed in RFC183[13].
*/
#define RPCB_CALL 0
#define RPCB_MSG_ACCEPTED 0
/* BEGIN (Generic XDR structures) */
typedef struct xdr_string {
char *xs_str;
} xdr_string_t;
typedef struct xdr_auth {
/* u_32_t xa_flavor; */
} xdr_auth_t;
typedef struct xdr_uaddr {
} xdr_uaddr_t;
typedef struct xdr_proto {
} xdr_proto_t;
/* END (Generic XDR structures) */
/* BEGIN (RPC call structures) */
typedef struct pmap_args {
/* u_32_t pa_prog; */
/* u_32_t pa_vers; */
/* u_32_t pa_port; */
} pmap_args_t;
typedef struct rpcb_args {
/* u_32_t *ra_prog; */
/* u_32_t *ra_vers; */
/* xdr_string_t ra_owner; */
} rpcb_args_t;
typedef struct rpc_call {
/* u_32_t rc_rpcvers; */
/* u_32_t rc_prog; */
union {
} rpcb_args;
} rpc_call_t;
/* END (RPC call structures) */
/* BEGIN (RPC reply structures) */
typedef struct rpcb_entry {
/* u_32_t re_semantics; */
} rpcb_entry_t;
typedef struct rpcb_listp {
int rl_cnt;
} rpcb_listp_t;
typedef struct rpc_resp {
/* u_32_t rr_acceptdeny; */
/* Omitted 'message denied' fork; we don't care about rejects. */
/* u_32_t *rr_astat; */
union {
} rpcb_reply;
} rpc_resp_t;
/* END (RPC reply structures) */
/* BEGIN (RPC message structure & macros) */
typedef struct rpc_msg {
/* u_32_t Call vs Reply */
union {
} rm_body;
} rpc_msg_t;
/* END (RPC message structure & macros) */
/*
* These code paths aren't hot enough to warrant per transaction
* mutexes.
*/
typedef struct rpcb_xact {
} rpcb_xact_t;
typedef struct rpcb_session {
/*
* For an explanation, please see the following:
* RFC1832 - Sections 3.11, 4.4, and 4.5.
*/
#endif /* __IP_PROXY_H__ */