44 #define TRANSPORT_BLACKLIST_HT_SIZE 64
58 #define MAX_PENDING (128 * 1024)
438 "Dropping message of type %u and size %u, have %u/%u messages pending\n",
445 "# messages dropped due to slow client"),
530 "Client %p disconnected, cleaning up.\n",
560 if (NULL == bc->
task)
624 (0 != memcmp (&
start->self,
693 size_t bytes_payload,
694 size_t bytes_on_wire)
707 "It took us %s to send %u/%u bytes to %s (%d, %s)\n",
709 (
unsigned int) bytes_payload,
710 (
unsigned int) bytes_on_wire,
716 "It took us %s to send %u/%u bytes to %s (%d, %s)\n",
718 (
unsigned int) bytes_payload,
719 (
unsigned int) bytes_on_wire,
729 "Sending SEND_OK for transmission request %llu\n",
731 send_ok_msg.
header.
size = htons (
sizeof(send_ok_msg));
733 send_ok_msg.
bytes_msg = htons (bytes_payload);
735 send_ok_msg.
success = htons (success);
783 static unsigned long long uuid_gen;
793 "Could not send message to peer `%s': not connected\n",
797 gettext_noop (
"# bytes payload dropped (other peer was not connected)"),
805 "Received SEND request %llu for `%s' and first message of type %u and total size %u\n",
816 stcc->
uuid = uuid_gen++;
854 if (NULL == actx->
tc)
881 slen = strlen (
buf) + 1;
906 uint32_t address_len;
910 address_len = ntohs (alum->
addrlen);
916 address = (
const char *) &alum[1];
942 uint32_t address_len;
949 address_len = ntohs (alum->
addrlen);
950 address = (
const char *) &alum[1];
958 "Failed to find plugin `%s'\n",
977 "Pretty-printing address of %u bytes using plugin `%s'\n",
1012 tlen = strlen (
address->transport_name) + 1;
1013 alen =
address->address_length;
1025 msg->reserved = htonl (0);
1027 msg->addrlen = htonl (alen);
1028 msg->pluginlen = htonl (tlen);
1032 msg->local_address_info = htonl ((uint32_t)
address->local_info);
1033 addr = (
char *) &
msg[1];
1091 "Sending information about `%s' using address `%s' in state `%s'\n",
1144 tc->details.monitor_peer =
msg->peer;
1149 "Client %p started monitoring of the peer `%s'\n",
1154 "Client %p started monitoring all peers\n",
1201 if ((NULL ==
info) && (NULL == session))
1215 "Plugin event for peer %s on transport %s\n",
1217 info->address->transport_name);
1218 slen = strlen (
info->address->transport_name) + 1;
1219 alen =
info->address->address_length;
1221 if (
size > UINT16_MAX)
1229 msg->session_state = htons ((uint16_t)
info->state);
1230 msg->is_inbound = htons ((int16_t)
info->is_inbound);
1231 msg->msgs_pending = htonl (
info->num_msg_pending);
1232 msg->bytes_pending = htonl (
info->num_bytes_pending);
1235 msg->peer =
info->address->peer;
1236 msg->session_id = (uint64_t) (intptr_t) session;
1237 msg->plugin_name_len = htons (slen);
1238 msg->plugin_address_len = htons (alen);
1291 "Asked to broadcast message of type %u with %u bytes\n",
1292 (
unsigned int) ntohs (
msg->
type),
1293 (
unsigned int) ntohs (
msg->
size));
1306 "Message of type %u not delivered, is CORE service up?\n",
1336 if ((0 == memcmp (&
tc->details.monitor_peer,
1339 (0 == memcmp (&
tc->details.monitor_peer,
1387 disconnect_msg.
reserved = htonl (0);
1422 ntohs (hello->
size),
1463 size_t msg_size = ntohs (message->size);
1474 "Discarded %u bytes type %u payload from peer `%s'\n",
1475 (
unsigned int) msg_size,
1476 ntohs (message->type),
1480 gettext_noop (
"# bytes payload discarded due to not connected peer"),
1569 "Received SYN message from peer `%s' at `%s'\n",
1585 "Discarding SYN message from `%s' due to denied blacklist check\n",
1615 if (NULL == message)
1617 type = ntohs (message->type);
1619 "Received message with type %u from peer `%s' at %s\n",
1626 ntohs (message->size),
1645 "Processing PING from `%s'\n",
1657 "Processing PONG from `%s'\n",
1716 ntohs (message->size),
1723 "Allowing receive from peer %s to continue in %s\n",
1762 "# transport addresses",
1768 "Transport now has %u addresses to communicate\n",
1808 "Notification from plugin about terminated session %p from peer `%s' address `%s'\n",
1859 "Informing verifier about inbound session's address `%s'\n",
1887 if (NULL == session)
1894 "Notification from plugin `%s' about new session from peer `%s' address `%s'\n",
1906 memset (&prop, 0,
sizeof(prop));
1947 uint32_t bw_in = ntohl (bandwidth_in.
value__);
1948 uint32_t bw_out = ntohl (bandwidth_out.
value__);
1961 if ((0 == bw_in) && (0 == bw_out))
1964 "ATS tells me to disconnect from peer `%s'\n",
1971 "# ATS suggestions received",
2210 "No other blacklist clients active, will allow neighbour `%s'\n",
2217 if ((NULL !=
tc->details.blacklist.bc) ||
2218 (
GNUNET_NO !=
tc->details.blacklist.waiting_for_reply))
2220 tc->details.blacklist.bc = bc;
2225 if (
GNUNET_YES ==
tc->details.blacklist.call_receive_done)
2227 tc->details.blacklist.call_receive_done =
GNUNET_NO;
2253 "Blacklist client %p sent reply for `%s'\n",
2256 bc =
tc->details.blacklist.bc;
2257 tc->details.blacklist.bc = NULL;
2258 tc->details.blacklist.waiting_for_reply =
GNUNET_NO;
2268 "Blacklist check failed, peer not allowed\n");
2276 tc->details.blacklist.call_receive_done =
GNUNET_NO;
2283 "Blacklist check succeeded, continuing with checks\n");
2284 tc->details.blacklist.call_receive_done =
GNUNET_NO;
2308 const char *transport_name)
2312 if (NULL != transport_name)
2315 "Adding peer `%s' with plugin `%s' to blacklist\n",
2322 "Adding peer `%s' with all plugins to blacklist\n",
2350 while (NULL != (bc = n))
2379 const char *transport_name = cls;
2390 "Comparing BL request for peer `%4s':`%s' with BL entry: `%s'\n",
2392 (NULL == transport_name) ?
"unspecified" : transport_name,
2393 (NULL == be) ?
"all plugins" : be);
2399 if ((NULL != transport_name) && (NULL !=
value))
2401 if (0 == strcmp (transport_name, be))
2422 const char *transport_name,
2433 "Blacklist check for peer `%s':%s\n",
2435 (NULL != transport_name) ? transport_name :
"unspecified");
2444 (
void *) transport_name)))
2452 _ (
"Disallowing connection to peer `%s' on transport %s\n"),
2454 (NULL != transport_name) ? transport_name :
"unspecified");
2469 "Allowing connection to peer `%s' %s\n",
2471 (NULL != transport_name) ? transport_name :
"");
2522 const char *section,
2526 unsigned int *
res = cls;
2537 if ((NULL ==
value) || (0 == strcmp (
value,
"")))
2542 _ (
"Adding blacklisting entry for peer `%s'\n"),
2548 for (pos = strtok (plugs,
" "); pos != NULL; pos = strtok (NULL,
" "))
2551 _ (
"Adding blacklisting entry for peer `%s':`%s'\n"),
2573 unsigned int res = 0;
2577 "transport-blacklist-%s",
2584 "Loaded %u blacklisting entries from configuration\n",
2602 long long unsigned int max_fd_cfg;
2617 "Transport service is lacking key configuration settings. Exiting.\n"));
2634 "Failed to setup peer's private key\n");
2645 "My identity is `%s'\n",
2652 _ (
"Could not access PEERINFO service. Exiting.\n"));
2660 struct rlimit r_file;
2662 if (0 == getrlimit (RLIMIT_NOFILE, &r_file))
2664 max_fd_rlimit = r_file.rlim_cur;
2666 "Maximum number of open files was: %u/%u\n",
2667 (
unsigned int) r_file.rlim_cur,
2668 (
unsigned int) r_file.rlim_max);
2671 (9 * max_fd_rlimit) / 10;
2678 max_fd_cfg = max_fd_rlimit;
2680 if (max_fd_cfg > max_fd_rlimit)
2681 max_fd = max_fd_cfg;
2683 max_fd = max_fd_rlimit;
2688 "Limiting number of sockets to %u: validation %u, neighbors: %u\n",
2701 const char *
ds =
"DSTJBRRKZ8TBW3FGK6B0M5QXWT9WYNZ45H5MCV4HY7ST64Q8T9F0";
struct GNUNET_GETOPT_CommandLineOption options[]
struct GNUNET_MQ_Handle * mq
struct GNUNET_MessageHeader * msg
struct GNUNET_MQ_Envelope * env
#define gettext_noop(String)
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
static int ret
Return value of the commandline.
static int start
Set if we are to start default services (including ARM).
static int end
Set if we are to shutdown all services (including ARM).
static struct GNUNET_CONTAINER_MultiPeerMap * addresses
Hashmap to store addresses.
struct TestcasePlugin * plugin
The process handle to the testbed service.
static char * address
GNS address for this phone.
struct GNUNET_HashCode key
The key used in the DHT.
static char * value
Value of the record to add/remove.
static struct GNUNET_FS_DirScanner * ds
Handle to the directory scanner (for recursive insertions).
static struct GNUNET_FS_PublishContext * pc
Handle to FS-publishing operation.
enum State state
current state of profiling
static int result
Global testing status.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
static struct GNUNET_TRANSPORT_CoreHandle * transport
Transport service.
static char * plugin_name
Name of our plugin.
ClientType
What type of client is the struct TransportClient about?
static void read_blacklist_configuration(const struct GNUNET_CONFIGURATION_Handle *cfg, const struct GNUNET_PeerIdentity *my_id)
Read blacklist configuration.
struct GNUNET_TIME_Relative GST_receive_callback(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
Function called by the transport for each received message.
static void handle_client_hello(void *cls, const struct GNUNET_MessageHeader *message)
Client sent us a HELLO.
static void ats_request_address_change(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
Function called by ATS to notify the callee that the assigned bandwidth or address for a given peer w...
void GST_blacklist_test_cancel(struct GST_BlacklistCheck *bc)
Cancel a blacklist check.
static void plugin_session_info_cb(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 struct GNUNET_ATS_SessionKiller * sk_tail
Tail of DLL of asynchronous tasks to kill sessions.
struct GNUNET_PeerIdentity GST_my_identity
Configuration handle.
static int test_blacklisted(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Test if the given blacklist entry matches.
static void unicast(struct TransportClient *tc, const struct GNUNET_MessageHeader *msg, int may_drop)
Queue the given message for transmission to the given client.
void GST_blacklist_abort_matching(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Abort blacklist if address and session match.
static void plugin_env_session_end(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Function that will be called whenever the plugin internally cleans up a session pointer and hence the...
static void kill_session(const char *plugin_name, struct GNUNET_ATS_Session *session)
Force plugin to terminate session due to communication issue.
static void handle_client_blacklist_reply(void *cls, const struct BlacklistMessage *msg)
A blacklisting client has sent us reply.
struct GNUNET_ATS_ConnectivityHandle * GST_ats_connect
ATS connectivity handle.
static void handle_client_start(void *cls, const struct StartMessage *start)
Initialize a normal client.
struct GST_BlacklistCheck * GST_blacklist_test_allowed(const struct GNUNET_PeerIdentity *peer, const char *transport_name, GST_BlacklistTestContinuation cont, void *cont_cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Test if a peer/transport combination is blacklisted.
static int check_client_address_to_string(void *cls, const struct AddressLookupMessage *alum)
Client asked to resolve an address.
static void plugin_env_address_change_notification(void *cls, int add_remove, const struct GNUNET_HELLO_Address *address)
Function that will be called for each address the transport is aware that it might be reachable under...
static void handle_client_send(void *cls, const struct OutboundMessage *obm)
Client asked for transmission to a peer.
static struct GST_BlacklistCheck * bc_tail
Tail of DLL of active blacklisting queries.
static struct TransportClient * clients_head
Head of linked list of all clients to this service.
static void shutdown_task(void *cls)
Function called when the service shuts down.
struct GNUNET_TIME_Relative hello_expiration
Hello address expiration.
static void process_hello_update(void *cls, const struct GNUNET_MessageHeader *hello)
My HELLO has changed.
void GST_blacklist_add_peer(const struct GNUNET_PeerIdentity *peer, const char *transport_name)
Add the given peer to the blacklist (for the given transport).
static void handle_client_blacklist_init(void *cls, const struct GNUNET_MessageHeader *message)
Initialize a blacklisting client.
static int check_client_hello(void *cls, const struct GNUNET_MessageHeader *message)
Client sent us a HELLO.
static void handle_client_set_metric(void *cls, const struct TrafficMetricMessage *tm)
Set traffic metric to manipulate.
static struct AddressToStringContext * a2s_tail
Tail of linked list of all pending address iterations.
struct GNUNET_ATS_SchedulingHandle * GST_ats
ATS scheduling handle.
static void send_peer_information(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
Output information of neighbours to the given client.
static void handle_client_monitor_peers(void *cls, const struct PeerMonitorMessage *msg)
Client asked to obtain information about a specific or all peers Process the request.
static void notify_client_about_neighbour(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
Function called for each of our connected neighbours.
static int free_blacklist_entry(void *cls, const struct GNUNET_PeerIdentity *key, void *value)
Free the given entry in the blacklist.
static void run(void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service)
Initiate transport service.
struct GNUNET_NT_InterfaceScanner * GST_is
Interface scanner determines our LAN address range(s).
static struct GNUNET_NotificationContext * plugin_nc
Notification context, to send updates on changes to active plugin connections.
static int mark_match_down(void *cls, const struct GNUNET_PeerIdentity *peer, void *value)
Mark the peer as down so we don't call the continuation context in the future.
static int mark_peer_down(void *cls, const struct GNUNET_PeerIdentity *peer, void *value)
Mark the peer as down so we don't call the continuation context in the future.
struct GNUNET_CRYPTO_EddsaPrivateKey GST_my_private_key
Our private key.
#define MAX_PENDING
How many messages can we have pending for a given client process before we start to drop incoming mes...
GNUNET_SERVICE_MAIN("transport", GNUNET_SERVICE_OPTION_NONE, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_fixed_size(client_start, GNUNET_MESSAGE_TYPE_TRANSPORT_START, struct StartMessage, NULL), GNUNET_MQ_hd_var_size(client_hello, GNUNET_MESSAGE_TYPE_HELLO, struct GNUNET_MessageHeader, NULL), GNUNET_MQ_hd_var_size(client_send, GNUNET_MESSAGE_TYPE_TRANSPORT_SEND, struct OutboundMessage, NULL), GNUNET_MQ_hd_var_size(client_address_to_string, GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING, struct AddressLookupMessage, NULL), GNUNET_MQ_hd_fixed_size(client_monitor_peers, GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST, struct PeerMonitorMessage, NULL), GNUNET_MQ_hd_fixed_size(client_blacklist_init, GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT, struct GNUNET_MessageHeader, NULL), GNUNET_MQ_hd_fixed_size(client_blacklist_reply, GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY, struct BlacklistMessage, NULL), GNUNET_MQ_hd_fixed_size(client_set_metric, GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC, struct TrafficMetricMessage, NULL), GNUNET_MQ_hd_fixed_size(client_monitor_plugins, GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_START, struct GNUNET_MessageHeader, NULL), GNUNET_MQ_handler_end())
Define "main" method using service macro.
static void blacklist_cfg_iter(void *cls, const char *section, const char *option, const char *value)
Function to iterate over options in the blacklisting section for a peer.
static struct GNUNET_PeerIdentity all_zeros
Peer identity that is all zeros, used as a way to indicate "all peers".
static void handle_send_transmit_continuation(void *cls, int success, size_t bytes_payload, size_t bytes_on_wire)
Function called after the transmission is done.
const struct GNUNET_CONFIGURATION_Handle * GST_cfg
Configuration handle.
static void plugin_env_session_start_bl_check_cont(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, int result)
Black list check result from blacklist check triggered when a plugin gave us a new session in plugin_...
static struct PeerIterateResponseMessage * compose_address_iterate_response_message(const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address)
Compose PeerIterateResponseMessage using the given peer and address.
static struct GNUNET_CONTAINER_MultiPeerMap * blacklist
Hashmap of blacklisted peers.
static void transmit_our_hello(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
Transmit our HELLO message to the given (connected) neighbour.
static void do_blacklist_check(void *cls)
Perform next action in the blacklist check.
void GST_clients_broadcast(const struct GNUNET_MessageHeader *msg, int may_drop)
Broadcast the given message to all of our clients.
struct GNUNET_PEERINFO_Handle * GST_peerinfo
Handle to peerinfo service.
static int check_client_send(void *cls, const struct OutboundMessage *obm)
Client asked for transmission to a peer.
static struct TransportClient * clients_tail
Tail of linked list of all clients to this service.
struct GNUNET_STATISTICS_Handle * GST_stats
Statistics handle.
static struct AddressToStringContext * a2s_head
Head of linked list of all pending address iterations.
static void kill_session_task(void *cls)
Task to asynchronously terminate a session.
static void * client_connect_cb(void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq)
Called whenever a client connects.
static struct TransportClient * sync_client
Plugin monitoring client we are currently syncing, NULL if all monitoring clients are in sync.
#define TRANSPORT_BLACKLIST_HT_SIZE
Size of the blacklist hash map.
static void test_connection_ok(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
Test if an existing connection is still acceptable given a new blacklisting client.
static void client_disconnect_cb(void *cls, struct GNUNET_SERVICE_Client *client, void *app_ctx)
Called whenever a client is disconnected.
static void handle_client_address_to_string(void *cls, const struct AddressLookupMessage *alum)
Client asked to resolve an address.
void GST_clients_broadcast_disconnect(const struct GNUNET_PeerIdentity *peer)
Notify all clients about a disconnect, and cancel pending SEND_OK messages for this peer.
static void plugin_env_session_start(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, enum GNUNET_NetworkType scope)
Plugin tells transport service about a new inbound session.
void GST_clients_broadcast_peer_notification(const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, enum GNUNET_TRANSPORT_PeerState state, struct GNUNET_TIME_Absolute state_timeout)
Broadcast the new active address to all clients monitoring the peer.
static void confirm_or_drop_neighbour(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, int allowed)
Got the result about an existing connection from a new blacklister.
static struct GNUNET_CONTAINER_MultiPeerMap * active_stccs
Map of peer identities to active send transmit continuation contexts.
static struct GNUNET_ATS_SessionKiller * sk_head
Head of DLL of asynchronous tasks to kill sessions.
static void transmit_address_to_client(void *cls, const char *buf, int res)
Take the given address and append it to the set of results sent back to the client.
@ CT_CORE_NO_HANDLERS
CORE client without any handlers.
@ CT_BLACKLIST
It is a blacklist, query about allowed connections.
@ CT_MONITOR
It is a monitor, forward monitor data.
@ CT_NONE
We do not know yet (client is fresh).
@ CT_CORE
Is the CORE service, we need to forward traffic to it.
static void handle_client_monitor_plugins(void *cls, const struct GNUNET_MessageHeader *message)
Client asked to obtain information about all plugin connections.
static struct GST_BlacklistCheck * bc_head
Head of DLL of active blacklisting queries.
static struct GNUNET_TIME_Relative process_payload(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
We received some payload.
static void connect_bl_check_cont(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, int result)
Black list check result for try_connect call If connection to the peer is allowed request address and...
void(* GST_BlacklistTestContinuation)(void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, int result)
Continuation called from a blacklist test.
void GST_ats_add_inbound_address(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_ATS_Properties *prop)
Notify ATS about a new inbound address.
void GST_ats_init()
Initialize ATS subsystem.
void GST_ats_del_session(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
Notify ATS that the session (but not the address) of a given address is no longer relevant.
void GST_ats_done()
Shutdown ATS subsystem.
interfacing between transport and ATS service
void GST_hello_stop()
Shutdown the HELLO module.
void GST_hello_modify_addresses(int addremove, const struct GNUNET_HELLO_Address *address)
Add or remove an address from this peer's HELLO message.
void GST_hello_start(int friend_only, GST_HelloCallback cb, void *cb_cls)
Initialize the HELLO module.
const struct GNUNET_MessageHeader * GST_hello_get()
Obtain this peers HELLO message.
void GST_manipulation_init()
Initialize traffic manipulation.
void GST_manipulation_stop()
Stop traffic manipulation.
void GST_manipulation_set_metric(const struct TrafficMetricMessage *tm)
Set traffic metric to manipulate.
void GST_manipulation_send(const struct GNUNET_PeerIdentity *target, const void *msg, size_t msg_size, struct GNUNET_TIME_Relative timeout, GST_NeighbourSendContinuation cont, void *cont_cls)
Adapter function between transport's send function and transport plugins.
struct GNUNET_TIME_Relative GST_manipulation_recv(void *cls, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, const struct GNUNET_MessageHeader *message)
Adapter function between transport plugins and transport receive function manipulation delays for nex...
void GST_neighbours_switch_to_address(const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
For the given peer, switch to this address.
void GST_neighbours_notify_data_recv(const struct GNUNET_HELLO_Address *address, const struct GNUNET_MessageHeader *message)
Track information about data we received from the given address (used to notify ATS about our utiliza...
void GST_neighbours_keepalive_response(const struct GNUNET_PeerIdentity *neighbour, const struct GNUNET_MessageHeader *m)
We received a KEEP_ALIVE_RESPONSE message and use this to calculate latency to this peer.
const struct GNUNET_HELLO_Address * GST_neighbour_get_current_address(const struct GNUNET_PeerIdentity *peer)
Obtain current address information for the given neighbour.
void GST_neighbours_handle_disconnect_message(const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *msg)
We received a disconnect message from the given peer, validate and process.
int GST_neighbours_handle_session_syn(const struct GNUNET_MessageHeader *message, const struct GNUNET_PeerIdentity *peer)
We received a 'SYN' message from the other peer.
struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay(const struct GNUNET_PeerIdentity *sender, ssize_t size, int *do_forward)
We have received a message from the given sender.
int GST_neighbours_handle_session_ack(const struct GNUNET_MessageHeader *message, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
We received a 'ACK' message from the other peer.
int GST_neighbours_handle_session_syn_ack(const struct GNUNET_MessageHeader *message, const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session)
We received a 'SESSION_SYN_ACK' message from the other peer.
int GST_neighbours_session_terminated(const struct GNUNET_PeerIdentity *peer, struct GNUNET_ATS_Session *session)
A session was terminated.
void GST_neighbours_keepalive(const struct GNUNET_PeerIdentity *neighbour, const struct GNUNET_MessageHeader *m)
Keep the connection to the given neighbour alive longer, we received a KEEPALIVE (or equivalent); sen...
void GST_neighbours_force_disconnect(const struct GNUNET_PeerIdentity *target)
If we have an active connection to the given target, it must be shutdown.
void GST_neighbours_send(const struct GNUNET_PeerIdentity *target, const void *msg, size_t msg_size, struct GNUNET_TIME_Relative timeout, GST_NeighbourSendContinuation cont, void *cont_cls)
Transmit a message to the given target using the active connection.
void GST_neighbours_stop()
Cleanup the neighbours subsystem.
int GST_neighbours_test_connected(const struct GNUNET_PeerIdentity *target)
Test if we're connected to the given peer.
void GST_neighbours_iterate(GST_NeighbourIterator cb, void *cb_cls)
Iterate over all connected neighbours.
void GST_neighbours_start(unsigned int max_fds)
Initialize the neighbours subsystem.
void GST_neighbours_handle_quota_message(const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *msg)
We received a quota message from the given peer, validate and process.
neighbour manipulation API, allows manipulation of performance metrics (delay and towards ATS)
void GST_plugins_unload()
Unload all plugins.
struct GNUNET_TRANSPORT_PluginFunctions * GST_plugins_find(const char *name)
Obtain the plugin API based on a plugin name.
void GST_plugins_load(GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, GNUNET_TRANSPORT_AddressNotification address_cb, GNUNET_TRANSPORT_SessionStart session_start_cb, GNUNET_TRANSPORT_SessionEnd session_end_cb)
Load and initialize all plugins.
struct GNUNET_TRANSPORT_PluginFunctions * GST_plugins_printer_find(const char *name)
Obtain the plugin API based on a the stripped plugin name after the underscore.
void GST_plugins_monitor_subscribe(GNUNET_TRANSPORT_SessionInfoCallback cb, void *cb_cls)
Register callback with all plugins to monitor their status.
const char * GST_plugins_a2s(const struct GNUNET_HELLO_Address *address)
Convert a given address to a human-readable format.
int GST_validation_handle_ping(const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *hdr, const struct GNUNET_HELLO_Address *sender_address, struct GNUNET_ATS_Session *session)
We've received a PING.
int GST_validation_handle_hello(const struct GNUNET_MessageHeader *hello)
We've received a HELLO, check which addresses are new and trigger validation.
void GST_validation_start(unsigned int max_fds)
Start the validation subsystem.
void GST_validation_handle_address(const struct GNUNET_HELLO_Address *address)
Validate an individual address.
void GST_validation_stop()
Stop the validation subsystem.
int GST_validation_handle_pong(const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *hdr)
We've received a PONG.
static int numeric
Option -n.
Automatic transport selection and outbound bandwidth determination.
Helper library for handling HELLOs.
Maintain the list of currently known hosts.
API to create, modify and access statistics.
struct GNUNET_ATS_SchedulingHandle * GNUNET_ATS_scheduling_init(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_ATS_AddressSuggestionCallback suggest_cb, void *suggest_cb_cls)
Initialize the ATS scheduling subsystem.
struct GNUNET_ATS_ConnectivityHandle * GNUNET_ATS_connectivity_init(const struct GNUNET_CONFIGURATION_Handle *cfg)
Initialize the ATS connectivity suggestion client handle.
void GNUNET_ATS_connectivity_done(struct GNUNET_ATS_ConnectivityHandle *ch)
Client is done with ATS connectivity management, release resources.
void GNUNET_ATS_scheduling_done(struct GNUNET_ATS_SchedulingHandle *sh)
Client is done with ATS scheduling, release resources.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_filename(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be the name of a file or directory.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_number(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, unsigned long long *number)
Get a configuration value that should be a number.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_yesno(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option)
Get a configuration value that should be in a set of "YES" or "NO".
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_time(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, struct GNUNET_TIME_Relative *time)
Get a configuration value that should be a relative time.
void GNUNET_CONFIGURATION_iterate_section_values(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, GNUNET_CONFIGURATION_Iterator iter, void *iter_cls)
Iterate over values of a section in the configuration.
#define GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION
After how long do we expire an address in a HELLO that we just validated? This value is also used for...
#define GNUNET_CONSTANTS_LATENCY_WARN
After what amount of latency for a message do we print a warning?
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_key_from_file(const char *filename, int do_create, struct GNUNET_CRYPTO_EddsaPrivateKey *pkey)
Create a new private key by reading it from a file.
void GNUNET_CRYPTO_eddsa_key_get_public(const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Extract the public key for the given private key.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
int GNUNET_CONTAINER_multipeermap_get_multiple(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE
Allow multiple values with the same key.
struct GNUNET_HELLO_Address * GNUNET_HELLO_address_copy(const struct GNUNET_HELLO_Address *address)
Copy an address struct.
int GNUNET_HELLO_address_check_option(const struct GNUNET_HELLO_Address *address, enum GNUNET_HELLO_AddressInfo option)
Check if an address has a local option set.
int GNUNET_HELLO_address_cmp(const struct GNUNET_HELLO_Address *a1, const struct GNUNET_HELLO_Address *a2)
Compare two addresses.
@ GNUNET_HELLO_ADDRESS_INFO_INBOUND
This is an inbound address and cannot be used to initiate an outbound connection to another peer.
#define GNUNET_log(kind,...)
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_public_key_from_string(const char *enc, size_t enclen, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Convert a string representing a public key to a public key.
#define GNUNET_ALIGN
gcc-ism to force alignment; we use this to align char-arrays that may then be cast to 'struct's.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
const char * GNUNET_i2s_full(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
int GNUNET_snprintf(char *buf, size_t size, const char *format,...) __attribute__((format(printf
Like snprintf, just aborts if the buffer is of insufficient size.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
struct GNUNET_MessageHeader * GNUNET_copy_message(const struct GNUNET_MessageHeader *msg)
Create a copy of the given message.
#define GNUNET_free(ptr)
Wrapper around free.
void GNUNET_notification_context_destroy(struct GNUNET_NotificationContext *nc)
Destroy the context, force disconnect for all subscribers.
unsigned int GNUNET_MQ_get_length(struct GNUNET_MQ_Handle *mq)
Obtain the current length of the message queue.
unsigned int GNUNET_notification_context_get_size(struct GNUNET_NotificationContext *nc)
Return active number of subscribers in this context.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
void GNUNET_notification_context_broadcast(struct GNUNET_NotificationContext *nc, const struct GNUNET_MessageHeader *msg, int can_drop)
Send a message to all subscribers of this context.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
struct GNUNET_MQ_Envelope * GNUNET_MQ_msg_copy(const struct GNUNET_MessageHeader *hdr)
Create a new envelope by copying an existing message.
struct GNUNET_NotificationContext * GNUNET_notification_context_create(unsigned int queue_length)
Create a new notification context.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
void GNUNET_notification_context_add(struct GNUNET_NotificationContext *nc, struct GNUNET_MQ_Handle *mq)
Add a subscriber to the notification context.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
void GNUNET_NT_scanner_done(struct GNUNET_NT_InterfaceScanner *is)
Terminate interface scanner.
struct GNUNET_NT_InterfaceScanner * GNUNET_NT_scanner_init(void)
Initialize the address characterization client handle.
@ GNUNET_NT_UNSPECIFIED
Category of last resort.
struct GNUNET_PEERINFO_Handle * GNUNET_PEERINFO_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the peerinfo service.
void GNUNET_PEERINFO_disconnect(struct GNUNET_PEERINFO_Handle *h)
Disconnect from the peerinfo service.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT
Message from TRANSPORT notifying about a client that connected to us.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA
Message exchanged between transport services to indicate that the sender should limit its transmissio...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT
Monitoring event about the connection state of plugins, generated in response to a subscription initi...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE
Message send by a peer to notify the other to keep the session alive and measure latency in a regular...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_START
Message from the core saying that the transport server should start giving it messages.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV
Message from TRANSPORT notifying about a message that was received.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE
Response to a GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to measure latency in a regular...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT
Message from TRANSPORT notifying about a client that disconnected from us.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_PONG
Transport PONG message.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY
Response to the address lookup request.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY
Reply from blacklisting client (answer to blacklist query).
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST
Request to monitor addresses used by a peer or all peers.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_ACK
Transport ACK message exchanged between transport services to indicate that a SYN_ACK message was acc...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE
Response to GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST request to iterate over all known addr...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_START
Request to start monitoring the connection state of plugins.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC
Monitoring event notifying client that the initial iteration is now completed and we are in sync with...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_INIT
Register a client that wants to do blacklisting.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT
Transport DISCONNECT message exchanged between transport services to indicate that a connection shoul...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END
Response to GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END terminating list of replies.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC
Message containing traffic metrics for transport service.
#define GNUNET_MESSAGE_TYPE_HELLO_URI
Latest HELLO messages used for communicating peer addresses.
#define GNUNET_MESSAGE_TYPE_HELLO
HELLO message with friend only flag used for communicating peer addresses.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_PING
Transport PING message.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING
Request to look addresses of peers in server.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_SYN
Transport SYN message exchanged between transport services to indicate that a session should be marke...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND
Request to TRANSPORT to transmit a message.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK
Confirmation from TRANSPORT that message for transmission has been queued (and that the next message ...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_SYN_ACK
Transport SYN_ACK message exchanged between transport services to indicate that a SYN message was acc...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY
Query to a blacklisting client (is this peer blacklisted)?
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
void GNUNET_SERVICE_client_mark_monitor(struct GNUNET_SERVICE_Client *c)
Set the 'monitor' flag on this client.
void GNUNET_SERVICE_client_drop(struct GNUNET_SERVICE_Client *c)
Ask the server to disconnect from the given client.
void GNUNET_SERVICE_client_disable_continue_warning(struct GNUNET_SERVICE_Client *c)
Disable the warning the server issues if a message is not acknowledged in a timely fashion.
void GNUNET_SERVICE_client_continue(struct GNUNET_SERVICE_Client *c)
Continue receiving further messages from the given client.
@ GNUNET_SERVICE_OPTION_NONE
Use defaults.
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh(struct GNUNET_TIME_RelativeNBO a)
Convert relative time from network byte order.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
const char * GNUNET_TRANSPORT_ps2s(enum GNUNET_TRANSPORT_PeerState state)
Convert a transport state to a human readable string.
GNUNET_TRANSPORT_PeerState
Possible state of a neighbour.
static unsigned int size
Size of the "table".
int client_start(struct Plugin *plugin)
int client_send(struct GNUNET_ATS_Session *s, struct HTTP_Message *msg)
static enum GNUNET_NetworkType scope
Which network scope do we belong to?
static struct GNUNET_SCHEDULER_TaskContext tc
Task context of the current task.
Message from the library to the transport service asking for converting a transport address to a huma...
uint16_t addrlen
Length of the (binary) address in bytes, in big-endian.
int16_t numeric_only
Should the conversion use numeric IP addresses (otherwise a reverse DNS lookup is OK – if applicable)...
struct GNUNET_TIME_RelativeNBO timeout
timeout to give up (for DNS resolution timeout mostly)
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING.
Context for address to string operations.
struct AddressToStringContext * prev
This is a doubly-linked list.
struct TransportClient * tc
Client that made the request.
struct AddressToStringContext * next
This is a doubly-linked list.
Message used to notify the transport API about an address to string conversion.
uint32_t addr_len
Length of the following string, zero if is GNUNET_SYSERR.
uint32_t res
GNUNET_OK if the conversion succeeded, GNUNET_SYSERR if it failed
Change in blacklisting (either request or notification, depending on which direction it is going).
uint32_t is_allowed
0 for the query, GNUNET_OK (allowed) or GNUNET_SYSERR (disallowed) for the response.
struct GNUNET_PeerIdentity peer
Which peer is being blacklisted or queried?
Message from the transport service to the library informing about neighbors.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT.
struct GNUNET_PeerIdentity id
Identity of the new neighbour.
struct GNUNET_BANDWIDTH_Value32NBO quota_out
Current outbound quota for this peer.
Message from the transport service to the library informing about disconnects.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT.
uint32_t reserved
Reserved, always zero.
struct GNUNET_PeerIdentity peer
Who got disconnected?
Handle to the ATS subsystem for connectivity management.
ATS performance characteristics for an address.
enum GNUNET_NetworkType scope
Which network scope does the respective address belong to? This property does not change.
Handle to the ATS subsystem for bandwidth/transport scheduling information.
Information we need for an asynchronous session kill.
struct GNUNET_ATS_Session * session
Session to kill.
struct GNUNET_ATS_SessionKiller * prev
Kept in a DLL.
struct GNUNET_TRANSPORT_PluginFunctions * plugin
Plugin for the session.
struct GNUNET_ATS_SessionKiller * next
Kept in a DLL.
struct GNUNET_SCHEDULER_Task * task
The kill task.
Session handle for connections.
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
uint32_t value__
The actual value (bytes per second).
Internal representation of the hash map.
Private ECC key encoded for transmission.
struct GNUNET_MQ_Handle * mq
Our own message queue for the FS service; only briefly used when we start to index a file,...
An address for communicating with a peer.
const char * transport_name
Name of the transport plugin enabling the communication using this address.
Handle to a message queue.
Handle to the interface scanner.
The notification context is the key datastructure for a convenience API used for transmission of noti...
Handle to the peerinfo service.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_CRYPTO_EddsaPublicKey public_key
Entry in list of pending tasks.
Handle to a client that is connected to a service.
Time for absolute times used by GNUnet, in microseconds.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
Each plugin is required to return a pointer to a struct of this type as the return value from its ent...
void * cls
Closure for all of the callbacks.
GNUNET_TRANSPORT_DisconnectSessionFunction disconnect_session
Function that can be used to force the plugin to disconnect from the given peer and cancel all previo...
GNUNET_TRANSPORT_AddressPrettyPrinter address_pretty_printer
Function to pretty-print addresses.
Information about a plugin's session.
Context we use when performing a blacklist check.
struct GNUNET_SCHEDULER_Task * task
Current task performing the check.
struct GST_BlacklistCheck * prev
This is a linked list.
GST_BlacklistTestContinuation cont
Continuation to call with the result.
struct GNUNET_ATS_Session * session
Session for GST_blacklist_abort_matching(), can be NULL.
struct GNUNET_PeerIdentity peer
Peer being checked.
struct GNUNET_HELLO_Address * address
Address for GST_blacklist_abort_matching(), can be NULL.
struct TransportClient * bl_pos
Our current position in the blacklisters list.
void * cont_cls
Closure for cont.
struct GST_BlacklistCheck * next
This is a linked list.
Message used to notify the transport API about a message received from the network.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_RECV.
struct GNUNET_PeerIdentity peer
Which peer sent the message?
Closure for call_iterator().
int all
GNUNET_YES if id should be ignored because we want all peers.
struct GNUNET_PeerIdentity id
Which peers do we care about?
struct TransportClient * tc
Context to use for the transmission.
Message used to notify the transport service about a message to be transmitted to another peer.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND.
struct GNUNET_PeerIdentity peer
Which peer should receive the message?
struct GNUNET_TIME_RelativeNBO timeout
Allowed delay.
Message from the transport service to the library containing information about a peer.
struct GNUNET_TIME_AbsoluteNBO state_timeout
Timeout for the state this peer is in.
Message from the library to the transport service asking for binary addresses known for a peer.
Message used to notify the transport API that it can send another message to the transport service.
uint16_t success
GNUNET_OK if the transmission succeeded, GNUNET_SYSERR if it failed (i.e.
uint16_t bytes_msg
Size of message sent.
uint32_t bytes_physical
Size of message sent over wire.
struct GNUNET_PeerIdentity peer
Which peer can send more now?
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK.
Closure for handle_send_transmit_continuation()
unsigned long long uuid
Unique ID, for logging.
struct GNUNET_PeerIdentity target
Peer that was the target.
int down
Set to GNUNET_YES if the connection for target goes down and we thus must no longer send the GNUNET_M...
struct TransportClient * tc
Client that made the request.
struct GNUNET_TIME_Absolute send_time
At what time did we receive the message?
Message from the transport service to the library asking to check if both processes agree about this ...
Closure for test_connection_ok().
struct TransportClient * tc
Handle to the blacklisting client we need to ask.
int first
Is this the first neighbour we're checking?
Message from the library to the transport service asking for binary addresses known for a peer.
Client connected to the transport service.
enum ClientType type
What type of client is this?
struct GST_BlacklistCheck * bc
Blacklist check that we're currently performing (or NULL if we're performing one that has been cancel...
struct GNUNET_MQ_Handle * mq
Message queue to the client.
int waiting_for_reply
Set to GNUNET_YES if we're currently waiting for a reply.
struct TransportClient * next
Kept in a DLL.
struct TransportClient::@69::@70 blacklist
Additional details if type is CT_BLACKLIST.
struct GNUNET_SERVICE_Client * client
Handle to the client.
struct TransportClient * prev
Kept in a DLL.
struct GNUNET_PeerIdentity monitor_peer
Peer identity to monitor the addresses of.
int call_receive_done
GNUNET_YES if we have to call receive_done for this client
union TransportClient::@63 details
Transport-level connection status update.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
common internal definitions for transport service
#define DEFAULT_MAX_FDS
What's the maximum number of sockets transport uses for validation and neighbors.