PV_RESTRICT_ID_PORTS2X = 34,
PV_RESTRICT_ID_PORTS2Y = 35,
PV_RESTRICT_ID_PORTS2Z = 36,
- PV_RESTRICT_ID3 = 50
+ PV_RESTRICT_ID3 = 50,
+ PV_VIVALDI_OPTIONAL = 51,
+ PV_PACKET_FLAGS = 51,
+ PV_ALT_CONTACTS = 52,
+ PV_PACKET_FLAGS2 = 53
};
/* Type Length */
FT_DOWNLOADING = 0x01,
FT_SEEDING = 0x02,
FT_MULTI_VALUE = 0x04,
- FT_STATS = 0x08
+ FT_STATS = 0x08,
+ FLAG_ANON = 0x10,
+ FLAG_PRECIOUS = 0x20
};
static const value_string vuze_dht_flag_type_vals[] = {
{ FT_SINGLE_VALUE, "Single value" },
{ FT_SEEDING, "Seeding" },
{ FT_MULTI_VALUE, "Multi value" },
{ FT_STATS, "Stats" },
+ { FLAG_ANON, "Anon" },
+ { FLAG_PRECIOUS, "Precious" },
{ 0, NULL }
};
+/* generic flag type */
+enum {
+ GF_NONE = 0x00,
+ GF_DHT_SLEEPING = 0x01
+};
+static const value_string vuze_dht_generic_flag_type_vals[] = {
+ { GF_NONE, "None"},
+ { GF_DHT_SLEEPING, "DHT sleeping" },
+ {0, NULL}
+};
+
/* error type */
enum {
ET_WRONG_ADDRESS = 1,
static int hf_vuze_dht_local_proto_ver = -1;
static int hf_vuze_dht_instance_id = -1;
static int hf_vuze_dht_time = -1;
+static int hf_vuze_dht_generic_flags = -1;
+static int hf_vuze_dht_generic_flags2 = -1;
/* firstly appear in reply ping */
static int hf_vuze_dht_network_coordinates_count = -1;
NODE_ADDRESS address always address of the local node
INSTANCE_ID int always application's helper number; randomly generated at the start
TIME long always time of the local node; stored as number of milliseconds since Epoch
+FLAG byte >=PACKET_FLAGS
+FLAG2 byte >=PACKET_FLAGS2
*/
static int
offset += TL_BYTE;
}
- if( *ver > PV_NETWORKS )
+ if( *ver >= PV_NETWORKS )
{
proto_tree_add_item(tree, hf_vuze_dht_network_id, tvb, offset, TL_INT, ENC_BIG_ENDIAN);
offset += TL_INT;
}
- if( *ver > PV_FIX_ORIGINATOR )
+ if( *ver >= PV_FIX_ORIGINATOR )
{
proto_tree_add_item(tree, hf_vuze_dht_local_proto_ver, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN);
offset += TL_BYTE;
proto_tree_add_item(tree, hf_vuze_dht_time, tvb, offset, TL_LONG, ENC_BIG_ENDIAN);
offset += TL_LONG;
+ if( *ver >= PV_PACKET_FLAGS )
+ {
+ proto_tree_add_item(tree, hf_vuze_dht_generic_flags, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN);
+ offset += TL_BYTE;
+ }
+ if( *ver >= PV_PACKET_FLAGS2 )
+ {
+ proto_tree_add_item(tree, hf_vuze_dht_generic_flags2, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN);
+ offset += TL_BYTE;
+ }
+
return offset;
}
VENDOR_ID byte >=VENDOR_ID same meaning as in the request
NETWORK_ID int >=NETWORKS same meaning as in the request
INSTANCE_ID int always instance id of the node that replies to the request
+FLAG byte >=PACKET_FLAGS
+FLAG2 byte >=PACKET_FLAGS2
*/
static int
offset += TL_BYTE;
}
- if( *ver > PV_NETWORKS )
+ if( *ver >= PV_NETWORKS )
{
proto_tree_add_item(tree, hf_vuze_dht_network_id, tvb, offset, TL_INT, ENC_BIG_ENDIAN);
offset += TL_INT;
proto_tree_add_item(tree, hf_vuze_dht_instance_id, tvb, offset, TL_INT, ENC_BIG_ENDIAN);
offset += TL_INT;
+ if( *ver >= PV_PACKET_FLAGS )
+ {
+ proto_tree_add_item(tree, hf_vuze_dht_generic_flags, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN);
+ offset += TL_BYTE;
+ }
+ if( *ver >= PV_PACKET_FLAGS2 )
+ {
+ proto_tree_add_item(tree, hf_vuze_dht_generic_flags2, tvb, offset, TL_BYTE, ENC_BIG_ENDIAN);
+ offset += TL_BYTE;
+ }
+
return offset;
}
{ "Signature", "vuze-dht.signature",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
+ },
+ { &hf_vuze_dht_generic_flags,
+ { "Generic Flags", "vuze-dht.generic_flags",
+ FT_UINT8, BASE_DEC, VALS(vuze_dht_generic_flag_type_vals), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_vuze_dht_generic_flags2,
+ { "Generic Flags 2", "vuze-dht.generic_flags2",
+ FT_UINT8, BASE_DEC, VALS(vuze_dht_flag_type_vals), 0x0,
+ NULL, HFILL }
}
};
* ex: set shiftwidth=2 tabstop=8 expandtab:
* :indentSize=2:tabSize=8:noTabs=true:
*/
-