Project

General

Profile

NDNLP-TLV » History » Revision 4

Revision 3 (Alex Afanasyev, 01/21/2014 04:44 PM) → Revision 4/8 (Junxiao Shi, 02/13/2014 10:03 PM)

# NDNLP TLV packet format 

 NDN packet format is shifting from CCNB to [NDN-TLV](http://named-data.net/doc/ndn-tlv/). 
 In this format, every packet, and every field within a packet, is represented by a tuple of Type-Length-Value. 

 [NDNLP: A Link Protocol for NDN](http://named-data.net/publications/techreports/trlinkprotocol/) provides two services to enable NDN communication directly on Ethernet: 

 * Fragmentation and Reassembly 
 * Acknowledgement and Retransmission 

 NDNLP is initially designed to work with CCNx, and therefore adopts a CCNB-based packet format. 
 Although it's possible to enclose NDN-TLV packets in CCNB-based NDNLP packets, this is awkward. 
 Therefore, a TLV-based packet format should be defined for NDNLP. 

 This document defines the TLV-based packet format for NDNLP. 
 In operation reality, acknowledgement and retransmission is rarely used. **This This version only defines packet type and fields necessary for fragmentation and reassembly**. reassembly. 

 Basic [protocol operations](http://named-data.net/publications/techreports/trlinkprotocol/) are unchanged. 
 Fragmentation and reassembly operations are [extended to multicast](https://github.com/NDN-Routing/NDNFD/blob/80c3e009106d7e16db85ee8afd647ba85b5b7c2d/docs/NDNLP.md). 


 ## Link Data Packet 

 A Link Data packet carries a NDN-TLV packet or a fragment of it as the payload. 
 It has the following format: 

     

	 NdnlpData ::= NDNLP-DATA-TYPE TLV-LENGTH 
		             NdnlpSequence 
		             NdnlpFragIndex? 
		             NdnlpFragCount? 
		             NdnlpPayload 

 These elements MUST appear in the given order. 
 All elements are required unless otherwise stated. 

 ### sequence number 

	 NdnlpSequence ::= NDNLP-SEQUENCE-TYPE TLV-LENGTH(=8) TLV-LENGTH 
		                 BYTE+ 

 nonNegativeInteger 


 A unique sequence number for each packet. 

 ### fragment index 

	 NdnlpFragIndex ::= NDNLP-FRAG-INDEX-TYPE TLV-LENGTH(=2) TLV-LENGTH 
		                  BYTE+ nonNegativeInteger 

 The 0-based index of current fragment within the network layer packet. 

 Optional. Default to '0' if not present. 

 ### fragment count 

	 NdnlpFragCount ::= NDNLP-FRAG-COUNT-TYPE TLV-LENGTH(=2) TLV-LENGTH 
		                  BYTE+ nonNegativeInteger 

 Total number of fragments of the network layer packet. 

 Optional. Default to '1' if not present. 

 ### payload 

	 NdnlpPayload ::= NDNLP-PAYLOAD-TYPE TLV-LENGTH 
		                BYTE+ Interest or Data 

 The payload. 

 


 ## TLV-TYPE assignments 

 NDNLP-TLV temporarily adopts its [original DTAGs](http://redmine.ccnx.org/issues/100710) as TLV-TYPE numbers. 

 Type                                          | Assigned value      | Assigned value (hex) 
 ------------------------------------------- | ----------------- | -------------------- 
 NdnlpData                                     | 30                  20653248            | 0x1e 
                
 NdnlpSequence                                 | 31                  20653249            | 0x1f 
                
 NdnlpFragIndex                                | 32                  20653251            | 0x20 
                
 NdnlpFragCount                                | 33                  20653252            | 0x21 
                
 NdnlpFragCount                                | 34                  20653253            | 0x22                

 `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. 
 There is no uniqueness requirements on the TLV-TYPE numbers for other elements.