summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/TCP_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/TCP_common.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/TCP_common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/TCP_common.h b/protocols/Tox/libtox/src/toxcore/TCP_common.h
index 88c0cb665a..78d1623d8a 100644
--- a/protocols/Tox/libtox/src/toxcore/TCP_common.h
+++ b/protocols/Tox/libtox/src/toxcore/TCP_common.h
@@ -23,6 +23,20 @@ void wipe_priority_list(TCP_Priority_List *p);
#define NUM_RESERVED_PORTS 16
#define NUM_CLIENT_CONNECTIONS (256 - NUM_RESERVED_PORTS)
+#ifdef USE_TEST_NETWORK
+#define TCP_PACKET_FORWARD_REQUEST 11
+#define TCP_PACKET_FORWARDING 10
+#define TCP_PACKET_ROUTING_REQUEST 9
+#define TCP_PACKET_ROUTING_RESPONSE 8
+#define TCP_PACKET_CONNECTION_NOTIFICATION 7
+#define TCP_PACKET_DISCONNECT_NOTIFICATION 6
+#define TCP_PACKET_PING 5
+#define TCP_PACKET_PONG 4
+#define TCP_PACKET_OOB_SEND 3
+#define TCP_PACKET_OOB_RECV 2
+#define TCP_PACKET_ONION_REQUEST 1
+#define TCP_PACKET_ONION_RESPONSE 0
+#else
#define TCP_PACKET_ROUTING_REQUEST 0
#define TCP_PACKET_ROUTING_RESPONSE 1
#define TCP_PACKET_CONNECTION_NOTIFICATION 2
@@ -35,6 +49,7 @@ void wipe_priority_list(TCP_Priority_List *p);
#define TCP_PACKET_ONION_RESPONSE 9
#define TCP_PACKET_FORWARD_REQUEST 10
#define TCP_PACKET_FORWARDING 11
+#endif // test network
#define TCP_HANDSHAKE_PLAIN_SIZE (CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE)
#define TCP_SERVER_HANDSHAKE_SIZE (CRYPTO_NONCE_SIZE + TCP_HANDSHAKE_PLAIN_SIZE + CRYPTO_MAC_SIZE)