GNUnet  0.11.x
Data Fields
Queue Struct Reference

Handle for a queue. More...

Collaboration diagram for Queue:
[legend]

Data Fields

struct GNUNET_PeerIdentity target
 To whom are we talking to. More...
 
struct GNUNET_NETWORK_Handlelisten_sock
 Listen socket. More...
 
struct GNUNET_NETWORK_Handlesock
 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_CRYPTO_EcdhePrivateKey ephemeral
 Our ephemeral key. More...
 
struct GNUNET_SCHEDULER_Taskread_task
 ID of read task for this connection. More...
 
struct GNUNET_SCHEDULER_Taskwrite_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_Handlemq
 Message queue we are providing for the ch. More...
 
struct GNUNET_TRANSPORT_QueueHandleqh
 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 ChallengeNonceP challenge
 Challenge value used to protect against replay attack, if there is no stored monotonic time value. More...
 
struct ChallengeNonceP challenge_received
 Challenge value received. More...
 
struct GNUNET_PEERSTORE_IterateContextrekey_monotime_get
 Iteration Context for retrieving the monotonic time send with key for rekeying. More...
 
struct GNUNET_PEERSTORE_IterateContexthandshake_monotime_get
 Iteration Context for retrieving the monotonic time send with the handshake. More...
 
struct GNUNET_PEERSTORE_IterateContexthandshake_ack_monotime_get
 Iteration Context for retrieving the monotonic time send with the handshake ack. More...
 
struct GNUNET_PEERSTORE_StoreContextrekey_monotime_sc
 Store Context for retrieving the monotonic time send with key for rekeying. More...
 
struct GNUNET_PEERSTORE_StoreContexthandshake_monotime_sc
 Store Context for retrieving the monotonic time send with the handshake. More...
 
struct GNUNET_PEERSTORE_StoreContexthandshake_ack_monotime_sc
 Store Context for retrieving the monotonic time send with the handshake ack. More...
 
struct Queuenext
 Queues with pending messages (!) are kept in a DLL. More...
 
struct Queueprev
 Queues with pending messages (!) are kept in a DLL. More...
 
struct sockaddr_un * address
 Address of the other peer. More...
 
struct UNIXMessagemsg
 Message currently scheduled for transmission, non-NULL if and only if this queue is in the queue_head DLL. More...
 
struct GNUNET_SCHEDULER_Tasktimeout_task
 Queue timeout task. More...
 
struct Queuenext_neighbour
 Kept in a MDLL. More...
 
struct Queueprev_neighbour
 Kept in a MDLL. More...
 
struct Queueprev_client
 Kept in a MDLL. More...
 
struct Queuenext_client
 Kept in a MDLL. More...
 
struct PendingAcknowledgementpa_head
 Head of DLL of PAs that used this queue. More...
 
struct PendingAcknowledgementpa_tail
 Tail of DLL of PAs that used this queue. More...
 
struct QueueEntryqueue_head
 Head of DLL of unacked transmission requests. More...
 
struct QueueEntryqueue_tail
 End of DLL of unacked transmission requests. More...
 
struct Neighbourneighbour
 Which neighbour is this queue for? More...
 
struct TransportClienttc
 Which communicator offers this queue? More...
 
const char * address
 Address served by the queue. More...
 
struct GNUNET_SCHEDULER_Tasktransmit_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...
 
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...
 

Detailed Description

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 389 of file gnunet-communicator-tcp.c.

Field Documentation

◆ target

struct GNUNET_PeerIdentity Queue::target

To whom are we talking to.

Definition at line 383 of file gnunet-communicator-tcp.c.

Referenced by get_queue_delete_it(), and setup_queue().

◆ listen_sock

struct GNUNET_NETWORK_Handle* Queue::listen_sock

Listen socket.

Definition at line 399 of file gnunet-communicator-tcp.c.

◆ sock

struct GNUNET_NETWORK_Handle* Queue::sock

socket that we transmit all data with on this queue

Definition at line 404 of file gnunet-communicator-tcp.c.

◆ in_cipher

