28 #ifndef PLUGIN_TRANSPORT_UDP_H
29 #define PLUGIN_TRANSPORT_UDP_H
37 #include "gnunet_signatures.h"
44 #define LOG(kind, ...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__)
46 #define PLUGIN_NAME "udp"
48 #define DEBUG_UDP GNUNET_NO
50 #define DEBUG_UDP_BROADCASTING GNUNET_NO
346 struct sockaddr_in6 *server_addrv6,
347 struct sockaddr_in *server_addrv4);
struct TestcasePlugin * plugin
The process handle to the testbed service.
Library to help fragment messages.
Helper library for handling HELLOs.
Constants for network protocols.
Functions related to doing DNS lookups.
API to create, modify and access statistics.
Transport service plugin API.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
void(* GNUNET_TRANSPORT_SessionInfoCallback)(void *cls, struct GNUNET_ATS_Session *session, const struct GNUNET_TRANSPORT_SessionInfo *info)
Function called by the plugin with information about the current sessions managed by the plugin (for ...
static unsigned int size
Size of the "table".
const char * udp_address_to_string(void *cls, const void *addr, size_t addrlen)
Function called for a quick conversion of the binary address to a numeric address.
void stop_broadcast(struct Plugin *plugin)
Stop broadcasting subsystem.
void setup_broadcast(struct Plugin *plugin, struct sockaddr_in6 *server_addrv6, struct sockaddr_in *server_addrv4)
Setup broadcasting subsystem.
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)
We received a broadcast message.
Struct to track available bandwidth.
Handle to a node in a heap.
Internal representation of the hash map.
Handle for active NAT registrations.
Handle to a request given to the resolver.
Entry in list of pending tasks.
Time for relative time used by GNUnet, in microseconds.
The transport service will pass a pointer to a struct of this type as the first and only argument to ...
Network format for IPv4 addresses.
uint16_t u4_port
Port number, in network byte order.
uint32_t ipv4_addr
IPv4 address, in network byte order.
uint32_t options
Optional options and flags for this address.
Network format for IPv6 addresses.
uint32_t options
Optional options and flags for this address.
uint16_t u6_port
Port number, in network byte order.
struct in6_addr ipv6_addr
IPv6 address.
struct GNUNET_TIME_Relative broadcast_interval
Broadcast interval.
struct GNUNET_NAT_STUN_Handle * stun
Handle to NAT traversal support.
uint16_t broadcast_port
Port we broadcasting on.
struct BroadcastAddress * broadcast_head
Tail of DLL of broadcast addresses.
struct UDP_MessageWrapper * ipv4_queue_tail
Tail of messages in IPv4 queue.
void * sic_cls
Closure for sic.
struct UDP_MessageWrapper * ipv4_queue_head
Head of messages in IPv4 queue.
int enable_ipv6
Is IPv6 enabled: GNUNET_YES or GNUNET_NO.
struct GNUNET_CONTAINER_Heap * defrag_ctxs
Heap with all of our defragmentation activities.
struct UDP_MessageWrapper * ipv6_queue_head
Head of messages in IPv6 queue.
struct GNUNET_BANDWIDTH_Tracker tracker
Bandwidth tracker to limit global UDP traffic.
int enable_ipv4
Is IPv4 enabled: GNUNET_YES or GNUNET_NO.
char * bind6_address
Address we were told to bind to exclusively (IPv6).
struct GNUNET_CONTAINER_MultiPeerMap * sessions
Session of peers with whom we are currently connected, map of peer identity to struct GNUNET_ATS_Sess...
int enable_broadcasting_receiving
Is receiving broadcasts enabled: GNUNET_YES or GNUNET_NO.
struct PrettyPrinterContext * ppc_dll_head
Running pretty printers: head.
struct UDP_MessageWrapper * ipv6_queue_tail
Tail of messages in IPv6 queue.
int64_t bytes_in_buffer
Bytes currently in buffer.
struct GNUNET_DATACACHE_PluginEnvironment * env
Our execution environment.
struct GNUNET_SCHEDULER_Task * select_task_v4
ID of select task for IPv4.
struct GNUNET_NETWORK_Handle * sockv4
The read socket for IPv4.
int enable_broadcasting
Is broadcasting enabled: GNUNET_YES or GNUNET_NO.
struct GNUNET_NAT_Handle * nat
NAT handle & address management.
uint32_t myoptions
Address options.
GNUNET_TRANSPORT_SessionInfoCallback sic
Function to call about session status changes.
uint16_t aport
Port we advertise on.
char * port
Port we bind to.
struct sockaddr_in6 ipv6_multicast_address
IPv6 multicast address.
struct GNUNET_NETWORK_Handle * sockv6
The read socket for IPv6.
char * bind4_address
Address we were told to bind to exclusively (IPv4).
struct BroadcastAddress * broadcast_tail
Head of DLL of broadcast addresses.
struct GNUNET_SCHEDULER_Task * select_task_v6
ID of select task for IPv6.
struct PrettyPrinterContext * ppc_dll_tail
Running pretty printers: tail.
Closure for append_port().
Information we track for each message in the queue.
common internal definitions for transport service
Either an IPv4 or IPv6 UDP address.
struct IPv4UdpAddress v4
IPv4 case.
struct IPv6UdpAddress v6
IPv6 case.