From haus at speck-familie.de Fri Jan 8 20:51:26 2021 From: haus at speck-familie.de (Familie Speck) Date: Fri, 8 Jan 2021 20:51:26 +0100 (CET) Subject: [vdc-dev] TCP information on vDC-API messages Message-ID: <941565344.778821.1610135486852@webmail.strato.com> Hi, 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. 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 11th byte (for the ping message it is the 8th 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. Can anyone explain in detail how the messages are structured, please? 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: Hello: 0:0 fix for hello message - first of two bytes for length of the following message 1:46 fix for hello message ? second of two bytes for length of the following message 2:8 seems to be fix for ?hello? messages 3:2 seems to be fix for ?hello? messages 4:16 seems to be fix for ?hello? messages 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 (between 128 and 255) 6:X seems to be variable - and it seems to count the #run-throughs from byte 5 7:162 seems to be fix for ?hello? message ? 8:X no regularity detected mostly 6 or 7 ? (same value as byte 6???) 9:38 fix for hello message ? seems to hold length information on following protobuf part 10-47: protobuf message that can be successfully decoded (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?.) Ping: 0:0 see above 1:41 see above 2:8 seems to be fix for ?Ping? messages 3:8 seems to be fix for ?Ping? messages 4:202 seems to be fix for ?Ping? messages 5:X seems to be variable looking at hello message ? nevertheless for Ping Messages I only received 6 as a value 6:36 fix for ping message ? seems to hold length information on following protobuf part 7-42: protobuf message that can be successfully decoded 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?. Thanks in advance for giving me some insights here?.! BR, Arne Speck -------------- next part -------------- An HTML attachment was scrubbed... URL: