home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / vmsnet / networks / tcpip / multinet / 2564 < prev    next >
Encoding:
Internet Message Format  |  1992-12-18  |  1.9 KB

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