Mobile Ad hoc Networking (MANET)                              T. Clausen
Internet-Draft                          LIX, Ecole Polytechnique, France
Expires: August 31, December 21, 2006                                   C. Dearlove
                                         BAE Systems Advanced Technology
                                                                  Centre
                                                                 J. Dean
                                               Naval Research Laboratory
                                                       February 27,
                                                                C. Adjih
                                                      INRIA Rocquencourt
                                                           June 19, 2006

                Generalized MANET Packet/Message Format
                      draft-ietf-manet-packetbb-00
                      draft-ietf-manet-packetbb-01

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on August 31, December 21, 2006.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   This document describes a generalized multi-message packet format
   which may be used by mobile ad hoc network routing and other
   protocols.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  Applicability Statement  . . . . . . . . . . . . . . . . . . .  5
   4.  Protocol Overview and Functioning  . . . . . . . . . . . . . .  6
   5.  Signaling Framework  . . . . . . . . . . . . . . . . . . . . .  7
     5.1
     5.1.  Packet Format  . . . . . . . . . . . . . . . . . . . . . .  7
       5.1.1
       5.1.1.  Padding  . . . . . . . . . . . . . . . . . . . . . . .  8
     5.2
     5.2.  Messages . . . . . . . . . . . . . . . . . . . . . . . . .  8
       5.2.1  9
       5.2.1.  Address Blocks . . . . . . . . . . . . . . . . . . . . 11
       5.2.2 12
     5.3.  TLVs and TLV Blocks  . . . . . . . . . . . . . . . . . . . 14
       5.3.1.  TLVs . . . . . . . 12
       5.2.3 . . . . . . . . . . . . . . . . . . 14
       5.3.2.  Constraints  . . . . . . . . . . . . . . . . . . . . . 14
     5.3 17
     5.4.  Message Content Fragmentation  . . . . . . . . . . . . . . 14 17
   6.  TLV specification  . . . . . . . . . . . . . . . . . . . . . . 16
     6.1 20
     6.1.  Message TLV Specification  . . . . . . . . . . . . . . . . 16
     6.2 20
     6.2.  Address Block TLV Specification  . . . . . . . . . . . . . 16 21
   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 18 22
   8.  Security Considerations  . . . . . . . . . . . . . . . . . . . 20 24
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 20
       Authors' Addresses 25
     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 25
     9.2.  Informative References . . . . 20 . . . . . . . . . . . . . . 25
   Appendix A.   Packet and Message Layout  . . . . . . . . . . . . . 26
   Appendix A.1. General Packet Format  . . . . . 21
     A.1   General Packet Format . . . . . . . . . . 26
   Appendix B.   Contributors . . . . . . . . . 21
   B.  Contributors . . . . . . . . . . . 38
   Appendix C.   Acknowledgements . . . . . . . . . . . . . . . 29
   C.  Acknowledgements . . . 39
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 30 . . 40
   Intellectual Property and Copyright Statements . . . . . . . . 31 . . 41

1.  Introduction

   Signaling in a mobile ad hoc network routing protocol consists,
   mainly, of stating IP addresses and attributes associated to such IP
   addresses.  Since this is a task common to many such protocols, this
   specification presents a generalized signaling framework, which may
   be employed both by mobile ad hoc network routing protocols and other
   protocols with similar signaling requirements.

   The framework consists of a specification of:

   o  a mechanism whereby new message types can be specified and (regardless
      of type, whether known or unknown) can still be correctly parsed and
      forwarded;

   o  a generalized multi-message packet format, in which the allowing multiple
      messages to be contained within a single transmission;

   o  a message format, composed of a message header
      information contains and a message body,
      with the message header containing *all* necessary information to
      allow single a node to make forwarding and processing decisions without
      resorting to inspecting the message body.  The message header
      information permits single- and multi-hop diffusion in MANETs, whilst also permitting unicast and
      supporting scope controlled multicast and unicast use of the
      format;

   o  a message body structure, encouraging uniform message parsing,
      regardless of message body content;

   o  a mechanism whereby addresses can be represented in a compact way
      (address compression);

   o  an extensibility mechanism whereby arbitrary attributes, through
      TLVs (type-length-value triplets), can be included and associated
      with a message, an address or a set of addresses, while being
      correctly parseable by a generic message parser.

   An important design criterion behind this specification is to allow
   development of easy parsing logic, even in the face of a flexible
   format.  This implies that, given an incoming control message, a
   single parser is able to process the message independent of type and
   present, to a protocol using this specification, an abstraction of
   addresses with associated attributes directly.  The information
   contained in the message header furthermore allows the recipient node
   to recognize duplicates and make appropriate forwarding decisions.
   Additionally, the signaling framework in this specification is
   developed with the objective of minimizing the complexity of this
   parser by providing a straight-forward straightforward message layout.

2.  Terminology

   The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC2119 [1].

   Additionally, this document uses the following terminology:

   Address - an address of the same type and length as the source IP
      address in the IP datagram carrying the packet.

   TLV - Type-Length-Value structure.  This is a generic way in which an
      attribute can be represented and correctly parsed, without knowing
      the content, or understanding the type of the attribute by the
      parser.  This allows internal extensibility, i.e. for a protocol
      extension to add arbitrary attributes within a control message.

   ?  - zero or one occurrences of the preceding element.

   *  - zero or more occurrences of the preceding element.

   +  - one or more occurrences of the preceding element.

   <foo> - An element specified in the parsing of a packet, message or
      other entity.  If <foo> is an 8 or 16 bit field then <foo> is also
      used to represent the value of that field.

   bar - A variable, usually obtained through calculations based on the
      value(s) of field(s).  Variables are introduced in the
      specification solely as a means to clarify the description.

   address-length - A variable whose value is the length of an address
      in octets, i.e. it is 4 if using IPv4, or 16 if using IPv6.

3.  Applicability Statement

   This specification describes a generic multi-message packet format,
   for carrying MANET routing protocol signals.  The specification has
   been developed from that used by OLSR [2]. [3].

   The specification is designed specifically with IP (IPv4/IPv6) in
   mind.  All addresses within a control message are assumed to be of
   the same size, deduced from IP.  In the case of mixed IPv6 and IPv4
   addresses, IPv4 addresses are carried in IPv6 as specified in [3]. [2].

   The multi-message package format in packets defined by this specification is
   characterized by lending itself to low-complexity parsing logic, as
   well as may use any transport
   protocol appropriate to an the protocol using this specification.  When
   the diffusion mechanism enabled by this specification is employed,
   UDP may be most appropriate.

   The multi-message package format in this specification is
   characterized by lending itself to low-complexity parsing logic, as
   well as to an efficient parsing for low-capacity routers.  The header
   information in each message suffices to allow for each message to be
   forwarded (if required) and delivered correctly with regards to the
   message's delivery semantics, without parsing and inspecting the
   message body.

   The specification accommodates two types of extensibility: "external
   extensibility", whereby new message types can be specified and
   (regardless of type) still be correctly forwarded and parsed using
   the simple parsing logic, and "internal extensibility", whereby new
   attributes can be included in existing message types while these can
   still be correctly forwarded and parsed using the simple parsing
   logic.

4.  Protocol Overview and Functioning

   This specification does not describe a protocol.  It describes a
   packet format, which MAY be used by any mobile ad hoc network routing
   or other protocol.

5.  Signaling Framework

   This section provides abstract descriptions of message and packet
   formats.

5.1

