diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-22 21:08:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-22 21:08:43 +0000 |
commit | 9c95f4ea09fa61fc193fc45873f76bf6fe6d93f3 (patch) | |
tree | c11ef2beef617c7f992fc447d3b017c9d8e667c6 /src/ats/ats.h | |
parent | 0c19c26a8a2d5b05ed8fc8abfca49cce2005c9ef (diff) | |
download | gnunet-9c95f4ea09fa61fc193fc45873f76bf6fe6d93f3.tar.gz gnunet-9c95f4ea09fa61fc193fc45873f76bf6fe6d93f3.zip |
split structs for address adding and updating
Diffstat (limited to 'src/ats/ats.h')
-rw-r--r-- | src/ats/ats.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h index 61c3bd148..a480f5d79 100644 --- a/src/ats/ats.h +++ b/src/ats/ats.h | |||
@@ -75,6 +75,57 @@ struct ResetBackoffMessage | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | 77 | ||
78 | /** | ||
79 | * ATS client to ATS service: here is another address you can use. | ||
80 | */ | ||
81 | struct AddressAddMessage | ||
82 | { | ||
83 | /** | ||
84 | * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_ADD. | ||
85 | */ | ||
86 | struct GNUNET_MessageHeader header; | ||
87 | |||
88 | /** | ||
89 | * Size of the `struct GNUNET_ATS_Information` array that follows this struct. | ||
90 | */ | ||
91 | uint32_t ats_count GNUNET_PACKED; | ||
92 | |||
93 | /** | ||
94 | * Identity of the peer that this address is for. | ||
95 | */ | ||
96 | struct GNUNET_PeerIdentity peer; | ||
97 | |||
98 | /** | ||
99 | * Number of bytes in the address that follows this struct. | ||
100 | */ | ||
101 | uint16_t address_length GNUNET_PACKED; | ||
102 | |||
103 | /** | ||
104 | * Number of bytes in the plugin name that follows this struct. | ||
105 | */ | ||
106 | uint16_t plugin_name_length GNUNET_PACKED; | ||
107 | |||
108 | /** | ||
109 | * Internal number this client will henceforth use to | ||
110 | * refer to this address. | ||
111 | */ | ||
112 | uint32_t session_id GNUNET_PACKED; | ||
113 | |||
114 | /** | ||
115 | * Local-only information of the address, see | ||
116 | * `enum GNUNET_HELLO_AddressInfo`. | ||
117 | */ | ||
118 | uint32_t address_local_info GNUNET_PACKED; | ||
119 | |||
120 | /* followed by: | ||
121 | * - struct GNUNET_ATS_Information [ats_count]; | ||
122 | * - char address[address_length] | ||
123 | * - char plugin_name[plugin_name_length] (including '\0'-termination). | ||
124 | */ | ||
125 | |||
126 | }; | ||
127 | |||
128 | |||
78 | struct AddressUpdateMessage | 129 | struct AddressUpdateMessage |
79 | { | 130 | { |
80 | struct GNUNET_MessageHeader header; | 131 | struct GNUNET_MessageHeader header; |