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.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h
index 6bdc020ff..7192da885 100644
--- a/src/transport/plugin_transport_udp.h
+++ b/src/transport/plugin_transport_udp.h
@@ -41,7 +41,7 @@
41#include "gnunet_transport_plugin.h" 41#include "gnunet_transport_plugin.h"
42#include "transport.h" 42#include "transport.h"
43 43
44#define LOG(kind, ...) GNUNET_log_from(kind, "transport-udp", __VA_ARGS__) 44#define LOG(kind, ...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__)
45 45
46#define PLUGIN_NAME "udp" 46#define PLUGIN_NAME "udp"
47 47
@@ -60,7 +60,8 @@ GNUNET_NETWORK_STRUCT_BEGIN
60/** 60/**
61 * Network format for IPv4 addresses. 61 * Network format for IPv4 addresses.
62 */ 62 */
63struct IPv4UdpAddress { 63struct IPv4UdpAddress
64{
64 /** 65 /**
65 * Optional options and flags for this address 66 * Optional options and flags for this address
66 */ 67 */
@@ -81,7 +82,8 @@ struct IPv4UdpAddress {
81/** 82/**
82 * Network format for IPv6 addresses. 83 * Network format for IPv6 addresses.
83 */ 84 */
84struct IPv6UdpAddress { 85struct IPv6UdpAddress
86{
85 /** 87 /**
86 * Optional options and flags for this address 88 * Optional options and flags for this address
87 */ 89 */
@@ -103,7 +105,8 @@ GNUNET_NETWORK_STRUCT_END
103 * Either an IPv4 or IPv6 UDP address. Note that without a "length", 105 * Either an IPv4 or IPv6 UDP address. Note that without a "length",
104 * one cannot tell which one of the two types this address represents. 106 * one cannot tell which one of the two types this address represents.
105 */ 107 */
106union UdpAddress { 108union UdpAddress
109{
107 /** 110 /**
108 * IPv4 case. 111 * IPv4 case.
109 */ 112 */
@@ -131,7 +134,8 @@ struct PrettyPrinterContext;
131/** 134/**
132 * Encapsulation of all of the state of the plugin. 135 * Encapsulation of all of the state of the plugin.
133 */ 136 */
134struct Plugin { 137struct Plugin
138{
135 /** 139 /**
136 * Our environment. 140 * Our environment.
137 */ 141 */
@@ -312,9 +316,9 @@ struct Plugin {
312 * @return string representing the same address 316 * @return string representing the same address
313 */ 317 */
314const char * 318const char *
315udp_address_to_string(void *cls, 319udp_address_to_string (void *cls,
316 const void *addr, 320 const void *addr,
317 size_t addrlen); 321 size_t addrlen);
318 322
319 323
320/** 324/**
@@ -329,22 +333,22 @@ udp_address_to_string(void *cls,
329 * @param network_type network type of the sender's address 333 * @param network_type network type of the sender's address
330 */ 334 */
331void 335void
332udp_broadcast_receive(struct Plugin *plugin, 336udp_broadcast_receive (struct Plugin *plugin,
333 const char *buf, 337 const char *buf,
334 ssize_t size, 338 ssize_t size,
335 const union UdpAddress *udp_addr, 339 const union UdpAddress *udp_addr,
336 size_t udp_addr_len, 340 size_t udp_addr_len,
337 enum GNUNET_NetworkType network_type); 341 enum GNUNET_NetworkType network_type);
338 342
339 343
340void 344void
341setup_broadcast(struct Plugin *plugin, 345setup_broadcast (struct Plugin *plugin,
342 struct sockaddr_in6 *server_addrv6, 346 struct sockaddr_in6 *server_addrv6,
343 struct sockaddr_in *server_addrv4); 347 struct sockaddr_in *server_addrv4);
344 348
345 349
346void 350void
347stop_broadcast(struct Plugin *plugin); 351stop_broadcast (struct Plugin *plugin);
348 352
349/*#ifndef PLUGIN_TRANSPORT_UDP_H*/ 353/*#ifndef PLUGIN_TRANSPORT_UDP_H*/
350#endif 354#endif