 /*
  * Khoros: $Id: Socket.h,v 1.3 1992/03/20 23:38:32 dkhoros Exp $
  */

 /*
  * $Log: Socket.h,v $
 * Revision 1.3  1992/03/20  23:38:32  dkhoros
 * VirtualPatch5
 *
  */ 


/*
 *----------------------------------------------------------------------
 *
 * Copyright 1990, University of New Mexico.  All rights reserved.

 * Permission to copy and modify this software and its documen-
 * tation only for internal use in your organization is hereby
 * granted, provided that this notice is retained thereon and
 * on all copies.  UNM makes no representations as too the sui-
 * tability and operability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 * 
 * UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
 * NESS.  IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL,
 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT-
 * SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER-
 * FORMANCE OF THIS SOFTWARE.
 * 
 * No other rights, including for example, the right to redis-
 * tribute this software and its documentation or the right to
 * prepare derivative works, are granted unless specifically
 * provided in a separate license agreement.
 *---------------------------------------------------------------------
 */

#include "unmcopyright.h"	 /* Copyright 1990 by UNM */


/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
   >>>>								<<<<
   >>>>	    file name: Socket.h					<<<<
   >>>>								<<<<
   >>>>   description:						<<<<
   >>>>								<<<<
   >>>> modifications:						<<<<
   >>>>								<<<<
   >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */


#ifndef _Socket_h_
#define _Socket_h_

/* Berkeley socket (bsd) transport */
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>


/*
 *  Internal structures for the following transport
 *
 *		socket	   -  Socket transport for UNIX and TCP (NET)
 */

/* socket structure */
typedef struct
{
	int	socket;
} SocketStruct;

#undef  ResourceStruct
#define ResourceStruct SocketStruct


int	socket_tempnam(),
	socket_open(),
	socket_close(),
	socket_read(),
	socket_write(),
	socket_lseek(),
	socket_tell(),
	socket_access(),
	socket_unlink(),
	socket_lock(),
	socket_descriptors(),
	socket_exec(),
	socket_machtype(),
	socket_gethostname();

int	socket_daemon();


static DaemonInformation socket_daemons[] =
{
    {
	"Standard Socket",
	"socket",
	socket_daemon,
    }
};

static RemoteInformation remote_socket_routines[] =
{
    {
	socket_exec,
	socket_machtype,
	socket_gethostname,
    }
};

static TransportInformation socket_routines[] =
{
    {
	"Standard Socket",
	"socket",
	FALSE,
	socket_tempnam,
	socket_open,
	socket_close,
	socket_read,
	socket_write,
	socket_lseek,
	socket_tell,
	socket_access,
	socket_unlink,
	socket_lock,
	socket_descriptors,

	remote_socket_routines,
    }
};


#define KhorosServiceName "KhorosPhantom"
#define KhorosServicePort 1968

#ifndef INADDR_NONE
#define INADDR_NONE ((unsigned long) -1)
#endif

typedef struct _socket_list
{
	int socket;
	int port;
	struct _socket_list *next;
} SocketList;
#endif /* _Socket_h_ */
/* don`t add after the endif */
