Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucbcad!ucbvax!CLUTX.CLARKSON.EDU!nelson From: nelson@CLUTX.CLARKSON.EDU (Russell Nelson) Newsgroups: comp.protocols.tcp-ip.ibmpc Subject: Berzerkeley sockets (and MS-DOG) Message-ID: <8711111448.AA24644@clutx.clarkson.edu> Date: Wed, 11-Nov-87 09:48:48 EST Article-I.D.: clutx.8711111448.AA24644 Posted: Wed Nov 11 09:48:48 1987 Date-Received: Fri, 13-Nov-87 23:14:37 EST References: <283548.871111.PAP4@AI.AI.MIT.EDU> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 22 Briefly, since many people might not be interested, the hack goes like this: Open a socket: /* the NUL device is the head of the device chain */ Open the NUL device with an FCB. If (version==2.x) NUL_device_header_ptr = fcb_reserved + 1; else if (version<3.20) NUL_device_header_ptr = fcb_reserved + 2; else NUL_device_header_ptr = (fcb_reserved + 2) + FCB_MAGIC; Find the end of the device chain. Link your device into the device chain. Open the device. Set it to raw mode using IOCTL. /* takes care of a MS-DOG 2.x bug. */ /* also sends entire block of data */ /* to the device. */ return the handle as your socket handle. Close a socket: close the socket handle. unlink the created device from the device chain. There are a few details missing, but that's the gist of it.