5.1.  Packet Format

   Messages are carried in a general packet format, allowing
   piggybacking of several independent messages in a single packet
   transmission.

   The packet format conforms to the following specification:

       <packet> = <packet-header>?
                  {<message><pad-octet>*}+ {<packet-header><pad-octet>*}?
                  {<message><pad-octet>*}*

   where <message> is defined in Section 5.2, and with <pad-octet>
   conforming to the following specification:

   <pad-octet> is an 8 bit field with all bits cleared ('0').  The use
      of <pad-octet> is detailed in Section 5.1.1.

   The

   <packet-header> is defined thus: by:

       <packet-header> = <zero>
                         <reserved>
                         <packet-seq-number>
                         <packet-semantics>
                         <packet-seq-number>?
                         <tlv-block>?

   with the elements of <packet-header> conforming to the following
   specification:

   <zero> is an 8 bit field with all bits cleared ('0').  This field
      serves to identify if the first 32 bits of a packet constitutes starts with a packet header or not.

   <reserved> header.

   <packet-semantics> is an 8 bit field with all field, which specifies the composition
      of the packet header:

      bit 0 (pseqnum) indicates, if cleared ('0'), that the packet
         header contains a <packet-seq-number>.  If set ('1'), the
         packet header does not include a <packet-seq-number>.

      bit 1 (ptlv) indicates, if cleared ('0'), that the packet header
         does not include a TLV block.  If set ('1'), the packet header
         includes a TLV block.

      bits 2-7 are reserved, and SHOULD each be cleared ('0').  This field
      MAY be used for future extensions.

   <packet-seq-number> is omitted if the pseqnum bit is set ('1'),
      otherwise it is a 16 bit field, which specifies a packet sequence
      number.  If used, a separate packet sequence number MUST be
      maintained for each transmitting interface.  Each packet sequence
      number MUST be incremented by one each time a packet, as defined
      in this document and which includes the packet sequence number, is
      transmitted over this interface.

   <tlv-block> is omitted if the ptlv bit is cleared ('0'), otherwise it
      is a TLV block as specified in Section 5.3.

   Note that since the message type zero is reserved (see Section 7),
   the presence or absence of a packet header can be determined by
   inspecting the first octet of the packet.

5.1.1

5.1.1.  Padding

   The

   Packet headers and messages can be padded to ensure 32 bit alignment
   of each message contained within the packet.

5.1.1.1.  Packet Header Padding

   The packet header specification in Section 5.2 5.1 ensures that a message packet
   header consists of an integral number of octets, with all defined
   syntactical entities (<msg-header>, <address-block>, <tlv> etc.) (<zero>, <packet-semantics>, <packet-seq-
   number>, <tlv-block>) being octet-aligned.  Messages (and, hence, also the <originator-
   address>, if any),

   The first <message> in a packet can be 32 bit aligned by adding the
   appropriate number of <pad-octet>s, as specified above. <pad-octet>s subsequent to the <packet-header>.

   The number of <pad-octet>s required to achieve this 32 bit alignment of a
   message
   is calculated as the smallest number which which, when added to
   <msg-size> the size of
   the packet header <tlv-block> (if any) and the size of the <packet-
   seq-number> (if any) and the size of the fixed part of the header
   (the <zero> and <packet-semantics> fields, which are each one octet
   long) produces a an integer multiple of 4.

   A recipient node needs not know if padding is included:

   If the first
   octet of <packet-header> contains a message (see Section 5.2) <packet-seq-number> and no <tlv-
   block>, (i.e. if both the pseqnum and ptlv bits are cleared) then
   there SHOULD NOT be any <pad-octets> subsequent to the <packet-
   header>, since then the <packet-header> has length exactly 4 octets
   and the first <message> is then already 32 bit aligned.

   There is no need to indicate if padding is included subsequent to the
   packet header: the first octet of a message (see Section 5.2 cannot
   be zero.  Thus  Thus, if after processing a message the packet header a recipient
   reads an octet with all bits cleared ('0'), this read octet is
   padding.

   Thus,

5.1.1.2.  Message Padding

   The message specification in Section 5.2 ensures that a message
   consists of an integral number of octets, with all defined
   syntactical entities (<msg-header>, <address-block>, <tlv> etc.)
   being octet-aligned.

   The first message can be 32 bit aligned by using packet header
   padding, as described in Section 5.1.1.1.  Subsequent messages (and,
   hence, also the <originator-address>, if any), can be 32 bit aligned
   by adding the appropriate number of <pad-octet>s subsequent to each
   message.  (When added to the last message this instead ensures that
   the overall packet is a multiple of 32 bits in length.)

   The number of <pad-octet>s required to achieve 32 bit alignment of
   the end of message (and hence the start of the next, if any),
   assuming that the start of the message is 32 bit aligned, is
   calculated as the smallest number which when added to <msg-size>
   produces a multiple of 4.

   There is no need to indicate if padding is included subsequent to a
   message: the first octet of a message (see Section 5.2) cannot be
   zero.  Thus if after processing a message a recipient reads any
   octets with all bits cleared ('0'), these read octets are padding.
   The <msg-size> does not include padding.

   The padding after a message may be freely changed when a message is
   forwarded without affecting the message.

5.2

5.2.  Messages

   Information is carried through "messages".  Messages may contain:

   o  zero or more TLVs, associated with the whole message;

   o  a set of addresses about which the originating node wishes to
      convey information.  These addresses may MAY be divided into one or
      more address blocks.  Each address SHALL appear only once in a
      message with the same prefix length; blocks;

   o  each address block is followed by  zero or more TLVs, TLVs following each address block.  These are
      explained
      with in more details detail in Section 5.2.2, which 5.3.1 and convey information
      about the addresses in that address block.

   A message also contains a message header, which can be parsed without
   examining the remainder of the packet, and which contains information
   sufficient to allow the recipient to:

   o  recognize duplicate messages;

   o  determine considerations for forwarding;

   o  manage controlled-scope diffusion of messages.

   Message content MAY (e.g. due to size limitations) be fragmented.
   Each fragment is transmitted such that it makes up a syntactically
   correct message (i.e. all headers are set as if each fragment is a
   message in its own right, and each message contains all necessary
   message TLVs).  Content fragmentation is detailed in Section 5.3. 5.4.

   A message has the following general layout:

       <message>         = <msg-header>
                           <tlv-block>
                           {<addr-block><tlv-block>}*

       <msg-header>      = <type> <msg-type>
                           <msg-semantics>
                           <msg-size>
                           <msg-header-info>

       <msg-header-info> = <originator-address>?
                           <ttl>?
                           <hop-limit>?
                           <hop-count>?
                           <msg-seq-number>?

       <tlv-block>       = <tlv-length>
                           <tlv>*

   The elements of <msg-header-info> are included according to the flags
   in <msg-semantics> as described below.

   The elements used above conform to the following specification:

   <tlv-length> is a 16 bit field, which contains the total length (in
      octets) of the immediately following TLV(s).  If no TLV follows,
      this field contains zero;

   <tlv>

   <tlv-block> is a TLV, providing information regarding the entire message or
      the address block which it follows.  TLVs are as specified in Section 5.2.2; 5.3

   <addr-block> is a block of addresses, with which the originator of
      the message has a special relationship, specific to the protocol. protocol
      using this specification.  Address blocks are specified in
      Section 5.2.1;

   <type>

   <msg-type> is an 8 bit field, which specifies the type of message.  A
      type with all bits cleared ('0') MUST NOT be used.  The two most
      significant bit is bits are allocated with the following semantics:

      bit 7 is the "user" bit.  Types (msg-user): message types with this bit unset cleared ('0') are
         defined in this specification or can be allocated via standards
         action.
         Types  Message types with this bit set ('1') are reserved for
         private/local use.

      bit 6 (msg-protocol): for message types with the msg-user bit
         cleared ('0'), this bit specifies, if cleared ('0'), that the
         message type is protocol independent, i.e. is not specific to
         any one protocol, or, if set ('1'), that the message type is
         specific to the protocol for which it is defined.

   <msg-semantics> is an 8 bit field, which specifies the interpretation
      of the remainder of the message header and the processing which
      can be undertaken only parsing the message header:

      bit 0 (LSB) (noorig): indicates, if cleared ('0') that the elements
         <originator-address> and <msg-seq-number> in the <msg-header-
         info> be included, as specified in the above.  If set ('1'), a
         reduced header which does not include <originator-address> and
         <msg-seq-number> is used; this reduced header does not provide
         provisions for duplicate suppression;

      bit 1 (nohops): indicates, if cleared ('0') that the elements <ttl>
         <hop-limit> and <hop-count> in the <msg-header-info> be
         included, as specified in the above.  If set ('1'), a reduced
         header which does not include the elements <ttl> <hop-count> <hop-limit> <hop-
         count> from the <msg-header-
         info> <msg-header-info> is used; this reduced header
         does not provide provisions for scope-delimited forwarding;

      bit 2 (typedep): indicates, if cleared ('0'), that the message
         sequence number in the message is type-independent.  If set
         ('1'), the message sequence number contained in the message is
         type dependent, i.e. the source of the message maintains a
         sequence number separately for the type indicated in the <type> <msg-
         type> field; this bit SHALL be cleared ('0') if there is no
         message sequence number, i.e. if the noorig bit 0 is set;

      bit 3 indicates, if cleared ('0') that the message, if of a
         message type unknown to the recipient, SHOULD be considered for
         forwarding.  If set ('1'), the message, if of a message type
         unknown to the recipient, MUST NOT be considered for
         forwarding;

      bits 4-7 (MSB) 3-7: are RESERVED and SHALL each be cleared ('0') to be in
         conformance with this version of the specification.

   <msg-size> is a 16 bit field, which specifies the size of the <msg-
      header> and the following <msg-body>, counted in octets;

   <originator-address> is the address of an interface of the node,
      which originated the message.  Its length is equal to address-
      length octets.  Each node SHOULD select one of its interface address
      addresses as its "originator address" and MUST utilize this
      address consistently as
      "originator address" for the <originator address> in all messages
      it generates (note that which include this field.  Note that the originator
      address is distinct from the IP source address);
   <ttl> address, and that the same
      originator address MUST be used regardless of which interface a
      message is transmitted on.  Also note that if a message is
      retransmitted the originator address MUST NOT be changed;

   <hop-limit> is an 8 bit field, which contains the maximum number of
      hops a message will be transmitted.  Before a message is
      retransmitted, the Time To Live hop-limit MUST be decremented by 1.  When a
      node receives a message with a Time To Live hop-limit equal to 0 or 1, the
      message MUST NOT be retransmitted under any circumstances.
      Normally, a node will not receive a message with a TTL hop-limit of zero 0
      (note that this hop-limit is distinct from the IP TTL); IPv6 hop-limit);

   <hop-count> is an 8 bit field, which contains the number of hops a
      message has traveled.  Before a message is retransmitted, the hop hop-
      count MUST be incremented by 1.  Initially, this is hop-count SHOULD
      be set to '0' 0 by the originator of the message;

   <msg-seq-number> is a 16 bit field, which contains a unique number,
      generated by the originator node.  The originator-address, msg-
      seq-number and, if the typedep bit 4 in the <msg-semantics> field is
      set, the
      <type> <msg-type> of a message serves to uniquely identify the
      message in the network (allowing, among other things, duplicate
      elimination).

