summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-09-12 15:42:03 +0200
committerCoren[m] <Break@Ocean>2013-09-12 15:42:03 +0200
commita74cfaea81fecb11a6f56e069d59b8ea68dd98a8 (patch)
treebdfb9720e91819c4535068d208ca272afe2c103b /toxcore/network.h
parent5e1523e61d5f5718d98e7b5eb41f9574ac386928 (diff)
tox.h:
- #define'd tox's network port (as range) - finally killed tox_new_ex() in favor of changing tox_new()'s signature - renamed tox_bootstrap() to tox_bootstrap_from_ip() network.h: - #define'd tox's network port (as range) - renamed SEND_NODES_EX to SEND_NODES_IPV6 - bind() loop uses #define'd port range DHT.c: - renamed SEND_NODES_EX to SEND_NODES_IPV6 - sending ipv6 node addresses even if can't use them ourselves nTox.c: - adapted to changed tox_new()
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index aa0c4661..5bc04632 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -72,13 +72,16 @@ typedef int sock_t;
72#define NET_PACKET_PING_RESPONSE 1 /* Ping response packet ID. */ 72#define NET_PACKET_PING_RESPONSE 1 /* Ping response packet ID. */
73#define NET_PACKET_GET_NODES 2 /* Get nodes request packet ID. */ 73#define NET_PACKET_GET_NODES 2 /* Get nodes request packet ID. */
74#define NET_PACKET_SEND_NODES 3 /* Send nodes response packet ID for IPv4 addresses. */ 74#define NET_PACKET_SEND_NODES 3 /* Send nodes response packet ID for IPv4 addresses. */
75#define NET_PACKET_SEND_NODES_EX 4 /* Send nodes response packet ID for other addresses. */ 75#define NET_PACKET_SEND_NODES_IPV6 4 /* Send nodes response packet ID for other addresses. */
76#define NET_PACKET_HANDSHAKE 16 /* Handshake packet ID. */ 76#define NET_PACKET_HANDSHAKE 16 /* Handshake packet ID. */
77#define NET_PACKET_SYNC 17 /* SYNC packet ID. */ 77#define NET_PACKET_SYNC 17 /* SYNC packet ID. */
78#define NET_PACKET_DATA 18 /* Data packet ID. */ 78#define NET_PACKET_DATA 18 /* Data packet ID. */
79#define NET_PACKET_CRYPTO 32 /* Encrypted data packet ID. */ 79#define NET_PACKET_CRYPTO 32 /* Encrypted data packet ID. */
80#define NET_PACKET_LAN_DISCOVERY 33 /* LAN discovery packet ID. */ 80#define NET_PACKET_LAN_DISCOVERY 33 /* LAN discovery packet ID. */
81 81
82#define TOX_PORTRANGE_FROM 33445
83#define TOX_PORTRANGE_TO 33455
84#define TOX_PORT_DEFAULT TOX_PORTRANGE_FROM
82 85
83/* Current time, unix format */ 86/* Current time, unix format */
84#define unix_time() ((uint64_t)time(NULL)) 87#define unix_time() ((uint64_t)time(NULL))