globals
More...
#include "gnunet_util_lib.h"
#include "gnunet_statistics_service.h"
#include "gnunet_ats_service.h"
#include "gnunet_transport_service.h"
Go to the source code of this file.
|
typedef void(* | GNUNET_TRANSPORT_NeighbourChangeCallback) (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 to call when a peer's address has changed. More...
|
|
typedef 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. More...
|
|
|
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). More...
|
|
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. More...
|
|
void | GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address, struct GNUNET_ATS_Session *session) |
| Abort blacklist if address and session match. More...
|
|
void | GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc) |
| Cancel a blacklist check. More...
|
|
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. More...
|
|
void | GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop) |
| Broadcast the given message to all of our clients. More...
|
|
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. More...
|
|
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. More...
|
|
globals
- Author
- Christian Grothoff
Definition in file gnunet-service-transport.h.
◆ VERBOSE_VALIDATION
◆ GNUNET_TRANSPORT_NeighbourChangeCallback
Function to call when a peer's address has changed.
- Parameters
-
cls | closure |
peer | peer this update is about, |
address | address, NULL for disconnect notification |
Definition at line 84 of file gnunet-service-transport.h.
◆ GST_BlacklistTestContinuation
typedef 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.
- Parameters
-
cls | closure |
peer | identity of peer that was tested |
address | address associated with the request |
session | session associated with the request |
result | GNUNET_OK if the connection is allowed, GNUNET_NO if not, GNUNET_SYSERR if operation was aborted |
Definition at line 111 of file gnunet-service-transport.h.
◆ GST_blacklist_add_peer()
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).
- Parameters
-
peer | peer to blacklist |
transport_name | transport to blacklist for this peer, NULL for all |
◆ GST_blacklist_test_allowed()
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.
- Parameters
-
peer | the identity of the peer to test |
transport_name | name of the transport to test, never NULL |
cont | function to call with result |
cont_cls | closure for cont |
address | address to pass back to cont, can be NULL |
session | session to pass back to cont, can be NULL |
- Returns
- handle to the blacklist check, NULL if the decision was made instantly and cont was already called
◆ GST_blacklist_abort_matching()
void GST_blacklist_abort_matching |
( |
const struct GNUNET_HELLO_Address * |
address, |
|
|
struct GNUNET_ATS_Session * |
session |
|
) |
| |
Abort blacklist if address and session match.
- Parameters
-
address | address used to abort matching checks |
session | session used to abort matching checks |
◆ GST_blacklist_test_cancel()
void GST_blacklist_test_cancel |
( |
struct GST_BlacklistCheck * |
bc | ) |
|
Cancel a blacklist check.
- Parameters
-
◆ GST_receive_callback()
Function called by the transport for each received message.
- Parameters
-
cls | closure, const char* with the name of the plugin we received the message from |
address | address and (claimed) identity of the other peer |
session | identifier used for this session (NULL for plugins that do not offer bi-directional communication to the sender using the same "connection") |
message | the message, NULL if we only care about learning about the delay until we should receive again |
- Returns
- how long the plugin should wait until receiving more data (plugins that do not support this, can ignore the return value)
◆ GST_clients_broadcast()
Broadcast the given message to all of our clients.
- Parameters
-
msg | message to broadcast |
may_drop | GNUNET_YES if the message can be dropped / is payload |
◆ GST_clients_broadcast_peer_notification()
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.
- Parameters
-
peer | peer this update is about (never NULL) |
address | address, NULL on disconnect |
state | the current state of the peer |
state_timeout | the time out for the state |
◆ GST_clients_broadcast_disconnect()
Notify all clients about a disconnect, and cancel pending SEND_OK messages for this peer.
- Parameters
-
peer | peer that disconnected |
◆ GST_stats
◆ GST_cfg
◆ GST_my_identity
◆ GST_peerinfo
struct GNUNET_PEERINFO_Handle* GST_peerinfo |
|
extern |
Handle to peerinfo service.
◆ GST_my_private_key
◆ GST_ats
struct GNUNET_ATS_SchedulingHandle* GST_ats |
|
extern |
◆ GST_ats_connect
struct GNUNET_ATS_ConnectivityHandle* GST_ats_connect |
|
extern |
◆ GST_is
Interface scanner determines our LAN address range(s).