aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_udp.h')
-rw-r--r--src/transport/plugin_transport_udp.h58
1 files changed, 17 insertions, 41 deletions
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h
index e1ff5e9cf..e6cb5b450 100644
--- a/src/transport/plugin_transport_udp.h
+++ b/src/transport/plugin_transport_udp.h
@@ -121,29 +121,14 @@ union UdpAddress
121 121
122 122
123/** 123/**
124 * UDP Message-Packet header (after defragmentation). 124 * Information we track for each message in the queue.
125 */ 125 */
126struct UDPMessage
127{
128 /**
129 * Message header.
130 */
131 struct GNUNET_MessageHeader header;
132
133 /**
134 * Always zero for now.
135 */
136 uint32_t reserved;
137
138 /**
139 * What is the identity of the sender
140 */
141 struct GNUNET_PeerIdentity sender;
142
143};
144
145struct UDP_MessageWrapper; 126struct UDP_MessageWrapper;
146 127
128
129/**
130 * Closure for #append_port().
131 */
147struct PrettyPrinterContext; 132struct PrettyPrinterContext;
148 133
149 134
@@ -172,7 +157,7 @@ struct Plugin
172 /** 157 /**
173 * ID of select task for IPv4 158 * ID of select task for IPv4
174 */ 159 */
175 struct GNUNET_SCHEDULER_Task *select_task; 160 struct GNUNET_SCHEDULER_Task *select_task_v4;
176 161
177 /** 162 /**
178 * ID of select task for IPv6 163 * ID of select task for IPv6
@@ -205,31 +190,11 @@ struct Plugin
205 struct GNUNET_NAT_Handle *nat; 190 struct GNUNET_NAT_Handle *nat;
206 191
207 /** 192 /**
208 * FD Read set
209 */
210 struct GNUNET_NETWORK_FDSet *rs_v4;
211
212 /**
213 * FD Write set
214 */
215 struct GNUNET_NETWORK_FDSet *ws_v4;
216
217 /**
218 * The read socket for IPv4 193 * The read socket for IPv4
219 */ 194 */
220 struct GNUNET_NETWORK_Handle *sockv4; 195 struct GNUNET_NETWORK_Handle *sockv4;
221 196
222 /** 197 /**
223 * FD Read set
224 */
225 struct GNUNET_NETWORK_FDSet *rs_v6;
226
227 /**
228 * FD Write set
229 */
230 struct GNUNET_NETWORK_FDSet *ws_v6;
231
232 /**
233 * The read socket for IPv6 198 * The read socket for IPv6
234 */ 199 */
235 struct GNUNET_NETWORK_Handle *sockv6; 200 struct GNUNET_NETWORK_Handle *sockv6;
@@ -347,6 +312,17 @@ struct Plugin
347}; 312};
348 313
349 314
315/**
316 * Function called for a quick conversion of the binary address to
317 * a numeric address. Note that the caller must not free the
318 * address and that the next call to this function is allowed
319 * to override the address again.
320 *
321 * @param cls closure
322 * @param addr binary address (a `union UdpAddress`)
323 * @param addrlen length of the @a addr
324 * @return string representing the same address
325 */
350const char * 326const char *
351udp_address_to_string (void *cls, 327udp_address_to_string (void *cls,
352 const void *addr, 328 const void *addr,