sockets for SYSV (UNIXPC)

Todd Day todd at ivucsb.UUCP
Fri Mar 17 11:55:56 AEST 1989


While bopping thru the kernel (Ver3.50), I found the following:

# grep sock /etc/lddrv/unix.sym

sock_write = 0x1d6f4;
sock_read = 0x1d6f8;
sock_ioctl = 0x1d6fc;
sock_close = 0x1d700;
sock_sema = 0x1d704;

I looked thru the dot.h files and found this:

# grep sock /usr/include/* /usr/include/sys/*

sys/errno.h:/* Errors from 4.2 BSD picked up to support sockets */
sys/errno.h:#define	ENOTSOCK	229		/* Socket operation on non-socket */
sys/errno.h:#define	EPROTOTYPE	232		/* Protocol wrong type for socket */
sys/errno.h:#define	EOPNOTSUPP	235		/* Operation not supported on socket */
sys/errno.h:#define	ESHUTDOWN	248		/* Can't send after socket shutdown */
sys/space.h:(*sock_write)() = nodev;
sys/space.h:(*sock_read)() = nodev;
sys/space.h:(*sock_ioctl)() = nodev;
sys/space.h:(*sock_close)() = nodev;
sys/space.h:(*sock_sema)() = nullsys;


Further examination of the sys/space.h file reveals:

 *	The following definitions support the functions called 
 *	from the system calls for networking, and network 
 *	semaphores.
 */

extern int nodev(), nullsys();

(*sock_write)() = nodev;
(*sock_read)() = nodev;
(*sock_ioctl)() = nodev;
(*sock_close)() = nodev;
(*sock_sema)() = nullsys;
short softnetint = 0;
short netbusy = 0;

/*
 *	The following network constants can be set from tunevars
 */

int net_mbsize = 64*1024;	/* amount of space to reserve for mbufs */
int net_tcpdebug = 0;		/* Number of tcp trace buffers */
int vt_defcnt = 0;		/* Number of configured pseudo-terminals */
							^^^^^^^^^^^^^^^^
							I have these, now.
							Got a driver from
							some ftp site.

This looks to me like some beginning efforts to emmulate Berkeley sockets.

Has anyone looked into this?  Is it possible for some loadable device driver
to be written to emulate sockets?
-- 
-Todd Day-
Internet: todd%ivucsb.UUCP at anise.acc.com
    UUCP: {pyramid, ucbvax}!ucsbcsl!nessus!ivucsb!todd
   Other: todd at ivucsb.UUCP may not work yet.



More information about the Comp.sys.att mailing list