psh_icmp(3)

SYNOPSIS

pinit icmp pkt [maxlength [length]]

pfree pkt

pget icmp pkt field-name

pset icmp pkt field-name value

plist pkt icmp

DESCRIPTION

pinit icmp pkt [maxlength [length]]
    Initialize a packet variable with an ICMP header. For more information on the maxlength and length parameters, see the psh(1) manual page.

pfree pkt
    Free the indicated packet buffer named pkt.

pget pkt icmp field-name
    Fetch the indicated field field-name from the indicated packet pkt. The valid fields are the following: type, code, cksum, cksum-valid, word1, target, target-ether, source-ether.

    Word1 refers to the "icmp_void" member in the ICMP structure, the first full word after the type/code word.

    Refer to RFC792 for an explanation of the fields.

pset pkt icmp field-name value
    Set the indicated field field-name from the indicated packet pkt to the value value. Similar to the above.

    For "type" the value can be any of the following strings:
      unreachable
      time exceeded
      parameter problem
      echo
      echo reply
      source quench
      redirect
      tstamp
      tstamp-reply
      ireq
      ireq-reply
      maskreq
      maskreq-reply

    Note that pset'ing the cksum without an argument causes the correct checksum to be computed and placed in the cksum field of the packet.

plist pkt icmp
    Summarize an ICMP packet.

FILES

/opt/psh/lib/icmp
    Dynamically linked library protocol for ICMP.

SEE ALSO
xpsh(1), psh(1), protolib(3).