You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2018/01/13 13:03:12 UTC

svn commit: r1821059 - in /directory/site/trunk/content/api/dev-guide: 1-introduction.mdtext 4-asn1.mdtext 4.1-asn1-tlv.mdtext images/TLVs.png images/grammar-action.graphml images/grammar-action.png images/tlv-bervalue.graphml images/tlv-bervalue.png

Author: elecharny
Date: Sat Jan 13 13:03:12 2018
New Revision: 1821059

URL: http://svn.apache.org/viewvc?rev=1821059&view=rev
Log:
Added some content

Added:
    directory/site/trunk/content/api/dev-guide/4.1-asn1-tlv.mdtext
    directory/site/trunk/content/api/dev-guide/images/TLVs.png   (with props)
    directory/site/trunk/content/api/dev-guide/images/grammar-action.graphml
    directory/site/trunk/content/api/dev-guide/images/grammar-action.png   (with props)
    directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.graphml
    directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.png   (with props)
Modified:
    directory/site/trunk/content/api/dev-guide/1-introduction.mdtext
    directory/site/trunk/content/api/dev-guide/4-asn1.mdtext

Modified: directory/site/trunk/content/api/dev-guide/1-introduction.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/1-introduction.mdtext?rev=1821059&r1=1821058&r2=1821059&view=diff
==============================================================================
--- directory/site/trunk/content/api/dev-guide/1-introduction.mdtext (original)
+++ directory/site/trunk/content/api/dev-guide/1-introduction.mdtext Sat Jan 13 13:03:12 2018
@@ -30,6 +30,7 @@ This Developer Guide teaches developers
 *  [2 - General structure](2-general-structure.html)
 *  [3 - Building](3-building.html)
 *  [4 - ASN/1](4-asn1.html)
+**  [4.1 - ASN/1 TLV](4.1-asn1-tlv.html)
 *  [5 - Network](5-network.html)
 *  [6 - Encoding/Decoding](6-codec.html)
 *  [7 - LDAP Messages](7-ldap-messages.html)

Modified: directory/site/trunk/content/api/dev-guide/4-asn1.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/4-asn1.mdtext?rev=1821059&r1=1821058&r2=1821059&view=diff
==============================================================================
--- directory/site/trunk/content/api/dev-guide/4-asn1.mdtext (original)
+++ directory/site/trunk/content/api/dev-guide/4-asn1.mdtext Sat Jan 13 13:03:12 2018
@@ -3,8 +3,8 @@ NavPrev: 3-building.html
 NavPrevText: 3 - Building
 NavUp: ../dev-guide.html
 NavUpText: Developer Guide
-NavNext: 5-network.html
-NavNextText: 5 - Network
+NavNext: 4.1-asn1-tlv.html
+NavNextText: 4.1 - ASN/1 TLV
 Notice: Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
@@ -108,3 +108,5 @@ It's slightly simpler : we use the *Deco
 So we decode a message using a state machine, which basically transit from one state to another, and optionally execute an action in between :
 
 ![State Machine transition](images/sm-transition.png)
+
+Now, let's see a real example =

