/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* $Id$ $Date$ */ /* * PCR socket support. * * Host Dependent. */ #ifndef ←←PCR←IOSocket←h #define ←←PCR←IOSocket←h 1 #include <config/PCR←StdTypes.h> #include <config/PCR←OS.h> #include <th/PCR←ThTypes.h> #if (PCR←OS←SOCKET) # include <host/sys/types.h> # include <host/sys/socket.h> # include <host/sys/sockio.h> # include <host/netinet/in.h> # include <host/netinet/tcp.h> # define PCR←IOSocket←IMPL 1 #else # define PCR←IOSocket←IMPL 0 #endif #if (PCR←IOSocket←IMPL) extern PCR←ERes PCR←IOSocket←Accept( int s, struct sockaddr *addr, int *addrLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Bind( int s, struct sockaddr *name, int nameLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Connect( int s, struct sockaddr *name, int nameLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←GetPeerName( int s, struct sockaddr *name, int *nameLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←GetName( int s, struct sockaddr *name, int *nameLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←GetOpt( int s, int level, int optName, char *optVal, int *optLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Listen( int s, int backlog, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Recv( int s, char *buf, int len, int flags, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←RecvFrom( int s, char *buf, int len, int flags, struct sockaddr *from, int *fromLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←RecvMsg( int s, struct msghdr *msg, int flags, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Send( int s, char *msg, int len, int flags, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←SendTo( int s, char *msg, int len, int flags, struct sockaddr *to, int toLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←SendMsg( int s, struct msghdr *msg, int flags, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←SetOpt( int s, int level, int optName, char *optVal, int optLen, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Shutdown( int s, int how, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←Create( int domain, int type, int protocol, const PCR←sigset←t *sigMask, PCR←Msec wakeup ); extern PCR←ERes PCR←IOSocket←CreatePair( int domain, int type, int protocol, int sv[2], const PCR←sigset←t *sigMask, PCR←Msec wakeup ); #elif defined(PCR←NO←HOSTDEP←ERR) /* ... */ #else # error sockets unimplemented for this host / os #endif #endif /* !←←PCR←IOSocket←h */ /* $Log$ */