gcry_cipher_hd_t Queue::in_cipher

cipher for decryption of incoming data.

Definition at line 409 of file gnunet-communicator-tcp.c.

◆ out_cipher

gcry_cipher_hd_t Queue::out_cipher

cipher for encryption of outgoing data.

Definition at line 414 of file gnunet-communicator-tcp.c.

◆ in_hmac

struct GNUNET_HashCode Queue::in_hmac

Shared secret for HMAC verification on incoming data.

Definition at line 414 of file gnunet-communicator-tcp.c.

◆ out_hmac

struct GNUNET_HashCode Queue::out_hmac

Shared secret for HMAC generation on outgoing data, ratcheted after each operation.

Definition at line 414 of file gnunet-communicator-tcp.c.

◆ ephemeral

struct GNUNET_CRYPTO_EcdhePrivateKey Queue::ephemeral

Our ephemeral key.

Stored here temporarily during rekeying / key generation.

Definition at line 414 of file gnunet-communicator-tcp.c.

◆ read_task

struct GNUNET_SCHEDULER_Task* Queue::read_task

ID of read task for this connection.

Definition at line 436 of file gnunet-communicator-tcp.c.

◆ write_task

struct GNUNET_SCHEDULER_Task* Queue::write_task

ID of write task for this connection.

Definition at line 441 of file gnunet-communicator-tcp.c.

◆ address [1/3]

struct sockaddr* Queue::address

Address of the other peer.

Definition at line 446 of file gnunet-communicator-tcp.c.

◆ rekey_left_bytes

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 452 of file gnunet-communicator-tcp.c.

◆ rekey_time

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 452 of file gnunet-communicator-tcp.c.

◆ address_len

socklen_t Queue::address_len

Length of the address.

Definition at line 463 of file gnunet-communicator-tcp.c.

◆ mq

struct GNUNET_MQ_Handle * Queue::mq

Message queue we are providing for the ch.

Definition at line 468 of file gnunet-communicator-tcp.c.

◆ qh

struct GNUNET_TRANSPORT_QueueHandle * Queue::qh

handle for this queue with the ch.

Definition at line 473 of file gnunet-communicator-tcp.c.

◆ bytes_in_queue

unsigned long long Queue::bytes_in_queue

Number of bytes we currently have in our write queue.

Definition at line 478 of file gnunet-communicator-tcp.c.

◆ cread_buf

char Queue::cread_buf[(2 *64 *1024+sizeof(struct TCPBox))]

Buffer for reading ciphertext from network into.

Definition at line 483 of file gnunet-communicator-tcp.c.

◆ cwrite_buf

char Queue::cwrite_buf[(2 *64 *1024+sizeof(struct TCPBox))]

buffer for writing ciphertext to network.

Definition at line 488 of file gnunet-communicator-tcp.c.

◆ pread_buf

char Queue::pread_buf[UINT16_MAX+1+sizeof(struct TCPBox)]

Plaintext buffer for decrypted plaintext.

Definition at line 493 of file gnunet-communicator-tcp.c.

◆ pwrite_buf

char Queue::pwrite_buf[UINT16_MAX+1+sizeof(struct TCPBox)]

Plaintext buffer for messages to be encrypted.

Definition at line 498 of file gnunet-communicator-tcp.c.

◆ cread_off

size_t Queue::cread_off

At which offset in the ciphertext read buffer should we append more ciphertext for transmission next?

Definition at line 504 of file gnunet-communicator-tcp.c.

◆ cwrite_off

size_t Queue::cwrite_off

At which offset in the ciphertext write buffer should we append more ciphertext from reading next?

Definition at line 510 of file gnunet-communicator-tcp.c.

◆ pread_off

size_t Queue::pread_off

At which offset in the plaintext input buffer should we append more plaintext from decryption next?

Definition at line 516 of file gnunet-communicator-tcp.c.

◆ pwrite_off

size_t Queue::pwrite_off

At which offset in the plaintext output buffer should we append more plaintext for encryption next?

Definition at line 522 of file gnunet-communicator-tcp.c.

◆ timeout