Added: directory/site/trunk/content/api/dev-guide/4.1-asn1-tlv.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/4.1-asn1-tlv.mdtext?rev=1821059&view=auto
==============================================================================
--- directory/site/trunk/content/api/dev-guide/4.1-asn1-tlv.mdtext (added)
+++ directory/site/trunk/content/api/dev-guide/4.1-asn1-tlv.mdtext Sat Jan 13 13:03:12 2018
@@ -0,0 +1,127 @@
+Title: 4-1 - ASN/1 TLV
+NavPrev: 4-asn1.html
+NavPrevText: 4 - ASN/1
+NavUp: ../dev-guide.html
+NavUpText: Developer Guide
+NavNext: 5-network.html
+NavNextText: 5 - Network
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    .
+    http://www.apache.org/licenses/LICENSE-2.0
+    .
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+# 4 - ASN/1 TLV
+
+## What are TLVs ?
+
+The acronym **TLV** stands for **T**ag, **L**ength and **V**alue. It's a way to encode a piece of information with a type, a length followed by the information itself. Three points must be known:
+
+* The **Value** part may contents other **TLV**s. One can see **TLV**s as C structures, that can contain sub-structures.
+* The **Value** may not exist, and in this case the **Length** will be 0.
+* The **Length** part may not give the **Value** length: it is called an _indefinite Length_. In this - not so frequent - case, the **Value** must end with a specific terminator.
+
+### A quick sample
+
+Let's begin with a simple example, without too many explanations. This is the **PDU** (**P**acket **D**ata **U**nit) of a LDAP _BindRequest_:
+
+![TLV](../images/TLVs.png)
+
+We can see in this picture that you have what is called a first level **TLV**. It encapsulates other **TLV**s. It's basically a stream of bytes.
+
+
+### Type
+
+Each **Type** contains information about the **Value** part of the **TLV**. It tells if the **Value** is a primitive or a constructed one, which type of primitive is the value, gives some contextual information. A **Type** can be coded on more than one byte. The first 3 bits give some contextual information about the **Type**, and the 5 following bits are either a label or the beginning of a multi-bytes label.
+
+* Labels are numbers in [0..30], and they represent a specific **ASN/1** element in the protocol description, like _CompareRequest ::= [APPLICATION 14] _ (here, the label is 14). 
+* If the label is 31, then more than one byte is used to encode the **Type**. In this case, we use the following bytes to compute the label, where each byte which high bit is one will be followed by another byte. 
+
+We limit the label to 2,097,151 as we encode the **Type** in one Java int : 
+
+    :::
+    b1 xxx[1-1111], b2 1[111-1111], b3 1[111-1111], b4 0[111-1111]
+    ->
+    [111-1111][111-1111][111-1111] 
+    ->
+    0001-1111 1111-1111 1111-1111
+    ->
+    0x1FFFFF
+    -> 
+    2,097,151
+
+In **LDAP** or **Kerberos**, no label is higher than 30, so we always use 1 byte **Type**s.
+
+Other interesting information that we need to grab from a *Type* are stored in the two first bits (bit 7 and 6), and in the third bit (bit 5). The first two bits describe the class, the third tells if the **TLV** is a **primitive** (b5 = 0) or a **constructed** **TLV** (b5 = 1).
+
+
+### Length
+
+**Length** gives the number of bytes of the **Value**, and nothing else. So the total length of a **TLV** will be:
+
+    :::
+    TLV length = Tag length + Length length + Value length, 
+
+where the **Value** length is stored in the **Length** element.
+
+The **Length** may be 0, which means that there is no value following.
+
+How is **Length** encoded? A **Value** may be from 0 to N bytes long, with N < (256 ^ 126) - 1. This limit is purely hypothetic, of course. If we have to deal with huge objects like pictures or movies, their length will not exceed a few MBytes or a few GBytes
+
+Typically, we will find five kind of **Length**s :
+
+* zero length values;
+* values with a length less than 128 bytes
+* values with a length between 128 and 256 ^ 4 bytes long (an int will be able to hold 4 bytes);
+* values above 256 ^ 4 bytes long
+* values which length is not defined by the **Length** element.
+
+The last type of Length could occurs if the sender does not know the length of the value while it is sending it. **LDAP** protocol does not allow those kind of values, which are dangerous because you need to read the full **Value** to know its length.
+
+The fourth type could also be ignored (4 GBytes is quite a huge size for an LDAP element ...), so we can decide that we won't accept those **Values**. It seems reasonable.
+
+As the **Length** can be stored in more than one byte, we have to take care of fragmented **PDU** : we may receive only the first bytes, and have to wait for the rest to be received. The idea is to freeze and start again when we receive some more data.
+
+In any case, if the first byte is > 0x7F, that means it's a multi-bytes length, and we have to process the following bytesto get the real length. In this case, the first byte contains teh number of expected following bytes. Typically :
+
+    :::
+    0x74 -> 116
+    0x82 0x02 0x84 : 2 bytes, length = 2 * 16 + 132 -> 164
+    0x81 0x84 : 1 byte, length = 132
+
+
+### Value
+
+**Value** carries the 'meat' of a **TLV**. Depending on the **Type**, it's either a primitive value, or a constructed one (which means it contains a **TLV** or a set of **TLV**s). Remember that bit 5 of the **Type** tells if the **Value is _primitive_ ( b5 == 0) or _constructed (b5 == 1).
+
+* If we have a _primitive_ **Value**, we have to read **Length** byte and we are done
+** If we have a _constructed_ **Value**, we have to process it as one or more **TLV**.
+
+
+## TLV processing
+
+In the **API**, the **TLV** processing is done in the _Asn1Decoder_ class, and more specifically by the _decode( ByteBuffer stream, Asn1Container container )_ method, which takes a ByteBuffer as input, and feed a container as a result. 
+
+The important thing to understand is that this method can be called repetively, until a message is fully decoded, as soon as we feed it with some new _ByteBuffer_. The _Container_ instance will contain the result, as soon as its state has switched to **PDU_DECODED**.
+
+While processing a **TLV**, when we are done with the **Value** part, the decoder will check if any action is to be executed. The action is associated to the grammar in use, which is stored in the container. Here is the part that call the action, in the _Asn1Decoder.treatTLVDoneState()_ method :
+
+    :::java
+    private boolean treatTLVDoneState( ByteBuffer stream, Asn1Container container ) throws DecoderException
+    {
+        // First, we have to execute the associated action
+        container.getGrammar().executeAction( container );
+        ...
+
+So the _Container_ must contain the grammar, and the current state. We may not have any action to execute, either because none is associated with the current transition or because we are at the end of the message.
\ No newline at end of file

Added: directory/site/trunk/content/api/dev-guide/images/TLVs.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/images/TLVs.png?rev=1821059&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/api/dev-guide/images/TLVs.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/api/dev-guide/images/grammar-action.graphml
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/images/grammar-action.graphml?rev=1821059&view=auto
==============================================================================
--- directory/site/trunk/content/api/dev-guide/images/grammar-action.graphml (added)
+++ directory/site/trunk/content/api/dev-guide/images/grammar-action.graphml Sat Jan 13 13:03:12 2018
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
+  <!--Created by yEd 3.17-->
+  <key attr.name="Description" attr.type="string" for="graph" id="d0"/>
+  <key for="port" id="d1" yfiles.type="portgraphics"/>
+  <key for="port" id="d2" yfiles.type="portgeometry"/>
+  <key for="port" id="d3" yfiles.type="portuserdata"/>
+  <key attr.name="url" attr.type="string" for="node" id="d4"/>
+  <key attr.name="description" attr.type="string" for="node" id="d5"/>
+  <key for="node" id="d6" yfiles.type="nodegraphics"/>
+  <key for="graphml" id="d7" yfiles.type="resources"/>
+  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
+  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
+  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
+  <graph edgedefault="directed" id="G">
+    <data key="d0"/>
+    <node id="n0">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="30.0" width="212.04207932514942" x="317.5" y="35.0"/>
+          <y:Fill color="#FFCC99" transparent="false"/>
+          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="208.69140625" x="1.675336537574708" y="5.93359375">Action&lt;C extends Asn1Container&gt;<y:LabelModel>
+              <y:SmartNodeLabelModel distance="4.0"/>
+            </y:LabelModel>
+            <y:ModelParameter>
+              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
+            </y:ModelParameter>
+          </y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n1">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="30.0" width="181.04207932514942" x="333.0" y="115.5"/>
+          <y:Fill color="#FFFF99" transparent="false"/>
+          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="122.734375" x="29.153852162574708" y="5.93359375">GrammarAction&lt;C&gt;<y:LabelModel>
+              <y:SmartNodeLabelModel distance="4.0"/>
+            </y:LabelModel>
+            <y:ModelParameter>
+              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
+            </y:ModelParameter>
+          </y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n2">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="30.0" width="112.34987912882991" x="367.34610009815975" y="208.0"/>
+          <y:Fill color="#CCFFCC" transparent="false"/>
+          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="34.046875" x="39.151502064414956" y="5.93359375">XXXX<y:LabelModel>
+              <y:SmartNodeLabelModel distance="4.0"/>
+            </y:LabelModel>
+            <y:ModelParameter>
+              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
+            </y:ModelParameter>
+          </y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n3">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="317.5" y="65.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="77.0419921875" x="4.0" y="0.111328125">void action( C )</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n4">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="181.04207932514942" x="333.0" y="145.5"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="62.349609375" x="4.0" y="0.111328125">String name</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <edge id="e0" source="n1" target="n3">
+      <data key="d9"/>
+      <data key="d10">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="7.98046875"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="transparent_circle"/>
+          <y:BendStyle smoothed="false"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+    <edge id="e1" source="n2" target="n4">
+      <data key="d9"/>
+      <data key="d10">
+        <y:PolyLineEdge>
+          <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
+          <y:LineStyle color="#000000" type="line" width="1.0"/>
+          <y:Arrows source="none" target="white_delta"/>
+          <y:BendStyle smoothed="false"/>
+        </y:PolyLineEdge>
+      </data>
+    </edge>
+  </graph>
+  <data key="d7">
+    <y:Resources/>
+  </data>
+</graphml>

Added: directory/site/trunk/content/api/dev-guide/images/grammar-action.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/images/grammar-action.png?rev=1821059&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/api/dev-guide/images/grammar-action.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.graphml
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.graphml?rev=1821059&view=auto
==============================================================================
--- directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.graphml (added)
+++ directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.graphml Sat Jan 13 13:03:12 2018
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
+  <!--Created by yEd 3.17-->
+  <key attr.name="Description" attr.type="string" for="graph" id="d0"/>
+  <key for="port" id="d1" yfiles.type="portgraphics"/>
+  <key for="port" id="d2" yfiles.type="portgeometry"/>
+  <key for="port" id="d3" yfiles.type="portuserdata"/>
+  <key attr.name="url" attr.type="string" for="node" id="d4"/>
+  <key attr.name="description" attr.type="string" for="node" id="d5"/>
+  <key for="node" id="d6" yfiles.type="nodegraphics"/>
+  <key for="graphml" id="d7" yfiles.type="resources"/>
+  <key attr.name="url" attr.type="string" for="edge" id="d8"/>
+  <key attr.name="description" attr.type="string" for="edge" id="d9"/>
+  <key for="edge" id="d10" yfiles.type="edgegraphics"/>
+  <graph edgedefault="directed" id="G">
+    <data key="d0"/>
+    <node id="n0">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="30.0" width="212.04207932514942" x="343.0" y="60.0"/>
+          <y:Fill color="#CCFFCC" transparent="false"/>
+          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="25.83203125" x="93.10502403757471" y="5.93359375">TLV<y:LabelModel>
+              <y:SmartNodeLabelModel distance="4.0"/>
+            </y:LabelModel>
+            <y:ModelParameter>
+              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
+            </y:ModelParameter>
+          </y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n1">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="90.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="43.4921875" x="4.0" y="0.111328125">byte tag</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n2">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="106.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="50.8505859375" x="4.0" y="0.111328125">int length</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n3">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="119.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="74.673828125" x="4.0" y="0.111328125">BerValue value</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n4">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="135.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="29.185546875" x="4.0" y="0.111328125">int id</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n5">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="148.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="56.783203125" x="4.0" y="0.111328125">TLV parent</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n6">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="343.0" y="164.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="97.5888671875" x="4.0" y="0.111328125">int expectedLength</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n7">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="30.0" width="212.04207932514942" x="636.0" y="60.0"/>
+          <y:Fill color="#CCFFCC" transparent="false"/>
+          <y:BorderStyle hasColor="false" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="54.572265625" x="78.73490685007471" y="5.93359375">BerValue<y:LabelModel>
+              <y:SmartNodeLabelModel distance="4.0"/>
+            </y:LabelModel>
+            <y:ModelParameter>
+              <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
+            </y:ModelParameter>
+          </y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n8">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="636.0" y="90.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="55.5771484375" x="4.0" y="0.111328125">byte[] data</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+    <node id="n9">
+      <data key="d5"/>
+      <data key="d6">
+        <y:GenericNode configuration="ShinyPlateNodeWithShadow">
+          <y:Geometry height="16.0" width="212.04207932514942" x="636.0" y="106.0"/>
+          <y:Fill color="#FFFFFF" transparent="false"/>
+          <y:BorderStyle color="#C0C0C0" type="line" width="1.0"/>
+          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="10" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="15.77734375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="l" textColor="#000000" verticalTextPosition="bottom" visible="true" width="71.7978515625" x="4.0" y="0.111328125">int currentPos</y:NodeLabel>
+        </y:GenericNode>
+      </data>
+    </node>
+  </graph>
+  <data key="d7">
+    <y:Resources/>
+  </data>
+</graphml>

Added: directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.png?rev=1821059&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/api/dev-guide/images/tlv-bervalue.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream