35 #include <sys/types.h>
37 #define bzero(a, n) memset(a, 0, n)
47 #include </usr/include/sys/errno.h>
48 #include <arpa/inet.h>
50 #include <netinet/in.h>
53 #include <sys/socket.h>
54 #include <sys/types.h>
81 #define MAX_NOFILE 4096
90 #define FD_SETSIZE MAX_NOFILE
95 #define MAXSELFD MAX_NOFILE
97 #define NFDBITS (sizeof(fd_mask) * NBBY)
100 #define howmany(x, y) (((x) + ((y)-1)) / (y))
103 #define bzero(a, n) memset(a, 0, n)
104 #define FD_SET(n, p) ((p)->fds_bits[(n) / NFDBITS] |= (1 << ((n) % NFDBITS)))
105 #define FD_CLR(n, p) ((p)->fds_bits[(n) / NFDBITS] &= ~(1 << ((n) % NFDBITS)))
106 #define FD_ISSET(n, p) ((p)->fds_bits[(n) / NFDBITS] & (1 << ((n) % NFDBITS)))
107 #define FD_ZERO(p) bzero((INTS1*)(p), sizeof(*(p)))
130 #include <arpa/inet.h>
133 #include <netinet/in.h>
136 #include <sys/socket.h>
137 #include <sys/types.h>
143 #include <arpa/inet.h>
146 #include <netinet/in.h>
150 #include <sys/types.h>
157 #include <arpa/inet.h>
160 #include <netinet/in.h>
165 #include <sys/socket.h>
166 #include <sys/types.h>
174 #include <arpa/inet.h>
177 #include <netinet/in.h>
182 #include <sys/socket.h>
183 #include <sys/types.h>
190 #include <arpa/inet.h>
193 #include <netinet/in.h>
196 #include <sys/socket.h>
197 #include <sys/types.h>
201 #define _POSIX_SOURCE
213 #define MAX_NOFILE 4096
222 #define FD_SETSIZE MAX_NOFILE
227 #define MAXSELFD MAX_NOFILE
228 typedef INTS4 fd_mask;
229 #define NFDBITS (sizeof(fd_mask) * NBBY)
232 #define howmany(x, y) (((x) + ((y)-1)) / (y))
248 #include <arpa/inet.h>
251 #include <netinet/in.h>
255 #include <sys/socket.h>
256 #include <sys/types.h>
260 #define _POSIX_SOURCE
272 #define MAX_NOFILE 4096
281 #define FD_SETSIZE MAX_NOFILE
286 #define MAXSELFD MAX_NOFILE
288 #define NFDBITS (sizeof(fd_mask) * NBBY)
291 #define howmany(x, y) (((x) + ((y)-1)) / (y))
299 #define FD_SET(n, p) ((p)->fds_bits[(n) / NFDBITS] |= (1 << ((n) % NFDBITS)))
300 #define FD_CLR(n, p) ((p)->fds_bits[(n) / NFDBITS] &= ~(1 << ((n) % NFDBITS)))
301 #define FD_ISSET(n, p) ((p)->fds_bits[(n) / NFDBITS] & (1 << ((n) % NFDBITS)))
317 #define PORTSERV_DATA "portserv.dat;1"
319 #define PORTSERV_DATA "portserv.dat"
323 #define PORTSERVER_PORT 1000
324 #define PORTSERVER_M_DEF "VSBP"
325 #define PORTSERVER_S_DEF "DSAG"
353 #include <ucx$inetdef.h>
354 #define $DSC_FXDLEN(name, string) \
355 name.dsc$w_length = strlen(string); \
356 strcpy(name.dsc$a_pointer, string);
361 #define f_stc_nosig(ps_server) (ps_server)->i_signals = 100;
367 #define STC__FAILURE 0
368 #define STC__SUCCESS 1
369 #define STC__INVSOCK 2
370 #define STC__INVBUF 3
371 #define STC__NGBUFSIZE 4
372 #define STC__INVTIME 5
373 #define STC__TIMEOUT 6
374 #define STC__NOTSOCK 7
375 #define STC__INVADDR 8
376 #define STC__INVADDRF 9
377 #define STC__SOCKNSUP 10
378 #define STC__INVPROTO 11
379 #define STC__SOCKTABF 12
380 #define STC__SOCKSPAF 13
381 #define STC__SOCKISC 14
382 #define STC__CONNTOUT 15
383 #define STC__NETUNREA 16
384 #define STC__PORTINUS 17
385 #define STC__SOCKISP 18
386 #define TPS__ECPORTS 19
387 #define TPS__EREGSERV 20
388 #define TPS__EWTOPORTS 21
389 #define TPS__ERMFRPORTS 22
390 #define TPS__EGSERVICE 23
391 #define STC__BROPIPE 24
392 #define STC__NODATA 25
393 #define STC__ECONNREF 26
394 #define STC__EINTR 27
395 #define STC__ECONNRES 28
397 #define TCPCOMM_INCLUDE 1
INTS4 f_stc_close(struct s_tcpcomm *ps_tcp)
struct hostent hostentstruct
INTS4 f_stc_listenserver(struct s_tcpcomm *ps_server)
INTS4 f_stc_disperror(INTS4 i_error, CHARS *c_dest, INTS4 i_out)
INTS4 f_stc_acceptclient(struct s_tcpcomm *ps_server, INTS4 *pi_channel)
INTS4 f_stc_discclient(INTS4 i_channel)
INTS4 f_stc_connectserver(CHARS *c_node, INTS4 l_port, INTS4 *pi_channel, struct s_tcpcomm *ps_client)
struct hostent * hostentptr
INTS4 f_stc_write(INTS1 *p_buffer, INTS4 i_buflen, INTS4 i_channel)
void f_stc_swap4(INTS4 *)
struct sockaddr_in sock sock_name
INTS4 f_stc_createserver(INTS4 *pl_port, struct s_tcpcomm *ps_server)
INTS4 f_stc_read(INTS1 *p_buffer, INTS4 i_buflen, INTS4 i_channel, INTS4 i_timeout)