Transport plugin using QUIC. More...
#include "gnunet_common.h"
#include "gnunet_util_lib.h"
#include "gnunet_core_service.h"
#include "quiche.h"
#include "platform.h"
#include "gnunet_protocols.h"
#include "gnunet_signatures.h"
#include "gnunet_constants.h"
#include "gnunet_statistics_service.h"
#include "gnunet_transport_application_service.h"
#include "gnunet_transport_communication_service.h"
#include "gnunet_nat_service.h"
#include "stdint.h"
#include "inttypes.h"
Go to the source code of this file.
Data Structures | |
struct | PeerAddress |
Information we track per peer we have recently been in contact with. More... | |
struct | quic_conn |
QUIC connection object. More... | |
struct | QUIC_header |
QUIC_header is used to store information received from an incoming QUIC packet. More... | |
Macros | |
#define | COMMUNICATOR_CONFIG_SECTION "communicator-quic" |
#define | COMMUNICATOR_ADDRESS_PREFIX "quic" |
#define | MAX_DATAGRAM_SIZE 1350 |
#define | LOCAL_CONN_ID_LEN 20 |
#define | MAX_TOKEN_LEN |
#define | CID_LEN sizeof(uint8_t) * QUICHE_MAX_CONN_ID_LEN |
#define | TOKEN_LEN sizeof (uint8_t) * MAX_TOKEN_LEN |
#define | STREAMID_BI 4 |
#define | ADDRESS_VALIDITY_PERIOD GNUNET_TIME_UNIT_HOURS |
How long do we believe our addresses to remain up (before the other peer should revalidate). More... | |
Functions | |
static void | recv_from_streams (struct PeerAddress *peer) |
Given a PeerAddress, receive data from streams after doing connection logic. More... | |
static void | mint_token (const uint8_t *dcid, size_t dcid_len, struct sockaddr_storage *addr, socklen_t addr_len, uint8_t *token, size_t *token_len) |
FIXME: review token generation, assure tokens are generated properly. More... | |
static enum GNUNET_GenericReturnValue | validate_token (const uint8_t *token, size_t token_len, struct sockaddr_storage *addr, socklen_t addr_len, uint8_t *odcid, size_t *odcid_len) |
static struct quic_conn * | create_conn (uint8_t *scid, size_t scid_len, uint8_t *odcid, size_t odcid_len, struct sockaddr *local_addr, socklen_t local_addr_len, struct sockaddr_storage *peer_addr, socklen_t peer_addr_len) |
static void | flush_egress (struct quic_conn *conn) |
static void | reschedule_peer_timeout (struct PeerAddress *peer) |
Increment receiver timeout due to activity. More... | |
static void | peer_destroy (struct PeerAddress *peer) |
Destroys a receiving state due to timeout or shutdown. More... | |
static int | get_peer_delete_it (void *cls, const struct GNUNET_HashCode *key, void *value) |
Iterator over all peers to clean up. More... | |
static void | mq_send_d (struct GNUNET_MQ_Handle *mq, const struct GNUNET_MessageHeader *msg, void *impl_state) |
Signature of functions implementing the sending functionality of a message queue. More... | |
static void | mq_destroy_d (struct GNUNET_MQ_Handle *mq, void *impl_state) |
Signature of functions implementing the destruction of a message queue. More... | |
static void | mq_cancel (struct GNUNET_MQ_Handle *mq, void *impl_state) |
Implementation function that cancels the currently sent message. More... | |
static void | mq_error (void *cls, enum GNUNET_MQ_Error error) |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. More... | |
static struct sockaddr * | udp_address_to_sockaddr (const char *bindto, socklen_t *sock_len) |
Convert UDP bind specification to a struct sockaddr * More... | |
static void | setup_peer_mq (struct PeerAddress *peer) |
Setup the MQ for the peer. More... | |
static char * | sockaddr_to_udpaddr_string (const struct sockaddr *address, socklen_t address_len) |
Taken from: UDP communicator Converts address to the address string format used by this communicator in HELLOs. More... | |
static void | notify_cb (void *cls, const struct GNUNET_PeerIdentity *sender, const struct GNUNET_MessageHeader *msg) |
Function called when the transport service has received a backchannel message for this communicator (!) via a different return path. More... | |
static void | check_timeouts (void *cls) |
Task run to check #receiver_heap and #sender_heap for timeouts. More... | |
static int | mq_init (void *cls, const struct GNUNET_PeerIdentity *peer_id, const char *address) |
Function called by the transport service to initialize a message queue given address information about another peer. More... | |
static void | try_connection_reversal (void *cls, const struct sockaddr *addr, socklen_t addrlen) |
static void | nat_address_cb (void *cls, void **app_ctx, int add_remove, enum GNUNET_NAT_AddressClass ac, const struct sockaddr *addr, socklen_t addrlen) |
Signature of the callback passed to GNUNET_NAT_register() for a function to call whenever our set of 'valid' addresses changes. More... | |
static void | do_shutdown (void *cls) |
Shutdown the QUIC communicator. More... | |
static void | sock_read (void *cls) |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
Setup communicator and launch network interactions. More... | |
int | main (int argc, char *const *argv) |
Variables | |
struct GNUNET_CONTAINER_MultiHashMap * | conn_map |
Map of DCID (uint8_t) -> quic_conn for quickly retrieving connections to other peers. More... | |
struct GNUNET_CONTAINER_MultiHashMap * | addr_map |
Map of sockaddr -> struct PeerAddress. More... | |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
Handle to the config. More... | |
static struct GNUNET_TIME_Relative | rekey_interval |
FIXME undocumented. More... | |
static struct GNUNET_NETWORK_Handle * | udp_sock |
FIXME undocumented. More... | |
static struct GNUNET_SCHEDULER_Task * | read_task |
FIXME undocumented. More... | |
static struct GNUNET_TRANSPORT_CommunicatorHandle * | ch |
FIXME undocumented. More... | |
static struct GNUNET_TRANSPORT_ApplicationHandle * | ah |
FIXME undocumented. More... | |
static int | have_v6_socket |
FIXME undocumented. More... | |
static uint16_t | my_port |
FIXME undocumented. More... | |
static unsigned long long | rekey_max_bytes |
FIXME undocumented. More... | |
static quiche_config * | config = NULL |
FIXME undocumented. More... | |
struct GNUNET_PeerIdentity | my_identity |
Our peer identity. More... | |
static struct GNUNET_CRYPTO_EddsaPrivateKey * | my_private_key |
Our private key. More... | |
static struct GNUNET_NAT_Handle * | nat |
Connection to NAT service. More... | |
static struct GNUNET_SCHEDULER_Task * | timeout_task |
ID of timeout task. More... | |
static struct GNUNET_NT_InterfaceScanner * | is |
Network scanner to determine network types. More... | |
static struct GNUNET_STATISTICS_Handle * | stats |
For logging statistics. More... | |
Transport plugin using QUIC.
TODO:
Definition in file gnunet-communicator-quic.c.
#define COMMUNICATOR_CONFIG_SECTION "communicator-quic" |
Definition at line 52 of file gnunet-communicator-quic.c.
#define COMMUNICATOR_ADDRESS_PREFIX "quic" |
Definition at line 53 of file gnunet-communicator-quic.c.
#define MAX_DATAGRAM_SIZE 1350 |
Definition at line 54 of file gnunet-communicator-quic.c.
#define LOCAL_CONN_ID_LEN 20 |
Definition at line 59 of file gnunet-communicator-quic.c.
#define MAX_TOKEN_LEN |
Definition at line 60 of file gnunet-communicator-quic.c.
#define CID_LEN sizeof(uint8_t) * QUICHE_MAX_CONN_ID_LEN |
Definition at line 64 of file gnunet-communicator-quic.c.
#define TOKEN_LEN sizeof (uint8_t) * MAX_TOKEN_LEN |
Definition at line 65 of file gnunet-communicator-quic.c.
#define STREAMID_BI 4 |
Definition at line 70 of file gnunet-communicator-quic.c.
#define ADDRESS_VALIDITY_PERIOD GNUNET_TIME_UNIT_HOURS |
How long do we believe our addresses to remain up (before the other peer should revalidate).
Definition at line 76 of file gnunet-communicator-quic.c.
|
static |
Given a PeerAddress, receive data from streams after doing connection logic.
ASSUMES: connection is established to peer
FIXME: Do not use implicit booleans. Use GNUNET_YES, GNUNET_NO, GNUNET_SYSERR and check for that.
Initial packet should contain peerid if they are the initiator
Parse messages to pass to communicator
Check for leftover bytes
FIXME: comment useless fin
Definition at line 302 of file gnunet-communicator-quic.c.
References ADDRESS_VALIDITY_PERIOD, ch, PeerAddress::conn, quic_conn::conn, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_TRANSPORT_communicator_receive(), GNUNET_YES, PeerAddress::id_rcvd, PeerAddress::is_receiver, pid, GNUNET_MessageHeader::size, and PeerAddress::target.
Referenced by sock_read().
|
static |
FIXME: review token generation, assure tokens are generated properly.
doxygen
Definition at line 406 of file gnunet-communicator-quic.c.
References GNUNET_memcpy.
Referenced by sock_read().
|
static |
Definition at line 419 of file gnunet-communicator-quic.c.
References GNUNET_NO, and GNUNET_OK.
Referenced by sock_read().
|
static |
Definition at line 453 of file gnunet-communicator-quic.c.
References config, quic_conn::conn, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_memcpy, GNUNET_new, local_addr, and LOCAL_CONN_ID_LEN.
Referenced by sock_read().
|
static |
Definition at line 492 of file gnunet-communicator-quic.c.
References quic_conn::conn, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NETWORK_socket_sendto(), MAX_DATAGRAM_SIZE, and udp_sock.
Referenced by mq_init(), mq_send_d(), and sock_read().
|
static |
Increment receiver timeout due to activity.
receiver | address for which the timeout should be rescheduled |
Definition at line 535 of file gnunet-communicator-quic.c.
References GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, GNUNET_TIME_relative_to_absolute(), and PeerAddress::timeout.
Referenced by mq_send_d().
|
static |
Destroys a receiving state due to timeout or shutdown.
receiver | entity to close down |
Remove peer from hashmap
Definition at line 550 of file gnunet-communicator-quic.c.
References addr_map, PeerAddress::address, PeerAddress::address_len, PeerAddress::conn, quic_conn::conn, PeerAddress::d_qh, PeerAddress::foreign_addr, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_i2s(), GNUNET_log, GNUNET_NO, GNUNET_STATISTICS_set(), GNUNET_TRANSPORT_communicator_mq_del(), GNUNET_YES, PeerAddress::peer_destroy_called, stats, and PeerAddress::target.
Referenced by get_peer_delete_it(), mq_destroy_d(), mq_error(), mq_send_d(), and sock_read().
|
static |
Iterator over all peers to clean up.
cls | NULL |
key | peer->address |
value | the peer to destroy |
Definition at line 596 of file gnunet-communicator-quic.c.
References GNUNET_OK, key, peer_destroy(), and value.
Referenced by do_shutdown().
|
static |
Signature of functions implementing the sending functionality of a message queue.
mq | the message queue |
msg | the message to send |
impl_state | our struct PeerAddress |
Definition at line 617 of file gnunet-communicator-quic.c.
References PeerAddress::conn, quic_conn::conn, PeerAddress::d_mq, PeerAddress::d_mtu, flush_egress(), GNUNET_assert, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_MQ_impl_send_continue(), GNUNET_YES, mq, msg, peer_destroy(), PeerAddress::peer_destroy_called, reschedule_peer_timeout(), and GNUNET_MessageHeader::size.
Referenced by setup_peer_mq().
|
static |
Signature of functions implementing the destruction of a message queue.
Implementations must not free mq, but should take care of impl_state.
mq | the message queue to destroy |
impl_state | our struct PeerAddress |
Definition at line 674 of file gnunet-communicator-quic.c.
References PeerAddress::d_mq, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_YES, mq, peer_destroy(), and PeerAddress::peer_destroy_called.
Referenced by setup_peer_mq().
|
static |
Implementation function that cancels the currently sent message.
mq | message queue |
impl_state | our struct PeerAddress |
Definition at line 695 of file gnunet-communicator-quic.c.
References GNUNET_assert.
Referenced by setup_peer_mq().
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
cls | our struct ReceiverAddress |
error | error code |
Definition at line 712 of file gnunet-communicator-quic.c.
References GNUNET_ERROR_TYPE_ERROR, GNUNET_i2s(), GNUNET_log, peer_destroy(), and PeerAddress::target.
Referenced by setup_peer_mq().
|
static |
Convert UDP bind specification to a struct sockaddr *
bindto | bind specification to convert | |
[out] | sock_len | set to the length of the address |
Definition at line 732 of file gnunet-communicator-quic.c.
References cfg, COMMUNICATOR_CONFIG_SECTION, dummy, GNUNET_CONFIGURATION_get_value_yesno(), GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_memdup, GNUNET_NETWORK_test_pf(), GNUNET_NO, GNUNET_strdup, GNUNET_YES, port, and start.
Referenced by mq_init(), run(), and sock_read().
|
static |
Setup the MQ for the peer.
If a queue exists, the existing one is destroyed. Then the MTU is recalculated and a fresh queue is initialized.
peer | peer to setup MQ for |
Definition at line 867 of file gnunet-communicator-quic.c.
References PeerAddress::address, ch, PeerAddress::d_mq, PeerAddress::d_mtu, PeerAddress::d_qh, PeerAddress::foreign_addr, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MQ_queue_for_callbacks(), GNUNET_TRANSPORT_communicator_mq_add(), GNUNET_TRANSPORT_CS_OUTBOUND, GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, mq_cancel(), mq_destroy_d(), mq_error(), mq_send_d(), PeerAddress::nt, and PeerAddress::target.
Referenced by sock_read().
|
static |
Taken from: UDP communicator Converts address to the address string format used by this communicator in HELLOs.
address | the address to convert, must be AF_INET or AF_INET6. |
address_len | number of bytes in address |
Definition at line 928 of file gnunet-communicator-quic.c.
References address, COMMUNICATOR_ADDRESS_PREFIX, GNUNET_a2s(), GNUNET_asprintf(), GNUNET_assert, and ret.
Referenced by mq_init(), and sock_read().
|
static |
Function called when the transport service has received a backchannel message for this communicator (!) via a different return path.
Should be an acknowledgement.
cls | closure, NULL |
sender | which peer sent the notification |
msg | payload |
Definition at line 966 of file gnunet-communicator-quic.c.
Referenced by run().
|
static |
Task run to check #receiver_heap and #sender_heap for timeouts.
cls | unused, NULL |
Definition at line 996 of file gnunet-communicator-quic.c.
|
static |
Function called by the transport service to initialize a message queue given address information about another peer.
If and when the communication channel is established, the communicator must call GNUNET_TRANSPORT_communicator_mq_add() to notify the service that the channel is now up. It is the responsibility of the communicator to manage sane retries and timeouts for any peer/address combination provided by the transport service. Timeouts and retries do not need to be signalled to the transport service.
cls | closure |
peer | identity of the other peer |
address | where to send the message, human-readable communicator-specific format, 0-terminated, UTF-8 |
If we already have a queue with this peer, ignore
Insert peer into hashmap
Before setting up peer mq, initiate a quic connection to the target (perform handshake w/ quiche)
TODO: handle this
Definition at line 1055 of file gnunet-communicator-quic.c.
References addr_map, address, PeerAddress::address, PeerAddress::address_len, cfg, quic_conn::cid, COMMUNICATOR_ADDRESS_PREFIX, COMMUNICATOR_CONFIG_SECTION, config, PeerAddress::conn, quic_conn::conn, flush_egress(), PeerAddress::foreign_addr, GNUNET_break_op, GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_multihashmap_size(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_QUALITY_STRONG, GNUNET_CRYPTO_random_block(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_log_config_missing(), GNUNET_memcpy, GNUNET_new, GNUNET_NO, GNUNET_NT_scanner_get_type(), GNUNET_OK, GNUNET_STATISTICS_set(), GNUNET_SYSERR, GNUNET_TIME_relative_to_absolute(), GNUNET_YES, PeerAddress::id_rcvd, is, PeerAddress::is_receiver, local_addr, LOCAL_CONN_ID_LEN, PeerAddress::nt, peer_id, sockaddr_to_udpaddr_string(), stats, PeerAddress::target, PeerAddress::timeout, and udp_address_to_sockaddr().
Referenced by run().
|
static |
Definition at line 1156 of file gnunet-communicator-quic.c.
References GNUNET_ERROR_TYPE_INFO, and GNUNET_log.
Referenced by run().
|
static |
Signature of the callback passed to GNUNET_NAT_register() for a function to call whenever our set of 'valid' addresses changes.
cls | closure |
app_ctx[in,out] | location where the app can store stuff on add and retrieve it on remove |
add_remove | GNUNET_YES to add a new public IP address, GNUNET_NO to remove a previous (now invalid) one |
ac | address class the address belongs to |
addr | either the previous or the new public IP address |
addrlen | actual length of the addr |
Definition at line 1180 of file gnunet-communicator-quic.c.
References ai, ch, COMMUNICATOR_ADDRESS_PREFIX, GNUNET_a2s(), GNUNET_asprintf(), GNUNET_free, GNUNET_NT_scanner_get_type(), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_TRANSPORT_communicator_address_add(), GNUNET_TRANSPORT_communicator_address_remove(), GNUNET_YES, is, and nt.
Referenced by run().
|
static |
Shutdown the QUIC communicator.
cls | NULL (always) |
Definition at line 1222 of file gnunet-communicator-quic.c.
References addr_map, ah, ch, config, get_peer_delete_it(), GNUNET_break, GNUNET_CONTAINER_multihashmap_destroy(), GNUNET_CONTAINER_multihashmap_iterate(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_NETWORK_socket_close(), GNUNET_OK, GNUNET_SCHEDULER_cancel(), GNUNET_TRANSPORT_application_done(), GNUNET_TRANSPORT_communicator_disconnect(), my_private_key, read_task, timeout_task, and udp_sock.
Referenced by run().
|
static |
Get local_addr, in_len for quiche
FIXME: hashing address string vs ip/port. It is not ideal that we hash the string, instead of the binary representation, but for now it is certainly less code. Note that simply hashing the sockaddr does NOT work because the the struct is not portable.
Create new PeerAddress (receiver) with id_rcvd = false
TODO: after connection established
Parse QUIC info
New QUIC connection with peer
FIXME variables are redeclared often. Refactor either to declare variables once in the beginning or refactor into method.
Write a version negotiation packet to "out"
Send our PeerIdentity if the connection is established now
After this, we should be all good to send/recv data
TODO: Should we use a list instead of hashmap? Overhead for hashing function, O(1) retrieval vs O(n) iteration with n=30?
TODO: Is iteration necessary as in the quiche server example?
Definition at line 1267 of file gnunet-communicator-quic.c.
References addr_map, PeerAddress::address, PeerAddress::address_len, cfg, COMMUNICATOR_CONFIG_SECTION, PeerAddress::conn, quic_conn::conn, create_conn(), QUIC_header::dcid, QUIC_header::dcid_len, flush_egress(), PeerAddress::foreign_addr, GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_QUALITY_STRONG, GNUNET_CRYPTO_random_block(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_log_config_missing(), GNUNET_log_strerror, GNUNET_memdup, GNUNET_NETWORK_socket_recvfrom(), GNUNET_NETWORK_socket_sendto(), GNUNET_new, GNUNET_NO, GNUNET_OK, GNUNET_SCHEDULER_add_read_net(), GNUNET_SYSERR, GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, PeerAddress::id_rcvd, PeerAddress::id_sent, PeerAddress::is_receiver, local_addr, LOCAL_CONN_ID_LEN, MAX_DATAGRAM_SIZE, mint_token(), my_identity, QUIC_header::odcid, QUIC_header::odcid_len, peer_destroy(), read_task, recv_from_streams(), QUIC_header::scid, QUIC_header::scid_len, setup_peer_mq(), sock_read(), sockaddr_to_udpaddr_string(), stats, STREAMID_BI, QUIC_header::token, QUIC_header::token_len, QUIC_header::type, udp_address_to_sockaddr(), udp_sock, validate_token(), and QUIC_header::version.
Referenced by run(), and sock_read().
|
static |
Setup communicator and launch network interactions.
cls | NULL (always) |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
c | configuration |
Setup QUICHE configuration
TODO: configure TLS cert
Get our public key for initial packet
Definition at line 1587 of file gnunet-communicator-quic.c.
References _, addr_map, ah, cfg, ch, COMMUNICATOR_ADDRESS_PREFIX, COMMUNICATOR_CONFIG_SECTION, config, do_shutdown(), GNUNET_a2s(), GNUNET_break, GNUNET_CONFIGURATION_get_value_string(), GNUNET_CONTAINER_multihashmap_create(), GNUNET_CRYPTO_eddsa_key_create_from_configuration(), GNUNET_CRYPTO_eddsa_key_get_public(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_free, GNUNET_log, GNUNET_log_config_missing(), GNUNET_log_from_nocheck(), GNUNET_log_strerror, GNUNET_log_strerror_file, GNUNET_NAT_register(), GNUNET_NETWORK_get_fd(), GNUNET_NETWORK_socket_bind(), GNUNET_NETWORK_socket_close(), GNUNET_NETWORK_socket_create(), GNUNET_NO, GNUNET_NT_scanner_init(), GNUNET_OK, GNUNET_SCHEDULER_add_read_net(), GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_TRANSPORT_application_init(), GNUNET_TRANSPORT_CC_RELIABLE, GNUNET_TRANSPORT_communicator_connect(), GNUNET_YES, have_v6_socket, is, mq_init(), my_identity, my_port, my_private_key, nat, nat_address_cb(), notify_cb(), GNUNET_PeerIdentity::public_key, read_task, sock_read(), try_connection_reversal(), udp_address_to_sockaddr(), and udp_sock.
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
Definition at line 1771 of file gnunet-communicator-quic.c.
References _, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_log_from_nocheck(), GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), options, ret, and run().
struct GNUNET_CONTAINER_MultiHashMap* conn_map |
Map of DCID (uint8_t) -> quic_conn for quickly retrieving connections to other peers.
Definition at line 81 of file gnunet-communicator-quic.c.
struct GNUNET_CONTAINER_MultiHashMap* addr_map |
Map of sockaddr -> struct PeerAddress.
Definition at line 86 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), mq_init(), peer_destroy(), run(), and sock_read().
|
static |
Handle to the config.
Definition at line 91 of file gnunet-communicator-quic.c.
Referenced by mq_init(), run(), sock_read(), and udp_address_to_sockaddr().
|
static |
FIXME undocumented.
Definition at line 96 of file gnunet-communicator-quic.c.
|
static |
FIXME undocumented.
Definition at line 101 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), flush_egress(), run(), and sock_read().
|
static |
FIXME undocumented.
Definition at line 106 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), run(), and sock_read().
|
static |
FIXME undocumented.
Definition at line 111 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), nat_address_cb(), recv_from_streams(), run(), and setup_peer_mq().
|
static |
FIXME undocumented.
Definition at line 116 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), and run().
|
static |
|
static |
|
static |
FIXME undocumented.
Definition at line 131 of file gnunet-communicator-quic.c.
|
static |
FIXME undocumented.
Definition at line 136 of file gnunet-communicator-quic.c.
Referenced by create_conn(), do_shutdown(), mq_init(), and run().
struct GNUNET_PeerIdentity my_identity |
Our peer identity.
Definition at line 141 of file gnunet-communicator-quic.c.
Referenced by core_init(), core_init_cb(), GDS_helper_put_message_get_size(), get_result_iterator(), peer_init_handler(), run(), and sock_read().
|
static |
Our private key.
Definition at line 146 of file gnunet-communicator-quic.c.
Referenced by do_shutdown(), and run().
|
static |
Connection to NAT service.
Definition at line 151 of file gnunet-communicator-quic.c.
Referenced by run().
|
static |
ID of timeout task.
Definition at line 251 of file gnunet-communicator-quic.c.
Referenced by do_shutdown().
|
static |
Network scanner to determine network types.
Definition at line 256 of file gnunet-communicator-quic.c.
Referenced by mq_init(), nat_address_cb(), and run().
|
static |
For logging statistics.
Definition at line 261 of file gnunet-communicator-quic.c.
Referenced by mq_init(), peer_destroy(), and sock_read().