/* @configure_input@ */ /* ** Copyright 1998-2002 University of Illinois Board of Trustees ** Copyright 1998-2004 Mark D. Roth ** All rights reserved. ** ** @NETIO_PREFIX@_netio_internal.h - internal header file for network I/O module ** ** Mark D. Roth */ #ifndef @NETIO_PREFIX@_NETIO_INTERNAL_H #define @NETIO_PREFIX@_NETIO_INTERNAL_H #include #include #include <@NETIO_PREFIX@_netio.h> #ifdef STDC_HEADERS # include #endif /* useful constant */ #define NETIOBUFSIZE 10240 /* structure for NETIO handle */ struct netio { /* ** state information set by netio code - may not be modified by caller */ char *n_buf; /* read buffer */ size_t n_bufsize; /* size of read buffer */ char *n_writep; /* write ptr (points into n_buf) */ int n_fd; /* file descriptor */ unsigned short n_listener; /* boolean flag for listener */ char n_host[MAXHOSTNAMELEN + 6]; /* hostname */ unsigned short n_eof; /* boolean flag indicating EOF */ /* ** data set by the calling application - may be modified */ char *n_default_service; /* default service name */ unsigned short n_default_port; /* default port */ netio_hookfunc_t n_sendhook; /* send hook */ netio_hookfunc_t n_recvhook; /* receive hook */ void *n_hook_handle; /* lib handle ptr for send/recv hooks */ void *n_hook_data; /* app data ptr for send/recv hooks */ }; /***** handle.c **************************************************************/ int @NETIO_PREFIX@_netio_service_port(char *); /***** options.c *************************************************************/ /* ** netio_init_options() - initialize NETIO options */ void @NETIO_PREFIX@_netio_init_options(NETIO *); /* ** netio_vset_options() - set an option in the NETIO handle */ void @NETIO_PREFIX@_netio_vset_options(NETIO *, va_list); /***** timeout.c *************************************************************/ /* wait for I/O operation */ int @NETIO_PREFIX@_netio_wait(NETIO *, int, time_t); #endif /* ! @NETIO_PREFIX@_NETIO_INTERNAL_H */