Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ icmp(ADMP) — TCP/IP 1.2.0.i

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inet(ADMP)

intro(ADMP)

ip(ADMP)

recv(SSC)

send(SSC)


 icmp(ADMP)                      19 June 1992                      icmp(ADMP)


 Name

    icmp - Internet Control Message Protocol

 Syntax

    programmer's interface:
    #include  <sys/socket.h>
    #include  <netinet/in.h>

    s = socket(AFINET, SOCKRAW, IPPROTOICMP);

 Description

    ICMP is the error and control message (or device) protocol used by IP and
    the Internet protocol family.  It may be accessed through a ``raw
    socket'' for network monitoring and diagnostic functions.  The proto
    parameter to the socket call to create an ICMP socket is obtained from
    getprotobyname (See getprotoent(SLIB).)  ICMP sockets are connectionless,
    and are normally used with the sendto and recvfrom calls; the
    connect(SSC) call may also be used to fix the destination for future
    packets (in which case the read(S) or recv(SSC) and write(S) or send(SSC)
    system calls may be used).

    Outgoing packets automatically have an IP header prepended to them (based
    on the destination address).  Incoming packets are received with the IP
    header and options intact.

 Diagnostics

    A socket operation may fail with one of the following errors returned:

    [EISCONN]      when trying to establish a connection on a socket which
                   already has one, or when trying to send a datagram with
                   the destination address specified and the socket is
                   already connected;

    [ENOTCONN]     when trying to send a datagram, but no destination address
                   is specified, and the socket hasn't been connected;

    [ENOSR]        when the system runs out of memory for an internal data
                   structure;

    [EADDRNOTAVAIL]
                   when an attempt is made to create a socket with a network
                   address for which no network interface exists.

 Files

    /dev/inet/icmp

 See also

    inet(ADMP), intro(ADMP), ip(ADMP), recv(SSC), send(SSC)


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