22#if !defined (__GNUNET_UTIL_LIB_H_INSIDE__)
23#error "Only <gnunet_util_lib.h> can be included directly."
37#ifndef GNUNET_NAT_LIB_H
38#define GNUNET_NAT_LIB_H
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
#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;.
GNUNET_GenericReturnValue
Named constants for return values.
void GNUNET_is_burst_ready(struct GNUNET_TIME_Relative rtt_average, struct GNUNET_BurstSync *burst_sync, GNUNET_SCHEDULER_TaskCallback task, struct GNUNET_StartBurstCls *task_cls)
Checks if we are ready and starts burst when we and the other peer is ready.
struct GNUNET_SCHEDULER_Task * GNUNET_get_udp_socket(struct GNUNET_UdpSocketInfo *sock_info, GNUNET_NotifyUdpSocket nus)
Method to get a UDP socket for a peer that is natted.
struct GNUNET_BurstSync * GNUNET_get_burst_sync_msg(struct GNUNET_TIME_Relative rtt_average, enum GNUNET_GenericReturnValue sync_ready)
Create GNUNET_BurstSync message.
void GNUNET_stop_burst(struct GNUNET_NETWORK_Handle *do_not_touch)
Method to stop all sockets we established to the other peer.
void(* GNUNET_NotifyUdpSocket)(struct GNUNET_UdpSocketInfo *sock_info)
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
Message send during burst mode.
struct GNUNET_PeerIdentity peer
The peer who send the msg.
unsigned int local_port
The local port the message was send from.
Wrapper struct with the average RTT of message to some peer and if this peer und us is ready to sync.
enum GNUNET_GenericReturnValue sync_ready
Is this peer already ready to sync.
struct GNUNET_TIME_RelativeNBO rtt_average
The average RTT for the peer to communicate with.
The identity of the host (wraps the signing key of the peer).
Entry in list of pending tasks.
Struct wrapping information we use for starting the burst.
struct VirtualLink * vl
The VirtualLink of the peer to which we like to burst with.
struct GNUNET_TIME_Relative delay
The delay - calculate from the RTT and which peer was ready to sync first, after we will start the bu...
void * context
A Context which can be inserted into this struct, which is specific for the caller.
unsigned int sync_ready
We are ready to start the burst.
struct GNUNET_TIME_Relative rtt
The average RTT between the peers.
struct GNUNET_PEERSTORE_Monitor * mo
Peerstore request to start burst with natted addresses only.
Time for relative time used by GNUnet, in microseconds and in network byte order.
Time for relative time used by GNUnet, in microseconds.
Struct with the socket we like to use to send messages to another peer.
const char * bind_address
Our address without port.
enum GNUNET_GenericReturnValue has_port
Flag indicating, if the address is without port information.
struct GNUNET_TIME_Relative rtt
The actual RTT between the peers.
GNUNET_NotifyUdpSocket nus
The notify function to call if burst mode was successful.
const struct GNUNET_PeerIdentity * peer
char * address
The address of the other peer without port.
unsigned int port
The port we are bound to.
struct GNUNET_UdpSocketInfo * next
This is a linked list.
unsigned int std_port
Default local port we are bound to.
struct sockaddr * actual_address
The address of the other peer we received a burst message from.
struct GNUNET_SCHEDULER_Task * timeout_task
Timeout task for this socket.
struct GNUNET_NETWORK_Handle * udp_sock
struct GNUNET_UdpSocketInfo * prev
This is a linked list.
struct GNUNET_PeerIdentity * pid
The peer we like to connect to.
struct GNUNET_SCHEDULER_Task * read_task
The read task for retrieving a burst message for this socket.
A virtual link is another reachable peer that is known to CORE.