## 2 Delay Tolerant Networking Background
### Bundle Protocol
The layout of the CBOR data model is a superset of JavaScript Object Notation (JSON), containing several data types, e.g., integers, strings, maps, and arrays. An instance of a CBOR data type is a data item [22]. In BPv7, a single bundle is a CBOR indefinite-length array, comprised of an indefinite number of blocks which are encoded as CBOR definite-length arrays [22]. The end of a bundle is terminated by a stop code (0 xFF). An example BPv7 bundle and a decoding of its primary block is shown in Figure 4, which demonstrates how BPv7 bundle fields are encoded as a nested array of various data types rather than the flat representation of SDNV fields that was seen in BPv6. Figure 3: Layout of BPv6 bundles. Very few fields have a defined bit width (denoted with a solid outline). Most fields have a bit width that is only known until it is parsed using the SDNV encoded scheme (denoted with a bold dashed outline). Other fields have a width encoded by a field preceding it (denoted with a non-bold dashed outline). Alongside an encoding change, a couple of components were relocated away from the official BP specification in BPv7 and may be moved to other sections of the DTN protocol suite. One feature moved away from BP in BPv7 is class of service [11]. BPv6 bundles were able to request a certain class of service through bundle processing flags in the primary block, such as bulk, normal, or expedited class of service [10]. According to an Internet Engineering Task Force (IETF) draft (See the Bundle Protocol Extended Class of Service draft: Available online: [[https://datatracker.ietf.org/doc/html/draft-burleigh-dtn-ecos-00](https://datatracker.ietf.org/doc/html/draft-burleigh-dtn-ecos-00)]([https://datatracker.ietf.org/doc/html/draft-burleigh-dtn-ecos-00](https://datatracker.ietf.org/doc/html/draft-burleigh-dtn-ecos-00)), accessed on 1 September 2022), class of service may be handled as a BPv7 extension block. Another feature moved away from the BPv7 specification is custody transfer, also implemented through bundle processing flags, which is used to request another node to take responsibility for a given bundle. An IETF draft indicates that custody transfer may be placed within the bundle-in-bundle encapsulation (BIBE) specification (See the Bundle-in-Bundle Encapsulation draft: Available online: [[https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03](https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03)]([https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03](https://datatracker.ietf.org/doc/html/draft-ietf-dtn-bibect-03)), accessed on 1 September 2022). Lastly, BPv7 adds optional error detection to bundle blocks through the form of Cyclic Redundancy Check (CRC) error-detecting codes (CRC-16 and CRC-32). This enables DTN nodes to verify the data integrity of received bundles [11]. A general diagram of the layout of BPv7 bundles is shown in Figure 5, showcasing the various CBOR data types that each bundle block and block field is encoded as. Note that while BPv6 and BPv7 look similar, there are significant differences in how they are encoded and the fields that are included. Figure 4: Decoding of BPv7 bundle (**left**: Wireshark capture of BPv7 bundle with primary block bytes highlighted; **right**: A manual decoding of the CBOR-encoded bundle fields).