#include <dos.h>
#include <io.h>

typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;

#include "../msdos/msdos.h"
#include "novell.h"

#undef bzero
#undef bcopy
#undef bcmp

#include <sys/socket.h>

#ifndef NULL
#define NULL 0
#endif

#define TCPCONN
#define NPORTS	32

#define OUTBUFSIZE	512
#define MAXBUFSIZE	8192
#define MAXOUTBUF	16384

typedef struct _connection _near *ConnectionPtr;

typedef struct _osComm {
    int fd;
    ConnectionPtr input;
    ConnectionPtr output;
    u_short flags;
    int client;
    unsigned long conn_time;
} OsCommRec, _near *OsCommPtr;

#define OS_MORE		0x0001		/* more data in the buffer */
#define OS_REQUEST	0x0002		/* full request left in input buffer */
#define OS_BLOCKED	0x0004		/* output write-blocked */
#define OS_FCLOSED	0x0100		/* other side has closed */

/* #define X_PRINT_PORT	5600 */
#define XDMCP
