GNUnet 0.21.1
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 key
 Key in hash map. 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_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 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_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...
 
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 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...
 
unsigned int unlimited_length
 Is this queue of unlimited length. 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...
 
struct GNUNET_PEERSTORE_Monitormo
 Handle for an operation to iterate through all hellos to compare the hello addresses with address which might be a natted one. 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...
 
enum GNUNET_GenericReturnValue is_global_natted
 Set to GNUNET_yes, if this queues address is not a global natted one. 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 433 of file gnunet-communicator-tcp.c.

Field Documentation

◆ target

struct GNUNET_PeerIdentity Queue::target

To whom are we talking to.

Definition at line 438 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 443 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 448 of file gnunet-communicator-tcp.c.

◆ in_cipher

gcry_cipher_hd_t Queue::in_cipher

cipher for decryption of incoming data.

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

◆ out_cipher

gcry_cipher_hd_t Queue::out_cipher

cipher for encryption of outgoing data.

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

◆ key

struct GNUNET_HashCode Queue::key

Key in hash map.

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

Referenced by gnunet-chk.Chk::__init__(), gnunet-chk.AESKey::__init__(), and gnunet-chk.Chk::uri().

◆ in_hmac

struct GNUNET_HashCode Queue::in_hmac

Shared secret for HMAC verification on incoming data.

Definition at line 468 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 474 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 479 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 484 of file gnunet-communicator-tcp.c.

◆ address [1/3]

struct sockaddr* Queue::address

Address of the other peer.

Definition at line 489 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 495 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 501 of file gnunet-communicator-tcp.c.

◆ address_len

socklen_t Queue::address_len

Length of the address.

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

◆ mq

struct GNUNET_MQ_Handle * Queue::mq

Message queue we are providing for the ch.

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

◆ qh

struct GNUNET_TRANSPORT_QueueHandle * Queue::qh

handle for this queue with the ch.

Definition at line 516 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 521 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 526 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 531 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 536 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 541 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 547 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 553 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 559 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 565 of file gnunet-communicator-tcp.c.

◆ timeout

struct GNUNET_TIME_Absolute Queue::timeout

Timeout for this queue.

Definition at line 570 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 579 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 584 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 589 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 594 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 599 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 607 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 613 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 618 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 623 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 628 of file gnunet-communicator-tcp.c.

◆ challenge

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

◆ challenge_received

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 638 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 643 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 648 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 653 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 658 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 663 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 668 of file gnunet-communicator-tcp.c.

◆ unverified_size

size_t Queue::unverified_size

Size of data received without KX challenge played back.

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

◆ initial_core_kx_done

int Queue::initial_core_kx_done

Has the initial (core) handshake already happened?

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

◆ next

struct Queue* Queue::next

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

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

◆ prev

struct Queue* Queue::prev

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

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

◆ address [2/3]

struct sockaddr_un* Queue::address

Address of the other peer.

Definition at line 109 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 120 of file gnunet-communicator-unix.c.

◆ timeout_task

struct GNUNET_SCHEDULER_Task* Queue::timeout_task

Queue timeout task.

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

◆ next_neighbour

struct Queue* Queue::next_neighbour

Kept in a MDLL.

Definition at line 1868 of file gnunet-service-transport.c.

Referenced by find_queue().

◆ prev_neighbour

struct Queue* Queue::prev_neighbour

Kept in a MDLL.

Definition at line 1873 of file gnunet-service-transport.c.

◆ prev_client

struct Queue* Queue::prev_client

Kept in a MDLL.

Definition at line 1878 of file gnunet-service-transport.c.

◆ next_client

struct Queue* Queue::next_client

Kept in a MDLL.

Definition at line 1883 of file gnunet-service-transport.c.

Referenced by check_for_queue_with_higher_prio(), and handle_update_queue_message().

◆ pa_head

struct PendingAcknowledgement* Queue::pa_head

Head of DLL of PAs that used this queue.

Definition at line 1888 of file gnunet-service-transport.c.

◆ pa_tail

struct PendingAcknowledgement* Queue::pa_tail

Tail of DLL of PAs that used this queue.

Definition at line 1893 of file gnunet-service-transport.c.

◆ queue_head

struct QueueEntry* Queue::queue_head

Head of DLL of unacked transmission requests.

Definition at line 1898 of file gnunet-service-transport.c.

◆ queue_tail

struct QueueEntry* Queue::queue_tail

End of DLL of unacked transmission requests.

Definition at line 1903 of file gnunet-service-transport.c.

◆ neighbour

struct Neighbour* Queue::neighbour

Which neighbour is this queue for?

Definition at line 1908 of file gnunet-service-transport.c.

◆ tc

struct TransportClient* Queue::tc

Which communicator offers this queue?

Definition at line 1913 of file gnunet-service-transport.c.

◆ address [3/3]

const char* Queue::address

Address served by the queue.

Definition at line 1918 of file gnunet-service-transport.c.

◆ unlimited_length

unsigned int Queue::unlimited_length

Is this queue of unlimited length.

Definition at line 1923 of file gnunet-service-transport.c.

Referenced by handle_update_queue_message().

◆ 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 1929 of file gnunet-service-transport.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 1938 of file gnunet-service-transport.c.

◆ pd

struct PerformanceData Queue::pd

Performance data for this queue.

Definition at line 1943 of file gnunet-service-transport.c.

◆ mo

struct GNUNET_PEERSTORE_Monitor* Queue::mo

Handle for an operation to iterate through all hellos to compare the hello addresses with address which might be a natted one.

Definition at line 1949 of file gnunet-service-transport.c.

◆ mid_gen

uint64_t Queue::mid_gen

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

Definition at line 1955 of file gnunet-service-transport.c.

◆ qid

uint32_t Queue::qid

Unique identifier of this queue with the communicator.

Definition at line 1960 of file gnunet-service-transport.c.

Referenced by handle_update_queue_message().

◆ mtu

uint32_t Queue::mtu

Maximum transmission unit supported by this queue.

Definition at line 1965 of file gnunet-service-transport.c.

Referenced by handle_update_queue_message().

◆ num_msg_pending

uint32_t Queue::num_msg_pending

Messages pending.

Definition at line 1970 of file gnunet-service-transport.c.

◆ num_bytes_pending

uint32_t Queue::num_bytes_pending

Bytes pending.

Definition at line 1975 of file gnunet-service-transport.c.

◆ queue_length

unsigned int Queue::queue_length

Length of the DLL starting at queue_head.

Definition at line 1980 of file gnunet-service-transport.c.

◆ q_capacity

uint64_t Queue::q_capacity

Capacity of the queue.

Definition at line 1985 of file gnunet-service-transport.c.

Referenced by handle_update_queue_message().

◆ priority

uint32_t Queue::priority

Queue priority.

Definition at line 1990 of file gnunet-service-transport.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 2006 of file gnunet-service-transport.c.

◆ is_global_natted

enum GNUNET_GenericReturnValue Queue::is_global_natted

Set to GNUNET_yes, if this queues address is not a global natted one.

Definition at line 2011 of file gnunet-service-transport.c.


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