2 * (c) Copyright 1992 by Panagiotis Tsirigotis
3 * (c) Sections Copyright 1998-2001 by Rob Braun
4 * All rights reserved. The file named COPYRIGHT specifies the terms
5 * and conditions for redistribution.
12 * $Id: int.h,v 1.1.1.1 2003/02/19 17:29:28 bbraun Exp $
15 #include <sys/types.h>
16 #include <netinet/in.h>
22 typedef enum { GOOD_CHANNEL, BAD_CHANNEL } channel_state_e ;
26 channel_state_e ch_state ;
27 union xsockaddr ch_from ;
29 int ch_remote_socket ;
32 typedef struct channel channel_s ;
34 #define CHP( p ) ((struct channel *)(p))
36 #define CHANNEL_NULL CHP( NULL )
38 #define NEW_CHANNEL() NEW( channel_s )
39 #define FREE_CHANNEL( chp ) FREE( chp )
42 struct intercept_common
44 bool_int ic_intercept ;
45 int ic_remote_socket ;
46 union xsockaddr ic_local_addr ;
47 pset_h ic_connections ;
48 struct server ic_server ;
62 struct intercept_common int_common ;
64 const struct intercept_ops *int_ops ;
67 #define INT_SERVER( p ) (&(p)->int_common.ic_server)
68 #define INT_LOCALADDR( p ) (&(p)->int_common.ic_local_addr)
69 #define INT_REMOTE( p ) ((p)->int_common.ic_remote_socket)
70 #define INT_CONNECTIONS( p ) ((p)->int_common.ic_connections)
71 #define INTERCEPT( p ) ((p)->int_common.ic_intercept)
73 void intercept(struct server *serp);
74 void int_sighandler(int sig);