5.2.1

5.2.1.  Address Blocks

   An address block represents a set of addresses in a compact and
   simple form.  Assuming that an address can be specified as a sequence
   of bits of the form 'head:tail', 'head:mid:tail', then an address block is a set
   of addresses sharing the same 'head' and 'tail' and having different 'tails'.
   Specifically, an address block conforms to
   'mids'.  (The case where the following
   specification:

       <address-block> = <head-length>
                         <head>
                         <num-tails>
                         <tail>+

   with the elements defined thus:

   <head-length> 'tail' is empty is treated specially, as
   is the number of "common leftmost octets" in a set of
      addresses, case where 0 <= head-length <= the length 'tail' consists of zero-valued octets, the address in
      octets;

   <head>
   latter is the longest sequence of leftmost octets which the addresses
      in the particularly appropriate when used with a TLV indicating a
   prefix length, see Section 6.2.)

   Specifically, an address block have in common;

   <num-tails> conforms to the following
   specification:

       <address-block> = <num-addr>
                         <head-octet>
                         <head>?
                         <tail-octet>?
                         <tail>?
                         <mid>*

   with the elements defined thus:

   <num-addr> is an 8 bit field containing the number of addresses
      represented in the address block, which MUST NOT be zero.  It is
      equal to the number of tails <mid>s following (except when <head-length> equals the address length,
      when when, as defined
      below, mid-length == 0 and no tails <mid>s are required);
   <tail>

   <head-octet> is an 8 bit field, where:

      bits 0-6: contain the sequence length of octets which, when concatenated to the
      head, makes up a single, complete, unique address. <head>, if any.  The length of
      <tail>
         corresponding variable head-length is thus calculated by:

         head-length = <head-octet> & 127

      bit 7 (notail): indicates, if cleared ('0'), that the length of an address, in octets, minus <head-
      length>.  This may be zero.

   This representation aims at providing address
         block contains a flexible, yet compact, way of
   representing sets of addresses.

5.2.2  TLVs

   A TLV <tail-octet> (see below), if set ('1') that no
         <tail-octet> is included;

   <head> is omitted if head-length == 0, otherwise it is a carrier field of information, relative to a message or to
   addresses in an address block.

   A TLV associated with an address block specifies some attribute(s),
      head-length octets which associate with address(es) in the address-block.  In order to
   provide contains the largest amount of flexibility to benefit from address
   aggregation as described in Section 5.2.1, a TLV associated to an
   address block can apply to:

   o  a single address in leftmost octets which the address block;

   o  all
      addresses in the address block;

   o  any continuous sequence of addresses block have in common (it SHOULD contain the address block.

   All TLVs conforms to the following specification:

       <tlv> = <type>
               <tlv-semantics>
               <length>?
               <index-start>?
               <index-stop>?
               <value>?

   where
      longest such sequence);

   <tail-octet> is omitted if the elements are defined thus:

   <type> notail bit is set ('1'), otherwise it
      is an 8 bit field, which specifies where:

      bits 0-6: contain the type length of the TLV. <tail>, if any, or the
         equivalent number of zero-valued tail octets.  The
      most significant bit
         corresponding variable tail-length is allocated with the following semantics: calculated by:

         tail-length = <tail-octet> & 127

      bit 7 (zerotail): indicates, if cleared ('0'), that a <tail> (see
         below) is included, if set ('1') that no <tail> is included,
         and that the "user" bit.  Types with this bit unset are defined tail-length rightmost octets of each address in
         this specification
         the block are zero-valued;

      If the <tail-octet> is omitted then tail-length = 0.

   <tail> is omitted if tail-length == 0 or can be allocated via standards action.
         Types with this the zerotail bit is set are reserved for private/local use.

   <tlv-semantics>
      ('1'), otherwise it is an 8 bit a field of length tail-length octets which specifies
      contains the semantics of rightmost octets which the TLV according to addresses in the following:

      bit block
      have in common (it SHOULD contain the longest such sequence in
      this case);

      If tail-length != 0 (novalue): if cleared ('0') contains <length> and <value>
         elements.  TLVs with this the zerotail bit is set ('1') contains no <length> or
         <value> elements - the TLV type carries then all the information
         needed.

      bit 1 (extended): if cleared ('0'), the size of the length field
         is 8 bits.  If set ('1'),
      addresses in the size of block have tail-length zero-valued rightmost
      octets (tail-length SHOULD be the length field largest such number in this
      case);
   mid-length is 16
         bits.  This bit a variable, calculated by:

      mid-length = address-length - head-length - tail-length

      mid-length MUST be unset if the novalue bit non-negative.

   <mid> is set.

      bit 2 (noindex): omitted if cleared ('0'), mid-length == 0 (in which case all addresses in
      the  <index-start> and <index-
         stop> elements block are included.  If set ('1'), the  <index-start>
         and <index-stop> elements are not included.  This bit MUST be
         set for message TLVs.  If this bit same), otherwise each <mid> is set for address block
         TLVs, a field of length
      mid-length octets, representing the TLV applies to all addresses 'mid' of the corresponding
      address in the address block.

      bit 3 (multivalue): if cleared ('0'), the TLV includes

   This representation aims at providing a single
         value which applies to all addresses described by <index-start>
         and <index-stop>.  If set ('1'), the TLV includes separate
         values for each flexible, yet compact, way of the addresses indicated by <index-start> and
         <index-stop>.  This bit MUST be unset for message
   representing sets of addresses.

