home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / tcp / Networking / TCP / AmiTCP / AmiTCP-txt-20.lha / doc / usertext.txt < prev   
Text File  |  1993-08-13  |  145KB  |  4,064 lines

  1.  
  2.  
  3.  
  4.  
  5.                         AmiTCP/IP
  6.  
  7.  
  8.  
  9.                      System  Manual
  10.  
  11.  
  12.                              Revision: 2.4
  13.  
  14.  
  15.  
  16.                           amitcp-group@hut.fi
  17.  
  18.  
  19.  
  20. Tomi Ollila      Pekka Pessi      Markus Peuhkuri      Jarno  Rajahalme
  21.  
  22.  
  23.  
  24.                            August 13, 1993
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. Foreword
  33.  
  34.  
  35.  
  36. What  Is  AmiTCP/IP
  37.  
  38.  
  39. The Programming Project is a software engineering course here at Helsinki
  40. University of Technology.  A group of 3---4 students designs, implements
  41. and tests a complete working software system during this course.
  42.    Our purpose was to provide a free TCP/IP implementation for all Amiga
  43. users.  Lack of a standard networking interface was anirritating
  44. shortcoming of the Amiga systems.
  45.    AmiTCP/IPis a protocol stack implementing basic Internet protocols on
  46. top of any SANA-II network device driver(for Ethernet, SLIP, etc.).  The
  47. protocol stack offers the standard Berkeley Socket application program
  48. interface (API) to the TCP/IP protocolsimplemented as an Amiga shared
  49. library.
  50.    Using AmiTCP/IP and appropriate client program you can connect to any
  51. services available on your TCP/IP network.
  52.  
  53.  
  54.  
  55. How  Is  This  Achieved
  56.  
  57.  
  58. At first we planned to write the whole protocol stack from scratch.
  59. After examining standards about TCP/IP and bibliography about its
  60. implementations we become aware of the possibility of using the BSD NET/2
  61. code as a base of our work.  We discussed about the idea and found good
  62. reasons why the BSD code should be used.  Eventually wedecided to take
  63. that path with the project.
  64.    AmiTCP/IPis built around BSD NET/2 networking code.  Because the
  65. networking part of the BSD UNIX kernel is rather isolated, only a few
  66. kernel routines had to be rewritten to suit the architecture of the
  67. AmiTCP/IP.
  68.    SANA-II and shared library interfaces were added to the bottom and top
  69. of the modified NET/2 code, respectively.
  70.  
  71.  
  72.  
  73. Why Is the BSD Code Used
  74.  
  75.  
  76. Here are some of the pros of the decision:
  77.  
  78.  
  79.    fflWe don't need to reimplement the most complex part (and all the bugs)
  80.     of the system.
  81.  
  82.  
  83.  
  84.                                        i
  85.  
  86.  
  87.  
  88.  
  89.  
  90.    fflWe noticed that the BSD kernel support for the networking part is
  91.     easy enough to implement using powerful Amiga features.
  92.  
  93.    fflWhen improvements are done to the NET/2 code, we can improve
  94.     AmiTCP/IP by simply replacing the old code with the changed one.
  95.  
  96.    fflWe are offering the socket application interface.  It is the most
  97.     used interface in networking programs with TCP/IP. Using the NET/2
  98.     code makes it easy to implement the BSD socket related function call
  99.     interface as our API.
  100.  
  101.    fflWe can easily port crucial network utilities from the BSD.
  102.  
  103.  
  104.  
  105. About SANA-II
  106.  
  107. Bottom level interface to the SANA-II device drivers was an obvious
  108. choice.  SANA-II is the Amiga standard interface for network devices, and
  109. most manufacturers are shipping SANA-IIcompatible device drivers for
  110. their hardware.  There are also some freely distributable SANA-II drivers
  111. e.g.  for the standard serial interface.
  112.    Althoughthere may be few problems with different network types the
  113. AmiTCP/IP should be able to use all SANA-II device drivers which support
  114. IP.
  115.  
  116.  
  117.  
  118. Release 2.0
  119.  
  120. This release of AmiTCP/IP includes onlythe protocol stack (AmiTCP),
  121. test programs, basic network utilities and example client and servers.
  122. The distribution still lacks most basicclient and server programs.
  123.    The second release of the AmiTCP/IP contains some improvements and bug
  124. fixes over the first release.  It is incompatible withprevious version
  125. in binary level, however.  Old applications and the newlibrary DO NOT
  126. work together.  If you have an application compiled with previous version
  127. of AmiTCP/IP, it MUST be recompiled.  We hope that thisis the only
  128. downward incompatible release.
  129.    The AmiTCP/IP Group requests all users of the AmiTCP/IP to return any
  130. new applications or improved versions tothe AmiTCP/IP Group,
  131. <amitcp-group@hut.fi>, and grant it theright to redistribute them.
  132.  
  133.  
  134.  
  135.                                       ii
  136.  
  137.  
  138.  
  139.  
  140.  
  141. Acknowledgments
  142.  
  143.  
  144. We would like to thank
  145.  
  146.    fflComputer Systems Research Group from University of California,
  147.     Berkeley, for developing BSD Unix system.
  148.  
  149.    fflCarnegie Mellon University for Mach bsdss port of BSD Net/2.
  150.  
  151.    fflAntti Louko <alo@hut.fi>, our project supervisor, from the Computing
  152.     Centre of the Helsinki University of Technology.
  153.  
  154.    fflJukka Partanen <jtp@cs.hut.fi> for providing the GNU CC
  155.     cross-compiling environment for the Amiga in the HP 9000/700
  156.     workstations.
  157.  
  158.    fflTimo Rossi <trossi@jyu.fi> for providing the SANA-II drivers for
  159.     Western Digital Ethernet cards used in testing.
  160.  
  161.    Further on, Jarno and Markus would like to thank their wives Maarit and
  162. Katri for forgiving those late nights (or early mornings) that we spent
  163. with this project.
  164.  
  165.  
  166.  
  167.                                       iii
  168.  
  169.  
  170.  
  171.  
  172.  
  173.    AmiTCP/IPcontains material derived from BSD net/2 release.  The
  174. following acknowledgement should be included in all AmiTCP/IP
  175. distributions:
  176.  
  177.  
  178.    Copyright cfl1982, 1986, 1988, 1990 Regents of the University of
  179. California.  All rights reserved.
  180.    Redistribution and use in source and binary forms, with or without
  181. modification, are permitted provided that the following conditions are
  182. met:
  183.  
  184.  
  185.  1. Redistributions of source code must retain the above copyright
  186.     notice, this list of conditions and the following disclaimer.
  187.  
  188.  2. Redistributions in binary form must reproduce the above copyright
  189.     notice, this list of conditions and the following disclaimer in the
  190.     documentation and/or other materials provided with the distribution.
  191.  
  192.  3. All advertising materials mentioning features or use of this software
  193.     must display the following acknowledgment:  This product includes
  194.     software developed by the University of California, Berkeley and its
  195.     contributors.
  196.  
  197.  4. Neither the name of the University nor the names of its contributors
  198.     may be used to endorse or promote products derived from this software
  199.     without specific prior written permission.
  200.  
  201.  
  202.    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  203. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  204. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  205. PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
  206. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  207. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  208. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  209. INTERRUPTION) HOWEVER CAUSED AND ON ANYTHEORY OF LIABILITY, WHETHER IN
  210. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  211. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  212. THE POSSIBILITY OF SUCH DAMAGE.
  213.  
  214.  
  215.  
  216.                                       iv
  217.  
  218.  
  219.  
  220.  
  221.  
  222.    Some codeof the AmiTCP/IP originates from the BSDSS 4 by CMU, which
  223. is hereby acknowledged:
  224.  
  225.  
  226. Mach Operating System.
  227. Copyright cfl1992 Carnegie Mellon University.
  228. All Rights Reserved.
  229.  
  230.  
  231. Permission to use, copy, modify and distribute this software and its
  232. documentation is hereby granted, provided that both the copyright notice
  233. and this permission notice appear in allcopies of the software,
  234. derivative works or modified versions, and any portions thereof, and that
  235. both notices appear in supporting documentation.
  236.  
  237.  
  238. CARNEGIE MELLON ALLOWS FREE USE OF THISSOFTWARE IN ITS "AS IS"
  239. CONDITION. CARNEGIE MELLON DISCLAIMS ANYLIABILITY OF ANY KIND FOR ANY
  240. DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  241.  
  242.  
  243. Carnegie Mellon requests users of this software to return to
  244.  
  245.  
  246. Software Distribution Coordinator
  247. School of Computer Science
  248. Carnegie Mellon University
  249. Pittsburgh PA 15213-3890
  250.  
  251.  
  252. or Software.Distribution@CS.CMU.EDU
  253.  
  254.  
  255. any improvements or extensions that theymake and grant Carnegie Mellon
  256. the rights to redistribute these changes.
  257.  
  258.  
  259.  
  260.                                        v
  261.  
  262.  
  263.  
  264.  
  265.  
  266. vi
  267.  
  268.  
  269.  
  270.  
  271.  
  272. About  This  Manual
  273.  
  274.  
  275. How This Manual Is Organized
  276.  
  277. We have tried to organize this manual sothat you are not forced to read
  278. material that you are not interested in.  In order to achieve this we
  279. have divided the text into following chapters:
  280.  
  281.  
  282.  1. User's Manual gives you basic information about using the AmiTCP/IP
  283.     system.  Descriptions about our debugging tools qwriter and
  284.     agnet.device is also included here.
  285.  
  286.  
  287.  2. Interfaces describes briefly all external interfaces of the
  288.     AmiTCP/IP.
  289.  
  290.  
  291.  3. Programmer's Manual gives you the needed information to use
  292.     AmiTCP/IP to make your own network-aware programs.
  293.  
  294.  
  295.  4. Internal Description gives you information about the internal
  296.     structure of the AmiTCP/IP-system.  This is meant for all of you who
  297.     are interested in the internal design of the AmiTCP/IP.
  298.  
  299.  
  300.  5. Implementation Notes is written for those of you who are going to
  301.     maintain AmiTCP/IP or plan to develop it further.
  302.  
  303.  
  304.    There arealso two appendices, the user and programmer reference
  305. guides.  These appendices are in the AutoDoc format andthey are also
  306. available in machine readable form.
  307.    If you have trouble understanding the jargon1  or TLAs1  refer to the
  308. glossary at the end of this manual.
  309.  
  310.  
  311.  
  312. Typographical Conventions
  313.  
  314. To help you to understand the text in this manual, following typefaces
  315. and punctuation are used:
  316.  
  317.  
  318.      Roman   is the basic typeface used throughout the text.
  319.  
  320.  
  321.    Slanted   is used in text which we want youto take special attention
  322.              on.
  323.  
  324.  
  325.    Italics   is used to introduce new terms and concepts which will be
  326.              explained shortly.  Italics is also used to refer to the
  327.              names of the publications and tothe sections of this manual.
  328.  
  329.  
  330. Typed Text   is used for literal program codeand items specific to the
  331.              implementation, such as functionnames, identifiers and C
  332.              language keywords.
  333.  
  334.  
  335.       Bold   text is used to refer to specificfiles and command names
  336.              used by AmiTCP/IP.
  337. ________________________________
  338.    1See glossary.
  339.  
  340.  
  341.  
  342.                                       vii
  343.  
  344.  
  345.  
  346.  
  347.  
  348. Syntax Conventions
  349.  
  350. There are few syntactic conventions usedin this manual:
  351.  
  352.  
  353.        [:::] Square brackets are used for bibliographical references, list
  354.              of which can be found from the end of this manual.
  355.  
  356.  hargumenti  User supplied required argumentsare printed between angle
  357.              brackets.
  358.  
  359. [argument]   User supplied optional argumentsare printed between square
  360.              brackets.
  361.  
  362. function()   C function names are followed bya pair of parenthesis.  The
  363.              preprocessor macros---as opposedto the genuine
  364.              functions---are in upper case.
  365.  
  366.  
  367.  
  368.                                      viii
  369.  
  370.  
  371.  
  372.  
  373.  
  374. GNU  GENERAL  PUBLIC  LICENSE
  375.  
  376.  
  377.                              Version 2, June 1991
  378.  
  379. Copyright (C) 1989, 1991 Free Software Foundation, Inc.  675 Mass Ave,
  380. Cambridge, MA 02139, USA
  381.  
  382.    Everyoneis permitted to copy and distribute verbatim copies of this
  383. license document, but changing it is notallowed.
  384.  
  385.  
  386.  
  387. Preamble
  388.  
  389.  
  390. The licenses for most software are designed to take away your freedom to
  391. share and change it.  By contrast, the GNU General Public License is
  392. intended to guarantee your freedom to share and change free software---to
  393. make sure the software is free for all its users.   This General Public
  394. License applies to most of the Free Software Foundation's software and to
  395. any other program whose authors commit to using it.   (Some other Free
  396. Software Foundation software is coveredby the GNU Library General Public
  397. License instead.)  You can apply it to your programs, too.
  398.  
  399.    When we speak of free software, we are referring to freedom, not price.
  400. Our General Public Licenses are designedto make sure that you have the
  401. freedom to distribute copies of free software (and charge for this
  402. service if you wish), that you receive source code or can get it if you
  403. want it, that you can change the software or use pieces of it in new free
  404. programs; and that you know you can do these things.
  405.  
  406.    To protect your rights, we need to make restrictions that forbid anyone
  407. to deny you these rights or to ask you to surrender the rights.  These
  408. restrictions translate to certain responsibilities for you if you
  409. distribute copies of the software, or ifyou modify it.
  410.  
  411.    For example, if you distribute copies of such a program, whether gratis
  412. or for a fee, you must give the recipients all the rights that you have.
  413. You must make sure that they, too, receive or can get the source code.
  414. And you must show them these terms so they know their rights.
  415.  
  416.    We protect your rights with two steps:  (1) copyright the software, and
  417. (2) offer you this license which gives you legal permission to copy,
  418. distribute and/or modify the software.
  419.  
  420.    Also, foreach author's protection and ours, we want to make certain
  421. that everyone understands that there isno warranty for this free
  422. software.  If the software is modified by someone elseand passed on, we
  423. want its recipients to know that what they have is not the original, so
  424. that any problems introduced by others will not reflect on the original
  425. authors' reputations.
  426.  
  427.    Finally,any free program is threatened constantly by software patents.
  428. We wish to avoid the danger that redistributors of a free program will
  429. individually obtain patent licenses, ineffect making the program
  430. proprietary.  To prevent this, we have made it clear that any patent must
  431. be licensed for everyone's free use or not licensed at all.
  432.  
  433.    The precise terms and conditions for copying, distribution and
  434. modification follow.
  435.  
  436.  
  437.  
  438.                                       ix
  439.  
  440.  
  441.  
  442.  
  443.  
  444. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  445.  
  446.  1. This License applies to any program or other work which contains a
  447.     notice placed by the copyright holder saying it may be distributed
  448.     under the terms of this General Public License.  The ``Program'',
  449.     below, refers to any such program or work, and a ``work based on the
  450.     Program'' means either the Program or any derivative work under
  451.     copyright law:  that is to say, a work containing the Program or a
  452.     portion of it, either verbatim or with modifications and/or
  453.     translated into another language.  (Hereinafter, translation is
  454.     included without limitation in the term ``modification''.)  Each
  455.     licensee is addressed as ``you''.
  456.  
  457.     Activities other than copying, distribution and modification are not
  458.     covered by this License; they are outside its scope.  The act of
  459.     running the Program is not restricted, and the output from the
  460.     Program is covered only if its contents constitute a work based on
  461.     the Program (independent of having been made by running the Program).
  462.     Whether that is true depends on what the Program does.
  463.  
  464.  2. You may copy and distribute verbatim copies of the Program's source
  465.     code as you receive it, in any medium, provided that you
  466.     conspicuously and appropriately publish on each copy an appropriate
  467.     copyright notice and disclaimer of warranty; keep intact all the
  468.     notices that refer to this License and to the absence of any
  469.     warranty; and give any other recipients of the Program a copy of this
  470.     License along with the Program.
  471.  
  472.     You may charge a fee for the physical act of transferring a copy, and
  473.     you may at your option offer warranty protection in exchange for a
  474.     fee.
  475.  
  476.  3. You may modify your copy or copies of the Program or any portion of
  477.     it, thus forming a work based on the Program, and copy and distribute
  478.     such modifications or work under the terms of Section 1 above,
  479.     provided that you also meet all of these conditions:
  480.  
  481.     (a) You must cause the modified files to carry prominent notices
  482.         stating that you changed the files and the date of anychange.
  483.  
  484.     (b) You must cause any work that you distribute or publish,that in
  485.         whole or in part contains or is derived from the Program or any
  486.         part thereof, to be licensed as a whole at no charge toall third
  487.         parties under the terms of this License.
  488.  
  489.     (c) if the modified program normally reads commands interactively
  490.         when run, you must cause it, when started running for such
  491.         interactive use in the most ordinary way, to print or display an
  492.         announcement including an appropriate copyright noticeand a
  493.         notice that there is no warranty (or else, saying thatyou
  494.         provide a warranty) and that users may redistribute theprogram
  495.         under these conditions, and telling the user how to view a copy
  496.         of this License.  (Exception:  if the Program itself is
  497.         interactive but does not normally print such an announcement,
  498.         your work based on the Program is not required to printan
  499.         announcement.)
  500.  
  501.  
  502.  
  503.                                        x
  504.  
  505.  
  506.  
  507.  
  508.  
  509.    These requirements apply to the modified work as a whole.  If
  510.    identifiable sections of that work are not derived from the Program,
  511.    and can be reasonably considered independent and separate works in
  512.    themselves, then this License, and its terms, do not apply to those
  513.    sections when you distribute them as separate works.  But when you
  514.    distribute the same sections as part of a whole which is a work based
  515.    on the Program, the distribution of the whole must be on the terms of
  516.    this License, whose permissions for other licensees extend to the
  517.    entire whole, and thus to each and every part regardless of who wrote
  518.    it.
  519.  
  520.    Thus, it is not the intent of this section to claim rights or contest
  521.    your rights to work written entirely by you; rather, the intent is to
  522.    exercise the right to control the distribution of derivative or
  523.    collective works based on the Program.
  524.  
  525.    In addition, mere aggregation of another work not based on the
  526.    Program with the Program (or with a work based on the Program) on a
  527.    volume of a storage or distribution medium does not bring the other
  528.    work under the scope of this License.
  529.  
  530.  
  531. 4. You may copy and distribute the Program (or a work based on it, under
  532.    Section 2) in object code or executable form under the terms of
  533.    Sections 1 and 2 above provided that you also do one of the
  534.    following:
  535.  
  536.  
  537.    (a) Accompany it with the complete corresponding machine-readable
  538.        source code, which must be distributed under the termsof
  539.        Sections 1 and 2 above on a medium customarily used forsoftware
  540.        interchange; or,
  541.  
  542.    (b) Accompany it with a written offer, valid for at least three
  543.        years, to give any third party, for a charge no more than your
  544.        cost of physically performing source distribution, a complete
  545.        machine-readable copy of the corresponding source code,to be
  546.        distributed under the terms of Sections 1 and 2 above on a medium
  547.        customarily used for software interchange; or,
  548.  
  549.    (c) Accompany it with the information you received as to the offer to
  550.        distribute corresponding source code.  (This alternative is
  551.        allowed only for noncommercial distribution and only ifyou
  552.        received the program in object code or executable formwith such
  553.        an offer, in accord with Subsection b above.)
  554.  
  555.  
  556.    The source code for a work means the preferred form of the work for
  557.    making modifications to it.  For an executable work, complete source
  558.    code means all the source code for all modules it contains, plus any
  559.    associated interface definition files, plus the scripts used to
  560.    control compilation and installation of the executable.  However, as
  561.    a special exception, the source code distributed need not include
  562.    anything that is normally distributed (in either source or binary
  563.    form) with the major components (compiler, kernel, and so on) of the
  564.    operating system on which the executable runs, unless that component
  565.    itself accompanies the executable.
  566.  
  567.  
  568.  
  569.                                      xi
  570.  
  571.  
  572.  
  573.  
  574.  
  575.    If distribution of executable or object code is made by offering
  576.    access to copy from a designated place, then offering equivalent
  577.    access to copy the source code from the same place counts as
  578.    distribution of the source code, even though third parties are not
  579.    compelled to copy the source along with the object code.
  580.  
  581. 5. You may not copy, modify, sublicense, or distribute the Program
  582.    except as expressly provided under this License.  Any attempt
  583.    otherwise to copy, modify, sublicense or distribute the Program is
  584.    void, and will automatically terminate your rights under this
  585.    License.  However, parties who have received copies, or rights, from
  586.    you under this License will not have their licenses terminated so
  587.    long as such parties remain in full compliance.
  588.  
  589. 6. You are not required to accept this License, since you have not
  590.    signed it.  However, nothing else grants you permission to modify or
  591.    distribute the Program or its derivative works.  These actions are
  592.    prohibited by law if you do not accept this License.  Therefore, by
  593.    modifying or distributing the Program (or any work based on the
  594.    Program), you indicate your acceptance of this License to do so, and
  595.    all its terms and conditions for copying, distributing or modifying
  596.    the Program or works based on it.
  597.  
  598. 7. Each time you redistribute the Program (or any work based on the
  599.    Program), the recipient automatically receives a license from the
  600.    original licensor to copy, distribute or modify the Program subject
  601.    to these terms and conditions.  You may not impose any further
  602.    restrictions on the recipients' exercise of the rights granted
  603.    herein.  You are not responsible for enforcing compliance by third
  604.    parties to this License.
  605.  
  606. 8. If, as a consequence of a court judgment or allegation of patent
  607.    infringement or for any other reason (not limited to patent issues),
  608.    conditions are imposed on you (whether by court order, agreement or
  609.    otherwise) that contradict the conditions of this License, they do
  610.    not excuse you from the conditions of this License.  If you cannot
  611.    distribute so as to satisfy simultaneously your obligations under
  612.    this License and any other pertinent obligations, then as a
  613.    consequence you may not distribute the Program at all.  For example,
  614.    if a patent license would not permit royalty-free redistribution of
  615.    the Program by all those who receive copies directly or indirectly
  616.    through you, then the only way you could satisfy both it and this License
  617.    would be to refrain entirely from distribution of the Program.
  618.  
  619.    If any portion of this section is held invalid or unenforceable under
  620.    any particular circumstance, the balance of the section is intended
  621.    to apply and the section as a whole is intended to apply in other
  622.    circumstances.
  623.  
  624.    It is not the purpose of this section to induce you to infringe any
  625.    patents or other property right claims or to contest validity of any
  626.    such claims; this section has the sole purpose of protecting the
  627.    integrity of the free software distribution system, which is
  628.    implemented by public license practices.  Many people have made
  629.  
  630.  
  631.  
  632.                                      xii
  633.  
  634.  
  635.  
  636.  
  637.  
  638.     generous contributions to the wide range of software distributed
  639.     through that system in reliance on consistent application of that
  640.     system; it is up to the author/donor to decide if he or she is
  641.     willing to distribute software through any other system and a
  642.     licensee cannot impose that choice.
  643.  
  644.     This section is intended to make thoroughly clear what is believed to
  645.     be a consequence of the rest of this License.
  646.  
  647.  9. If the distribution and/or use of the Program is restricted in
  648.     certain countries either by patents or by copyrighted interfaces, the
  649.     original copyright holder who places the Program under this License
  650.     may add an explicit geographical distribution limitation excluding
  651.     those countries, so that distribution is permitted only in or among
  652.     countries not thus excluded.  In such case, this License incorporates
  653.     the limitation as if written in the body of this License.
  654.  
  655. 10. The Free Software Foundation may publish revised and/or new versions
  656.     of the General Public License from time to time.  Such new versions
  657.     will be similar in spirit to the present version, but may differ in
  658.     detail to address new problems or concerns.
  659.  
  660.     Each version is given a distinguishing version number.  If the
  661.     Program specifies a version number of this License which applies to
  662.     it and ``any later version'', you have the option of following the
  663.     terms and conditions either of that version or of any later version
  664.     published by the Free Software Foundation.  If the Program does not
  665.     specify a version number of this License, you may choose any version
  666.     ever published by the Free Software Foundation.
  667.  
  668. 11. If you wish to incorporate parts of the Program into other free
  669.     programs whose distribution conditions are different, write to the
  670.     author to ask for permission.  For software which is copyrighted by
  671.     the Free Software Foundation, write to the Free Software Foundation;
  672.     we sometimes make exceptions for this.  Our decision will be guided
  673.     by the two goals of preserving the free status of all derivatives of
  674.     our free software and of promoting the sharing and reuse of software
  675.     generally.
  676.  
  677.  
  678.  
  679.                                NO  WARRANTY
  680.  
  681. 12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  682.     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
  683.     WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
  684.     PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND,
  685.     EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
  686.     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  687.     PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  688.     PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
  689.     THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
  690.  
  691. 13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  692.     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  693.     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
  694.  
  695.  
  696.  
  697.                                      xiii
  698.  
  699.  
  700.  
  701.  
  702.  
  703.     DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
  704.     DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
  705.     (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
  706.     INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE
  707.     OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
  708.     HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
  709.     DAMAGES.
  710.  
  711.  
  712.  
  713. END OF TERMS AND CONDITIONS
  714.  
  715.  
  716.  
  717.                                       xiv
  718.  
  719.  
  720.  
  721.  
  722.  
  723. Contents
  724.  
  725.  
  726.  
  727. 1  User's Manual                                                             1
  728.    1.1  Installation : : : : : : : : : : : : : : : : : : :: : : : : : : : : : :*
  729.  * : : : : : : :   1
  730.         1.1.1  Using the SLIP Drivers: : : : : : : : : : : : : : : : : : : : : *
  731.  *: : : :   2
  732.                Common Problems with the SLIP Driver And AmiTCP/IP : : : :   2
  733.    1.2  Configuration : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  734.  * : : : :: : :    3
  735.         1.2.1  Options : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  736.  * : : : : : : :   4
  737.         1.2.2  Network Database : : : : : : : : : : : : : : : : : : : : : : : :*
  738.  * : : : : :   4
  739.    1.3  Internet Addressing : : : : : :: : : : : : : : : : : : : : : : : : : : *
  740.  *: : : : : :   4
  741.         1.3.1  Internet Dot Notation : : : : : : : : : : : : : : : : : : : : : *
  742.  *: : : :   5
  743.         1.3.2  Nets and Routing : : : : : : : : : : : : : : : : : : : : : : : :*
  744.  * : :: : :    5
  745.         1.3.3  Subnets : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  746.  * : : : : : : :   6
  747.         1.3.4  Broadcast Addresses : : : : : : : : : : : : : :: : : : : : : : :*
  748.  * : : : :   6
  749.    1.4  Utilities : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  750.  * : : : :: : : :   7
  751.         1.4.1  arp : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  752.  * : : : : : : : :   7
  753.         1.4.2  ifconfig : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  754.  *: : : : : : :   7
  755.         1.4.3  letnet: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  756.  *: : : : : : : :   8
  757.         1.4.4  netstat : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  758.  * : : : : : : :   8
  759.         1.4.5  NapsaTerm  : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  760.  *: : : : : : :   8
  761.         1.4.6  offline : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  762.  * : : : : : : :   9
  763.         1.4.7  online: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  764.  *: : : : : : : :   9
  765.         1.4.8  route  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  766.  *: : : : : : : :   9
  767.    1.5  Errors and Logging  : : : : : :: : : : : : : : : : : : : : : : : : : : *
  768.  *: : : : : :   9
  769.    1.6  Troubleshooting : : : :: : : : : : : : : : : : : : : : : : : : : : : : *
  770.  *: : : : : : :  10
  771.    1.7  Testing Utilities : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  772.  * : : : : : :  10
  773.         1.7.1  Agnet  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  774.  *: : : : : : : :  10
  775.                ARexx Port for agnet.device : : : : : : : :: : : : : : : : : : :*
  776.  * : :  11
  777.         1.7.2  Qwriter : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  778.  * : : : : : : :  13
  779.                Command Line Options : : : : : : : : : : : : : : : : : : : : : :*
  780.  * : :: :  13
  781.  
  782.  
  783. 2  Interfaces                                                               15
  784.    2.1  AmiTCP/IP Processes : : : : : :: : : : : : : : : : : : : : : : : : : : *
  785.  *: : : : : :  15
  786.    2.2  Application Interface : : : : : : : : : : : : : : : : : : : : : : : : :*
  787.  * : : : : :  16
  788.    2.3  SANA-II Interface : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  789.  * : : : : : :  16
  790.         2.3.1  Interface ioctls : : : : : : : : : : : : : : : : : : : : : : : :*
  791.  * : : : : :  17
  792.    2.4  Configuration Files : : : : : :: : : : : : : : : : : : : : : : : : : : *
  793.  *: : : : : :  17
  794.    2.5  ARexx Interface : : : : : : :: : : : : : : : : : : : : : : : : : : : : *
  795.  *: : : : : : :  17
  796.         2.5.1  Commands : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  797.  *: : : : : : :  18
  798.         2.5.2  Variables  : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  799.  *: : : : : : :  19
  800.                Boolean variables  : : :: : : : : : : : : : : : : : : : : : : : *
  801.  *: : : : :  23
  802.  
  803.  
  804.  
  805.                                       xv
  806.  
  807.  
  808.  
  809.  
  810.  
  811.                CONNECTIONS output format : : : : : : : : : : : : : : : : : : : *
  812.  *: : :  24
  813.                ICMPHIST output format: : : : : : : : : : : : : : : : : : : : : *
  814.  *: : : :  24
  815.  
  816.  
  817. 3  Programmer's Manual                                                     27
  818.    3.1  Socket Concepts : : : : : : :: : : : : : : : : : : : : : : : : : : : : *
  819.  *: : : : : : :  27
  820.         3.1.1  Socket Types : : : : : : : : : : : : : : : : : : : : : : : : : :*
  821.  * : : : : ::  27
  822.         3.1.2  Using The Socket Library : : : : : : : : : : : : : : : : : : : :*
  823.  * : : :  28
  824.         3.1.3  Compiling and Linking The Applications: : : : : : : : : : : : : *
  825.  * 30
  826.                The NETINCLUDE Header Files : : : : : : : :: : : : : : : : : : :*
  827.  * : :  30
  828.                Linking With net.lib : : : : : : : : : : : : : : : : : : : : : :*
  829.  * : :: :  32
  830.         3.1.4  Socket Creation : : : : : : : : : : : : : : :: : : : : : : : : :*
  831.  * : : : : :  32
  832.         3.1.5  Binding Local Names : : : : : : : : : :: : : : : : : : : : : : :*
  833.  * : : : :  33
  834.         3.1.6  Connection Establishment : : : : : : : : : : : : : : : : : : : :*
  835.  * : : :  34
  836.         3.1.7  Data Transfer  : : : : :: : : : : : : : : : : : : : : : : : : : *
  837.  *: : : : : :  36
  838.         3.1.8  Discarding Sockets: : : : : : : : : : : : : : : : : : : : : : : *
  839.  *: : : : :  36
  840.         3.1.9  Connectionless Sockets: : : : : : : : : : : : : : : : : : : : : *
  841.  *: : : :  37
  842.         3.1.10 Input/Output Multiplexing  :: : : : : : : : : : : : : : : : : : *
  843.  *: : :  38
  844.    3.2  Network Library Routines : : : : : : : : : : : : : : :: : : : : : : : :*
  845.  * : : : :  40
  846.         3.2.1  Host Names : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  847.  *: : : : : : :  40
  848.         3.2.2  Network Names  : : : : :: : : : : : : : : : : : : : : : : : : : *
  849.  *: : : : : :  41
  850.         3.2.3  Protocol Names :: : : : : : : : : : : : : : : : : : : : : : : : *
  851.  *: : : : : :  41
  852.         3.2.4  Service Names  : : : : :: : : : : : : : : : : : : : : : : : : : *
  853.  *: : : : : :  42
  854.         3.2.5  Miscellaneous  :: : : : : : : : : : : : : : : : : : : : : : : : *
  855.  *: : : : : :  42
  856.                Remote Login Client Code : : : : : : : : : : : : : : : : : : : :*
  857.  * : : :  42
  858.    3.3  Client/Server Model : : : : : :: : : : : : : : : : : : : : : : : : : : *
  859.  *: : : : : :  44
  860.         3.3.1  Servers : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  861.  * : : : : : : :  45
  862.         3.3.2  Clients : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  863.  * : : : : : : :  47
  864.         3.3.3  Connectionless Servers: : : : : : : : : : : : : : : : : : : : : *
  865.  *: : : :  48
  866.                Ruptime Output :: : : : : : : : : : : : : : : : : : : : : : : : *
  867.  *: : : : : :  48
  868.    3.4  Advanced Topics : : : : : : :: : : : : : : : : : : : : : : : : : : : : *
  869.  *: : : : : : :  51
  870.         3.4.1  Out Of Band Data : : : : : : : : : : : : : : : : : : : : : : : :*
  871.  * : :: : :  51
  872.         3.4.2  Non-Blocking Sockets : : : : : : : : : : : : : : : : : : : : : :*
  873.  * : : : :  53
  874.         3.4.3  Signal Driven Socket I/O : : : : : : : : : : : : : : : : : : : :*
  875.  * : : :  54
  876.         3.4.4  Selecting Specific Protocols : : : : : : : : : : : : : : : : : :*
  877.  * : :  55
  878.         3.4.5  Address Binding : : : : : : : : : : : : : : :: : : : : : : : : :*
  879.  * : : : : :  55
  880.         3.4.6  Broadcasting And Determining Network Configuration : : : :  58
  881.                AmiTCP/IP specific extensions : : : : : : : : : : : : : : : : : *
  882.  *: :  60
  883.                Extensions to interface ioctls: : : : : : : : : : : : : : : : : *
  884.  *: :  60
  885.         3.4.7  Socket Options :: : : : : : : : : : : : : : : : : : : : : : : : *
  886.  *: : : : : :  61
  887.         3.4.8  Inetd  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  888.  *: : : : : : : :  62
  889.    3.5  Deviation From Berkeley Sockets: : : : : : : : : : : : : : : : : : : : *
  890.  *: : :  63
  891.         3.5.1  Opening and Closing the Shared Library: : : : : : : : : : : : : *
  892.  * 63
  893.         3.5.2  Naming Conventions of the API Functions : : :: : : : : : : : :  *
  894.  *63
  895.         3.5.3  errno  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  896.  *: : : : : : : :  64
  897.         3.5.4  New Field in the sockaddr Structures : : : : : : : : : : : : : :*
  898.  *  64
  899.         3.5.5  Linger Time : : : : : : : : : : : : : : : : :: : : : : : : : : :*
  900.  * : : : : : :  64
  901.         3.5.6  Transferring Sockets from a Task to Another : :: : : : : : :  64
  902.         3.5.7  Ioctl Differences  : : :: : : : : : : : : : : : : : : : : : : : *
  903.  *: : : : :  65
  904.         3.5.8  Signal Handling : : : : : : : : : : : : : : :: : : : : : : : : :*
  905.  * : : : : :  65
  906.         3.5.9  Asynchronous I/O : : : : : : : : : : : : : : : : : : : : : : : :*
  907.  * : : : : :  66
  908.         3.5.10 Constructing an Event Loop: : : : : : : : : : : : : : : : : : : *
  909.  *: : :  66
  910.  
  911.  
  912.  
  913.                                       xvi
  914.  
  915.  
  916.  
  917.  
  918.  
  919.         3.5.11 ''Killing'' the Processes : : : : : : : : : : : : : : : : : : : *
  920.  *: : :  67
  921.         3.5.12 WaitSelect() : : : : : : : : : : : : : : : : : : : : : : : : : :*
  922.  * :: : : : :  67
  923.  
  924.  
  925. 4  Internal Description                                                    69
  926.    4.1  Source File Structure : : : : : : : : : : : : : : : : : : : : : : : : :*
  927.  * : : : : :  69
  928.         4.1.1  System Include Files : : : : : : : : : : : : : : : : : : : : : :*
  929.  * : :: :  69
  930.         4.1.2  Protocol Independent Network Routines : : : : : : : : : : : : : *
  931.  * 70
  932.         4.1.3  Internet Protocol Modules : : : : : : : : : : : : : : : : : : : *
  933.  *: : :  71
  934.         4.1.4  BSD Kernel Service Modules: : : : : : : : : : : : : : : : : : : *
  935.  *: : :  72
  936.         4.1.5  BSD Socket API: : : : : : : : : : : : : : : : : : : : : : : : : *
  937.  *: : : : : :  73
  938.         4.1.6  Miscellaneous Files : : : : : : : : : : : : : :: : : : : : : : :*
  939.  * : : : :  75
  940.    4.2  AmiTCP/IP Initialization : : : : : : : : : : : : : : : : : : :: : : : :*
  941.  * : : : :  75
  942.         4.2.1  init_all() : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  943.  *: : : : : : :  76
  944.         4.2.2  deinit_all() : : : : : : : : : : : : : : : : : : : : : : : : : :*
  945.  * : : : : ::  77
  946.    4.3  The Main Module : : : :: : : : : : : : : : : : : : : : : : : : : : : : *
  947.  *: : : : : : :  77
  948.    4.4  Protocol Entities : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  949.  * : : : : : :  78
  950.    4.5  Memory Management : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  951.  * : : : : : :  79
  952.         4.5.1  Mbuf Functions :: : : : : : : : : : : : : : : : : : : : : : : : *
  953.  *: : : : : :  79
  954.    4.6  Concurrency Control : : : : : :: : : : : : : : : : : : : : : : : : : : *
  955.  *: : : : : :  82
  956.    4.7  Network Device Drivers  : : : : :: : : : : : : : : : : : : : : : : : : *
  957.  *: : : : :  83
  958.         4.7.1  SANA-II Soft Network Interface: : : : : : : : : : : : : : : : : *
  959.  *: :  84
  960.         4.7.2  ARP : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  961.  * : : : : : : : :  87
  962.    4.8  Logging : : : : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  963.  *: : : : : : : : :  88
  964.    4.9  ARexx Interface : : : : : : :: : : : : : : : : : : : : : : : : : : : : *
  965.  *: : : : : : :  89
  966.    4.10 Application Interface Concepts  : :: : : : : : : : : : : : : : : : : : *
  967.  *: : :  90
  968.         4.10.1 SocketBase -- an Extension of the Task Structure  : : : : :  90
  969.         4.10.2 The System Call Semaphore and Task Priorities : : : : : : :  90
  970.    4.11 Configuration Variables : : : : :: : : : : : : : : : : : : : : : : : : *
  971.  *: : : : :  91
  972.    4.12 Network Database : : : : : : : : : : : : : : : : : : : : :: : : : : : :*
  973.  * : : : : : :  92
  974.  
  975.  
  976. 5  Implementation Notes                                                    93
  977.    5.1  Time outs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  978.  * : : : : : : ::   93
  979.    5.2  Memory Management : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  980.  * : : : : : :  95
  981.         5.2.1  Mbufs  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  982.  *: : : : : : : :  95
  983.         5.2.2  malloc() & free() : : : : : : : : : : : : : : : : : : : : : : : *
  984.  *: : : : :  95
  985.    5.3  Concurrency Control : : : : : :: : : : : : : : : : : : : : : : : : : : *
  986.  *: : : : : :  96
  987.         5.3.1  Processor Priority Levels : : : : : : : : : : : : : : : : : : : *
  988.  *: : :  96
  989.         5.3.2  Sleeping Facilities : : : : : : : : : : : : : :: : : : : : : : :*
  990.  * : : : :  97
  991.    5.4  Socket Library Creation Procedure : : : : : : : : : : : : : : : : : : :*
  992.  * : :  99
  993.         5.4.1  Master Library Base : : : : : : : : : :: : : : : : : : : : : : :*
  994.  * : : : :  99
  995.         5.4.2  Application Library Bases : : : : : : : : : : : : : : : : : : : *
  996.  *: : :  99
  997.    5.5  The SocketBase Structure : : : : : : : : : : : : : : :: : : : : : : : :*
  998.  * : : : : 100
  999.    5.6  The Application Program Interface : : : : : : : : : : : : : : : : : : :*
  1000.  * : : 102
  1001.         5.6.1  How API Functions Are Ported : : : : : : : : : : : : : : : : : :*
  1002.  * : :102
  1003.         5.6.2  API Functions Which Needed More Modifications : : : : : : : 103
  1004.    5.7  Changes in Functions Below API Level : : : : : : : : : : :: : : : : : :*
  1005.  * : 103
  1006.         5.7.1  Other Changes  : : : : :: : : : : : : : : : : : : : : : : : : : *
  1007.  *: : : : : : 103
  1008.    5.8  Agnet.device : : : : : : : : : : : : : : : : : : :: : : : : : : : : : :*
  1009.  * : : : : : : : 104
  1010.         5.8.1  IO Commands : : : : : : : : : : : : : : : : :: : : : : : : : : :*
  1011.  * : : : : : : 104
  1012.         5.8.2  Initialization Procedure : : : : : : : : : : : : : : : : : : : :*
  1013.  * : : : 106
  1014.         5.8.3  The Device Interface Functions: : : : : : : : : : : : : : : : : *
  1015.  *: : 107
  1016.  
  1017.  
  1018.  
  1019.                                      xvii
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.                Opening an Unit : : : : : : : : : : : :: : : : : : : : : : : : :*
  1026.  * : : : : : 107
  1027.                Closing an Unit : : : : : : : : : : : :: : : : : : : : : : : : :*
  1028.  * : : : : : 107
  1029.                Initiating an IO Request : : : : : : : : : : : : : : : : : : : :*
  1030.  * : : :108
  1031.                Aborting an IO Request: : : : : : : : : : : : : : : : : : : : : *
  1032.  *: : : : 108
  1033.                Expunging the Device : : : : : : : : : : : : : : : : : : : : : :*
  1034.  * : :: : 108
  1035.         5.8.4  Packet Delivery : : : : : : : : : : : : : : :: : : : : : : : : :*
  1036.  * : : : : : 109
  1037.         5.8.5  Arexx Interface : : : : : : : : : : : : : : :: : : : : : : : : :*
  1038.  * : : : : : 109
  1039.  
  1040.  
  1041. A  Autodocs for Network Applications and Utilities                      111
  1042.    A.1  Network Utilities : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1043.  * : : : : : : 112
  1044.         A.1.1  arp : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1045.  * : : : : : : : : 112
  1046.         A.1.2  ifconfig : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1047.  *: : : : : : : 114
  1048.         A.1.3  inetd  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  1049.  *: : : : : : : : 117
  1050.         A.1.4  letnet: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1051.  *: : : : : : : : 119
  1052.         A.1.5  offline : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1053.  * : : : : : : : 120
  1054.         A.1.6  online: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1055.  *: : : : : : : : 121
  1056.         A.1.7  ping : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1057.  *: : : : : : : : 122
  1058.         A.1.8  route  : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  1059.  *: : : : : : : : 126
  1060.  
  1061.  
  1062. B  API Function Reference                                                 128
  1063.    B.1  Standard BSD Style Socket Functions: : : : : : : : : : : : : : : : : : *
  1064.  *: : 130
  1065.         B.1.1  accept() : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1066.  *: : : : : : : 130
  1067.         B.1.2  bind(): : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1068.  *: : : : : : : : 132
  1069.         B.1.3  CloseSocket()  :: : : : : : : : : : : : : : : : : : : : : : : : *
  1070.  *: : : : : : 133
  1071.         B.1.4  connect()  : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  1072.  *: : : : : : : 134
  1073.         B.1.5  Dup2Socket() : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1074.  * :: : : : : 136
  1075.         B.1.6  getpeername()  :: : : : : : : : : : : : : : : : : : : : : : : : *
  1076.  *: : : : : : 137
  1077.         B.1.7  getsockname()  :: : : : : : : : : : : : : : : : : : : : : : : : *
  1078.  *: : : : : : 138
  1079.         B.1.8  getsockopt() : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1080.  * :: : : : : 139
  1081.         B.1.9  IoctlSocket()  :: : : : : : : : : : : : : : : : : : : : : : : : *
  1082.  *: : : : : : 142
  1083.         B.1.10 listen() : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1084.  *: : : : : : : 144
  1085.         B.1.11 recv(): : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1086.  *: : : : : : : : 145
  1087.         B.1.12 select() : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1088.  *: : : : : : : 147
  1089.         B.1.13 send(): : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1090.  *: : : : : : : : 150
  1091.         B.1.14 shutdown(): : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1092.  *: : : : : : : 152
  1093.         B.1.15 socket() : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1094.  *: : : : : : : 153
  1095.    B.2  Other BSD Functions Related to Sockets : : : : : : : : : : : : : : : : *
  1096.  *: 156
  1097.         B.2.1  getdtablesize() : : : : : : : : : : : :: : : : : : : : : : : : :*
  1098.  * : : : : : 156
  1099.         B.2.2  Syslog() : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1100.  *: : : : : : : 157
  1101.    B.3  Network Data and Address Manipulation : : : : : : : : : : : : : : : : :*
  1102.  * : 159
  1103.         B.3.1  inet_addr() : : : : : : : : : : : : : : : : :: : : : : : : : : :*
  1104.  * : : : : : : 159
  1105.    B.4  Network, Protocol and Service Queries : : : : : : : : : : : : : : : : :*
  1106.  * : 162
  1107.         B.4.1  gethostbyname() : : : : : : : : : : : :: : : : : : : : : : : : :*
  1108.  * : : : : : 162
  1109.         B.4.2  getnetbyname(): : : : : : : : : : : : : : : : : : : : : : : : : *
  1110.  *: : : : : : 164
  1111.         B.4.3  getprotobyname() : : : : : : : : : : : : : : : : : : : : : : : :*
  1112.  * : :: : : 166
  1113.         B.4.4  getservbyname() : : : : : : : : : : : :: : : : : : : : : : : : :*
  1114.  * : : : : : 167
  1115.    B.5  AmiTCP/IP Specific Extensions : : : : : : : : : : : : : : : : : : : : :*
  1116.  * : : : 169
  1117.         B.5.1  Errno() : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1118.  * : : : : : : : 169
  1119.         B.5.2  ObtainSocket(): : : : : : : : : : : : : : : : : : : : : : : : : *
  1120.  *: : : : : : 170
  1121.         B.5.3  ReleaseCopyOfSocket() : : : : : : : : : : : : : : : : : : : : : *
  1122.  *: : : : 171
  1123.         B.5.4  ReleaseSocket() : : : : : : : : : : : :: : : : : : : : : : : : :*
  1124.  * : : : : : 172
  1125.  
  1126.  
  1127.  
  1128.                                      xviii
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.         B.5.5  SetDTableSize() : : : : : : : : : : : :: : : : : : : : : : : : :*
  1135.  * : : : : : 173
  1136.         B.5.6  SetErrnoPtr()  :: : : : : : : : : : : : : : : : : : : : : : : : *
  1137.  *: : : : : : 174
  1138.         B.5.7  SetSocketSignals(): : : : : : : : : : : : : : : : : : : : : : : *
  1139.  *: : : : : 175
  1140.  
  1141.  
  1142. C  AmiTCP/IP Network Link Library                                        176
  1143.    C.1  net.lib Functions : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1144.  * : : : : : : 177
  1145.         C.1.1  autoinit : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1146.  *: : : : : : : 177
  1147.         C.1.2  autoinitd  : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  1148.  *: : : : : : : 178
  1149.         C.1.3  charRead : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1150.  *: : : : : : : 179
  1151.         C.1.4  gethostname : : : : : : : : : : : : :: : : : : : : : : : : : : :*
  1152.  * : : : : : : 181
  1153.         C.1.5  lineRead : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1154.  *: : : : : : : 182
  1155.  
  1156.  
  1157. D  Protocols and Network Interfaces                                      185
  1158.    D.1  Protocols and Network Interfaces : : : : : : : : : : : :: : : : : : : :*
  1159.  * : : 186
  1160.         D.1.1  arp : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1161.  * : : : : : : : : 186
  1162.         D.1.2  icmp : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1163.  *: : : : : : : : 189
  1164.         D.1.3  if : :: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1165.  *: : : : : : : : :190
  1166.         D.1.4  inet : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  1167.  *: : : : : : : : 193
  1168.         D.1.5  ip : :: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1169.  *: : : : : : : : :196
  1170.         D.1.6  lo : :: : : : : : : : : : : : : : : : : : : : : : : : : : : : : *
  1171.  *: : : : : : : : :198
  1172.         D.1.7  routing : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1173.  * : : : : : : : 199
  1174.         D.1.8  tcp : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1175.  * : : : : : : : : 201
  1176.         D.1.9  udp : : : : : : : : : : : : : : : :: : : : : : : : : : : : : : :*
  1177.  * : : : : : : : : 203
  1178.  
  1179.  
  1180. Glossary                                                                   205
  1181.  
  1182.  
  1183. Bibliography                                                               209
  1184.  
  1185.  
  1186.  
  1187.                                       xix
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193. xx
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199. Chapter 1
  1200.  
  1201.  
  1202.  
  1203. User's  Manual
  1204.  
  1205.  
  1206.  
  1207. 1.1     Installation
  1208.  
  1209.  
  1210. AmiTCP/IP installation is made by standard Commodore Amiga Installer
  1211. which provides an easy installation.  Before you can proceed, you should
  1212. acquire some information, list of whichfollows.
  1213.    Your should ask your local network administrator for few things to be
  1214. able to connect your Amiga to a network.  Take this page or copy of it
  1215. with you to make sure that you don't forget anything:
  1216.  
  1217.  
  1218.  1. Internet protocol address allocated for your computer.  This is a
  1219.     series of four decimal numbers separated by dots.  For example,
  1220.     ``130.233.161.40'' is a legal internet address.
  1221.  
  1222.  2. Destination IP address of a point--to--point link.  This applies only
  1223.     if you use a point--to--point medium, such as a serial line.
  1224.  
  1225.  
  1226.  3. Netmask for your network1 This determines which part of your internet
  1227.     address is used to specify the network.  Netmask is like
  1228.     ``255.255.255.0''.  If you do not supply this value, a default
  1229.     computed from the IP address is used.
  1230.  
  1231.  4. Name of your host.  This is a mnemonic name which can usually be used
  1232.     instead of the internet address to refer to your computer.  This is
  1233.     like ``Amiga1''.
  1234.  
  1235.  5. Domain name of your site.  For example, ``hut.fi'' is the domain name
  1236.     for the Helsinki University of Technology in Finland.
  1237.  
  1238.  6. Address(es) of the Domain Name Server(s) which will be used to
  1239.     translate host names to corresponding internet addresses.  A local
  1240.     host database must be used instead if there is no name server on your
  1241.     domain.
  1242.  
  1243.  7. Address of the default gateway via which to send packets to the hosts
  1244.     not on your local network.  There may be more than one of them.
  1245. ________________________________
  1246.    1Netmask is usually needed onlyif you are connected to several
  1247.  
  1248. networks or a network capable to broadcasts.
  1249.  
  1250.  
  1251.  
  1252.                                        1
  1253.  
  1254.  
  1255. 2    Section 1.1                  AmiTCP/IP                    System Manual
  1256.  
  1257.  
  1258.  
  1259.  8. The network interface to use.  This may be Ethernet, SLIP or
  1260.     something else.  We assume that you have proper hardware installed
  1261.     and the appropriate Sana-II compatible device driver installed in
  1262.     directory Devs:networks.  AmiTCP/IP needs the name of the device
  1263.     driver in order to use it.  The unit number for the device in
  1264.     question is also needed (usually this is 0).
  1265.  
  1266.    Installation starts by double-clicking the Install_AmiTCP-2.0-icon of
  1267. the distribution disc.  You can select the level whichspecifies how many
  1268. choices are left to you by the installation script.   After a successful
  1269. installation your computer is ready to communicate with the network.  See
  1270. the file README.FIRST for more information about the installation
  1271. procedure.
  1272.    If you plan to compile applications which use AmiTCP/IP, you should
  1273. add two AmigaDOS assigns for the compiler to find appropriate files.
  1274. Assign the name NETINCLUDE: to the netinclude directory of the AmiTCP/IP
  1275. and the name NETLIB: to the directory netlib.
  1276.  
  1277.  
  1278.  
  1279. 1.1.1   Using the SLIP Drivers
  1280.  
  1281. Some Commodore-Amiga Networking Group supplied SANA-II drivers are
  1282. distributed with the AmiTCP/IP. The SLIPdrivers included are taken from
  1283. Olaf Seibert's distribution and has somebug fixes over the version 37.3.
  1284. See the file doc/slip.doc for installinginstructions for these drivers.
  1285.    The version number of the included slip.device is 37.4.  You can use
  1286. this or newer SLIP driver with AmiTCP/IPwith certain precautions.  The
  1287. included CSLIP device is similar to theSLIP device, it only uses the Van
  1288. Jacobson header compression (see [Jacobson 1990 ] fordescription of this
  1289. compression method).  If your network connection supports CSLIP, you can
  1290. use cslip.device instead of slip.devicein all examples given in this
  1291. section.
  1292.    Used serial interface, baud rate and other parameters for the unit 0 of
  1293. the SLIP device are specified in the configuration file
  1294. ENV:Sana2/slip0.config.  You must edit this file according your system
  1295. setup before you can use the slip device.   Copy the edited file to both
  1296. ENVARC:Sana2 and ENV:Sana2 directories.
  1297.    The AmiTCP/IP opens the slip device driver when given a following
  1298.  
  1299. ifconfig2 command:
  1300.  
  1301. ifconfig slip.device/0 local-address remote-address
  1302.  
  1303. The local-address is the IP address (orname) given to your host, the
  1304. remote-address is the IP address (or name) of the host you are connecting
  1305. to with the serial line.  You should also add a routingentry with the
  1306. route command, for example
  1307.  
  1308. route add default remote-address
  1309.  
  1310. You can test your SLIP connection immediately with the command
  1311.  
  1312. ping remote-address
  1313. ________________________________
  1314.    2The ifconfig and route commands like described here are normally placed to
  1315.  
  1316. the startnet script during AmiTCP/IP installation.
  1317.  
  1318.  
  1319. System Manual                   AmiTCP/IP                   Section 1.2    3
  1320.  
  1321.  
  1322.  
  1323. Common Problems with the SLIP Driver AndAmiTCP/IP
  1324.  
  1325. The ifconfig command gives you the following error message, if there is
  1326. some problems opening the interface:
  1327.  
  1328.  
  1329. ifconfig: ioctl (SIOCGIFFLAGS): no suchinterface
  1330.  
  1331.  
  1332. If the device driver is not installed properly or there is no
  1333. configuration file, AmiTCP/IP gives thefollowing log message:
  1334.  
  1335.  
  1336. <3> OpenDevice: Device or unit failed toopen
  1337.  
  1338.  
  1339. In this case, you should check that thefile ENV:Sana2/slip0.config
  1340. actually exists and the device driver isin the correct directory.
  1341.    If the device driver is ok, but the needed serial device is busy (or
  1342. you have set the slip driver to offlinestate), AmiTCP/IP logs the
  1343. following message:
  1344.  
  1345.  
  1346. <3> slip.device: Device driver is offline (Unit is currently offline)
  1347.  
  1348.  
  1349. Then you must free the serial interface,set the slip device to the
  1350. online state and give the previous ifconfig command with the ``up''
  1351.  
  1352. option3 again.
  1353.    If AmiTCP/IP gives no error messages and the serial link still does
  1354. not work, it may be due to incorrect information in the
  1355. ENV:Sana2/slip0.config-file.  Check thatthe baud rate is correct.  Note
  1356. that the slip device loads the configuration file only on startup, which
  1357. means that you must restart the AmiTCP/IP if you have already configured
  1358. the slip driver with an ifconfig command.
  1359.  
  1360.  
  1361.  
  1362. 1.2     Configuration
  1363.  
  1364.  
  1365. AmiTCP/IP is normally started from the command line with a startup
  1366. script.  It starts the AmiTCP/IP process, which loads the configuration
  1367. files.  The script also contains ifconfig and route commands to open the
  1368. SANA-II device drivers and add the needed route entries, respectively.
  1369.    The AmiTCP/IP can be configured with both option files and ARexx
  1370. commands.  The option files are stored in the text format and they can be
  1371. edited with any text editor.  The '#' character startsa comment, which
  1372. continues to the end of the line.  All configuration commands are
  1373. presented in the section 2.4 starting from the page 17.
  1374.    Configuration files for AmiTCP/IP are stored in the directory
  1375. AmiTCP:db.  It contains at least following files:
  1376.  
  1377.  
  1378. AmiTCP:db/AmiTCP.config   AmiTCP/IPinternal configuration.
  1379.  
  1380.  
  1381. AmiTCP:db/netdb  Network database information, ie.  host names, networks,
  1382.     services, protocols, domain name servers and domains.
  1383. ________________________________
  1384.    3The up is needed because the AmiTCP/IP implicitly adds this option when
  1385.  
  1386. an address to the interface is first given.   If the second ifconfig specifies
  1387. the same address as before, the up option must be given explicitly.
  1388.  
  1389.  
  1390. 4    Section 1.3                  AmiTCP/IP                    System Manual
  1391.  
  1392.  
  1393.  
  1394. AmiTCP:db/hosts.equiv  Host equivalence data used by rlogind, rshd etc.
  1395.     (these daemons are currently unimplemented).
  1396.  
  1397. AmiTCP:db/inetd.conf  Services provided by Inetd, the internet super
  1398.     server.
  1399.  
  1400.  
  1401.  
  1402. 1.2.1   Options
  1403.  
  1404. Normally AmiTCP/IP reads options from the file AmiTCP:db/AmiTCP.config.
  1405. You can specify an option file also on the command line (eg.  AmiTCP WITH
  1406. myopts) or with the tool type WITH. Youcan prevent AmiTCP/IP from
  1407. loading the default option file by the NOCONFIG command line option.
  1408.  
  1409.  
  1410.  
  1411. 1.2.2   Network  Database
  1412.  
  1413. The file AmiTCP:db/netdb is used to store the local net and host name
  1414. information.  There is an example file in the distribution, which you
  1415. must change according to your local network environment.  The syntax for
  1416. the network database file is same as thesyntax for the Arexx command add
  1417. (see page 19).
  1418.    The mostimportant entries are the name of your own host and the
  1419. important hosts in your local net.  For instance, if your host name is
  1420. amiga1.hut.fi and your internet address(IP number) is 130.233.61.50,
  1421. then there is probably a following linein your AmiTCP:db/netdb file:
  1422.  
  1423.  
  1424.      HOST 130.233.61.50 amiga1.hut.fi amiga1 amy1
  1425.  
  1426.  
  1427.    The firstentry after the keyword HOST is the internet address of your
  1428. host.  It is followed by the official name and an optional list of alias
  1429. names to your host.
  1430.    Normally,all host and network names will be translated to the actual
  1431. internet addresses by a name server.  If you can not use the name
  1432. service, then all host names must be inthe AmiTCP:db/netdb file or in an
  1433. included file.  In that case it may be easiest to copythe /etc/hosts
  1434. file from a nearby Unix machine.
  1435.    You can add host names to the network database with ARexx commands at
  1436. any time.  For instance, the following command adds a host called
  1437. vipunen:
  1438.  
  1439. rx "address AMITCP add host 130.233.224.20 vipunen.hut.fi vipunen"
  1440.  
  1441.    There arealso service and protocol entries in the network database
  1442. files.  Do not change them if you are not an expert user.
  1443.  
  1444.  
  1445.  
  1446. 1.3     Internet Addressing
  1447.  
  1448.  
  1449. Each host in the Internet must have an unique 32 bit binary address.
  1450. This address identifies the location ofhost in the internet in an
  1451. unambiguous way.  The internet address is divided intoa net part and a
  1452. host part.  Because of this elegant feature a single address identifies a
  1453. unique host as well as the network whichthe computer is connected to.
  1454.  
  1455.  
  1456. System Manual                   AmiTCP/IP                   Section 1.3    5
  1457.  
  1458.  
  1459.  
  1460.    When selecting a route to a particular host the whole address is
  1461. considered first.  If no direct route to the host can be found, a route
  1462. to the host's network can be considered.  If no route to either host or
  1463. net can be found, the packet is sent tothe default gateway.
  1464.    Because the the internet address defines also the network which the
  1465. computer is connected, they must actually be given one per network
  1466. connection.  If a host is directly connected to severalnetworks, it has
  1467. also several distinct internet addresses.
  1468.  
  1469.  
  1470.  
  1471. 1.3.1   Internet Dot Notation
  1472.  
  1473.  
  1474. Since it is rather inconvenient to use 32-bit integers, the internet
  1475. address is normally written in the Internet dot notation.  It is a series
  1476. of decimal numbers separated by dots.
  1477.  
  1478.  
  1479.               ____________________________________________________
  1480.               !_Format__!Size______________________!Example_______!
  1481.               ! a       !32-bit                    !169510179    !
  1482.               ! a.b     !8-bit.24-bit             !10.1738019   !
  1483.               ! a.b.c   !8-bit.8-bit.16-bit       !10.26.34083  !
  1484.               !_a.b.c.d_!8-bit.8-bit.8-bit.8-bit_!_10.26.133.35_!_
  1485.  
  1486.  
  1487.  
  1488.          Table 1.1:  Four different forms for an Internet address.
  1489.  
  1490.  
  1491.    The one with four separate octets is the most common form of the
  1492. notation.  See the reference for the function
  1493. bsdsocket.library/inet_addr() to additional information (at Appendix
  1494. B.3.1, page 159).
  1495.  
  1496.  
  1497.  
  1498. 1.3.2   Nets and Routing
  1499.  
  1500.  
  1501.  
  1502.                 0_1_2_3_4______8_____________16____________24___________31_
  1503.                 ! !           !                                            !
  1504.        Class A  !!0!!Netpart  !!                Hostpart                   !!
  1505.                 __________________________________________________________
  1506.                 __________________________________________________________!!!!!
  1507.  
  1508.        Class B  !!1!!0!!     Netpart         !!        Hostpart            !!
  1509.                 __________________________________________________________
  1510.                 __________________________________________________________!!!!!!
  1511.  
  1512.        Class C  !!1!!1!!0!!          Netpart               !! Hostpart     !!
  1513.                 __________________________________________________________
  1514.                 __________________________________________________________!!!!!!
  1515.  
  1516.        Class D  !!1!!1!!1!!0!!         Multicast Address                   !!
  1517.                 __________________________________________________________
  1518.                 __________________________________________________________!!!!!*
  1519.  *!!
  1520.  
  1521.        Class E  !!1!!1!!1!!1!!0!!      Experimental Address                !!
  1522.                 __________________________________________________________
  1523.  
  1524.  
  1525. Figure 1.1:  The Internet address classes.  The different address classes
  1526. can be identified by few first bits.
  1527.  
  1528.  
  1529. 6    Section 1.3                  AmiTCP/IP                    System Manual
  1530.  
  1531.  
  1532.  
  1533.    There arefive classes of internet addresses in use, namely A, B, C, D
  1534. and E classes.  The difference between address classesis the length of
  1535. the network and host part.  An A class address has 7 bits for net address
  1536. and 24 bits for host address, a B classaddress has 14 bits for net and
  1537. 16 bits for host and a C class address has 21 bits for net and 8 bits for
  1538. host.  The D class is used for the IP multicast addresses and the E class
  1539. for experimental use only4.
  1540.    The address class can be determined by the first octet of the address.
  1541. If it is in the range 0---127, the address belongs to the A class.  If it
  1542. is 128--191, the address belongs to theB class.   If the first octet is
  1543. 192--223, the address belongs to the C class, otherwise it is an
  1544. experimental or a multicast address.
  1545.  
  1546.  
  1547.  
  1548. 1.3.3   Subnets
  1549.  
  1550. The network addresses are managed by a central authority.  Local
  1551. administration manages the host addresses.   Because network addresses are
  1552. used in routing, the central authority is needed when the local network
  1553. changes its structure.  This might be quite a burden tothe central
  1554. authority, but there is a solution developed for the Internet.  A network
  1555. may be split into several subnets, whichcan then be managed by
  1556. independent agencies.  The central network management doesn't have to
  1557. know anything about subnets and hosts inthem.
  1558.    For instance Kone corporation has been assigned a B class network
  1559. 138.249.0.0.  This network has been divided to C classlike subnets,
  1560. which are then given to the departments.  The HAT department is given
  1561. subnet 138.249.2.0, the HATMEC department subnet 138.249.5.0 and so on.
  1562.                  0________8________16______24_______
  1563.  
  1564.       Address    !!_________________________________1!138.249.!02.03001010!!111*
  1565.  *11001!!00000010!!00011110
  1566.  
  1567.                  ___________________________________
  1568.  AND  Netmask    !!_________________________________1!255.255.255.!10111111!!11*
  1569.  *111111!!11111111!!00000000
  1570. _______________________________________________________________________
  1571.  
  1572.   =    Subnet    !!_________________________________1!138.249.!02.0001010!!1111*
  1573.  *1001!!00000010!!00000000
  1574.  
  1575.  
  1576.  
  1577.         Figure 1.2:  Using netmask to find out subnetwork address.
  1578.  
  1579.  
  1580.    The subnet division is controlled by the netmask parameter.  The actual
  1581. subnetwork address is obtained by bit-wise AND between the netmask and
  1582. the internet address.  This subnet address is used in routing just like a
  1583. normal net address.  However, only hosts directly connected to the
  1584. divided net have to know anything aboutnetmasks and subnets.
  1585.  
  1586.  
  1587.  
  1588. 1.3.4   Broadcast Addresses
  1589.  
  1590. There are two kind of broadcast addresses in the Internet.  An obsolete
  1591. form used in older BSD 4 versions used internet address with host part 0
  1592. ________________________________
  1593.    4Routers not taking part to such experiments normally discard all
  1594.  
  1595. packets of this class.
  1596.  
  1597.  
  1598. System Manual                   AmiTCP/IP                   Section 1.4    7
  1599.  
  1600.  
  1601.  
  1602. as the broadcast address.  (The newer software usuallyconsiders
  1603. addresses like those as network addresses.)   Accordingthe the current
  1604. Internet standard the broadcast addresses have the host part all 1's.
  1605.  
  1606.  
  1607.       ___________________________________________________________________
  1608.       !   Interface    !                !   Network     !  Broadcast     !
  1609.       !                !  Netmask       !               !                !
  1610.       !    Address     !                !   Address     !   Address      !
  1611.       !________________!________________!_______________!________________!
  1612.       ! 10.14.123.2   !255.255.255.0   ! 10.14.123.0   ! 10.14.123.255  !
  1613.       ! 130.244.5.4   !255.255.255.128 ! 130.244.5.0   ! 130.244.5.127  !
  1614.       !_192.36.148.21_!255.255.255.0___!_192.36.148.0__!_192.36.148.255_!_
  1615.  
  1616.  
  1617.  
  1618. Table 1.2:  Examples of netmasks, network addresses andbroadcast
  1619. addresses.
  1620.  
  1621.  
  1622.  
  1623. 1.4     Utilities
  1624.  
  1625.  
  1626. Currently, only a few networking utilities are ported for the AmiTCP/IP.
  1627. They are used to monitor and control network operation with AmiTCP/IP.
  1628. There is a separate reference entry foreach network utility and daemon
  1629. in the document file netutil.doc.  This autodoc file isincluded in the
  1630. appendix A, starting from page 111.
  1631.  
  1632.  
  1633.  
  1634. 1.4.1   arp
  1635.  
  1636. arp displays and modifies the internet to hardware address translation
  1637. tables used by the Address Resolution Protocol.   It isused if you are
  1638. connected to a broadcast network, eg.  Ethernet or Arcnet.  You may
  1639. examine, add, and delete ARP entries.  Usually arp is used to find out
  1640. hardware address of hosts.
  1641.    The hardware addresses are given as hexadecimal strings, each octet
  1642. separated by a colon.
  1643.    Examples:
  1644.  
  1645.  
  1646.  1.> arp -s puucee 8:0:9:32:f2:4c pub
  1647.  
  1648.     This command sets the hardware address for the host 'puucee' as
  1649.     '8:0:9:32:f2:4c'.
  1650.  
  1651.  
  1652.  
  1653. 1.4.2   ifconfig
  1654.  
  1655. ifconfig configures network interface parameters.   Itassigns an internet
  1656. address to a SANA-II network interface or sets interface parameters.
  1657. ifconfig is normally used at the AmiTCP/IP startup.
  1658.    Examples:
  1659.  
  1660.  
  1661.  1.> ifconfig lo/0 127.1
  1662.  
  1663.     This command marks internal loopback device up, and attaches the
  1664.     internet address 127.0.0.1 to it.
  1665.  
  1666.  
  1667. 8    Section 1.4                  AmiTCP/IP                    System Manual
  1668.  
  1669.  
  1670.  
  1671.  1.> ifconfig cslip.device/0 inet 193.102.4.144 193.102.4.129
  1672.  
  1673.     This command starts the CSLIP driver, attaches an address
  1674.     193.102.4.144 (our internet address) and a destination address
  1675.     193.102.4.129 (the internet address of the host you are connecting)
  1676.     to it.
  1677.  
  1678.  
  1679.  1.> ifconfig a2065.device/0 inet 193.124.100.66 +
  1680.     netmask 255.255.255.192 up -arp
  1681.  
  1682.     This command loads an ethernet driver for the Commodore A2065
  1683.     Ethernet adapter unit 0, marks it UP, disables ARP protocol for it,
  1684.     attaches an inet address 193.124.100.66 to it and sets its netmask to
  1685.     255.255.255.192.  A bitwise logical AND of the netmask and the
  1686.     address for the interface forms the subnet address, in this case
  1687.     193.124.100.66.  All packets aimed to hosts with same subnet address
  1688.     (that is hosts 193.124.100.65--193.124.100.126) are routed to this
  1689.     interface.
  1690.  
  1691.  
  1692.  
  1693. 1.4.3   letnet
  1694.  
  1695. letnet is a simple TCP connection tool.  With it you can connect to a TCP
  1696. port at given host.  Letnet reads data from standard input and sends it
  1697. to the host.  Likewise it receives data from the connection and writes it
  1698. to the standard output.  Letnet terminates upon shutdown of the socket or
  1699. receiving SIGBREAKF_CTRL_C signal.  Letnet does not handle telnet
  1700. protocol.
  1701.  
  1702.  
  1703.  
  1704. 1.4.4   netstat
  1705.  
  1706. netstat shows network status.  It symbolically displaysinformation of
  1707. network data structures of the AmiTCP/IP. There are several standard
  1708. AmigaDOS style options:
  1709.  
  1710.  
  1711.  By default displays all sockets that are not listening.
  1712.  
  1713.  
  1714. ALL displays all sockets.
  1715.  
  1716.  
  1717. STATUS displays values of several protocol-related variables.
  1718.  
  1719.  
  1720.    Example:
  1721.  
  1722.  
  1723.  1.> netstat status
  1724.  
  1725.  
  1726.    Netstat is an ARexx script which uses the AMITCP port of the AmiTCP/IP
  1727. to collect the information.  See section2.5.1 (p.  18) for details about
  1728. the ARexx commands supported by the AmiTCP/IP.
  1729.  
  1730.  
  1731.  
  1732. 1.4.5   NapsaTerm
  1733.  
  1734. NapsaTerm is a VT102 terminal emulator for logging remotely to Unix hosts
  1735. with rlogin protocol.  It is based on the NiftyTerm version 1.2 for Amiga
  1736. by Chris Newman and William Todd.
  1737.  
  1738.  
  1739. System Manual                   AmiTCP/IP                   Section 1.5    9
  1740.  
  1741.  
  1742.  
  1743.  1.> run napsaterm -d net happi.hut.fi
  1744.  
  1745.     This command starts VT102 emulator with a rlogin connection to the
  1746.     host happi.hut.fi.
  1747.  
  1748.  
  1749.  
  1750. 1.4.6   offline
  1751.  
  1752. offline5 sends the S2_OFFLINE command to thegiven SANA-II device driver.
  1753. This command is normally used to disconnect SANA-II device driver from
  1754. the network adapter hardware.  After this command the device driver does
  1755. not accept any more read or write requests.
  1756.    Example:
  1757.  
  1758.  1.> offline slip.device/0
  1759.  
  1760.     This command puts the SLIP driver unit 0 offline, which frees then
  1761.     the serial port to other use.
  1762.  
  1763.  
  1764.  
  1765. 1.4.7   online
  1766.  
  1767. online sends the S2_ONLINE command to the given SANA-II device driver.
  1768. The device driver restarts the network adapter hardware and accepts read
  1769. and write request again.
  1770.    Example:
  1771.  
  1772.  1.> online a2066.device/0
  1773.  
  1774.     This command tries to start the Commodore ARCNET network adapter.
  1775.  
  1776.  
  1777.  
  1778. 1.4.8   route
  1779.  
  1780. route manipulates the routing tables.  It is normally used at the
  1781. AmiTCP/IP startup sequence to provide the default routing information in
  1782. the routing tables.  All needed routing information canbe provided with
  1783. this command.
  1784.    Routes determine into which network IP packets are sent.  Usually there
  1785. is only need to set the default route toyour gateway and the route to
  1786. the host itself through the loopback device.   More route entries may be
  1787. needed if your host is used as a gateway.
  1788.  
  1789.  
  1790.  
  1791. 1.5     Errors  and  Logging
  1792.  
  1793.  
  1794. There are two kinds of error reports AmiTCP/IP produces:
  1795.  
  1796. Errors might be produced when a user process or a network supplies
  1797.     invalid data.  These don't cause any problems to AmiTCP/IP. These
  1798.  
  1799.     events are logged6 to help the user to find out possible problems
  1800.     with his/her system.
  1801. ________________________________
  1802.    5offline and online are compatible with the Commodore supplied SANA-II
  1803.  
  1804. utilities with same names.  However, they support the AmiTCP/IP naming
  1805. convention.
  1806.    6if logging is not disabled
  1807.  
  1808.  
  1809. 10    Section 1.7                  AmiTCP/IP                   System Manual
  1810.  
  1811.  
  1812.  
  1813. Failures are more serious.  These mean that AmiTCP/IP has entered to
  1814.     state where there is no way out.
  1815.  
  1816.     In Unix systems these cases lead to panic() and immediate restart.
  1817.     This is because in Unix systems networking software is integral part
  1818.     of the kernel and if something goes wrong, it usually means that the
  1819.     whole kernel is corrupted.  This is not the case in Amiga and
  1820.     AmiTCP/IP, however.  As AmiTCP/IP runs as a normal process, rest of
  1821.     the system can work even if networking fails.
  1822.  
  1823.  
  1824.    In Unix systems the syslogd takes care of the error reporting using an
  1825. attached console.  In AmigaOS there is no general failure reporting
  1826. system, only User Requesters which are inadequate for non-interactive
  1827. use.  As logging could be used even while in interruptlevel, AmiTCP/IP
  1828. can't write to log-files itself.  This is why the actual logging is done
  1829. by the NETTRACE process.  It is started at AmiTCP/IP startup and can be
  1830. configured through AMITCP ARexx port.
  1831.    ARexx commands can be found in section 2.5.1 (p.  18).
  1832.  
  1833.  
  1834.  
  1835. 1.6     Troubleshooting
  1836.  
  1837.  
  1838. This section is reserved for the frequently asked questions and answers
  1839. to them.
  1840.  
  1841.  
  1842.  
  1843. 1.7     Testing Utilities
  1844.  
  1845.  
  1846.  
  1847. There are two testing utilities providedwith the AmiTCP/IP. The agnet7
  1848. controls the loopback pseudo device which simulates different networks.
  1849. The qwriter simulates some typical application programs.  They can be
  1850. used together to test the integrity of the protocol stack.
  1851.  
  1852.  
  1853.  
  1854. 1.7.1   Agnet
  1855.  
  1856.  
  1857. SANA-II pseudo device driver agnet.device works as a network between its
  1858. units.  Packets from one unit are sent to another according given
  1859. destination address.  You can also arrange an unit-to-unit connection, if
  1860. you want to simulate point-to-point devices.
  1861.    The loopback device provides nearly full SANA-II device driver
  1862. functionality.  It provides different hardware types, packet types and
  1863. the variable hardware address width from0 to 128 bits.  It collects all
  1864. the required statistics.  It does not provide the multicast
  1865. functionality.
  1866.    A specialcommand file env:sana2/agnetn.config is used to configure and
  1867. control the device.  Configuration parameters may be specified by
  1868. supplying its keyword and the wanted value.   Any parameter may be left
  1869. out.
  1870. ________________________________
  1871.    7As Good NETwork as you like
  1872.  
  1873.  
  1874. System Manual                   AmiTCP/IP                   Section 1.7    11
  1875.  
  1876.  
  1877.  
  1878.    The configuration file parsing template is
  1879. WIRE/K,MTU/N/K,MINTU/N/K,BPS/N/K,ADDR=ADDRESS/K,
  1880. DELAY/N/K,DEV=DEVIATION/N/K,ERRORS/K/N,LOSS/K/N,DST=DSTUNIT/K/N.8
  1881.    User configurable parameters are:
  1882.  
  1883. WIRE hwiretypei is the hardware type which device driver will report.
  1884.     Other default parameters are set according to it.  Default hardware
  1885.     type is Ethernet.  With different wire types you can test for
  1886.     instance Ethernet specific features of AmiTCP/IP without killing the
  1887.     whole Ethernet segment of your network.
  1888.  
  1889. ADDRESS hhardware addressi  is the hardware addresses for the unit.
  1890.     Address is specified as a hexadecimal octet string.  Octets are
  1891.     separated by colons.  The length of the address depends of the
  1892.     hardware type.  For example, 8:0:9:14:74:53 is a legal Ethernet
  1893.     hardware address.  Alias:  ADDR.
  1894.  
  1895. DSTUNIT hunit numberi  is the destination unit for a unit-to-unit
  1896.     connection.  If this parameter is given, all packets sent to the unit
  1897.     are relayed to specified destination unit regardless of the packet
  1898.     destination address.
  1899.  
  1900. MTU hnumber of octetsi  is the maximum packet size that pseudo network will
  1901.     accept.  Default value is 1500 octets, same as the MTU for the
  1902.     Ethernet.
  1903.  
  1904. MINMTU hnumber of octetsi  is the minimum packet size that pseudo network
  1905.     will accept.  Smaller packets are padded to this minimum length.
  1906.     Default value depends on the hardware.  It is for instance 46 octets
  1907.     for the Ethernet.
  1908.  
  1909. BPS htransmission speedi  is the bit speed which device driver will report
  1910.     to the user.
  1911.  
  1912. DELAY hdelay timei specifies the delay of network in milliseconds.  By
  1913.     default there is no delay.
  1914.  
  1915. DEVIATION hstandard deviationi  specifies delay variance in milliseconds.
  1916.     Packets are delayed randomly which means that packets may arrive in
  1917.     different order they were sent.  Deviation without delay is
  1918.     meaningless.  By default the variance is 0 ms and all packets have
  1919.     same delay.
  1920.  
  1921. ERRORS hprobabilityi  is theprobability of bit errors.  This value can be
  1922.     in range [0..100 000 000], ERRORS/100 000 000 indicating probability
  1923.     of a single bit error.  Error rate 100 000 000 means that all bits
  1924.     have random value.  By default there are no errors (value 0).
  1925.  
  1926. LOSS hprobabilityi defines the probability of the packet loss.  This is a
  1927.     number in the range [0..1 000 000], LOSS/1 000 000 indicating
  1928.     probability.  By default there is no packet loss.  Note that value
  1929.     1 000 000 means that all packets are lost.
  1930.  
  1931. ________________________________
  1932.    8Alternative forms of keywordsare specified by using alt=keyword.
  1933.  
  1934. Modifier /N specifies that the parameteris numeric.
  1935.  
  1936.  
  1937. 12    Section 1.7                  AmiTCP/IP                   System Manual
  1938.  
  1939.  
  1940.  
  1941. ARexx Port for agnet.device
  1942.  
  1943. The Arexx port is normally named as AGNET1.   If thereis multiple
  1944. instances of the agnet.device, the second instance has the port AGNET2
  1945. and so on.
  1946.    There iscurrently three different Arexx commands:
  1947.  
  1948.  
  1949. UNIT Alias:  U
  1950.  
  1951.     Some configuration parameters may be changed at run-time by Arexx
  1952.     commands.  The Arexx configuration commands follow the same syntax as
  1953.     the configuration file.  The user must specify the unit to configure
  1954.     by preceding the command with the keyword (UNIT, abbreviated as U)
  1955.     and a decimal unit number.  For instance, the following is a legal
  1956.     Arexx configuration command:
  1957.  
  1958.  
  1959.     address AGNET1 unit 0 bps 2400 wire slip delay 100
  1960.  
  1961.  
  1962. QUERY Alias:  Q
  1963.  
  1964.     The current configuration may be queried from the device by an ARexx
  1965.     command Q=QUERY. The command keyword is followed by an unit number
  1966.     and wanted configuration parameters.  You can also give a keyword
  1967.     ALL, if you want all configuration parameters.  For example,
  1968.     following command prints wiretype, delay, deviation and loss
  1969.     probability:
  1970.  
  1971.  
  1972.     options results
  1973.     address AGNET1 query 0 wire delay deviation loss
  1974.     say result
  1975.  
  1976.  
  1977. EXIT Aliases:  E, EXPUNGE
  1978.  
  1979.     The device may be expunged from the system memory by this Arexx
  1980.     command.  The command fails, if there are some currently opened
  1981.     units.
  1982.  
  1983.  
  1984. System Manual                   AmiTCP/IP                   Section 1.7    13
  1985.  
  1986.  
  1987.  
  1988. 1.7.2   Qwriter
  1989.  
  1990.  
  1991. qwriter9 works on the application layer.  It is run as two distinct
  1992. processes.  A process acts as a server or a client.  It creates one
  1993. socket and sends and receives data through the socket.  It is able to
  1994. control data consistency and measures both latency times and throughput
  1995. (if appropriate).
  1996.    Server part is started first in all tests.  Server starts to listen to
  1997. a port, and you can start the client.  Tests are configurable, basic test
  1998. types are described below.
  1999.  
  2000.  
  2001. telnet simulates typical interactive use.
  2002.  
  2003.     In this test a TCP connection is created.  The client end sends one
  2004.     character at a time and the server replies with four or more
  2005.     characters at a time.
  2006.  
  2007.     The most important measurement is the latency time between the sent
  2008.     character and the received echo.
  2009.  
  2010. nfs simulates the data transfer of a network file system.
  2011.  
  2012.     In this test UDP messages are sent between processes.
  2013.  
  2014.     Both latency and the throughput are important measurements in this
  2015.     test.
  2016.  
  2017. ftp is a simple TCP connection.
  2018.  
  2019.     In this test a TCP connection is created, then some data is
  2020.     transferred from one end to the another.
  2021.  
  2022.     In this test throughput is the key measurement.
  2023.  
  2024.  
  2025.  
  2026. Command Line Options
  2027.  
  2028. -s Act as a server (default).
  2029.  
  2030. -c Act as a client.
  2031.  
  2032. -t htypei Describes type of test:  ftp, nfs or telnet.  Type can be
  2033.     abbreviated to shortest unique length.  Default is telnet.
  2034.  
  2035. -n hcounti Describes how many times packets are sent back and forth.
  2036.     Applies to nfs and telnet.  Default for hcounti is 1.
  2037.  
  2038. -l hlengthi Describes length of data.  Default is 1000 octets.  Length has
  2039.     different meaning in different test contexts:
  2040.  
  2041.  
  2042.     ftp Length of the requested data for the client.  Length parameter is
  2043.         meaningless for a ``ftp'' server.
  2044.  
  2045.     nfs The size of the packet to be sent to the other end.
  2046.  
  2047.     telnet  The maximum length of data returned from the server.  Actual
  2048.         length is random value between 4 and length octets.  See also
  2049.         option ``-d''.  This parameter is meaningless for a client.
  2050. ________________________________
  2051.    9Quick WRITER
  2052.  
  2053.  
  2054. 14    Section 1.7                  AmiTCP/IP                   System Manual
  2055.  
  2056.  
  2057.  
  2058. -d hn1,n2,: :,:nNiThis option has meaning for the telnet server and
  2059.     overrides the ``-l'' option.  It specifies distibution of data
  2060.     lengths of replied packets to help better simulate typical
  2061.     interactive use where replies are usually short, but sometimes long
  2062.     (few kilobytes).
  2063.  
  2064.     Only k = 2i  N first numbers have effect.   Probability to have length
  2065.     less than nj (1  j  k) is approximately
  2066.  
  2067.  
  2068.                                                  Xk  nj
  2069.                               P (j) = P (j 1) + 1_   ___
  2070.                                                 k    nl
  2071.                                                  l=j
  2072.  
  2073.  
  2074.     (P (0)   =  0) This can vary depending on random numeber generator and
  2075.     because of discret nature of computing.  The largest length is nk.
  2076.  
  2077. -b hsizei Size of the buffer tobe allocated for sends and/or replies.
  2078.     Default is 30 kilobytes.  Amount of data to be send at once, if
  2079.     smaller than data to be sent.  Maximum amount of data to be expected
  2080.     from the other end.
  2081.  
  2082. -p hporti the server port number.   The default is 1500.
  2083.  
  2084. -h hhosti Name of the host to connect.  Has no meaning for servers.  The
  2085.     default is address ``127.0.0.1''.
  2086.  
  2087. -q Calculate checksum and verify returned messages.   Thisprovides way to
  2088.     check for integraty of transferred data.  Checksum method is FCS as
  2089.     described in PPP RFC (1331).
  2090.  
  2091. -T htimeouti Specifies timeout (in seconds) for retransmission.  Only
  2092.     meaningful for nfs client.  The default is 1.0 seconds.
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098. Chapter 2
  2099.  
  2100.  
  2101.  
  2102. Interfaces
  2103.  
  2104.  
  2105.  
  2106. AmiTCP/IP provides Berkeley sockets compatible interface to the
  2107. application programs.  Networking applications can usethis interface to
  2108. use TCP and UDP protocols, for example.
  2109.    AmiTCP/IPnetworking system uses SANA-II network devices.  SANA-II is
  2110. an Amiga standard network device driverinterface at the data link layer.
  2111.  
  2112.  
  2113.  
  2114. Figure 2.1:  Interfaces between different modules of the AmiTCP/IP
  2115. internetworking system.
  2116.  
  2117.  
  2118.    There isalso a standard ARexx interface for logging, statistics and
  2119. configuration in AmiTCP/IP.
  2120.  
  2121.  
  2122.  
  2123. 2.1     AmiTCP/IP Processes
  2124.  
  2125.  
  2126. AmiTCP/IP uses one protocol process.  The protocol process starts
  2127. listening specified SANA-II device drivers for incoming network frames
  2128.  
  2129.  
  2130.  
  2131.                                       15
  2132.  
  2133.  
  2134. 16    Section 2.3                  AmiTCP/IP                   System Manual
  2135.  
  2136.  
  2137.  
  2138. and sends timeout requests periodicallyto the timer device.  Output to
  2139. the network is usually done in the API callers context concurrently with
  2140. the input processing.
  2141.    There isone other task called NETTRACE taking care of error reporting
  2142. and the ARexx port of the AmiTCP/IP. Thecommands for this port are
  2143. described later in the section 2.5.1.
  2144.  
  2145.  
  2146.  
  2147. 2.2     Application Interface
  2148.  
  2149.  
  2150. Application Interface is implemented asa standard Amiga shared library.
  2151. Each task that opens the library (usingthe OpenLibrary() call) is given
  2152. an unique data area (called a library base), which AmiTCP/IP uses it to
  2153. store task specific information (see section 3.1.2 for more on this
  2154. subject).  Once the library is opened, applications cancall the standard
  2155. socket functions such as socket(), connect(), bind(), listen(), accept(),
  2156. recv() and send().
  2157.  
  2158.  
  2159.  
  2160. 2.3     SANA-II Interface
  2161.  
  2162.  
  2163. AmiTCP/IP can use (hopefully) any SANA-II [SANA-II 1992 ] device.
  2164. However, there may be problems with packet types and addressing.
  2165.    Many protocols may use the same hardware if each protocol uses unique
  2166. packet type number.  For instance, in the Ethernet theIP protocol have
  2167. packet type 2048, the Xerox NS protocoluses the packet type 1536.  The
  2168. device driver directs packets to different protocols depending of their
  2169. type.  IP packet type varies in different hardware, forinstance ARCNET
  2170.  
  2171. uses packet type 240 for IP1.
  2172.    SANA-II devices are required to follow the hardware type numbers
  2173. assigned in the [Reynolds 1990 ].  There is only one hardware typewhich
  2174. for instance all Ethernet drivers shoulduse.   The SANA-II interface
  2175. module uses the hardware type number todetermine packet types for each
  2176. protocol.
  2177.    The hardware level addressing complicates the situation further.  It is
  2178. not possible to provide a general addressing scheme in hardware level.
  2179. AmiTCP/IP can use a driver only if thereis some mapping from IP
  2180. addresses to hardware addresses.
  2181.    SometimesSANA-II network driver uses an IP compatible addressing
  2182.  
  2183. scheme, for instance SLIP or PPP drivers2 use an IP address asthe
  2184. hardware address.  Other solution is to use Address Resolution Protocol
  2185. (ARP). With ARP AmiTCP/IP can map any IPaddress to the corresponding
  2186. hardware address.
  2187.    For installing appropriate SANA-II device driver the manual of the
  2188. device driver should be consulted.  Note that if the device driver is not
  2189. installed into the devs:networks directory, a full path must be specified
  2190. when the driver is first referred to after the startup.
  2191. ________________________________
  2192.    1There is an extension to ARCNET IP that is incompatible with old one.
  2193.  
  2194. It uses packet type 212 for IP.
  2195.    2At the hardware level these protocols do not use addresses at all.
  2196.  
  2197.  
  2198. System Manual                   AmiTCP/IP                   Section 2.5    17
  2199.  
  2200.  
  2201.  
  2202.    A networkdevice driver can be attached to the AmiTCP/IP with ifconfig
  2203. command.  This can be done manually or by the network startup script.
  2204.  
  2205.  
  2206.  
  2207. 2.3.1   Interface ioctls
  2208.  
  2209. The AmiTCP/IP provides an upward compatible ioctl interface to configure
  2210. the network interfaces.  Refer to the autodoc entry protocols/if for
  2211. standard BSD ioctl interface (see appendix D.1.3, page 190).  The
  2212. extension for this interface is meant toconfigure hardware dependent
  2213. parameters in an uniform way.
  2214.    The ARP interface have been modified to be slightly more generic.  The
  2215. length of the hardware address is now passed in the arp_ha address field.
  2216. A new ioctl accesses the contents of thewhole ARP mapping cache.  (In
  2217. the BSD the static ARP table is accessedvia the /dev/kmem.)
  2218.  
  2219.  
  2220.  
  2221. 2.4     Configuration Files
  2222.  
  2223.  
  2224. The initial state of AmiTCP/IP is set bythe configuration files.  The
  2225. syntax differs from one configuration file to another.  For each file
  2226. format there is usual a corresponding ARexx command with the same syntax.
  2227. For instance, configuration options, which are set in the file
  2228. AmiTCP:db/AmiTCP.config, may be set withthe SET command by an ARexx
  2229. script.  The entries of the AmiTCP:db/netdb file can beadded manually
  2230. with the ADD command.
  2231.  
  2232.  
  2233.  
  2234. 2.5     ARexx Interface
  2235.  
  2236.  
  2237. In Amiga environment Exec message portsare standard way to communicate
  2238. between applications.  Because of the ease of programming and the
  2239. efficiency the ARexx programming language has become the standard in the
  2240. Amiga and structure it uses for messagesis also standard.  AmiTCP/IP
  2241. provides ARexx port named AMITCP which can be used to both configure and
  2242. gather information from networking.  This is much moreelegant compared
  2243. to the BSD Unix way to read directly from the kernel memory.
  2244.    The AMITCP port can be used to set and query various variables and
  2245. statistic tables.  Brief example of the usage of the port follows:
  2246.  
  2247.  
  2248. /*c:rexx
  2249.  *
  2250.  * An example to query some informationform AmiTCP/IP
  2251.  */
  2252.  
  2253.  
  2254. address AMITCP
  2255. options results /* get results back */
  2256.  
  2257.  
  2258. 'Q' TASKNAME
  2259. say "Name of amitcp task is" result
  2260. 'SET' TASKNAME "INET"
  2261. 'QUERY' ICMP CHKSUM IP CHKSUM TCP CONNECT UDP CHKSUM TASKNAME
  2262. /* Query count of ICMP, IP and UDP checksums and TCP connects */
  2263.  
  2264.  
  2265. 18    Section 2.5                  AmiTCP/IP                   System Manual
  2266.  
  2267.  
  2268.  
  2269. parse value result with icps_checksum ips_badsum tcps_connects udps_badsum task*
  2270.  *name
  2271. /* Parse values from result. (Names of the variables are from
  2272.  * the stat-structures
  2273.  */
  2274.  
  2275.  
  2276. say "New name is" taskname
  2277.  
  2278.  
  2279. say icps_checksum "bad ICMP checksums"
  2280. say ips_badsum "bad IP header checksums"
  2281. say tcps_connects "TCP connections established (including accepts)"
  2282. say udps_badsum "bad UDP checksums"
  2283.  
  2284.    This example will produce output similar to following:
  2285.  
  2286. Name of amitcp task is AmiTCP
  2287. New name is INET
  2288. 0 bad ICMP checksums
  2289. 0 bad IP header checksums
  2290. 2531 TCP connections established (including accepts)
  2291. 0 bad UDP checksums
  2292.  
  2293.  
  2294.  
  2295. 2.5.1   Commands
  2296.  
  2297. This section summarizes the commands recognized by the ARexx port of the
  2298. AmiTCP/IP. The command lines may containcomments, which are started by
  2299. the semicolon.
  2300.  
  2301. ADD hentryi This command adds entries to thenetwork database.  Templates
  2302.     for the entries are:
  2303.  
  2304.     WITH hfile namei [PREFIX=hentry typei]  Include the file hfile namei.
  2305.         Entry type for the file may be specified with an optional prefix,
  2306.         which may be any of the entry types listed in this list.   The
  2307.         file will be searched first from the AmiTCP:db directory, so that
  2308.         the actual path may be omitted, if the file resides inthat
  2309.         directory.
  2310.         For exmaple,
  2311.         WITH hosts PREFIX=HOST
  2312.         includes the file hosts, which contains only host entries.   The
  2313.         host keyword must not be present at the file itself.
  2314.         The WITH command is useful for including database files
  2315.         downloaded from Unix machines.
  2316.  
  2317.     H=HOST haddressi hnamei [aliases]  Add a host entry to the network
  2318.         database.  Either H or HOST can be used as the keyword. The
  2319.         haddressi is the internet address of the host, the hnamei is the
  2320.         official name and [aliases] is an optional list of alias names
  2321.         for the host.
  2322.         Example:
  2323.         H 128.214.6.100 nic.funet.fi nic
  2324.  
  2325.     N=NET hnamei haddressi [aliases]  Add a net entry to the network
  2326.         database.  Arguments are as above for the HOST.
  2327.         Example:
  2328.  
  2329.  
  2330. System Manual                   AmiTCP/IP                   Section 2.5    19
  2331.  
  2332.  
  2333.  
  2334.         N loopback-net 127 software-loopback-net
  2335.  
  2336.     S=SERVICE hnamei hporti/hprotocoli [aliases]  Add a service entry to the
  2337.         network database.  The hporti is the port number for the hprotocoli
  2338.         for which the server for the service will listen for the service
  2339.         requests.  [aliases] is as above.
  2340.         Example:
  2341.  
  2342.         S daytime 13/tcp
  2343.  
  2344.     P=PROTOCOL hnamei hprotocol numberi [aliases]   Add a protocol entry to
  2345.         the network database.
  2346.         Example:
  2347.  
  2348.         P tcp 6
  2349.  
  2350.     NS=NAMESERVER haddressi  Add a name server entry to the network
  2351.         database.  The haddressi is the address of the name server in the
  2352.         internet dot-notation.  The name servers are searched in the
  2353.         order specified in the database.
  2354.         Example:
  2355.  
  2356.         NS 130.233.224.1 ; santra.hut.fi
  2357.  
  2358.         Note that the symbolic name is after the ';' character,which
  2359.         marks the start of an end of line comment.
  2360.  
  2361.     DO=DOMAIN hdomain namei  Add a domain name entry to the network
  2362.         database.  The hdomain namei is the part following the first '.'
  2363.         in the official host name.  The domain entries specify the
  2364.         domains from which a host name is searched.  The search is done
  2365.         in the order of the entries added to the network database.
  2366.         Example:
  2367.  
  2368.         DOMAIN cs.hut.fi
  2369.  
  2370.  
  2371. QUERY hvariable namei [: :]:Get the value of the variable.  Many variables
  2372.     have a two-level hierarchical structure (especially for variables
  2373.     related to the statistics) in which both the name of the table and
  2374.     the name of the variable itself must be supplied.
  2375.  
  2376.     Values for many variables can be queried with one command by putting
  2377.     names of the variables in a row.
  2378.  
  2379.  
  2380. RESET Reread the network database file AmiTCP:db/netdb.
  2381.  
  2382.  
  2383. SET hvariable namei hvariable valuei [::]:  Set the value of a variable.
  2384.     Name of the variable is given as with QUERY and the value is given
  2385.     after the name.
  2386.  
  2387.     Multiple variables can be set with one command by supplying
  2388.     name-variable pairs.
  2389.  
  2390.     Note that some variables are read-only and others writeable only
  2391.     during configuration.
  2392.  
  2393.  
  2394.  
  2395. 2.5.2   Variables
  2396.  
  2397. Here is a complete list of all configuration and network statistic
  2398. variables.
  2399.  
  2400.  
  2401. 20    Section 2.5                  AmiTCP/IP                   System Manual
  2402.  
  2403.  
  2404.  
  2405. WITH Include a file with multiple settings.  (This pseudo variable is a
  2406.     extension to the SET command.)
  2407.  
  2408. ICMP Variables related to Internet Message Control Protocol.  Alias:  IC
  2409.  
  2410.  
  2411.     ERROR  Number ofcalls to icmp_error().  Alias:  E
  2412.  
  2413.     SHORTOLD  No error because old IP wastoo short.  Alias:  S
  2414.  
  2415.     ICMPOLD  No error because oldwas ICMP. Alias:  I
  2416.  
  2417.     CODE  ICMP code out of range.  Alias:  CO
  2418.  
  2419.     TOOSHORT  Packet too short.  Alias: T
  2420.  
  2421.     CHKSUM  Checksum error.  Alias:  CH
  2422.  
  2423.     LENGTH  Data length larger than packet.  Alias:  L
  2424.  
  2425.     RESPONSES  Number of responses.  Alias:  R
  2426.  
  2427.  
  2428. ICMPHIST ICMP packet send and reception history.  See page 24 for details
  2429.     on the output format.  Alias:  ICH
  2430.  
  2431. IP Variables related to Internet Protocol.
  2432.  
  2433.  
  2434.     TOTAL  Total number of packets.  Alias:  T
  2435.  
  2436.     CHKSUM  Checksum error.  Alias:  CH
  2437.  
  2438.     TOOSHORT  Packet too short.  Alias: TOOSH
  2439.  
  2440.     TOOSMALL  Not enough data.  Alias:  TOOSM
  2441.  
  2442.     HEADER  IP header length less than data size.  Alias:  H
  2443.  
  2444.     LENGTH  IP header length larger than packet.  Alias:  LE
  2445.  
  2446.     FRAGMENTS  Packet fragments received.  Alias:  FS
  2447.  
  2448.     FDROP  Fragmentsdropped (duplicates, out of space).  Alias:  FD
  2449.  
  2450.     FTIMEOUT  Fragments timed out.  Alias:  FT
  2451.  
  2452.     FORWARD  Packets forwarded.  Alias: FO
  2453.  
  2454.     FWDCANT  Packets received forunreachable destination.  Alias:  FW
  2455.  
  2456.     REDIRECTSENT  Packets forwarded on same net.  Alias:  RED
  2457.  
  2458.     NOPROTO  Unknown or unsupported protocol.  Alias:  N
  2459.  
  2460.     DELIVER  Packets consumed here.  Alias:  D
  2461.  
  2462.     LOCALOUT  Total IP packets generatedhere.  Alias:  LO
  2463.  
  2464.     ODROPPED  Lost packets due to nobufs,etc.  Alias:  OD
  2465.  
  2466.     REASSEMBLED  Total packets reassembled ok.  Alias:  REA
  2467.  
  2468.     FED Output packets fragmented ok.  Alias:  FE
  2469.  
  2470.     OFRAGMENTS  Output fragments created.  Alias:  OF
  2471.  
  2472.     FCANT  Don't fragment flag was set, etc.  Alias:  FC
  2473.  
  2474.  
  2475. TCP Variables related to Transmission Control Protocol.  Alias:  T
  2476.  
  2477.  
  2478.     CATTEM  Connections initiated. Alias:  CA
  2479.  
  2480.     ACCEPTS  Connections accepted.  Alias:  A
  2481.  
  2482.  
  2483. System Manual                   AmiTCP/IP                   Section 2.5    21
  2484.  
  2485.  
  2486.  
  2487.     CONNECT  Connections established.  Alias:  CO
  2488.  
  2489.     DROPS  Connections  dropped.  Alias:  DR
  2490.  
  2491.     CDROPS  Embryonic connections dropped.  Alias:  CD
  2492.  
  2493.     CLOSED  Connections closed (incl.  drops).  Alias:  CL
  2494.  
  2495.     SEGSTIMED  Segments where we tried to get rtt.  Alias:  SE
  2496.  
  2497.     RTTUPDATE  Times we succeed rtt.  Alias:  RTT
  2498.  
  2499.     DELACK  Delayed acknowledgments sent.  Alias:  DE
  2500.  
  2501.     TIMEODROP  Connection dropped in rxmt timeout.  Alias:  T
  2502.  
  2503.     REXMTT  Retransmit timeouts. Alias:  RE
  2504.  
  2505.     PERSIST  Persist timeouts.  Alias:  P
  2506.  
  2507.     KATIMEO  Keepalive timeouts.  Alias: KAT
  2508.  
  2509.     KAPROBE  Keepalive probes sent.  Alias:  KAP
  2510.  
  2511.     KADROPS  Connections dropped in keepalive.  Alias:  KAD
  2512.  
  2513.     STOTAL  Total packets sent.  Alias:  ST
  2514.  
  2515.     SPACK  Data packets sent.  Alias:  SP
  2516.  
  2517.     SBYTE  Data bytes sent.  Alias:  SB
  2518.  
  2519.     SREPACK  Data packets retransmitted.  Alias:  SREP
  2520.  
  2521.     SREBYTE  Data bytes retransmitted.  Alias:  SREB
  2522.  
  2523.     SACKS  Ack-onlypackets sent.  Alias:  SA
  2524.  
  2525.     SWPROBE  Window probes sent. Alias:  SWP
  2526.  
  2527.     SURGENT  Packets sent with URGonly.  Alias:  SU
  2528.  
  2529.     SWUPDATE  Window update-only packetssent.  Alias:  SWU
  2530.  
  2531.     SCTRL  Control (SYN_FIN_RST) packets sent.  Alias:  SC
  2532.  
  2533.     RTOTAL  Total packets received.  Alias:  RTO
  2534.  
  2535.     RPACK  Packets received in sequence.  Alias:  RPA
  2536.  
  2537.     RBYTE  Bytes received in sequence.  Alias:  RB
  2538.  
  2539.     RCHKSUM  Packets received withchecksum errors.  Alias:  RC
  2540.  
  2541.     ROFFSET  Packets received withbad offset.  Alias:  ROF
  2542.  
  2543.     RPSHORT  Packets received tooshort.  Alias:  RPS
  2544.  
  2545.     RDUPPACK  Duplicate-only packets received.  Alias:  RDUPP
  2546.  
  2547.     RDUPBYTE  Duplicate-only bytes received.  Alias:  RDUPB
  2548.  
  2549.     RPDUPDATA  Packets with some duplicate data. Alias:  RPDUPD
  2550.  
  2551.     RPDUPBYTE  Dup.  bytes in part-dup.  packets.  Alias:  RPDUPB
  2552.  
  2553.     ROOPACK  Out-of-order packetsreceived.  Alias:  ROOP
  2554.  
  2555.     ROOBYTE  Out-of-order bytes received.  Alias:  ROOB
  2556.  
  2557.     RPLATE  Packets with data after window.  Alias:  RPL
  2558.  
  2559.     RBLATE  Bytes receivedafter window.  Alias:  RBL
  2560.  
  2561.     RAFTER  Packets received after close.  Alias:  RAF
  2562.  
  2563.     RWPROBE  Received window probepackets.  Alias:  RWP
  2564.  
  2565.  
  2566. 22    Section 2.5                  AmiTCP/IP                   System Manual
  2567.  
  2568.  
  2569.  
  2570.     RDUPACK  Received duplicate acknowledgments.  Alias:  RDUPA
  2571.  
  2572.     RACKTOOM  Received acknowledgments for unsent data.  Alias:  RACKT
  2573.  
  2574.     RACKPACK  Received acknowledgment packets.  Alias:  RACKP
  2575.  
  2576.     RACKBYTE  Bytes acknowledged by received acknowledgments.  Alias:
  2577.         RACKB
  2578.  
  2579.     RWUPDATE  Received window update packets.  Alias:  RWU
  2580.  
  2581.  
  2582. UDP Variables related to User Datagram Protocol.  Alias:  U
  2583.  
  2584.  
  2585.     ITOTAL  Total input packets.  Alias:  I
  2586.  
  2587.     HEADSHORT  Packet shorter than header.  Alias:  H
  2588.  
  2589.     CHKSUM  Checksum error.  Alias:  C
  2590.  
  2591.     LENGTH  Data length larger than packet.  Alias:  L
  2592.  
  2593.     NOPORT  No socket on port.  Alias:  N
  2594.  
  2595.     BCNOPORT  No socket on port, arrivedas broadcast.  Alias:  B
  2596.  
  2597.     FULLSOC  Not delivered, inputsocket full.  Alias:  F
  2598.  
  2599.     MISPCB  Input packets missing pcb cache.  Alias:  M
  2600.  
  2601.     OTOTAL  Total output packets.  Alias:  O
  2602.  
  2603.  
  2604. CONNECTIONS  Returns a list ofall TCP and UDP connections, including
  2605.     server (listening) sockets.  See page 24 for the output format
  2606.     description.
  2607.  
  2608. MBUF_STAT Memory buffer statistics.  Alias:  MBS
  2609.  
  2610.  
  2611.     MBUFS  Total number of allocated memory buffers.  Alias:  M
  2612.  
  2613.     CLUSTERS  Total number of allocated memory buffer clusters.  Alias:
  2614.         CL
  2615.  
  2616.     CLFREE  Number of memory buffer clusters free.  Alias:  CLF
  2617.  
  2618.     MDROPS  Times failed tofind space.  Alias:  MD
  2619.  
  2620.     NWAITED  Times waited for space.  Alias:  NW
  2621.  
  2622.     NDRAINED  Times drained protocols forspace.  Alias:  ND
  2623.  
  2624.     TOTALMEMORYUSED  Total amount of memory used for the mbufs.  Alias:
  2625.         TMU
  2626.  
  2627.  
  2628. MBUF_TYPE_STATS Returns type specific statistics of mbuf allocations.  The
  2629.     last number is the total number of mbufs allocated.  Alias:  MBTS
  2630.  
  2631. MBUF_CONF Memory buffer configuration.  Alias:  MBC
  2632.  
  2633.  
  2634.     INITIAL  Number of mbuf chunksto allocate initially.  Alias:  I
  2635.  
  2636.     CHUNK  Number ofmbufs to allocate at a time.  Alias:  CH
  2637.  
  2638.     CLCHUNK  Number of clusters toallocate at a time.  Alias:  CL
  2639.  
  2640.     MAXMEM  Maximum memoryto use (in kilobytes).  Alias:  MM
  2641.  
  2642.     CLUSTERSIZE  Size of an mbuf cluster.  Alias:  CS
  2643.  
  2644.  
  2645. System Manual                   AmiTCP/IP                   Section 2.5    23
  2646.  
  2647.  
  2648.  
  2649. LOG Logging system configuration.
  2650.  
  2651.  
  2652.     COUNT  Number oflog messages to use.
  2653.  
  2654.     LEN Maximum length of a log message.
  2655.  
  2656.  
  2657. TASKNAME Name of AmiTCP/IP task.
  2658.  
  2659.  
  2660. NTHBASE Current AmiTCP/IP has nth bsdsocket.library base currently in
  2661.     memory.  Alias:  NTH
  2662.  
  2663.  
  2664. DEBUGSANA  Boolean to switch the SANA-II device interface debugging on and
  2665.  
  2666.     off3.  Alias:  DBSANA
  2667.  
  2668.  
  2669. DEBUGICMP  Boolean to switch the ICMP debugging on and off.  Alias:
  2670.     DBICMP
  2671.  
  2672.  
  2673. DEBUGIP Boolean telling whether IP should log debugging information.
  2674.     Alias:  DBIP
  2675.  
  2676.  
  2677. GATEWAY Boolean to switch gateway functionality on and off.  Alias:  GTW
  2678.  
  2679.  
  2680. IPSENDREDIRECTS  Boolean telling whether IP should send ICMP redirect
  2681.     messages.  Alias:  REDIR
  2682.  
  2683.  
  2684. USENAMESERVER  How to use name server.  Possible values are:
  2685.  
  2686.  
  2687.     NO Do not use name server at all.  Local database will be used
  2688.         instead.
  2689.  
  2690.     FIRST  Query thename servers first and if that fails, use local
  2691.         database.
  2692.  
  2693.     SECOND  First look up the local database, then, if that fails, query
  2694.         the name servers.
  2695.  
  2696.  
  2697.     Alias:  USENS
  2698.  
  2699.  
  2700. USELOOPBACK  If true use the local loop device for local traffic.  Alias:
  2701.     ULO
  2702.  
  2703.  
  2704. TCP_SENDSPACE  Default size of the sending socket buffer (TCP). Alias:
  2705.     TCPSND
  2706.  
  2707.  
  2708. TCP_RECVSPACE  Default size of the receiving socket buffer (TCP). Alias:
  2709.     TCPRCV
  2710.  
  2711.  
  2712. CONSOLENAME  Filename for thelog console.  Alias:  CON
  2713.  
  2714.  
  2715. LOGFILENAME  Filename for thelog file.  Alias:  LOGF
  2716.  
  2717.  
  2718. ________________________________
  2719.    3See page 24 for description about boolean variable.
  2720.  
  2721.  
  2722. 24    Section 2.5                  AmiTCP/IP                   System Manual
  2723.  
  2724.  
  2725.  
  2726. Boolean variables
  2727.  
  2728. The variables documented as boolean accept their values in various
  2729.  
  2730. formats.  Boolean false may be given asNO4 , FALSE, OFF or 0.  YES, TRUE,
  2731. ON and 1 are considered as boolean true.
  2732.    The firstalternatives are used on output.
  2733.  
  2734.  
  2735.  
  2736. CONNECTIONS output format
  2737.  
  2738. CONNECTIONS query returns its result ina format which has
  2739. space-separated fields, connection afterconnection (not sorted).  Format
  2740. is as follows:
  2741.  
  2742.      _____________________________________________________________________
  2743.      !_Field_length_!___Value_type____!Description_______________________!_
  2744.      !_______1_______!char_`t'_or_`u'_!t_for_TCP_connection,_u_for_UDP_!__
  2745.      !_______4_______!__4-char_hex____!Receive_queue_length_____________!_
  2746.      !_______4_______!__4-char_hex____!Send_queue_length________________!_
  2747.      !_______8_______!__8-char_hex____!Local_address_____________________!_
  2748.      !_______4_______!__4-char_hex____!Local_port_number________________!_
  2749.      !_______8_______!__8-char_hex____!Foreign_address___________________!_
  2750.      !_______4_______!__4-char_hex____!Foreign_port_number______________!_
  2751.      !_______1_______!__1-char_hex____!State_of_connection______________!_
  2752.  
  2753.  
  2754.    The hexadecimal values are zero padded from left to their full length.
  2755. Last item presents the state of the TCPfinite state machine.  Possible
  2756. values for it are:
  2757.  
  2758.               ____________________________________________________
  2759.               !_Value_!State_of_TCP_FSM________________________!__
  2760.               !___0___!Closed___________________________________!_
  2761.               !___1___!Listening_for_connection________________!__
  2762.               !___2___!Active,_has_sent_SYN____________________!__
  2763.               !___3___!Has_send_and_received_SYN______________!___
  2764.               !___4___!Established______________________________!_
  2765.               !___5___!Received_FIN,_waiting_forclose_________!___
  2766.               !___6___!Has_been_closed,_sent_FIN______________!___
  2767.               !___7___!Closed_exchanged_FIN;_awaiting_FIN_ACK_!___
  2768.               !___8___!Had_FIN_and_close;_awaiting_FIN_ACK_____!__
  2769.               !___9___!Has_been_closed,_FIN_is_acknowledged___!___
  2770.               !___A___!Is_in_2*msl_quiet_wait_after_close______!__
  2771.  
  2772.  
  2773.  
  2774. ICMPHIST output format
  2775.  
  2776. ICMPHIST query returns the ICMP historytable entries on one line
  2777. separated by spaces.  Outhistory is returned first beginning from the
  2778. entry 0.  Both tables contains 19 entries for differentICMP messages.
  2779. Note that all message types are not in use.   Message types are as
  2780. follows:________________________
  2781.  
  2782.    4Upper case keywords are used here for clarity only.  Lower case (or
  2783.  
  2784. mixed case) keywords are accepted as well.
  2785.  
  2786.  
  2787. System Manual                   AmiTCP/IP                   Section 2.5    25
  2788.  
  2789.  
  2790.  
  2791.                         ________________________________
  2792.                         !__0_e!cho_reply_______________!_
  2793.                         !__1_n!ot_used_________________!_
  2794.                         !__2_n!ot_used_________________!_
  2795.                         !__3_D!estination_unreachable_!_
  2796.                         !__4_P!acket_lost,_slow_down__!_
  2797.                         !__5_S!horter_route____________!_
  2798.                         !__6_n!ot_used_________________!_
  2799.                         !__7_n!ot_used_________________!_
  2800.                         !__8_E!cho_service_____________!_
  2801.                         !__9_n!ot_used_________________!_
  2802.                         !_10_!not_used_________________!_
  2803.                         !_11_!Time_exceeded____________!_
  2804.                         !_12_!IP_header_bad____________!_
  2805.                         !_13_!Timestamp_request________!_
  2806.                         !_14_!Timestamp_reply__________!_
  2807.                         !_15_!Information_request_____!_
  2808.                         !_16_!Information_reply________!_
  2809.                         !_17_!Address_mask_request____!_
  2810.                         !_18_!Address_mask_reply______!_
  2811.  
  2812.  
  2813. 26    Section 2.5                  AmiTCP/IP                   System Manual
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819. Appendix A
  2820.  
  2821.  
  2822.  
  2823. Autodocs  for  Network Applications
  2824.  
  2825.  
  2826.  
  2827. and  Utilities
  2828.  
  2829.  
  2830.  
  2831. The AutoDoc file netutil.doc contains on-line manual pages for the
  2832. network utilities and applications.
  2833.  
  2834.  
  2835.  
  2836. Table  of  Contents
  2837.  
  2838.  
  2839.         arp : : : : : : : :: : : : : : : : : : : : : : : : : : : : : : : : : : *
  2840.  *: : : : : : : : : : 112
  2841.         ifconfig : : : : : : : : : : : : : : : : : : : : :: : : : : : : : : : :*
  2842.  * : : : : : : : : 114
  2843.         inetd : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  2844.  * : : :: : : : : : 117
  2845.         letnet  : : : : : : : : : :: : : : : : : : : : : : : : : : : : : : : : *
  2846.  *: : : : : : : : : 119
  2847.         offline : : : : : : :: : : : : : : : : : : : : : : : : : : : : : : : : *
  2848.  *: : : : : : : : : 120
  2849.         online  : : : : : : : : : :: : : : : : : : : : : : : : : : : : : : : : *
  2850.  *: : : : : : : : : 121
  2851.         ping : : : : : : : : : : : : : : : : : : : : : :: : : : : : : : : : : :*
  2852.  * : : : : : : : : : 122
  2853.         route : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :*
  2854.  * : : :: : : : : : 126
  2855.  
  2856.  
  2857.  
  2858.                                       111
  2859.  
  2860.  
  2861. 112    Section A.1                 AmiTCP/IP                  System Manual
  2862.  
  2863.  
  2864.  
  2865. A.1     Network Utilities
  2866.  
  2867.  
  2868.  
  2869. A.1.1   arp
  2870.  
  2871.  
  2872.   NAME
  2873.         Arp- address resolution display and control
  2874.  
  2875.  
  2876.   SYNOPSIS
  2877.         arp hostname
  2878.         arp-a netname
  2879.         arp-d hostname
  2880.         arp-s hostname address [temp] [pub]
  2881.         arp-f filename
  2882.  
  2883.  
  2884.   DESCRIPTION
  2885.         Arpdisplays and modifies the Internet to hardware address
  2886.         translation tables used by the Address Resolution Protocol.
  2887.         Thehardware address is a hexadecimal string with each octet
  2888.         separated by a colon, for instance 0:12:ff:a. The length of
  2889.         theaddress must be same as the address of the specified
  2890.         interface.
  2891.  
  2892.  
  2893.   OPTIONS
  2894.          none  If no options arespecified (first form above), arp
  2895.               displays the current ARP entry for hostname.   The
  2896.               hostname must either appear in the hostname database
  2897.               (SEE hosts), or be a DARPA Internet address expressed in
  2898.               Internet standard "dot notation".
  2899.  
  2900.  
  2901.         -a    Display all current ARP entries by reading the address
  2902.               mapping table of the specified interface.
  2903.  
  2904.  
  2905.         -d   If an ARP entry exists for the host called hostname, delete
  2906.               it. This requires super-user privileges.
  2907.  
  2908.  
  2909.         -s    Create an ARP entry for the host called hostname with the
  2910.               hardware station address address. The hardware station address
  2911.               is given as six hexadecimal bytes separated by colons.  If an
  2912.               ARP entry already exists for hostname,the existing entry is
  2913.               updated with the new information.  The entry is permanent
  2914.               unless the word temp is given in the command. If the word pub
  2915.               is specified, the entry is published, which means that this
  2916.               system will act as an ARP server responding to requests for
  2917.               hostname even though the host address is not its own.
  2918.  
  2919.  
  2920.         -f    Read file filename and set multiple entries in the ARP tables.
  2921.               Entries in the file should be of the form:
  2922.  
  2923.  
  2924.                    hostname address [temp] [pub]
  2925.  
  2926.  
  2927.               Argument meanings are the same as for the -s option.
  2928.  
  2929.  
  2930.   AUTHOR
  2931.         Arpwas developed by the University of California, Berkeley, for the
  2932.         BSDUnix system.
  2933.  
  2934.  
  2935. System Manual                  AmiTCP/IP                 Section A.1    113
  2936.  
  2937.  
  2938.  
  2939.   SEE ALSO
  2940.         ifconfig, netif.protocols/arp, "net/if_arp.h"
  2941.  
  2942.  
  2943. 114    Section A.1                 AmiTCP/IP                  System Manual
  2944.  
  2945.  
  2946.  
  2947. A.1.2   ifconfig
  2948.  
  2949.  
  2950.   NAME
  2951.         ifconfig - configure network interface parameters
  2952.  
  2953.  
  2954.   SYNOPSIS
  2955.         ifconfig interface address_family [address [dest_address]] [params]
  2956.         ifconfig interface [address_family]
  2957.  
  2958.  
  2959.   DESCRIPTION
  2960.         ifconfig is used to assign an address to a network interface and/or
  2961.         configure network interface parameters.  ifconfig must be used at
  2962.         boot time to define the network address of each interface present on
  2963.         a machine.   It can also be used at other times to redefine an
  2964.         interface's address or other operating parameters.
  2965.  
  2966.  
  2967.   PARAMETERS
  2968.         interface     A string of the unit name. The device name (e.g.
  2969.                        'a2065.device') concatenated with a slash ('/') and the
  2970.                        unit number ('11'), for example 'a2065.device/11' is a
  2971.                        legal unit name.
  2972.  
  2973.  
  2974.         address_family
  2975.                       Name of protocol on which naming scheme is based.  An
  2976.                        interface can receive transmissions in differing
  2977.                        protocols, each of which may require separate naming
  2978.                        schemes.   Therefore,it is necessary to specify the
  2979.                        address_family, which may affect interpretation of the
  2980.                        remaining parameters on the command line.  The only
  2981.                        addressfamily currently supported is inet (DARPA-
  2982.                        Internet  family).
  2983.  
  2984.  
  2985.         address       Either a host name present in the host name database,
  2986.                        (SEE hosts), or a DARPA Internet address
  2987.                        expressed in Internet standard "dot notation".  The
  2988.                        host number can be omitted on 10-Mbyte/second Ethernet
  2989.                        interfaces (which use the hardware physical address),
  2990.                        and oninterfaces other than the first.
  2991.  
  2992.  
  2993.         dest_address Address of destination system.  Consists of either a
  2994.                        host name present in the host name database, hosts(4),
  2995.                        or a DARPA Internet address expressed in Internet
  2996.                        standard "dot notation".
  2997.  
  2998.  
  2999.   SWITCHES
  3000.         Thefollowing operating parameters can be specified:
  3001.  
  3002.  
  3003.          up           Mark an interface "up". Enables interface after an
  3004.                        "ifconfig down."   Occurs automatically when setting the
  3005.                        addresson an interface.  Setting this flag has no
  3006.                        effectif the hardware is "down".
  3007.  
  3008.  
  3009.          down         Mark an interface "down".  When an interface is
  3010.                        marked"down", the system will not attempt to
  3011.                        transmit messages through that interface. If
  3012.                        possible, the interface will be reset to disable
  3013.  
  3014.  
  3015. System Manual                  AmiTCP/IP                 Section A.1    115
  3016.  
  3017.  
  3018.  
  3019.                        reception as well.  This action does not
  3020.                        automatically disable routes using the interface.
  3021.  
  3022.  
  3023.         arp           Enable the use of Address Resolution Protocol in
  3024.                        mappingbetween network level addresses and link-level
  3025.                        addresses  (default).
  3026.  
  3027.  
  3028.         -arp           Disable the use of Address Resolution Protocol.
  3029.  
  3030.  
  3031.          metric n     Set the routing metric of the interface to n,
  3032.                        default0.   The routing metric is used by the routing
  3033.                        protocol (see gated(1m)).  Higher metrics have the
  3034.                        effectof making a route less favorable; metrics are
  3035.                        countedas additional hops to the destination network
  3036.                        or host.
  3037.  
  3038.  
  3039.          debug         Enable driver-dependent debugging code. This usually
  3040.                        turns on extra console error logging.
  3041.  
  3042.  
  3043.         -debug         Disable driver-dependent debugging code.
  3044.  
  3045.  
  3046.          netmask mask (Inet only) Specify how much of the address to reserve
  3047.                        for subdividing networks into sub-networks.  mask
  3048.                        includes the network part of the local address, and the
  3049.                        subnetpart which is taken from the host field of the
  3050.                        address.   mask can be specified as a single hexadecimal
  3051.                        numberwith a leading 0x, with a dot-notation Internet
  3052.                        address, or with a pseudo- network name listed in the
  3053.                        networktable networks(4).  mask contains 1's for each
  3054.                        bit position in the 32-bit address that are to be used
  3055.                        for thenetwork and subnet parts, and 0's for the host
  3056.                        part.  mask should contain at least the standard
  3057.                        networkportion, and the subnet field should be
  3058.                        contiguous with the network portion.
  3059.  
  3060.  
  3061.         broadcast     (Inet only) Specify the address that represents
  3062.                        broadcasts to the network.  The default broadcast
  3063.                        addressis the address with a host part of all 1's.
  3064.  
  3065.  
  3066.         The command:
  3067.  
  3068.  
  3069.              ifconfig interface/unit
  3070.  
  3071.  
  3072.         with no optional command arguments supplied displays the current
  3073.         configuration for interface.  If address_family is specified,
  3074.         ifconfig reports only the details specific to that address family.
  3075.  
  3076.  
  3077.   DIAGNOSTICS
  3078.  
  3079.  
  3080.         Messages indicating that the specified interface does not exist, the
  3081.         requested address is unknown, or the user is not privileged and
  3082.         tried to alter an interface's configuration.
  3083.  
  3084.  
  3085.   EXAMPLES
  3086.  
  3087.  
  3088. 116    Section A.1                 AmiTCP/IP                  System Manual
  3089.  
  3090.  
  3091.  
  3092.         ifconfig lo/0 127.0.0.1
  3093.  
  3094.  
  3095.                 This command marks internal loopback device "UP", and
  3096.                 attach an inet address 127.0.0.1 to it.
  3097.  
  3098.  
  3099.         ifconfig cslip.device/0 inet 193.102.4.144 193.102.4.129
  3100.  
  3101.  
  3102.                 This command starts the CSLIP driver, attach an
  3103.                 address 193.102.4.144 (our internet address) and a
  3104.                 destination address 193.102.4.129 (the internet
  3105.                 address of the host you are connecting) to it.
  3106.  
  3107.  
  3108.         ifconfig devs:network/a2065.device/0 inet 193.124.100.64 +
  3109.         netmask 255.255.255.192 -arp
  3110.  
  3111.  
  3112.                 This command loads an ethernet driver for the
  3113.                 Commodore A2065 Ethernet adapter unit 0, marks it
  3114.                 "up", disables ARP protocol for it, attaches an inet
  3115.                 address 193.124.100.65 to it and sets its netmask to
  3116.                 255.255.255.192.  A bitwise logical and of netmask and
  3117.                 address for the interface forms a subnet address, in
  3118.                 this case 193.124.100.64.  All packets aimed to hosts
  3119.                 with same subnet address (that is hosts 193.124.100.64
  3120.                 - 193.124.100.127) are routed to this interface.
  3121.  
  3122.  
  3123.   SEE ALSO
  3124.         netstat, hosts, arp, "net/if.h", "net/sana2tags.h"
  3125.  
  3126.  
  3127. System Manual                  AmiTCP/IP                 Section A.1    117
  3128.  
  3129.  
  3130.  
  3131. A.1.3   inetd
  3132.  
  3133.  
  3134.   NAME
  3135.          inetd - internet ``super-server''
  3136.  
  3137.  
  3138.   TEMPLATE
  3139.         inetd DEBUG/S CONFIGFILE
  3140.  
  3141.  
  3142.   DESCRIPTION
  3143.  
  3144.  
  3145.         Inetd should be run when the AmiTCP/IP protocol stack is started.
  3146.         Inetd listens for connections on certain internet sockets.  When a
  3147.         connection is found on one of its sockets, it decides what service the
  3148.         socket corresponds to, and invokes a program to service the request.
  3149.         After the program is finished, it continues to listen on the socket
  3150.         (except in some cases which will be described below).  Essentially,
  3151.         inetd allows running one daemon to invoke several others, reducing
  3152.         load on the system.
  3153.  
  3154.  
  3155.   PARAMETERS
  3156.         DEBUG       Turns on debugging.
  3157.  
  3158.  
  3159.         CONFIGFILE Specifies the configuration file name.
  3160.  
  3161.  
  3162.   CONFIGURATION
  3163.  
  3164.  
  3165.         Upon execution, inetd reads its configuration information from a
  3166.         configuration file which, by default, is AmiTCP:db/inetd.conf. There
  3167.         must be an entry for each field of the configuration file, with
  3168.         entries for each field separated by a tab or a space.  Comments are
  3169.         denoted by a ``#'' at the beginning of a line or ``;'' anywhere in the
  3170.         line. There must be an entry for each field. The fields of the
  3171.         configuration file are as follows:
  3172.  
  3173.  
  3174.               service name
  3175.               socket type
  3176.               protocol
  3177.               wait/nowait
  3178.               user
  3179.               server program
  3180.               server program name
  3181.               server program arguments
  3182.  
  3183.  
  3184.         Theservice-name entry is the name of a valid service in the
  3185.         netdatabase.   For ``internal'' services (discussed below), the service
  3186.         name must be the official name of the service.
  3187.  
  3188.  
  3189.         Thesocket-type should be one of ``stream'', ``dgram'', ``raw'',
  3190.         ``rdm'', or ``seqpacket'', depending on whether the socket is a
  3191.         stream, datagram, raw, reliably delivered message, or sequenced packet
  3192.         socket. Current system supports only stream, datagram and raw
  3193.         protocols.
  3194.  
  3195.  
  3196.         Theprotocol must be a valid protocol as given in netdatabase.
  3197.         Examples might be ``tcp'' or ``udp''.
  3198.  
  3199.  
  3200. 118    Section A.1                 AmiTCP/IP                  System Manual
  3201.  
  3202.  
  3203.  
  3204.         Thewait/nowait entry is useful for datagram sockets only (other
  3205.         sockets should have a ``nowait'' entry in this space).  If a datagram
  3206.         server connects to its peer, freeing the socket so inetd can received
  3207.         further messages on the socket, it is said to be a ``multi-threaded''
  3208.         server, and should use the ``nowait'' entry.  For datagram servers
  3209.         which process all incoming datagrams on a socket and eventually time
  3210.         out, the server is said to be ``single-threaded'' and should use a
  3211.         ``wait'' entry.  Comsat and talkd are both examples of the latter type
  3212.         ofdatagram server.
  3213.  
  3214.  
  3215.         Theuser entry should contain the user name of the user as whom the
  3216.         server should run. This field is for Unix and future compability
  3217.         only.
  3218.  
  3219.  
  3220.         Theserver-program entry should contain the pathname of the program
  3221.         which is to be executed by inetd when a request is found on its
  3222.         socket.   If theserver program is resident, the path name should be
  3223.         suppressed. If inetd provides this service internally, this entry
  3224.         should be ``internal''.
  3225.  
  3226.  
  3227.         Theserver-program-name is CLI command name for the server process. It
  3228.         isshown in the printout of ``status'' command. (Task name of the
  3229.         server process is the service and the peer address, e.g. ``echo
  3230.         [192.233.15.19]''.) This and argument entry are optional.
  3231.  
  3232.  
  3233.         Theserver program arguments should be just as arguments normally are.
  3234.  
  3235.  
  3236.         Inetd provides several ``trivial'' services internally by use of
  3237.         routines within itself.  These services are ``echo'', ``discard'',
  3238.         ``chargen'' (character generator), ``daytime'' (human readable time),
  3239.         and``time'' (machine readable time, in the form of the number of
  3240.         seconds since mid night, January 1, 1900).  All of these services are
  3241.         TCPand UDP based.  For details of these services, consult the
  3242.         appropriate RFC from the Network Information Center.
  3243.  
  3244.  
  3245.         Inetd rereads its configuration file when it receives the CTRL-F
  3246.         signal.   Services may be added, deleted or modified when the
  3247.         configuration file is reread.
  3248.  
  3249.  
  3250.   HISTORY
  3251.         Theinetd command appeared in 4.3BSD system.
  3252.  
  3253.  
  3254.   SEE ALSO
  3255.  
  3256.  
  3257. System Manual                  AmiTCP/IP                 Section A.1    119
  3258.  
  3259.  
  3260.  
  3261. A.1.4   letnet
  3262.  
  3263.   NAME
  3264.         Letnet - a simple TCP connection tool
  3265.  
  3266.  
  3267.   SYNOPSIS
  3268.         letnet  HOSTNAME/A,PORT/A
  3269.  
  3270.  
  3271.   DESCRIPTION
  3272.         Letnet connects to the specified TCP port at the specified host. The
  3273.         data read from standard input is sent to the host and data received
  3274.         from the connection is written to the standard output. Letnet
  3275.         terminates upon shutdown of the socket or receiving SIGBREAKF_CTRL_C
  3276.         signal.
  3277.  
  3278.  
  3279.   ARGUMENTS
  3280.          HOSTNAME/A
  3281.                 If there is no name service available, hostname maybe given
  3282.                 in the Internet dot notation.
  3283.  
  3284.  
  3285.          PORT/A
  3286.                 The port identifier is searched from the standard services
  3287.                 (SEE ALSO netdb/services) database. A nonstandard
  3288.                 service port may be specified in the numeric form,numbers
  3289.                 between 1---65535 are acceptable.
  3290.  
  3291.  
  3292.   AUTHOR
  3293.         Pekka Pessi, the AmiTCP/IP Group, Helsinki University of Technology
  3294.  
  3295.  
  3296.   SEE ALSO
  3297.         netdb/services, netdb/hosts
  3298.  
  3299.  
  3300. 120    Section A.1                 AmiTCP/IP                  System Manual
  3301.  
  3302.  
  3303.  
  3304. A.1.5   offline
  3305.  
  3306.   NAME
  3307.         Offline - put a SANA-II device offline
  3308.  
  3309.  
  3310.   TEMPLATE
  3311.         Offline DEV=DEVICE devicename[/unit] [UNIT unit]
  3312.  
  3313.  
  3314.   DESCRIPTION
  3315.         Offline sends the S2_OFFLINE command to the given SANA-II device
  3316.         driver and unit. This command is normally used to disconnect SANA-II
  3317.         device driver from the network adapter hardware. Device driver does
  3318.         notaccept any more read or write requests.
  3319.  
  3320.  
  3321.   EXAMPLES
  3322.         This command puts the SLIP offline, which frees then the serial port
  3323.         toyour use.
  3324.  
  3325.  
  3326.         OFFLINE  slip.device/1
  3327.  
  3328.  
  3329.   SEE ALSO
  3330.         Online,  sana2.device/S2_OFFLINE
  3331.  
  3332.  
  3333. System Manual                  AmiTCP/IP                 Section A.1    121
  3334.  
  3335.  
  3336.  
  3337. A.1.6   online
  3338.  
  3339.   NAME
  3340.         Online - put a SANA-II device online
  3341.  
  3342.  
  3343.   TEMPLATE
  3344.         Online DEV=DEVICE devicename[/unit] [UNIT unit]
  3345.  
  3346.  
  3347.   DESCRIPTION
  3348.         Online sends the S2_ONLINE command to the given SANA-II device driver
  3349.         andunit. The device driver restarts the network adapter hardware and
  3350.         accepts read and write request again.
  3351.  
  3352.  
  3353.   EXAMPLES
  3354.  
  3355.  
  3356.         This command puts the Commodore Ethernet driver online.
  3357.  
  3358.  
  3359.         Online  a2065.device/0
  3360.  
  3361.  
  3362.   SEE ALSO
  3363.         Offline, sana2.device/S2_ONLINE
  3364.  
  3365.  
  3366. 122    Section A.1                 AmiTCP/IP                  System Manual
  3367.  
  3368.  
  3369.  
  3370. A.1.7   ping
  3371.  
  3372.  
  3373.    NAME
  3374.         ping - send ICMP ECHO_REQUEST packets to network hosts
  3375.  
  3376.  
  3377.    SYNOPSIS
  3378.         ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern]
  3379.              [-s packetsize]
  3380.  
  3381.  
  3382.    DESCRIPTION
  3383.         Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
  3384.         elicit an ICMP ECHO_RESPONSE from a host or gateway.  ECHO_REQUEST
  3385.         datagrams (``pings'') have an IP and ICMP header, followed by a
  3386.         ``struct timeval'' and then an arbitrary number of ``pad'' bytes
  3387.         used to fill out the packet.  The options are as follows: Other
  3388.         options  are:
  3389.  
  3390.  
  3391.         -c count
  3392.                 Stop after sending (and receiving) count ECHO_RESPONSE
  3393.                 packets.
  3394.  
  3395.  
  3396.         -d      Set the SO_DEBUG option on the socketbeing used.
  3397.  
  3398.  
  3399.         -f      Flood ping.  Outputs packets as fast as they come back or
  3400.                 one hundred times per second, whichever is more.  For every
  3401.                 ECHO_REQUEST sent a period ``.'' is printed, whilefor ever
  3402.                 ECHO_REPLY received a backspace is printed.  This provides a
  3403.                 rapid display of how many packets are being dropped.   Only
  3404.                 the super-user may use this option.  This can be very hard
  3405.                 on a network and should be used with caution.
  3406.  
  3407.  
  3408.         -i wait
  3409.                 Wait wait seconds between sending each packet. Thedefault
  3410.                 is to wait for one second between each packet.  This option
  3411.                 is incompatible with the -f option.
  3412.  
  3413.  
  3414.         -l preload
  3415.                 If preload is specified, ping sends that many packets as
  3416.                 fast as possible before falling into its normal mode of
  3417.                 behavior.
  3418.  
  3419.  
  3420.         -n      Numeric output only.  No attempt will be made to lookup
  3421.                 symbolic names for host addresses.
  3422.  
  3423.  
  3424.         -p pattern
  3425.                 You may specify up to 16 ``pad'' bytes to fill outthe
  3426.                 packet you send.  This is useful for diagnosing
  3427.                 data-dependent problems in a network.  For example, ``-p
  3428.                 ff'' will cause the sent packet to be filled with all ones.
  3429.  
  3430.  
  3431.         -q      Quiet output.  Nothing is displayed except the summary lines
  3432.                 at startup time and when finished.
  3433.  
  3434.  
  3435.         -R      Record route.  Includes the RECORD_ROUTE option inthe
  3436.                 ECHO_REQUEST packet and displays the route buffer on
  3437.                 returned packets.  Note that the IP header is only large
  3438.  
  3439.  
  3440. System Manual                  AmiTCP/IP                 Section A.1    123
  3441.  
  3442.  
  3443.  
  3444.                 enough for nine such routes.  Many hosts ignore or discard
  3445.                 this option.
  3446.  
  3447.  
  3448.         -r      Bypass the normal routing tables andsend directly to a host
  3449.                 on an attached network.  If the host is not on a
  3450.                 directly-attached network, an error is returned.  This
  3451.                 option can be used to ping a local host through aninterface
  3452.                 that has no route through it.
  3453.  
  3454.  
  3455.         -s packetsize
  3456.                 Specifies the number of data bytes to be sent.  The default
  3457.                 is 56, which translates into 64 ICMP data bytes when
  3458.                 combined with the 8 bytes of ICMP header data.
  3459.  
  3460.  
  3461.         -v      Verbose output.  ICMP packets other than ECHO_RESPONSE that
  3462.                 are received are listed.
  3463.  
  3464.  
  3465.         When using ping for fault isolation, it should first be run on the
  3466.         local host, to verify that the local network interface is up and
  3467.         running.   Then,hosts and gateways further and further away should
  3468.         be``pinged''.   Round-trip times and packet loss statistics are
  3469.         computed.   If duplicate packets are received, they are not included
  3470.         inthe packet loss calculation, although the round trip time of
  3471.         these packets is used in calculating the minimum/average/maximum
  3472.         round-trip time numbers.  When the specified number of packets have
  3473.         been sent (and received) or if the program is terminated with a
  3474.         SIGINT, a brief summary is displayed.
  3475.  
  3476.  
  3477.         This program is intended for use in network testing, measurement and
  3478.         management.   Because of the load it can impose on the network, it is
  3479.         unwise to use ping during normal operations or from automated
  3480.         scripts.
  3481.  
  3482.  
  3483.    ICMP PACKET DETAILS
  3484.         AnIP header without options is 20 bytes.  An ICMP ECHO_REQUEST
  3485.         packet contains an additional 8 bytes worth of ICMP header followed
  3486.         byan arbitrary amount of data.  When a packetsize is given, this
  3487.         indicated the size of this extra piece of data (the default is 56).
  3488.         Thus the amount of data received inside of an IP packet of type ICMP
  3489.         ECHO_REPLY will always be 8 bytes more than the requested data space
  3490.         (the ICMP header).
  3491.  
  3492.  
  3493.         Ifthe data space is at least eight bytes large, ping uses the first
  3494.         eight bytes of this space to include a timestamp which it uses in
  3495.         thecomputation of round trip times.  If less than eight bytes of
  3496.         padare specified, no round trip times are given.
  3497.  
  3498.  
  3499.    DUPLICATE AND DAMAGED PACKETS
  3500.         Ping will report duplicate and damaged packets.  Duplicate packets
  3501.         should never occur, and seem to be caused by inappropriate
  3502.         link-level retransmissions.  Duplicates may occur in many situations
  3503.         andare rarely (if ever) a good sign, although the presence of low
  3504.         levels of duplicates may not always be cause for alarm.
  3505.  
  3506.  
  3507.         Damaged packets are obviously serious cause for alarm and often
  3508.  
  3509.  
  3510. 124    Section A.1                 AmiTCP/IP                  System Manual
  3511.  
  3512.  
  3513.  
  3514.         indicate broken hardware somewhere in the ping packet's path (in the
  3515.         network or in the hosts).
  3516.  
  3517.  
  3518.    TRYING DIFFERENT DATA PATTERNS
  3519.         The(inter)network layer should never treat packets differently
  3520.         depending on the data contained in the data portion.  Unfortunately,
  3521.         data-dependent problems have been known to sneak into networks and
  3522.         remain undetected for long periods of time.  In many cases the
  3523.         particular pattern that will have problems is something that doesn't
  3524.         have sufficient ``transitions'', such as all ones or all zeros, or a
  3525.         pattern right at the edge, such as almost all zeros.  It isn't
  3526.         necessarily enough to specify a data pattern of all zeros (for
  3527.         example) on the command line because the pattern that is of interest
  3528.         isat the data link level, and the relationship between what you
  3529.         type and what the controllers transmit can be complicated.
  3530.  
  3531.  
  3532.         This means that if you have a data-dependent problem you will
  3533.         probably have to do a lot of testing to find it.  If you are lucky,
  3534.         youmay manage to find a file that either can't be sent across your
  3535.         network or that takes much longer to transfer than other similar
  3536.         length files.   You can then examine this file for repeated patterns
  3537.         that you can test using the -p option of ping.
  3538.  
  3539.  
  3540.    TTL DETAILS
  3541.         TheTTL value of an IP packet represents the maximum number of IP
  3542.         routers that the packet can go through before being thrown away.  In
  3543.         current practice you can expect each router in the Internet to
  3544.         decrement the TTL field by exactly one.
  3545.  
  3546.  
  3547.         TheTCP/IP specification states that the TTL field for TCP packets
  3548.         should be set to 60, but many systems use smaller values (4.3 BSD
  3549.         uses 30, 4.2 used 15). The AmiTCP/IP uses normally TTL value 30.
  3550.  
  3551.  
  3552.         Themaximum possible value of this field is 255, and most systems
  3553.         setthe TTL field of ICMP ECHO_REQUEST packets to 255.  This is why
  3554.         youwill find you can ``ping'' some hosts, but not reach them with
  3555.         telnet or ftp.
  3556.  
  3557.  
  3558.         Innormal operation ping prints the ttl value from the packet it re-
  3559.         ceives.   When aremote system receives a ping packet, it can do one
  3560.         ofthree things with the TTL field in its response:
  3561.  
  3562.  
  3563.            Not change it; this is what Berkeley Unix systems did before the
  3564.             4.3BSD-Tahoe release.  In this case the TTL value in the
  3565.             received packet will be 255minus the number of routers in the
  3566.             round-trip path.
  3567.  
  3568.  
  3569.            Set it to 255; this is what AmiTCP/IP and current Berkeley Unix
  3570.             systems do.  In this case the TTL value in the received packet
  3571.             will be 255 minus the number of routers in the path from the
  3572.             remote system to the pinging host.
  3573.  
  3574.  
  3575.            Set it to some othervalue.   Some machines use the same value
  3576.             for ICMP packets that theyuse for TCP packets, for example
  3577.             either 30 or 60.  Others may use completely wild values.
  3578.  
  3579.  
  3580. System Manual                  AmiTCP/IP                 Section A.1    125
  3581.  
  3582.  
  3583.  
  3584.    BUGS
  3585.         Many Hosts and Gateways ignore the RECORD_ROUTE option.
  3586.  
  3587.  
  3588.         Themaximum IP header length is too small for options like
  3589.         RECORD_ROUTE to be completely useful.  There's not much that that
  3590.         canbe done about this, however.
  3591.  
  3592.  
  3593.         Flood pinging is not recommended in general, and flood pinging the
  3594.         broadcast address should only be done under very controlled
  3595.         conditions.
  3596.  
  3597.  
  3598.    SEE ALSO
  3599.         netstat,   ifconfig
  3600.  
  3601.  
  3602.    AUTHOR
  3603.         Theping command originally appeared in 4.3BSD.
  3604.  
  3605.  
  3606. 126    Section A.1                 AmiTCP/IP                  System Manual
  3607.  
  3608.  
  3609.  
  3610. A.1.8   route
  3611.  
  3612.  
  3613.    NAME
  3614.          route - manually manipulate the routing tables
  3615.  
  3616.  
  3617.    SYNOPSIS
  3618.          route [-n] [-q] [-v] command [modifiers] destination gateway
  3619.  
  3620.  
  3621.    DESCRIPTION
  3622.          Route isa program used to manually manipulate the network routing
  3623.          tables.
  3624.  
  3625.  
  3626.          Options supported by route:
  3627.  
  3628.  
  3629.          -n      Prevent attempts to print host and networknames
  3630.                  symbolically when reporting actions.
  3631.  
  3632.  
  3633.          -v      (verbose) Print additional details.
  3634.  
  3635.  
  3636.          -q      Suppress all output.
  3637.  
  3638.  
  3639.          Commandsaccepted by route:
  3640.  
  3641.  
  3642.          add         Add a route.
  3643.          delete      Delete a specific route.
  3644.  
  3645.  
  3646.          The destination is the destination host or network, gateway is the
  3647.          next-hopgateway to which packets should be addressed. Routes to a
  3648.          particular host are distinguished from those to a network by
  3649.          interpreting the Internet address associated with destination. The
  3650.          optionalmodifiers -net and -host force the destination to be
  3651.          interpreted as a network or a host, respectively.  Otherwise, if the
  3652.          destination has a ``local address part'' of INADDR_ANY, or if the
  3653.          destination is the symbolic name of a network, then the route is
  3654.          assumed to be to a network; otherwise, it is presumed to be a route
  3655.          to a host.
  3656.  
  3657.  
  3658.          For example, 128.32 is interpreted as -host 128.0.0.32; 128.32.130
  3659.          is interpreted as -host 128.32.0.130; -net 128.32 is interpreted as
  3660.          128.32.0.0; and -net 128.32.130 is interpreted as 128.32.130.0.
  3661.  
  3662.  
  3663.          To add adefault route, give the destination as 'default'.
  3664.  
  3665.  
  3666.          If the route is via an interface rather than via a gateway, the
  3667.          -interface modifier should be specified; the gateway given is the
  3668.          address of this host on the common network, indicating the interface
  3669.          to be used for transmission.
  3670.  
  3671.  
  3672.          The optional -netmask qualifier is used to specify the netmask of
  3673.          the interface. One specifies an additional ensuing address parameter
  3674.          (to be interpreted as a network mask).  The implicit network mask
  3675.          generatedcan be overridden by making sure this option follows the
  3676.          destination  parameter.
  3677.  
  3678.  
  3679.          All symbolic names specified for a destination or gateway are looked
  3680.          up firstas a host name using gethostbyname(). If this lookup fails,
  3681.  
  3682.  
  3683. System Manual                  AmiTCP/IP                 Section A.1    127
  3684.  
  3685.  
  3686.  
  3687.          getnetbyname() is then used to interpret the name as that of a
  3688.          network.
  3689.  
  3690.  
  3691.    DIAGNOSTICS
  3692.          add [host_ network ] %s: gateway %s flags %x
  3693.                  The specified route is being added to the tables. The values
  3694.                  printed are from the routing table entry supplied in the
  3695.                  IoctlSocket() call. If the gateway address used was not the
  3696.                  primary address of the gateway (the first one returned by
  3697.                  gethostbyname()), the gateway address is printed numerically
  3698.                  as well as symbolically.
  3699.  
  3700.  
  3701.          delete [host _ network ] %s: gateway %s flags %x
  3702.                  As above, but when deleting an entry.
  3703.  
  3704.  
  3705.          Network is unreachable
  3706.                  An attempt to add a route failed because the gateway listed
  3707.                  was not on a directly-connected network.  The next-hop
  3708.                  gateway must be given.
  3709.  
  3710.  
  3711.          not in table
  3712.                  A delete operation was attempted for an entry which wasn't
  3713.                  present in the tables.
  3714.  
  3715.  
  3716.          routing table overflow
  3717.                  An add operation was attempted, but the system was low on
  3718.                  resources and was unable to allocate memory to create the
  3719.                  new entry.
  3720.  
  3721.  
  3722.    SEE ALSO
  3723.          ifconfig, protocols/routing
  3724.  
  3725.  
  3726.    HISTORY
  3727.          The routecommand appeared in 4.2BSD.
  3728.  
  3729.  
  3730.  
  3731.  
  3732.  
  3733. Glossary
  3734.  
  3735.  
  3736.  
  3737. API Application Program Interface.  Standard function calls, messages and
  3738.     devices used in application level programs.
  3739.  
  3740.  
  3741. Arcnet Yet another network type, transfer rate 5Mbits/sec.
  3742.  
  3743.  
  3744. ARexx ARexx is a specific implementation of the Rexx language forthe
  3745.     Amiga.  Rexx itself is a script language with superb power/simplicity
  3746.     ratio, originally developed for some IBM mainframe systems.
  3747.  
  3748.  
  3749. ARP Address Resolution Protocol.  A communication protocol used tomap
  3750.     protocol address to network address dynamically.  For example, ARP is
  3751.     used to map DARPA Internet addresses into Ethernet addresses.
  3752.  
  3753.  
  3754. AutoDoc Document generated automagically from comments included in
  3755.     program source code.  Mainly used to describe shared library
  3756.     functions in AmigaOS. See [RKM Inc & ADoc 1992 ].
  3757.  
  3758.  
  3759. BSD Berkeley Software Distribution.  Family of UNIX versions for the DEC
  3760.     (VAX) and PDP-11 developed by Bill Joy and others at Berzerkeley
  3761.     starting around 1980, incorporating paged virtual memory, TCP/IP
  3762.     networking enhancements, and many other features.  The BSD versions
  3763.     (4.1, 4.2, and 4.3) and the commercial versions derived from them
  3764.     (SunOS, ULTRIX, and Mt.  Xinu) held the technical lead in the UNIX
  3765.     world until AT&T's successful standardization efforts after about
  3766.     1986, and are still widely popular.
  3767.  
  3768.  
  3769. BSDSS BSD Single Server is operating system server in Mach operating
  3770.     system where all UNIX services are in single binary.
  3771.  
  3772.  
  3773. (D)ARPA Internet  The collection of networks using internet protocols.
  3774.     (D)ARPA Internet originated from a research project sponsored by the
  3775.     (Defense) Advanced Research Project Agency.
  3776.  
  3777.  
  3778. Daemon 'A deified being', program that lives forever on system, or
  3779.     reincarnates every time it is needed.  Performs its requested task
  3780.     promptly and goes back to sleep.
  3781.  
  3782.  
  3783. Data link layer  Protocol layer providing data transfer between machines
  3784.     in same physical network.
  3785.  
  3786.  
  3787. DIS First stage in ISO's standardization.  (Discussion)
  3788.  
  3789.  
  3790.  
  3791.                                       205
  3792.  
  3793.  
  3794. 206    Section D.1                 AmiTCP/IP                  System Manual
  3795.  
  3796.  
  3797.  
  3798. Ethernet 10Mbit/sec physical network interface.  Developed by Xerox in
  3799.     Palo Alto late 70s.  In 1982 published with Digital and Intel as
  3800.     ESPEC1.  ESPEC2 was approved as basic specification for LANs which
  3801.     employed the carrier sense multiple access with collision detection
  3802.     by IEEE 802.3 committee.  Heavily derived version was later published
  3803.     by ISO as DIS 8802/3.  Original has only version for 50  coaxial
  3804.     cable, 10BASE5 ``Thick Ether'', but nowadays has also for thinner
  3805.     coaxial cable, 10BASE2 ``Thin Ether'', twisted pair, 10BASET and
  3806.     fibre, 10BASEF. There are also broadband, 10BROAD36, and slower,
  3807.     1Mbit/s 1BASE5, versions.
  3808.  
  3809.  
  3810. EXEC AmigaOS EXECutive.  Provides the basic kernel functions, such as
  3811.     task scheduling, memory management, concurrency control, message
  3812.     ports, public library lists etc.
  3813.  
  3814.  
  3815. Frame Data unit transferred between data link layer protocol entities.
  3816.  
  3817.  
  3818. ICMP Internet Message Control Protocol.  A host-to-host communication
  3819.     protocol used in the DARPA Internet for reporting errors and
  3820.     controlling the operation of IP.
  3821.  
  3822.  
  3823. IEEE the Institute of Electrical and Electronics Engineers
  3824.  
  3825.  
  3826. Inetd the Internet super server.  A server that listens to the network
  3827.     and launches other server processes when needed.
  3828.  
  3829.  
  3830. IO request  An Amiga standard message format to discuss with devices.  IO
  3831.     requests are sent by Exec function BeginIO() to the device driver.
  3832.     Completed IO requests are sent back to the reply port specified in IO
  3833.     request.
  3834.  
  3835.  
  3836. IP Internet Protocol.  The network-layer communication protocol used in
  3837.     the DARPA Internet.  IP is responsible for host-to-host addressing
  3838.     and routing, packet forwarding, and packet fragmentation and
  3839.     reassembly.
  3840.  
  3841.  
  3842. ISO International Organization for Standardization
  3843.  
  3844.  
  3845. Jargon A formal technical vocabulary of various subjects.  Also hackish
  3846.     slang or mumbo jumbo is referred as jargon [Raymond 1992 ].
  3847.  
  3848.  
  3849. Library base  In AmigaOS shared library is accessed via a library base
  3850.     pointer.  On the negative side (relative to the base pointer) there
  3851.     is jump table to the library functions and on the positive side --
  3852.     library data the functions can use.
  3853.  
  3854.  
  3855. Log It is usually useful to record information.  If something hasgone
  3856.     wrong, one may found information to remove cause of failure.  A log
  3857.     is usually a file, where information is written.
  3858.  
  3859.  
  3860. Mbuf Memory BUFfer.  Data storage unit inside BSD networking
  3861.     implementation.
  3862.  
  3863.  
  3864. Message Data unit transferred between applications using network
  3865.     services.
  3866.  
  3867.  
  3868. System Manual                  AmiTCP/IP                 Section D.1    207
  3869.  
  3870.  
  3871.  
  3872. MTU Maximum Transfer Unit.  The amount of data that underlying network
  3873.     can transfer in one block.
  3874.  
  3875. NET/2 Latest (by now) BSD Unix release.
  3876.  
  3877. Network File System  A filesystem share protocol which enables other
  3878.     computers use disks on other host over network.  Usually uses UDP
  3879.     protocol for transfering files, but also TCP-based version exists.
  3880.     Developed by Sun Microsystems Inc., and developed to ``Industrial
  3881.     Standard'' in *IX environment.  Described in detail ``Networking on
  3882.     the Sun Workstation''
  3883.  
  3884. Octet A unit of eigth bits.  Used in communication to overcome problem
  3885.     that byte is not allways eigth bits (althoug this is nowadays very
  3886.     rare situation.)
  3887.  
  3888. Packet Data unit transferred between network layer protocol entities.
  3889.  
  3890. panic() Function executed after lethal failure in Unix kernel.
  3891.  
  3892. PPP Point-to-Point Protocol which allows multiple protocols to be
  3893.     transferred on the same line.  It is also more flexible than SLIP.
  3894.  
  3895. Protocol stack  A network protocol stack is a layerof software that
  3896.     network applications use to address particular processes on remote
  3897.     machines.  The AmiTCP/IP is such a protocol stack using TCP/IP
  3898.     protocols.
  3899.  
  3900. RARP Reverse Address Resolution Protocol maps network addresses to
  3901.     protocol addresses dynamically.
  3902.  
  3903. RFC Request For Comments.  Freely available standards for networking.
  3904.     They are mostly available online from nic.ddn.mil with FTP or Kermit.
  3905.  
  3906. RKM Rom Kernel reference Manuals are the most authoritative AmigaOS
  3907.     references, see [RKM Libraries 1992 ] for example.
  3908.  
  3909. SANA-II A standard for an Amiga software interface between networking
  3910.     hardware and network protocol stacks (or for software tools such as
  3911.     network monitors).
  3912.  
  3913. SLIP Serial Line Internet Protocol.  Data encapsulation protocol used to
  3914.     transmit IP packets over point-to-point serial lines.
  3915.  
  3916. Socket An abstraction for endpoint of communication.
  3917.  
  3918. TLA Three Letter Acronym, a mnemonic and mystic abbreviation which is
  3919.     coined to confuse acolytes.
  3920.  
  3921. TCP Transmission Control Protocol.  A connection-oriented transport
  3922.     protocol used in the DARPA Internet.  TCP provides for the reliable
  3923.     transfer of data, as well as the out-of-band indication of urgent
  3924.     data.
  3925.  
  3926. TCP/IP The whole protocol stack, which implements at least the Internet
  3927.     protocols required is often expressed as the two most commonly used,
  3928.     TCP/IP
  3929.  
  3930.  
  3931. 208    Section D.1                 AmiTCP/IP                  System Manual
  3932.  
  3933.  
  3934.  
  3935. UDP User Datagram Protocol.  A simple unreliable datagram protocolused
  3936.     in the DARPA Internet.  UDP provides only peer-to-peer addressing and
  3937.     optional data checksum.
  3938.  
  3939. Wire type  is the physical layer protocol type.  Different wire types are
  3940.     for instance Arcnet, Ethernet, IEEE 802.3, PPP and SLIP.
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946. Bibliography
  3947.  
  3948.  
  3949.  
  3950. [Comer 1988]               Comer, D. E., Internetworking With TCP/IP Vol I:
  3951.                            Principles, Protocols and Architecture,
  3952.                            Prentice--HallInternational, 382 p.
  3953.  
  3954.  
  3955. [Comer and Stevens 1991]   Comer, D. E. and Stevens, D. L., Internetworking
  3956.                            With TCP/IP VolII: Design, Implementation, and
  3957.                            Internals, Prentice--Hall International, 524 p.
  3958.  
  3959.  
  3960. [Finlayson et al 1984]     Finlayson, R.,Mann, T., Mogul, J. and Theimer,
  3961.                            M., ``A ReverseAddress Resolution Protocol,''
  3962.                            RFC 903, 4 p.
  3963.  
  3964.  
  3965. [Holloway 1991]            Holloway, T., ``Object Oriented Amiga EXEC,''
  3966.                            BYTE, vol. 16,issue 1, pp. 329--334, January
  3967.                            1991.
  3968.  
  3969.  
  3970. [Jacobson 1990]            Jacobson, V., ``Compressing TCP/IP Headers for
  3971.                            Low-speed Serial Links,'' RFC 1144, 43 p.
  3972.  
  3973.  
  3974. [Leffler et al 1989]       Leffler, S. J.,McKusick, M. K., Karels, M. J.
  3975.                            and Quarterman,J. S., The Design and
  3976.                            Implementationof the 4.3BSD UNIX Operating
  3977.                            System, Addison--Wesley 471 p.
  3978.  
  3979.  
  3980. [Leffler et al 1991a]      Leffler, S. J.,Fabry, R. S., Joy, W. N.,
  3981.                            Lapsley, P., Miller, S., Torek, C., ``An
  3982.                            Advanced 4.3BSDInterprocess Communication
  3983.                            Tutorial'' UNIXProgrammer's Supplementary
  3984.                            Documents (PS1), net/2 Berkeley Software
  3985.                            Distribution, Computer Systems Research Group,
  3986.                            Univ. of California, Berkeley, 53 p.
  3987.  
  3988.  
  3989. [Leffler et al 1991b]      Leffler, S. J.,Joy, W. N., Fabry, R. S. and
  3990.                            Karels, M. J.,``Networking Implementation
  3991.                            Notes, 4.3BSD Edition,'' UNIX System Manager's
  3992.                            Manual (SMM), net/2 Berkeley Software
  3993.                            Distribution, Computer Systems Research Group,
  3994.                            Computer Science Division, Univ. of California,
  3995.                            Berkeley, 26 p.
  3996.  
  3997.  
  3998. [Plummer 1982]             Plummer, D. C.,``An Ethernet Address Resolution
  3999.                            Protocol,'' RFC826, 10 p.
  4000.  
  4001.  
  4002.  
  4003.                                       209
  4004.  
  4005.  
  4006. 210    Section D.1                 AmiTCP/IP                  System Manual
  4007.  
  4008.  
  4009.  
  4010. [Postel 1980]              Postel, J., ``User Datagram Protocol,'' RFC 768,
  4011.                            3 p.
  4012.  
  4013. [Postel 1981a]             Postel, J. ed.,``Internet Protocol,'' RFC 791,
  4014.                            45 p.
  4015.  
  4016. [Postel 1981b]             Postel, J., ``Internet Control Message
  4017.                            Protocol,'' RFC792, 21 p.
  4018.  
  4019. [Postel 1981c]             Postel, J. ed.,``Transmission Control
  4020.                            Protocol,'' RFC793, 85 p.
  4021.  
  4022. [Raymond 1992]             Raymond, Eric ed., ``The Jargon File 2.9.9'',
  4023.                            the on-line hacker Jargon File, version 2.9.9,
  4024.                            01 APR 1992.
  4025.  
  4026. [Reynolds 1990]            Reynolds, JoyceK., ``Assigned Numbers'', RFC
  4027.                            1060, 86 p.
  4028.  
  4029. [RKM Libs & Devs 1989]     Commodore--Amiga Inc., Amiga ROM Kernel
  4030.                            Reference Manual:   Librariesand Devices,
  4031.                            Addison Wesley,956 p.
  4032.  
  4033. [RKM Libraries 1992]       Commodore--Amiga Inc., Amiga ROM Kernel
  4034.                            Reference Manual:   Libraries, 3rd ed., Addison
  4035.                            Wesley, 967 p.
  4036.  
  4037. [RKM Inc & ADoc 1992]      Commodore--Amiga Inc., Amiga ROM Kernel
  4038.                            Reference Manual:   Includes& AutoDocs, 3rd ed.,
  4039.                            Addison Wesley,471 p.
  4040.  
  4041. [SANA-II 1992]             Amiga Networking Group, ``SANA-II Network Device
  4042.                            Driver Specification - Rev 1.0 23-Apr-92,''
  4043.                            published at Fred Fish-collection disk#673.
  4044.  
  4045. [SANA-II 1992 add]         Amiga Networking Group, ``Addenda to SANA-II
  4046.                            Network DeviceDriver Specification,'' published
  4047.                            at SANA-II Developer Support Package, May 21,
  4048.                            1992.
  4049.  
  4050. [Stevens 1990]             Stevens, W., R., UNIX network programming,
  4051.                            Prentice Hall,772 p.
  4052.  
  4053. [Winsock 1992]             Hall, M., Towfiq, M., Arnold, G., Trendwell, D.,
  4054.                            Sanders, H., ``Windows Sockets An Open Interface
  4055.                            for Network Programming under Microsoft Windows
  4056.                            Version 1.0 Rev.A'' 11 June, 1992, 124 p.
  4057.  
  4058.  
  4059.    The RFC documents are stored online on nic.ddn.mil, from where they can
  4060. be downloaded with anonymous FTP. The file /rfc/rfc-index.txt contains
  4061. index to all published RFCs.
  4062.    The BSD documents are carried by many FTP sites, for example
  4063. nic.funet.fi.
  4064.