home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!rpi!usenet.coe.montana.edu!news.u.washington.edu!news.uoregon.edu!duff.uoregon.edu!jqj
- From: jqj@duff.uoregon.edu (JQ Johnson)
- Newsgroups: vmsnet.networks.tcp-ip.multinet
- Subject: porting Unix code to Multinet
- Date: 17 Dec 1992 23:25:09 GMT
- Organization: University of Oregon Network Services
- Lines: 27
- Distribution: world
- Message-ID: <1gr28lINN5p4@pith.uoregon.edu>
- NNTP-Posting-Host: duff.uoregon.edu
-
- I'm in the process of porting some moderately complex Unix networking
- code to Multinet and would like to solicit some advice from the
- community. My problem is with socket_*().
-
- The code I'm working with makes the assumption that local fds (generated
- by VAXC open()) and remote sockets (generated by Multinet socket()) can be
- treated equivalently. For instance, there are library routines that
- accept either and (sometimes after several levels of subroutine) call
- read() or write() to perform the I/O. What's the best way to port such
- code? One approach is presumably to use the UCX emulation, where read(),
- close(), and write() all take either sockets or fds. Is there any
- downside to that?
-
- My options seem to be (0) to use the UCX emulation, (1) to duplicate the
- library routines, and have the high level routines call the net- version
- of the library if appropriate, (2) [almost equivalent] to add flag
- parameters or global variables to communicate whether a particular int
- refers to a VAXC fd or a TGV socket, or (3) to decide in the low level
- routine what a particular int refers to (in Wollongong code, I can use
- the kludge that fds are sequentially assigned and so are very small ints,
- whereas sockets are >= 192). What's my best bet?
-
- --
- JQ Johnson Office: 250E Computing Center
- Director of Network Services Internet: jqj@ns.uoregon.edu
- Computing Center, Univ. of Oregon voice: (503) 346-1746
- Eugene, OR 97403-1212 fax: (503) 346-4397
-