idnits 2.17.1 draft-ietf-manet-rfc5444-usage-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5444, updated by this document, for RFC5378 checks: 2006-03-01) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 17, 2017) is 2528 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group T. Clausen 3 Internet-Draft Ecole Polytechnique 4 Updates: 5444 (if approved) C. Dearlove 5 Intended status: Standards Track BAE Systems 6 Expires: November 18, 2017 U. Herberg 8 H. Rogge 9 Fraunhofer FKIE 10 May 17, 2017 12 Rules for Designing Protocols Using the RFC 5444 Generalized Packet/ 13 Message Format 14 draft-ietf-manet-rfc5444-usage-06 16 Abstract 18 RFC 5444 specifies a generalized MANET packet/message format and 19 describes an intended use for multiplexed MANET routing protocol 20 messages that is mandated to use on the port/protocol specified by 21 RFC 5498. This document updates RFC 5444 by providing rules and 22 recommendations for how the multiplexer operates and how protocols 23 can use the packet/message format. In particular, the mandatory 24 rules prohibit a number of uses that have been suggested in various 25 proposals, and which would have led to interoperability problems, to 26 the impediment of protocol extension development, and to an inability 27 to use optional generic parsers. 29 Status of this Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on November 18, 2017. 46 Copyright Notice 48 Copyright (c) 2017 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 1.1. History and Purpose . . . . . . . . . . . . . . . . . . . 3 65 1.2. RFC 5444 Features . . . . . . . . . . . . . . . . . . . . 3 66 1.2.1. Packet/Message Format . . . . . . . . . . . . . . . . 4 67 1.2.2. Multiplexing and Demultiplexing . . . . . . . . . . . 6 68 1.3. Status of This Document . . . . . . . . . . . . . . . . . 7 69 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 70 3. Applicability Statement . . . . . . . . . . . . . . . . . . . 7 71 4. Information Transmission . . . . . . . . . . . . . . . . . . . 8 72 4.1. Where to Record Information . . . . . . . . . . . . . . . 8 73 4.2. Message and TLV Type Allocation . . . . . . . . . . . . . 9 74 4.3. Message Recognition . . . . . . . . . . . . . . . . . . . 9 75 4.4. Message Multiplexing and Packets . . . . . . . . . . . . . 10 76 4.4.1. Packet Transmission . . . . . . . . . . . . . . . . . 10 77 4.4.2. Packet Reception . . . . . . . . . . . . . . . . . . . 11 78 4.5. Messages, Addresses and Attributes . . . . . . . . . . . . 13 79 4.6. Addresses Require Attributes . . . . . . . . . . . . . . . 13 80 4.7. TLVs . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 81 4.8. Message Integrity . . . . . . . . . . . . . . . . . . . . 16 82 5. Structure . . . . . . . . . . . . . . . . . . . . . . . . . . 17 83 6. Message Efficiency . . . . . . . . . . . . . . . . . . . . . . 18 84 6.1. Address Block Compression . . . . . . . . . . . . . . . . 18 85 6.2. TLVs . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 86 6.3. TLV Values . . . . . . . . . . . . . . . . . . . . . . . . 20 87 7. Security Considerations . . . . . . . . . . . . . . . . . . . 21 88 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 89 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 22 90 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 23 91 10.1. Normative References . . . . . . . . . . . . . . . . . . . 23 92 10.2. Informative References . . . . . . . . . . . . . . . . . . 23 93 Appendix A. Information Representation . . . . . . . . . . . . . 24 94 Appendix B. Automation . . . . . . . . . . . . . . . . . . . . . 25 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 25 97 1. Introduction 99 [RFC5444] specifies a generalized packet/message format, designed for 100 use by MANET routing protocols. 102 [RFC5444] was designed following experiences with [RFC3626], which 103 attempted, but did not quite succeed in, providing a packet/message 104 format accommodating for diverse protocol extensions. [RFC5444] was 105 designed as a common building block for use by both proactive and 106 reactive MANET routing protocols. 108 [RFC5498] mandates the use of this packet/message format, and of the 109 packet multiplexing process described in an Appendix to [RFC5444], by 110 protocols operating over the manet IP protocol and port numbers that 111 were allocated following [RFC5498]. 113 1.1. History and Purpose 115 Since the publication of [RFC5444] in 2009, several RFCs have been 116 published, including [RFC5497], [RFC6130], [RFC6621], [RFC7181], 117 [RFC7182], [RFC7183], [RFC7188], [RFC7631], and [RFC7722], that use 118 the format of [RFC5444]. The ITU-T recommendation [G9903] also uses 119 the format of [RFC5444] for encoding some of its control signals. In 120 developing these specifications, experience with the use of [RFC5444] 121 has been acquired, specifically with respect to how to write 122 specifications using [RFC5444] so as to ensure "forward 123 compatibility" of a protocol with future extensions, to enable the 124 creation of efficient messages, and to enable the use of an efficient 125 and generic parser for all protocols using [RFC5444]. 127 During the same time period, other suggestions have been made to use 128 [RFC5444] in a manner that would inhibit the development of 129 interoperable protocol extensions, that would potentially lead to 130 inefficiencies, or that would lead to incompatibilities with generic 131 parsers for [RFC5444]. While these uses were not all explicitly 132 prohibited by [RFC5444], they should be strongly discouraged. This 133 document is intended to prohibit such uses, to present experiences 134 from designing protocols using [RFC5444], and to provide these as 135 guidelines (with their rationale) for future protocol designs using 136 [RFC5444]. 138 1.2. RFC 5444 Features 140 [RFC5444] performs two main functions: 142 o It defines a packet/message format for use by MANET routing 143 protocols. As far as [RFC5444] is concerned, it is up to each 144 protocol that uses it to implement the required message parsing 145 and formation. It is natural, especially when implementing more 146 than one such protocol, to implement these processes using 147 protocol-independent packet/message creation and parsing 148 procedures, however this is not required by [RFC5444]. Some 149 comments in this document may be particularly applicable to such a 150 case, but all that is required is that the messages passed to and 151 from protocols are correctly formatted, and that packets 152 containing those messages are correctly formatted as described in 153 the following point. 155 o It specifies, in its Appendix A combined with the intended usage 156 in its Appendix B, a multiplexing and demultiplexing process 157 whereby an entity which may be referred to as the "RFC 5444 158 multiplexer" (in this document simply as the multiplexer, or the 159 demultiplexer when performing that function) manages packets that 160 travel a single (logical) hop, and which contain messages that are 161 owned by individual protocols. A packet may contain messages from 162 more than one protocol. This process, and its usage, is mandated 163 for use on the manet UDP port and IP protocol (alternative means 164 for the transport of packets) by [RFC5498]. The multiplexer is 165 responsible for creating packets and for parsing packet headers, 166 extracting messages, and passing them to the appropriate protocol 167 according to their type (the first octet in the message). 169 1.2.1. Packet/Message Format 171 Among the characteristics and design objectives of the packet/message 172 format of [RFC5444] are: 174 o It is designed for carrying MANET routing protocol control 175 signals. 177 o It defines a packet as a Packet Header with a set of Packet TLVs 178 (Type-Length-Value structures), followed by a set of messages. 179 Each message has a well-defined structure consisting of a Message 180 Header (designed for making processing and forwarding decisions) 181 followed by a set of Message TLVs, and a set of (address, type, 182 value) associations using Address Blocks and their Address Block 183 TLVs. The [RFC5444] packet/message format then enables the use of 184 simple and generic parsing logic for Packet Headers, Message 185 Headers, and message content. 187 A packet may include messages from different protocols, such as 188 [RFC6130] and [RFC7181], in a single transmission. This was 189 observed in [RFC3626] to be beneficial, especially in wireless 190 networks where media contention may be significant. 192 o Its packets are designed to travel between two neighboring 193 interfaces, which will result in a single decrement of the IPv4 194 TTL or IPv6 hop limit. The Packet Header and any Packet TLVs may 195 thus convey information relevant to that link (for example, the 196 Packet Sequence Number can be used to count transmission successes 197 across that link). Packets are designed to be constructed for a 198 single hop transmission; a packet transmission following a 199 successful packet reception is by design of a new packet that may 200 include all, some, or none of the received messages, plus possibly 201 additional messages either received in separate packets, or 202 generated locally at that router. Messages may thus travel more 203 than one hop, and are designed to carry end-to-end protocol 204 signals. 206 o It supports "internal extensibility" using TLVs; an extension can 207 add information to an existing message without that information 208 rendering the message unparseable or unusable by a router that 209 does not support the extension. An extension is typically of the 210 protocol that created the message to be extended, for example 211 [RFC7181] adds information to the HELLO messages created by 212 [RFC6130]. However an extension may also be independent of the 213 protocol, for example [RFC7182] can add ICV (Integrity Check 214 Value) and timestamp information to any message (or to a packet, 215 thus extending the [RFC5444] multiplexer). 217 Information, in the form of TLVs, can be added to the message as a 218 whole, such as the [RFC7182] integrity information, or may be 219 associated with specific addresses in the message, such as the MPR 220 selection and link metric information added to HELLO messages by 221 [RFC7181]. An extension can also add addresses to a message. 223 o It uses address aggregation into compact Address Blocks by 224 exploiting commonalities between addresses. In many deployments, 225 addresses (IPv4 and IPv6) used on interfaces share a common prefix 226 that need not be repeated. Using IPv6, several addresses (of the 227 same interface) may have common interface identifiers that need 228 not be repeated. 230 o It sets up common namespaces, formats, and data structures for use 231 by different protocols, where common parsing logic can be used. 232 For example, [RFC5497] defines a generic TLV format for 233 representing time information (such as interval time or validity 234 time). 236 o It contains a minimal Message Header (a maximum of five elements: 237 type, originator, sequence number, hop count and hop limit) that 238 permit decisions whether to locally process a message, or forward 239 a message (thus enabling MANET-wide flooding of a message) without 240 processing the body of the message. 242 1.2.2. Multiplexing and Demultiplexing 244 The multiplexer (and demultiplexer) is defined in Appendix A of 245 [RFC5444]. Its purpose is to allow multiple protocols to share the 246 same IP protocol or UDP port. That sharing was made necessary by the 247 separation of [RFC6130] from [RFC7181] as separate protocols, and by 248 the allocation of a single IP protocol and UDP port to all MANET 249 protocols, including those protocols, following [RFC5498], which 250 states that "All interoperable protocols running on these well-known 251 IANA allocations MUST conform to [RFC5444]. [RFC5444] provides a 252 common format that enables one or more protocols to share the IANA 253 allocations defined in this document unambiguously.". The 254 multiplexer is the mechanism in [RFC5444] that enables that sharing. 256 The primary purposes of the multiplexer are to: 258 o Accept messages from MANET protocols, which also indicate over 259 which interface(s) the messages are to be sent, and to which 260 destination address. The latter may be a unicast address or the 261 "LL-MANET-Routers" link local multicast address defined in 262 [RFC5498]. 264 o Collect messages, possibly from multiple protocols, for the same 265 interface and destination, into packets to be sent one logical 266 hop, and to send packets using the manet UDP port or IP protocol 267 defined in [RFC5498]. 269 o Extract messages from received packets, and pass them to their 270 owning protocols. 272 The multiplexer's relationship is with the protocols that own the 273 corresponding Message Types. Where those protocols have their own 274 relationships, for example as extensions, this is the responsibility 275 of the protocols. For example OLSRv2 [RFC7181] extends the HELLO 276 messages created by NHDP [RFC6130]. However the multiplexer will 277 deliver HELLO messages to NHDP and will expect to receive HELLO 278 messages from NHDP, the relationship between NHDP and OLSRv2 is 279 between those two protocols. 281 The multiplexer is also responsible for the Packet Header, including 282 any Packet Sequence Number and Packet TLVs. It may accept some 283 additional instructions from protocols, pass additional information 284 to protocols, and must follow some additional rules, see Section 4.4. 286 1.3. Status of This Document 288 This document updates [RFC5444], and is intended for publication as a 289 Proposed Standard (rather than as Informational) because it specifies 290 and mandates constraints on the use of [RFC5444] which, if not 291 followed, makes forms of extensions of those protocols impossible, 292 impedes the ability to generate efficient messages, or makes 293 desirable forms of generic parsers impossible. 295 2. Terminology 297 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 298 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 299 "OPTIONAL" in this document are to be interpreted as described in 300 [RFC2119]. 302 This document uses the terminology and notation defined in [RFC5444], 303 in particular the terms "packet", "Packet Header", "message", 304 "Message Header", "address", "Address Block", "TLV" and "TLV Block" 305 are to be interpreted as described therein. 307 Additionally, this document uses the following terminology: 309 Full Type (of TLV) - As per [RFC5444], the 16-bit combination of the 310 TLV Type and Type Extension is given the symbolic name , but is not assigned the term "Full Type", which is 312 however assigned by this document as standard terminology. 314 Owning Protocol - As per [RFC5444], for each Message Type, a 315 protocol -- unless specified otherwise, the one making the IANA 316 reservation for that Message Type -- is designated as the "owning 317 protocol" of that Message Type. The (de)multiplexer inspects the 318 Message Type of each received message, and delivers each message 319 to its corresponding "owning protocol". 321 3. Applicability Statement 323 This document does not specify a protocol, but documents constraints 324 on how to design protocols that are using the generic packet/message 325 format defined in [RFC5444] which, if not followed, makes forms of 326 extensions of those protocols impossible, impedes the ability to 327 generate efficient (small) messages, or makes desirable forms of 328 generic parsers impossible. The use of the [RFC5444] format is 329 mandated by [RFC5498] for all protocols running over the manet 330 protocol and port, defined therein. Thus, the constraints in this 331 document apply to all protocols running over the manet protocol and 332 port. The constraints are strongly recommended for other uses of 333 [RFC5444]. 335 4. Information Transmission 337 Protocols need to transmit information from one instance implementing 338 the protocol to another. 340 4.1. Where to Record Information 342 A protocol has the following choices as to where to put information 343 for transmission: 345 o In a TLV to be added to the Packet Header. 347 o In a message of a type owned by another protocol. 349 o In a message of a type owned by the protocol. 351 The first case (a Packet TLV) can only be used when the information 352 is to be carried one hop. It SHOULD only be used either where the 353 information relates to the packet as a whole (for example packet 354 integrity check values and timestamps, as specified in [RFC7182]) or 355 if the information is of expected wider application than a single 356 protocol. A protocol can also request that the Packet Header include 357 Packet Sequence Numbers, but does not control those numbers. 359 The second case (in a message of a type owned by another protocol) is 360 only possible if the adding protocol is an extension to the owning 361 protocol; for example OLSRv2 [RFC7181] is an extension of NHDP 362 [RFC6130]. 364 The third case is the normal case for a new protocol. 366 A protocol extension may be either simply an update of the protocol 367 (the third case) or be a new protocol that also updates another 368 protocol (the second case). An example of the latter is that OLSRv2 369 [RFC7181] is a protocol that also extends the HELLO message owned by 370 NHDP [RFC6130]; it thus is an example of both the second and third 371 cases (the latter using the OLSRv2 owned TC message). An extension 372 to [RFC5444], such as [RFC7182], is considered to be an extension to 373 all protocols. Protocols SHOULD be designed to enable extension by 374 any of these means to be possible, and some of the rules in this 375 document (in particular on Section 4.6 and Section 4.8) are to help 376 facilitate that. 378 4.2. Message and TLV Type Allocation 380 Protocols SHOULD be conservative in the number of new Message Types 381 that they require, as the total available number of allocatable 382 Message Types is only 224. Protocol design SHOULD consider whether 383 different functions can be implemented by differences in TLVs carried 384 in the same Message Type, rather than using multiple Message Types. 386 The TLV type space, although greater than the Message Type space, 387 SHOULD also be used efficiently. The Full Type of a TLV occupies two 388 octets, thus there are many more available TLV Full Types than there 389 are Message Types. However, in some cases (currently LINK_METRIC 390 from [RFC7181] and ICV and TIMESTAMP from [RFC7182], all in the 391 global TLV type space) a TLV Type with a complete set of 256 TLV Full 392 Types is defined (but not necessarily allocated). 394 Each Message Type has an associated block of Message-Type-specific 395 TLV Types (128 to 233, each of with 256 type extensions), both for 396 Address Block TLV Types and Message TLV Types. TLV Types from within 397 these blocks SHOULD be used in preference to the Message-Type- 398 independent Message TLV Types (0 to 127, each with 256 type 399 extensions) when a TLV is specific to a message. 401 The Expert Review guidelines in [RFC5444] are accordingly updated as 402 described in Section 8. 404 4.3. Message Recognition 406 A message contains a Message Header and a Message Body; note that the 407 Message TLV Block is considered as part of the latter. The Message 408 Header contains information whose primary purpose is to decide 409 whether to process the message, and whether to forward the message. 411 A message can be recognized as one that has been previously seen 412 (which may determine whether it is processed and/or forwarded) if it 413 contains sufficient information in its Message Header. A message 414 MUST be so recognized by the combination of all three of its Message 415 Type, Originator Address and Message Sequence Number. The inclusion 416 of Message Type allows each protocol to manage its own Message 417 Sequence Numbers, and also allows for the possibility that different 418 Message Types may have greatly differing transmission rates. As an 419 example of such use, [RFC7181] contains a general purpose process for 420 managing processing and forwarding decisions, albeit one presented as 421 for use with MPR flooding. (Blind flooding can be handled similarly 422 by assuming that all other routers are MPR selectors; it is not 423 necessary in this case to differentiate between interfaces on which a 424 message is received.) 425 Most protocol information is thus contained in the Message Body. A 426 model of how such information may be viewed is described in 427 Section 4.5 and Section 4.6. To use that model, addresses (for 428 example of neighboring or otherwise known routers) SHOULD be recorded 429 in Address Blocks, not as data in TLVs. Recording addresses in TLV 430 Value fields both breaks the model of addresses as identities and 431 associated information (attributes) and also inhibits address 432 compression. However in some cases alternative addresses (e.g., 433 hardware addresses when the Address Block is recording IP addresses) 434 MAY be carried as TLV Values. Note that a message contains a Message 435 Address Length field that can be used to allow carrying alternative 436 message sizes, but only one length of addresses can be used in a 437 single message, in all Address Blocks and the Originator Address, and 438 is established by the router and protocol generating the message. 440 4.4. Message Multiplexing and Packets 442 The multiplexer has to handle message multiplexing into packets and 443 their transmission, and packet reception and demultiplexing into 444 messages. The multiplexer and the protocols that use it are subject 445 to the following rules. 447 4.4.1. Packet Transmission 449 Packets are formed for transmission by: 451 o Outgoing messages are created by their owning protocol, and MAY be 452 modified by any extending protocols if the owning protocol permits 453 this. Messages MAY also be forwarded by their owning protocol. 454 It is strongly RECOMMENDED that messages are not modified in the 455 latter case, other than updates to their hop count and hop limit 456 fields, as described in Section 7.1.1 of [RFC5444]. Note that 457 this includes having an identical octet representation, including 458 not allowing a different TLV representation of the same 459 information. This is because it enables end to end authentication 460 that ignores (zeros) those two fields (only), as is done by for 461 the Message TLV ICV (Integrity Check Value) calculations in 462 [RFC7182]. Protocols are strongly RECOMMENDED to document their 463 behavior with regard to modifiability of messages. 465 o Outgoing messages are then sent to the multiplexer. The owning 466 protocol MUST indicate which interface(s) the messages are to be 467 sent on and their destination address. Note that packets travel 468 one hop; the destination is therefore either a link local 469 multicast address, if the packet is being multicast, or the 470 address of the neighbor interface to which the packet is sent. 472 o The owning protocol MAY request that messages are kept together in 473 a packet; the multiplexer SHOULD respect this request if at all 474 possible. The multiplexer SHOULD combine messages that are sent 475 on the same interface in a packet, whether from the same of 476 different protocols, provided that in so doing the multiplexer 477 does not cause an IP packet to exceed the current MTU (Maximum 478 Transmission Unit). Note that the multiplexer cannot fragment 479 messages; creating suitable sized messages that will not cause the 480 MTU to be exceeded if sent in a single message packet is the 481 responsibility of the protocol generating the message. If a 482 larger message is created then only IP fragmentation is available 483 to allow the packet to be sent, and this is generally considered 484 undesirable, especially when transmission may be unreliable. 486 o The multiplexer MAY delay messages in order to assemble more 487 efficient packets. It MUST respect any constraints on such delays 488 requested by the protocol if it is practical to do so. 490 o If requested by a protocol, the multiplexer MUST, and otherwise 491 MAY, include a Packet Sequence Number in the packet. Such a 492 request MUST be respected as long as the protocol is active. Note 493 that the errata to [RFC5444], indicates that the Packet Sequence 494 Number SHOULD be specific to the interface on which the packet is 495 sent. This specification updates [RFC5444] by requiring that this 496 sequence number MUST be specific to that interface and also that 497 separate sequence numbers MUST be maintained for each destination 498 to which packets are sent with included Packet Sequence Numbers. 499 Addition of Packet Sequence Numbers MUST be consistent, i.e., for 500 each interface and destination the Packet Sequence Number MUST be 501 added to all packets or to none. 503 o An extension to the multiplexer MAY add TLVs to the packet. It 504 may also add TLVs to the messages, in which case it is considered 505 as also extended the corresponding protocols. For example 506 [RFC7182] can be used by the multiplexer to add Packet TLVs or 507 Message TLVs, or by the protocol to add Message TLVs. 509 4.4.2. Packet Reception 511 When a packet is received, the following steps are performed by the 512 demultiplexer and by protocols: 514 o The Packet Header and the organization into the messages that it 515 contains MUST be verified by the demultiplexer. 517 o The packet and/or the messages it contains MAY also be verified by 518 an extension to the demultiplexer, such as [RFC7182]. 520 o Each message MUST be sent to its owning protocol, or discarded if 521 the Message Type is not recognized. The demultiplexer MUST also 522 make the Packet Header, and the source and destination addresses 523 in the IP datagram that included the packet, available to the 524 protocol. 526 o The demultiplexer MUST remove any Message TLVs that were added by 527 an extension to the multiplexer. The message MUST be passed on to 528 the protocol exactly as received from (another instance of) the 529 protocol. This is in part an implementation detail. For example 530 an implementation of [RFC7182] could add Message TLV either in the 531 multiplexer or in the protocol; an implementation MUST ensure that 532 the message passed to a protocol is as it would be passed from 533 that protocol by this implementation. 535 o The owning protocol MUST verify each message for correctness, it 536 MUST allow any extending protocol(s) to also contribute to this 537 verification. 539 o The owning protocol MUST process each message. In some cases, 540 which will be defined in the protocol specification, this 541 processing will determine that the message MUST be ignored. 542 Except in the latter case, the owning protocol MUST also allow any 543 extending protocols to process the message. 545 o The owning protocol MUST manage the hop count and/or hop limit in 546 the message. It is RECOMMENDED that these are handled as 547 described in Appendix B of [RFC5444]; they MUST be so handled if 548 using hop count dependent TLVs such as those defined in [RFC5497]. 550 4.4.2.1. Other Information 552 In addition to the messages between the multiplexer and the protocols 553 in each direction, the following additional information, summarized 554 from other sections in this specification, can be exchanged. 556 o The packet source and destination addresses MUST be sent from 557 (de)multiplexer to protocol. 559 o The Packet Header, including packet sequence number, MUST be sent 560 from (de)multiplexer to protocol if present. (An implementation 561 may choose to only do so, or only report the packet sequence 562 number, on request.) 564 o A protocol MAY require that all outgoing packets contain a packet 565 sequence number. 567 o The interface over which a message is to be sent and its 568 destination address MUST be sent from protocol to multiplexer. 569 The destination address may be a multicast address, in particular 570 the LL-MANET-Routers link-local multicast address defined in 571 [RFC5498]. 573 o A request to keep messages together in one packet MAY be sent from 574 protocol to multiplexer. 576 o A requested maximum message delay MAY be sent from protocol to 577 multiplexer. 579 The protocol SHOULD also be aware of the MTU that will apply to its 580 messages, if this is available. 582 4.5. Messages, Addresses and Attributes 584 The information in a Message Body, including Message TLVs and Address 585 Block TLVs, can be considered to consist of: 587 o Attributes of the message, each attribute consisting of a Full 588 Type, a length, and a Value (of that length). 590 o A set of addresses, carried in one or more Address Blocks. 592 o Attributes of each address, each attribute consisting of an Full 593 Type, a length, and a Value (of that length). 595 Attributes are carried in TLVs. For Message TLVs the mapping from 596 TLV to attribute is one to one. For Address Block TLVs the mapping 597 from TLV to attribute is one to many: one TLV can carry attributes 598 for multiple addresses, but only one attribute per address. 599 Attributes for different addresses may be the same or different. 601 It is RECOMMENDED that a TLV Full Type MAY be defined so that there 602 MUST only be one TLV of that Full Type associated with the packet 603 (Packet TLV), message (Message TLV), or any value of any address 604 (Address Block TLV). Note that an address may appear more than once 605 in a message, but the restriction on associating TLVs with addresses 606 covers all copies of that address. It is RECOMMENDED that addresses 607 are not repeated in a message. 609 A conceptual way to view this information is described in Appendix A. 611 4.6. Addresses Require Attributes 613 It is not mandatory in [RFC5444] to associate an address with 614 attributes using Address Block TLVs. Information about an address 615 could thus, in principle, be carried using: 617 o The simple presence of an address. 619 o The ordering of addresses in an Address Block. 621 o The use of different meanings for different Address Blocks. 623 This specification, however, requires that those methods of carrying 624 information MUST NOT be used for any protocol using [RFC5444]. 625 Information about the meaning of an address MUST only be carried 626 using Address Block TLVs. 628 In addition, rules for the extensibility of OLSRv2 and NHDP are 629 described in [RFC7188]. This specification extends their 630 applicability to other uses of [RFC5444]. 632 These rules are: 634 o A protocol MUST NOT assign any meaning to the presence or absence 635 of an address (either in a Message, or in a given Address Block in 636 a Message), to the ordering of addresses in an Address Block, or 637 to the division of addresses among Address Blocks. 639 o A protocol MUST NOT reject a message based on the inclusion of a 640 TLV of an unrecognized type. The protocol MUST ignore any such 641 TLVs when processing the message. The protocol MUST NOT remove or 642 change any such TLVs if the message is to be forwarded unchanged. 644 o A protocol MUST NOT reject a message based on the inclusion of an 645 unrecognized Value in a TLV of a recognized type. The protocol 646 MUST ignore any such Values when processing the message, but MUST 647 NOT ignore recognized Values in such a TLV. The protocol MUST NOT 648 remove or change any such TLVs if the message is to be forwarded 649 unchanged. 651 o Similar restrictions to the two preceding points apply to the 652 demultiplexer, which also MUST NOT reject a packet based on an 653 unrecognized message; although it will reject any such messages, 654 it MUST deliver any other messages in the packet to their owning 655 protocols. 657 The following points indicate the reasons for these rules, based on 658 considerations of extensibility and efficiency. 660 Assigning a meaning to the presence, absence or location, of an 661 address would reduce the extensibility of the protocol, prevent the 662 approach to information representation described in Appendix A, and 663 reduce the options available for message optimization described in 664 Section 6. 666 To consider how the simple presence of an address conveying 667 information would have restricted the development of an extension, 668 two examples, one actual (included in the base specification, but 669 could have been added later) and one hypothetical, are considered. 671 The basic function of NHDP's HELLO messages [RFC6130] is to indicate 672 that addresses are of neighbors, using the LINK_STATUS and 673 OTHER_NEIGHB TLVs. (The message may also indicate the routers own 674 addresses, which could also serve as a further example.) 676 An extension to NHDP might decide to use the HELLO message to report 677 that an address is one that could be used for a specialized purpose 678 rather than for normal NHDP-based purposes. Such an example already 679 exists in the use of LOST Values in the LINK_STATUS and OTHER_NEIGHB 680 TLVs to report that an address is of a router known not to be a 681 neighbor. 683 A future example could be to indicate that an address is to be added 684 to a "blacklist" of addresses not to be used. This would use a new 685 TLV (or a new Value of an existing TLV, see below). Assuming that no 686 other TLVs are attached to such blacklisted addresses, then an 687 unmodified extension to NHDP would ignore those addresses, as 688 required. (If however, for example, a LINK_STATUS or OTHER_NEIGHB 689 TLV with Value LOST were also attached to that address, then the 690 receiving router would process that address for that TLV.) If NHDP 691 had been designed so that just the presence of an address indicated a 692 neighbor, this blacklist extension would not be possible. 694 Rejecting a message because it contains an unrecognized TLV Type, or 695 an unrecognized TLV Value, reduces the extensibility of the protocol. 697 For example, OLSRv2 [RFC7181] is, among other things, an extension to 698 NHDP. It adds information to addresses in an NHDP HELLO message 699 using a LINK_METRIC TLV. A non-OLSRv2 implementation of NHDP, for 700 example to support Simplified Multicast Flooding (SMF) [RFC6621], 701 must still process the HELLO message, ignoring the LINK_METRIC TLVs. 703 Also, the blacklisting described in the example above could be 704 signaled not with a new TLV, but with a new Value of a LINK_STATUS or 705 OTHER_NEIGHB TLV (requiring an IANA allocation as described in 706 [RFC7188]), as is already done in the LOST case. 708 The creation of Multi-Topology OLSRv2 (MT-OLSRv2) [RFC7722], as an 709 extension to OLSRv2 that can interoperate with unextended instances 710 of OLSRv2, would not have been possible without these restrictions, 711 which were applied to NHDP and OLSRv2 by [RFC7181]. 713 These restrictions do not, however, mean that added information is 714 completely ignored for purposes of the base protocol. Suppose that a 715 faulty implementation of OLSRv2 (including NHDP) creates a HELLO 716 message that assigns two different values of the same link metric to 717 an address, something that is not permitted by [RFC7181]. A 718 receiving OLSRv2-aware implementation of NHDP will reject such a 719 message, even though a receiving OLSRv2-unaware implementation of 720 NHDP will process it. This is because the OLSRv2-aware 721 implementation has access to additional information, that the HELLO 722 message is definitely invalid, and the message is best ignored, as it 723 is unknown what other errors it may contain. 725 4.7. TLVs 727 Within a message, the attributes are represented by TLVs. 728 Particularly for Address Block TLVs, different TLVs may represent the 729 same information. For example, using the LINK_STATUS TLV defined in 730 [RFC6130], if some addresses have Value SYMMETRIC and some have Value 731 HEARD, arranged in that order, then this information can be 732 represented using two single value TLVs or one multivalue TLV. The 733 latter can be used even if the addresses are not so ordered. 735 A protocol MAY use any representation of information using TLVs that 736 convey the required information. A protocol SHOULD use an efficient 737 representation, but this is a quality of implementation issue. A 738 protocol MUST recognize any permitted representation of the 739 information; even if it chooses to (for example) only use multivalue 740 TLVs, it must recognize single value TLVs (and vice versa). 742 A protocol defining new TLVs MUST respect the naming and 743 organizational rules in [RFC7631]. It SHOULD follow the guidance in 744 [RFC7188], in particular see Section 6.3. (This specification does 745 not however relax the application of [RFC7188] where it is mandated.) 747 4.8. Message Integrity 749 In addition to not rejecting a message due to unknown TLVs or TLV 750 Values, a protocol MUST NOT reject a message based on the inclusion 751 of a TLV of an unrecognized type. The protocol MUST ignore any such 752 TLVs when processing the message. The protocol MUST NOT remove or 753 change any such TLVs if the message is to be forwarded unchanged. 754 Such behavior would have the consequences that: 756 o It might disrupt the operation of an extension of which it is 757 unaware. Note that it is the responsibility of a protocol 758 extension to handle interoperation with unextended instances of 759 the protocol. For example OLSRv2 [RFC7181] adds an MPR_WILLNG TLV 760 to HELLO messages (created by NHDP, [RFC6130], of which it is in 761 part an extension) to recognize this case (and for other reasons). 763 o It would prevent the operation of end to end message 764 authentication using [RFC7182], or any similar mechanism. The use 765 of immutable (apart from hop count and/or hop limit) messages by a 766 protocol is strongly RECOMMENDED for that reason. 768 5. Structure 770 This section concerns the properties of the format defined in 771 [RFC5444] itself, rather than the properties of protocols using it. 773 The elements defined in [RFC5444] have structures that are managed by 774 a number of flags fields: 776 o Packet flags field (4 bits, 2 used) that manages the contents of 777 the Packet Header. 779 o Message flags field (4 bits, 4 used) that manages the contents of 780 the Message Header. 782 o Address Block flags field (8 bits, 4 used) that manages the 783 contents of an Address Block. 785 o TLV flags field (8 bits, 5 used) that manages the contents of a 786 TLV. 788 Note that all of these flags are structural, they specify which 789 elements are present or absent, or field lengths, or whether a field 790 has one or multiple values in it. 792 In the current version of [RFC5444], indicated by version number 0 in 793 the field of the Packet Header, unused bits in these flags 794 fields are stated as "are RESERVED and SHOULD each be cleared ('0') 795 on transmission and SHOULD be ignored on reception". For the 796 avoidance of any compatibility issues, for version number 0 this is 797 updated to "MUST each be cleared ('0') on transmission and MUST be 798 ignored on reception". 800 If a specification updating [RFC5444] introduces new flags in one of 801 the flags fields of a packet, Address Block or TLV (there being no 802 unused flags in the message flags field), the following rules MUST be 803 followed: 805 o The version number contained in the field of the Packet 806 Header MUST NOT be 0. 808 o The new flag(s) MUST indicate the structure of the corresponding 809 packet, Address Block or TLV, and MUST NOT be used to indicate any 810 other semantics, such as message forwarding behavior. 812 An update that would be incompatible with the current specification 813 of [RFC5444] should not be created unless there is a pressing reason 814 for it that cannot be satisfied using the current specification 815 (e.g., by use of a suitable Message TLV). 817 During the development of [RFC5444], and since publication thereof, 818 some proposals have been made to use these RESERVED flags to specify 819 behavior rather than structure, in particular message forwarding. 820 These proposals were, after due consideration, not accepted, for a 821 number of reasons. These reasons include that message forwarding, in 822 particular, is protocol-specific; for example [RFC7181] forwards 823 messages using its MPR (Multi-Point Relay) mechanism, rather than a 824 "blind" flooding mechanism. (These proposals were made during the 825 development of [RFC5444] when there were still unused message flags. 826 Later addition of a 4 bit Message Address Length field later left no 827 unused message flags, but other flags fields still have unused 828 flags.) 830 6. Message Efficiency 832 The ability to organize addresses into different, or the same, 833 Address Blocks, as well as to change the order of addresses within an 834 Address Block, and the flexibility of the TLV specification, enables 835 avoiding unnecessary repetition of information, and consequently can 836 generate smaller messages. No algorithms for address organization or 837 compression or for TLV usage are given in [RFC5444], any algorithms 838 that leave the information content unchanged MAY be used when 839 generating a message. See also Appendix B. 841 6.1. Address Block Compression 843 [RFC5444] allows the addresses in an Address Block to be compressed. 844 A protocol generating a message SHOULD compress addresses as much as 845 it can. 847 Addresses in an Address Block consist of a Head, a Mid, and a Tail, 848 where all addresses in an Address Block have the same Head and Tail, 849 but different Mids. Each has a length that is greater than or equal 850 to zero, the sum of the lengths being the address length. (The Mid 851 length is deduced from this relationship.) Compression is possible 852 when the Head and/or the Tail have non-zero length. An additional 853 compression is possible when the Tail consists of all zero-valued 854 octets. Expected use cases are IPv4 and IPv6 addresses from within 855 the same prefix and which therefore have a common Head, IPv4 subnets 856 with a common zero-valued Tail, and IPv6 addresses with a common Tail 857 representing an interface identifier, as well as having a possible 858 common Head. Note that when, for example, IPv4 addresses have a 859 common Head, their Tail will usually have length zero. 861 For example: 863 o The IPv4 addresses 192.0.2.1 and 192.0.2.2 would, for greatest 864 efficiency, have a 3 octet Head, a 1 octet Mid, and a 0 octet 865 Tail. 867 o The IPv6 addresses 2001:DB8:prefix1:interface and 2001:DB8: 868 prefix2:interface that use the same interface identifier but 869 completely different prefixes (except as noted) would, for 870 greatest efficiency, have a 4 octet head, a 4 octet Mid, and an 8 871 octet Tail. (They could have a larger Head and/or Tail and a 872 smaller Mid if the prefixes have any octets in common.) 874 Putting addresses into a message efficiently also has to consider: 876 o The split of the addresses into Address Blocks. 878 o The order of the addresses within the Address Blocks. 880 This split and/or ordering is for efficiency only, it does not 881 provide any information. The split of the addresses affects both the 882 address compression and the TLV efficiency (see Section 6.2), the 883 order of the addresses within an Address Block affects only the TLV 884 efficiency. However using more Address Blocks than is needed can 885 increase the message size due to the overhead of each Address Block 886 and the following TLV Block, and/or if additional TLVs are now 887 required. 889 The order of addresses can be as simple as sorting the addresses, but 890 if many addresses have the same TLV Types attached, it might be more 891 useful to put these addresses together, either within the same 892 Address Block as other addresses, or in a separate Address Block. A 893 separate Address Block might also improve address compression, for 894 example if more than one address form is used (such as from 895 independent subnets). An example of the possible use of address 896 ordering is a HELLO message from [RFC6130] which could be generated 897 with local interface addresses first and neighbor addresses later. 898 These could be in separate Address Blocks. 900 6.2. TLVs 902 The main opportunities for creating more efficient messages when 903 considering TLVs are in Address Block TLVs, rather than Message TLVs. 905 An Address Block TLV provides attributes for one address or a 906 contiguous (as stored in the Address Block) set of addresses (with a 907 special case for when this is all addresses in an Address Block). 908 When associated with more than one address, a TLV may be single value 909 (associating the same attribute with each address) or multivalue 910 (associating a separate attribute with each address). 912 The simplest to implement approach is to use multivalue TLVs that 913 cover all affected addresses. However unless care is taken to order 914 addresses appropriately, these affected addresses may not all be 915 contiguous. Approaches to this are to: 917 o Reorder the addresses. It is, for example, possible (though not 918 straightforward, and beyond the scope of this document to describe 919 exactly how) to order all addresses in HELLO message as specified 920 in [RFC6130] so that all TLVs used only cover contiguous 921 addresses. This is even possible if the MPR TLV specified in 922 OLSRv2 [RFC7181] is added; but it is not possible, in general, if 923 the LINK_METRIC TLV specified in OLSRv2 [RFC7181] is also added. 925 o Allow the TLV to span over addresses that do not need the 926 corresponding attribute, using a Value that indicates no 927 information, see Section 6.3. 929 o Use more than one TLV. Note that this can be efficient when the 930 TLVs thus become single value TLVs. In a typical case where a 931 LINK_STATUS TLV uses only the Values HEARD and SYMMETRIC, with 932 enough addresses, sorted appropriately, two single value TLVs can 933 be more efficient than one multivalue TLV. If only one Value is 934 involved, such as NHDP in a steady state with LINK_STATUS equal to 935 SYMMETRIC in all cases, then one single value TLV SHOULD always be 936 used. 938 6.3. TLV Values 940 If, for example, an Address Block contains five addresses, the first 941 two and the last two requiring Values assigned using a LINK_STATUS 942 TLV, but the third does not, then this can be indicated using two 943 TLVs. It is however more efficient to do this with one multivalue 944 LINK_STATUS TLV, assigning the third address the Value UNSPECIFIED. 945 In general, use of UNSPECIFIED Values allows use of fewer TLVs and 946 thus often an efficiency gain; however a long run of consecutive 947 UNSPECIFIED Values (more than the overhead of a TLV) may make more 948 TLVs more efficient. 950 Some other TLVs may need a different approach. As noted in 951 [RFC7188], but implicitly permissible before then, the LINK_METRIC 952 TLV, defined in [RFC7181], has two octet Values whose first four bits 953 are flags indicating whether the metric applies in four cases; if 954 these are all zero then the metric does not apply in this case, which 955 is thus the equivalent of an UNSPECIFIED Value. 957 [RFC7188] required that protocols that extend [RFC6130] and [RFC7181] 958 allow unspecified values in TLVs where applicable. It is here 959 RECOMMENDED that all protocols follow that advice, and use the same 960 value (255). In particular, when defining any Address Block TLV with 961 discrete Values that an UNSPECIFIED Value is defined, and that a 962 modified approach is used where possible for other Address Block 963 TLVs, for example as is done for a LINK_METRIC TLV (though not 964 necessarily using that exact approach). 966 It might be argued that provision of an unspecified value (of any 967 form) to allow an Address Block TLV to cover unaffected addresses is 968 not always necessary because addresses can be reordered to avoid 969 this. However ordering addresses to avoid this for all TLVs that may 970 be used is not, in general, possible. 972 In addition, [RFC7188] RECOMMENDS that if a TLV Value (per address 973 for an Address Block TLV) has a single-length that does not match the 974 defined length for that TLV Type, then the following rules are 975 adopted: 977 o If the received single-length is greater than the expected single- 978 length, then the excess octets MUST be ignored. 980 o If the received single-length is less than the expected single- 981 length, then the absent octets MUST be considered to have all bits 982 cleared (0). 984 7. Security Considerations 986 This document does not specify a protocol, but provides rules and 987 recommendations for how to design protocols using [RFC5444], whose 988 security considerations apply. 990 If the recommendation in Section 4.4.1 that messages are not modified 991 (except for hop count and hop limit) when forwarded is followed, then 992 the security framework for [RFC5444] specified in [RFC7182] can be 993 used in full. If that recommendation is not followed, then the 994 Packet TLVs from [RFC7182] can be used, but the Message TLVs from 996 [RFC7182] cannot be used as intended. 998 In either case, a protocol using [RFC5444] MUST document whether it 999 is using [RFC7182] and if so, how. 1001 8. IANA Considerations 1003 The Expert Review guidelines in [RFC5444] are updated to include the 1004 general requirement that: 1006 o The Designated Expert will consider the limited TLV and, 1007 especially, Message Type space in considering whether a requested 1008 allocation is allowed, and whether a more efficient allocation 1009 than that requested is possible. 1011 9. Acknowledgments 1013 The authors thank Cedric Adjih (INRIA) and Justin Dean (NRL) for 1014 their contributions as authors of RFC 5444. 1016 10. References 1018 10.1. Normative References 1020 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1021 Requirement Levels", RFC 2119, BCP 14, March 1997. 1023 [RFC5444] Clausen, T., Dearlove, C., Dean, J., and C. Adjih, 1024 "Generalized MANET Packet/Message Format", RFC 5444, 1025 February 2009. 1027 [RFC5498] Chakeres, I., "IANA Allocations for Mobile Ad Hoc Network 1028 (MANET) Protocols", RFC 5498, March 2009. 1030 [RFC7182] Herberg, U., Clausen, T., and C. Dearlove, "Integrity 1031 Check Value and Timestamp TLV Definitions for Mobile Ad 1032 Hoc Networks (MANETs)", RFC 7182, April 2014. 1034 [RFC7631] Dearlove, C. and T. Clausen, "TLV Naming in the MANET 1035 Generalized Packet/Message Format", RFC 7631, 1036 January 2015. 1038 10.2. Informative References 1040 [G9903] "ITU-T G.9903: Narrow-band orthogonal frequency division 1041 multiplexing power line communication transceivers for G3- 1042 PLC networks", May 2013. 1044 [RFC3626] Clausen, T. and P. Jacquet, "The Optimized Link State 1045 Routing Protocol", RFC 3626, October 2003. 1047 [RFC5497] Clausen, T. and C. Dearlove, "Representing Multi-Value 1048 Time in Mobile Ad Hoc Networks (MANETs)", RFC 5497, 1049 March 2009. 1051 [RFC6130] Clausen, T., Dean, J., and C. Dearlove, "Mobile Ad Hoc 1052 Network (MANET) Neighborhood Discovery Protocol (NHDP)", 1053 RFC 6130, April 2011. 1055 [RFC6621] Macker, J., "Simplified Multicast Forwarding", RFC 6621, 1056 May 2012. 1058 [RFC7181] Clausen, T., Dearlove, C., Jacquet, P., and U. Herberg, 1059 "The Optimized Link State Routing Protocol version 2", 1060 RFC 7181, April 2014. 1062 [RFC7183] Herberg, U., Dearlove, C., and T. Clausen, "Integrity 1063 Protection for the Neighborhood Discovery Protocol (NHDP) 1064 and Optimized Link State Routing Protocol Version 2 1065 (OLSRv2)", RFC 7183, April 2014. 1067 [RFC7188] Dearlove, C. and T. Clausen, "Optimized Link State Routing 1068 Protocol version 2 (OLSRv2) and MANET Neighborhood 1069 Discovery Protocol (NHDP) Extension TLVs", RFC 7188, 1070 April 2014. 1072 [RFC7722] Dearlove, C. and T. Clausen, "Multi-Topology Extension for 1073 the Optimized Link State Routing Protocol Version 2 1074 (OLSRv2)", RFC 7722, December 2015. 1076 Appendix A. Information Representation 1078 This section describes a conceptual way to consider the information 1079 in a message. It may be used as the basis of an approach to parsing, 1080 or creating, a message to, or from, the information that it contains, 1081 or is to contain. However there is no requirement that a protocol 1082 does so. This approach may be used either to inform a protocol 1083 design, or by a protocol (or generic parser) implementer. 1085 A message (excluding the Message Header) can be represented by two, 1086 possibly multivalued, maps: 1088 o Message: (Full Type) -> (length, Value) 1090 o Address: (address, Full Type) -> (length, Value) 1092 These maps (plus a representation of the Message Header) can be the 1093 basis for a generic representation of information in a message. Such 1094 maps can be created by parsing the message, or can be constructed 1095 using the protocol rules for creating a message, and later converted 1096 into the octet form of the message specified in [RFC5444]. 1098 While of course any implementation of software that represents 1099 software in the above form can specify an application programming 1100 interface (API) for that software, such an interface is not proposed 1101 here. First, a full API would be programming language specific. 1102 Second, even within the above framework, there are alternative 1103 approaches to such an interface. For example, and for illustrative 1104 purposes only, for the address mapping: 1106 o Input: address and Full Type. Output: list of (length, Value) 1107 pairs. Note that for most Full Types it will be known in advance 1108 that this list will have length zero or one. The list of 1109 addresses that can be used as inputs with non-empty output would 1110 need to be provided as a separate output. 1112 o Input: Full Type. Output: list of (address, length, Value) 1113 triples. As this list length may be significant, a possible 1114 output will be of one or two iterators that will allow iterating 1115 through that list. (One iterator that can detect the end of list, 1116 or a pair of iterators specifying a range.) 1118 Additional differences in the interface may relate to, for example, 1119 the ordering of output lists. 1121 Appendix B. Automation 1123 There is scope for creating a protocol-independent optimizer for 1124 [RFC5444] messages that performs appropriate address re-organization 1125 (ordering and Address Block separation) and TLV changes (of number, 1126 single- or multi- valuedness and use of unspecified values) to create 1127 more compact messages. The possible gain depends on the efficiency 1128 of the original message creation, and the specific details of the 1129 message. Note that this process cannot be TLV Type independent, for 1130 example a LINK_METRIC TLV has a more complicated Value structure than 1131 a LINK_STATUS TLV does if using UNSPECIFIED Values. 1133 Such a protocol-independent optimizer MAY be used by the router 1134 generating a message, but MUST NOT be used on a message that is 1135 forwarded unchanged by a router. 1137 Authors' Addresses 1139 Thomas Clausen 1140 Ecole Polytechnique 1141 91128 Palaiseau Cedex, 1142 France 1144 Phone: +33-6-6058-9349 1145 Email: T.Clausen@computer.org 1146 URI: http://www.thomasclausen.org 1148 Christopher Dearlove 1149 BAE Systems Applied Intelligence Laboratories 1150 West Hanningfield Road 1151 Great Baddow, Chelmsford 1152 United Kingdom 1154 Email: chris.dearlove@baesystems.com 1155 URI: http://www.baesystems.com 1156 Ulrich Herberg 1158 Email: ulrich@herberg.name 1159 URI: http://www.herberg.name 1161 Henning Rogge 1162 Fraunhofer FKIE 1163 Fraunhofer Strasse 20 1164 53343 Wachtberg 1165 Germany 1167 Email: henning.rogge@fkie.fraunhofer.de