## 5 Proof-of-Concept Results
### The P4 Algorithm
Incremental checksum calculations are a built-in functionality (extern in P4 terminology) of the Tofino target, however, it was not interacting properly with the lookaheads used in the attempts to parse SDNVs (as a result of the bug). As an alternative to these incremental checksums, we resorted to calculating the entire checksum from scratch. A downside of this approach is that the entire bundle must then be parsed, including the entire payload, to incorporate these fields into the checksum calculations. This is an issue as payloads are inherently variable-width, which means that the fixed-width workaround must be used to parse these payloads; therefore, the size of a payload that can be accepted in the bundle translator is limited by 13 bytes. Handling payloads of any size would be possible if an incremental checksum approach was able to be used. Parsing the CBOR encoded fields of BPv7 also posed a challenge. In the CBOR specification, it is stated that \"A CBOR decoder implementation can be based on a jump table with all 256 defined values for the initial byte (Table 7). A decoder in a constrained implementation can instead use the structure of the initial byte and following bytes for more compact code (see Appendix C for a rough impression of how this could look)\" [22] suggesting that either a hardcoded jump table can be used to quickly determine the CBOR data type, or the provided compact algorithm can be used if memory is a limitation. However, due to the limited memory available and lack of a table data type available in the parser stage of the Aurora 710 switch, a jump table would not be possible to implement in our target. Therefore an adaptation of the compact decoding algorithm was attempted. However, the limited control flow structures available in the parser stage within the P4 language made adapting this algorithm a nontrivial task: conditional branching can only occur at the end of every parser state, and any looping must be done in a recursive manner through the various parsing states. Additionally, in the Tofino target, although there are variables available for use to keep track of state, there is only \"write-once\" functionality, meaning that executing code analogous to i = i + 1 multiple times has undefined behavior as to what the value of i is. Fortunately, there is a ParserCounter Tofino extern available for use as a counter variable in the parser stage. Attempts to utilizing this extern to loop through parsing of a CBOR field led to strange behaviors. For example, where certain fields were being modified and parser states were executed in conditions where they should not have been. It is not clear if this was due to user error or an issue with the environment and therefore another compromise was made to assume the size of most of the BPv7 fields, as done with BPv6 fields. ### Proof-of-Concept Evaluation

Despite these design constraints, our proof-of-concept translator is able to execute the basic functionality required to enable communication between two incompatible DTN nodes. The accepted bundles must be of a specific format which is based on the format of bundles outputted by ION's bpchat program, the environment used in the development of this program (Although this iteration of the translator was designed for one specific bundle format, the translator can be adapted to work with other bundle formats). The proof of concept handles variable-widths for the bundle payload as well as the BPv7 creation timestamp: payloads up to 13 bytes are supported, which can be extended by repeating the code pattern, along with the maximum possible width of a BPv7 creation timestamp. The outputs of the translator are the primary block and the payload block which are the required bundle blocks. The current state of the implementation represents the first steps towards SDDTN. We evaluated the translation capabilities by determining whether Rho and Eta would be able to communicate in their respective bpchat programs despite being DTN nodes utilizing different versions of the BP.