NDNLP-TLV » History » Version 3
Alex Afanasyev, 01/21/2014 04:44 PM
1 | 1 | Junxiao Shi | # NDNLP TLV packet format |
---|---|---|---|
2 | |||
3 | NDN packet format is shifting from CCNB to [NDN-TLV](http://named-data.net/doc/ndn-tlv/). |
||
4 | In this format, every packet, and every field within a packet, is represented by a tuple of Type-Length-Value. |
||
5 | |||
6 | [NDNLP: A Link Protocol for NDN](http://named-data.net/publications/techreports/trlinkprotocol/) provides two services to enable NDN communication directly on Ethernet: |
||
7 | |||
8 | * Fragmentation and Reassembly |
||
9 | * Acknowledgement and Retransmission |
||
10 | |||
11 | NDNLP is initially designed to work with CCNx, and therefore adopts a CCNB-based packet format. |
||
12 | Although it's possible to enclose NDN-TLV packets in CCNB-based NDNLP packets, this is awkward. |
||
13 | Therefore, a TLV-based packet format should be defined for NDNLP. |
||
14 | |||
15 | This document defines the TLV-based packet format for NDNLP. |
||
16 | In operation reality, acknowledgement and retransmission is rarely used. This version only defines packet type and fields necessary for fragmentation and reassembly. |
||
17 | |||
18 | Basic [protocol operations](http://named-data.net/publications/techreports/trlinkprotocol/) are unchanged. |
||
19 | Fragmentation and reassembly operations are [extended to multicast](https://github.com/NDN-Routing/NDNFD/blob/80c3e009106d7e16db85ee8afd647ba85b5b7c2d/docs/NDNLP.md). |
||
20 | |||
21 | |||
22 | ## Link Data Packet |
||
23 | |||
24 | A Link Data packet carries a NDN-TLV packet or a fragment of it as the payload. |
||
25 | It has the following format: |
||
26 | |||
27 | NdnlpData ::= NDNLP-DATA-TYPE TLV-LENGTH |
||
28 | NdnlpSequence |
||
29 | 2 | Alex Afanasyev | NdnlpFragIndex? |
30 | NdnlpFragCount? |
||
31 | 1 | Junxiao Shi | NdnlpPayload |
32 | |||
33 | These elements MUST appear in the given order. |
||
34 | All elements are required unless otherwise stated. |
||
35 | |||
36 | ### sequence number |
||
37 | |||
38 | NdnlpSequence ::= NDNLP-SEQUENCE-TYPE TLV-LENGTH |
||
39 | nonNegativeInteger |
||
40 | |||
41 | |||
42 | A unique sequence number for each packet. |
||
43 | |||
44 | ### fragment index |
||
45 | |||
46 | NdnlpFragIndex ::= NDNLP-FRAG-INDEX-TYPE TLV-LENGTH |
||
47 | nonNegativeInteger |
||
48 | |||
49 | The 0-based index of current fragment within the network layer packet. |
||
50 | |||
51 | Optional. Default to '0' if not present. |
||
52 | |||
53 | ### fragment count |
||
54 | |||
55 | NdnlpFragCount ::= NDNLP-FRAG-COUNT-TYPE TLV-LENGTH |
||
56 | nonNegativeInteger |
||
57 | |||
58 | Total number of fragments of the network layer packet. |
||
59 | |||
60 | Optional. Default to '1' if not present. |
||
61 | |||
62 | ### payload |
||
63 | |||
64 | NdnlpPayload ::= NDNLP-PAYLOAD-TYPE TLV-LENGTH |
||
65 | Interest or Data |
||
66 | |||
67 | The payload. |
||
68 | |||
69 | |||
70 | ## TLV-TYPE assignments |
||
71 | |||
72 | NDNLP-TLV temporarily adopts its [original DTAGs](http://redmine.ccnx.org/issues/100710) as TLV-TYPE numbers. |
||
73 | |||
74 | 3 | Alex Afanasyev | Type | Assigned value | Assigned value (hex) |
75 | ------------------------------------------- | ----------------- | -------------------- |
||
76 | NdnlpData | 20653248 | |
||
77 | NdnlpSequence | 20653249 | |
||
78 | NdnlpFragIndex | 20653251 | |
||
79 | NdnlpFragCount | 20653252 | |
||
80 | NdnlpFragCount | 20653253 | |
||
81 | 1 | Junxiao Shi | |
82 | `NdnlpData` should be assigned a 1-byte TLV-TYPE number that does not conflict with NDN-TLV, so that it can be efficiently used on the same connection with NDN-TLV. |
||
83 | There is no uniqueness requirements on the TLV-TYPE numbers for other elements. |