ۥ- *=1;   T:4Y11,C! Trumpet Winsock 2.1 by Peter R. Tattam embed Word.Picture.6  Copyright symbol 211 \f "Symbol" \s 18 1993, 1994, 1995 Peter R. Tattam & Trumpet Software International Pty Ltd ACN 065 081 432 All Rights Reservered Table of Contents toc \t "Heading 2,1,Heading 3,2" 1 Introduction 4 1.1 About this documentation 4 1.2 What is the Trumpet Winsock? 4 1.3 Capabilities of the Trumpet Winsock 4 1.4 Whats new in Version 2.1? 4 1.5 License Terms and Conditions 5 2 Installing the Trumpet Winsock 6 2.1 Installation Requirements 6 3 Using the Trumpet Winsock over SLIP/PPP 7 3.1 Installing the Winsock files for SLIP/PPP 7 3.2 Setting up the Winsock for SLIP/PPP 7 3.3 Logging in manually 8 3.4 Automating your login sequence 9 4 Using the Trumpet Winsock with a packet driver 10 4.1 Installing the Winsock files for a packet driver 10 4.2 Installing WINPKT 10 4.3 Setting up the Winsock for a packet driver 11 5 Scripting Language 12 5.1 Basic commands 12 5.2 String formats 14 5.3 Program control commands 15 5.4 Assignments and expressions 16 5.5 Predefined variables 17 5.6 String functions 17 5.7 Commands as operands 17 5.8 Example script fragments 17 6 Menu Commands 20 6.1 File 20 6.2 Edit 23 6.3 Special 23 6.4 Trace 24 6.5 Dialler 24 6.6 Help 25 7 Trumpet Winsock Error Messages 27 7.1 Tcpman error messages 27 7.2 Dialler error messages 27 7.3 Packet driver error messages 28 8 Trumpet Winsock FAQ 29 8.1 Tcpman FAQ 29 8.2 Dialler FAQ 29 9 Glossary 30 9.1 Command line 30 9.2 Crynwr packet driver collection 30 9.3 Packet driver shims 30 9.4 Windows Sockets 1.1 30 9.5 WINPKT 30 9.6 Trumpet files 30 9.7 Definitions 32 9.8 Unsupported configurations 33 10 Contact Details and Online Services 36 10.1 World Wide Web 36 10.2 Technical support email addresses 36 10.3 General email addresses 36 10.4 The trumpet.* newsgroups 37 10.5 FTP and Gopher 37 10.6 Telephone and fax numbers 37 10.7 Postal address 37 11 Registration Details 38 11.1 How to register 38 11.2 Price list 38 11.3 Distribution Rights 39 11.4 Order form 40  1 Introduction Thank you for using the Trumpet Winsock. It is through the kind support of our users that quality networking software has been available at affordable prices to the Internet community. You may use the Trumpet Winsock for 30 days to evaluate its usefulness. If at the end of that time you are satisfied with the Trumpet Winsock as a product, you should register it. See Registration Details for more information. 1.1 About this documentation This documentation has been revised for Trumpet Winsock Version 2.1 by Rob Torok. Originally written as a Word for Windows 6.0 document, it is available in a variety of formats (including an online Help file, trumpwsk.hlp) from our WebWeb and FTPFTP sites. 1.2 What is the Trumpet Winsock? The Trumpet Winsock is a Windows Sockets 1.1 compatible TCP/IP stack that provides a standard networking layer for many Windows(tm) networking applications to use, and has itself been a major vehicle in achieving widespread use of Windows Sockets 1.1. 1.3 Capabilities of the Trumpet Winsock The Trumpet Winsock is supported under the following configurations and associated features. 1. Dial up SLIP and PPPPPP connections. Demand load dialling. A Scripting Language for automatically logging in and out of your SLIP/PPP server. Dynamic IP address assignment. 2. Connection to local area network by way of a packet driver and WINPKT under enhanced mode. BOOTPBOOTP and RARPRARP. 3. Ethernet and SLIP packet driver types. See Unsupported configurations if you want to use the Trumpet Winsock with any of: ODI, NDIS, Windows for Workgroups, PKTMUX, Cabletron Network Cards, Token ring, etc... NOTE: If you already have some kind of TCP/IP networking package installed, it is likely that the Trumpet Winsock will not run. At best, you may be able to install some massaging of your system configuration. At worst, you may have to uninstall that networking package. However, if there is already a Winsock available for your package, the Trumpet Winsock will not be required. 1.4 Whats new in Version 2.1? Modifications made to the Trumpet Winsock since Version 2.0 include a few bug-fixes and: Revised documentation including online helptrumpwsk.hlp. Improved online Registration via Internet system. Two new scripting commands: messagemessage and statusstatus. More robust packet error handling. Less use of global DOS memory. Multicast support. Improved utilities: Ping, Hop and Dig. 1.5 termsLicense Terms and Conditions The following terms and conditions apply to your use of the Trumpet Winsock program. Please read these terms before continuing the registration procedure. By using a registered copy of the Trumpet Winsock program you accept the terms and conditions below. If you do not accept the terms and conditions of this license, return this package to Trumpet Software International Pty Ltd and destroy all further copies of the product. 1. TSI grants the registered user of the software (You) a non-exclusive, non-transferable and perpetual licence to use the object code comprised in the software. You must not have installed at any one time more than the number of licensed copies of the software. 2. You acknowledge that the software is supplied AS IS and that TSI not making, and that no person acting on behalf of TSI has made, any warranty or representation as to the Softwares functionality, performance characteristics, merchantability or suitability for any particular purpose. All such warranties and representations are hereby excluded to the maximum extent permitted by law. 3. To the extent permitted by law, TSI, its directors, servants, agents and licensors are excluded from all forms of direct, special, indirect, or consequential loss or damage (including loss of profits, loss of data and loss or damage that may reasonably be supposed to have been in the contemplation of the parties as of the date of this agreement as a probable result of an act or omission by TSI) arising out of or in connection with Your use of the Software, including without limitation any loss or damage caused by TSIs negligence. Where relevant legislation does not permit TSIs liability to be limited in this way then, if permitted by that legislation, TSIs liability will be limited to, at TSIs option, the replacement of the relevant goods or the supplying of relevant services again, or the payment of the cost of having the services supplied again. For the purposes of this Clause 3, TSI is or will be taken to be acting as agent or trustee on behalf of and for the benefit of its directors, servants, agents and licensors. 4. The agreement formed by TSIs acceptance of Your application for registration is governed by and will be construed in accordance with the laws of the State of Tasmania, Australia. The 1980 United Nations Convention on the International Sale of Goods does not apply to that agreement. 5. You acknowledge that all rights in the Software are owned by TSI or its licensors and shall not at any time make any statement or do anything which is inconsistent with that ownership. Without limitation, Your licence does not allow You to resupply the software to any other person or to distribute the software. 6. Your licence is limited to use for Your own internal requirements and does not permit You to use the Software to process the data of any other person or a part of a bureau service. If use for these purposes is required then You should contact TSI to make arrangements for the granting of an appropriate licence covering such uses. 2 Installing the Trumpet Winsock 1. Although these instructions are intended for people who are new to the Internet, it is assumed that the reader has a moderate understanding of Windows and perhaps some knowledge of DOS. ie. You may need some help if you dont know: a) how to edit your autoexec.bat file, or b) the difference between Program Manager and File Manager. 2. Most users will be interested in either Using the Trumpet Winsock over SLIP/PPP if they have a dial up account or Using the Trumpet Winsock with a packet driver if they are on a LAN. Since the installation instructions for these two configurations are quite different, they have been split into two sections. Please read carefully through the section that is relevant to you. 3. If you need to set up your Winsock for both these situations, read about using the Command line to define alternative ini files first. 2.1 Installation Requirements For basic installation of the Trumpet Winsock, you will need the following: About 300-400k RAM (including 50-58k of global DOS memory) under normal conditions. About 1000k disk space. About 5 minutes to install the files. Some details for the Winsock Setup screen. 3 Using the Trumpet Winsock over SLIP/PPP;SLIP;PPP This section describes how to configure the Trumpet Winsock for use over SLIP, CSLIP or PPPPPP, collectively called dial up connections. Have a look at the relevant sections of the Trumpet Winsock FAQ, or Trumpet Winsock Error Messages for more information on this topic. 3.1 Installing the Winsock files for SLIP/PPP 1. Create a suitable directory for your Trumpet Winsock files. eg. c:\trumpet 2. Into this directory, copy the files: tcpman.exe, winsock.dll, hosts, services, protocol, sendreg.exe, setup.cmd, login.cmd, bye.cmd and trumpwsk.hlp. See Trumpet files for a description of each of these. The Trumpet Winsock requires that you must have the correct combination of tcpman.exe, winsock.dll. When upgrading to a new release, replace each of these files to be sure that everything is up to date. 3. Modify the path line in your autoexec.bat to contain a reference to that directory. eg. path c:\dos;c:\windows;c:\trumpet 4. Make sure it is active by rebooting your computer or by executing autoexec.bat again. 5. Check that the path is set correctly by starting Tcpman from the File Manager. To do this select File/Run and enter: tcpman If this fails, the path is probably not set up correctly, so fix it. 6. To create a program group for your Trumpet files: Select File/New from the Program Manager, and choose Program Group. For the Description, enter an appropriate name, eg: Trumpet Files Leave the Group File blank (Windows will set this automatically) and select OK. 7. To create a Program Item for the Tcpman within your Trumpet Files program group: Open the File Manager and position it so that you can see both the Trumpet Files group (in the Program Manager) and the contents of the trumpet directory. You may need to resize the File Manager to do this. Drag tcpman.exe from the trumpet directory into the Trumpet Files program group. 3.2 Setting up the Winsock for SLIP/PPP To enable your Winsock to function correctly it will be necessary to enter some details in the Setup screen. If you are unclear on any of them, try to seek some help from qualified Internet support staff - it will save you a lot of time. 1. If you havent already done so, read Installing the Winsock files for SLIP/PPP. 2. Open the Trumpet Winsock by double clicking the Tcpman icon and select Setup from the File menu to open the Setup dialog. 3. Check either Internal SLIP or Internal PPP. Some details will be greyed out now. You need not try to fill them in. 4. Enter your IP address (if youve been assigned one), Name server, and Domain suffix. If your provider allocates IP addresses dynamically, leave this as 0.0.0.0 for the moment. 5. If youre feeling particularly brave, you may like to tweak Demand load timeout, MTU, TCP RWIN, TCP MSS, and TCP RTO MAX. These values can be tailored to suit your needs once you have things running, but you should be able to establish a connection using MTU: 576, TCP RWIN: 2048, and TCP MSS: 512. 6. Set SLIP port to the number of the comms port to which youve connected your modem. Eg. If youre using com2, enter: 2 7. Set the Baud rate that you would like your modem to run at. Eg. If youve got a Vfast 28.8k modem, enter: 38400 Up to 115200 is supported although speeds greater than 19200 require suitable hardware. 8. Set Hardware handshake and Van Jacobson CSLIP compression as required. Hardware handshake is recommended if your modem cable supports it. Van Jacobson CSLIP compression may only be used with SLIP if your server supports it. 9. Select the kind of Online status detection your modem supports. You will need to make sure that your modem has a default power on setting of AT&C1 for DCD detection to function. 10. By default, all dialling is done with 8 bits, no parity. This may not work for you... If your server does not use 8 bits with no parity, you will need to go to Dialler/Options and select Use Control Panel settings for parity and word size. 11. When you are done, click on OK and if all goes well, the Trumpet Winsock will be initialised. You should now be ready to try logging in manually. 3.3 Logging in manually Note that the Winsock will try to dial automatically when it starts unless No automatic login from Dialler/Options is selected. 1. Select Dialler/Manual Login. You will now be able to send commands (as described in your modems manual) to your modem. 2. Confirm that your modem is ready by typing an appropriate command (or initialisation string). For example, try entering: ATZ The modem should return: OK If it doesnt, check that your modem is on, your SLIP port is set correctly, and that your cables are fine. 3. Instruct the modem to start dialling. For example: ATDT 4. Once connected to your providers machine, you will usually be asked to enter you username and password. 5. If and when you are given a choice, select either SLIP or PPP. Your screen should start being filled with nonsense characters. 6. Press to enable SLIP/PPP. 7. If you are using SLIP and your IP address is allocated dynamically you will need to enter your IP address in the Setup. PPP does this automatically. 8. Try connecting to a well known host IP address using a Winsock compliant program to see if all is well. The program Trumpet Ping is suitable for this. 9. If you wish to use another terminal program to dial in to the server, don't forget to issue AT&D0, or disable DTR dropping when exiting the program, or the connection will be severed when the application closes the comms port. 10. Once you have determined your login sequence, you can set up a login script to automateautomate the process. 3.4 automateAutomating your login sequence Before modifying or writing your own script: 1. Find out if your Internet provider has a preconfigured a Trumpet Winsock login script. Since many Internet providers will have prepared scripts for connecting to their systems, it may be worth contacting yours to see if they have a suitable script. 2. Make sure that that youve got Logging in manually under control. 3. Try running login.cmd without any modifications. The first time it is launched you will be asked to enter phone number, username and password. You can change these later by running setup.cmd. If you receive a message saying that either SLIP or PPP has been established and that the script was completed then your script may require no further work. If you receive script aborted (possibly proceeded by another error message) then you will need to read on... Here are some steps to take if you wish to personalise your login.cmd: 1. The variable $modemsetup is the initialisation string for your modem. Some research may be required to find out what this should be. 2. The other variables ($userprompt, $passprompt, etc.) will need to be altered according to the messages you providers machine gives and accepts when you on login. Eg. If the prompt that asks you for your username is Enter your login name:, you could change the line defining this prompt to: $userprompt = "login name:" 4 Using the Trumpet Winsock with a packet driver;packet driver This section describes how to configure the Trumpet Winsock for use on a local area network (eg Ethernet) by way of a packet driver. Packet drivers can only be used reliably using WINPKT, and even then only under enhanced mode. Users of standard mode must take care to avoid system crashes. See Unsupported configurations if you want to use the Trumpet Winsock with any of: ODI, NDIS, Windows for Workgroups, PKTMUX, Cabletron Network Cards, Token ring, etc... If your network card was supplied without a packet driver, you may like to investigate the Crynwr packet driver collection. Have a look at the relevant sections of the Trumpet Winsock FAQ, or Trumpet Winsock Error Messages for more information on this topic. 4.1 Installing the Winsock files for a packet driver 1. Create a suitable directory for your Trumpet Winsock files. eg. c:\trumpet 2. Into this directory, copy the files: tcpman.exe, winsock.dll, winpkt.comwinpkt, hosts, services, protocol, sendreg.exe, and trumpwsk.hlp. See Trumpet files for a description of each of these. The Trumpet Winsock requires that you must have the correct combination of tcpman.exe, winsock.dll and winpkt.com. When upgrading to a new release, replace each of these files to be sure that everything is up to date. 3. Modify the path line in your autoexec.bat to contain a reference to that directory. eg. path c:\dos;c:\windows;c:\trumpet 4. Make sure it is active by rebooting your computer or by executing autoexec.bat again. 5. Check that the path is set correctly by starting Tcpman from the File Manager. To do this, open File Manager, select File/Run, and enter: tcpman If this fails, the path is probably not set up correctly, so fix it. 6. To create a program group for your Trumpet files: Select File/New from the Program Manager, and choose Program Group. For the Description, enter an appropriate name, eg: Trumpet Files Leave the Group File blank (Windows will set this automatically) and select OK. 7. To create a Program Item for the Tcpman within your Trumpet Files program group: Open the File Manager and position it so that you can see both the Trumpet Files group (in the Program Manager) and the contents of the trumpet directory. You may need to resize the File Manager to do this. Drag tcpman.exe from the trumpet directory into the Trumpet Files program group. 4.2 Installing WINPKT;WINPKT To install a packet driver and WINPKT, you will need lines in your network batch file that do the following: 1. Set up your packet driver (including vector, IRQ and I/O address). 2. Install WINPKT using the same vector that the packet driver was installed on. The following examples are intended to illustrate this. Ne2000 packet driver using WINPKT This example installs an ne2000 packet driver on vector 0x60 using IRQ 2 and I/O address 0x300. ne2000 0x60 2 0x300 WINPKT 0x60 Western Digital 8-bit network card using WINPKT This example installs a Western Digital 8-bit network card on vector 0x61 using IRQ 5 and I/O address 0x320. wd8003e 0x61 5 0x320 WINPKT 0x61 Ne2000 packet driver with Novell NetWare access using WINPKT Specification of the -n switch of the packet driver is important. Some packet drivers don't support this switch. In that case, you may be forced to use ODI instead. An example could be the Xircom Pocket Adaptor. ne2000 -n 0x60 2 0x300 WINPKT 0x60 pdipx netx path c:\dos;c:\network\win31 f: login 4.3 Setting up the Winsock for a packet driver To enable your Winsock to function correctly it will be necessary to enter some details in the Setup screen. If you are unclear on any of them, try to seek some help from qualified Internet support staff - it will save you a lot of time. The first time you run Tcpman, the Setup screen will be opened automatically. Select File/Setup to open it manually. 1. If you havent already done so, read Installing the Winsock files for a packet driver and Installing WINPKT. 2. Make sure that Internal SLIP and Internal PPP are not checked. Some details will be greyed out now. You need not try to fill them in. 3. Enter your IP address, Netmask, Default gateway, Name server, and Domain suffix. If you are on a network that uses BOOTPBOOTP or RARPRARP to determine its IP address, then enter BOOTP or RARP respectively. 4. Set the Packet vector to the vector that your packet driver was installed under without the leading 0x. Eg. If you used vector 0x60, enter: 60 Alternatively, enter 00 to instruct the Winsock to search for the packet driver. 5. If youre feeling brave, you may like to tweak Demand load timeout, MTU, TCP RWIN, TCP MSS, and TCP RTO MAX. These values can be tailored to suit your needs. If you are on an Ethernet, then we suggest MTU: 1500, TCP RWIN: 4096, and TCP MSS: 1024. 6. When you are done, click on OK and if all goes well, the Trumpet Winsock will be initialised. You are now ready to start using the Winsock. 5 Scripting Language This section describes the Trumpet Winsock scripting language as well as providing examples of its usage. See Automating your login sequence for some tips on how to write dialler scripts quickly. Have a look at the relevant sections of the Trumpet Winsock FAQ, or Trumpet Winsock Error Messages if youre having difficulties with a script. 5.1 Basic commands;script Each of the following commands is a scripting primitive and will return success or failure depending on whether the command succeeded or not. Commands always return success unless otherwise specified. Parameters enclosed in < > characters need to be replaced by a value. For example, the parameter corresponds to a length of time in seconds and should be replaced an integer value or integer variable. Commands with a parameter will return failure if they have been unable to succeed within seconds, unless otherwise specified. Parameters enclosed in ( ) characters are compulsory and those enclosed within [ ] are optional. All parameters are compulsory unless otherwise stated. The | character represents logical OR. abortabort Aborts the script. This command always returns failure. See exitexit. addressaddress Parses the current stream for an IP address, and copies it into the Winsocks primary IP address. The address change will not be effective until the script finishes. Note that this will find the first IP address in the stream. If the current stream contains alternative IP addresses (annex IP address, etc) you will first need to check the input stream with the inputinput command. scriptbootpbootp Attempts a BOOTPBOOTP when the (login) script has finished executing. This will modify any TCP/IP setup parameters that are specified in the returned BOOTP response. displaydisplay Displays in the tcpman window. echoecho [on | off] Displays any characters received while dialling in the tcpman window. The default is on. execexec Executes the Windows command specified. This is useful for starting another program from the script. It is important to quote literal strings by quotes if they contain the \(reverse slash) character. The reverse slash has a special meaning. exitexit Stops the currently executing script but still returns success. See abortabort. expectexpect Checks that the current input stream contains the target string. It must match exactly, and will not search the stream. If the command timed out or the string received does not match, the command returns failure. inputinput Scans the current input stream for . loadload [ []] Returns which may be integer or string from . Where is the section name within the ini file and defaults to default vars, and is the name of the Winsock ini file and defaults to trumpwsk.ini. Note that the file extension must be specified with the file name. See savesave. messagemessage Presents a dialog box containing , and pauses until OK is pressed. online Instructs the Winsock to go online immediately. Starts processing SLIP packets, and adjusts the state of the comms port to normal SLIP conditions. outputoutput Sends to the output stream on the comms port. Any characters received during this process will be echoed to the tcpman window if the echo flag is on. See outputechooutputecho, echoecho. outputechooutputecho [ timeout ] Sends to the output stream on the comms port. As each character is output, the script processor waits for the corresponding character to be echoed. If the received character does not match, the command will abort and a failure is returned. If a timeout is not provided, a default of 10 seconds is used. The timeout applies to the whole command. In addition, the carriage-return is handled specially by waiting for a linefeed to be read after the carriage return is read. Both the sequences and are acceptable. See outputoutput. passwordpassword [ ] Brings up a message box that allows $password (one of the predefined variables) to be entered or modified. If the user cancels the message box, failure is returned. Any characters typed will be echoed with a * character, and encrypted if saved to the .ini file. See queryquery, usernameusername. queryquery [ ] Brings up a message box for the to be entered or modified. An optional prompt may be provided. If the user cancels the message box, return failure. See passwordpassword, usernameusername. quit Posts a quit message to the Winsock tcpman. This will start a normal quit process. readread Reads a whole line (terminated by a line feed character) from the comms input stream into . Any carriage returns are stripped. See readxreadx. readxreadx Reads a whole line (terminated by a carriage return) from the comms input stream into . See readread. savesave [ []] Saves which may be (integer or real) to . Where is the section name within the ini file and defaults to default vars, and is the name of the Winsock ini file and defaults to trumpwsk.ini. Note that the file extension must be specified with the file name. See loadload. setset ( dtr | rts ) [ on | off ] Toggles the DTR or RTS modem control. sleepsleep Pauses for seconds. Always returns success. statusstatus ;Dialler Status Puts into the Dialler Status dialog box, replacing any previously entered text. The Dialler Status box, which is initially left blank, is automatically displayed when any script is executed. The script aborts if Cancel is pressed. tracetrace [ on | off ] Toggles the tracing of scripting commands. This provides a description of each line as it executes. usernameusername [ ] Brings up a message box that allows $username (one of the predefined variables) to be entered or modified. If the user cancels the message box, failure is returned. See queryquery, passwordpassword. waitwait [ dsr | cts | dcd | rlsd ] Pauses until the given modem signal changes state or timeout occurs. See sleepsleep. 5.2 String formats When a string is required for a parameter, all characters up until the end of the command line are processed as the string. Strings conform to the following format. If you wish to use the characters \, #, $ or % inside a string, they must be quoted with or have a \ character in front of them. The (quote) character may only be formed by preceding it with a \ character. (quote) A quote character () means that all characters are to be taken as is without any special meaning until a corresponding closing quote () has been found. The string is not permitted to extend over more than one line. # (hash) If a # symbol is found that is not inside quotes, then it means that the rest of the logical line is to be ignored. This can be used to annotate the script. $ (dollar) If a $ symbol is found, it denotes a string variable. If the variable has been assigned a value when the command is executed, its value will be placed in the string. If not, an error message is displayed, and the script continues. % (percent) If a % symbol is found, it denotes an integer variable. If the variable has been assigned a value when the command is executed, its value will be placed in the string. If not, an error message is displayed, and the script continues. Integers are 32 bit signed integers in the range -2147483648 to 2147483647. \ (reverse slash) If a reverse slash \ is found, it denotes that the character following either has a special meaning which will be placed in the string, or is to be taken literally. Here is a list of special \ character meanings. \b Back space character (control character number 8).  \c The port number that the SLIP driver is using as a decimal number.  \e Escape character (control character 27).  \f Form feed character (control character 12).  \i The current IP address.  \l Line feed character (control character 10).  \n An end of line sequence (control characters 13, then 10).  \p The current password.  \r Carriage return character (control character 13).  \t Tab character (control character 9).  \u The current username.  \0 to \255 Denotes a decimal number of a character to be added into the stream (eg. \0 \27 \255).  5.3 Program control commands In addition to the basic command primitives, there are the following special control statements. IfIf Statement if [ else ] end If the condition evaluates as true, the first statement list is executed. If the condition evaluates as false, the first statement list is ignored, and if an else clause is present, it is executed instead. While Loop while end While the condition evaluates as true, the statement list is executed. RepeatRepeat .. Until Loop;Until repeat until The statement list is repeatedly executed until the condition evaluates as true. 5.4 Assignments and expressions Assignments are used to store new values into variables. They take the following forms: = Eg. %attempts = %attempts + 1 = Eg. $name = $first + $last The variable part may be a string variable (either unspecified or starting with a $), or an integer variable (starting with a %). Variables arent case sensitive. String expressions may be composed of the following operands: quoted strings eg. Fred, OK  string variables eg. $name, $response  String expressions may use the following operators: ( ) + concatenation Integer expressions may be composed of the following operands: numbers eg. 1, 43, 7373  integer variables eg. %I, %count  Integer expressions use the following operators in order of priority: ( ) Brackets.  * / % Multiplication, division and modulo division.  +, - Addition and subtraction.   Also, integer operands may be formed by the comparison of strings. eg. $A = FRED will evaluate to an integer operand of 0 or 1 depending on the value of $A. Conditional expressions may also be formed using conditions and boolean operators. They return 0 or 1 depending on the result of the condition. These operators have the following priorities. = <> < > <= >= Equal, not equal, less than, greater than, less than or equal, greater than or equal.  ! Boolean not operator.  & Boolean and operator.  | Boolean or operator.   5.5 Predefined variables The following predefined variables are available for use within scripts. %slipport Corresponds to your SLIP port.  %ppp 0 = SLIP, 1 = PPP  $inipath Determines the ini file in that variables will be saved to and loaded from.  $section Determines the section of the ini file that variables will be saved to and loaded from.  $username Sets the username.  $password Sets the password. Any variable with password in its name will be saved in an encrypted form.   5.6 String functions The following string functions may be used as operands. copycopy ($s, %,p %l) Copy characters from string $s starting at character %p for %l characters and return them as an expression. Note that string character counting starts at 1 - not zero. lenlen ($s) Return the length of string $s as an integer number. lowerlower ($s) Convert string $s to all lower case. pospos ($s1, $s2) Return an integer number corresponding to the position of the first character of string $s1 as found in string $s2. A zero value is returned if $s1 is not found within $s2. upperupper ($s) Convert string $s to all upper case. 5.7 Commands as operands A scripting command can be used as part of an expression by surrounding the command with [ ] symbols. Eg. [input 10 OK\n] This operand would have the value 1 if the command succeeded or 0 if it failed. 5.8 Example script fragments Repeated dial The following segment of script could be used to attempt a repeated dial of a given number. Note the use of the outputechooutputecho rather than outputoutput so that any characters echoed from the command will be consumed. %attempts = 0 repeat %attempts = %attempts + 1 outputecho 60 atdt345772371\r until [input 30 CONNECT\n] | %attempts = 10 This section of script is fine, but would take 30 seconds for the input function to timeout if a response other than CONNECT were returned. It could be refined further into the following lines %attempts = 0 repeat %attempts = %attempts + 1 outputecho 60 atdt345772371\r read 30 $result until $result = CONNECT | %attempts = 10 This piece of script would be fine unless the modem failed to respond, in which case the script would abort. A further refinement would be the following. %attempts = 0 repeat %attempts = %attempts + 1 outputecho 60 atdt345772371\r %timeout = [read 30 $result] if %timeout = 0 display Dial up timed out.\n end until $result = CONNECT | %attempts = 10 | %timeout These portions of script are only examples to demonstrate the use of scripting. In practice, most modems do not generate simple messages after the atdt command. You will have to skip extra lines etc., to get a working script. Busy detect If you are having trouble connecting to a busy site, it would be good to be able to have Trumpet Winsock redial more quickly. Your script will need to detect a BUSY signal and redial if necessary. In the following script segment, if a BUSY signal is detected within 5 seconds then it will redial. This time may need to be increased if it takes longer for a BUSY response. If it is not busy, then it waits for 30 seconds for a CONNECT. If it gets one, it exits the loop and continues on with the script, otherwise it will redial after 30 seconds. %ok = 0 %busy = 0 repeat output "atdt"$number\n %busy = [INPUT 5 BUSY] if !%busy %ok = [INPUT 30 CONNECT] end until %ok Multiple number Some service providers have more than one number to dial when they are busy. In this example, four numbers are pre-defined in the script. What it does is try each number in turn until one responds with a CONNECT. If it has already tried all four, then it goes back to the first one. In this case it would repeat indefinitely, so you may want to put a limit on the number of attempts. This can also be increased or decreased to the number of dial in numbers your service provider has. $number1 = "232224" $number2 = "232225" $number3 = "232226" $number4 = "232227" $number = "" %num = 0 %ok = 0 %busy = 0 repeat %num = %num + 1 if %num > 4 %num = 1 end if %num = 1 $number = $number1 end if %num = 2 $number = $number2 end if %num = 3 $number = $number3 end if %num = 4 $number = $number4 end output "atdt"$number\13 %busy = [input 5 BUSY] if !%busy %ok = [input 30 CONNECT] end until %ok Transmit Break The only way to send a break signal is to have the modem do it. This fragment switches the modem to command mode, transmits a break, and then returns to data mode. output "+++" input 10 OK\n output "at\b o"\13 6 Menu Commands This section describes the function of each menu command, and the options presented in each dialog box. 6.1 File Setup Opens the Tcpman Setup dialog box. For some guidance in how to set these see either Setting up the Winsock for SLIP/PPP or Setting up the Winsock for a packet driver. IP address Determines the IP address of your computer. To exist on the Internet your computer must have an IP address. This address will be allocated permanently or dynamically by your service provider. If your service provider allocates IP addresses dynamically, this will usually be set automatically if you are using PPP. If you are using SLIP, the IP address will need to be entered either manually or by a dialler script. Alternatively, the Winsock may be able to use either BOOTPBOOTP or RARPRARP to find your IP address if the services are online. Netmask Sets your network mask. A netmask is used for determining whether or not a destination IP address is on the same network. Your netmask will often correspond to the class of your IP address. For example, if you have a Class C IP address, use: 255.255.255.0 Default gateway Your default Internet gateway or router. Name server The numerical IP address of your domain name server. A domain name server converts names into numeric IP addresses using the domain name system (DNS). You may provide more than one address by separating the addresses with spaces. Time server Leave blank. This is a presently unused list of time server IP addresses. Domain suffix The name of the domain in which your computer lives. This is used for looking up names via the name server. You may provide more than one domain name by separating the names with spaces. Packet vector Sets the vector that your packet driver was installed under. This value should be entered without the leading 0x. Eg. If you used vector 0x60, enter: 60 Leaving the packet vector set to 00 instructs the Winsock to search for the packet driver. MTU This should usually be set to the MTU of your network. For Ethernet, 1500 is the maximum, and is recommended. The unofficial MTU for SLIP servers is 1006. The Maximum Transmission Unit (MTU) of a network is the greatest amount of data that can be transferred in one physical frame on that network. Fragmentation will occur if a packet is sent across a network that has an MTU smaller than the packets frame length. This will lead to lower performance as fragments need to be reassembled. Since it is virtually impossible to determine the minimum MTU of the intervening networks, trial and error is usually the best way to find out. TCP RWIN The TCP Receive Window (RWIN) determines how much data the receiving computer is prepared to receive. Usually 3 to 4 times the size of TCP MSS (an exact multiple if possible). An RWIN set too large will result in greater loss of data if a packet is lost or damaged. An RWIN set too small (ie 1*MSS) will be very slow, as each packet will have to be acknowledged before the next packet is sent. An RWIN of 2*MSS causes problems with silly window avoidance. TCP MSS The TCP Maximum Segment Size (MSS) defines the largest segment of TCP data that the Winsock is prepared to receive on that connection. When a connection is established, the two ends agree to use the minimum of each ends advertised value. Because headers are typically 40 bytes, your MSS should always be less at least 40 less than the MTU. If the MSS is too low, the data/header ratio will be low. Alternatively, a large MSS will lead to large IP datagrams. These will fragment when travelling across networks with small MTUs, thereby decreasing performance. For this reason, performance may sometimes be improved by dropping the value of your MTU. TCP RTO MAX The TCP Retransmission Time Out Maximum (RTO MAX) sets an upper limit on the retransmission timeout. It may be useful to lower this to perhaps 10 seconds when using interactive programs such Chat or Telnet software over a connection with a higher than average packet loss. Demand load timeout The number of seconds Tcpman stays loaded after all Winsock applications have finished with it. This only applies if the Winsock has been demand loaded. That is, the winsock.dll has been loaded before the Tcpman. This is normally how another application will launch the Winsock. If the Winsock hasnt been demand loaded, use the SLIP inactivity timeoutOptions. Internal SLIP Enables internal SLIP. Internal PPP Enables internal PPPPPP. SLIP port Sets the number of the comms port your modem is on. Eg. If youre using com2, set this to: 2 Use the Ports screen in the Windows Control Panel to adjust the settings for your Comm port if necessary Baud rate Determines the speed of the connection between the Winsock and your modem. Hardware handshake Enables RTS/CTS handshaking. May require the AT&K3 modem command to function properly. Van Jacobson CSLIP compression Enables CSLIP. Online status detection Needed for dialler auto login / auto logout enabling. None No online status detection. DCD (RLSD) check May require AT&C1 modem command to function. DSR check May require AT&S1 modem command to function. Firewall setup The Trumpet Winsock may be used with a Socks 4.2 compatible firewall. Enable Firewall Enables firewall setup.  Firewall Host: IP address This will be the IP address of the firewall that is visible to the local network.   Port The port that the firewall will be using to communicate to the Winsock with.  Firewall User ID Your user ID string.  Local IP addresses: Net The address of a network that will be considered local.   Mask The netmask of the corresponding network.   PPP options Password Authentication Protocol (PAP) may be used if your server supports it. In fact, you should only use it if you have been instructed to by your service provider. The PAP username and password should not be confused with the username and password used for a dial-up SLIP/PPP account. PPP is a special part of PPP that may not be used by your server. Use Password Authentication Protocol (PAP) Enables PAP.  Username PAP username.  Password PAP password.   Exit Quits the TCP manager, forcing the Winsock to be unloaded. 6.2 Edit Copy Copies selected text on Tcpman window to the clipboard. Clear Clears the Tcpman window. 6.3 Special Info Displays a list of active sockets. Kill Socket Allows any socket to be killed; use with caution. Register You should only register your copy of the Winsock if you accept the License Terms and Conditions. For this reason, they are presented before entering the Registration screen. If you accept them, the registration screen is opened and you will be able to enter your Registration name and password to register your copy of the Trumpet Winsock. Your password is generated as a function of your registration name, so you dont get to choose it. See Registration Details for more information on prices and distribution and details of how to register. Note that if youve registered an earlier version of the Winsock you will need to update your password. To do this, leave old registration name and password unaltered then open the Registration via Internet screen and select Update password to 2.1. Registration via Internet This feature is for sending encrypted credit card details to Trumpet Software International via the Internet. This will only work if your Winsock is functioning and your network is visible to ours. The Winsock will only permit you to send one registration request so make sure you get your details correct. Do not use this feature as a test. To send a registration request, just fill out the details carefully and click on Send registration request. If the transfer is taking too long, it may be necessary to click on the Abort transfer button and try again later. You will receive a password once we have received an authorisation to debit your credit card. You can select Query registration process to see how your order is progressing. When we have processed the transaction, your password will be sent to you via email. You can either enter this manually, or click on Query registration progress to have the details entered automatically. You are then fully registered. If this method of registration is unsuccessful, you may need to find another way to register. See How to register from Registration Details for the alternatives. License Displays the License Terms and Conditions. 6.4 Trace The following trace options provide diagnostic information about the Winsock. Use with care since some applications may crash when the traces are active. Should a program crash with stack overflow (Error 202), the Winsock may remain loaded in memory even though Tcpman has exited. It is advisable to restart windows if this happens and possibly even reboot your machine. Also, timing measurements of the Winsock throughput will be severely affected by the trace options. TCP Provides a dump of each TCP packet including: time, source port->destn port, seq number, [ack number], [flags], wind number, [options], [data size] UDP Provides a dump of each UDP packet: UDP src -> dst size IP Enables IP tracing. ARP Enables ARP tracing. traceRARPRARP Enables RARPRARP tracing. Ethernet Adds Ethernet headers to IP, ARP and RARP traces. Extra detail Adds some extra detail to TCP, UDP and IP traces. For TCP and UDP it provides a dump of the data. For UDP it also dumps broadcasts. Socket calls Traces each Winsock call. The subroutine parameters are displayed as well. DNS Traces Domain Name Server operations. Use with care, stack overflows can be frequent. Messages Traces Async Socket messages. Comms Traces serial port communications. tracePPPPPP Traces PPP negotiations. 6.5 Dialler Contains functions relevant to dial up SLIP/PPPPPP connections. Login Invokes the login.cmd dialler script. Bye Invokes the bye.cmd dialler script. Other Invokes any script. A file selection dialog of *.cmd will be displayed. ManualLoginManual login Invokes the dialler manually. Use to exit from the manual dialler. See Logging in manually. Edit scripts Invokes notepad, allowing you to edit a script. See Scripting Language. OptionsOptions;SLIP inactivity timeout Calls up the dialler options dialog box. No automatic login Disables automatic login.  Automatic login on startup only Calls login.cmd on startup.  Automatic login and logout on demand Calls login.cmd on startup and bye.cmd before exiting.  SLIP inactivity timeout If the Winsock has been manually loaded, this determines the number of minutes Tcpman stays loaded after all Winsock applications have finished with it. A value of 0 disables the timeout. See Demand load timeout.  Automatic redial when disconnected Redials once per minute while disconnected.  Use standard SLIP settings for parity and word size Use the standard settings of 8 bits and no parity.  Use Control Panel settings for parity and word size This will be necessary if your dial up server does not accept 8 bits and no parity when dialling in.   Other scripts At the bottom of the Dialler menu is a list of available scripts other than login.cmd and bye.cmd. This will often include setup.cmd. 6.6 Help Opens the relevant section of the online helptrumpwsk.hlp file. Contents The Contents page of the online help is the top level entry point into the documentation. Commands Provides a listing of the menu commands. Search The Search index of the Trumpet Winsock Help is useful for finding references to specific topics in the documentation. HelpDistDistribution Calls up the section of the help file dealing with distributiondistrib. Using help Opens the help file for Windows Help. About Displays the version number and copyright of the Trumpet Winsock. 7 Trumpet Winsock Error Messages This section describes the causes and/or solutions for some common error messages. Have a look at our WebWeb site for a more complete list. 7.1 Tcpman error messages Unable to start registration program To use the automatic registration, it will be necessary to have the file sendreg.exe in the working directory. Task did not call WSACleanup This message is generated when an application exits without cleaning up after itself. Call to undefined dynalink A call has been made to a nonexistent routine in a Windows library. This could perhaps be caused by mixed Winsock versions. TCPMAN not found Make sure that all the Winsock files are together in one directory which is referred to in the path line of your autoexec.bat file. See either Installing the Winsock files for a packet driver or Installing the Winsock files for SLIP/PPP for details on how to do this. Be careful not to have spare copies of winsock.dll or tcpman.exe in directories also mentioned in the path. 7.2 Dialler error messages script aborted A script aborted message will be given if the script was aborted before completion, for whatever reason. For example, the script will abort if an input command times out. If a script has aborted, it is likely that the SLIP/PPP connection hasnt been established correctly. For that reason, no other applications will work if a script is aborted. Ensure that your script is suitably debugged and any error conditions have been accounted for by the script. See Automating your login sequence for instructions on how to do this. PPP Frame check error To check if there are any errors when a PPP packet is sent, a Frame Check Sequence (FCS) is performed. This is calculated by the sender by adding together the binary values of all the bytes in the packet and is sent as part of the packet. The receiver makes the same calculation and if the two values aren't the same, a frame error occurs. PPP frame check errors generally occur when transferring a large amount of data over your PPP connection. They are often caused by Comm error [OVERRUN]overrun errors. overrunComm error [OVERRUN] When accessing local disk(s), Windows halts any IO to the comm ports for a short period of time. This in turn causes the overruns, when the Winsock is unable to access the comm port. This is unfortunately a glitch in the internals of Windows, and cannot be avoided. Overrun errors can also be caused for other reasons... When using a fast connection with a serial card that only supports lower speeds, the Winsock is unable to send data at the correct speed to the card. This also results in overruns, and the only way to fix this is to either lower the baud rate to a rate acceptable to your hardware, or upgrade your card to one with a faster UART (16550 or faster). It should also be noted that some video drivers built around the s3 video chip hold CPU cycles and therefore cause overruns as well. s3 have apparently released driver updates that cure the problem. Several OEM vendors using the s3 based design have also followed suit. Unable to load TCP If you've got BOOTPBOOTP set, replace your IP address with 0.0.0.0 before dialling again. Unable to perform bootp No reply received to sent BOOTPBOOTP requests. Either no BOOTP server available or connection not properly established. 7.3 Packet driver error messages Packet driver must be class 1 (Blue book) or class 6 (SLIP) This indicates that either WINPKT hasnt been loaded properly or the wrong kind of packet driver is being used. For example, token ring drivers do not work. Unable to load TCP Check that the packet driver loaded properly; you can do this by observing the screen as the .bat file loading the packet driver executes. This will also tell you if WINPKT managed to find it. WINPKT will also tell you if the correct vector was chosen by tcpman. Unable to bind protocol 0806/0800 another TCP stack is using the packet driver Remove it. Unable to locate WINPKT or PKTDRV virtual packet driver Check that the packet driver setting under File/Setup is correct. See Packet driver must be class 1 (Blue book) or class 6 (SLIP). Unable to allocate network buffers critical error Try to free up some special driver memory by removing windows device drivers. See unable to load network buffers / network buffers low. Network buffers low not critical but unadvisable Try to free up some special driver memory by removing windows device drivers. See unable to load network buffers / network buffers low. Unable to load network buffers / network buffers low It will be necessary to free up more memory for the Winsock. You can try providing more DOS memory before Windows is loaded by removing unwanted TSRs or drivers. Also there can be occasions where Windows will attempt to load the full Winsock into low memory resulting in insufficient driver memory being available. The workaround for this is to try loading the Winsock at a different time. Often this error occurs when loading automatically at start up. enablecommnotification failed - winsock will function more slowly The "enablecommnotification" call is a call implemented in Windows 3.1 (or later) that older comm drivers (for example turbocomm) don't recognise. The solution is to get either a new comm driver or an update of your old one. There are apparently plenty available (cybercom, winfaxpro, etc.). At worst, the original Windows 3.1 comm driver should do the job. 8 Trumpet Winsock FAQ Questions regarding tcpman, problems with menu commands, and installation difficulties. If you cant find the answers youre looking for in either this manual or our WebWeb site then please contactcontact us. See also Trumpet Winsock Error Messages. 8.1 Tcpman FAQ Does Trumpet Winsock work with Windows 95? Trumpet Winsock will work with Windows 95, however you may not be able to run some or all of your 32 bit TCP/IP applications. You need to remove any other TCP/IP files, especially the Win95 winsock.dll, and replace them with the Trumpet ones. There is an option in Tcpman properties where you can specify a startup directory. This needs to be set to the directory where your winsock.dll file is. While this works for some people, we have no experience with Windows 95 and so can't help you with any problems that might arise from using Trumpet Winsock with Windows 95. Trumpet Winsock under Windows NT? Trumpet isn't supported under Windows NT. However, some people have had moderate success by replacing the standard winsock.dll with ours. I'm not sure exactly what new problems this creates, however there are apparently side effects. Do so at your own risk!! Im using ODIPKT and I cannot get any response You are probably accessing the wrong protocol. If you have the ARP trace on, you will possibly get "ARP timed out" messages. The first parameter of ODIPKT selects the correct protocol. Try adjusting this. 8.2 Dialler FAQ Here are the answers to some commonly asked questions regarding dial-up connections and the Scripting Language that may not be covered in Using the Trumpet Winsock over SLIP/PPP. The connection appears to be too slow compared to Xmodem Possibly the MTU, TCP MSS and TCP RWIN settings are not right. Turn on the IP trace to see if fragmentation is occurring on TCP connections. If so, then reduce MSS until it stops. UDP packets will still be fragmented, but nothing can be done about that. On the trace, TCP is type 6 while UDP is type 17. Why doesn't the Trumpet Winsock disable DTR when it unloads itself? The Winsock is designed to be demand loaded by the application. When jumping in & out of different applications with the Winsock loading & unloading, going through a new login sequence for each invocation would be tedious. Some input commands in the script don't work. Check for upper case/lower case conflicts. Also check for blanks at the end of the lines. Try quoting the strings to be sure. 9 Glossary This section contains various bits and pieces that didnt seem to fit anywhere else. 9.1 Command line The inipath command line option can be used to override the inipath. This is useful if you want to use the Trumpet Winsock under a variety of situations. For example, you would require one configuration for a packet driver setup and one for a SLIP connection. Here is an example of its usage: tcpman -inipath=C:\winsock\dialup.ini Note: The entire path name must be given. The command line is accessible by high-lighting the Tcpman icon from the Program Manager and selecting File/Properties from the menu. 9.2 Crynwr packet driver collection;packet driver collection The Crynwr packet driver collection is a comprehensive collection of public domain packet drivers, and is available by mail, FTP, email, UUCP and modem. The drivers are distributed in three files: drivers.zip, which contains executables and documentation, drivers1.zip, which contains the first half of the .ASM files, and drivers2.zip, which contains the second half of the .ASM files. 9.3 Packet driver shims;ODIPKT;DIS_PKT;NDIS3PKT;ODI;NDIS ODI can only be used via the ODIPKT shim, and NDIS via the DIS_PKT shim. The odipkt, dis_pkt, and ndis3pkt shims are available by anonymous FTP and have directories dedicated to each of them at: ftp://hsdndev.harvard.edu/pub/ See Unsupported configurations for examples of how to use these. 9.4 Windows Sockets 1.1;Winsock For a full description of Windows Sockets, check out Microsofts Winsock page: http://www.microsoft.com/developer/winsock/ 9.5 WINPKT;winpkt.com WINPKT is a virtual packet driver interface for windows. The program WINPKT was written by some clever people on the Internet to allow a packet driver to work correctly within Windows by making sure that packets get directed to the correct virtual machine under Windows enhanced mode. It is included with our files as winpkt.com. 9.6 Trumpet files Here is a list of files written by Trumpet Software International Pty Ltd that included with the Trumpet Winsock package. winsock.dll The guts of the TCP/IP stack. This section does all the work, but takes its leads from tcpman.exe tcpman.exe;Tcpman The Tcpman is the part of the Trumpet Winsock that controls how the winsock.dll communicates with the Internet. It makes use of the trumpwsk.ini file to store its settings. trumpwsk.ini This file normally resides in the Winsock directory rather than the windows directory since this facilitates setting up the Winsock in a networked environment. See Command line if you wish to use more than one .ini file. Although editing the .ini file settings directly is not advised, experienced users may find it helpful to know about the following parameters: ip_buffers The number of buffers for internet frames.  pkt_buffers The number of buffers specifically for the packet driver.  slip_logging Takes a log of a dial up SLIP/PPPPPP session, and saves it as usage.log.  font Sets the font of the Tcpman display.  slip_rcvbuf Size of the outgoing comms ring buffer.  slip_sndbuf Size of the incoming comms ring buffer.   Some network parameters can be overridden by environment variables. They have the same names as the saved parameters in trumpwsk.ini. sendreg.exe The automatic registration program. See Registration via Internet for a description of how to use it. hosts List of host names. services List of Internet services. protocol List of Internet protocols. trumpwsk.hlptrumpwsk.hlp The Trumpet Winsock Help file was created from a Word for Windows document using Roger Hadgrafts very helpful macro, Doctor Help. Doctor Help translates any reasonable Word file into a Windows Help file (with the aid of the Help Compiler of course). For more information regarding Doctor Help, contact roger.hadgraft@eng.monash.edu.au. login.cmd A sample login script. Since everyones login sequence will be different, it will probably be necessary for you to write or modify a script. See Automating your login sequence for some tips on how to do this quickly. setup.cmd A short script that allows you to update your login phone number, username and password. This information is saved in your trumpwsk.ini file. bye.cmd A sample bye script. Tcpmeter;tcpmeter.exe Shows the network bandwidth. Incoming traffic is displayed across the top of the screen in green, and outgoing is across the bottom in red. Many thanks to Stephen Davies for providing the icon for Tcpmeter. Hop;trumphop.exe Provides a list of the gateways that are traversed by a packet on its way to a destination address. Dig;trumpdig.exe Provides information on a domain or address. Ping;trumping.exe Trumpet Ping is a diagnostic program that allows you to send test packets to a known host on the Internet. It is useful for checking your TCP/IP connection. 9.7 Definitions BOOTPBOOTP Bootstrap Protocol (BOOTP) is an alternative to RARPRARP that allows a machine to obtain its IP address, gateway address, and Netmask using UDP (User Datagram Protocol) and IP. Therefore, BOOTP can be used over a dial up SLIP/PPPPPP connection if required. CSLIP Van Jacobson Compressed SLIP (CSLIP) is a more efficient version of SLIP. Its main difference is that rather than attaching complete headers to each packet, CSLIP sends the differences between headers. Header compression is optional in PPPPPP. Firewall A firewall is broadly defined as anything that protects one network from another. Use of a firewall and a program such as Socks 4.2 can enable a computer to access the full resources of the Internet without actually existing on the Internet. It does this by having the public side of the firewall communicate to the Internet on behalf of any machines on the Local Area Network (LAN). Machines on the LAN speak to the local side of the firewall using TCP and know nothing about the full Internet. Socks bridges the gap between the two sides of the firewall. Here are some reasons why a LAN might use a firewall to connect to the Internet: Without a firewall your machines IP address (and name) can be seen by anybody else on the Internet. This information can be hidden by a firewall, since only the public side of the firewall is visible. Firewalls can free up space for IP addresses, as the public side of the firewall can represent the entire LAN with one IP address. As long as the machines on the LAN are only connected to the Internet through the firewall they can use any address. There are many official non-Internet addresses reserved for this purpose. The services that will be made available to users on the LAN can be regulated, as a program like Socks can choose what protocols to support. Packet driver A packet driver is a small piece of software which sits in between your network card and your TCP program. This provides a standard interface which many programs can use in a similar manner to BIOS calls using software interrupts. Why is it called a packet driver? This is because modern networks send information using packets of information rather than sending information one byte or character at a time. For example, Ethernet sends information in frames of up to 1514 bytes long. The reason for sending things in packets is that information can be transmitted much more efficiently in packets. Packet drivers are only allowed to have a software interrupt vector in the range 0x60 to 0x7F. Normally, you will pick 0x60 as the default place to install your packet driver, but certain machine configurations may make that vector unavailable. Just choose one that is free - the packet driver should tell you if you can use it or not. Public domain packet drivers are available from the Crynwr packet driver collection. PPPPPP Point to Point Protocol (PPP) is a more complicated version of SLIP that includes error detection, and optional compression. RARPRARP Reverse Address Resolution Protocol (RARP) is a low level Internet protocol used by diskless machines to obtain an IP address from a server over a physical network. An alternative to this scheme is BOOTPBOOTP. SLIP Serial Line Internet Protocol (SLIP) is a simple protocol which allows an Async serial connection to send Internet Protocol (IP). See PPPPPP. Socks 4.2 Socks is a program that permits communication across a firewall. For more information regarding Socks, see: ftp://ftp.nec.com/pub/security/socks.cstc/ Vector The 80x86 family of processors allows programs to communicate with the operating system through what is called a "software interrupt", which always has a number in the range 0 to 255. This is termed a "vector" and is the one of the key mechanisms to pass control to the MS-DOS operating system. Usually the vectors are expressed in hexadecimal, with the range 0x00 to 0xFF. The 0x in front of the number means that we are using hexadecimal numbers instead of decimal numbers. They may also be expressed in the notation 00H to FFH, or $00 to $FF. If you are dealing with packet drivers, hexadecimal notation is much more common, but occasionally they are expressed in decimal. Examples of software interrupts in use on PCs are 0x10 for the video BIOS, or 0x21 for calls to DOS. Virtual machine A virtual machine can be either the entire Windows session, or any DOS session active within Windows. Refer to the Windows system documentation for more details. 9.8 Unsupported configurations;NDIS;ODI Although we only support use of the existing Capabilities of the Trumpet Winsock, other configurations may be possible with some tweaking. The following examples demonstrate this. Choose the one which suits you the best and modify it to your requirements. Of prime importance is the need to make sure your network card IRQ, I/O address settings and shared memory addresses dont conflict with other cards in your computer. See the Trumpet Winsock FAQ. Ne2000 packet driver with Novell NetWare access using PKTMUX;NetWare;PKTMUX In this example, PKTMUX (which must be version 1.2c or later) is being used instead of WINPKT. ne2000 -n 0x60 2 0x300 pktmux 4 pktdrv pktdrv pktdrv pktdrv pdipx netx path c:\dos;c:\network\win31 f: login ODI setup with NetWare access;ODI;NetWare You will need ODIPKT. The latest known release is 2.4 It is important that ODIPKT reference the correct protocol for IP access. This can be specified as the first parameter to ODIPKT (0=1st, 1=2nd and so forth). See Packet driver shims. Here's an example network attach batch file: @echo off cd \ lh lsl lh \odi\ne2000 cd \net lh ipxodi lh odipkt lh WINPKT 0x69 lh netx path c:\dos;c:\net\win31 f: echo on login Also, your net.cfg must be suitably configured. For example: Link Support Buffers 8 1586 MemPool 16384 Link Driver NE2000 Port #1 300 20 Int #1 2 Frame Ethernet_II Frame Ethernet_802.3 Protocol IPX 0 Ethernet_802.3 The ordering of the frame protocols is important for the default setup of ODIPKT. Also, users should be aware that there are two versions of ODIPKT, one released by FTP Software, and the other, a public domain one. This example refers to the public domain version. Also note that there are two programs with the same name of ne2000.com. One is a packet driver and is referred to in an earlier section. The one referred to in this section is actually an ODI driver and won't function as a packet driver at all. Windows for Workgroups 3.11 Setup Courtesy of B. Armstrong and Douglas W. Jones. There is an automatic 3.11 installer available free of charge from our ftp server: ftp://ftp.trumpet.com.au/pub/winsock/wfwsetup/twswfwg.zip This is provided AS IS with no warranty and is for personal use only. It currently only supports NDIS2, not NDIS3. Cabletron Network Cards Courtesy of Ashok Aiyar (ashok@biochemistry.bioc.crwu.edu). The packet driver provided by Cabletron is a little confusing as it doesn't use the same parameters as packet-drivers that use the Crynwr skeleton. Typically the Cabletron driver is loaded as: csipd_e /s:62 /h:7 /p:300 In this example the software interrupt is 0x62. Load WINPKT as WINPKT 0x62 Release 11 of the Crynwr packet drivers includes a driver for Cabletron cards written by Kai Getrost using the Crynwr skeleton that uses the same parameters as the other Crynwr drivers. This driver (CTRONDNI.COM) seems to work well with E1020/1040 and E2020 Cabletron cards. Indeed I see a performance gain over the Cabletron driver. Your mileage may vary. C/SLIPPER with PKTMUX;PKTMUX Courtesy of Ashok Aiyar (ashok@biochemistry.bioc.crwu.edu). Although the Trumpet Winsock has built in support for C/SLIP, there are situations when in addition to Winsock applications there is a need to run packet driver applications simultaneously over a SLIP link. For such situations, PKTMUX is of utility. Example: CSLIPPER vec=65 com1 irq=04H baud=57600 ether PKTMUX 4 65 /4 .... (support for a maximum of 4 virtual packet drivers) PKTDRV 60 65 Configure the Trumpet Winsock to use the virtual packet driver at 0x60. All other virtual packet drivers (PKTDRV) can be loaded in the DOS Windows in which they are used. They need not be loaded before entering Windows. (Ed. Note... You may also require the use of a special comms buffer to enhance the buffering capabilities of Windows when using slipper/cslipper. It is not needed when using the internal SLIP functions of the Winsock) ODI with VLM Example: CD \NWCLIENT SET NWLANGUAGE=ENGLISH LH LSL SMC8000.COM LH IPXODI ODIPKT 1 96 WINPKT 0X60 VLM /MX CD \ Token ring Token ring may be available using either ODITRPKT or the ibmtoken packet driver, but is untested by TSI. 10 contactContact Details and Online Services The following services are intended to support our clients by providing the latest news as well as gathering feedback about our products. Our mailboxes are for questions that are not satisfactorily addressed by this document or our online services. Before writing, please check the Trumpet Winsock FAQ lists both in this document and at our WebWeb site. 10.1 webWorld Wide Web Not surprisingly, we have a Web site. Its URL is: http://www.trumpet.com.au/ Our Web site is particularly useful as a supplement to this document by being the most up-to-date source of information. It also allows us to provide information that would be too bulky for this document if given in full. 10.2 Technical support email addresses;email Before requesting technical support, please make sure youve searched through the FAQFAQ lists both in this document and at our WebWeb site. To help us diagnose your problem quickly, it is important that you send any relevant details. For example, if your problem involves a packet driver setup, please send copies of autoexec.bat, trumpwsk.ini, and any other relevant network configurations. Choose the right mailbox for your question carefully. Misplaced email may not be answered! reg-support@trumpet.com.au This is where registered users may send their technical questions. As a registered user you will have priority, but you must include your registered name at the start of your message.  winsock-support@trumpet.com.au Technical questions regarding the Trumpet Winsock.  newsreader-support@trumpet.com.au Technical questions regarding the Trumpet Newsreader.  10.3 General email addresses;email Choose the right mailbox for your question carefully. Misplaced email may not be answered! info@trumpet.com.au This is for general information about our products that isnt addressed by the other mailboxes. Typically this kind of information will be accessible from our WebWeb site; please look there first!  sales@trumpet.com.au Write here if you are interested in either registering your copy of one of our products, purchasing a site license, or negotiating a distribution agreement. Check our WebWeb site first for a current price list.  registrations@trumpet.com.au This is for following up registrations. Only write here if your query concerns an order in process.  trumpet-bugs@trumpet.com.au This is for informing us of bugs in our products. We don't normally reply to these directly, so if you want answers please write to one of the technical support addresses.  suggest@trumpet.com.au As we look for ways to improve our products, we'll refer to mail sent here. Don't expect a response though!  www-admin@trumpet.com.au Comments and queries about our Web site.  10.4 The trumpet.* newsgroups You can ask questions, or discuss any aspect of any Trumpet program through these Usenet newsgroups. Feedback is always welcome. If your providers newsroom doesnt receive these groups you can access them by pointing your newsreader at newsroom.trumpet.com.au. This site maintains the following private news groups: trumpet.announce trumpet.bugs trumpet.feedback trumpet.questions 10.5 FTPFTP and Gopher;gopher The latest copies of all our freely accessible software and pre-releases are available by anonymous FTP from ftp.trumpet.com.au. We have a Gopher site at gopher.trumpet.com.au. These sites can be particularly busy at times so please be patient if you are unable to connect. 10.6 phoneTelephone and fax numbers;fax Phone (Intl): +61 02 450220 Fax (Intl): +61 02 450210 Phone (Aus): (002) 450220 Fax (Aus): (002) 450210 10.7 postPostal address Trumpet Software International Pty Ltd GPO Box 1649 Hobart Tasmania 7001 AUSTRALIA 11 Registration Details Registration of the Trumpet Winsock is encouraged since it not only funds further development of the software, but also gives you a warm fuzzy feeling deep down inside. Furthermore, it allows you to keep using the Trumpet Winsock after 30 days. The basic registration fee for a single user version of the Trumpet Winsock is AUS$25 for Australian users and US$25 for international (non-Australian) users (valid until 31-Dec-95). See the price list for details on multi-user site licenses. As a registered user, you will receive support (within the existing Capabilities of the Trumpet Winsock) for up to 12 months from the date of purchase. Support will include any upgrades or bug fixes released within that 12 months. After 12 months, upgrades for previously registered users will cost 25% of the current registration fee per annum. Arrangements will also be made for conversion of smaller licenses to larger ones. 11.1 How to register Please fill out the order form in clear print and send it along with your payment/purchase order. We accept the following methods of payment: Automatic registration You may email your credit card details to us using the Registration via Internet feature of the Trumpet Winsock, which located under File/Register.  Credit card We accept Mastercard, VISA, Bankcard, American Express and Diners Club. Credit card details may be given by fax or phone. See Contact Detailsphone for our fax and phone numbers. Credit card details may only be emailed using the automatic Registration via Internet option.  Direct bank transfer If you are interested using this method, please contactcontact us for the necessary details.  Cheque Cheques should be drawn in favour of Trumpet Software International Pty Ltd and sent to our postal addresspost. All cheques from international users must be in US currency and drawn on US banks. If you need to draw a cheque on a non-US bank, please contact us first.  Purchase order We accept purchase orders for amounts over US$100.  Please note that we are unable to accept US money orders. 11.2 Price list All prices are in US dollars for international (non-Australian) users, and Australian dollars for Australian users. For example, a single license costs AUS$25 for Australian users and US$25 for everyone else. Prices valid until 31-Dec-1995. Single User License 1 user $25 Multi-user Site License 1-99 users $25 per user 100-499 users $2500 + $10 per additional user over 100 500-999 users $6500 + $5 per additional user over 500 1000-4999 users $9000 + $2 per additional user over 1000 5000-9999 users $17000 + $1 per additional user over 5000 10000-19999 users $22000 + $0.90 per additional user over 10000 20000-49999 users $31000 + $0.80 per additional user over 20000 50000-99999 users $55000 + $0.70 per additional user over 50000 Multi-user Educational Site License 1-100 users $25 per user 100+ users $2500 per campus A multi-user educational site license covers a single campus only. If more than one campus is to be covered, a multi-user site license costing structure with a 10% discount applies. This is restricted to students and staff using campus facilities. If dialling in off campus, students and staff must dial in through the school's services only. A site license is a license to a specific named organisation and may not be sub-licensed or assigned to anyone else. Copies of the Winsock software obtained under a site license may only be used by employees of the licensed organisation or, in the case of an educational organisation, by employees or students of the licensed organisation. Payment under a site license is based on the number of installed users. A site license cannot be used by an Internet Service Provider to provide Internet services for its clients. 11.3 DistribDistribution Rights Trumpet Software International Pty Ltd reserves all rights in the Winsock program, including the rights of publication and of distribution. The Winsock program may only be made available from FTP sites which have been approved by TSI for that purpose and may only be made available from those sites in the unmodified twsk21f.zip file distributed by TSI. All other forms of making the program available or of distribution (and all reproductions of the Winsock program in connection with such activities) are prohibited without TSIs express written agreement. TSI has a standard distribution agreement for use with its distributors and a standard scale of distribution charges. Please contact TSI at sales@trumpet.com.au for further information on TSIs distribution arrangements. 11.4 Order form ORDER FORM for Trumpet Winsock Version 2.1 Please print (or type) clearly in block capitals. Your order will not be processed if this form is not filled in correctly. Ship to: Bill to: [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] Please supply the following items: [ ] Single user license. [ ] Multi-user site licence for [_______] users. [ ] Multi-user educational site licence for [_______] users. Total cost (See Price list): [______________] Do you require a disk with the latest version of Trumpet Winsock? [ ] 3.5" disk. [ ] 5.25" disk. [ ] No disk required. How would you like to receive your password? [ ] Sent by post. [ ] Sent by email. Your registration name as will appear on the program (maximum 84 characters including spaces): [________________________________________________________] Your e-mail address (if applicable): [________________________________________________________] Phone number: Fax number: Country: [______________] [______________] [______________] Date sent: Expected delivery date: [______________] [______________] page 40 $vx}.Ann?:  &WordMicrosoft Word  , D-Times New Romanh- --,,,, ,   a  C aa(al9                                                                                                                               ''''-Word.Picture.6ࡱ; $J  !"#&'()*+,-./0123456789:;<=>?@ABCDEFGHIKRoot Entry F; `@PIC LMETA ?CompObjb L ࡱ;   FMicrosoft Word 6.0 Picture MSWordDocWord.Picture.6ࡱ;ࡱ;  Oh+'0   d   <`  G &WordMicrosoft Word  , D-Times New Romanh- --,,,, ,   a  C aa(al9                                                                                                                               ''''-ࡱ; ObjInfoObjectPool; `; `WordDocument%hISummaryInformation(ܥe3 ehIFjFjjFjFvFvFvFFFFFFF F FH1FFFFFFFFFFFF!FGuHHTIPHvFF!"FFFFHFjFjFFFFFFFjF FvFFFFFjFjFjFjFFFFF  .Apq2>: 1    a C aa(al9                                                                                                                               20(pࡱ; AuuD uDaK@Normala "A@"Default Paragraph Font A!"NA@TI microLaser PS35LPT2:PSCRIPTTI microLaser PS35 WD[ 5d, XZZeTI microLaser PS35 WD[ 5d, XZZe 1Times New Roman Symbol &Arial"hkkE!PTrumpet Software InternationalTrumpet Software Internationalࡱ; (C:\MSOFFICE\WINWORD\TEMPLATE\NORMAL.DOTTrumpet Software InternationalTrumpet Software International@~d9@@~d9@Microsoft Word 6.02ࡱ;  METAFILEPICT ?  &WordMicrosoft Word  , D-Times New Romanh- --,,,, ,   a  C aa(al9                                                                                                                               ''''--WYhPiPd@Zae ÿ   0$0$$$$$O= }$0H0; Z]qtsuz`b :<]_sut B!E!!!""         F"M#Q#l###$$+$-$T$V$$$$$$%%%%%%7&9&=&G&I&L&&&''D'H'''C(E(`(j(l(o((())A)G)I)K)))))**D*Q*S*U*******@+M+++++      H+++,,",&,K,;->--- ..=.?.....?/B///I0L0X0\0k0n0q0t000000/111_1g1i111 22S2U22222e3i333^4b444445555566t6v6666666    L666$7'7N7P7]7j7l7o77788_8b888899"99999::;;;;#;C;q;t;;;q<t<<<<<==>!>>>>e?h? @@@@@@@CCCC9D;D?DIDKDNDDDDDEE      LE:E>EEEHFJFdFoFqFtFFFG G[GaGcGeGGGGG(H*H^HkHmHoHHHHIIIZIgIIIIIJ JJ+J^r`rmrssstttttuu!uKuMuQu~uuuuuuuuuvvv/v1v5vhvjvnvvvvvvvww w:wwwwwwwwwwwxxxxxxCyEyKy_yeygymyyyyyyzbzzzz{{{           P{{ |!|#||||||||9}?}J}L}U}}}}}}}N~vx{1<\^dwyЀҀ܀57BVXcŁǁɁ́߁1ۂ݂ "'3Y[^n          N$0VZpل?C]_n NΆ!OQbLTVf =?NÒʒtvafnrʖ                     ?GIX'™ę"$) -@BWģǣɣأ'IK_ڥ<>Dacu                     <ަ7Hacҧԧܧ+-?UWqߨWǪɪ˪Ѫ XZa|ī$&Awȳ                C۵ݵxzԶֶ۶)\^lPRWڸܸ 04=lo~ڹܹ-/                     ;/:H /1[o˻ͻ+-F Dqsܽ޽y{}KW_akƿȿҿbd                  B-/UCEanr (GL "[                      8^`ac'$(46bM.0_BFT}X\{2SU;}                     <}%02 DFTEGvy=?ACJ_ak "-                     A*,/<>lnr $138?sw%(BDK<?BDNy{                       >35=KM^ )+2AC  : F H f  6     <AC\]x02GNPbdp cfnsv                    Cv9<gjp]TV[rxzvy' ) F    !z!|!!!!!!""##h#m#p#~####$"$7$$$$$$$1%6%:%            N:%J%%%%X)])n))****I+N++++,$,D,F,N,r,,,,\-^-n-------..//01A14444667778899i::::;G;p;;<4<r<<<<===== =&=(=*=F         N-/WYjl@b)ToPi/Pdq~@ZþBZm*>a * M e c  Zsg`Ŀ      3:]st={ B!!"M#l##$+$T$$$@%%%7&I&&''C(l(()I)))*S***+Ŀ~~~yt   -+",K,;-- .=...?//q000/1g11 2S222e33^4445556t666$7N7l778_8Ŀ~yyytojje  &_888999:;C;q;;q<<<=>>>>e? @@@sABB;CCC9DKDDEEHFqFFGcGGG(HmHHIĿ~yyyt   ,IIFVpxԐܐ!AITf )=NʒĿ      CʒtE'̕/ʖ9 GXƘ'ƙ")ǚWg~!-@WtǣأĿ~             1أ'\I_}ڥ<Dauަ7Hacsҧԧ֧Ŀ}wpj[Ul    l             ֧ܧ+-?UWlqߨWĽ||vpb\VHB l   l   l   l    l  l   ǪɪѪ Xa|ī)$A |+ȳNv۵xĿ~ytoje            l  'Զ۶)\lPW~ڸ0=~ڹ-H1Ŀ~ytoojee`                $1[o˻ͻ+-F Dqsܽ޽y{ysm_YSE l"  l"  l"  l"  l"  l"  l"  {_kƿҿb-UCanKj -Ŀ~yyyt         + ( [e#^a:'$4bXRĿ~yytoj              )M._BT[}XU;}2l DTĿ~ytooje                '3 EGU=?AAJ_kɹwrrmhhc^YTO    l l l l l l   -E pm*>l 1?BKBNyr6 Ŀ~y           .3=K^+C   H  8 f q w             6 D U e y         Ŀ          : <A\/]x0P  .9FS\bp nrĿ~yto               +rpTVz' ) F  ¼~xjd^PJD  l/ "  l/ "  l/ "  lf"  lf"  lf"     !z!|!!!!!e""##5#C#U#h## $:$$$$$%1%J%r%%%%%%&'(X)n))**̾}wq      l/ "  l/ "  l/ "'***+++D,F,N,,\-^-n-----...//7/o///0_0001"1?1A12̾{{vqlggggggggb]]]X      l"  l"  l"  l"  l""244677788889L99999*:i::::::;;G;[;p;;;<4<6<r<<<<<<="=$=&=yqqhh`  +&=(=*= Menu Dr HelpMenu Header Dr HelpList 3 Menu DR HelpMenu Header DR HelpmacroCodeList 4ListList 2Address Body TextBody Text IndentTitleOrder Form EntryList 5Order Form DescriptionTable List Bullet SignatureMessage HeadercaptionSubtitletable of authoritiestable of figures Instruction Instruction 2toc 9 Section LabelLicense Order form 3 License 2/"        $F  B     NT" (T" LT" pT"    T" x xx( 9r o# < <x (   7   Q & ` @   l : +x x x 7 <  &h<  n xx T" T"  x<77T"  < @      ;*=*=,*=C Tms Rmn `Symbol Helv 0CourierTimes New Roman Arial MS Serif MS Sans SerifTimes Helvetica System0Courier New WingdingsBook AntiquaMonotype Sorts0MS LineDraw PAlgerian Arial Rounded MT BoldBookman Old StylePBraggadocio Britannic Bold@Brush Script MT Century Gothic PColonna MT PDesdemonaFootlight MT Light Impact PKino MT Wide Latin@Matura MT Script Capitals PPlaybill @Calgary Copenhagen Portugal Atlanta Albertville Albertville Extrabold Antique OaklandPC BrusselsCleveland Condensed@Connecticut Guatemala0Letter Gothic @Maryland OklahomaPC Tennessee Utah Utah Condensed Bermuda Script @Germany PSan DiegoPUS AvantGarde Bookman Helvetica-NarrowNewCenturySchlbk Palatino@ZapfChanceryPZapfDingbats 0Modern @ScriptRoman MS Dialog9OQf>_;:9  ;!"   (_.RY)C:\MSOFFICE\WINWORD\TEMPLATE\TRUMPWSK.DOTTrumpet Winsock Help Rob Torok Rob Torok