RFC 3252
Binary Lexical Octet Ad-hoc Transport
Binary Lexical Octet Ad-hoc Transport (BLOAT) ๐
Okay bestie, this is RFC 3252 ๐ฆ It's titled Binary Lexical Octet Ad-hoc Transport, written by H. Kennedy from Mimezine, and it's an Informational doc dated 1 April 2002 ๐ธ It doesn't list anything it obsoletes or updates, so it's standing on its own, no cap ๐
Status of this Memo ๐
This memo gives information to the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited โจ
Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved. ๐
Abstract
This doc defines a reformulation of IP and two transport layer protocols (TCP and UDP) as XML applications ๐ง
1. Introduction โจ
1.1. Overview
So this is the Binary Lexical Octet Ad-hoc Transport (BLOAT) ๐ It's a reformulation of a widely deployed network-layer protocol (IP [RFC791]) plus two transport layer protocols that go with it, TCP [RFC793] and UDP [RFC768], all written as XML [XML] applications. It also covers how to carry BLOAT over Ethernet and IEEE 802 networks, and how to wrap BLOAT inside IP so it can hop across the public Internet ๐
1.2. Motivation
Okay, the main-character origin story ๐ XML got super popular as the base for application-level protocols like the Blocks Extensible Exchange Protocol [RFC3080], the Simple Object Access Protocol [SOAP], and Jabber [JABBER]. That's what made people wonder, "wait, what if we used XML lower down the stack too?" ๐ค
Using XML at the transport and network layers, on top of the application layer, would give you an amazing amount of power and flexibility ๐ญ It also gets rid of dependence on proprietary, hard-to-understand binary protocols. Honestly the vibe is one parser for everything: apps could use a single XML parser for all aspects of their operation, so nobody has to spend developer time figuring out the intricacies of each new protocol. The hard parsing work just moves to the XML toolset ๐ซถ
And the XML thing also helps with the "network vs. host" byte ordering stuff, which the document says sits at the root of many network application bugs ๐
1.3. Relation to Existing Protocols
The reformulations in this RFC follow the spirit of the RFCs they're based on as closely as possible ๐ So they MAY contain elements or attributes that wouldn't be needed in a pure reworking, like length attributes, which are implicit in XML.
The layering of the network and transport protocols is kept intact, even though you could make optimizations if the line got a bit blurry (like merging TCP and IP into one bigger element in the DTD). The reason? To keep this protocol usable as a base for reformulating other protocols, such as ICMP ๐ฆ
Apart from the encoding, the behavioural aspects of each existing protocol stay unchanged. Routing, address spaces, TCP congestion control, and so on all behave as the existing standards say โจ And once the move to BLOAT is done, adapting to new standards and experimental algorithm heuristics for better performance should get way easier ๐
1.4. Requirement Levels
Here's the lowkey important bit ๐ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be read as described in BCP 14, RFC 2119 [RFC2119] ๐
2. IPoXML
This protocol MUST be implemented to be compliant with this RFC ๐ IPoXML is the root protocol REQUIRED for effective use of TCPoXML (section 3.) and the higher-level application protocols ๐
The DTD for this document type can be found in section 7.1 ๐ง
Routing IPoXML is pretty easy to implement on hosts that have an XML parser, because the regular structure is so handy for parsing and validating the document/datagram. Then you process the destination address, TTL, and checksum before sending it on to its next hop ๐
They went with a reformulation of IPv4 instead of IPv6 [RFC2460] for two reasons: IPv4 is way more widely deployed, and implementing IPv6 as XML would have blown past the 1500 byte Ethernet MTU ๐ญ
All BLOAT implementations MUST use, and specify, the UTF-8 encoding from RFC 2279 [RFC2279] ๐ธ All BLOAT document/datagrams MUST be well-formed and include the XMLDecl โจ
2.1. IP Description
A bunch of things got better compared to the original IP spec ๐ฅฐ Bit-masks, where they existed, got turned into human-readable values. IP addresses are listed in dotted-decimal notation [RFC1123]. Length and checksum values show up as decimal integers ๐ข
To calculate the length and checksum fields of the IP element, a canonicalized form of the element MUST be used. The canonical form SHALL have no whitespace (including newline characters) between elements, and only one space character between attributes. There SHALL NOT be a space after the last attribute in an element ๐ซง
An iterative method SHOULD be used to calculate checksums, because the length field changes depending on how big the checksum is ๐
The payload element is the one that needs extra care ๐ XML has character set restrictions, and the payload of IP datagrams (which MAY contain arbitrary data) MUST be encoded for transport. This RFC REQUIRES the payload contents to be encoded in the base-64 encoding of RFC 2045 [RFC2045], but it removes the requirement that the encoded output MUST be wrapped on 76-character lines ๐
2.2. Example Datagram
Here's an example IPoXML datagram with an empty payload ๐ฆ
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
<ip>
<header length="474">
<version value="4"/>
<tos precedence="Routine" delay="Normal" throughput="Normal"
relibility="Normal" reserved="0"/>
<total.length value="461"/>
<id value="1"/>
<flags reserved="0" df="dont" mf="last"/>
<offset value="0"/>
<ttl value="255"/>
<protocol value="6"/>
<checksum value="8707"/>
<source address="10.0.0.22"/>
<destination address="10.0.0.1"/>
<options>
<end copied="0" class="0" number="0"/>
</options>
<padding pad="0"/>
</header>
<payload>
</payload>
</ip>
Part 2 picks up with TCPoXML ๐
7.1. IPoXML DTD ๐
Okay bestie, this DTD is for IP over XML, so the whole IP header gets dressed up as elements and attributes ๐ Here's the full thing, comments and all:
<!--
DTD for IP over XML.
Refer to this DTD as:
<!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
-->
<!--
DTD data types:
Digits [0..9]+
Precedence "NetworkControl | InternetworkControl |
CRITIC | FlashOverride | Flash | Immediate |
Priority | Routine"
IP4Addr "dotted-decimal" notation of [RFC1123]
Class [0..3]
Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
Restricted | Secret | Top Secret | Reserved"
Compartments [0..65535]
Handling [0..65535]
TCC [0..16777216]
-->
<!ENTITY % Digits "CDATA">
<!ENTITY % Precedence "CDATA">
<!ENTITY % IP4Addr "CDATA">
<!ENTITY % Class "CDATA">
<!ENTITY % Sec "CDATA">
<!ENTITY % Compartments "CDATA">
<!ENTITY % Handling "CDATA">
<!ENTITY % TCC "CDATA">
<!ELEMENT ip (header, payload)>
<!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
protocol, checksum, source, destination, options,
padding)>
<!-- length of header in 32-bit words -->
<!ATTLIST header
length %Digits; #REQUIRED>
<!ELEMENT version EMPTY>
<!-- ip version. SHOULD be "4" -->
<!ATTLIST version
value %Digits; #REQUIRED>
<!ELEMENT tos EMPTY>
<!ATTLIST tos
precedence %Precedence; #REQUIRED
delay (normal | low) #REQUIRED
throughput (normal | high) #REQUIRED
relibility (normal | high) #REQUIRED
reserved CDATA #FIXED "0">
<!ELEMENT total.length EMPTY>
<!--
total length of datagram (header and payload) in octets, MUST be
less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
ethernets).
-->
<!ATTLIST total.length
value %Digits; #REQUIRED>
<!ELEMENT id EMPTY>
<!-- 0 <= id <= 65,535 -->
<!ATTLIST id
value %Digits; #REQUIRED>
<!ELEMENT flags EMPTY>
<!-- df = don't fragment, mf = more fragments -->
<!ATTLIST flags
reserved CDATA #FIXED "0"
df (may|dont) #REQUIRED
mf (last|more) #REQUIRED>
<!ELEMENT offset EMPTY>
<!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
<!ATTLIST offset
value %Digits; #REQUIRED>
<!ELEMENT ttl EMPTY>
<!-- 0 <= ttl <= 255 -->
<!ATTLIST ttl
value %Digits; #REQUIRED>
<!ELEMENT protocol EMPTY>
<!-- 0 <= protocol <= 255 (per IANA) -->
<!ATTLIST protocol
value %Digits; #REQUIRED>
<!ELEMENT checksum EMPTY>
<!-- 0 <= checksum <= 65535 (over header only) -->
<!ATTLIST checksum
value %Digits; #REQUIRED>
<!ELEMENT source EMPTY>
<!ATTLIST source
address %IP4Addr; #REQUIRED>
<!ELEMENT destination EMPTY>
<!ATTLIST destination
address %IP4Addr; #REQUIRED>
<!ELEMENT options ( end | noop | security | loose | strict | record
| stream | timestamp )*>
<!ELEMENT end EMPTY>
<!ATTLIST end
copied (0|1) #REQUIRED
class CDATA #FIXED "0"
number CDATA #FIXED "0">
<!ELEMENT noop EMPTY>
<!ATTLIST noop
copied (0|1) #REQUIRED
class CDATA #FIXED "0"
number CDATA #FIXED "1">
<!ELEMENT security EMPTY>
<!ATTLIST security
copied CDATA #FIXED "1"
class CDATA #FIXED "0"
number CDATA #FIXED "2"
length CDATA #FIXED "11"
security %Sec; #REQUIRED
compartments %Compartments; #REQUIRED
handling %Handling; #REQUIRED
tcc %TCC; #REQUIRED>
<!ELEMENT loose (hop)+>
<!ATTLIST loose
copied CDATA #FIXED "1"
class CDATA #FIXED "0"
number CDATA #FIXED "3"
length %Digits; #REQUIRED
pointer %Digits; #REQUIRED>
<!ELEMENT hop EMPTY>
<!ATTLIST hop
address %IP4Addr; #REQUIRED>
<!ELEMENT strict (hop)+>
<!ATTLIST strict
copied CDATA #FIXED "1"
class CDATA #FIXED "0"
number CDATA #FIXED "9"
length %Digits; #REQUIRED
pointer %Digits; #REQUIRED>
<!ELEMENT record (hop)+>
<!ATTLIST record
copied CDATA #FIXED "0"
class CDATA #FIXED "0"
number CDATA #FIXED "7"
length %Digits; #REQUIRED
pointer %Digits; #REQUIRED>
<!ELEMENT stream EMPTY>
<!-- 0 <= id <= 65,535 -->
<!ATTLIST stream
copied CDATA #FIXED "1"
class CDATA #FIXED "0"
number CDATA #FIXED "8"
length CDATA #FIXED "4"
id %Digits; #REQUIRED>
<!ELEMENT timestamp (tstamp)+>
<!-- 0 <= oflw <=15 -->
<!ATTLIST timestamp
copied CDATA #FIXED "0"
class CDATA #FIXED "2"
number CDATA #FIXED "4"
length %Digits; #REQUIRED
pointer %Digits; #REQUIRED
oflw %Digits; #REQUIRED
flag (0 | 1 | 3) #REQUIRED>
<!ELEMENT tstamp EMPTY>
<!ATTLIST tstamp
time %Digits; #REQUIRED
address %IP4Addr; #IMPLIED>
<!--
padding to bring header to 32-bit boundary.
pad MUST be "0"*
-->
<!ELEMENT padding EMPTY>
<!ATTLIST padding
pad CDATA #REQUIRED>
<!-- payload MUST be encoded as base-64 [RFC2045], as modified
by section 2.1 of this RFC -->
<!ELEMENT payload (CDATA)>
Ngl, the total.length rule is the one to watch: the datagram has to stay under 65,535 and should stay under 1024 on local ethernets ๐ธ And the payload is base-64 encoded (see [RFC2045]), with the tweak from section 2.1 of this RFC ๐ง
7.2. TCPoXML DTD ๐ฆ
Next up is the TCP one, which gets its own public ID so the parser knows exactly what it's dealing with:
<!--
DTD for TCP over XML.
Refer to this DTD as:
<!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
-->
<!-- the pseudoheader is only included for checksum calculations -->
<!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
<!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
reserved, control, window, checksum, urgent,
tcp.options, padding)>
<!ELEMENT src EMPTY>
<!-- 0 <= port <= 65,535 -->
<!ATTLIST src
port %Digits; #REQUIRED>
<!ELEMENT dest EMPTY>
<!-- 0 <= port <= 65,535 -->
<!ATTLIST dest
port %Digits; #REQUIRED>
<!ELEMENT sequence EMPTY>
<!-- 0 <= number <= 4294967295 -->
<!ATTLIST sequence
number %Digits; #REQUIRED>
<!ELEMENT acknowledgement EMPTY>
<!-- 0 <= number <= 4294967295 -->
<!ATTLIST acknowledgement
number %Digits; #REQUIRED>
<!ELEMENT offset EMPTY>
<!-- 0 <= number <= 255 -->
<!ATTLIST offset
number %Digits; #REQUIRED>
<!ELEMENT reserved EMPTY>
<!ATTLIST reserved
value CDATA #FIXED "0">
<!ELEMENT control EMPTY>
<!ATTLIST control
urg (0|1) #IMPLIED
ack (0|1) #IMPLIED
psh (0|1) #IMPLIED
rst (0|1) #IMPLIED
syn (0|1) #IMPLIED
fin (0|1) #IMPLIED>
<!ELEMENT window EMPTY>
<!-- 0 <= size <= 65,535 -->
<!ATTLIST window
size %Digits; #REQUIRED>
<!--
checksum as in ip, but with
the following pseudo-header added into the tcp element:
-->
<!ELEMENT tcp.pseudoheader (source, destination, protocol,
tcp.length)>
<!--
tcp header + data length in octets. does not include the size of
the pseudoheader.
-->
<!ELEMENT tcp.length EMPTY>
<!ATTLIST tcp.length
value %Digits; #REQUIRED>
<!ELEMENT urgent EMPTY>
<!-- 0 <= pointer <= 65,535 -->
<!ATTLIST urgent
pointer %Digits; #REQUIRED>
<!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
<!ELEMENT tcp.end EMPTY>
<!ATTLIST tcp.end
kind CDATA #FIXED "0">
<!ELEMENT tcp.noop EMPTY>
<!ATTLIST tcp.noop
kind CDATA #FIXED "1">
<!ELEMENT tcp.mss EMPTY>
<!ATTLIST tcp.mss
kind CDATA #FIXED "2"
length CDATA #FIXED "4"
size %Digits; #REQUIRED>
The pseudoheader only shows up here for checksum maths, so it's giving "for checksums only" energy ๐งฎ
7.3. UDPoXML DTD ๐
And last but not least, the UDP version, which is the simplest of the bunch โจ
<!--
DTD for UDP over XML.
Refer to this DTD as:
<!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
-->
<!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
<!ELEMENT udp.header (src, dest, udp.length, checksum)>
<!ELEMENT udp.pseudoheader (source, destination, protocol,
udp.length)>
<!--
udp header + data length in octets. does not include the size of
the pseudoheader.
-->
<!ELEMENT udp.length EMPTY>
<!ATTLIST udp.length
value %Digits; #REQUIRED>
8. Security Considerations ๐ฅ
Okay, serious moment, bestie ๐ซถ XML is basically a subset of SGML, so it has the same security considerations that are laid out in SGML Media Types [RFC1874]. Plus, anything that's a security issue for IP, TCP and UDP likely applies to BLOAT too, since BLOAT doesn't try to fix problems that have nothing to do with message format ๐
9. References ๐
- [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt, February 2002. (Work in Progress)
- [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.
- [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
- [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
- [RFC894] Hornig, C., "Standard for the Transmission of IP Datagrams over Ethernet Networks.", RFC 894, April 1984.
- [RFC1042] Postel, J. and J. Reynolds, "Standard for the Transmission of IP Datagrams Over IEEE 802 Networks", STD 43, RFC 1042, February 1988.
- [RFC1123] Braden, R., "Requirements for Internet Hosts - Application and Support", RFC 1123, October 1989.
- [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December 1995.
- [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003, October 1996.
- [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.
- [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.
- [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core", RFC 3080, March 2001.
- [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A., Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D., "Simple Object Access Protocol (SOAP) 1.1" World Wide Web Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
- [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible Markup Language (XML)" World Wide Web Consortium Recommendation REC- xml-19980210. http://www.w3.org/TR/1998/REC-xml-19980210
10. Author's Address ๐
Hugh Kennedy
Mimezine
1060 West Addison
Chicago, IL 60613
USA
EMail: kennedyh@engin.umich.edu
11. Full Copyright Statement ๐โจ
Copyright (C) The Internet Society (2002). All Rights Reserved. ๐
Okay, the legal bit, but make it cute ๐. You're allowed to copy and share this document and translations of it. You can also write derivative works that comment on or explain it, or that help people implement it, and you can prepare, copy, publish, and distribute those, in whole or in part, with no restrictions of any kind. The one catch is that the copyright notice and this paragraph have to be included on all those copies and derivative works ๐ซถ
The document itself can't be modified in any way. That means no removing the copyright notice or the references to the Internet Society or other Internet organizations. There are two exceptions. The first is when you need it for developing Internet standards, and then the procedures for copyrights in the Internet Standards process must be followed ๐. The second is when it's being translated into a language other than English ๐
These permissions are perpetual, so they won't be revoked by the Internet Society or its successors or assigns. That's a promise, bestie ๐
Now the disclaimer, which is in all caps because it's serious ๐ญ This document and the information in it are provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS 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. ๐
Acknowledgement ๐ธ
Funding for the RFC Editor function is currently provided by the Internet Society. ๐ฆ Thank you to everyone keeping the lights on for the RFC Editor. You're iconic ๐
๐ฆ where this page comes from
- ietf: rfc3252 2002-04
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms