home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / tserve11.zip / TSERVE.DOC < prev    next >
Text File  |  1996-02-02  |  15KB  |  295 lines

  1. TSERVE V1.1b Technical Documentation.
  2.  
  3.         This document covers some of the more detailed technical issues and
  4. specifications. Most of the configuration information you need can be found
  5. in the sample .CFG and .USR files. Other technical information is available
  6. in the .ISP file which is a text document about setting youself up as an 
  7. internet service provider using warp connect.
  8.  
  9.         TSERVE is a rudamentary terminal server program for OS/2 Warp 
  10. Connect. If you have a dedicated connection to the internet, and a machine 
  11. running OS/2 warp connect, you can be an internet provider. The .ISP 
  12. document explains how to set up a system just like the one we use here at 
  13. Micro-Neil. (more or less)
  14.  
  15.         TSERVE is a small command line utility that should typically be run
  16. in a .CMD file. We could have made it into a large, impressive, PM 
  17. application with lots of buttons and bells and whistles, but that would 
  18. have been a lot more than was needed. Also, if you're serious about 
  19. providing internet access, the smaller, faster program is much better. We 
  20. are looking into a PM configuration utility for a later version of TSERVE 
  21. which will allow you to use the familiar notebook strategy for modifying 
  22. and updating all of the configuration files you need for TSERVE. Stay tuned
  23. on that one :-)
  24.  
  25.         I reccomend that you install TSERVE in it's own directory so that 
  26. you can keep all of your configuration information in one place. This isn't
  27. necessary, though, since TSERVE will run from anywhere as long as the 
  28. configuration file is accessible, and the paths listed in that file are 
  29. explicit enough. TSERVE always looks for files from the perspective of the 
  30. current working directory. Therefore, if you run TSERVE from your BBS 
  31. directory, and your configuration and user list files are somewhere else, 
  32. you need to have complete paths in your configuration file. The sample 
  33. configuration doesn't do that, so pay attention.
  34.  
  35.         To start tserve, you simply run the program and pass it the path to
  36. your configuration file. From then on, it's up to the configuration file to
  37. tell it what to do. Please read all of the text files in this package 
  38. before you attempt to run tserve. You will save yourself a lot of headaches
  39. in the long run. An example command line might be:
  40.  
  41. tserve node1.cfg
  42.  
  43. WHAT'S NEW WITH 1.1b...
  44.  
  45.     It came to my attention (how silly) that most people need to run a
  46. front end mailer program on their BBS's. They couldn't use TSERVE1.0b because
  47. it would reset the modem. TSERVE1.1b includes an optional command line switch
  48. that tells TSERVE a caller is already connected. When this command line switch
  49. is turned on, TSERVE will skip all of the modem initialization stuff and pick
  50. up right where it sends the greeting. From there on, TSERVE runs the same. To
  51. Start TSERVE after a front end mailer, use the command line:
  52.  
  53. tserve config.cfg -o[SPEED]
  54.  
  55.     This option let's you run TSERVE where you would normally run your
  56. BBS program. TSERVE will then proceed to identify the user and either start
  57. your BBS program or PPP as appropriate.
  58.  
  59.     If your mailer can provide the connection speed of the caller, then
  60. you can include it after the -o with no space in between.. ie. -o19200.
  61. TSERVE will use this value as if it picked it up from the modem's connect
  62. message. If you do not provide a speed (ie. -o ) then TSERVE will act as if
  63. the modem connect message did not include the caller's speed, and will assume
  64. the locked baud rate included in the .CFG file.
  65.  
  66.     TSERVE cannot accept a hot com handle from Maximus, any other BBS, or
  67. your front end mailer program. This is because the PPP program cannot be started
  68. with a hot file handle. The PPP program must be given a com port name. Also,
  69. your front end mailer must open the com port in a shared mode or else you will
  70. not be able to start PPP or run TSERVE.
  71.  
  72. HOW TSERVE WORKS...
  73.  
  74.         When TSERVE starts, the first thing it does is read the 
  75. configuration file. This file tells it what com port to use, what speed to 
  76. expect, the path to the user list file, and all of the other parameters 
  77. that are important. You can change this file with a regular text editor, 
  78. and the sample is well documented. I reccomend that once you get up to 
  79. speed on how to configure TSERVE you should delete all the comments and 
  80. make your configuration files a lot shorter. This will make TSERVE load 
  81. just a bit faster, and there's less chance of something in one of your
  82. comments being accidentally interpereted as a set-up parameter.
  83.  
  84.     If you start TSERVE without the -o option, read on. If you are
  85. starting TSERVE after a front end mailer program, skip to SENDING THE
  86. WELCOM GREETING...
  87.  
  88.         The next thing TSERVE does is reset and initialize the modem. It 
  89. will drop DTR, wait a few seconds for that to sink in, then raise DTR and 
  90. send the INIT: string to the modem. You should have your modem set up to 
  91. reset, hang up, and return to the command state when DTR is "cycled." You 
  92. should also make sure that another program hasn't set the mode of the com 
  93. port so that DTR cannot be used this way. OS/2 is very robust in it's 
  94. treatment of com ports and allows programs to establish elaborate and 
  95. strange handshaking arangements with other devices. You should make sure 
  96. that the DTR mode is ON (look up your OS/2 documentation on the MODE 
  97. command) to insure that the DTR signal can be controlled directly by 
  98. TSERVE. There is more information about initializing the modem in the 
  99. sample configuration file.
  100.  
  101.         Once the modem has been initialized, TSERVE will wait for a caller.
  102. When the modem sends back a "RING" signal, TSERVE will instruct the modem 
  103. to answer the phone "ATA". Once the connection is made, TSERVE will attempt
  104. to read the caller's connect speed from the connect message and store it 
  105. for later use. For example: "CONNECT 24000 LAPM". If your modem doesn't send
  106. the connect speed as part of the message, TSERVE will default to the fixed 
  107. baud rate you set in the config file.
  108.  
  109.         IT IS IMPORTANT TO NOTE: TSERVE DOES NOT SET THE COM PORT's SPEED 
  110. OR OTHER PARAMETERS, IT TAKES THINGS AS IT FINDS THEM. YOU SHOULD SET THE
  111. COM PORT's OPERATING PARAMETERS USING THE MODE COMMAND.
  112.  
  113. SENDING THE WELCOME GREETING...
  114.  
  115.     If you started TSERVE with the -o option, for use with a front
  116. end mailer program, then this is where all the action starts.
  117.  
  118.         When the modems are connected, TSERVE will send the welcome file 
  119. and prompt the user for a login code. The user has 5 chances to enter a 
  120. login code. If they skip it by pressing <cr> without entering anything, the
  121. login: prompt will be displayed again. This is to allow for some automatic 
  122. login scripts (such as OS/2's Dial Other Proviers) which send a few extra 
  123. carriage returns just because. TSERVE will ignore them.
  124.  
  125.         After reading the dailer's login code, TSERVE will open and read 
  126. the user list. If it locates a user entry with the same login code, it will
  127. read the line from the user list and prepare to verify the user. If the 
  128. line contains a password, the user will be prompted to enter the password. 
  129. TSERVER will echo periods for each letter, and backspace does work, 
  130. however, the password function is written with the assumption that it will 
  131. be talking to a dial-in script engine that's not likely to make a mistake. 
  132. There is only one chance to get the password right. If the password is 
  133. wrong, the caller is immediatly disconnected and TSERVE will end.
  134.  
  135.         If the login code is not found in the user list, TSERVE will spawn 
  136. the BBS program using the command line listed in the configuration file. 
  137. Please read the sample file documentation. You can create just about any 
  138. command line you'd like using the macro's provided by TSERVE.
  139.  
  140.         If the login code is found in the user list and the password is 
  141. entered correctly, then TSEVER will spawn the PPP program using the command
  142. line listed in the configuration file. Again, you can create just about any
  143. command line you need to with the macro's provided by TSERVE. This includes
  144. HOST and USER IP addresses as defined by the configuration file and the 
  145. user's entry. It is possible to assign specific addresses for each user.
  146.  
  147.         The BBS and PPP command lines executed by TSERVE need not be the 
  148. programs themselves, although this is the best approach. It is possible to 
  149. execute .CMD or .RXX programs in their places so that you can handle extra 
  150. processing or error handling. This might be the case if you need to look 
  151. for net-mail processing from your BBS package (like Maximus) or if you want
  152. to make special routing entries before and after running PPP.
  153.  
  154.         TSERVE opens the com port you define in the config file in a shared
  155. mode so that PPP can have control of it. TSERVE also provides the hot file 
  156. handle so that you can run a package (like Maximus) which needs that. Such 
  157. a program is considered a "child process" so it inherits access to the open
  158. file handle.
  159.  
  160.         Whatever program you run from TSERVE must end! If it doesn't end 
  161. and give control back to TSERVE, then TSERVE can't help you. This is 
  162. especailly important for Maximus user's who typically run their program in 
  163. a loop in a .cmd file. For these users, I reccomend that you either run 
  164. Maximus directly from the TSERVE program as I do in the examples, or that 
  165. you remove the loop and the mode command from your Maximus .cmd file. If 
  166. you've been able to get Maximus running happily for you, you should have no
  167. trouble understanding how to set this up.
  168.  
  169.         Once a caller has been handled, TSERVE will end and close the com 
  170. port. Before it does, it attempts to hang up the modem. TSERVE will wait a 
  171. few seconds, send "+++", wait a few more seconds (guard time) and then send
  172. "ATH0". If your modem is already hung up (on hook) then this will have no 
  173. ill effects. If your modem isn't already hung up, it should regain control 
  174. of the modem gracefully.
  175.  
  176.         TSERVE should be run in an endless loop in a .CMD file. Please take
  177. a look at the sample .cmd file that I've included. This is the same file I 
  178. use on my system.
  179.  
  180.         Each incoming line needs to have it's own configuration file. Most 
  181. of the time, the only differences in the command files are the task number,
  182. the com port, and the default IP addresses. The rest can be copied 
  183. verbatim.
  184.  
  185.         TSERVE will share the userlist file (or any other except it's log) 
  186. with other nodes. However, it is possible to set up different userlist 
  187. files for each node, or group of nodes, by specifying different files in 
  188. the configuration.
  189.  
  190.  
  191. LOGGING AND ERRORS:
  192.  
  193.         TSERVE provides a simple, but effective error and logging system. 
  194. You can have TSERVE produce a log file containing all of it's activity, or 
  195. just bits and pieces. Then you can use this file for billing purposes if 
  196. you want to charge by the hour or minute. You've probably noticed, however,
  197. that most ISP's these days are offering unmetered access, so it's up to 
  198. you. The configuration file contains information on formatting your log 
  199. file and deciding which events you want included. Listed below are all of 
  200. the evnets, there errorlevel (if TSERVE will exit), and the event flag(s) 
  201. that will include the event(s) in the log file.
  202.  
  203.  
  204. ERRLVL  FLAGS   EVENT STRING
  205.  
  206. 10 -- Command line error, not posted to log file.
  207. 11 -- Initialization error, not posted to log file.
  208. 12 -- Invalid or unreadably configuration file, not posted to log file.
  209.  
  210.         B       TSERVE STARTED.
  211. 13      X       ERROR OPENING COM PORT!
  212.         S       SECURITY EVENT, WRONG PASSWORD!
  213. 14      X       ERROR INITIALIZING MODEM!
  214. 0       XE      TSERVE ENDING, NO CALLER.
  215.         R       RING
  216. 15      XN      NO CONNECTION AFTER RING!
  217. 16      X       ERROR SENDING HELO!
  218. 17      XO      FAILURE TO GET LOGIN!
  219.         L       LOGIN.
  220. 18      X       ERROR READING USER LIST!
  221. 19      XQ      BAD/NO PASSWORD!
  222.         P       PASSWORD.
  223. 20      X       SPAWNING PPP DID NOT RETURN 0!
  224. 21      X       ERROR SENDING POST!
  225. 22      X       SPAWNING BBS DID NOT RETURN 0!
  226. 0       X       UNCERTAIN HANGUP!
  227. 23      X       ERROR CLOSEING COM PORT!
  228. 0       E       TSERVE ENDED.
  229.         I       STARTING PPP LINK.
  230.         J       ENDED PPP LINK.
  231.         M       STARTING BBS LINK.
  232.         Z       ENDED BBS LINK.
  233.  
  234. TSERVE LICENSE:
  235.  
  236.         TSERVE is a shareware program. It is NOT FREE software. You are 
  237. free to use this package for 30 days on a single computer while you 
  238. evaluate the program. If you continue to use it after 30 days, you MUST 
  239. register your copy of TSERVE. If you intend to use TSERVE on more than one 
  240. computer, you must register it for each computer you install it on. The 
  241. price for the registered version is $60 (US dollars). You can register 
  242. your TSERVE package by filling out the order form in ORDER.TXT and faxing, 
  243. mailing, or e-mailing that form to Micro-Neil. You will receive a disk with
  244. a registered version of the program, and you will be entitled to all minor 
  245. upgrades within the current major version.
  246.  
  247.         You may freely distribute the TSERVE10.ZIP package provided that 
  248. you do not charge for this distribution and that you make NO ALTERATIONS 
  249. whatsoever to the contents of the file(s).
  250.  
  251.         You may not include all or part of the TSERVE package in other 
  252. software, documentation, or any other media without the express written 
  253. consent of Micro-Neil.
  254.  
  255.         You may not disassemble or modify the executable(s) contianed in 
  256. this package, and you may not copy or reproduce portions of the files 
  257. without express written permission from Micro-Neil.
  258.  
  259.         If you use this package for any period of time, you are agreeing to
  260. abide by the terms of this license.
  261.  
  262. *********
  263.  
  264.         This software is not guaranteed to work on your system, nor is it 
  265. guaranteed not to cause harm to your system or data. You use this program 
  266. at your own risk.
  267.  
  268.         If this program causes any damage or data loss by it's use or 
  269. misuse by you or anyone associated with you in any way, Micro-Neil may not 
  270. be held responsible for any loss or damages, wether directly or indirectly
  271. caused by the use or misuse of this program or it's documentation.
  272.  
  273. *********
  274.  
  275.         At Micro-Neil we feel it is very important for our products to
  276. perform as we advertise. If you have trouble with any of our products,
  277. please notify us of your problem with as much detail as possible so that we
  278. may have the oportunity to correct the problem and improve the product. We 
  279. also welcome any suggestions for improvemtents or new products or services.
  280. We sincerely hope that our products can help you achieve your goals.
  281.  
  282. ***************** CREDITS ************************************************
  283.  
  284. Special thanks to:
  285.  
  286. Chris Haddox    Who helped solve the arp / routing problem.
  287. David Klett     Who enlisted and supported outside users in testing.
  288. Linda McNeil    Who helped edit and review the technical documentation.
  289. Puffins         Who reminded me when it was time to sleep, and time to fill
  290.                 her food bowl.
  291.  
  292. -Peter G. McNeil
  293.  
  294.  
  295.