
#include "V.h"
/*
* On ESIX systems, the socket() and related routines require that you link to
* the -lnet library, which is /usr/lib/liblan.a; the header files are kept in
* the /usr/include/lan directory.  Other Sys/V machines are likely similar.
*/
d_socket(af, type, protocol)
	int   af;
	int   type;
	int   protocol;
{	int   e, sock;
	Fenter("d_socket");

	errno = 0;
	sock = socket(af, type, protocol);
	e = errno;
	V6 "socket(%d,%d,%d)=%d [Err %d=%s=%s]",af,type,protocol,sock,Errinfo D;
	if (sock >= 0) {
		d_newfile(File_LOCAL|File_PIPE|File_SOCK,sock,"[socket]",0);
	}
	errno = e;
	Fexit;
	return sock;
}