5.3.  TLVs or if
         the novalue bit is set.

      bits 4-7 are RESERVED and SHALL each be cleared ('0').

   <length> is omitted if TLV Blocks

   A TLV block has the novalue bit is set, otherwise it following general layout:

       <tlv-block>       = <tlv-length>
                           <tlv>*

   with the elements defined thus:

   <tlv-length> is an 8
      bit or a 16 bit field, according to whether which contains the extended bit is
      unset or set, respectively.  If present total length (in
      octets) of the immediately following TLV(s).  It does not include
      its own length, thus if no TLVs follow, this field specifies contains zero;

   <tlv> is a TLV, providing information regarding the
      length, counted in octets, of entire packet or
      message or the data contained address block which it follows.  TLVs are specified
      in <value>.  If
      the multivalue bit Section 5.3.1;

5.3.1.  TLVs

   A TLV is set, <length> MUST be an integral multiple a carrier of (<index-stop>-<index-start>+1);

   <index-start> is omitted if the noindex bit is set.  Otherwise it is
      an 8 bit field.  For information, relative to a packet, to a message
   or to addresses in an address block.

   A TLV associated with an address block, it block specifies the index of the first address in the address block
      (starting at zero), for some attribute(s),
   which this TLV applies, and is considered
      to be zero if omitted;

   <index-stop> is omitted if the noindex bit is set.  Otherwise it is
      an 8 bit field.  For a TLV are associated with an address block, it
      specifies the index of the last address address(es) in the address block
      (starting at zero) for which this TLV applies, and is considered address-block.  In order
   to be one less than provide the number largest amount of addresses in the flexibility to benefit from address block
      if omitted;

   <value> is omitted if the novalue bit is set.  Otherwise it contains
      a payload, of the length specified
   aggregation as described in <length>, which is to be
      processed according to the specification indexed by the <type>
      field.  If this is Section 5.2.1, a TLV for associated to an
   address block and the multivalue
      bit is set, this field is divided into (<index-stop>-<index-
      start>+1) equal-sized fields which are applied, can apply to:

   o  all addresses in order, to each the address described by <index-start> and <index-stop>.

5.2.3  Constraints block;

   o  An address SHALL NOT appear more than once  any continuous sequence of addresses in the same message
      with the same prefix length (an address without a PREFIX-LENGTH
      TLV is considered to have block;

   o  a prefix length equal to single address in the address
      length);

   o  Two or more block.

   All TLVs of the same type SHALL NOT apply conform to the same
      address with following specification:

       <tlv> = <tlv-type>
               <tlv-semantics>
               <index-start>?
               <index-stop>?
               <length>?
               <value>?

   where the same prefix length;

   o  TLVs in elements are defined thus:

   <tlv-type> is an 8 bit field, which specifies the same <tlv-block> SHALL be sorted in ascending TLV type
      order;

   o  TLVs of the same type associated TLV.
      The two most significant bits are allocated with the same <addr-block> SHALL
      be sorted following
      semantics:

      bit 7 (tlv-user): TLV types with this bit cleared ('0') are
         defined in ascending <index-start> order;

