Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ icmp(7P) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inet(7F)



ICMP(7P-SysV)       RISC/os Reference Manual        ICMP(7P-SysV)



NAME
     icmp - Internet Control Message Protocol

SYNOPSIS
     None; included automatically with inet(7F).

DESCRIPTION
     The Internet Control Message Protocol, ICMP, is used by
     gateways and destination hosts which process datagrams to
     communicate errors in datagram-processing to source hosts.
     ICMP uses the basic support of IP as if it were a higher
     level protocol; however, ICMP is actually an integral part
     of IP.  ICMP messages are sent in several situations; for
     example:  when a datagram cannot reach its destination, when
     the gateway does not have the buffering capacity to forward
     a datagram, and when the gateway can direct the host to send
     traffic on a shorter route.

     The Internet protocol is not designed to be absolutely reli-
     able.  The purpose of these control messages is to provide
     feedback about problems in the communication environment,
     not to make IP reliable.  There are still no guarantees that
     a datagram will be delivered or that a control message will
     be returned.  Some datagrams may still be undelivered
     without any report of their loss.  The higher level proto-
     cols which use IP must implement their own reliability
     mechanisms if reliable communication is required.

     The ICMP messages typically report errors in the processing
     of datagrams; for fragmented datagrams, ICMP messages are
     sent only about errors in handling fragment 0 of the
     datagram.  To avoid the infinite regress of messages about
     messages etc., no ICMP messages are sent about ICMP mes-
     sages. ICMP may however be sent in response to ICMP messages
     (for example, ECHOREPLY).  There are eleven types of ICMP
     packets which can be received by the system.  They are
     defined in this excerpt from <netinet/ip_icmp.h>, which also
     defines the values of some additional codes specifying the
     cause of certain errors.

     /*
      * Definition of type and code field values
      */
     #define ICMP_ECHOREPLY        0 /* echo reply */
     #define ICMP_UNREACH          3 /* dest unreachable, codes: */
     #define ICMP_UNREACH_NET      0 /* bad net */
     #define ICMP_UNREACH_HOST     1 /* bad host */
     #define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
     #define ICMP_UNREACH_PORT     3 /* bad port */
     #define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
     #define ICMP_UNREACH_SRCFAIL  5 /* src route failed */
     #define ICMP_SOURCEQUENCH     4 /* packet lost, slow down */



                         Printed 1/28/91                   Page 1





ICMP(7P-SysV)       RISC/os Reference Manual        ICMP(7P-SysV)



     #define ICMP_REDIRECT         5 /* shorter route, codes: */
     #define ICMP_REDIRECT_NET     0 /* for network */
     #define ICMP_REDIRECT_HOST    1 /* for host */
     #define ICMP_REDIRECT_TOSNET    2/* for tos and net */
     #define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
     #define ICMP_ECHO             8 /* echo service */
     #define ICMP_TIMXCEED         11/* time exceeded, code: */
     #define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
     #define ICMP_TIMXCEED_REASS   1 /* ttl==0 in reass */
     #define ICMP_PARAMPROB        12/* ip header bad */
     #define ICMP_TSTAMP           13/* timestamp request */
     #define ICMP_TSTAMPREPLY      14/* timestamp reply */
     #define ICMP_IREQ             15/* information request */
     #define ICMP_IREQREPLY        16/* information reply */

     Arriving ECHO and TSTAMP packets cause the system to gen-
     erate ECHOREPLY and TSTAMPREPLY packets. IREQ packets are
     not yet processed by the system, and are discarded.
     UNREACH, SOURCEQUENCH, TIMXCEED and PARAMPROB packets are
     processed internally by the protocols implemented in the
     system, or reflected to the user if a raw socket is being
     used.  REDIRECT, ECHOREPLY, TSTAMPREPLY and IREQREPLY are
     also reflected to users of raw sockets.  In addition,
     REDIRECT messages cause the kernel routing tables to be
     updated.

SEE ALSO
     inet(7F)
     The chapters on Interprocess Communication (15, 16, and 17)
     in the Programmer's Reference Manual.

ERRORS
     IREQ messages are not processed properly: the address fields
     are not set.

     Messages which are source routed are not sent back using
     inverted source routes, but rather go back through the nor-
     mal routing mechanisms.

















 Page 2                  Printed 1/28/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026