<!doctype html>
<html>
 <head> 
  <meta charset="UTF-8"> 
 </head>
 <body>
  <div style="" class="default-style">
   <div>
    Hi,
   </div>
   <div>
    <br>
   </div>
   <div>
    As I am trying to use the vDC-API via an on-the-fly protobuf compiler I need to have some more information about the tcp message format.
    <br>The API documentation simply says that “The TCP stream consists of a 2-byte header containing the length of the following message(16 bits, in network byte order, maximum accepted length is 16384 bytes) followed by the protocol buffer message” Nevertheless I figured out that e.g. the real protobuf message for the “hello” message coming from the dss starts not before the 11<sup style="line-height: 0;">th</sup> byte (for the ping message it is the 8<sup style="line-height: 0;">th</sup> byte). The first two bytes obviously really give the overall message length. The last single byte before the protobuf message seems to give the length of the protobuf message following. – Now I need to know how the part in between is created to decompose and create working messages.
    <br>Can anyone explain in detail how the messages are structured, please?
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Here are two examples of what I found out until now for the 48byte hello messages and the 43byte Ping messages I was able to derive and decode the protobuf part from:
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Hello:
   </div>
   <div>
    <br>
   </div>
   <div>
    0:0         fix for hello message - first of two bytes for length of the following message
   </div>
   <div>
    <br>
   </div>
   <div>
    1:46      fix for hello message – second of two bytes for length of the following message
   </div>
   <div>
    <br>
   </div>
   <div>
    2:8         seems to be fix for “hello” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    3:2         seems to be fix for “hello” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    4:16      seems to be fix for “hello” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    5:X         seems to be variable – nevertheless, it seems as if this value is counting up per distributed message to same vDC Host (with every message I receive this value is counting up
   </div>
   <div>
    <br>
   </div>
   <div>
    6:X         no regularity detected mostly 6 or 7
   </div>
   <div>
    <br>
   </div>
   <div>
    7:162    seems to be fix for “hello” message
   </div>
   <div>
    <br>
   </div>
   <div>
    8:X         no regularity detected mostly 6 or 7 – (same value as byte 6???)
   </div>
   <div>
    <br>
   </div>
   <div>
    9:38      fix for hello message – seems to hold length information on following protobuf part
   </div>
   <div>
    <br>
   </div>
   <div>
    10-47:   protobuf message that can be successfully decoded
   </div>
   <div>
    <br>
   </div>
   <div>
    (interesting that I get an api-version of “3” reported from dss whereas documentation is still saying that it is valid for api-version 2….)
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Ping:
   </div>
   <div>
    <br>
   </div>
   <div>
    0:0
   </div>
   <div>
    <br>
   </div>
   <div>
    1:41      see above
   </div>
   <div>
    <br>
   </div>
   <div>
    2:8         seems to be fix for “Ping” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    3:8         seems to be fix for “Ping” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    4:202    seems to be fix for “Ping” messages
   </div>
   <div>
    <br>
   </div>
   <div>
    5:X         seems to be variable looking at hello message – nevertheless for Ping Messages I only received 6 as a value
   </div>
   <div>
    <br>
   </div>
   <div>
    6:36      fix for ping message – seems to hold length information on following protobuf part
   </div>
   <div>
    <br>
   </div>
   <div>
    7-42:     protobuf message that can be successfully decoded
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Would be really good to get some Information on how I can derive the information which proto message type the message includes, at which byte the proto part starts – and of course how I will have to compose the messages I am sending from the vDC Host to the vdSMon DSS….
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Thanks in advance for giving me some insights here….!
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    BR,
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    <br>
   </div>
   <div>
    Arne Speck
   </div>
   <div>
    <br>
   </div>
  </div>
 </body>
</html>