2 Copyright (c) 1993 Richard V. Nash.
3 Copyright (c) 2000 Dan Papasian
4 Copyright (C) Andrew Tridgell 2002
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define NET_NETERROR 0
26 #define NET_DISCONNECT 2
27 #define NET_READLINE 3
29 #define NET_NOTCOMPLETE 5
34 #define O_NONBLOCK 00004
37 GENSTRUCT enum netstatus {NETSTAT_EMPTY, NETSTAT_CONNECTED, NETSTAT_IDENT};
39 GENSTRUCT struct connection_t {
42 struct in_addr fromHost;
43 enum netstatus status;
47 unsigned char inBuf[MAX_STRING_LENGTH+1]; _NULLTERM
48 /* Output buffering */
49 int sndbufsize; /* size of send buffer (this changes) */
50 int sndbufpos; /* position in send buffer */
51 unsigned char *sndbuf; _LEN(sndbufsize)_NULLTERM /* our send buffer, or NULL if none yet */
52 int outPos; /* column count */
53 int state; /* 'telnet state' */
55 int timeseal; /* are they using timeseal */
56 int timeseal_init; /* are they in timeseal initialisation? */
57 unsigned time; /* last time received from the client */
60 #endif /* NETWORK_H */