5.3  Message Content Fragmentation

   A message may this specification or can be larger than is desirable to include, allocated via standards
         action.  TLV types with the
   packet, message and other headers (UDP, IP), in a MAC frame.  In this
   case bit set ('1') are reserved for
         private/local use.

      bit 6 (msg-protocol): for TLV types with the message SHOULD be fragmented.  Only tlv-user bit cleared
         ('0'), this bit specifies, if cleared ('0'), that the originator of a
   message may decide TLV type
         is protocol independent, i.e. is not specific to fragment a message.  When a message any one
         protocol, or, if set ('1'), that the TLV type is
   fragmented specific to
         the protocol for which it MUST be assigned a content sequence number by is defined.

   <tlv-semantics> is an 8 bit field which specifies the
   originator.  Two messages with semantics of
      the same originator TLV according to the following:

      bit 0 (novalue): if cleared ('0') contains <length> and of <value>
         elements.  TLVs with this bit set ('1') contains no <length> or
         <value> elements - the same TLV type with different message bodies SHALL NOT be assigned carries all the same
   content sequence number.  Two messages with information
         needed.

      bit 1 (extended): if cleared ('0'), the same originator and size of the same type with length field
         is 8 bits.  If set ('1'), the same message body MAY be assigned size of the same
   content sequence number, in which case they length field is 16
         bits.  This bit MUST be fragmented
   identically.

   A fragment of a message may have one of two forms:

   o cleared ('0') if the fragment novalue bit is a "partially or wholly self-contained message" and
      may, thus, be parsed and processed immediately by set
         ('1').

      bit 2 (noindex): if cleared ('0'), the recipient.
      Additional processing MAY be necessary when all fragments <index-start> and <index-
         stop> elements are
      received;

   o included.  If set ('1'), the fragment is not a "partially or wholly self-contained message" <index-start>
         and may, thus, <index-stop> elements are not included.  This bit MUST be parsed and processed until
         set for packet or message TLVs.  If this bit is set ('1') for
         address block TLVs, the TLV applies to all fragments of addresses in the message have been received.

   Regardless of type, each fragment MUST be a complete message, i.e.

   MUST contain syntactically correct
         address blocks and TLVs.
   Furthermore, block.

      bit 3 (multivalue): if cleared ('0'), the TLV includes a single
         value which applies to all fragments addresses described by <index-start>
         and <index-stop>.  If set ('1'), the TLV includes separate
         values for each of a given message the addresses indicated by <index-start> and
         <index-stop>.  This bit MUST be of the same
   type.

   If a cleared ('0') for packet or
         message TLVs or if the novalue bit is fragmented, set ('1').

      bits 4-7: are RESERVED and SHALL each fragment MUST contain be cleared ('0').

   <index-start> is omitted if the following
   TLVs:

   o  a message noindex bit is set ('1'), otherwise
      it is an 8 bit field.  In the former case, the variable index-
      start is defined by:

      index-start = <index-start>

      in the latter case, the variable index-start is defined by:

      index-start = 0

      If this TLV is associated with type FRAGMENTATION, specifying an address block then index-start
      specifies the number index of
      fragments, the fragment number (counting from first address in the address block
      (starting at zero) and for which this TLV applies;

   <index-stop> is omitted if the
      fragment noindex bit is set ('1'), otherwise it
      is an 8 bit field.  In the former case, the variable index-stop is
      defined by:

      index-stop = <index-stop>

      in the latter case, for a partially or wholly self-contained message;

   o  a message TLV associated with type CONTENT-SEQ-NUMBER, specifying an address block
      with <num-addr> addresses the content
      sequence number variable index-stop is defined by:

      index-stop = <num-addr> - 1

      otherwise (a TLV associated with a packet or a message) the information in the fragment
      (note that the CONTENT-SEQ-NUMBER TLV may be useful also outside
      of fragmentation).

   Since fragmentation (see Section 6.1)
      variable index-stop is defined to be by:

      index-stop = 0

      If this TLV type zero,
   it can be determined if a message is fragmented by inspecting associated with an address block then index-stop
      specifies the
   first octet index of the message body (i.e. the first octet after last address in the
   message header).

   A message SHOULD NOT be sent with address block
      (starting at zero) for which this TLV applies.

   number-values is a message variable, defined by
      number-values = <index-stop> - <index-start> + 1

      If this TLV is associated with type
   FRAGMENTATION indicating "fragment zero an address block then number-values
      is the number of one".

6. addresses in that block to which this TLV specification

   This document
      applies, otherwise it is 1.

   <length> is omitted if the novalue bit is set ('1'), otherwise it is
      an 8 bit or 16 bit field, according to whether the extended bit is
      cleared ('0') or set ('1'), respectively.  If present this field
      specifies two message TLVs, which are required the length, counted in octets, of the
   case data contained in
      <value>.  If the multivalue bit is set ('1') then <length> MUST be
      an integral multiple of message fragmentation, number-values and two address block TLVs.  The
   address block TLVs are included to allow a standardized way of
   representing network addresses in control messages.

6.1  Message TLV Specification

   Message TLV specification overview

   +----------------------+--------+--------+--------------------------+
   |         Name         |  Type  | Length | Value                    |
   +----------------------+--------+--------+--------------------------+
   |     FRAGMENTATION    |    0   |   24   | See Table 2 below.       |
   |                      |        |  bits  |                          |
   |                      |        |        |                          |
   |  CONTENT-SEQ-NUMBER  |    1   |   16   | A sequence number,       |
   |                      |        |  bits  | associated with the      |
   |                      |        |        | content of variable single-
      length is defined by

      single-length = <length> / number-values

      otherwise, if the message   |
   +----------------------+--------+--------+--------------------------+

                                  Table 1

   The fragmentation TLV contains multivalue bit is cleared ('0'), the following fields in variable
      single-length is defined by

      single-length = <length>

   <value> is omitted if the following
   order:

   +--------------+----------------------------------------------------+
   |  Field Width | Value                                              |
   +--------------+----------------------------------------------------+
   |    8 bits    | Number of fragments                                |
   |              |                                                    |
   |    8 bits    | Fragment number                                    |
   |              |                                                    |
   |    8 bits    | A novalue bit vector, where: is set ('1'), Otherwise it is a
      field of length <length> octets.  If the multivalue bit 0 indicates, if is cleared   |
   |              |
      ('0') that then this field is associated with the packet, message or
      the relevant addresses (from index-start to index-stop) in the
      address block with which this TLV is a partially or       |
   |              | wholly self-contained message. associated, as appropriate.
      If set ('1'), the   |
   |              | message TLV multivalue bit is not a partially or wholly           |
   |              | self-contained message. Bits 1-7 are RESERVED and  |
   |              | SHALL set ('1') then this field is divided
      equally into number-values fields, each be cleared ('0').                       |
   +--------------+----------------------------------------------------+

                                  Table 2

6.2  Address Block TLV Specification

   The following address block TLVs are provided for general use, of length single-length
      octets and these are included associated, in order, to the relevant
      addresses (from index-start to index-stop) in this specification since they complement the address
   representation by providing a way of representing a network address
   in a message.

   Address block
      with which this TLV specification overview

   +----------------------+--------+--------+--------------------------+
   |         Name         |  Type  | Length | Value                    |
   +----------------------+--------+--------+--------------------------+
   |     PREFIX-LENGTH    |    0   | 8 bits | Indicates that the       |
   |                      |        |        | address is a network     |
   |                      |        |        | address, rather than a   |
   |                      |        |        | host address. associated.  The value  |
   |                      |        |        | association is interpreted
      according to the length of <tlv-type> field.

5.3.2.  Constraints

   TLVs in the     |
   |                      |        |        | netmask/prefix.          |
   +----------------------+--------+--------+--------------------------+

                                  Table 3

7.  IANA Considerations

   The message format same <tlv-block> SHALL be sorted in this specification defines a message "type"
   field, as well as two ascending TLV types for message type
   order.

   Two or more TLVs and address block of the same type associated with the same <addr-
   block> SHALL NOT both cover any index (address).

   TLVs respectively.

   A new registry for message types must be created of the same type associated with initial
   assignments as specified the same <addr-block> SHALL be
   sorted in Table 4. ascending <index-start> order.

5.4.  Message Content Fragmentation

   A new registry for message TLV types must may be created larger than is desirable to include, with initial
   assignments as specified the
   packet, message and other headers (transport, IP), in Table 5. a MAC frame.

   In this case the message SHOULD be fragmented.  Only the originator
   of a message may decide to fragment a message.  When a message is
   fragmented it MUST be assigned a content sequence number by the
   originator.  A new registry content sequence number may also be assigned for address block TLV types must
   reasons other than fragmentation.

   A content sequence number may be created with
   initial assignments as specific to the type of the message
   or not.  If the content sequence number is to be used for
   fragmentation then this is indicated as specified in Table 6.

   Assigned Section 6.1.

   Two messages with the same originator and, when the content sequence
   number is type-specific, with the same type, with different message  Types

   +--------------------+--------+-------------------------------------+
   bodies SHALL NOT be assigned the same content sequence number.  Two
   messages with the same originator and the same message body MAY be
   assigned the same content sequence number, with the same type-
   dependence, in which case they MUST be fragmented identically.

   A fragment of a message may have one of two forms:

   o  the fragment is a "partially or wholly self-contained message" and
      may, thus, be parsed and processed immediately by the recipient.
      Additional processing MAY be necessary when all fragments are
      received;

   o  the fragment is not a "partially or wholly self-contained message"
      and may, thus, not be processed until all fragments of the message
      have been received.

   Regardless of under which of the above forms a message is fragmented,
   each fragment MUST be a complete message as defined in this
   specification, i.e.  MUST contain syntactically correct address
   blocks and TLVs.  Furthermore, all fragments of a given message MUST
   be of the same type, and have the same fragmentation semantics, see
   Section 6.1.

   If a message is fragmented, each fragment MUST contain the following
   TLVs, defined in Section 6.1:

   o  a message TLV with type FRAGMENTATION, specifying the number of
      fragments, the fragment number (counting from zero), if the
      fragment is a partially or wholly self-contained message, and if
      the CONTENT-SEQ-NUMBER generated by the originator of the
      fragmented message is specific to the type of the fragmented
      message or not;

   o  a message TLV with type CONTENT-SEQ-NUMBER, specifying the content
      sequence number associated with the information in the fragment.

   If the content sequence number included in the CONTENT-SEQ-NUMBER TLV
   of a message is specific to the type of the message then the
   originating node MUST maintain a content sequence number for that
   message type and MUST increment it when it originates a new message
   of that type, but not of any other type.  A node MAY maintain such
   type-specific content sequence numbers for any number of types.

   If the content sequence number included in the CONTENT-SEQ-NUMBER TLV
   of a message is not specific to the type of the message then the
   originating node MUST maintain a single content sequence number for
   those message type for which a content sequence number is required,
   but for which the node does not maintain a type-specific content
   sequence number.  The node MUST increment this single content
   sequence number when it originates a new message of any relevant
   type, but not of any other types (either those for which a content
   sequence number is not appropriate, or for which a type-specific
   content sequence number is maintained.)

   Since FRAGMENTATION is defined to be TLV type zero (see Section 6.1),
   it can be determined if a message is fragmented by inspecting the
   first three octets of the message body (the first three octets after
   the message header):

   o  if the first two octets (the message TLV block length) are both
      zero then the message is not a fragment;

   o  otherwise if the third octet (the first message TLV type) is zero
      then the message is a fragment;

   o  otherwise the message is not a fragment.

   A message SHOULD NOT be sent with a message TLV with type
   FRAGMENTATION indicating "fragment zero of one".

6.  TLV specification

   This document specifies two message TLVs, which are required in the
   case of message fragmentation, and one address block TLV.  The
   address block TLV is included to allow a standardized way of
   representing network addresses, with a prefix length, in control
   messages.

6.1.  Message TLV Specification

                    Message TLV Specification Overview

   +----------------------+------+--------+----------------------------+
   |         Name         | Type | Length | Value                      |
   +----------------------+------+--------+----------------------------+
   |     FRAGMENTATION    |   0  |   24   | See Table 2 below.         |
   |                      |      |  bits  |                            |
   |                      |      |        |                            |
   |     CONT_SEQ_NUM     |   1  |   16   | A sequence number,         |
   |                      |      |  bits  | associated with the        |
   |                      |      |        | content of the message     |
   +----------------------+------+--------+----------------------------+

                                  Table 1

   The fragmentation TLV contains the following fields in the following
   order:

              FRAGMENTATION TLV Value Specification Overview

   +-------------+----------------------------------------------------+
   | Field Width | Value                                              |
   +-------------+----------------------------------------------------+
   |    8 bits   | Number of fragments                                |
   |             |                                                    |
   |    8 bits   | Fragment number                                    |
   |             |                                                    |
   |    8 bits   | Fragmentation semantics bit vector.                |
   +-------------+----------------------------------------------------+

                                  Table 2

   The bits in the fragmentation semantics bit vector are defined as
   follows:

   bit 0 (notselfcont): indicates, if cleared ('0') that the message TLV
      is a partially or wholly self-contained message, or if set ('1')
      that the message TLV is not a partially or wholly self-contained
      message.

   bit 1 (typedepseq): indicates, if cleared ('0') that the originator
      maintains a single sequence number for fragmented messages of
      types including the type of this message, and that this is
      included in the CONTENT-SEQ-NUMBER TLV.  If set ('1'), the
      originator node maintains a separate sequence number for the type
      of this message, and that the sequence number in the CONTENT-SEQ-
      NUMBER TLV is the sequence number corresponding to the type of
      this message.

   bits 2-7: are RESERVED and SHALL each be cleared ('0').

6.2.  Address Block TLV Specification

   The following address block TLV is provided for general use, and is
   included in this specification since it complements the address
   representation by providing a way of representing a network address
   in a message.

                 Address Block TLV Specification Overview

   +----------------------+------+--------+----------------------------+
   |         Name         | Type | Length | Value                      |
   +----------------------+------+--------+----------------------------+
   |     PREFIX_LENGTH    |   0  | 8 bits | Indicates that the address |
   |                      |      |        | is a network address,      |
   |                      |      |        | rather than a host         |
   |                      |      |        | address.  The value is the |
   |                      |      |        | length of the              |
   |                      |      |        | netmask/prefix.            |
   +----------------------+------+--------+----------------------------+

                                  Table 3

   An address in an address block without an associated PREFIX_LENGTH
   TLV may be considered to have a prefix length equal to the address
   length (in bits).

7.  IANA Considerations

   The message format in this specification defines a message "type"
   field, as well as two TLV types for message TLVs and address block
   TLVs respectively.

   A new registry for message types must be created with initial
   assignments as specified in Table 4.

   A new registry for packet TLV types must be created, with no initial
   assignments.

   A new registry for message TLV types must be created with initial
   assignments as specified in Table 5.

   A new registry for address block TLV types must be created with
   initial assignments as specified in Table 6.

                          Assigned Message Types

   +--------------------+-------+--------------------------------------+
   |      Mnemonic      | Value | Description                          |
   +--------------------+-------+--------------------------------------+
   |      RESERVED      |   0   | At start of packet signals that what |
   |                    |       | follows is a packet header, rather   |
   |                    |       | than a message header, and to allow  |
   |                    |       | packet header and message padding    |
   |                    |       | with zero octets                     |
   |                    |       |                                      |
   |      RESERVED      |   1   |                                      |
   |                    |       |                                      |
   |      RESERVED      |   2   |                                      |
   |                    |       |                                      |
   |      RESERVED      |   3   |                                      |
   |                    |       |                                      |
   |      RESERVED      |   4   |                                      |
   +--------------------+-------+--------------------------------------+

                                  Table 4

   Message types 1 to 4 are reserved because they are used by OLSRv1 [3]
   which uses a compatible packet/message header format.

                        Assigned Message TLV Types

   +--------------------+-------+--------------------------------------+
   |      Mnemonic      | Value | Description                          |
   +--------------------+-------+--------------------------------------+
   |    FRAGMENTATION   |   0   | Specifies behavior in case of        |
   |                    |       | content fragmentation                |
   |                    |       |                                      |
   |    CONT_SEQ_NUM    |   1   | A sequence number, associated with   |
   |                    |       | the content of the message           |
   +--------------------+-------+--------------------------------------+

                                  Table 5

                     Assigned Address Block TLV Types

   +--------------------+-------+--------------------------------------+
   |      Mnemonic      | Value | Description                          |
   +--------------------+-------+--------------------------------------+
   |    PREFIX_LENGTH   |   0   | Indicates that associated addresses  |
   |                    |       | are network addresses, with given    |
   |                    |       | prefix length                        |
   +--------------------+-------+--------------------------------------+

                                  Table 6

8.  Security Considerations

   Packets are designed to be transmitted only one hop, and not
   forwarded.  Thus, hop-by-hop packet level security MAY be
   implemented, between nodes with an existing security association,
   through including suitable packet TLV(s) containing a cryptographic
   signature to the packet.  Since packets are received as transmitted,
   signatures can be calculated based on the entire packet content
   (including message and packet headers), or on parts thereof as
   appropriate.

   The messages contained in a packet are available at each hop, and
   MAY, according to the information in the message header, and the
   protocol employing this specification, be forwarded and/or processed.
   If a message is to be forwarded, the <hop-count> and <hop-limit>
   fields in the message header, if present, SHOULD be modified.  All
   other message header fields, and the message body, MAY, depending on
   the protocol employing this specification, be left intact.

   Such a protocol (using immutable messages, other than the indicated
   fields) using this message format MAY, between nodes with an existing
   security association, implement end-to-end message security by
   including suitable message TLV(s) containing a cryptographic
   signature to the message.  This signature can be calculated based on
   the entire message, including the message header, with the provision
   that the <hop-count> and <hop-limit> fields MUST, if present, both be
   set to zero ('0') for both calculation and verification of the
   signature.

9.  References

9.1.  Normative References

   [1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", RFC 2119, BCP 14, March 1997.

   [2]  Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6)
        Addressing Architecture", RFC 3513, April 2003.

9.2.  Informative References

   [3]  Clausen, T. and P. Jacquet, "The Optimized Link State Routing
        Protocol", RFC 3626, October 2003.

Appendix A.  Packet and Message Layout

   This section specifies the translation from the abstract descriptions
   of packets employed in the protocol specification, and the bit-layout
   packets actually exchanged between the nodes.

Appendix A.1.  General Packet Format

   The basic layout of a packet (excluding transport and IP headers)
   SHALL be one of the following five options.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0| Reserved  |0|0|    Packet Sequence Number     |      Mnemonic
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Value                                                               | Description
     |
   +--------------------+--------+-------------------------------------+                       Message + Padding                       |      RESERVED
     |    0                                                               | Signals that the following 24 bits
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     |                                                               | are a packet header, rather than a
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                       Message + Padding                       | message header
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0| Reserved  |0|1|            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |    OLSRv1-HELLO                       Message + Padding                       |    1
     | Reserved for compatibility with                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     | OLSRv1 [2]                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                       Message + Padding                       |
     |     OLSRv1-TC                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or

      0                   1                   2   |                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0| Reserved for compatibility with  |1|0|    Packet Sequence Number     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     | OLSRv1 [2]                       Packet TLV Block                        |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |     OLSRv1-MID            Padding            |    3
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Reserved for compatibility with                                                               |
     |                       Message + Padding                       |
     | OLSRv1 [2]                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                       Message + Padding                       |
     |     OLSRv1-HNA                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4   | 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0| Reserved for compatibility with  |1|1|                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               | OLSRv1 [2]
     |
   +--------------------+--------+-------------------------------------+

                                  Table 4
   Assigned message                       Packet TLV Types

   +--------------------+--------+-------------------------------------+
   |      Mnemonic Block                        |  Value
     | Description                                                               |
   +--------------------+--------+-------------------------------------+
     |    Fragmentation                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |    0                               | Specifies behavior in case of            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     | content fragmentation                       Message + Padding                       |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     |  Content Sequence                                                               |    1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | A sequence number, associated with                                                               |
     |       Number                       Message + Padding                       |
     | the content of the message                                                               |
   +--------------------+--------+-------------------------------------+

                                  Table
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5

   Assigned address block TLV Types

   +--------------------+--------+-------------------------------------+
   |      Mnemonic      |  Value | Description                         |
   +--------------------+--------+-------------------------------------+
   |    PREFIX-LENGTH   | 6 7 8 9 0   | Indicates that associated addresses |
   |                    |        | are network addresses, with given   |
   | 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                       Message + Padding                       |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               | prefix length
     |
   +--------------------+--------+-------------------------------------+

                                  Table 6

8.  Security Considerations

   This document does currently not specify security considerations.

9.  References

   [1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", RFC 2119, BCP 14, March 1997.

   [2]  Clausen, T., "The Optimized Link State Routing Protocol",
        RFC 3626, October 2003.

   [3]  Hinden, R. and S. Deering, "Internet Protocol Version 6 (IPv6)
        Addressing Architecture", RFC 3513, April 2003.

Authors' Addresses

   Thomas Heide Clausen
   LIX, Ecole Polytechnique, France

   Phone: +33 6 6058 9349
   Email: T.Clausen@computer.org
   URI:   http://www.lix.polytechnique.fr/Labo/Thomas.Clausen/

   Christopher M. Dearlove
   BAE Systems Advanced Technology Centre

   Phone: +44 1245 242194
   Email: chris.dearlove@baesystems.com

   Justin W. Dean
   Naval Research Laboratory

   Phone: +1 202 767 3397
   Email: jdean@itd.nrl.navy.mil
   URI:   http://pf.itd.nrl.navy.mil/

Appendix A.  Packet and                       Message Layout

   This section specifies + Padding                       |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Note that in the translation from first four cases the abstract descriptions
   of packets employed Reserved bits SHOULD be zero,
   whilst in the protocol specification, and last case the bit-layout
   packets actually exchanged between first octet MUST NOT be zero (this is
   used to recognise this case).  In all cases where they are present,
   the nodes.

Appendix A.1  General Packet Format octets indicated as Padding are optional and MAY be omitted.  If
   not omitted they SHOULD be used to pad to a 32 bit boundary and MUST
   all be zero.

   The basic layout of a packet is as follows (omitting IP and UDP
   headers), either message, plus padding, SHALL be one of the
   following four options.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0|   Reserved
     |    Packet Sequence Number Message Type  |  Resv   |N|0|0|         Message Size          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Originator Address                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                            Message   Hop Limit   |   Hop Count   |    Message Sequence Number    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     :                              ...                              :
     |                         Message Body                          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                            Message                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     | Message Type  |
     |  Resv   |N|0|1|         Message Size          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   Hop Limit   |
     :                              ...                              :   Hop Count   |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                         Message Body                          |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Note that in the former case the Reserved octet will be zero, whilst
   in the latter case the first octet will not be zero.

   The basic layout of a message may be one of the following four
   options.  The U bit is used to indicate whether if this message is of
   unknown type whether it is forwarded (unset) or discarded (set).  The
   N bit is used to indicate whether the message sequence number is
   type-dependent (set) or type-independent (unset).  The reserved bits
   marked Resv will also be zero.
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Message Type  |  Resv  |U|N|0|0|   |N|1|0|         Message Size          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Originator Address                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Time To Live |   Hop Count   |    Message Sequence Number    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                         Message Body + Padding                          |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Message Type  |  Resv  |U|N|0|1|   |N|1|1|         Message Size          |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Time To Live |   Hop Count                                                               |
     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                         Message Body                          |
     |                                                               |
     |                    Message Body + Padding                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |            Padding            |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The reserved bits marked Resv SHOULD be zero.  The N bit is set ('1')
   if the message sequence number is type-dependent, or cleared ('0') if
   the message sequence number is type-independent.  The octets
   indicated as Padding are optional and MAY be omitted.  If not omitted
   they SHOULD be used to pad to a 32 bit boundary and MUST all be zero;
   they are not included in the message size.

   The basic layout of a message body SHALL be as follows.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Message Type                                                               | Resv  |U|N|1|0|
     |                       Message Size TLV Block                       |
     |                                               +-+-+-+-+-+-+-+-+
     |                                               |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Originator                         Address Block                         |
     |                                                               |
     |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |                                               |
     +-+-+-+-+-+-+-+-+                                               |
     |                       Address TLV Block                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |    Message Sequence Number                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |                    Message Body + Padding
     |                                                               |
     :                              ...                              :
     |                                                               |
     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or                                               +-+-+-+-+-+-+-+-+
     |                                               |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
     |                                                               |
     |                         Address Block                         |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                       Address TLV Block                       |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The basic layout of an address block SHALL be one of the following
   three options.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Message Type Number Addrs  |0| Head Length | Resv  |U|N|1|1|         Message Size             Head              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |              Mid              |                               |                    Message Body + Padding
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     :                              ...                              :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The basic layout of a message body, plus padding, is as follows
     |              Mid              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                       Message TLV Block       +-+-+-+-+-+-+-+-+
     |                                               |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               | 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Number Addrs  |1| Head Length |     Head      |0| Tail Length |                         Address Block
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Tail      |              Mid              |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
     |                                                               |
     +-+-+-+-+-+-+-+-+                                               |
     |                                                               |
     |                       Address TLV Block                       |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     :                              ...                              :
     |                                                               |
     |                                               +-+-+-+-+-+-+-+-+
     |                                               |               |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |              Mid              |
     |                         Address Block                         |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                       Address TLV Block                       |
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The final padding to a 32 bit boundary is optional, and is not
   included in the message length.

   The basic layout of an address block is as follows.  Note that the
   length of each tail is equal to the address length minus the head
   length.  (Tail length may be zero if, and only if, the head length
   equals the address length.)
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Number Addrs  |1| Head Length |     Head              | Number Tails      |1| Tail Length |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |             Tail              Mid              |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     :                              ...                              :
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |             Tail
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |              Mid              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The length of each Mid section is equal to the address length minus
   the Head Length and the Tail Length.  In the first case there is no
   Tail section, the Mid sections are actually tail sections.  In the
   third case the tail section is not included, it is all octets zero.

   The basic layout of a TLV block (message (packet TLV block, message TLV block
   or address TLV block) is SHALL be as follows follows.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |            Length             |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                              TLV                              |
     |                                               +-+-+-+-+-+-+-+-+
     |                                               |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
     |                                                               |
     :                              ...                              :
     |                                                               |
     |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                               |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                              TLV                              |
     |                                               +-+-+-+-+-+-+-+-+
     |                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Length is of the TLV block contents, it does not include itself
   (hence if there are no TLVs then Length is zero).

   The basic layout of a TLV may SHALL be one of the following six options.
   Note that a message TLV may only be one of the last three options.  M
   denotes the multivalue bit when it may be cleared
   A packet TLV or set.  The
   reserved bits marked Resv will also message TLV SHALL be zero. one of the last three options
   only.

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |M|0|0|0|    Length     |  Index Start  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Index Stop   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |
     +-+-+-+-+-+-+-+-+    Length     |                                               |                             Value
     +-+-+-+-+-+-+-+-+                                               |
     |                             Value                             |
     |                                                               |
     |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |
     +-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |0|0|0|1|  Index Start  |  Index Stop   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |M|0|1|0|            Length             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Index Start  |  Index Stop   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |            Length             |                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
     |                                                               |
     |                                                               |
     |                             Value                             |
     |                                                               |
     |                                                               |
     |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |
     +-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |M|1|0|0|    Length     |               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               |
     |                                                               |
     |                             Value                             |
     |                                                               |
     |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |
     +-+-+-+-+-+-+-+-+

   or

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |0|1|0|1|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   or
      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      | Resv  |M|1|1|0|            Length             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                                                               |
     |                             Value                             |
     |                                                               |
     |                                                               |
     |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |               |
     +-+-+-+-+-+-+-+-+

   M denotes the multivalue bit in those cases when it may be set ('1')
   or cleared ('0').  In the cases where it MUST be cleared ('0') it is
   shown thus; it MUST also be cleared ('0') in a packet TLV or message
   TLV.)  The reserved bits marked Resv SHOULD also be zero.

   An example packet, using IPv4 addresses (length four octets) is
   shown.  This packet has a header, with header a packet sequence number but
   no packet TLV block, and containing contains a single message, is as
   follows. unfragmented message.  The
   message has a complete message header, a message TLV block of content
   length 7 9 octets
   (excluding the length iself) containing a single TLV (non-extended (with the noindex bit of its
   semantics set and value length 4) 6 octets) and then two address blocks
   each with a following TLV block.  The first address block contains 4 3
   addresses (head length 3) 2 octets, no tail, hence mid length two
   octets) and is followed by an empty a TLV block (length 0, excluding of content length 9 octets
   containing two TLVs.  The first of these TLVs has the noindex bit of
   its semantics set and has a single value of length 2 octets, which
   applies to all of the addresses in the preceding address block.  The
   second of these TLVs has the novalue bit of its semantics set and
   hence has no length
   itself). or value fields (it does have index fields, which
   indicate which of the addresses this TLV applies to).  The second
   address block contains 3 2 addresses (head length
   2) 0 octets, hence no
   head octets, tail length 2 octets, zero-valued tail not included,
   hence mid length two octets) and is followed by a TLV block of
   content length 13 octets (excluding the
   length itself) containing two TLVs.  The first 5 octets.  This TLV block contains a single TLV of these TLVs
   type PREFIX_LENGTH which has the
   noindex and multivalue and no index bits of its
   semantics set and has three values
   (equal to the number of addresses) of two octets each, totalling to
   its (unextended) a value field length of 6 octets.  The second of these TLVs
   has the novalue bit 2 octets, indicating two
   values each of its semantics set and hence has no length or
   value fields (it does have index fields). one octet length.  There are three two final padding octets
   which are not included in the message length of 57 62 octets.  The addresses used in this example are IPv4 addresses
   (length four octets).

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0| Reserved    |  |0|0|    Packet Sequence Number     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Message Type  |  Resv  |U|N|0|0|0   |N|0|0|0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1| 1 1 0|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                      Originator Address                       |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Time to Live   Hop Limit   |   Hop Count   |    Message Sequence Number    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1|   TLV Type    | Resv  |0|1|0|0|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 1 0 1 0|                     Value                     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                 Value (cont)                  |0 0 0 0 0 0 1 1|             Head              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Head (cont)
     |0 0 0 0 0 1 0 1 0|     Tail             Head              |     Tail      Mid      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Tail  Mid (cont)   |     Tail              Mid              |      Mid      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Mid (cont)   |0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1|   TLV Type    |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Resv  |0|1|0|0|0 0 0 0 0 0 1 0|             Value             |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   TLV Type    | Resv  |0|0|0|1|  Index Start  |  Index Stop   |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 1 0|             Head              |0 0|1 0 0 0 0 0 0 0|1 0 0 0 0 0 1 1|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |             Tail              |             Tail 0|      Mid      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |             Tail  Mid (cont)   |              Mid              |0 0 0 0 0 0 0 0|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |0 0 0 0 0 0 1 1 0 1|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |   TLV Type PREFIX_LENGTH | Resv  |1|1|0|0|0 0 0 0 0 1 0 1 0|    Value0     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |    Value0 (cont)     |    Value1             |    Value2     |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | Value2 (cont) |   TLV Type    | Resv  |0|0|0|1|  Index Start  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  Index Stop     |0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Appendix B.  Contributors

   This specification is the result of the joint efforts of the
   following contributers from the OLSRv2 Design Team -- listed
   alphabetically.

   o  Cedric Adjih, INRIA, France, <Cedric.Adjih@inria.fr>

   o  Emmanuel Baccelli, INRIA, Hitachi Labs Europe, France,
      <Emmanuel.Baccelli@inria.fr>

   o  Thomas Heide Clausen, PCRI, LIX, Ecole Polytechnique, France,
      <T.Clausen@computer.org>

   o  Justin W. Dean, NRL, USA<jdean@itd.nrl.navy.mil>

   o  Christopher Dearlove, BAE Systems, UK,
      <chris.dearlove@baesystems.com>

   o  Satoh Hiroki, Hitachi SDL, Japan, <h-satoh@sdl.hitachi.co.jp>

   o  Philippe Jacquet, INRIA, France, <Philippe.Jacquet@inria.fr>

   o  Monden Kazuya, Hitachi SDL, Japan, <monden@sdl.hitachi.co.jp>