struct GNUNET_TIME_Absolute Queue::timeout

Timeout for this queue.

Definition at line 522 of file gnunet-communicator-tcp.c.

◆ backpressure

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 536 of file gnunet-communicator-tcp.c.

◆ nt

enum GNUNET_NetworkType Queue::nt

Which network type does this queue use?

Network type offered by this queue.

Definition at line 536 of file gnunet-communicator-tcp.c.

Referenced by handle_update_queue_message().

◆ cs

The connection status of this queue.

Connection status for this queue.

Definition at line 536 of file gnunet-communicator-tcp.c.

Referenced by handle_update_queue_message(), and setup_queue().

◆ mq_awaits_continue

int Queue::mq_awaits_continue

Is MQ awaiting a GNUNET_MQ_impl_send_continue() call?

Definition at line 551 of file gnunet-communicator-tcp.c.

◆ finishing

int Queue::finishing

Did we enqueue a finish message and are closing down the queue?

Definition at line 556 of file gnunet-communicator-tcp.c.

◆ destroyed

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 564 of file gnunet-communicator-tcp.c.

◆ rekeyed

int Queue::rekeyed

GNUNET_YES if we just rekeyed and must thus possibly re-decrypt ciphertext.

Definition at line 570 of file gnunet-communicator-tcp.c.

◆ rekey_monotonic_time

struct GNUNET_TIME_AbsoluteNBO Queue::rekey_monotonic_time

Monotonic time value for rekey message.

Definition at line 570 of file gnunet-communicator-tcp.c.

◆ handshake_monotonic_time

struct GNUNET_TIME_AbsoluteNBO Queue::handshake_monotonic_time

Monotonic time value for handshake message.

Definition at line 570 of file gnunet-communicator-tcp.c.

◆ handshake_ack_monotonic_time

struct GNUNET_TIME_AbsoluteNBO Queue::handshake_ack_monotonic_time

Monotonic time value for handshake ack message.

Definition at line 570 of file gnunet-communicator-tcp.c.

◆ challenge

struct ChallengeNonceP Queue::challenge

Challenge value used to protect against replay attack, if there is no stored monotonic time value.

Definition at line 570 of file gnunet-communicator-tcp.c.

◆ challenge_received

struct 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 570 of file gnunet-communicator-tcp.c.

◆ rekey_monotime_get

struct GNUNET_PEERSTORE_IterateContext* Queue::rekey_monotime_get

Iteration Context for retrieving the monotonic time send with key for rekeying.

Definition at line 600 of file gnunet-communicator-tcp.c.

◆ handshake_monotime_get

struct GNUNET_PEERSTORE_IterateContext* Queue::handshake_monotime_get

Iteration Context for retrieving the monotonic time send with the handshake.

Definition at line 605 of file gnunet-communicator-tcp.c.

◆ handshake_ack_monotime_get

struct GNUNET_PEERSTORE_IterateContext* Queue::handshake_ack_monotime_get

Iteration Context for retrieving the monotonic time send with the handshake ack.

Definition at line 610 of file gnunet-communicator-tcp.c.

◆ rekey_monotime_sc

struct GNUNET_PEERSTORE_StoreContext* Queue::rekey_monotime_sc

Store Context for retrieving the monotonic time send with key for rekeying.

Definition at line 615 of file gnunet-communicator-tcp.c.

◆ handshake_monotime_sc

struct GNUNET_PEERSTORE_StoreContext* Queue::handshake_monotime_sc

Store Context for retrieving the monotonic time send with the handshake.

Definition at line 620 of file gnunet-communicator-tcp.c.

◆ handshake_ack_monotime_sc

struct GNUNET_PEERSTORE_StoreContext* Queue::handshake_ack_monotime_sc

Store Context for retrieving the monotonic time send with the handshake ack.

Definition at line 625 of file gnunet-communicator-tcp.c.

◆ next

struct Queue* Queue::next

Queues with pending messages (!) are kept in a DLL.

Definition at line 95 of file gnunet-communicator-unix.c.

◆ prev

struct Queue* Queue::prev

