NDNLP-TLV » History » Version 4
Junxiao Shi, 02/13/2014 10:03 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 | 4 | Junxiao Shi | In operation reality, acknowledgement and retransmission is rarely used. **This version only defines packet type and fields necessary for fragmentation and reassembly**. |
17 | 1 | Junxiao Shi | |
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 | 4 | Junxiao Shi | NdnlpData ::= NDNLP-DATA-TYPE TLV-LENGTH |
28 | 1 | Junxiao Shi | NdnlpSequence |
29 | 2 | Alex Afanasyev | NdnlpFragIndex? |
30 | NdnlpFragCount? |
||
31 | 1 | Junxiao Shi | NdnlpPayload |
32 | |||
33 | ### sequence number |
||
34 | |||
35 | 4 | Junxiao Shi | NdnlpSequence ::= NDNLP-SEQUENCE-TYPE TLV-LENGTH(=8) |
36 | BYTE+ |
||
37 | 1 | Junxiao Shi | |
38 | A unique sequence number for each packet. |
||
39 | |||
40 | ### fragment index |
||
41 | |||
42 | 4 | Junxiao Shi | NdnlpFragIndex ::= NDNLP-FRAG-INDEX-TYPE TLV-LENGTH(=2) |
43 | BYTE+ |
||
44 | 1 | Junxiao Shi | |
45 | The 0-based index of current fragment within the network layer packet. |
||
46 | |||
47 | Optional. Default to '0' if not present. |
||
48 | |||
49 | ### fragment count |
||
50 | |||
51 | 4 | Junxiao Shi | NdnlpFragCount ::= NDNLP-FRAG-COUNT-TYPE TLV-LENGTH(=2) |
52 | BYTE+ |
||
53 | 1 | Junxiao Shi | |
54 | Total number of fragments of the network layer packet. |
||
55 | |||
56 | Optional. Default to '1' if not present. |
||
57 | |||
58 | ### payload |
||
59 | |||
60 | NdnlpPayload ::= NDNLP-PAYLOAD-TYPE TLV-LENGTH |
||
61 | 4 | Junxiao Shi | BYTE+ |
62 | 1 | Junxiao Shi | |
63 | The payload. |
||
64 | 3 | Alex Afanasyev | |
65 | ## TLV-TYPE assignments |
||
66 | |||
67 | Type | Assigned value | Assigned value (hex) |
||
68 | ------------------------------------------- | ----------------- | -------------------- |
||
69 | 4 | Junxiao Shi | NdnlpData | 30 | 0x1e |
70 | NdnlpSequence | 31 | 0x1f |
||
71 | NdnlpFragIndex | 32 | 0x20 |
||
72 | NdnlpFragCount | 33 | 0x21 |
||
73 | NdnlpFragCount | 34 | 0x22 |