psh_ipv6-opts(3)

SYNOPSIS

pinit ipv6-opts pkt [maxlength [length]]

pfree pkt

pget ipv6-opts pkt field-name pget hopopt pkt field-name

pset ipv6-opts pkt field-name value pset hopopt pkt field-name value

plist pkt ipv6-opts plist pkt hopopt

DESCRIPTION

pinit ipv6-opts pkt [maxlength [length]]
    Initialize a IPv6 destination option extension header packet variable. For more information on the maxlength and length parameters, see the psh(1) manual page. pinit hopopt pkt [maxlength [length]] Initialize a IPv6 hop-by-hop option extension header packet variable. For more information on the maxlength and length parameters, see the psh(1) manual page.

pfree pkt
    Free the indicated packet variable named pkt.

pget pkt ipv6-opts field-name
    pget pkt hopopt field-name Fetch the indicated field <field-name> from the indicated packet pkt. The valid fields are the following: nexthdr, hdrextlen, optype pad1, optype padn, optype jumbo, optype ( for other optipon types i,e. SKIP, DROP etc. )

    It searches through the option header for all the options which has the indicated option type. If the indicated optype field is not found, then it returns nothing.

pset pkt ipv6-opts field-name value
    pset pkt hopopt field-name value Sets the value in the appropriate field in the packet pkt. valid field and values are :

    nexthdr val

    hdrextlen ( value should be entered in unit of octets and
                  this value should be calculated by the user
                  depending on the options set. It's value should
                  be unit of octets excluding the first 8 byte)

    optype val ( This means only one option value is added after hdrextlen , the val indicates SKIP, DROP etc. as indicated in RFC 1883 )

    optype pad1 ( pads 1 byte of zero val at the end of the options)

    optype padn n ( pads n-2 bytes at the end of options )

    optype jumbo data-len ( appends jumbo option at the end of options )

    Refer to RFC1883 for an explanation of the fields.

plist pkt ipv6-opts
    plist pkt hopopt List the indicated packet pkt contents in hex.

EXAMPLES
For 6 bytes of padding and then jumbo option, you should have at least 16
    bytes ( 2 octets ) of header length. So hdrextlen should be calculated as 2octets - 1octet = 1 octet ( see RFC 1883 for more explanation ).

    pset hopopt hdrextlen 1

    pset hopopt optype padn 6

    pset hopopt optype jumbo 66666

FILES

/opt/psh/lib/ipv6-opts
    Dynamically linked library protocol for IPv6 hop-by-hop and destination extension.

SEE ALSO
xpsh(1), psh(1), protolib(3). ipv6-frag(3).