WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
-*/
+ */
/**
* @file transport/plugin_transport_udp.h
#include "gnunet_transport_plugin.h"
#include "transport.h"
-#define LOG(kind,...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__)
+#define LOG(kind, ...) GNUNET_log_from(kind, "transport-udp", __VA_ARGS__)
#define PLUGIN_NAME "udp"
/**
* Network format for IPv4 addresses.
*/
-struct IPv4UdpAddress
-{
+struct IPv4UdpAddress {
/**
* Optional options and flags for this address
*/
/**
* Network format for IPv6 addresses.
*/
-struct IPv6UdpAddress
-{
+struct IPv6UdpAddress {
/**
* Optional options and flags for this address
*/
* Either an IPv4 or IPv6 UDP address. Note that without a "length",
* one cannot tell which one of the two types this address represents.
*/
-union UdpAddress
-{
+union UdpAddress {
/**
* IPv4 case.
*/
/**
* Encapsulation of all of the state of the plugin.
*/
-struct Plugin
-{
-
+struct Plugin {
/**
* Our environment.
*/
* Port we advertise on.
*/
uint16_t aport;
-
};
* @return string representing the same address
*/
const char *
-udp_address_to_string (void *cls,
- const void *addr,
- size_t addrlen);
+udp_address_to_string(void *cls,
+ const void *addr,
+ size_t addrlen);
/**
* @param network_type network type of the sender's address
*/
void
-udp_broadcast_receive (struct Plugin *plugin,
- const char *buf,
- ssize_t size,
- const union UdpAddress *udp_addr,
- size_t udp_addr_len,
- enum GNUNET_NetworkType network_type);
+udp_broadcast_receive(struct Plugin *plugin,
+ const char *buf,
+ ssize_t size,
+ const union UdpAddress *udp_addr,
+ size_t udp_addr_len,
+ enum GNUNET_NetworkType network_type);
void
-setup_broadcast (struct Plugin *plugin,
- struct sockaddr_in6 *server_addrv6,
- struct sockaddr_in *server_addrv4);
+setup_broadcast(struct Plugin *plugin,
+ struct sockaddr_in6 *server_addrv6,
+ struct sockaddr_in *server_addrv4);
void
-stop_broadcast (struct Plugin *plugin);
+stop_broadcast(struct Plugin *plugin);
/*#ifndef PLUGIN_TRANSPORT_UDP_H*/
#endif