HOME


NAME

ip_opn_dissect - an internet protocol options dissect function

SYNOPSIS

opn=ip_opn_dissect(pkt,offset,opn_end)

IPOPT_END = 0
IPOPT_NOOP = 1
IPOPT_SEC = 130
IPOPT_LSRR = 131
IPOPT_TIMESTAMP = 68

                 IPOPT_TS_TSONLY = 0

                 IPOPT_TS_TSANDADDR = 1

                 IPOPT_TS_PRESPEC = 3

IPOPT_EXT_SEC = 133
IPOPT_RR = 7
IPOPT_SID = 136
IPOPT_SSRR = 137
IPOPT_MTU = 11
IPOPT_MTU_REPLY = 12
IPOPT_TRACEROUTE = 82
IPOPT_ADDR_EXT = 147
IPOPT_RA = 148
IPOPT_SDBM = 149

DESCRIPTION

dissect IP ' s options.  dissectable are:

End of Option List
   +--------+
   |00000000|
   +--------+

No Operation
   +--------+
   |00000001|
   +--------+

Security
   +--------+--------+---//---+---//---+---//---+---//---+
   |10000010|00001011|SSS  SSS|CCC  CCC|HHH  HHH|  TCC   |
   +--------+--------+---//---+---//---+---//---+---//---+

Loose Source and Record Route
   +--------+--------+--------+---------//--------+
   |10000011| length | pointer|     route data    |
   +--------+--------+--------+---------//--------+
Record Route
   +--------+--------+--------+---------//--------+
   |00000111| length | pointer|     route data    |
   +--------+--------+--------+---------//--------+
Stream Identifier
   +--------+--------+--------+--------+
   |10001000|00000100|    Stream ID    |
   +--------+--------+--------+--------+

   Internet Timestamp
   +--------+--------+--------+--------+
   |01000100| length | pointer|oflw|flg|
   +--------+--------+--------+--------+
   |         internet address          |
   +--------+--------+--------+--------+
   |             timestamp             |
   +--------+--------+--------+--------+
   |                 .                 |
                     .

SDBM
   +--------+--------+--------+--------+
   |10010101| Length |    IP Addr 1    |
   +--------+--------+--------+--------+
   | IP Addr 1(cont) |    ..........   |
   +--------+--------+--------+--------+
   |    ..........   |   IP Address N  |
   +--------+--------+--------+--------+
   | IP Addr N(cont) |      Unused     |
   +--------+--------+--------+--------+

Address Extension
   +--------+--------+--------+--------+
   |10010011|00001010| src IPv7 addr(1)|
   +--------+--------+--------+--------+
   | src IPv7 addr(2)| dst IPv7 addr(1)|
   +--------+--------+--------+--------+
   | dst IPv7 addr(2)|
   +--------+--------+

Strict Source and Record Route
   +--------+--------+--------+---------//--------+
   |10001001| length | pointer|     route data    |
   +--------+--------+--------+---------//--------+
Probe MTU Option
   +--------+--------+--------+--------+
   |00001011|00000100|   2 octet value |
   +--------+--------+--------+--------+
Reply MTU Option
   +--------+--------+--------+--------+
   |00001100|00000100|   2 octet value |
   +--------+--------+--------+--------+
Traceroute
   +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
   |0|1 0|1 0 0 1 0|0 0 0 0 1 1 0 0|          ID Number            |
   +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
   |      Outbound Hop Count       |       Return Hop Count        |
   +---------------+---------------+---------------+---------------+
   |                     Originator IP Address                     |
   +---------------+---------------+---------------+---------------+

Router Alert
   +--------+--------+--------+--------+
   |10010100|00000100|  2 octet value  |
   +--------+--------+--------+--------+

Extended Security
   +--------+--------+--------+-------//-------+
   |10000101| length |  code  |  add sec info  |
   +--------+--------+--------+-------//-------+

references  rfc 791, 1063, 1108, 1393, 1770, 2113

funtion accepts three arguments:
    pkt is a packet reference containing the whole already dissected packet
    offset is the position inside packet to start dissection
    opn_end equals offset plus option length

funtion returns one list:
    opn is a list
    each item of the list is a dissected option
    this is the option's prototype: [option_code,option_length,(option_field1,option_field2,.......,option_fieldN)] 
    note: negative option_code means option exceeds global options length      

HOME


This document was generated by paolo bastiancich on January, 16 2003 using texi2html