Queues with pending messages (!) are kept in a DLL.

Definition at line 100 of file gnunet-communicator-unix.c.

◆ address [2/3]

struct sockaddr_un* Queue::address

Address of the other peer.

Definition at line 110 of file gnunet-communicator-unix.c.

◆ msg

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.

◆ timeout_task

struct GNUNET_SCHEDULER_Task* Queue::timeout_task

Queue timeout task.

Definition at line 146 of file gnunet-communicator-unix.c.

◆ next_neighbour

struct Queue* Queue::next_neighbour

Kept in a MDLL.

Definition at line 1686 of file gnunet-service-tng.c.

Referenced by find_queue().

◆ prev_neighbour

struct Queue* Queue::prev_neighbour

Kept in a MDLL.

Definition at line 1691 of file gnunet-service-tng.c.

◆ prev_client

struct Queue* Queue::prev_client

Kept in a MDLL.

Definition at line 1696 of file gnunet-service-tng.c.

◆ next_client

struct Queue* Queue::next_client

Kept in a MDLL.

Definition at line 1701 of file gnunet-service-tng.c.

Referenced by handle_update_queue_message().

◆ pa_head

struct PendingAcknowledgement* Queue::pa_head

Head of DLL of PAs that used this queue.

Definition at line 1706 of file gnunet-service-tng.c.

◆ pa_tail

struct PendingAcknowledgement* Queue::pa_tail

Tail of DLL of PAs that used this queue.

Definition at line 1711 of file gnunet-service-tng.c.

◆ queue_head

struct QueueEntry* Queue::queue_head

Head of DLL of unacked transmission requests.

Definition at line 1716 of file gnunet-service-tng.c.

◆ queue_tail

struct QueueEntry* Queue::queue_tail

End of DLL of unacked transmission requests.

Definition at line 1721 of file gnunet-service-tng.c.

◆ neighbour

struct Neighbour* Queue::neighbour

Which neighbour is this queue for?

Definition at line 1726 of file gnunet-service-tng.c.

◆ tc

struct TransportClient* Queue::tc

Which communicator offers this queue?

Definition at line 1731 of file gnunet-service-tng.c.

◆ address [3/3]

const char* Queue::address

Address served by the queue.

Definition at line 1736 of file gnunet-service-tng.c.

◆ transmit_task

struct GNUNET_SCHEDULER_Task* Queue::transmit_task

Task scheduled for the time when this queue can (likely) transmit the next message.

Definition at line 1742 of file gnunet-service-tng.c.

◆ validated_until

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 1742 of file gnunet-service-tng.c.

◆ pd

struct PerformanceData Queue::pd

Performance data for this queue.

Definition at line 1742 of file gnunet-service-tng.c.

◆ mid_gen

uint64_t Queue::mid_gen

Message ID generator for transmissions on this queue to the communicator.

Definition at line 1762 of file gnunet-service-tng.c.

◆ qid

uint32_t Queue::qid

Unique identifier of this queue with the communicator.

Definition at line 1767 of file gnunet-service-tng.c.

Referenced by handle_update_queue_message().

◆ mtu

uint32_t Queue::mtu

Maximum transmission unit supported by this queue.

Definition at line 1772 of file gnunet-service-tng.c.

Referenced by handle_update_queue_message().

◆ num_msg_pending

uint32_t Queue::num_msg_pending

Messages pending.

Definition at line 1777 of file gnunet-service-tng.c.

◆ num_bytes_pending

uint32_t Queue::num_bytes_pending

Bytes pending.

Definition at line 1782 of file gnunet-service-tng.c.

◆ queue_length

unsigned int Queue::queue_length

Length of the DLL starting at queue_head.

Definition at line 1787 of file gnunet-service-tng.c.

Referenced by handle_update_queue_message().

◆ priority

uint32_t Queue::priority

Queue priority.

Definition at line 1792 of file gnunet-service-tng.c.

Referenced by handle_update_queue_message().

◆ idle

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 1808 of file gnunet-service-tng.c.


The documentation for this struct was generated from the following files: