Handle for a queue. More...
Data Fields | |
struct GNUNET_PeerIdentity | target |
To whom are we talking to. More... | |
struct GNUNET_NETWORK_Handle * | listen_sock |
Listen socket. More... | |
struct GNUNET_NETWORK_Handle * | sock |
socket that we transmit all data with on this queue More... | |
gcry_cipher_hd_t | in_cipher |
cipher for decryption of incoming data. More... | |
gcry_cipher_hd_t | out_cipher |
cipher for encryption of outgoing data. More... | |
struct GNUNET_HashCode | in_hmac |
Shared secret for HMAC verification on incoming data. More... | |
struct GNUNET_HashCode | out_hmac |
Shared secret for HMAC generation on outgoing data, ratcheted after each operation. More... | |
struct GNUNET_SCHEDULER_Task * | read_task |
ID of read task for this connection. More... | |
struct GNUNET_SCHEDULER_Task * | write_task |
ID of write task for this connection. More... | |
struct sockaddr * | address |
Address of the other peer. More... | |
uint64_t | rekey_left_bytes |
How many more bytes may we sent with the current out_cipher before we should rekey? More... | |
struct GNUNET_TIME_Absolute | rekey_time |
Until what time may we sent with the current out_cipher before we should rekey? More... | |
socklen_t | address_len |
Length of the address. More... | |
struct GNUNET_MQ_Handle * | mq |
Message queue we are providing for the ch. More... | |
struct GNUNET_TRANSPORT_QueueHandle * | qh |
handle for this queue with the ch. More... | |
unsigned long long | bytes_in_queue |
Number of bytes we currently have in our write queue. More... | |
char | cread_buf [(2 *64 *1024+sizeof(struct TCPBox))] |
Buffer for reading ciphertext from network into. More... | |
char | cwrite_buf [(2 *64 *1024+sizeof(struct TCPBox))] |
buffer for writing ciphertext to network. More... | |
char | pread_buf [UINT16_MAX+1+sizeof(struct TCPBox)] |
Plaintext buffer for decrypted plaintext. More... | |
char | pwrite_buf [UINT16_MAX+1+sizeof(struct TCPBox)] |
Plaintext buffer for messages to be encrypted. More... | |
size_t | cread_off |
At which offset in the ciphertext read buffer should we append more ciphertext for transmission next? More... | |
size_t | cwrite_off |
At which offset in the ciphertext write buffer should we append more ciphertext from reading next? More... | |
size_t | pread_off |
At which offset in the plaintext input buffer should we append more plaintext from decryption next? More... | |
size_t | pwrite_off |
At which offset in the plaintext output buffer should we append more plaintext for encryption next? More... | |
struct GNUNET_TIME_Absolute | timeout |
Timeout for this queue. More... | |
unsigned int | backpressure |
How may messages did we pass from this queue to CORE for which we have yet to receive an acknoweldgement that CORE is done with them? If "large" (or even just non-zero), we should throttle reading to provide flow control. More... | |
enum GNUNET_NetworkType | nt |
Which network type does this queue use? More... | |
enum GNUNET_TRANSPORT_ConnectionStatus | cs |
The connection status of this queue. More... | |
int | mq_awaits_continue |
Is MQ awaiting a GNUNET_MQ_impl_send_continue() call? More... | |
int | finishing |
Did we enqueue a finish message and are closing down the queue? More... | |
int | destroyed |
Did we technically destroy this queue, but kept the allocation around because of backpressure not being zero yet? Used simply to delay the final GNUNET_free() operation until core_read_finished_cb() has been called. More... | |
int | rekeyed |
GNUNET_YES if we just rekeyed and must thus possibly re-decrypt ciphertext. More... | |
struct GNUNET_TIME_AbsoluteNBO | rekey_monotonic_time |
Monotonic time value for rekey message. More... | |
struct GNUNET_TIME_AbsoluteNBO | handshake_monotonic_time |
Monotonic time value for handshake message. More... | |
struct GNUNET_TIME_AbsoluteNBO | handshake_ack_monotonic_time |
Monotonic time value for handshake ack message. More... | |
struct GNUNET_CRYPTO_ChallengeNonceP | challenge |
Challenge value used to protect against replay attack, if there is no stored monotonic time value. More... | |
struct GNUNET_CRYPTO_ChallengeNonceP | challenge_received |
Challenge value received. More... | |
struct GNUNET_PEERSTORE_IterateContext * | rekey_monotime_get |
Iteration Context for retrieving the monotonic time send with key for rekeying. More... | |
struct GNUNET_PEERSTORE_IterateContext * | handshake_monotime_get |
Iteration Context for retrieving the monotonic time send with the handshake. More... | |
struct GNUNET_PEERSTORE_IterateContext * | handshake_ack_monotime_get |
Iteration Context for retrieving the monotonic time send with the handshake ack. More... | |
struct GNUNET_PEERSTORE_StoreContext * | rekey_monotime_sc |
Store Context for retrieving the monotonic time send with key for rekeying. More... | |
struct GNUNET_PEERSTORE_StoreContext * | handshake_monotime_sc |
Store Context for retrieving the monotonic time send with the handshake. More... | |
struct GNUNET_PEERSTORE_StoreContext * | handshake_ack_monotime_sc |
Store Context for retrieving the monotonic time send with the handshake ack. More... | |
size_t | unverified_size |
Size of data received without KX challenge played back. More... | |
int | initial_core_kx_done |
Has the initial (core) handshake already happened? More... | |
struct Queue * | next |
Queues with pending messages (!) are kept in a DLL. More... | |
struct Queue * | prev |
Queues with pending messages (!) are kept in a DLL. More... | |
struct sockaddr_un * | address |
Address of the other peer. More... | |
struct UNIXMessage * | msg |
Message currently scheduled for transmission, non-NULL if and only if this queue is in the queue_head DLL. More... | |
struct GNUNET_SCHEDULER_Task * | timeout_task |
Queue timeout task. More... | |
struct Queue * | next_neighbour |
Kept in a MDLL. More... | |
struct Queue * | prev_neighbour |
Kept in a MDLL. More... | |
struct Queue * | prev_client |
Kept in a MDLL. More... | |
struct Queue * | next_client |
Kept in a MDLL. More... | |
struct PendingAcknowledgement * | pa_head |
Head of DLL of PAs that used this queue. More... | |
struct PendingAcknowledgement * | pa_tail |
Tail of DLL of PAs that used this queue. More... | |
struct QueueEntry * | queue_head |
Head of DLL of unacked transmission requests. More... | |
struct QueueEntry * | queue_tail |
End of DLL of unacked transmission requests. More... | |
struct Neighbour * | neighbour |
Which neighbour is this queue for? More... | |
struct TransportClient * | tc |
Which communicator offers this queue? More... | |
const char * | address |
Address served by the queue. More... | |
unsigned int | unlimited_length |
Is this queue of unlimited length. More... | |
struct GNUNET_SCHEDULER_Task * | transmit_task |
Task scheduled for the time when this queue can (likely) transmit the next message. More... | |
struct GNUNET_TIME_Absolute | validated_until |
How long do we consider this address to be valid? In the past or zero if we have not yet validated it. More... | |
struct PerformanceData | pd |
Performance data for this queue. More... | |
uint64_t | mid_gen |
Message ID generator for transmissions on this queue to the communicator. More... | |
uint32_t | qid |
Unique identifier of this queue with the communicator. More... | |
uint32_t | mtu |
Maximum transmission unit supported by this queue. More... | |
uint32_t | num_msg_pending |
Messages pending. More... | |
uint32_t | num_bytes_pending |
Bytes pending. More... | |
unsigned int | queue_length |
Length of the DLL starting at queue_head. More... | |
uint64_t | q_capacity |
Capacity of the queue. More... | |
uint32_t | priority |
Queue priority. More... | |
int | idle |
Set to GNUNET_YES if this queue is idle waiting for some virtual link to give it a pending message. More... | |
Handle for a queue.
A queue is a message queue provided by a communicator via which we can reach a particular neighbour.
Definition at line 433 of file gnunet-communicator-tcp.c.
struct GNUNET_PeerIdentity Queue::target |
To whom are we talking to.
Definition at line 427 of file gnunet-communicator-tcp.c.
Referenced by get_queue_delete_it(), and setup_queue().
struct GNUNET_NETWORK_Handle* Queue::listen_sock |
Listen socket.
Definition at line 443 of file gnunet-communicator-tcp.c.
struct GNUNET_NETWORK_Handle* Queue::sock |
socket that we transmit all data with on this queue
Definition at line 448 of file gnunet-communicator-tcp.c.
Referenced by mq_init().
gcry_cipher_hd_t Queue::in_cipher |
cipher for decryption of incoming data.
Definition at line 453 of file gnunet-communicator-tcp.c.
gcry_cipher_hd_t Queue::out_cipher |
cipher for encryption of outgoing data.
Definition at line 458 of file gnunet-communicator-tcp.c.
struct GNUNET_HashCode Queue::in_hmac |
Shared secret for HMAC verification on incoming data.
Definition at line 458 of file gnunet-communicator-tcp.c.
struct GNUNET_HashCode Queue::out_hmac |
Shared secret for HMAC generation on outgoing data, ratcheted after each operation.
Definition at line 458 of file gnunet-communicator-tcp.c.
struct GNUNET_SCHEDULER_Task* Queue::read_task |
ID of read task for this connection.
Definition at line 474 of file gnunet-communicator-tcp.c.
struct GNUNET_SCHEDULER_Task* Queue::write_task |
ID of write task for this connection.
Definition at line 479 of file gnunet-communicator-tcp.c.
struct sockaddr* Queue::address |
Address of the other peer.
Definition at line 484 of file gnunet-communicator-tcp.c.
uint64_t Queue::rekey_left_bytes |
How many more bytes may we sent with the current out_cipher before we should rekey?
Definition at line 490 of file gnunet-communicator-tcp.c.
struct GNUNET_TIME_Absolute Queue::rekey_time |
Until what time may we sent with the current out_cipher before we should rekey?
Definition at line 490 of file gnunet-communicator-tcp.c.
socklen_t Queue::address_len |
Length of the address.
Definition at line 501 of file gnunet-communicator-tcp.c.
struct GNUNET_MQ_Handle * Queue::mq |
Message queue we are providing for the ch.
Definition at line 506 of file gnunet-communicator-tcp.c.
struct GNUNET_TRANSPORT_QueueHandle * Queue::qh |
handle for this queue with the ch.
Definition at line 511 of file gnunet-communicator-tcp.c.
unsigned long long Queue::bytes_in_queue |
Number of bytes we currently have in our write queue.
Definition at line 516 of file gnunet-communicator-tcp.c.
char Queue::cread_buf[(2 *64 *1024+sizeof(struct TCPBox))] |
Buffer for reading ciphertext from network into.
Definition at line 521 of file gnunet-communicator-tcp.c.
char Queue::cwrite_buf[(2 *64 *1024+sizeof(struct TCPBox))] |
buffer for writing ciphertext to network.
Definition at line 526 of file gnunet-communicator-tcp.c.
char Queue::pread_buf[UINT16_MAX+1+sizeof(struct TCPBox)] |
Plaintext buffer for decrypted plaintext.
Definition at line 531 of file gnunet-communicator-tcp.c.
char Queue::pwrite_buf[UINT16_MAX+1+sizeof(struct TCPBox)] |
Plaintext buffer for messages to be encrypted.
Definition at line 536 of file gnunet-communicator-tcp.c.
size_t Queue::cread_off |
At which offset in the ciphertext read buffer should we append more ciphertext for transmission next?
Definition at line 542 of file gnunet-communicator-tcp.c.
size_t Queue::cwrite_off |
At which offset in the ciphertext write buffer should we append more ciphertext from reading next?
Definition at line 548 of file gnunet-communicator-tcp.c.
size_t Queue::pread_off |
At which offset in the plaintext input buffer should we append more plaintext from decryption next?
Definition at line 554 of file gnunet-communicator-tcp.c.
size_t Queue::pwrite_off |
At which offset in the plaintext output buffer should we append more plaintext for encryption next?
Definition at line 560 of file gnunet-communicator-tcp.c.
struct GNUNET_TIME_Absolute Queue::timeout |
Timeout for this queue.
Definition at line 560 of file gnunet-communicator-tcp.c.
unsigned int Queue::backpressure |
How may messages did we pass from this queue to CORE for which we have yet to receive an acknoweldgement that CORE is done with them? If "large" (or even just non-zero), we should throttle reading to provide flow control.
See also DEFAULT_MAX_QUEUE_LENGTH and max_queue_length.
Definition at line 574 of file gnunet-communicator-tcp.c.
enum GNUNET_NetworkType Queue::nt |
Which network type does this queue use?
Network type offered by this queue.
Definition at line 574 of file gnunet-communicator-tcp.c.
Referenced by handle_update_queue_message().
enum GNUNET_TRANSPORT_ConnectionStatus Queue::cs |
The connection status of this queue.
Connection status for this queue.
Definition at line 574 of file gnunet-communicator-tcp.c.
Referenced by handle_update_queue_message(), and setup_queue().
int Queue::mq_awaits_continue |
Is MQ awaiting a GNUNET_MQ_impl_send_continue() call?
Definition at line 589 of file gnunet-communicator-tcp.c.
int Queue::finishing |
Did we enqueue a finish message and are closing down the queue?
Definition at line 594 of file gnunet-communicator-tcp.c.
int Queue::destroyed |
Did we technically destroy this queue, but kept the allocation around because of backpressure not being zero yet? Used simply to delay the final GNUNET_free() operation until core_read_finished_cb() has been called.
Definition at line 602 of file gnunet-communicator-tcp.c.
int Queue::rekeyed |
GNUNET_YES if we just rekeyed and must thus possibly re-decrypt ciphertext.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_TIME_AbsoluteNBO Queue::rekey_monotonic_time |
Monotonic time value for rekey message.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_TIME_AbsoluteNBO Queue::handshake_monotonic_time |
Monotonic time value for handshake message.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_TIME_AbsoluteNBO Queue::handshake_ack_monotonic_time |
Monotonic time value for handshake ack message.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_CRYPTO_ChallengeNonceP Queue::challenge |
Challenge value used to protect against replay attack, if there is no stored monotonic time value.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_CRYPTO_ChallengeNonceP Queue::challenge_received |
Challenge value received.
In case of inbound connection we have to remember the value, because we send the challenge back later after we received the GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_CONFIRMATION_ACK.
Definition at line 608 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_IterateContext* Queue::rekey_monotime_get |
Iteration Context for retrieving the monotonic time send with key for rekeying.
Definition at line 638 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_IterateContext* Queue::handshake_monotime_get |
Iteration Context for retrieving the monotonic time send with the handshake.
Definition at line 643 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_IterateContext* Queue::handshake_ack_monotime_get |
Iteration Context for retrieving the monotonic time send with the handshake ack.
Definition at line 648 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_StoreContext* Queue::rekey_monotime_sc |
Store Context for retrieving the monotonic time send with key for rekeying.
Definition at line 653 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_StoreContext* Queue::handshake_monotime_sc |
Store Context for retrieving the monotonic time send with the handshake.
Definition at line 658 of file gnunet-communicator-tcp.c.
struct GNUNET_PEERSTORE_StoreContext* Queue::handshake_ack_monotime_sc |
Store Context for retrieving the monotonic time send with the handshake ack.
Definition at line 663 of file gnunet-communicator-tcp.c.
size_t Queue::unverified_size |
Size of data received without KX challenge played back.
Definition at line 669 of file gnunet-communicator-tcp.c.
int Queue::initial_core_kx_done |
Has the initial (core) handshake already happened?
Definition at line 674 of file gnunet-communicator-tcp.c.
struct Queue* Queue::next |
Queues with pending messages (!) are kept in a DLL.
Definition at line 95 of file gnunet-communicator-unix.c.
struct Queue* Queue::prev |
Queues with pending messages (!) are kept in a DLL.
Definition at line 100 of file gnunet-communicator-unix.c.
struct sockaddr_un* Queue::address |
Address of the other peer.
Definition at line 110 of file gnunet-communicator-unix.c.
struct UNIXMessage* Queue::msg |
Message currently scheduled for transmission, non-NULL if and only if this queue is in the queue_head DLL.
Definition at line 121 of file gnunet-communicator-unix.c.
struct GNUNET_SCHEDULER_Task* Queue::timeout_task |
Queue timeout task.
Definition at line 146 of file gnunet-communicator-unix.c.
struct Queue* Queue::next_neighbour |
struct Queue* Queue::prev_neighbour |
Kept in a MDLL.
Definition at line 1831 of file gnunet-service-tng.c.
struct Queue* Queue::prev_client |
Kept in a MDLL.
Definition at line 1836 of file gnunet-service-tng.c.
struct Queue* Queue::next_client |
Kept in a MDLL.
Definition at line 1841 of file gnunet-service-tng.c.
Referenced by check_for_queue_with_higher_prio(), and handle_update_queue_message().
struct PendingAcknowledgement* Queue::pa_head |
Head of DLL of PAs that used this queue.
Definition at line 1846 of file gnunet-service-tng.c.
struct PendingAcknowledgement* Queue::pa_tail |
Tail of DLL of PAs that used this queue.
Definition at line 1851 of file gnunet-service-tng.c.
struct QueueEntry* Queue::queue_head |
Head of DLL of unacked transmission requests.
Definition at line 1856 of file gnunet-service-tng.c.
struct QueueEntry* Queue::queue_tail |
End of DLL of unacked transmission requests.
Definition at line 1861 of file gnunet-service-tng.c.
struct Neighbour* Queue::neighbour |
Which neighbour is this queue for?
Definition at line 1866 of file gnunet-service-tng.c.
struct TransportClient* Queue::tc |
Which communicator offers this queue?
Definition at line 1871 of file gnunet-service-tng.c.
const char* Queue::address |
Address served by the queue.
Definition at line 1876 of file gnunet-service-tng.c.
unsigned int Queue::unlimited_length |
Is this queue of unlimited length.
Definition at line 1881 of file gnunet-service-tng.c.
Referenced by handle_update_queue_message().
struct GNUNET_SCHEDULER_Task* Queue::transmit_task |
Task scheduled for the time when this queue can (likely) transmit the next message.
Definition at line 1887 of file gnunet-service-tng.c.
struct GNUNET_TIME_Absolute Queue::validated_until |
How long do we consider this address to be valid? In the past or zero if we have not yet validated it.
Can be updated based on challenge-response validations (via address validation logic), or when we receive ACKs that we can definitively map to transmissions via this queue.
Definition at line 1887 of file gnunet-service-tng.c.
struct PerformanceData Queue::pd |
Performance data for this queue.
Definition at line 1887 of file gnunet-service-tng.c.
uint64_t Queue::mid_gen |
Message ID generator for transmissions on this queue to the communicator.
Definition at line 1907 of file gnunet-service-tng.c.
uint32_t Queue::qid |
Unique identifier of this queue with the communicator.
Definition at line 1912 of file gnunet-service-tng.c.
Referenced by handle_update_queue_message().
uint32_t Queue::mtu |
Maximum transmission unit supported by this queue.
Definition at line 1917 of file gnunet-service-tng.c.
Referenced by handle_update_queue_message().
uint32_t Queue::num_msg_pending |
Messages pending.
Definition at line 1922 of file gnunet-service-tng.c.
uint32_t Queue::num_bytes_pending |
Bytes pending.
Definition at line 1927 of file gnunet-service-tng.c.
unsigned int Queue::queue_length |
Length of the DLL starting at queue_head.
Definition at line 1932 of file gnunet-service-tng.c.
uint64_t Queue::q_capacity |
Capacity of the queue.
Definition at line 1937 of file gnunet-service-tng.c.
Referenced by handle_update_queue_message().
uint32_t Queue::priority |
Queue priority.
Definition at line 1942 of file gnunet-service-tng.c.
Referenced by handle_update_queue_message().
int Queue::idle |
Set to GNUNET_YES if this queue is idle waiting for some virtual link to give it a pending message.
Definition at line 1958 of file gnunet-service-tng.c.