Appendix C.  Acknowledgements

   The authors would like to acknowledge the team behind OLSRv1, as
   specified in RFC3626, including Anis Laouiti, Pascale Minet, Laurent
   Viennot (all at INRIA, France), and Amir Qayuum (Center for Advanced
   Research in Engineering, Pakistan) for their contributions.

   The authors would like to gratefully acknowledge the following people
   for intense technical discussions, early reviews and comments on the
   specification and its components: Joe Macker (NRL), Alan Cullen (BAE
   Systems), Ian Chakeres (Boeing), Charlie E. Perkins (Nokia), Andreas Schjonhaug,
   Schjonhaug (LIX), Florent Brunneau (LIX), and the entire IETF MANET
   working group.

Authors' Addresses

   Thomas Heide Clausen
   LIX, Ecole Polytechnique, France

   Phone: +33 6 6058 9349
   Email: T.Clausen@computer.org
   URI:   http://www.lix.polytechnique.fr/Labo/Thomas.Clausen/

   Christopher M. Dearlove
   BAE Systems Advanced Technology Centre

   Phone: +44 1245 242194
   Email: chris.dearlove@baesystems.com
   URI:   http://www.baesystems.com/ocs/sharedservices/atc/

   Justin W. Dean
   Naval Research Laboratory

   Phone: +1 202 767 3397
   Email: jdean@itd.nrl.navy.mil
   URI:   http://pf.itd.nrl.navy.mil/

   Cedric Adjih
   INRIA Rocquencourt

   Phone: +33 1 3963 5215
   Email: Cedric.Adjih@inria.fr

Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Copyright Statement

   Copyright (C) The Internet Society (2006).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.

Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.