diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-01-13 19:29:20 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-14 14:20:20 +0000 |
commit | 4b54d14d9c35740140962942c48d964ee43b49ba (patch) | |
tree | 0656d08eb54af6fae7e427b0623c55e8c40a2af4 /toxcore/onion_announce.h | |
parent | 1e258a1915d62f63335987691b4216dd8c622247 (diff) |
Make Onion_Announce a module-private type.
Diffstat (limited to 'toxcore/onion_announce.h')
-rw-r--r-- | toxcore/onion_announce.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/toxcore/onion_announce.h b/toxcore/onion_announce.h index 548d4b79..36484ff2 100644 --- a/toxcore/onion_announce.h +++ b/toxcore/onion_announce.h | |||
@@ -46,23 +46,11 @@ | |||
46 | #define ONION_DATA_REQUEST_MIN_SIZE (1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_MAC_SIZE) | 46 | #define ONION_DATA_REQUEST_MIN_SIZE (1 + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_NONCE_SIZE + CRYPTO_PUBLIC_KEY_SIZE + CRYPTO_MAC_SIZE) |
47 | #define MAX_DATA_REQUEST_SIZE (ONION_MAX_DATA_SIZE - ONION_DATA_REQUEST_MIN_SIZE) | 47 | #define MAX_DATA_REQUEST_SIZE (ONION_MAX_DATA_SIZE - ONION_DATA_REQUEST_MIN_SIZE) |
48 | 48 | ||
49 | typedef struct { | 49 | typedef struct Onion_Announce Onion_Announce; |
50 | uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE]; | 50 | |
51 | IP_Port ret_ip_port; | 51 | /* These two are not public; they are for tests only! */ |
52 | uint8_t ret[ONION_RETURN_3]; | 52 | uint8_t *onion_announce_entry_public_key(Onion_Announce *onion_a, uint32_t entry); |
53 | uint8_t data_public_key[CRYPTO_PUBLIC_KEY_SIZE]; | 53 | void onion_announce_entry_set_time(Onion_Announce *onion_a, uint32_t entry, uint64_t time); |
54 | uint64_t time; | ||
55 | } Onion_Announce_Entry; | ||
56 | |||
57 | typedef struct { | ||
58 | DHT *dht; | ||
59 | Networking_Core *net; | ||
60 | Onion_Announce_Entry entries[ONION_ANNOUNCE_MAX_ENTRIES]; | ||
61 | /* This is CRYPTO_SYMMETRIC_KEY_SIZE long just so we can use new_symmetric_key() to fill it */ | ||
62 | uint8_t secret_bytes[CRYPTO_SYMMETRIC_KEY_SIZE]; | ||
63 | |||
64 | Shared_Keys shared_keys_recv; | ||
65 | } Onion_Announce; | ||
66 | 54 | ||
67 | /* Create an onion announce request packet in packet of max_packet_length (recommended size ONION_ANNOUNCE_REQUEST_SIZE). | 55 | /* Create an onion announce request packet in packet of max_packet_length (recommended size ONION_ANNOUNCE_REQUEST_SIZE). |
68 | * | 56 | * |