From 2b2eb9fbce1594f62697304fc98d39ad9440ba36 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Thu, 23 Nov 2023 14:12:39 -0500 Subject: [PATCH] Incorporate DHT groupchat changes into network profiler --- toxcore/net_profile.c | 2 +- toxcore/net_profile.h | 2 +- toxcore/tox_private.h | 25 +++++++++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/toxcore/net_profile.c b/toxcore/net_profile.c index ee3e231563c..caf75e27f9d 100644 --- a/toxcore/net_profile.c +++ b/toxcore/net_profile.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * Copyright © 2022 The TokTok team. + * Copyright © 2023 The TokTok team. */ /** diff --git a/toxcore/net_profile.h b/toxcore/net_profile.h index 4e2cf2effa9..ffec249e4d6 100644 --- a/toxcore/net_profile.h +++ b/toxcore/net_profile.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * Copyright © 2022 The TokTok team. + * Copyright © 2023 The TokTok team. */ /** diff --git a/toxcore/tox_private.h b/toxcore/tox_private.h index 051d54ed99f..7bdbcec7a5c 100644 --- a/toxcore/tox_private.h +++ b/toxcore/tox_private.h @@ -259,6 +259,13 @@ typedef enum Tox_Netprof_Packet_Id { */ TOX_NETPROF_PACKET_ID_LAN_DISCOVERY = 0x21, + /** + * DHT groupchat packets. + */ + TOX_NETPROF_PACKET_GC_HANDSHAKE = 0x5a, + TOX_NETPROF_PACKET_GC_LOSSLESS = 0x5b, + TOX_NETPROF_PACKET_GC_LOSSY = 0x5c, + /** * Onion send packets. */ @@ -267,14 +274,14 @@ typedef enum Tox_Netprof_Packet_Id { TOX_NETPROF_PACKET_ID_ONION_SEND_2 = 0x82, /** - * DHT announce request packet. + * DHT announce request packet (deprecated). */ - TOX_NETPROF_PACKET_ID_ANNOUNCE_REQUEST = 0x83, + TOX_NETPROF_PACKET_ID_ANNOUNCE_REQUEST_OLD = 0x83, /** - * DHT announce response packet. + * DHT announce response packet (deprecated). */ - TOX_NETPROF_PACKET_ID_ANNOUNCE_RESPONSE = 0x84, + TOX_NETPROF_PACKET_ID_ANNOUNCE_RESPONSE_OLD = 0x84, /** * Onion data request packet. @@ -286,6 +293,16 @@ typedef enum Tox_Netprof_Packet_Id { */ TOX_NETPROF_PACKET_ID_ONION_DATA_RESPONSE = 0x86, + /** + * DHT announce request packet. + */ + TOX_NETPROF_PACKET_ID_ANNOUNCE_REQUEST = 0x87, + + /** + * DHT announce response packet. + */ + TOX_NETPROF_PACKET_ID_ANNOUNCE_RESPONSE = 0x88, + /** * Onion receive packets. */