home *** CD-ROM | disk | FTP | other *** search
/ Hacker Chronicles 1 / HACKER1.ISO / phrk3 / ph305.txt < prev    next >
Text File  |  1992-09-26  |  29KB  |  591 lines

  1.                                 ==Phrack Inc.==
  2.  
  3.                      Volume Three, Issue 30, File #5 of 12
  4.  
  5.                     ()()()()()()()()()()()()()()()()()()()
  6.                     ()                                  ()
  7.                     ()      The DECWRL Mail Gateway     ()
  8.                     ()                                  ()
  9.                     ()         by Dedicated Link        ()
  10.                     ()                                  ()
  11.                     ()        September 20, 1989        ()
  12.                     ()                                  ()
  13.                     ()()()()()()()()()()()()()()()()()()()
  14.  
  15.  
  16. INTRODUCTION
  17.  
  18. DECWRL is a mail gateway computer operated by Digital's Western Research
  19. Laboratory in Palo Alto, California.  Its purpose is to support the interchange
  20. of electronic mail between Digital and the "outside world."
  21.  
  22. DECWRL is connected to Digital's Easynet, and also to a number of different
  23. outside electronic mail networks.  Digital users can send outside mail by
  24. sending to DECWRL::"outside-address", and digital users can also receive mail
  25. by having your correspondents route it through DECWRL.  The details of incoming
  26. mail are more complex, and are discussed below.
  27.  
  28. It is vitally important that Digital employees be good citizens of the networks
  29. to which we are connected.  They depend on the integrity of our user community
  30. to ensure that tighter controls over the use of the gateway are not required.
  31. The most important rule is "no chain letters," but there are other rules
  32. depending on whether the connected network that you are using is commercial or
  33. non-commercial.
  34.  
  35. The current traffic volume (September 1989) is about 10,000 mail messages per
  36. day and about 3,000 USENET messages per day.  Gatewayed mail traffic has
  37. doubled every year since 1983.  DECWRL is currently a Vax 8530 computer with 48
  38. megabytes of main memory, 2500 megabytes of disk space, 8 9600-baud (Telebit)
  39. modem ports, and various network connections.  They will shortly be upgrading
  40. to a Vax 8650 system.  They run Ultrix 3.0 as the base operating system.
  41.  
  42.  
  43. ADMINISTRATION
  44.  
  45. The gateway has engineering staff, but no administrative or clerical staff.
  46. They work hard to keep it running, but they do not have the resources to answer
  47. telephone queries or provide tutorials in its use.
  48.  
  49. They post periodic status reports to the USENET newsgroup dec.general.  Various
  50. helpful people usually copy these reports to the VAXNOTES "gateways" conference
  51. within a day or two.
  52.  
  53.  
  54. HOW TO SEND MAIL
  55.  
  56. DECWRL is connected to quite a number of different mail networks.  If you were
  57. logged on directly to it, you could type addresses directly, e.g.
  58.  
  59.     To: strange!foreign!address.
  60.  
  61. But since you are not logged on directly to the gateway, you must send mail so
  62. that when it arrives at the gateway, it will be sent as if that address had
  63. been typed locally.
  64.  
  65.  
  66. * Sending from VMS
  67.  
  68. If you are a VMS user, you should use NMAIL, because VMS mail does not know how
  69. to requeue and retry mail when the network is congested or disconnected.  From
  70. VMS, address your mail like this:
  71.  
  72.     To: nm%DECWRL::"strange!foreign!address"
  73.  
  74. The quote characters (") are important, to make sure that VMS doesn't try to
  75. interpret strange!foreign!address itself.  If you are typing such an address
  76. inside a mail program, it will work as advertised.  If you are using DCL and
  77. typing directly to the command line, you should beware that DCL likes to remove
  78. quotes, so you will have to enclose the entire address in quotes, and then put
  79. two quotes in every place that one quote should appear in the address:
  80.  
  81.     $ mail test.msg "nm%DECWRL::""foreign!addr""" /subj="hello"
  82.  
  83. Note the three quotes in a row after foreign!addr.  The first two of them are
  84. doubled to produce a single quote in the address, and the third ends the
  85. address itself (balancing the quote in front of the nm%).
  86.  
  87. Here are some typical outgoing mail addresses as used from a VMS system:
  88.  
  89.     To: nm%DECWRL::"lll-winkin!netsys!phrack"
  90.     To: nm%DECWRL::"postmaster@msp.pnet.sc.edu"
  91.     To: nm%DECWRL::"netsys!phrack@uunet.uu.net"
  92.     To: nm%DECWRL::"phrackserv@CUNYVM.bitnet"
  93.     To: nm%DECWRL::"Chris.Jones@f654.n987.z1.fidonet.org"
  94.  
  95. * Sending from Ultrix
  96.  
  97. If your Ultrix system has been configured for it, then you can, from your
  98. Ultrix system, just send directly to the foreign address, and the mail software
  99. will take care of all of the gateway routing for you.  Most Ultrix systems in
  100. Corporate Research and in the Palo Alto cluster are configured this way.
  101.  
  102. To find out whether your Ultrix system has been so configured, just try it and
  103. see what happens.  If it doesn't work, you will receive notification almost
  104. instantly.
  105.  
  106.     NOTE:  The Ultrix mail system is extremely flexible; it is almost
  107.     completely configurable by the customer.  While this is valuable to
  108.     customers, it makes it very difficult to write global instructions for
  109.     the use of Ultrix mailers, because it is possible that the local changes
  110.     have produced something quite unlike the vendor-delivered mailer.  One of
  111.     the popular changes is to tinker with the meaning of quote characters (")
  112.     in Ultrix addresses.  Some systems consider that these two addresses are
  113.     the same:
  114.  
  115.         site1!site2!user@host.dec.com
  116.  
  117.     and
  118.  
  119.         "site1!site2!user"@host.dec.com
  120.  
  121.     while others are configured so that one form will work and the other
  122.     will not.  All of these examples use the quotes.  If you have trouble
  123.     getting the examples to work, please try them again without the quotes.
  124.     Perhaps your Ultrix system is interpreting the quotes differently.
  125.  
  126. If your Ultrix system has an IP link to Palo Alto (type "/etc/ping
  127. decwrl.dec.com" to find out if it does), then you can route your mail to the
  128. gateway via IP.  This has the advantage that your Ultrix mail headers will
  129. reach the gateway directly, instead of being translated into DECNET mail
  130. headers and then back into Ultrix at the other end.  Do this as follows:
  131.  
  132.     To: "alien!address"@decwrl.dec.com
  133.  
  134. The quotes are necessary only if the alien address contains a ! character, but
  135. they don't hurt if you use them unnecessarily.  If the alien address contains
  136. an "@" character, you will need to change it into a "%" character.  For
  137. example, to send via IP to joe@widget.org, you should address the mail
  138.  
  139.     To: "joe%widget.org"@decwrl.dec.com
  140.  
  141. If your Ultrix system has only a DECNET link to Palo Alto, then you should
  142. address mail in much the same way that VMS users do, save that you should not
  143. put the nm% in front of the address:
  144.  
  145.     To: DECWRL::"strange!foreign!address"
  146.  
  147. Here are some typical outgoing mail addresses as used from an Ultrix system
  148. that has IP access.  Ultrix systems without IP access should use the same
  149. syntax as VMS users, except that the nm% at the front of the address should not
  150. be used.
  151.  
  152.     To: "lll-winken!netsys!phrack"@decwrl.dec.com
  153.     To: "postmaster%msp.pnet.sc.edu"@decwrl.dec.com
  154.     To: "phrackserv%CUNYVM.bitnet"@decwrl.dec.com
  155.     To: "netsys!phrack%uunet.uu.net"@decwrl.dec.com
  156.     To: "Chris.Jones@f654.n987.z1.fidonet.org"@decwrl.dec.com
  157.  
  158.  
  159. DETAILS OF USING OTHER NETWORKS
  160.  
  161. All of the world's computer networks are connected together, more or less, so
  162. it is hard to draw exact boundaries between them.  Precisely where the Internet
  163. ends and UUCP begins is a matter of interpretation.
  164.  
  165. For purposes of sending mail, though, it is convenient to divide the network
  166. universe into these categories:
  167.  
  168. Easynet         Digital's internal DECNET network.  Characterized by addresses
  169.                 of the form NODE::USER.  Easynet can be used for commercial
  170.                 purposes.
  171.  
  172. Internet        A collection of networks including the old ARPAnet, the NSFnet,
  173.                 the CSnet, and others.  Most international research,
  174.                 development, and educational organizations are connected in
  175.                 some fashion to the Internet.  Characterized by addresses of
  176.                 the form user@site.subdomain.domain.  The Internet itself
  177.                 cannot be used for commercial purposes.
  178.  
  179. UUCP            A very primitive network with no management, built with
  180.                 auto-dialers phoning one computer from another.  Characterized
  181.                 by addresses of the form place1!place2!user.  The UUCP network
  182.                 can be used for commercial purposes provided that none of the
  183.                 sites through which the message is routed objects to that.
  184.  
  185. USENET          Not a network at all, but a layer of software built on top of
  186.                 UUCP and Internet.
  187.  
  188. BITNET          An IBM-based network linking primarily educational sites.
  189.                 Digital users can send to BITNET as if it were part of
  190.                 Internet, but BITNET users need special instructions for
  191.                 reversing the process.  BITNET cannot be used for commercial
  192.                 purposes.
  193.  
  194. Fidonet         A network of personal computers.  I am unsure of the status of
  195.                 using Fidonet for commercial purposes, nor am I sure of its
  196.                 efficacy.
  197.  
  198.  
  199. DOMAINS AND DOMAIN ADDRESSING
  200.  
  201. There is a particular network called "the Internet;" it is somewhat related to
  202. what used to be "the ARPAnet."  The Internet style of addressing is flexible
  203. enough that people use it for addressing other networks as well, with the
  204. result that it is quite difficult to look at an address and tell just what
  205. network it is likely to traverse.  But the phrase "Internet address" does not
  206. mean "mail address of some computer on the Internet" but rather "mail address
  207. in the style used by the Internet."  Terminology is even further confused
  208. because the word "address" means one thing to people who build networks and
  209. something entirely different to people who use them.  In this file an "address"
  210. is something like "mike@decwrl.dec.com" and not "192.1.24.177" (which is what
  211. network engineers would call an "internet address").
  212.  
  213. The Internet naming scheme uses hierarchical domains, which despite their title
  214. are just a bookkeeping trick.  It doesn't really matter whether you say
  215. NODE::USER or USER@NODE, but what happens when you connect two companies'
  216. networks together and they both have a node ANCHOR??  You must, somehow,
  217. specify which ANCHOR you mean.  You could say ANCHOR.DEC::USER or
  218. DEC.ANCHOR::USER or USER@ANCHOR.DEC or USER@DEC.ANCHOR.  The Internet
  219. convention is to say USER@ANCHOR.DEC, with the owner (DEC) after the name
  220. (ANCHOR).
  221.  
  222. But there could be several different organizations named DEC.  You could have
  223. Digital Equipment Corporation or Down East College or Disabled Education
  224. Committee.  The technique that the Internet scheme uses to resolve conflicts
  225. like this is to have hierarchical domains.  A normal domain isn't DEC or
  226. STANFORD, but DEC.COM (commercial) and STANFORD.EDU (educational).  These
  227. domains can be further divided into ZK3.DEC.COM or CS.STANFORD.EDU.  This
  228. doesn't resolve conflicts completely, though:  both Central Michigan University
  229. and Carnegie-Mellon University could claim to be CMU.EDU.  The rule is that the
  230. owner of the EDU domain gets to decide, just as the owner of the CMU.EDU gets
  231. to decide whether the Electrical Engineering department or the Elementary
  232. Education department gets subdomain EE.CMU.EDU.
  233.  
  234. The domain scheme, while not perfect, is completely extensible.  If you have
  235. two addresses that can potentially conflict, you can suffix some domain to the
  236. end of them, thereby making, say, decwrl.UUCP be somehow different from
  237. DECWRL.ENET.
  238.  
  239. DECWRL's entire mail system is organized according to Internet domains, and in
  240. fact we handle all mail internally as if it were Internet mail.  Incoming mail
  241. is converted into Internet mail, and then routed to the appropriate domain; if
  242. that domain requires some conversion, then the mail is converted to the
  243. requirements of the outbound domain as it passes through the gateway.  For
  244. example, they put Easynet mail into the domain ENET.DEC.COM, and they put
  245. BITNET mail into the domain BITNET.
  246.  
  247. The "top-level" domains supported by the DECWRL gateway are these:
  248.  
  249.   .EDU        Educational institutions
  250.   .COM        Commercial institutions
  251.   .GOV        Government institutions
  252.   .MIL        Military institutions
  253.   .ORG        Various organizations
  254.   .NET        Network operations
  255.   .BITNET     The BITNET
  256.   .MAILNET    The MAILNET
  257.   .??         2-character country code for routing to other countries
  258.   .OZ         Part of the Australian (.AU) name space.
  259.  
  260. 2-character country codes include UK (United Kingdom), FR (France), IT (Italy),
  261. CA (Canada), AU (Australia), etc.  These are the standard ISO 2-character
  262. country codes.
  263.  
  264.  
  265. MAILING TO EASYNET
  266.  
  267. To mail to user SPRINTER at node WASH (which is DECNET address WASH::SPRINTER),
  268. Internet mail should be addressed to sprinter@wash.enet.dec.com.  Easynet
  269. addresses are not case-dependent; WASH and wash are the same node name and
  270. SPRINTER and sprinter are the same user name.
  271.  
  272. Sites that are not directly connected to the Internet may have difficulty with
  273. Internet addresses like wash.enet.dec.com.  They can send into the Easynet by
  274. explicitly routing the mail through DECWRL.  From domain-based Internet
  275. mailers, the address would be sprinter%wash.enet@decwrl.dec.com.  From UUCP
  276. mailers, the address would be decwrl!wash.enet!sprinter. Some Internet mailers
  277. require the form <@decwrl.dec.com:sprinter@wash.enet>.  (This last form is the
  278. only technically correct form of explicit route, but very few Internet sites
  279. support it.)
  280.  
  281. The DECWRL gateway also supports various obsolete forms of addressing that are
  282. left over from the past.  In general they support obsolete address forms for
  283. two years after the change, and then remove it.
  284.  
  285.  
  286. MAILING TO DIGITAL ALL-IN-1 USERS
  287.  
  288. Some Easynet users do not have a direct DECNET node address, but instead read
  289. their mail with All-in-1, which uses addresses of the form "Nate State @UCA".
  290. Here "UCA" is a Digital location code name.  To route mail to such people, send
  291. to Nate.State@UCA.MTS.DEC.COM.  Mail received from the All-in-1 mailer is
  292. unreplyable, and in fact unless the respondent tells you his return address in
  293. the body of the message, it is not normally possible even to puzzle out the
  294. return address by studying the message header.  Mail from All-in-1 to Easynet
  295. passes through a gateway program that does not produce valid return addresses.
  296.  
  297.  
  298. MAILING TO THE INTERNET
  299.  
  300. DECWRL's mailer is an Internet mailer, so to mail to an Internet site, just use
  301. its address.  If you are having trouble determining the Internet address, you
  302. might find that the Ultrix host table /etc/hosts.txt is useful.  If you can't
  303. find one anywhere else, there's one on DECWRL.  See the commentvpX1ove under
  304. "how to send mail" for details about making sure that the mail program you are
  305. using has correctly interpreted an address.
  306.  
  307.  
  308. MAILING TO UUCP
  309.  
  310. UUCP mail is manually routed by the sender, using ! as the separator character.
  311. Thus, the address xxx!yyy!zzz!user means to dial machine xxx and relay to it
  312. the mail, with the destination address set to yyy!zzz!user.  That machine in
  313. turn dials yyy, and the process repeats itself.
  314.  
  315. To correctly address UUCP mail, you must know a working path through the UUCP
  316. network.  The database is sufficiently chaotic that automatic routing does not
  317. work reliably (though many sites perform automatic routing anyhow).  The
  318. information about UUCP connectivity is distributed in the USENET newsgroup
  319. comp.mail.maps; many sites collect this data and permit local queries of it.
  320.  
  321. At the end of this file is a list of the UUCP nodes to which DECWRL currently
  322. has a working connection.
  323.  
  324.  
  325. MAILING TO USENET
  326.  
  327. Usenet is not a network.  It's a software layer, and it spans several networks.
  328. Many people say "Usenet" when they really mean UUCP.  You can post a message to
  329. a Usenet newsgroup by mailing it to "name@usenet" at DECWRL.  For example,
  330. mailing from VMS to this address:
  331.  
  332.     nm%DECWRL::"alt.cyberpunk@usenet"
  333.  
  334. causes the mail message to be posted as an article to the Usenet newsgroup
  335. alt.cyberpunk.  It is better to use Usenet software for posting articles, as
  336. more features are available that way, such as restricted distributions,
  337. crossposting, and cancellation of "wish I hadn't sent that" articles.
  338.  
  339.  
  340. MAILING TO BITNET
  341.  
  342. Legend has it that the "BIT" in BITNET stands for "Because It's There" or
  343. "Because It's Time."  It is a network consisting primarily of IBM computers.  A
  344. native BITNET address is something like "OMAR at STANFORD", but when translated
  345. into our Internet format it becomes omar@stanford.bitnet.  Once translated into
  346. Internet form, a BITNET address is used just like any other Internet address.
  347.  
  348.  
  349. MAILING TO FIDONET
  350.  
  351. By comparison with the other linked networks, Fidonet has an addressing
  352. complexity bordering on the bizarre.  The Fidonet people have provided me with
  353. this description:
  354.  
  355. Each Fidonet node is a member of a "network," and may have subsidiary nodes
  356. called "point nodes."  A typical Fido address is "1:987/654" or "987/654"; a
  357. typical Fido "point node" address is "1:987/654.32" or "987/654.32".  This is
  358. zone 1, network 987, Fido (node) 654, "point node" 32.  If the zone number is
  359. missing, assume it is zone 1.  The zone number must be supplied in the outgoing
  360. message.
  361.  
  362. To send a message to Chris Jones on Fidonet address 1:987/654, use the address
  363. Chris.Jones@f654.n987.z1.fidonet.org.  To send a message to Mark Smith at
  364. Fidonet node 987/654.32, use address Mark.Smith@p32.f654.n987.z1.fidonet.org.
  365. Use them just like any other Internet address.
  366.  
  367. Sometimes the return addresses on messages from Fidonet will look different.
  368. You may or may not be able to reply to them.
  369.  
  370. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  371.  
  372. Appendix:  List of UUCP Neighbor Sites
  373.  
  374. This table shows most of the sites that DECWRL dials directly via UUCP.  You
  375. may find it useful to help you construct a UUCP route to a particular
  376. destination.  Those sites marked with "*" are major UUCP routing nodes.  You
  377. should prefer UUCP routes that use these sites as the first hop from DECWRL.
  378. Case is significant in UUCP host names.
  379.  
  380.       3comvax    3Com Corporation, Santa Clara, CA
  381.       abvax      Allen-Bradley Company, Highland Heights, OH
  382.       acad       Autodesk, Inc, Sausalito, CA
  383.       adobe      Adobe Systems Inc., Mountain View, CA
  384.       alberta    University of Alberta, Edmonton, Alberta, Canada
  385.       allegra    AT&T Bell Laboratories, Murray Hill, NJ
  386.      *amdahl     Amdahl Corp., Sunnyvale, CA
  387.       amdcad     Advanced Micro Devices, Sunnyvale, CA
  388.       ames       NASA Ames Research Center, Mountain View, CA
  389.      *apple      Apple Computers, Cupertino, CA
  390.       ardent     Ardent Computer Corp., Sunnyvale, CA
  391.       argosy     MassPar Computer Corp., Sunnyvale, CA
  392.       atha       Athabasca University, Athabasca, Alberta, Canada
  393.       athertn    Atherton Technology, Sunnyvale, CA
  394.      *att        AT&T Bell Laboratories, Columbus, Ohio
  395.       avsd       Ampex Corporation, Redwood City, CA
  396.       cae78""   Tektronix Inc. (Santa Clara Field Office) Santa Clara, CA
  397.       chip       M/A-COM Government Systems, San Diego, CA
  398.       claris     Claris Corporation, Mountain View, CA
  399.       daisy      Daisy Systems, Mountain View, CA
  400.       decuac     DEC/Ultrix Applications Ctr, Landover, MD
  401.      *decvax     DEC/Ultrix Engineering, Nashua, NH
  402.       dsinc      Datacomp Systems, Inc, Huntington Valley, PA
  403.       eda        EDA Systems Inc., Santa Clara, CA
  404.       emerald    Emerald Systems Corp., San Diego, CA
  405.       escd       Evans and Sutherland Computer Division, Mountain View, CA
  406.       esunix     Evans and Sutherland Corp., Salt Lake City, UT
  407.       fluke      John Fluke Manufacturing, Everett, WA
  408.       gryphon    Trailing Edge Technology, Redondo Beach, CA
  409.       handel     Colorodo State Univ., CS Dept., Ft. Collins, CO
  410.       hoptoad    Nebula Consultants, San Francisco, CA
  411.      *hplabs     Hewlett Packard Research Labs, Palo Alto, CA
  412.       ide        Interactive Development Environments, San Francisco, CA
  413.       idi        Intelligent Decisions, Inc., San Jose, CA
  414.       imagen     Imagen Corp., Santa Clara, CA
  415.       intelca    Intel Corp., Santa Clara, CA
  416.       limbo      Intuitive Systems, Los Altos, CA
  417.       logitech   Logitech, Inc., Palo Alto, CA
  418.       megatest   Megatest Corp., San Jose, CA
  419.       metaphor   Metaphor Corp., Mountain View, CA
  420.       microsoft  Microsoft, Bellevue, WA
  421.       mindcrf    Mindcraft Corp., Palo Alto, CA
  422.       mips       MIPS Computer Systems, Mountain View, CA
  423.       mntgfx     Mentor Graphics Corp., Beaverton, OR
  424.       mordor     Lawrence Livermore National Lab, Livermore, CA
  425.       mtu        Michigan Tech Univ., Houghton, MI
  426.       mtxinu     Mt. Xinu, Berkeley, CA
  427.       nsc        National Semiconductor Corp., Sunnyvale, CA
  428.       oli-stl    Olivetti Software Techn. Lab, Menlo Park, CA
  429.       oracle     Oracle Corp., Belmont, CA
  430.      *pacbell    Pacific Bell, San Ramon, CA
  431.       parcplace  Parc Place Systems, Palo Alto, CA
  432.       purdue     Purdue University, West Lafayette, IN
  433.      *pyramid    Pyramid Technology Corporation, Mountain View, CA
  434.       qubix      Qubix Graphic Systems, San Jose, CA
  435.       quintus    Quintus Computer Systems, Mountain View, CA
  436.       research   AT&T Bell Laboratories, Murray Hill, NJ
  437.       riacs      Res.Inst. for Adv. Compu. Sci., Mountain View, CA
  438.       rtech      Relational Technology Inc., Alameda, CA
  439.       sci        Silicon Compilers, San Jose, CA
  440.       sco        Santa Cruz Operation, Santa Cruz, CA
  441.       sequent    Sequent Computer System, Inc., Beaverton, OR
  442.       sgi        Silicon Graphics, Inc., Mountain View, CA
  443.       shell      Shell Development Corp., Houston, TX
  444.       simpact    Simpact Assoc., San Diego, CA
  445.       sjsca4     Schlumberger Technologies, San Jose, CA
  446.       sun        Sun Microsystems, Mountain View, CA
  447.       td2cad     Intel Corp., Santa Clara, CA
  448.       teraida    Teradyne EDA Inc., Santa Clara, CA
  449.       theta      Process Software Inc., Wellesley, MA
  450.       turtlevax  CIMLINC, Inc, Palo Alto, CA
  451.      *ucbvax     University of California, Berkeley, CA
  452.       utcsri     Univ. of Toronto, Computer Science, Toronto, CA
  453.       vlsisj     VLSI Technology Inc., San Jose, CA
  454.       wyse       Wyse Technology, San Jose, CA
  455.       zehntel    Zehntel, Inc., Walnut Creek, CA
  456. _______________________________________________________________________________
  457.  
  458.                                 ==Phrack Inc.==
  459.  
  460.                      Volume Three, Issue 30, File #6 of 12
  461.  
  462.                    Decnet Hackola : Remote Turist TTY (RTT)
  463.                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  464.  
  465.                            A Late-Night Creation Of
  466.  
  467.                                    *Hobbit*
  468.  
  469. This VMS network frob is yet another "tell"-type thing.  This one has an
  470. uncommon feature though:  recursion (i.e. you can be connected to some host
  471. and open *another* connection to a third host and it will [attempt to!] "do the
  472. right thing").  Also, you can ^Y out and if you run it again, it will return to
  473. the open connection instead of starting a new one.
  474.  
  475. _H*
  476.  
  477. *************************************************************************
  478. $! RTT -- Remote Turist TTY interface.  Do @RTT hostname or @RTT area.node
  479. $! to start; this file must exist in the remote machine's default area.
  480. $! You can ^Y out and the network channel will stick around; invoking RTT
  481. $! again will resume the extant process and ignore arguments.
  482. $! If we are a network object, play server, if not, we must be the client.
  483. $! If we are called while already playing server, recurse to the end host.
  484. $! This recursion in theory can happen infinite times.  Make damn sure
  485. $! what you call this file and the "task=" spec jive, and that they are the
  486. $! same file, or you will fall victim to very vicious timing screws.
  487. $!
  488. $! Another result of *Hobbit* abusing network file jobs until well past dawn.
  489. $!
  490. $! _H*
  491. $set noon
  492. $if f$mode().eqs."NETWORK".and.p1.eqs."" then $goto srv
  493. $! Talking to a luser, go find the net job
  494. $magic=0                        ! assume top level
  495. $if f$trnlnm("nf",,,,,"table_name").nes."" then $goto lread
  496. $sl=f$len(p1)
  497. $dot=f$locate(".",p1)           ! area.node
  498. $if sl.eq.dot then $goto nopen  ! no dot, treat normally
  499. $q=f$loc("""",p1)               ! access control??
  500. $node=f$ext(0,dot,p1)           ! area
  501. $dot=dot+1                      ! point past it now
  502. $node=node*1024+f$ext(dot,q-dot,p1)  ! and pull out the complete node
  503. $rest=""""+f$ext(q,80,p1)+""""  ! superquotify the quotes [yeccchh!]
  504. $p1="''node'''rest'"            ! add remains in stringwise [ack barf]
  505. $! We were called with an argument; but if we're network mode, we're *already*
  506. $! a server, so do special things.
  507. $nopen: $if f$mode().eqs."NETWORK" then $magic=1
  508. $! Top-level user process or recursed here: client connect
  509. $open/read/write/err=yuk nf 'p1'::"0=rtt"
  510. $read/time=5/err=yuk nf hprm    ! let other end tell us where we got
  511. $prm==hprm                      ! global prompt str so we resume correctly
  512. $write sys$output "Connection open"
  513. $if magic then $goto m_setup
  514. $lread: $read/prompt="''prm'$ "/end=lclose sys$command line
  515. $write nf line                  ! send the sucker and go get the stuff
  516. $ltype: $read/time=8/err=tmo/end=lclose nf line
  517. $if line.eqs."%%eoc%%" then $goto lread
  518. $if line.eqs."%%magic%%" then $goto newprm
  519. $write sys$output line
  520. $goto ltype
  521. $newprm: $read nf hprm          ! new prompt gets piped in from servers
  522. $prm==hprm                      ! let us find it
  523. $read nf line                   ! garbola %%eoc%% -- avoid timing fuckup
  524. $if line.nes."%%eoc%%" then $goto hpe  !! oops !!
  525. $goto lread
  526. $tmo: $write sys$output "[Timed out]"   ! supposed to bail out on a fuckup
  527. $goto lread                             ! it doesn't always work, though.
  528. $!
  529. $! Do a special dance when we're recursing
  530. $m_setup: $write nnn "%%magic%%"
  531. $write nnn prm                  ! notify client end of new connection
  532. $signal                         ! flush the inbetweens
  533. $goto rread                     ! and drop to magic server
  534. $!
  535. $srv:                           ! Normal remote task half
  536. $! This is an unbelievable kludge.  You can't just open sys$net: and then
  537. $! have program output go there as well as the control thingies, but you
  538. $! *can* pipe everything to your sys$net-opened-device: and it *works*!
  539. $open/read/write/err=yuk nnn sys$net:
  540. $close sys$output               ! netserver.log?
  541. $close sys$error
  542. $magic=0                        ! not recursing yet
  543. $! Some handy symbols for the far end
  544. $rtt:==@sys$login:rtt           ! make further connects easier
  545. $ncp:==$ncp                     ! for hacking the network
  546. $signal:==write nnn """%%eoc%%""" ! magic sync string
  547. $write nnn f$trnl("sys$node","lnm$system_table")        ! HELO...
  548. $def/pr sys$output nnn:         ! the awful kludge is invoked
  549. $def/pr sys$error nnn:          ! for error handling too
  550. $!
  551. $! Server loop
  552. $rread: $read/end=rclose nnn line
  553. $if magic then $goto passing
  554. $'line'
  555. $m_cmd_end: $signal             ! signal for all completions
  556. $goto rread
  557. $! If we're magically in the middle, handle differently
  558. $passing: $write nf line
  559. $mtype: $read/time=5/err=mclose/end=mclose nf line
  560. $if line.eqs."%%eoc%%" then $goto m_cmd_end
  561. $write nnn line
  562. $goto mtype
  563. $!
  564. $! Closure and error handlers
  565. $! General protocol error catch
  566. $yuk: $write sys$output "Couldn't open network!"
  567. $exit
  568. $! Here if the luser typed ^Z
  569. $lclose: $close nf              ! should signal eof at far end
  570. $exit
  571. $! Here if we got hung up on by the client
  572. $rclose: $if magic then $close nf
  573. $close nnn
  574. $stop/id=0
  575. $! Here if we're magic and our remote server exited: tell client whats flying
  576. $mclose: $close nf
  577. $magic=0
  578. $write nnn "%%magic%%"
  579. $write nnn f$trnl("sys$node","lnm$system_table")
  580. $signal
  581. $goto rread
  582. $! Here if we recursed down the line there and didn't see the right things
  583. $hpe: $write sys$output "!!Hairy protocol error!!"
  584. $close nf
  585. $exit
  586. _______________________________________________________________________________
  587.  
  588. 
  589.  
  590. Downloaded From P-80 International Information Systems 304-744-2253 12yrs+
  591.