88#define RING_BUFFER_SIZE 16
93#define MAX_FC_RETRANSMIT_COUNT 1000
99#define MAX_CUMMULATIVE_ACKS 64
113#define FC_NO_CHANGE_REPLY_PROBABILITY 8
119#define IN_PACKET_SIZE_WITHOUT_MTU 128
125#define GOODPUT_AGING_SLOTS 4
131#define DEFAULT_WINDOW_SIZE (128 * 1024)
141#define MAX_INCOMING_REQUEST 16
147#define MAX_DV_DISCOVERY_SELECTION 16
157#define RECV_WINDOW_SIZE 4
166#define MIN_DV_PATH_LENGTH_FOR_INITIATOR 3
171#define MAX_DV_HOPS_ALLOWED 16
177#define MAX_DV_LEARN_PENDING 64
182#define MAX_DV_PATHS_TO_TARGET 3
189#define DELAY_WARN_THRESHOLD \
190 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
196#define DV_FORWARD_TIMEOUT \
197 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
202#define DEFAULT_ACK_WAIT_DURATION \
203 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
210#define DV_QUALITY_RTT_THRESHOLD \
211 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
217#define DV_PATH_VALIDITY_TIMEOUT \
218 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
224#define BACKCHANNEL_INACTIVITY_TIMEOUT \
225 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
231#define DV_PATH_DISCOVERY_FREQUENCY \
232 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4)
237#define EPHEMERAL_VALIDITY \
238 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
243#define REASSEMBLY_EXPIRATION \
244 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4)
250#define FAST_VALIDATION_CHALLENGE_FREQ \
251 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1)
256#define MAX_VALIDATION_CHALLENGE_FREQ \
257 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_DAYS, 1)
264#define ACK_CUMMULATOR_TIMEOUT \
265 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
271#define DV_LEARN_BASE_FREQUENCY GNUNET_TIME_UNIT_MINUTES
277#define DV_LEARN_QUALITY_THRESHOLD 100
282#define MAX_ADDRESS_VALID_UNTIL \
283 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MONTHS, 1)
288#define ADDRESS_VALIDATION_LIFETIME \
289 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
297#define MIN_DELAY_ADDRESS_VALIDATION GNUNET_TIME_UNIT_MILLISECONDS
305#define VALIDATION_RTT_BUFFER_FACTOR 3
313#define COMMUNICATOR_TOTAL_QUEUE_LIMIT 512
320#define QUEUE_LENGTH_LIMIT 32
325#define QUEUE_ENTRY_TIMEOUT \
326 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
333 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
2795 uint32_t last_window_consum_limit;
3121 "free_pending_acknowledgement\n");
3130 "remove pa from message\n");
3132 "remove pa from message %" PRIu64
"\n",
3135 "remove pa from message %u\n",
3138 "remove pa from message %s\n",
3169 while (NULL != (frag = root->
head_frag))
3174 while (NULL != (pa = frag->
pa_head))
3180 if (NULL != frag->
qe)
3183 frag->
qe->
pm = NULL;
3213 tc->details.core.pending_msg_head,
3214 tc->details.core.pending_msg_tail,
3217 if ((NULL != vl) && (NULL ==
pm->frag_parent))
3220 "Removing pm %" PRIu64
"\n",
3236 while (NULL != (pa =
pm->pa_head))
3240 "free pending pa null\n");
3241 if (NULL ==
pm->pa_tail)
3243 "free pending pa_tail null\n");
3246 "free pending pa prev null\n");
3249 "free pending pa next null\n");
3260 if (NULL !=
pm->bpm)
3263 if (NULL !=
pm->bpm->qe)
3274 "Freeing pm done\n");
3359 "free virtual link %p\n",
3411 if (NULL != vs->revalidation_task)
3414 vs->revalidation_task = NULL;
3420 "Remove key %s for address %s map size %u contains %u during freeing state\n",
3549 "Informing CORE clients about disconnect from %s\n",
3583 if (NULL != (vl =
dv->
vl))
3632 size_t addr_len = strlen (
address) + 1;
3637 md->
nt = htonl ((uint32_t)
nt);
3643 md->
cs = htonl ((uint32_t)
me->cs);
3646 memcpy (&md[1],
address, addr_len);
3670 if (
tc->details.monitor.one_shot)
3702 "Client %p of type %u connected\n",
3742 "Freeing neighbour\n");
3747 while (NULL != (dvh = neighbour->
dv_head))
3755 if (NULL != neighbour->
get)
3758 neighbour->
get = NULL;
3760 if (NULL != neighbour->
sc)
3765 neighbour->
sc = NULL;
3767 if (NULL != (
vl = neighbour->
vl))
3781 neighbour->
vl = NULL;
3816 "Informing CORE clients about connection to %s\n",
3847 if (s->tc->details.communicator.address_prefix !=
3848 queue->tc->details.communicator.address_prefix)
3851 "queue address %s qid %u compare with queue: address %s qid %u\n",
3856 if ((s->priority >
queue->priority) && (0 < s->q_capacity) &&
3884 queue->tc->details.communicator.
3888 if (
queue->tc->details.communicator.total_queue_length >=
3892 "Transmission on queue %s (QID %u) throttled due to communicator queue limit\n",
3897 "# Transmission throttled due to communicator queue limit",
3906 "Transmission on queue %s (QID %u) throttled due to communicator queue length limit\n",
3910 "# Transmission throttled due to queue queue limit",
3916 if (0 ==
queue->q_capacity)
3919 "Transmission on queue %s (QID %u) throttled due to communicator message has capacity %"
3925 "# Transmission throttled due to message queue capacity",
3932 if (NULL !=
queue->transmit_task)
3934 queue->transmit_task =
3938 "Considering transmission on queue `%s' QID %llu to %s\n",
3940 (
unsigned long long)
queue->qid,
3961 "Checking if link is down\n");
3969 pos->path_valid_until);
3984 if ((NULL == vl->
n) && (NULL == vl->
dv))
4015 "Cleaning up queue %u\n",
queue->qid);
4016 if (NULL !=
queue->mo)
4021 if (NULL !=
queue->transmit_task)
4024 queue->transmit_task = NULL;
4026 while (NULL != (pa =
queue->pa_head))
4037 tc->details.communicator.queue_head,
4038 tc->details.communicator.queue_tail,
4041 tc->details.communicator.total_queue_length);
4043 "Cleaning up queue with length %u\n",
4044 queue->queue_length);
4045 while (NULL != (
qe =
queue->queue_head))
4048 queue->queue_length--;
4049 tc->details.communicator.total_queue_length--;
4059 tc->details.communicator.total_queue_length))
4064 "# Transmission throttled due to communicator queue limit",
4067 for (
struct Queue *s =
tc->details.communicator.queue_head; NULL != s;
4077 if ((NULL != vl) && (neighbour == vl->
n))
4100 tc->details.communicator.addr_tail,
4102 if (NULL != ale->
sc)
4109 if (NULL != ale->
st)
4175 "Unknown Client %p disconnected, cleaning up.\n",
4182 "CORE Client %p disconnected, cleaning up.\n",
4186 while (NULL != (
pm =
tc->details.core.pending_msg_head))
4189 tc->details.core.pending_msg_head,
4190 tc->details.core.pending_msg_tail,
4199 "MONITOR Client %p disconnected, cleaning up.\n",
4209 "COMMUNICATOR Client %p disconnected, cleaning up.\n",
4212 if (NULL !=
tc->details.communicator.free_queue_entry_task)
4214 tc->details.communicator.free_queue_entry_task);
4215 while (NULL != (
q =
tc->details.communicator.queue_head))
4217 while (NULL != (ale =
tc->details.communicator.addr_head))
4225 "APPLICATION Client %p disconnected, cleaning up.\n",
4238 "Our last client disconnected\n");
4265 "Telling new CORE client about existing connection to %s\n",
4291 while (NULL != (cmc = vl->
cmc_tail))
4332 "New CORE client with PID %s registered\n",
4392 "client send response\n");
4401 "Confirming transmission of <%" PRIu64
"> to %s\n",
4423 unsigned int hops_array_length)
4425 uint64_t
choices[hops_array_length];
4427 unsigned int dv_count;
4445 if (dv_count <= hops_array_length)
4450 hops_array[dv_count++] = pos;
4453 for (
unsigned int i = 0; i < hops_array_length; i++)
4461 for (
unsigned int j = 0; j < i; j++)
4480 for (
unsigned int i = 0; i < hops_array_length; i++)
4482 hops_array[dv_count++] = pos;
4527 if (0 != ntohl (cmc->
im.
fc_on))
4534 "Acknowledge message with flow control id %" PRIu64
"\n",
4586 "# RECV_OK dropped: virtual link unknown",
4595 "CORE ack receiving message, increased CORE recv window to %d\n",
4601 while (NULL != (cmc = vl->
cmc_tail))
4628 "Receive-only communicator connected\n");
4631 tc->details.communicator.address_prefix =
4633 tc->details.communicator.cc = ntohl (cam->
cc);
4634 tc->details.communicator.can_burst = ntohl (cam->
can_burst);
4636 "Communicator for peer %s with prefix '%s' connected %s\n",
4638 tc->details.communicator.address_prefix,
4639 tc->details.communicator.can_burst ?
"can burst" :
4663 msize = ntohs (cb->
header.
size) -
sizeof(*cb);
4665 isize = ntohs (inbox->
size);
4671 is = (
const char *) inbox;
4675 if (
'\0' !=
is[msize - 1])
4720 "freeing timedout queue entries\n");
4722 tc->details.communicator.free_queue_entry_task = NULL;
4729 "checking QID %u for timedout queue entries\n",
4739 "diff to now %s \n",
4744 "Freeing timed out QueueEntry with MID %" PRIu64
4768 size_t payload_size)
4777 "Queueing %u bytes of payload for transmission <%" PRIu64
4778 "> on queue %llu to %s\n",
4779 (
unsigned int) payload_size,
4780 (NULL ==
pm) ? 0 :
pm->logging_uuid,
4781 (
unsigned long long)
queue->qid,
4789 memcpy (&smt[1],
payload, payload_size);
4798 "Create QueueEntry with MID %" PRIu64
4799 " and QID %u and prefix %s\n",
4802 queue->tc->details.communicator.address_prefix);
4813 "Retransmitting message <%" PRIu64
4814 "> remove pm from qe with MID: %llu \n",
4816 (
unsigned long long)
pm->qe->mid);
4822 if (0 ==
queue->q_capacity)
4829 " (pm type %u) was not send because queue has no capacity.\n",
4839 queue->queue_length++;
4840 queue->tc->details.communicator.total_queue_length++;
4842 queue->q_capacity--;
4844 "Queue %s with qid %u has capacity %" PRIu64
"\n",
4849 queue->tc->details.communicator.total_queue_length)
4853 if (0 ==
queue->q_capacity)
4860 if (NULL ==
tc->details.communicator.free_queue_entry_task)
4861 tc->details.communicator.free_queue_entry_task =
4867 if (NULL !=
pm && NULL != (pa =
pm->pa_head))
4869 while (
pm != pa->
pm)
4875 "Sending message MID %" PRIu64
4876 " of type %u (%u) and size %lu with MQ %p queue %s (QID %u) pending %"
4881 (
unsigned long) payload_size,
4885 (NULL ==
pm) ? 0 :
pm->logging_uuid);
4907 unsigned int candidates;
4919 for (
struct Queue *pos = n->queue_head; NULL != pos;
4920 pos = pos->next_neighbour)
4923 (pos->validated_until.abs_value_us > now.
abs_value_us))
4926 if (0 == candidates)
4931 "Could not route message of type %u to %s: no valid queue\n",
4935 "# route selection failed (all no valid queue)",
4948 for (
struct Queue *pos = n->queue_head; NULL != pos;
4949 pos = pos->next_neighbour)
4952 (pos->validated_until.abs_value_us > now.
abs_value_us))
4954 if ((sel1 == candidates) || (sel2 == candidates))
4957 "Routing message of type %u to %s using %s (#%u)\n",
4961 (sel1 == candidates) ? 1 : 2);
5021 sizeof(
key->material),
5023 "gnunet-transport-dv-key",
5024 strlen (
"gnunet-transport-dv-key")
5032 "Deriving backchannel key based on KM %s and IV %s\n",
5038 GCRY_CIPHER_MODE_CTR,
5041 &
key->material.aes_key,
5042 sizeof(
key->material.aes_key)));
5043 gcry_cipher_setctr (
key->cipher,
5044 &
key->material.aes_ctr,
5045 sizeof(
key->material.aes_ctr));
5081 gcry_cipher_encrypt (
key->cipher, dst, in_size, in, in_size));
5102 gcry_cipher_decrypt (
key->cipher,
5116 gcry_cipher_close (
key->cipher);
5152 unsigned int num_dvhs,
5162 uint16_t enc_body_size = ntohs (hdr->
size);
5189 sizeof(box_hdr.
iv));
5206 for (
unsigned int i = 0; i < num_dvhs; i++)
5209 unsigned int num_hops = dvh->
distance + 1;
5217 box_hdr.
orig_size = htons (
sizeof(buf));
5218 box_hdr.
num_hops = htons (num_hops);
5219 memcpy (buf, &box_hdr,
sizeof(box_hdr));
5230 for (
unsigned int j = 0; j < num_hops; j++)
5239 "Routing message of type %u to %s using DV (#%u/%u) via %s\n",
5248 memcpy (&dhops[num_hops],
enc,
sizeof(
enc));
5304 "Trying to route message of type %u to %s without fc\n",
5324 if ((NULL == n) && (NULL == dv))
5327 "Cannot route message of type %u to %s: no route\n",
5331 "# Messages dropped in routing: no acceptable method",
5337 "Routing message of type %u to %s with options %X\n",
5350 if ((NULL != n) && (NULL != dv))
5358 "Try to route message of type %u to %s without fc via neighbour\n",
5375 "Failed to route message, could not determine DV path\n");
5379 "encapsulate_for_dv 1\n");
5429 char *addr = (
char *) &tgna[1];
5432 "sending address %s length %u\n",
5468 size_t addresses_size =
5470 ->size_of_global_addresses;
5510 "Sending FC seq %u to %s with new window %llu %lu %u\n",
5532 "FC retransmission to %s failed, will retry in %s\n",
5582 "check_vl_transmission to target %s\n",
5591 "check_vl_transmission loop\n");
5598 "Stalled message %" PRIu64
5599 " transmission on VL %s due to flow control: %llu < %llu\n",
5603 (
unsigned long long) (
pm->bytes_msg
5609 "Target window on VL %s not stalled. Scheduling transmission on queue\n",
5622 "Direct neighbour %s not stalled\n",
5631 "Neighbour Queue QID: %u (%u) busy or invalid\n",
5644 struct Neighbour *nh_iter = pos->next_hop;
5647 if (pos->path_valid_until.abs_value_us <= now.
abs_value_us)
5657 "Stalled message %" PRIu64
5658 " transmission on next hop %s due to flow control: %llu < %llu\n",
5663 (
unsigned long long) (
pm->bytes_msg
5665 outbound_fc_window_size_used));
5675 "Next hop neighbour %s not stalled\n",
5684 "DV Queue QID: %u (%u) busy or invalid\n",
5692 "Eligible message %" PRIu64
" of size %u to %s: %llu/%llu\n",
5697 (
unsigned long long) (
pm->bytes_msg
5722 bytes_msg = ntohs (obmm->
size);
5728 "Don't have %s as a neighbour (anymore).\n",
5736 "# messages dropped (neighbour unknown)",
5744 "1 created pm %p storing vl %p\n",
5751 pm->bytes_msg = bytes_msg;
5752 memcpy (&
pm[1], obmm, bytes_msg);
5754 "Sending message of type %u with %u bytes as <%" PRIu64
5761 tc->details.core.pending_msg_head,
5762 tc->details.core.pending_msg_tail,
5792 uint16_t isize = ntohs (inbox->
size);
5793 const char *
is = ((
const char *) &cb[1]) + isize;
5794 size_t slen = strlen (
is) + 1;
5805 "Preparing backchannel transmission to %s:%s of type %u and size %u\n",
5808 ntohs (inbox->
type),
5809 ntohs (inbox->
size));
5814 memcpy (&be[1], inbox, isize);
5885 "Failed to store our own address `%s' in peerstore!\n",
5889 "Successfully stored our own address `%s' in peerstore!\n",
5918 if (NULL == ale->
sc)
5921 "Failed to store our address `%s' with peerstore\n",
5944 unsigned int add_success;
5946 dash = strchr (ale->
address,
'-');
5956 "Storing our address `%s' in peerstore until %s!\n",
5964 "Storing our address `%s' %s\n",
5966 GNUNET_NO == add_success ?
"not done" :
"failed");
5974 "Storing our address `%s'\n",
6008 char *address_without_port;
6012 ale->
address = (
const char *) &ale[1];
6016 memcpy (&ale[1],
address, slen);
6019 "Is this %s a local address (%s)\n",
6020 address_without_port,
6022 if (0 != strcmp (
"127.0.0.1", address_without_port))
6047 "Communicator added address `%s'!\n",
6048 (
const char *) &aam[1]);
6049 slen = ntohs (aam->
header.
size) -
sizeof(*aam);
6051 memcpy (
address, &aam[1], slen);
6059 tc->details.communicator.addr_tail,
6090 if (dam->
aid != ale->aid)
6094 "Communicator deleted address `%s'!\n",
6101 "Communicator removed address we did not even have.\n");
6150 unsigned int free_cmc)
6152 uint16_t
size = ntohs (
mh->size);
6158 "# CORE messages dropped (FC arithmetic overflow)",
6162 "CORE messages of type %u with %u bytes dropped (FC arithmetic overflow)\n",
6163 (
unsigned int) ntohs (
mh->type),
6164 (
unsigned int) ntohs (
mh->size));
6172 "# CORE messages dropped (FC window overflow)",
6176 "CORE messages of type %u with %u bytes dropped (FC window overflow)\n",
6177 (
unsigned int) ntohs (
mh->type),
6178 (
unsigned int) ntohs (
mh->size));
6204 memcpy (&im[1],
mh,
size);
6211 "Dropped message to CORE: no CORE client connected!\n");
6217 "Dropped message of type %u with %u bytes to CORE: no CORE client connected!\n",
6218 (
unsigned int) ntohs (
mh->type),
6219 (
unsigned int) ntohs (
mh->size));
6225 "Delivered message from %s of type %u to CORE recv window %d\n",
6259 uint16_t
size = ntohs (
mh->size);
6262 "Handling raw message of type %u with %u bytes\n",
6263 (
unsigned int) ntohs (
mh->type),
6264 (
unsigned int) ntohs (
mh->size));
6307 "Storing message for %s and type %u (%u) in ring buffer head %u is full %u\n",
6309 (
unsigned int) ntohs (
mh->type),
6310 (
unsigned int) ntohs (mh_copy->
type),
6322 "%u items stored in ring buffer\n",
6418 "Sending ACK with %u components to %s\n",
6428 for (
unsigned int i = 0; i < ac->
num_acks; i++)
6479 "Scheduling ACK %s for transmission to %s\n",
6585 "No virtual link for %s to handle fragment\n",
6609 fsize = ntohs (fb->
header.
size) -
sizeof(*fb);
6610 if (NULL == (rc = fc.
rc))
6613 + (msize + 7) / 8 *
sizeof(uint8_t) );
6629 target = (
char *) &rc[1];
6636 "Received fragment with size %u at offset %u/%u %u bytes missing from %s for NEW message %"
6647 target = (
char *) &rc[1];
6649 "Received fragment at offset %u/%u from %s for message %u\n",
6670 if (frag_off + fsize > msize)
6677 memcpy (&target[frag_off], &fb[1], fsize);
6679 for (
unsigned int i = frag_off; i < frag_off + fsize; i++)
6681 if (0 == (rc->
bitfield[i / 8] & (1 << (i % 8))))
6683 rc->
bitfield[i / 8] |= (1 << (i % 8));
6714 "Fragment reassembly complete for message %u\n",
6744 "check_send_msg with size %u: inner msg type %u and size %u (%lu %lu)\n",
6772 "Received reliability box from %s with UUID %s of type %u\n",
6775 (
unsigned int) ntohs (inbox->
type));
6833 uint16_t bytes_transmitted_ok)
6837 unsigned int age =
get_age ();
6859 uint16_t bytes_transmitted_ok)
6875 uint16_t bytes_transmitted_ok)
6894 "Complete transmission of message %" PRIu64
" %u\n",
6907 pos =
pm->frag_parent;
6911 "pos frag_off %lu pos bytes_msg %lu pmt %u parent %u\n",
6924 pos =
pm->frag_parent;
6948 "Completed transmission of message %" PRIu64
" (DV Box)\n",
6950 if (NULL !=
pm->frag_parent)
6952 pos =
pm->frag_parent;
7000 unsigned int n_acks;
7003 n_acks = (ntohs (ra->
header.
size) -
sizeof(*ra))
7010 if ((ntohs (ra->
header.
size) -
sizeof(*ra)) !=
7033 unsigned int n_acks;
7034 uint32_t ack_counter;
7036 n_acks = (ntohs (ra->
header.
size) -
sizeof(*ra))
7039 for (
unsigned int i = 0; i < n_acks; i++)
7046 "Received ACK from %s with UUID %s which is unknown to us!\n",
7051 "# FRAGMENT_ACKS dropped, no matching pending message",
7057 "Received ACK from %s with UUID %s\n",
7095 isize = ntohs (inbox->
size);
7096 is = ((
const char *) inbox) + isize;
7098 if (
'\0' !=
is[
size - 1])
7126 uint16_t isize = ntohs (inbox->
size);
7127 const char *target_communicator = ((
const char *) inbox) + isize;
7142 strcmp (
tc->details.communicator.address_prefix, target_communicator)))
7150 "# Backchannel message dropped: target communicator `%s' unknown",
7151 target_communicator);
7159 "Delivering backchannel message from %s to %s of type %u to %s\n",
7162 ntohs (inbox->
type),
7163 target_communicator);
7169 memcpy (&cbi[1], inbox, isize);
7228 "Sending from ring buffer, which has %u items\n",
7232 for (
unsigned int i = 0; i < head; i++)
7241 "Sending message of type %u to ring buffer target %s using vl target %s index %u\n",
7249 "Finish handling message of type %u and size %u\n",
7250 (
unsigned int) ntohs (
mh->type),
7251 (
unsigned int) ntohs (
mh->size));
7274 "ring_buffer_copy[i]->mh->type for i %u %u\n",
7276 ring_buffer_copy[i]->
mh->type);
7278 "ring_buffer[i]->mh->type for i %u %u\n",
7284 "%u items still in ring buffer\n",
7300 "Sending from ring buffer dv, which has %u items\n",
7304 for (
unsigned int i = 0; i < head; i++)
7309 "Sending to ring buffer target %s using vl target %s\n",
7315 "Adding PendingMessage to vl, checking transmission.\n");
7340 "%u items still in ring buffer dv.\n",
7366 "Creating new virtual link %p to %s using DV!\n",
7411 "Virtual link to %s could now also use DV!\n",
7444 unsigned int path_len,
7451 unsigned int shorter_distance;
7461 if (NULL == next_hop)
7467 for (
unsigned int i = 2; i < path_len; i++)
7478 "remaining %lu to %s\n",
7488 "Path of %u hops useless: directly link to hop %u (%s)\n",
7493 "# Useless DV path ignored: hop is neighbour",
7504 dv->
target = path[path_len - 1];
7516 shorter_distance = 0;
7520 if (pos->distance < path_len - 3)
7525 if ((pos->distance == path_len - 3) && (pos->next_hop == next_hop))
7529 for (
unsigned int i = 0; i < pos->distance; i++)
7543 "# Known DV path refreshed",
7549 pos->path_valid_until =
7564 "Rediscovered path too quickly, not forwarding further\n")
7569 "Refreshed known path to %s valid until %s, forwarding further\n",
7572 pos->path_valid_until));
7583 "Have many shorter DV paths %s, not forwarding further\n",
7589 "Discovered new DV path to %s valid until %s\n",
7626 uint16_t num_hops = ntohs (dvl->
num_hops);
7640 for (
unsigned int i = 0; i < num_hops; i++)
7671 uint16_t bi_history,
7686 "Forwarding DV learn message originating from %s to %s\n",
7697 msg->non_network_delay));
7709 .purpose.size = htonl (
sizeof(dhp)),
7710 .pred = (0 == nhops) ?
msg->initiator : dhops[nhops - 1].
hop,
7712 .challenge =
msg->challenge
7716 &dhops[nhops].hop_sig);
7759 .purpose.size = htonl (
sizeof(ip)),
7760 .monotonic_time = sender_monotonic_time,
7842 for (
unsigned int i = 0; i < nsc->
nhops; i++)
7869 "transmission %s\n",
7874 for (
unsigned int i = 0; i < nsc->
nhops; i++)
7941 unsigned int neighbour_count,
7942 unsigned int eligible_count)
7944 double target_total = 50.0;
7945 double eligible_ratio =
7946 ((double) eligible_count) / ((double) neighbour_count);
7947 double boost_factor = eligible_ratio * eligible_ratio;
7951 if (hops_taken >= 64)
7956 for (
unsigned int i = 1; i < hops_taken; i++)
7960 target_total -= (target_total * boost_factor / (1LLU << i));
7963 (
unsigned int) floor (target_total * boost_factor / (1LLU << hops_taken));
7966 left = target_total - (double) rnd;
7967 if (UINT32_MAX * left >
7971 "Forwarding DV learn message of %u hops %u(/%u/%u) times\n",
7994 "Failed to store other peer's monotonic time in peerstore!\n");
8004 uint16_t nhops = ntohs (dvl->num_hops);;
8012 dvl->monotonic_time));
8021 return network_latency;
8039 uint16_t bi_history;
8062 "handle dv learn message last hop %s\n",
8090 "DV learn from %s discarded due to time travel",
8093 "# DV learn discarded due to time travel",
8104 "DV learn signature from %s invalid\n",
8133 for (
unsigned int i = 0; i < nhops; i++)
8137 .purpose.size = htonl (
sizeof(dhp)),
8147 &hops[i].hop.public_key))
8150 "DV learn from %s signature of hop %u invalid\n",
8154 "signature of hop %s invalid\n",
8174 for (
unsigned int i = 0; i < nhops; i++)
8181 (bi_history & (1 << (nhops - i))) ?
"<->" :
"-->",
8187 "Received DVInit via %s%s%s\n",
8189 bi_hop ?
"<->" :
"-->",
8201 path[1] = hops[0].
hop;
8205 for (
unsigned int i = 2; i <= nhops; i++)
8211 path[i] = hops[i - 1].
hop;
8213 "Learned path with %u hops to %s with latency %s\n",
8235 path[1] = hops[nhops - 1].
hop;
8236 for (
unsigned int i = 0; i < nhops; i++)
8240 if (0 == (bi_history & (1 << i)))
8248 path[i + 2] = hops[nhops - i - 2].
hop;
8252 "Learned inverse path with %u hops to %s\n",
8269 "# DV learn not forwarded due invalidity of path",
8275 if ((
GNUNET_NO == iret) && (nhops == i + 1))
8280 "# DV learn not forwarded, got better paths",
8295 bi_history = (bi_history << 1) | (bi_hop ? 1 : 0);
8303 "Sending DVL back to initiator %s\n",
8335 "Forwarding DVL to %u other peers\n",
8361 uint16_t num_hops = ntohs (dvb->
num_hops);
8373 for (
unsigned int i = 0; i < num_hops; i++)
8398 uint16_t total_hops,
8401 const void *enc_payload,
8402 uint16_t enc_payload_size)
8416 memcpy (msg_buf, hdr,
sizeof(*hdr));
8421 memcpy (&dhops[num_hops], enc_payload, enc_payload_size);
8426 "Forwarding control message (payload size %u) in DV Box to next hop %s (%u/%u) \n",
8429 (
unsigned int) num_hops,
8430 (
unsigned int) total_hops);
8439 "2 created pm %p storing vl %p \n",
8444 pm->target = next_hop->
pid;
8448 pm->bytes_msg = msg_size;
8449 buf = (
char *) &
pm[1];
8450 memcpy (buf, msg_buf, msg_size);
8453 "Created pending message %" PRIu64
8454 " for DV Box with next hop %s (%u/%u)\n",
8457 (
unsigned int) num_hops,
8458 (
unsigned int) total_hops);
8472 "The virtual link is not ready for forwarding a DV Box with payload, storing PendingMessage in ring buffer.\n");
8490 "%u items stored in DV ring buffer\n",
8514 if (NULL != b->
task)
8527 "Removing backtalker for %s\n",
8569 "backtalker timeout.\n");
8613 if (
sizeof(*mtbe) !=
record->value_size)
8624 "Backtalker message from %s dropped, monotime in the past\n",
8628 "# Backchannel messages dropped: monotonic time not increasing",
8655 "Failed to store backtalker's monotonic time in PEERSTORE!\n");
8658 if (NULL != b->
task)
8680 "store cancel before store with sc %p\n",
8685 "store cancel before store with sc %p is null\n",
8720 uint16_t num_hops = ntohs (dvb->
num_hops);
8723 const char *enc_payload = (
const char *) &hops[num_hops];
8724 uint16_t enc_payload_size =
8736 for (
unsigned int i = 0; i < num_hops; i++)
8745 "Received DVBox with remaining path %s\n",
8754 for (
int i = num_hops - 1; i >= 0; i--)
8768 "Skipping %u/%u hops ahead while routing DV Box\n",
8780 "# DV hops skipped routing boxes",
8784 "# DV boxes routed (total)",
8792 "# DV Boxes dropped: next hop unknown",
8800 "# DV boxes opened (ultimate target)",
8819 hdr = (
const char *) &dvb[1];
8820 hdr_len = ntohs (dvb->
orig_size) -
sizeof(*dvb) -
sizeof(
struct
8845 "Error decrypting DV payload header\n");
8851 &hdr[
sizeof(ppay)], hdr_len -
sizeof(ppay)))
8854 "Error decrypting DV payload\n");
8861 if (ntohs (
mh->size) !=
sizeof(body))
8868 switch (ntohs (
mh->type))
8886 "Decrypted backtalk from %s\n",
8893 "# Backchannel messages dropped: monotonic time not increasing",
8926 "DVBox received for me from %s via %s\n",
8948 memcpy (&b[1], body,
sizeof(body));
9029 if (0 != strcmp (vs->address, ckac->
address))
9058 if (new_time.
abs_value_us == vs->next_challenge.abs_value_us)
9060 vs->next_challenge = new_time;
9099 if (NULL != (
vs = ckac.
vs))
9106 vs->challenge_backoff =
9109 vs->challenge_backoff,
9113 vs->challenge_backoff));
9122 vs->first_challenge_use = now;
9126 sizeof(
vs->challenge));
9130 "Starting address validation `%s' of peer %s using challenge %s\n",
9144static struct Queue *
9165 pfx_len = eou -
uri;
9174 "helo for client %s\n",
9206 "Got failure from PEERSTORE: %s\n",
9228 "Error in PEERSTORE monitoring\n");
9236 "Done with initial PEERSTORE iteration during monitoring\n");
9270 "Received address validation challenge %s\n",
9282 tvr.validity_duration = validity_duration;
9287 .purpose.size = htonl (
sizeof(tvp)),
9414 "# Peerstore failed to store foreign address",
9427static struct Queue *
9438 if (0 == strcmp (pos->address,
address))
9455 vs->revalidation_task = NULL;
9477 "Key in revalidate map %s \n",
9512 if (NULL == (vs = ckac.
vs))
9517 "# Validations dropped, challenge unknown",
9521 "Validation response %s dropped, challenge unknown\n",
9529 if ((origin_time.
abs_value_us < vs->first_challenge_use.abs_value_us) ||
9530 (origin_time.
abs_value_us > vs->last_challenge_use.abs_value_us))
9533 "Diff first use %" PRIu64
" and last use %" PRIu64
"\n",
9534 vs->first_challenge_use.abs_value_us - origin_time.
abs_value_us,
9535 origin_time.
abs_value_us - vs->last_challenge_use.abs_value_us);
9545 .purpose.size = htonl (
sizeof(tvp)),
9546 .validity_duration = tvr->validity_duration,
9567 tvr->validity_duration),
9577 sizeof(vs->challenge));
9585 "First challenge use is now %" PRIu64
" %s \n",
9586 vs->first_challenge_use.abs_value_us,
9588 vs->first_challenge_use = now;
9592 "First challenge use is later %" PRIu64
" %s \n",
9593 vs->first_challenge_use.abs_value_us,
9595 vs->last_challenge_use =
9599 "Validation response %s from %s accepted, address valid until %s\n",
9607 "Key %s for address %s map size %u contains %u\n",
9622 vs->revalidation_task =
9631 strlen (vs->address) + 1,
9644 "# Queues lost at time of successful validation",
9650 q->pd.aged_rtt = vs->validation_rtt;
9657 "Creating new virtual link %p to %s using direct neighbour!\n",
9694 "Virtual link to %s could now also use direct neighbour!\n",
9733 "Received message with size %u and flow control id %" PRIu64
9734 " via communicator from peer %s\n",
9759 "Flow control header size %u size of addresses %u number of addresses %u size of message struct %lu second struct %lu\n",
9766 if (0 == number_of_addresses || ntohs (fc->
header.
size) ==
sizeof(
struct
9784 unsigned int n_hops = 0;
9792 "calculate_rtt %lu\n",
9793 (
unsigned long) pos->pd.aged_rtt.rel_value_us);
9816 char *uri_without_port;
9818 slash = strrchr (
uri,
'/');
9829 "iterate_address_start_burst %s %s %s %s\n",
9834 if (0 == strcmp (uri_without_port, slash))
9860 "Got failure from PEERSTORE: %s\n",
9867 "Hello iteration end for %s\n",
9875 "check_for_burst_address\n");
9911 strlen (uri_without_port) + 1,
9915 memcpy (&sb[1], uri_without_port, strlen (uri_without_port) + 1);
9919 "iterate_address_start_burst client tc prefix %s\n",
9920 tc->details.communicator.address_prefix);
9926 "iterate_address_start_burst %s call %lu %u rtt %lu\n",
9928 strlen (uri_without_port),
9956 "burst_task %p ready %s burst addr %s (%p)\n",
10014 "No virtual link for %p FC creating new unconfirmed virtual link to %s!\n",
10039 "remaining %lu timeout for neighbour %p\n",
10043 if (NULL == vl->
n ||
10053 if (NULL !=
vl->
dv)
10070 unsigned int off = 0;
10072 tgnas = (
const char *) &fc[1];
10074 for (
int i = 1; i <= number_of_addresses; i++)
10081 addr = (
char *) &tgna[1];
10086 "received address %s length %u\n",
10097 "FC dropped: Message out of order\n");
10100 "# FC dropped: message out of order",
10106 seq = ntohl (fc->
seq);
10107 if (seq < vl->last_fc_seq)
10119 "Received FC from %s, seq %u, new window %llu (loss at %lld)\n",
10121 (
unsigned int) seq,
10136 "Consider re-sending our FC message, as clearly the other peer's idea of the window is not up-to-date (%llu vs %llu) or %llu last received differs, or random reply %u\n",
10137 (
unsigned long long) wnd,
10150 "Stopping FC retransmission to %s: peer is current at window %llu\n",
10152 (
unsigned long long) wnd);
10204 validation_challenge,
10209 validation_response,
10218 "Handling message of type %u with %u bytes\n",
10219 (
unsigned int) ntohs (
msg->
type),
10220 (
unsigned int) ntohs (
msg->
size));
10267 if (
pm->msg_uuid_set)
10269 pm->msg_uuid.uuid =
pm->vl->message_uuid_ctr++;
10311 "Waiting for ACKnowledgment `%s' for <%" PRIu64
">\n",
10339 mtu = (UINT16_MAX ==
queue->mtu)
10343 "Fragmenting message <%" PRIu64
10344 "> with size %u to %s for MTU %u\n",
10348 (
unsigned int) mtu);
10351 "Fragmenting message %" PRIu64
" <%" PRIu64
10352 "> with size %u to %s for MTU %u\n",
10357 (
unsigned int) mtu);
10389 orig = (
const char *) &ff[1];
10406 "3 created pm %p from pm %p storing vl %p from pm %p\n",
10417 msg = (
char *) &frag[1];
10426 memcpy (
msg, &tfb,
sizeof(tfb));
10427 memcpy (&
msg[
sizeof(tfb)], &orig[ff->
frag_off], fragsize);
10473 if (NULL !=
pm->bpm)
10480 if (
pm->bytes_msg +
sizeof(rbox) > UINT16_MAX)
10493 "4 created pm %p storing vl %p from pm %p\n",
10507 rbox.
header.
size = htons (
sizeof(rbox) +
pm->bytes_msg);
10512 memcpy (
msg, &rbox,
sizeof(rbox));
10513 memcpy (&
msg[
sizeof(rbox)], &
pm[1],
pm->bytes_msg);
10516 "Preparing reliability box for message <%" PRIu64
10517 "> of size %d (%d) to %s on queue %s\n",
10540 while ((NULL != pos) &&
10557 pos =
pm->head_frag;
10558 while (NULL != pos)
10580 pos =
pm->head_frag;
10581 while (NULL != pos)
10602 if (NULL ==
pm->frag_parent)
10606 "Next attempt for message <%" PRIu64
"> set to %" PRIu64
"\n",
10618 "Next attempt for root message <%" PRIu64
"> set to %s\n",
10632 "frag_count next attempt %u\n",
10641 "Next attempt for fragmented message <%" PRIu64
"> (<%" PRIu64
10642 ">)set to %" PRIu64
"\n",
10660 "We have no fragments in flight for message %" PRIu64
10661 ", reorder root! Next attempt is %" PRIu64
"\n",
10671 double factor = ((double) root->
frag_count - 1)
10681 "frag_count %u after factor\n",
10690 "We have fragments in flight for message %" PRIu64
10691 ", do not reorder root! Actual next attempt %" PRIu64
"\n",
10777 size_t real_overhead = overhead;
10781 if ((NULL != dvh) && (
PMT_DV_BOX == pos->pmt))
10784 "DV messages must not be DV-routed to next hop!\n");
10787 if (pos->next_attempt.abs_value_us > now.
abs_value_us)
10793 "Fragments in flight for message %" PRIu64
"\n",
10794 pos->logging_uuid);
10799 "Maybe too early, because message are sorted by next_attempt, if there are no fragments in flight.Checked message %"
10801 pos->logging_uuid);
10804 pos->next_attempt);
10809 if (NULL != pos->qe)
10815 sc->consideration_counter++;
10819 "check %" PRIu64
" for sc->best\n",
10820 pos->logging_uuid);
10822 if (((0 !=
queue->mtu) &&
10823 (pos->bytes_msg + real_overhead >
queue->mtu)) ||
10824 (pos->bytes_msg > UINT16_MAX -
sizeof(
struct
10827 (NULL != pos->head_frag
10832 "fragment msg with size %u, realoverhead is %lu\n",
10852 if ((0 !=
queue->mtu) && (pos->bytes_msg + real_overhead >
queue->mtu))
10862 "Create reliability box of msg with size %u, realoverhead is %lu %u %u %u\n",
10882 long long sc_score =
sc->frag * 40 +
sc->relb * 20 +
sc->real_overhead;
10883 long long pm_score = frag * 40 + relb * 20 + real_overhead;
10884 long long time_delta =
10885 (
sc->best->next_attempt.abs_value_us - pos->next_attempt.abs_value_us)
10900 if (0 !=
queue->mtu)
10904 if (
queue->mtu >
sc->real_overhead +
sc->best->bytes_msg)
10905 sc_score -=
queue->mtu - (
sc->real_overhead +
sc->best->bytes_msg);
10906 if (
queue->mtu > real_overhead + pos->bytes_msg)
10907 pm_score -=
queue->mtu - (real_overhead + pos->bytes_msg);
10909 if (sc_score + time_delta > pm_score)
10912 "sc_score of %" PRIu64
" larger, keep sc->best %" PRIu64
10915 sc->best->logging_uuid);
10923 sc->real_overhead = real_overhead;
10952 "5 created pm %p storing vl %p from pm %p\n",
10964 "Creating DV Box %" PRIu64
" for original message %" PRIu64
10965 " (next hop is %s)\n",
10997 queue->transmit_task = NULL;
11001 "Virtual link `%s' is down, cannot have PM for queue `%s'\n",
11007 memset (&
sc, 0,
sizeof(
sc));
11009 if (NULL ==
sc.best)
11020 * (1 + dvh->distance)
11025 if (NULL ==
sc.best)
11029 "No pending messages, queue `%s' to %s now idle\n",
11045 "Selected message <%" PRIu64
">\n",
11047 if (NULL !=
sc.dvh)
11050 "Is this %u a DV box?\n",
11053 if ((NULL !=
sc.best->bpm) && (
sc.best->bpm->used_dvh !=
sc.dvh))
11056 "Discard old box, because we have a new DV path.\n");
11058 sc.best->bpm = NULL;
11061 if (NULL ==
sc.best->bpm)
11064 "encapsulate_for_dv 2\n");
11075 "%lu %lu %lu %lu %u\n",
11081 sc.best->bpm->used_dvh =
sc.dvh;
11091 "Fragmentation failed queue %s to %s for <%" PRIu64
11092 ">, trying again\n",
11095 sc.best->logging_uuid);
11110 "Reliability boxing failed queue %s to %s for <%" PRIu64
11111 ">, trying again\n",
11114 sc.best->logging_uuid);
11125 "Passing message <%" PRIu64
11126 "> to queue %s for peer %s (considered %u others)\n",
11130 sc.consideration_counter);
11137 pm->vl->outbound_fc_window_size_used +=
pm->bytes_msg;
11139 if (
pm->vl !=
queue->neighbour->vl)
11149 queue->neighbour->vl->outbound_fc_window_size_used +=
sc.best->bytes_msg;
11168 unsigned int wait_multiplier;
11174 root =
pm->frag_parent;
11178 wait_multiplier = (
unsigned int) ceil ((
double) root->
bytes_msg
11186 wait_multiplier = 4;
11193 "Wait multiplier %u\n",
11208 queue->pd.aged_rtt.rel_value_us)
11209 wait_duration =
queue->pd.aged_rtt;
11213 wait_multiplier = 4;
11218 wait_duration, wait_multiplier));
11220 wait_duration, wait_multiplier);
11222 "Waiting %s for ACK until %s\n",
11262 if ((ntohl (dqm->
qid) !=
queue->qid) ||
11266 "Dropped queue %s to peer %s\n",
11285 qe->queue->queue_tail,
11287 qe->queue->queue_length--;
11288 tc->details.communicator.total_queue_length--;
11290 "Received ACK on queue %s (QID %u) to peer %s (new length: %u/%u)\n",
11291 qe->queue->address,
11294 qe->queue->queue_length,
11295 tc->details.communicator.total_queue_length);
11299 tc->details.communicator.total_queue_length)
11305 "# Transmission throttled due to communicator queue limit",
11308 for (
struct Queue *
queue =
tc->details.communicator.queue_head;
11321 "# Transmission throttled due to queue queue limit",
11328 else if (1 ==
qe->queue->q_capacity)
11332 "Transmission rescheduled due to communicator message queue with qid %u has capacity %"
11335 qe->queue->q_capacity);
11339 "# Transmission throttled due to message queue capacity",
11347 if (NULL != (
pm =
qe->pm))
11356 if (NULL ==
pm->frag_parent)
11359 if ((NULL != vl) &&
11392 "Looking for queue for PID %s\n",
11411 "QueueEntry MID: %" PRIu64
" on queue QID: %u, Ack MID: %"
11412 PRIu64
" Ack QID %u\n",
11418 if ((NULL !=
qe->pm) && (
qe->pm->qe !=
qe))
11420 "For pending message %" PRIu64
" we had retransmissions.\n",
11421 qe->pm->logging_uuid);
11428 "No QueueEntry found for Ack MID %" PRIu64
" QID: %u\n",
11475 q =
q->next_neighbour)
11479 .num_msg_pending =
q->num_msg_pending,
11480 .num_bytes_pending =
q->num_bytes_pending };
11507 tc->details.monitor.peer =
start->peer;
11508 tc->details.monitor.one_shot = ntohl (
start->one_shot);
11529 if (0 == strcmp (
prefix,
tc->details.communicator.address_prefix))
11534 "Someone suggested use of communicator for `%s', but we do not have such a communicator!\n",
11550 static uint32_t idgen;
11567 "# Suggestions ignored due to missing communicator",
11571 "Cannot connect to %s at `%s', no matching communicator present\n",
11579 "Request #%u for `%s' communicator to create queue to `%s' at `%s'\n",
11580 (
unsigned int) idgen,
11590 memcpy (&cqm[1],
address, alen);
11608 if (NULL != vs->revalidation_task)
11611 vs->revalidation_task = NULL;
11617 "Remove key %s for address %s map size %u contains %u\n",
11627 vs->last_challenge_use.abs_value_us)
11629 vs->first_challenge_use = monotonic_time;
11631 vs->last_challenge_use = monotonic_time;
11639 "Sending address validation challenge %s to %s\n",
11668 "Validation response %s cleaned up\n",
11676 "Address validation task not scheduled anymore, nothing to do\n");
11684 "To early to start next address validation for challenge %s\n",
11696 vs->challenge_backoff =
11700 "Address validation task will run again in %s\n",
11705 vs->challenge_backoff));
11770 ctx->quality_count++;
11806 unsigned int factor;
11812 "At connection quality %u, will launch DV learn in %s\n",
11836 "Starting launch DV learn with challenge %s\n",
11856 .purpose.size = htonl (
sizeof(dvip)),
11902 size_t colon_rest_length;
11903 char *address_without_port;
11905 colon = strchr (
address,
':');
11907 colon_rest_length = strlen (colon_rest);
11908 address_without_port =
GNUNET_strndup (&colon_rest[4], colon_rest_length - 4);
11911 return address_without_port;
11931 char *address_without_port_vs;
11932 char *address_without_port_q;
11940 "Check validation request pending for `%s' at `%s'/`%s' (vs)/(q)\n",
11942 address_without_port_vs,
11943 address_without_port_q);
11946 (0 == strcmp (address_without_port_vs, address_without_port_q)))
11985 if (0 ==
record->value_size)
12005 struct sockaddr_in v4;
12009 char *uri_without_port;
12010 char *address_uri_without_port;
12012 slash = strrchr (
uri,
'/');
12022 "1 not global natted_address %u %s %s %s\n",
12023 queue->is_global_natted,
12029 if (1 != inet_pton (AF_INET, uri_without_port, &v4.sin_addr))
12038 "2 not global natted_address %u %s %s\n",
12039 queue->is_global_natted,
12052 "3 not global natted_address %u %s %s\n",
12053 queue->is_global_natted,
12057 if (0 == strcmp (uri_without_port, address_uri))
12066 "4 not global natted_address %u %s %s\n",
12067 queue->is_global_natted,
12072 if (0 == strcmp (uri_without_port, address_uri_without_port))
12078 "not global natted_address %u %s %s %s %s %s %u\n",
12079 queue->is_global_natted,
12083 address_uri_without_port,
12114 char *addr = (
char *) &tgna[1];
12117 "Checking tgna %p with addr %s and length %u compare length %lu\n",
12121 strlen (tgna_cls->
addr));
12125 tgna_cls->
tgna = tgna;
12136 "Error in PEERSTORE monitoring for checking global natted\n");
12144 "Done with initial PEERSTORE iteration during monitoring for checking global natted\n");
12158 size_t address_len_without_port;
12163 "Got failure from PEERSTORE: %s\n",
12167 if (0 ==
record->value_size)
12177 "before not global natted %u\n",
12178 queue->is_global_natted);
12183 "after not global natted %u\n",
12184 queue->is_global_natted);
12188 address_len_without_port = strlen (tgna_cls.
addr);
12197 tgna_cls.
tgna = NULL;
12202 if (NULL != tgna_cls.
tgna)
12204 " tgna_cls.tgna tgna %p %lu %u %u\n",
12214 + address_len_without_port);
12224 "Created tgna %p with address %s and length %lu\n",
12227 address_len_without_port + 1);
12242 "removed tgna %p\n",
12276 for (
queue =
tc->details.communicator.queue_head;
12280 if (
queue->qid != ntohl (aqm->
qid))
12287 neighbour =
queue->neighbour;
12294 if (NULL == neighbour)
12314 addr_len = ntohs (aqm->
header.
size) -
sizeof(*aqm);
12315 addr = (
const char *) &aqm[1];
12317 "New queue %s to %s available with QID %u and q_len %" PRIu64
12333 "New queue with QID %u inherit validated until\n",
12335 queue->validated_until = validated_until;
12340 queue->neighbour = neighbour;
12344 memcpy (&
queue[1], addr, addr_len);
12356 tc->details.communicator.queue_head,
12357 tc->details.communicator.queue_tail,
12367 struct sockaddr_in v4;
12369 if (1 == inet_pton (AF_INET, addr_without, &v4.sin_addr))
12372 "start not global natted\n");
12427 struct Queue *target_queue = NULL;
12430 "Received queue update message for %u with q_len %llu and mtu %u\n",
12434 for (target_queue =
tc->details.communicator.queue_head;
12435 NULL != target_queue;
12438 if (ntohl (
msg->qid) == target_queue->
qid)
12441 if (NULL == target_queue)
12444 "Queue to update no longer exists! Discarding update.\n");
12448 target_queue->
nt =
msg->nt;
12449 target_queue->
mtu = ntohl (
msg->mtu);
12450 target_queue->
cs =
msg->cs;
12488 "# Suggestions succeeded at communicator",
12492 "Request #%u for communicator to create queue succeeded\n",
12520 "Request #%u for communicator to create queue failed\n",
12523 "# Suggestions failed in queue creation at communicator",
12575 pfx_len = eou -
uri;
12584 "hello for client %s\n",
12617 "Got failure from PEERSTORE: %s\n",
12639 "Error in PEERSTORE monitoring\n");
12647 "Done with initial PEERSTORE iteration during monitoring\n");
12667 tc->details.application.requests =
12677 "Client suggested we talk to %s with preference %d at rate %u\n",
12679 (
int) ntohl (
msg->pk),
12680 (
int) ntohl (
msg->bw.value__));
12683 pr->pid =
msg->peer;
12685 pr->pk = ntohl (
msg->pk);
12687 tc->details.application.requests,
12881 "shutdown logic\n");
12956 "Disconnecting from PEERSTORE service\n");
12970 "Shutdown task executed\n");
12976 "client still connected: %u\n",
13023 "Transport service is lacking key configuration settings. Exiting.\n"));
13030 "My identity is `%s'\n",
13038 "Could not configure burst nat use. Default to no.\n");
struct GNUNET_GETOPT_CommandLineOption options[]
struct GNUNET_MQ_MessageHandlers handlers[]
struct GNUNET_MQ_Handle * mq
struct GNUNET_MessageHeader * msg
struct GNUNET_MQ_Envelope * env
static struct GNUNET_ARM_MonitorHandle * m
Monitor connection with ARM.
static int start
Set if we are to start default services (including ARM).
static int ret
Final status code.
static char * init
Set to the name of a service to start.
static struct GNUNET_CADET_Handle * mh
Cadet handle.
static struct GNUNET_TESTING_Interpreter * is
static struct Queue * queue_head
Head of queue of messages to transmit.
static int prefix
If printing the value of PREFIX has been requested.
static struct GNUNET_SCHEDULER_Task * st
The shutdown task.
static void record(void *cls, size_t data_size, const void *data)
Process recorded audio data.
static char * address
GNS address for this phone.
static GNUNET_NETWORK_STRUCT_END struct GNUNET_PeerIdentity me
Our own peer identity.
static struct GNUNET_DATASTORE_QueueEntry * qe
Current operation.
static char * data
The data to insert into the dht.
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_TIME_Relative expiration
User supplied expiration value.
static struct GNUNET_FS_Handle * ctx
static ogg_stream_state os
Ogg stream state.
static OpusEncoder * enc
OPUS encoder.
static char * res
Currently read line or NULL on EOF.
static char * value
Value of the record to add/remove.
static uint32_t type
Type string converted to DNS type value.
static size_t data_size
Number of bytes in data.
static struct GNUNET_NAT_AUTO_Test * nt
Handle to a NAT test operation.
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static struct GNUNET_REVOCATION_Query * q
Handle for revocation query.
static struct GNUNET_FS_SearchContext * sc
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
static unsigned long long payload
How much data are we currently storing in the database?
static unsigned int ring_buffer_dv_head
Head of the ring buffer.
static void peerstore_store_validation_cb(void *cls, int success)
Function called when peerstore is done storing a validated address.
static void handle_dv_box(void *cls, const struct TransportDVBoxMessage *dvb)
Communicator gave us a DV box.
#define DV_PATH_DISCOVERY_FREQUENCY
How long before paths expire would we like to (re)discover DV paths? Should be below DV_PATH_VALIDITY...
static struct PendingMessage * ring_buffer_dv[RING_BUFFER_SIZE]
Ring buffer for a forwarded DVBox message we did not deliver to the next hop, because of missing virt...
static enum GNUNET_GenericReturnValue dv_decrypt(struct DVKeyState *key, void *out, const void *ciph, size_t out_size)
Perform backchannel encryption using symmetric secret in key to encrypt data from in to dst.
static int dv_neighbour_transmission(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Function called for each neighbour during handle_dv_learn.
static void reassembly_cleanup_task(void *cls)
Task run to clean up reassembly context of a neighbour that have expired.
static enum GNUNET_GenericReturnValue remove_global_addresses(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
static void backtalker_timeout_cb(void *cls)
Function called when it is time to clean up a backtalker.
static void handle_add_address(void *cls, const struct GNUNET_TRANSPORT_AddAddressMessage *aam)
Address of our peer added.
static unsigned int calculate_fork_degree(unsigned int hops_taken, unsigned int neighbour_count, unsigned int eligible_count)
Computes the number of neighbours we should forward a DVInit message to given that it has so far take...
static void dv_key_clean(struct DVKeyState *key)
Clean up key material in key.
static struct GNUNET_SCHEDULER_Task * dvlearn_task
Task run to initiate DV learning.
static int check_reliability_box(void *cls, const struct TransportReliabilityBoxMessage *rb)
Communicator gave us a reliability box.
static void handle_communicator_available(void *cls, const struct GNUNET_TRANSPORT_CommunicatorAvailableMessage *cam)
Communicator started.
static int check_fragment_box(void *cls, const struct TransportFragmentBoxMessage *fb)
Communicator gave us a fragment box.
static unsigned int get_age()
Get an offset into the transmission history buffer for struct PerformanceData.
static void free_validation_state(struct ValidationState *vs)
Free validation state.
static struct PendingAcknowledgement * prepare_pending_acknowledgement(struct Queue *queue, struct DistanceVectorHop *dvh, struct PendingMessage *pm)
Setup data structure waiting for acknowledgements.
static int check_request_hello_validation(void *cls, const struct RequestHelloValidationMessage *m)
Check GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_HELLO_VALIDATION messages.
static void hello_for_incoming_cb(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
#define MAX_DV_DISCOVERY_SELECTION
Maximum number of peers we select for forwarding DVInit messages at the same time (excluding initiato...
#define QUEUE_ENTRY_TIMEOUT
static struct GNUNET_PeerIdentity GST_my_identity
Our public key.
static struct LearnLaunchEntry * lle_tail
Tail of a DLL sorted by launch time.
static struct GNUNET_CONTAINER_Heap * validation_heap
MIN Heap sorted by "next_challenge" to struct ValidationState entries sorting addresses we are aware ...
static void core_send_connect_info(struct TransportClient *tc, const struct GNUNET_PeerIdentity *pid)
Send message to CORE clients that we lost a connection.
static void send_dv_to_neighbour(void *cls, struct Neighbour *next_hop, const struct GNUNET_MessageHeader *hdr, enum RouteMessageOptions options)
Wrapper around route_via_neighbour() that matches the DVMessageHandler structure.
static void harmonize_flight_round(struct PendingMessage *pm)
#define ACK_CUMMULATOR_TIMEOUT
How long until we forget about historic accumulators and thus reset the ACK counter?...
static void free_queue(struct Queue *queue)
Free queue.
static void handle_del_address(void *cls, const struct GNUNET_TRANSPORT_DelAddressMessage *dam)
Address of our peer deleted.
static struct LearnLaunchEntry * lle_head
Head of a DLL sorted by launch time.
#define EPHEMERAL_VALIDITY
How long are ephemeral keys valid?
static void free_fragment_tree(struct PendingMessage *root)
Free fragment tree below root, excluding root itself.
static unsigned int is_ring_buffer_full
Is the ring buffer filled up to RING_BUFFER_SIZE.
static struct IncomingRequest * ir_tail
Tail of DLL starting at ir_head.
static int free_pending_ack_cb(void *cls, const struct GNUNET_Uuid *key, void *value)
Free pending acknowledgement.
static int check_dv_box(void *cls, const struct TransportDVBoxMessage *dvb)
Communicator gave us a DV box.
static void completed_pending_message(struct PendingMessage *pm)
We have completed transmission of pm, remove it from the transmission queues (and if it is a fragment...
static void update_dvh_performance(struct DistanceVectorHop *dvh, struct GNUNET_TIME_Relative rtt, uint16_t bytes_transmitted_ok)
We have successfully transmitted data via dvh, update metrics.
struct GNUNET_NAT_Handle * nh
Handle for connect to the NAT service.
static int check_add_queue_message(void *cls, const struct GNUNET_TRANSPORT_AddQueueMessage *aqm)
New queue became available.
static void client_send_response(struct PendingMessage *pm)
Send a response to the pm that we have processed a "send" request.
GNUNET_SERVICE_MAIN(GNUNET_OS_project_data_gnunet(), "transport", GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_fixed_size(suggest, GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST, struct ExpressPreferenceMessage, NULL), GNUNET_MQ_hd_fixed_size(suggest_cancel, GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST_CANCEL, struct ExpressPreferenceMessage, NULL), GNUNET_MQ_hd_var_size(request_hello_validation, GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_HELLO_VALIDATION, struct RequestHelloValidationMessage, NULL), GNUNET_MQ_hd_fixed_size(client_start, GNUNET_MESSAGE_TYPE_TRANSPORT_START, struct StartMessage, NULL), GNUNET_MQ_hd_var_size(client_send, GNUNET_MESSAGE_TYPE_TRANSPORT_SEND, struct OutboundMessage, NULL), GNUNET_MQ_hd_fixed_size(client_recv_ok, GNUNET_MESSAGE_TYPE_TRANSPORT_RECV_OK, struct RecvOkMessage, NULL), GNUNET_MQ_hd_var_size(communicator_available, GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR, struct GNUNET_TRANSPORT_CommunicatorAvailableMessage, NULL), GNUNET_MQ_hd_var_size(communicator_backchannel, GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL, struct GNUNET_TRANSPORT_CommunicatorBackchannel, NULL), GNUNET_MQ_hd_var_size(add_address, GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS, struct GNUNET_TRANSPORT_AddAddressMessage, NULL), GNUNET_MQ_hd_fixed_size(del_address, GNUNET_MESSAGE_TYPE_TRANSPORT_DEL_ADDRESS, struct GNUNET_TRANSPORT_DelAddressMessage, NULL), GNUNET_MQ_hd_var_size(incoming_msg, GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG, struct GNUNET_TRANSPORT_IncomingMessage, NULL), GNUNET_MQ_hd_fixed_size(queue_create_ok, GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK, struct GNUNET_TRANSPORT_CreateQueueResponse, NULL), GNUNET_MQ_hd_fixed_size(queue_create_fail, GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_FAIL, struct GNUNET_TRANSPORT_CreateQueueResponse, NULL), GNUNET_MQ_hd_var_size(add_queue_message, GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP, struct GNUNET_TRANSPORT_AddQueueMessage, NULL), GNUNET_MQ_hd_fixed_size(update_queue_message, GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_UPDATE, struct GNUNET_TRANSPORT_UpdateQueueMessage, NULL), GNUNET_MQ_hd_fixed_size(del_queue_message, GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN, struct GNUNET_TRANSPORT_DelQueueMessage, NULL), GNUNET_MQ_hd_fixed_size(send_message_ack, GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG_ACK, struct GNUNET_TRANSPORT_SendMessageToAck, NULL), GNUNET_MQ_hd_fixed_size(burst_finished, GNUNET_MESSAGE_TYPE_TRANSPORT_BURST_FINISHED, struct GNUNET_TRANSPORT_BurstFinished, NULL), GNUNET_MQ_hd_fixed_size(monitor_start, GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_START, struct GNUNET_TRANSPORT_MonitorStart, NULL), GNUNET_MQ_handler_end())
Define "main" method using service macro.
static void start_dv_learn(void *cls)
Task run when we CONSIDER initiating a DV learn process.
static int dv_neighbour_selection(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Function called for each neighbour during handle_dv_learn.
static void start_address_validation(const struct GNUNET_PeerIdentity *pid, const char *address)
Start address validation.
static void handle_del_queue_message(void *cls, const struct GNUNET_TRANSPORT_DelQueueMessage *dqm)
Queue to a peer went down.
#define QUEUE_LENGTH_LIMIT
How many messages can we have pending for a given queue (queue to a particular peer via a communicato...
static void update_backtalker_monotime(struct Backtalker *b)
The backtalker b monotonic time changed.
#define MAX_CUMMULATIVE_ACKS
Maximum number of messages we acknowledge together in one cumulative ACK.
#define MAX_DV_HOPS_ALLOWED
Maximum DV distance allowed ever.
static void burst_timeout(void *cls)
#define BACKCHANNEL_INACTIVITY_TIMEOUT
How long do we cache backchannel (struct Backtalker) information after a backchannel goes inactive?
static struct GNUNET_TIME_Relative get_network_latency(const struct TransportDVLearnMessage *dvl)
static void hello_for_client_error_cb(void *cls)
static void check_for_global_natted(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
#define ADDRESS_VALIDATION_LIFETIME
How long do we consider an address valid if we just checked?
static void free_distance_vector_hop(struct DistanceVectorHop *dvh)
Free a dvh.
#define MAX_FC_RETRANSMIT_COUNT
Maximum number of FC retransmissions for a running retransmission task.
static void sign_ephemeral(struct DistanceVector *dv)
Sign ephemeral keys in our dv are current.
static void handle_fragment_box(void *cls, const struct TransportFragmentBoxMessage *fb)
Communicator gave us a fragment.
static struct PendingMessage * fragment_message(struct Queue *queue, struct DistanceVectorHop *dvh, struct PendingMessage *pm)
Fragment the given pm to the given mtu.
static struct GNUNET_SCHEDULER_Task * validation_task
Task to run address validation.
static void handle_suggest(void *cls, const struct ExpressPreferenceMessage *msg)
We have received a struct ExpressPreferenceMessage from an application client.
static void cores_send_connect_info(const struct GNUNET_PeerIdentity *pid)
Send message to CORE clients that we gained a connection.
static void cummulative_ack(const struct GNUNET_PeerIdentity *pid, const struct AcknowledgementUUIDP *ack_uuid, struct GNUNET_TIME_Absolute max_delay)
Transmit an acknowledgement for ack_uuid to pid delaying transmission by at most ack_delay.
static void task_consider_sending_fc(void *cls)
Something changed on the virtual link with respect to flow control.
#define DV_LEARN_QUALITY_THRESHOLD
How many good connections (confirmed, bi-directional, not DV) do we need to have to suppress initiati...
static void free_neighbour(struct Neighbour *neighbour, enum GNUNET_GenericReturnValue drop_link)
Release memory used by neighbour.
PendingMessageType
Types of different pending messages.
@ PMT_FRAGMENT_BOX
Fragment box.
@ PMT_DV_BOX
Pending message created during forward_dv_box().
@ PMT_CORE
Ordinary message received from the CORE service.
@ PMT_RELIABILITY_BOX
Reliability box.
static struct GNUNET_TIME_Relative calculate_rtt(struct DistanceVector *dv)
static int check_flow_control(void *cls, const struct TransportFlowControlMessage *fc)
Communicator gave us a transport address validation response.
static int stop_peer_request(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Stop the peer request in value.
static void handle_update_queue_message(void *cls, const struct GNUNET_TRANSPORT_UpdateQueueMessage *msg)
Handle updates to queues.
static void cores_send_disconnect_info(const struct GNUNET_PeerIdentity *pid)
Send message to CORE clients that we lost a connection.
static void handle_client_start(void *cls, const struct StartMessage *start)
Initialize a "CORE" client.
#define MAX_DV_PATHS_TO_TARGET
Maximum number of DV paths we keep simultaneously to the same target.
static void free_virtual_link(struct VirtualLink *vl)
Free virtual link.
RouteMessageOptions
Which transmission options are allowable for transmission? Interpreted bit-wise!
@ RMO_UNCONFIRMED_ALLOWED
We are allowed to use unconfirmed queues or DV routes for this message.
@ RMO_DV_ALLOWED
We are allowed to use DV routing for this hdr.
@ RMO_REDUNDANT
If we have multiple choices, it is OK to send this message over multiple channels at the same time to...
@ RMO_NONE
Only confirmed, non-DV direct neighbours.
@ RMO_ANYTHING_GOES
Reliable and unreliable, DV and non-DV are all acceptable.
static struct GNUNET_CRYPTO_EddsaPrivateKey * GST_my_private_key
Our private key.
static int notify_client_queues(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Iterator telling new MONITOR client about all existing queues to peers.
static struct AddressListEntry * create_address_entry(struct TransportClient *tc, struct GNUNET_TIME_Relative expiration, enum GNUNET_NetworkType nt, const char *address, uint32_t aid, size_t slen)
static void extract_box_cb(void *cls, struct Neighbour *next_hop, const struct GNUNET_MessageHeader *hdr, enum RouteMessageOptions options)
Function to call to further operate on the now DV encapsulated message hdr, forwarding it via next_ho...
static void backtalker_monotime_cb(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Function called with the monotonic time of a backtalker by PEERSTORE.
static void handle_burst_finished()
The burst finished.
static void queue_burst(void *cls)
static void handle_monitor_start(void *cls, const struct GNUNET_TRANSPORT_MonitorStart *start)
Initialize a monitor client.
static struct GNUNET_PEERSTORE_Handle * peerstore
Database for peer's HELLOs.
static void finish_cmc_handling(struct CommunicatorMessageContext *cmc)
static int learn_dv_path(const struct GNUNET_PeerIdentity *path, unsigned int path_len, struct GNUNET_TIME_Relative network_latency, struct GNUNET_TIME_Absolute path_valid_until)
We have learned a path through the network to some other peer, add it to our DV data structure (retur...
static void store_pi(void *cls)
Ask peerstore to store our address.
#define FC_NO_CHANGE_REPLY_PROBABILITY
What is the 1:n chance that we send a Flow control response when receiving a flow control message tha...
static void notify_monitors(const struct GNUNET_PeerIdentity *peer, const char *address, enum GNUNET_NetworkType nt, const struct MonitorEvent *me)
Send information in me about a peer's status with respect to some address to all monitors that care.
static struct GNUNET_TIME_Relative route_via_neighbour(const struct Neighbour *n, const struct GNUNET_MessageHeader *hdr, enum RouteMessageOptions options)
Pick a queue of n under constraints options and schedule transmission of hdr.
#define RECV_WINDOW_SIZE
Window size.
static int check_known_challenge(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Test if the validation state in value matches the challenge from cls.
static unsigned int check_for_queue_with_higher_prio(struct Queue *queue, struct Queue *queue_head)
Check if the communicator has another queue with higher prio ready for sending.
#define GOODPUT_AGING_SLOTS
Number of slots we keep of historic data for computation of goodput / message loss ratio.
static int free_validation_state_cb(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Free validation state.
static int free_neighbour_cb(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Free neighbour entry.
static void handle_client_send(void *cls, const struct OutboundMessage *obm)
Client asked for transmission to a peer.
static enum GNUNET_GenericReturnValue burst_running
Is there a burst running?
struct GNUNET_HELLO_Builder * GST_my_hello
Our HELLO.
static void start_burst(void *cls)
#define DV_QUALITY_RTT_THRESHOLD
We only consider queues as "quality" connections when suppressing the generation of DV initiation mes...
static struct TransportClient * clients_head
Head of linked list of all clients to this service.
static void handle_validation_challenge(void *cls, const struct TransportValidationChallengeMessage *tvc)
Communicator gave us a transport address validation challenge.
static void dv_hmac(const struct DVKeyState *key, struct GNUNET_HashCode *hmac, const void *data, size_t data_size)
Do HMAC calculation for backchannel messages over data using key material from key.
#define COMMUNICATOR_TOTAL_QUEUE_LIMIT
How many messages can we have pending for a given communicator process before we start to throttle th...
static void free_reassembly_context(struct ReassemblyContext *rc)
Free rc.
static struct VirtualLink * lookup_virtual_link(const struct GNUNET_PeerIdentity *pid)
Lookup virtual link for peer pid.
static int check_connection_quality(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Check whether any queue to the given neighbour is of a good "quality" and if so, increment the counte...
static void reorder_root_pm(struct PendingMessage *pm, struct GNUNET_TIME_Absolute next_attempt)
static void core_env_sent_cb(void *cls)
Function called when we are done giving a message of a certain size to CORE and should thus decrement...
static unsigned int ir_total
Length of the DLL starting at ir_head.
static int in_shutdown
Indication if we have received a shutdown signal and are in the process of cleaning up.
static void select_best_pending_from_link(struct PendingMessageScoreContext *sc, struct Queue *queue, struct VirtualLink *vl, struct DistanceVectorHop *dvh, size_t overhead)
Select the best pending message from vl for transmission via queue.
static void suggest_to_connect(const struct GNUNET_PeerIdentity *pid, const char *address)
Signature of a function called with a communicator address of a peer pid that an application wants us...
static void free_timedout_queue_entry(void *cls)
static void handle_send_message_ack(void *cls, const struct GNUNET_TRANSPORT_SendMessageToAck *sma)
Message was transmitted.
static void shutdown_task(void *cls)
static void update_pd_age(struct PerformanceData *pd, unsigned int age)
Check if we have advanced to another age since the last time.
#define DV_LEARN_BASE_FREQUENCY
What is the non-randomized base frequency at which we would initiate DV learn messages?
struct GNUNET_SCHEDULER_Task * burst_timeout_task
static void free_pending_acknowledgement(struct PendingAcknowledgement *pa)
Release pa data structure.
static struct GNUNET_CONTAINER_MultiUuidmap * pending_acks
Map of pending acknowledgements, mapping struct AcknowledgementUUID to a struct PendingAcknowledgemen...
static struct GNUNET_CONTAINER_MultiShortmap * dvlearn_map
Map from challenges to struct LearnLaunchEntry values.
#define DV_FORWARD_TIMEOUT
If a DVBox could not be forwarded after this number of seconds we drop it.
static void finish_handling_raw_message(struct VirtualLink *vl, const struct GNUNET_MessageHeader *mh, struct CommunicatorMessageContext *cmc, unsigned int free_cmc)
static void handle_add_queue_message(void *cls, const struct GNUNET_TRANSPORT_AddQueueMessage *aqm)
New queue became available.
static void update_queue_performance(struct Queue *q, struct GNUNET_TIME_Relative rtt, uint16_t bytes_transmitted_ok)
We have successfully transmitted data via q, update metrics.
static void schedule_transmit_on_queue(struct GNUNET_TIME_Relative delay, struct Queue *queue, enum GNUNET_SCHEDULER_Priority p)
Called whenever something changed that might effect when we try to do the next transmission on queue ...
static void set_pending_message_uuid(struct PendingMessage *pm)
If necessary, generates the UUID for a pm.
static void free_pending_message(struct PendingMessage *pm)
Release memory associated with pm and remove pm from associated data structures.
static void revalidation_start_cb(void *cls)
static void backtalker_monotime_store_cb(void *cls, int success)
Function called by PEERSTORE when the store operation of a backtalker's monotonic time is complete.
static void do_shutdown(void *cls)
Function called when the service shuts down.
static int free_reassembly_cb(void *cls, uint32_t key, void *value)
function called to free_reassembly_context().
static void * client_connect_cb(void *cls, struct GNUNET_SERVICE_Client *client, struct GNUNET_MQ_Handle *mq)
Called whenever a client connects.
#define DV_PATH_VALIDITY_TIMEOUT
How long do we consider a DV path valid if we see no further updates on it? Note: the value chosen he...
#define RING_BUFFER_SIZE
Size of ring buffer to cache CORE and forwarded DVBox messages.
static void check_vl_transmission(struct VirtualLink *vl)
There is a message at the head of the pending messages for vl which may be ready for transmission.
static int find_by_message_uuid(void *cls, uint32_t key, void *value)
Iterator called to find a reassembly context by the message UUID in the multihashmap32.
static struct TransportClient * lookup_communicator(const char *prefix)
Find transport client providing communication service for the protocol prefix.
static unsigned int ring_buffer_head
Head of the ring buffer.
#define MAX_ADDRESS_VALID_UNTIL
When do we forget an invalid address for sure?
static void handle_hello_for_client(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Function called by PEERSTORE for each matching record.
static void handle_suggest_cancel(void *cls, const struct ExpressPreferenceMessage *msg)
We have received a struct ExpressPreferenceMessage from an application client.
static void update_performance_data(struct PerformanceData *pd, struct GNUNET_TIME_Relative rtt, uint16_t bytes_transmitted_ok)
Update pd based on the latest rtt and the number of bytes that were confirmed to be successfully tran...
static void forward_dv_box(struct Neighbour *next_hop, struct TransportDVBoxMessage *hdr, uint16_t total_hops, uint16_t num_hops, const struct GNUNET_PeerIdentity *hops, const void *enc_payload, uint16_t enc_payload_size)
Create a DV Box message and queue it for transmission to next_hop.
static void handle_validation_response(void *cls, const struct TransportValidationResponseMessage *tvr)
Communicator gave us a transport address validation response.
static void handle_reliability_ack(void *cls, const struct TransportReliabilityAckMessage *ra)
Communicator gave us a reliability ack.
static void send_msg_from_cache(struct VirtualLink *vl)
static void free_address_list_entry(struct AddressListEntry *ale)
Free ale.
static unsigned int pick_random_dv_hops(const struct DistanceVector *dv, enum RouteMessageOptions options, struct DistanceVectorHop **hops_array, unsigned int hops_array_length)
Pick hops_array_length random DV paths satisfying options.
static void hello_for_incoming_sync_cb(void *cls)
static enum GNUNET_GenericReturnValue resume_communicators(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
static struct GNUNET_CONTAINER_MultiPeerMap * neighbours
Map from PIDs to struct Neighbour entries.
static void transmit_on_queue(void *cls)
We believe we are ready to transmit a message on a queue.
static void handle_dv_learn(void *cls, const struct TransportDVLearnMessage *dvl)
Communicator gave us a DV learn message.
static void iterate_address_start_burst(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
static struct Queue * find_queue(const struct GNUNET_PeerIdentity *pid, const char *address)
Find the queue matching pid and address.
static void activate_core_visible_dv_path(struct DistanceVectorHop *hop)
The hop is a validated path to the respective target peer and we should tell core about it – and sche...
static void free_dv_route(struct DistanceVector *dv)
Free entry in dv_routes.
static unsigned int is_ring_buffer_dv_full
Is the ring buffer filled up to RING_BUFFER_SIZE.
static int check_communicator_backchannel(void *cls, const struct GNUNET_TRANSPORT_CommunicatorBackchannel *cb)
Communicator requests backchannel transmission.
#define DEFAULT_WINDOW_SIZE
How big is the flow control window size by default; limits per-neighbour RAM utilization.
static void run(void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service)
Initiate transport service.
#define MAX_VALIDATION_CHALLENGE_FREQ
What is the slowest rate at which we send challenges?
static void handle_queue_create_ok(void *cls, const struct GNUNET_TRANSPORT_CreateQueueResponse *cqr)
Communicator tells us that our request to create a queue "worked", that is setting up the queue is no...
static int notify_client_connect_info(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Iterator telling new CORE client about all existing connections to peers.
static void shc_cont(void *cls, int success)
static void handle_raw_message(void *cls, const struct GNUNET_MessageHeader *mh)
Communicator gave us an unencapsulated message to pass as-is to CORE.
static void handle_communicator_backchannel(void *cls, const struct GNUNET_TRANSPORT_CommunicatorBackchannel *cb)
Communicator requests backchannel transmission.
static unsigned long long logging_uuid_gen
Generator of logging_uuid in struct PendingMessage.
static int check_incoming_msg(void *cls, const struct GNUNET_TRANSPORT_IncomingMessage *im)
Client notified us about transmission from a peer.
#define REASSEMBLY_EXPIRATION
How long do we keep partially reassembled messages around before giving up?
static void update_next_challenge_time(struct ValidationState *vs, struct GNUNET_TIME_Absolute new_time)
Set the time for next_challenge of vs to new_time.
static struct Neighbour * lookup_neighbour(const struct GNUNET_PeerIdentity *pid)
Lookup neighbour for peer pid.
static void peerstore_store_own_cb(void *cls, int success)
Function called when peerstore is done storing our address.
static struct RingBufferEntry * ring_buffer[RING_BUFFER_SIZE]
Ring buffer for a CORE message we did not deliver to CORE, because of missing virtual link to sender.
#define MIN_DELAY_ADDRESS_VALIDATION
What is the maximum frequency at which we do address validation? A random value between 0 and this va...
static void handle_acknowledged(struct PendingAcknowledgement *pa, struct GNUNET_TIME_Relative ack_delay)
The pa was acknowledged, process the acknowledgement.
static struct GNUNET_CONTAINER_MultiPeerMap * backtalkers
Map from PIDs to struct Backtalker entries.
static struct GNUNET_TIME_Absolute hello_mono_time
Monotonic time we use for HELLOs generated at this time.
static int check_communicator_available(void *cls, const struct GNUNET_TRANSPORT_CommunicatorAvailableMessage *cam)
Communicator started.
static void handle_backchannel_encapsulation(void *cls, const struct TransportBackchannelEncapsulationMessage *be)
Communicator gave us a backchannel encapsulation.
static struct GNUNET_CONTAINER_MultiHashMap * revalidation_map
Map from addresses to struct ValidationState entries describing addresses we are aware of and their v...
static const struct GNUNET_CONFIGURATION_Handle * GST_cfg
Configuration handle.
static enum GNUNET_GenericReturnValue revalidate_map_it(void *cls, const struct GNUNET_HashCode *key, void *value)
#define DEFAULT_ACK_WAIT_DURATION
Default value for how long we wait for reliability ack.
static struct PendingMessage * reliability_box_message(struct Queue *queue, struct DistanceVectorHop *dvh, struct PendingMessage *pm)
Reliability-box the given pm.
static int free_backtalker_cb(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Callback to free backtalker records.
static enum GNUNET_GenericReturnValue contains_address(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
static void path_cleanup_cb(void *cls)
Task called when we should check if any of the DV paths we have learned to a target are due for garba...
#define FAST_VALIDATION_CHALLENGE_FREQ
What is the fastest rate at which we send challenges if we keep learning an address (gossip,...
static int check_add_address(void *cls, const struct GNUNET_TRANSPORT_AddAddressMessage *aam)
Address of our peer added.
static void demultiplex_with_cmc(struct CommunicatorMessageContext *cmc)
Given an inbound message msg from a communicator cmc, demultiplex it based on the type calling the ri...
#define MAX_DV_LEARN_PENDING
Maximum number of DV learning activities we may have pending at the same time.
static void hello_for_client_cb(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
static void validation_start_cb(void *cls)
Task run periodically to validate some address based on validation_heap.
#define VALIDATION_RTT_BUFFER_FACTOR
How many network RTTs before an address validation expires should we begin trying to revalidate?...
static void handle_client_recv_ok(void *cls, const struct RecvOkMessage *rom)
Client confirms that it is done handling message(s) to a particular peer.
static struct GNUNET_CONTAINER_MultiPeerMap * links
Map from PIDs to struct VirtualLink entries describing links CORE knows to exist.
static int check_client_send(void *cls, const struct OutboundMessage *obm)
Client asked for transmission to a peer.
static int check_backchannel_encapsulation(void *cls, const struct TransportBackchannelEncapsulationMessage *be)
Communicator gave us a backchannel encapsulation.
static struct TransportClient * clients_tail
Tail of linked list of all clients to this service.
static struct GNUNET_CONTAINER_MultiPeerMap * ack_cummulators
Map from PIDs to struct AcknowledgementCummulators.
static void transmit_cummulative_ack_cb(void *cls)
Do the transmission of a cumulative acknowledgement now.
static int check_validation_request_pending(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
A new queue has been created, check if any address validation requests have been waiting for it.
static struct GNUNET_STATISTICS_Handle * GST_stats
Statistics handle.
static struct GNUNET_SCHEDULER_Task * burst_task
The task to start the burst.
static struct GNUNET_TIME_Relative encapsulate_for_dv(struct DistanceVector *dv, unsigned int num_dvhs, struct DistanceVectorHop **dvhs, const struct GNUNET_MessageHeader *hdr, DVMessageHandler use, void *use_cls, enum RouteMessageOptions options, enum GNUNET_GenericReturnValue without_fc)
Pick a path of dv under constraints options and schedule transmission of hdr.
static void neighbour_store_dvmono_cb(void *cls, int success)
Function called when peerstore is done storing a DV monotonic time.
static void handle_request_hello_validation(void *cls, const struct RequestHelloValidationMessage *m)
A client encountered an address of another peer.
static void free_queue_entry(struct QueueEntry *qe, struct TransportClient *tc)
static void check_for_global_natted_sync_cb(void *cls)
static void handle_reliability_box(void *cls, const struct TransportReliabilityBoxMessage *rb)
Communicator gave us a reliability box.
static void notify_monitor(struct TransportClient *tc, const struct GNUNET_PeerIdentity *peer, const char *address, enum GNUNET_NetworkType nt, const struct MonitorEvent *me)
Notify monitor tc about an event.
static void check_for_burst_address(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
static unsigned int check_next_attempt_tree(struct PendingMessage *pm, struct PendingMessage *root)
static void hello_for_incoming_error_cb(void *cls)
static void queue_send_msg(struct Queue *queue, struct PendingMessage *pm, const void *payload, size_t payload_size)
Send the message payload on queue.
static void dv_setup_key_state_from_km(const struct GNUNET_ShortHashCode *km, const struct GNUNET_ShortHashCode *iv, struct DVKeyState *key)
Given the key material in km and the initialization vector iv, setup the key material for the backcha...
static void handle_flow_control(void *cls, const struct TransportFlowControlMessage *fc)
Communicator gave us a transport address validation response.
static int check_dv_learn(void *cls, const struct TransportDVLearnMessage *dvl)
Communicator gave us a DV learn message.
static void handle_hello_for_incoming(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Function called by PEERSTORE for each matching record.
static void client_disconnect_cb(void *cls, struct GNUNET_SERVICE_Client *client, void *app_ctx)
Called whenever a client is disconnected.
static int check_reliability_ack(void *cls, const struct TransportReliabilityAckMessage *ra)
Communicator gave us a reliability ack.
static void dv_encrypt(struct DVKeyState *key, const void *in, void *dst, size_t in_size)
Perform backchannel encryption using symmetric secret in key to encrypt data from in to dst.
static void iterate_address_and_compare_cb(void *cls, const struct GNUNET_PeerIdentity *pid, const char *uri)
static struct GNUNET_CONTAINER_MultiPeerMap * validation_map
Map from PIDs to struct ValidationState entries describing addresses we are aware of and their validi...
static int free_dv_routes_cb(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Free DV route entry.
static enum GNUNET_GenericReturnValue add_global_addresses(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
#define MIN_DV_PATH_LENGTH_FOR_INITIATOR
Minimum number of hops we should forward DV learn messages even if they are NOT useful for us in hope...
static void handle_queue_create_fail(void *cls, const struct GNUNET_TRANSPORT_CreateQueueResponse *cqr)
Communicator tells us that our request to create a queue failed.
static void check_link_down(void *cls)
Task run to check whether the hops of the cls still are validated, or if we need to core about discon...
static void check_for_global_natted_error_cb(void *cls)
static void finish_cmc_handling_with_continue(struct CommunicatorMessageContext *cmc, unsigned int free_cmc)
Send ACK to communicator (if requested) and free cmc.
static void forward_dv_learn(const struct GNUNET_PeerIdentity *next_hop, const struct TransportDVLearnMessage *msg, uint16_t bi_history, uint16_t nhops, const struct DVPathEntryP *hops, struct GNUNET_TIME_Absolute in_time)
Build and forward a DV learn message to next_hop.
static void handle_incoming_msg(void *cls, const struct GNUNET_TRANSPORT_IncomingMessage *im)
Incoming message.
static void validation_transmit_on_queue(struct Queue *q, struct ValidationState *vs)
The queue q (which matches the peer and address in vs) is ready for queueing.
static int free_ack_cummulator_cb(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Free acknowledgement cummulator.
static void update_pm_next_attempt(struct PendingMessage *pm, struct GNUNET_TIME_Absolute next_attempt)
Change the value of the next_attempt field of pm to next_attempt and re-order pm in the transmission ...
static int check_known_address(void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
Test if the validation state in value matches the address from cls.
enum GNUNET_GenericReturnValue use_burst
static struct GNUNET_CONTAINER_MultiPeerMap * dv_routes
Map from PIDs to struct DistanceVector entries describing known paths to the peer.
static struct GNUNET_TIME_Relative route_control_message_without_fc(struct VirtualLink *vl, const struct GNUNET_MessageHeader *hdr, enum RouteMessageOptions options)
We need to transmit hdr to target.
static void free_incoming_request(struct IncomingRequest *ir)
Release ir data structure.
#define MAX_INCOMING_REQUEST
For how many incoming connections do we try to create a virtual link for (at the same time!...
static void neighbour_dv_monotime_cb(void *cls, const struct GNUNET_PEERSTORE_Record *record, const char *emsg)
Function called with the monotonic time of a DV initiator by PEERSTORE.
void(* DVMessageHandler)(void *cls, struct Neighbour *next_hop, const struct GNUNET_MessageHeader *hdr, enum RouteMessageOptions options)
Function to call to further operate on the now DV encapsulated message hdr, forwarding it via next_ho...
static char * get_address_without_port(const char *address)
Get the IP address without the port number.
ClientType
What type of client is the struct TransportClient about?
@ CT_APPLICATION
"Application" telling us where to connect (i.e.
@ CT_MONITOR
It is a monitor, forward monitor data.
@ CT_NONE
We do not know yet (client is fresh).
@ CT_CORE
Is the CORE service, we need to forward traffic to it.
@ CT_COMMUNICATOR
It is a communicator, use for communication.
static int validate_dv_initiator_signature(struct GNUNET_TIME_AbsoluteNBO sender_monotonic_time, const struct GNUNET_PeerIdentity *init, const struct GNUNET_CRYPTO_ChallengeNonceP *challenge, const struct GNUNET_CRYPTO_EddsaSignature *init_sig)
Check signature of type GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR.
static struct IncomingRequest * ir_head
List of incoming connections where we are trying to get a connection back established.
static void free_backtalker(struct Backtalker *b)
Free data structures associated with b.
static void hello_for_client_sync_cb(void *cls)
static void destroy_ack_cummulator(void *cls)
Clean up an idle cumulative acknowledgement data structure.
static void consider_sending_fc(void *cls)
Something changed on the virtual link with respect to flow control.
static unsigned int bsize
static struct GNUNET_PeerIdentity pid
Identity of the peer we transmit to / connect to.
static struct GNUNET_TRANSPORT_PluginMonitor * pm
Handle if we are monitoring plugin session activity.
static struct GNUNET_OS_Process * p
Helper process we started.
static struct GNUNET_TIME_Relative duration
Option '-d': duration of the mapping.
static void queue(const char *hostname)
Add hostname to the list of requests to be made.
Helper library for handling HELLO URIs.
API to the peerstore service.
#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE
Signature by a peer affirming that it received a challenge (and stating how long it expects the addre...
#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL
Signature by a peer affirming that the given ephemeral key is currently in use by that peer's transpo...
#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR
Signature by a peer affirming that it originated the DV path.
#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP
Signature by a peer affirming that it is on a DV path.
API to create, modify and access statistics.
API of the transport service towards the communicator processes.
#define GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED
Queue length.
GNUNET_TRANSPORT_CommunicatorCharacteristics
What characteristics does this communicator have?
GNUNET_TRANSPORT_ConnectionStatus
Possible states of a connection.
@ GNUNET_TRANSPORT_CC_RELIABLE
Transmission is reliabile (with ACKs), e.g.
@ GNUNET_TRANSPORT_CS_DOWN
Connection is down.
enum GNUNET_GenericReturnValue GNUNET_CONFIGURATION_get_value_yesno(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option)
Get a configuration value that should be in a set of "YES" or "NO".
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_kem_decaps(const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, const struct GNUNET_CRYPTO_HpkeEncapsulation *c, struct GNUNET_ShortHashCode *prk)
Decapsulate a key for a private EdDSA key.
uint64_t GNUNET_CRYPTO_random_u64(enum GNUNET_CRYPTO_Quality mode, uint64_t max)
Generate a random unsigned 64-bit value.
void GNUNET_CRYPTO_random_block(enum GNUNET_CRYPTO_Quality mode, void *buffer, size_t length)
Fill block with a random values.
void GNUNET_CRYPTO_eddsa_key_get_public(const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_CRYPTO_EddsaPublicKey *pub)
Extract the public key for the given private key.
uint32_t GNUNET_CRYPTO_random_u32(enum GNUNET_CRYPTO_Quality mode, uint32_t i)
Produce a random value.
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_eddsa_kem_encaps(const struct GNUNET_CRYPTO_EddsaPublicKey *pub, struct GNUNET_CRYPTO_HpkeEncapsulation *c, struct GNUNET_ShortHashCode *prk)
Encapsulate key material for a EdDSA public key.
#define GNUNET_CRYPTO_eddsa_sign(priv, ps, sig)
EdDSA sign a given block.
#define GNUNET_CRYPTO_eddsa_verify(purp, ps, sig, pub)
Verify EdDSA signature.
void GNUNET_CRYPTO_zero_keys(void *buffer, size_t length)
Zero out buffer, securely against compiler optimizations.
struct GNUNET_CRYPTO_EddsaPrivateKey * GNUNET_CRYPTO_eddsa_key_create_from_configuration(const struct GNUNET_CONFIGURATION_Handle *cfg)
Create a new private key by reading our peer's key from the file specified in the configuration.
@ GNUNET_CRYPTO_QUALITY_WEAK
No good quality of the operation is needed (i.e., random numbers can be pseudo-random).
@ GNUNET_CRYPTO_QUALITY_NONCE
Randomness for IVs etc.
#define GNUNET_CONTAINER_MDLL_remove(mdll, head, tail, element)
Remove an element from a MDLL.
#define GNUNET_CONTAINER_MDLL_insert_tail(mdll, head, tail, element)
Insert an element at the tail of a MDLL.
#define GNUNET_CONTAINER_MDLL_insert_after(mdll, head, tail, other, element)
Insert an element into a MDLL after the given other element.
#define GNUNET_CONTAINER_DLL_remove(head, tail, element)
Remove an element from a DLL.
#define GNUNET_CONTAINER_MDLL_insert(mdll, head, tail, element)
Insert an element at the head of a MDLL.
#define GNUNET_CONTAINER_DLL_insert(head, tail, element)
Insert an element at the head of a DLL.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
void GNUNET_CRYPTO_hmac(const struct GNUNET_CRYPTO_AuthKey *key, const void *plaintext, size_t plaintext_len, struct GNUNET_HashCode *hmac)
Calculate HMAC of a message (RFC 2104)
enum GNUNET_GenericReturnValue GNUNET_CRYPTO_hkdf_expand(void *result, size_t out_len, const struct GNUNET_ShortHashCode *prk,...)
HKDF-Expand using SHA256.
struct GNUNET_CONTAINER_MultiUuidmap * GNUNET_CONTAINER_multiuuidmap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_contains(const struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key)
Check if the map contains any value under the given key (including values that are NULL).
void * GNUNET_CONTAINER_multipeermap_get(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Given a key find a value in the map matching the key.
int GNUNET_CONTAINER_multihashmap32_get_multiple(struct GNUNET_CONTAINER_MultiHashMap32 *map, uint32_t key, GNUNET_CONTAINER_MultiHashMapIterator32Callback it, void *it_cls)
Iterate over all entries in the map that match a particular key.
int GNUNET_CONTAINER_multihashmap_iterate(struct GNUNET_CONTAINER_MultiHashMap *map, GNUNET_CONTAINER_MultiHashMapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap32_put(struct GNUNET_CONTAINER_MultiHashMap32 *map, uint32_t key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_contains(const struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key)
Check if the map contains any value under the given key (including values that are NULL).
void GNUNET_CONTAINER_multipeermap_destroy(struct GNUNET_CONTAINER_MultiPeerMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiHashMap32 * GNUNET_CONTAINER_multihashmap32_create(unsigned int len)
Create a 32-bit key multi hash map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap32_remove(struct GNUNET_CONTAINER_MultiHashMap32 *map, uint32_t key, const void *value)
Remove the given key-value pair from the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_remove(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, const void *value)
Remove the given key-value pair from the map.
int GNUNET_CONTAINER_multipeermap_iterate(struct GNUNET_CONTAINER_MultiPeerMap *map, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map.
struct GNUNET_CONTAINER_MultiShortmap * GNUNET_CONTAINER_multishortmap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multishortmap_put(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multihashmap_put(struct GNUNET_CONTAINER_MultiHashMap *map, const struct GNUNET_HashCode *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
unsigned int GNUNET_CONTAINER_multihashmap_size(const struct GNUNET_CONTAINER_MultiHashMap *map)
Get the number of key-value pairs in the map.
void GNUNET_CONTAINER_multihashmap_destroy(struct GNUNET_CONTAINER_MultiHashMap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiHashMap * GNUNET_CONTAINER_multihashmap_create(unsigned int len, int do_not_copy_keys)
Create a multi hash map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multiuuidmap_remove(struct GNUNET_CONTAINER_MultiUuidmap *map, const struct GNUNET_Uuid *key, const void *value)
Remove the given key-value pair from the map.
void GNUNET_CONTAINER_multiuuidmap_destroy(struct GNUNET_CONTAINER_MultiUuidmap *map)
Destroy a hash map.
struct GNUNET_CONTAINER_MultiPeerMap * GNUNET_CONTAINER_multipeermap_create(unsigned int len, int do_not_copy_keys)
Create a multi peer map (hash map for public keys of peers).
void GNUNET_CONTAINER_multishortmap_destroy(struct GNUNET_CONTAINER_MultiShortmap *map)
Destroy a hash map.
void GNUNET_CONTAINER_multihashmap32_destroy(struct GNUNET_CONTAINER_MultiHashMap32 *map)
Destroy a 32-bit key hash map.
int GNUNET_CONTAINER_multipeermap_get_multiple(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, GNUNET_CONTAINER_PeerMapIterator it, void *it_cls)
Iterate over all entries in the map that match a particular key.
unsigned int GNUNET_CONTAINER_multishortmap_size(const struct GNUNET_CONTAINER_MultiShortmap *map)
Get the number of key-value pairs in the map.
unsigned int GNUNET_CONTAINER_multipeermap_size(const struct GNUNET_CONTAINER_MultiPeerMap *map)
Get the number of key-value pairs in the map.
int GNUNET_CONTAINER_multipeermap_put(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
int GNUNET_CONTAINER_multihashmap32_iterate(struct GNUNET_CONTAINER_MultiHashMap32 *map, GNUNET_CONTAINER_MultiHashMapIterator32Callback it, void *it_cls)
Iterate over all entries in the map.
int GNUNET_CONTAINER_multishortmap_remove(struct GNUNET_CONTAINER_MultiShortmap *map, const struct GNUNET_ShortHashCode *key, const void *value)
Remove the given key-value pair from the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multiuuidmap_iterate(struct GNUNET_CONTAINER_MultiUuidmap *map, GNUNET_CONTAINER_MultiUuidmapIteratorCallback it, void *it_cls)
Iterate over all entries in the map.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multiuuidmap_put(struct GNUNET_CONTAINER_MultiUuidmap *map, const struct GNUNET_Uuid *key, void *value, enum GNUNET_CONTAINER_MultiHashMapOption opt)
Store a key-value pair in the map.
void * GNUNET_CONTAINER_multiuuidmap_get(const struct GNUNET_CONTAINER_MultiUuidmap *map, const struct GNUNET_Uuid *key)
Given a key find a value in the map matching the key.
enum GNUNET_GenericReturnValue GNUNET_CONTAINER_multipeermap_remove(struct GNUNET_CONTAINER_MultiPeerMap *map, const struct GNUNET_PeerIdentity *key, const void *value)
Remove the given key-value pair from the map.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE
Allow multiple values with the same key.
@ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY
There must only be one value per key; storing a value should fail if a value under the same key alrea...
void * GNUNET_CONTAINER_heap_remove_node(struct GNUNET_CONTAINER_HeapNode *node)
Removes a node from the heap.
void * GNUNET_CONTAINER_heap_peek(const struct GNUNET_CONTAINER_Heap *heap)
Get element stored at the root of heap.
void GNUNET_CONTAINER_heap_update_cost(struct GNUNET_CONTAINER_HeapNode *node, GNUNET_CONTAINER_HeapCostType new_cost)
Updates the cost of any node in the tree.
struct GNUNET_CONTAINER_HeapNode * GNUNET_CONTAINER_heap_insert(struct GNUNET_CONTAINER_Heap *heap, void *element, GNUNET_CONTAINER_HeapCostType cost)
Inserts a new element into the heap.
struct GNUNET_CONTAINER_Heap * GNUNET_CONTAINER_heap_create(enum GNUNET_CONTAINER_HeapOrder order)
Create a new heap.
void GNUNET_CONTAINER_heap_destroy(struct GNUNET_CONTAINER_Heap *heap)
Destroys the heap.
@ GNUNET_CONTAINER_HEAP_ORDER_MIN
Heap with the minimum cost at the root.
void GNUNET_HELLO_parser_free(struct GNUNET_HELLO_Parser *parser)
Release resources of a builder.
void GNUNET_HELLO_sign_address(const char *address, enum GNUNET_NetworkType nt, struct GNUNET_TIME_Absolute mono_time, const struct GNUNET_CRYPTO_EddsaPrivateKey *private_key, void **result, size_t *result_size)
Build address record by signing raw information with private key.
struct GNUNET_HELLO_Parser * GNUNET_HELLO_parser_from_msg(const struct GNUNET_MessageHeader *msg)
Parse msg.
void GNUNET_HELLO_builder_free(struct GNUNET_HELLO_Builder *builder)
Release resources of a builder.
struct GNUNET_HELLO_Builder * GNUNET_HELLO_builder_new(const struct GNUNET_PeerIdentity *pid)
Allocate builder.
const struct GNUNET_PeerIdentity * GNUNET_HELLO_parser_iterate(const struct GNUNET_HELLO_Parser *parser, GNUNET_HELLO_UriCallback uc, void *uc_cls)
Iterate over URIs in a parser.
enum GNUNET_GenericReturnValue GNUNET_HELLO_builder_add_address(struct GNUNET_HELLO_Builder *builder, const char *address)
Add individual address to the builder.
char * GNUNET_HELLO_address_to_prefix(const char *address)
Given an address as a string, extract the prefix that identifies the communicator offering transmissi...
struct GNUNET_MQ_Envelope * GNUNET_HELLO_builder_to_env(const struct GNUNET_HELLO_Builder *builder, const struct GNUNET_CRYPTO_EddsaPrivateKey *priv, struct GNUNET_TIME_Relative expiration_time)
Generate envelope with GNUnet HELLO message (including peer ID) from a builder.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_is_zero(a)
Check that memory in a is all zeros.
uint16_t type
The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
#define GNUNET_log(kind,...)
uint64_t GNUNET_ntohll(uint64_t n)
Convert unsigned 64-bit integer to host byte order.
GNUNET_SCHEDULER_Priority
Valid task priorities.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_memcmp(a, b)
Compare memory in a and b, where both must be of the same pointer type.
uint64_t GNUNET_htonll(uint64_t n)
Convert unsigned 64-bit integer to network byte order.
#define GNUNET_ALIGN
gcc-ism to force alignment; we use this to align char-arrays that may then be cast to 'struct's.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
GNUNET_GenericReturnValue
Named constants for return values.
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
#define GNUNET_PACKED
gcc-ism to get packed structs.
@ GNUNET_SCHEDULER_PRIORITY_BACKGROUND
Run as background job (higher than idle, lower than default).
@ GNUNET_SCHEDULER_PRIORITY_DEFAULT
Run with the default priority (normal P2P operations).
const char * GNUNET_uuid2s(const struct GNUNET_Uuid *uuid)
Convert a UUID to a string (for printing debug messages).
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
const char * GNUNET_i2s(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
const char * GNUNET_sh2s(const struct GNUNET_ShortHashCode *shc)
Convert a short hash value to a string (for printing debug messages).
const char * GNUNET_i2s_full(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.
const char * GNUNET_h2s(const struct GNUNET_HashCode *hc)
Convert a hash value to a string (for printing debug messages).
const char * GNUNET_i2s2(const struct GNUNET_PeerIdentity *pid)
Convert a peer identity to a string (for printing debug messages).
#define GNUNET_EXTRA_LOGGING
define GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source tree where gnunet_config....
@ GNUNET_ERROR_TYPE_WARNING
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_DEBUG
int int GNUNET_asprintf(char **buf, const char *format,...) __attribute__((format(printf
Like asprintf, just portable.
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_strndup(a, length)
Wrapper around GNUNET_xstrndup_.
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_malloc(size)
Wrapper around malloc.
#define GNUNET_free(ptr)
Wrapper around free.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
#define GNUNET_MQ_handler_end()
End-marker for the handlers array.
#define GNUNET_MQ_check_zero_termination(m)
Insert code for a "check_" function that verifies that a given variable-length message received over ...
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
#define GNUNET_MQ_check_boxed_message(m)
Insert code for a "check_" function that verifies that a given variable-length message received over ...
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
GNUNET_MQ_PriorityPreferences
Per envelope preferences and priorities.
#define GNUNET_MQ_hd_var_size(name, code, str, ctx)
enum GNUNET_GenericReturnValue GNUNET_MQ_handle_message(const struct GNUNET_MQ_MessageHandler *handlers, const struct GNUNET_MessageHeader *mh)
Call the message message handler that was registered for the type of the given message in the given h...
void GNUNET_MQ_notify_sent(struct GNUNET_MQ_Envelope *ev, GNUNET_SCHEDULER_TaskCallback cb, void *cb_cls)
Call a callback once the envelope has been sent, that is, sending it can not be canceled anymore.
const struct GNUNET_MessageHeader * GNUNET_MQ_env_get_msg(const struct GNUNET_MQ_Envelope *env)
Obtain message contained in envelope.
#define GNUNET_MQ_hd_fixed_size(name, code, str, ctx)
@ GNUNET_MQ_PRIO_BACKGROUND
Lowest priority, i.e.
@ GNUNET_MQ_PREF_UNRELIABLE
Flag to indicate that unreliable delivery is acceptable.
@ GNUNET_MQ_PREF_LOW_LATENCY
Flag to indicate that low latency is important.
void GNUNET_is_burst_ready(struct GNUNET_TIME_Relative rtt_average, struct GNUNET_BurstSync *burst_sync, GNUNET_SCHEDULER_TaskCallback task, struct GNUNET_StartBurstCls *task_cls)
Checks if we are ready and starts burst when we and the other peer is ready.
struct GNUNET_NAT_Handle * GNUNET_NAT_register(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *config_section, uint8_t proto, unsigned int num_addrs, const struct sockaddr **addrs, const socklen_t *addrlens, GNUNET_NAT_AddressCallback address_callback, GNUNET_NAT_ReversalCallback reversal_callback, void *callback_cls)
Attempt to enable port redirection and detect public IP address contacting UPnP or NAT-PMP routers on...
void GNUNET_NAT_unregister(struct GNUNET_NAT_Handle *nh)
Stop port redirection and public IP address detection for the given handle.
void GNUNET_NAT_add_global_address(struct GNUNET_NAT_Handle *nh, char *addr, unsigned int address_length)
Add global address to the list of addresses and notify clients.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
const struct GNUNET_OS_ProjectData * GNUNET_OS_project_data_gnunet(void)
Return default project data used by 'libgnunetutil' for GNUnet.
void GNUNET_PEERSTORE_monitor_stop(struct GNUNET_PEERSTORE_Monitor *zm)
Stop monitoring.
struct GNUNET_PEERSTORE_IterateContext * GNUNET_PEERSTORE_iteration_start(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_PEERSTORE_Processor callback, void *callback_cls)
Iterate over peerstore entries.
void GNUNET_PEERSTORE_iteration_next(struct GNUNET_PEERSTORE_IterateContext *ic, uint64_t limit)
Continue an iteration.
void GNUNET_PEERSTORE_store_cancel(struct GNUNET_PEERSTORE_StoreContext *sc)
Cancel a store request.
#define GNUNET_PEERSTORE_TRANSPORT_BACKCHANNEL_MONOTIME
Key used to store sender's monotonic time from backchannel messages.
void GNUNET_PEERSTORE_disconnect(struct GNUNET_PEERSTORE_Handle *h)
Disconnect from the PEERSTORE service.
#define GNUNET_PEERSTORE_TRANSPORT_URLADDRESS_KEY
Key used for storing addresses in URL format in the peerstore.
struct GNUNET_PEERSTORE_Monitor * GNUNET_PEERSTORE_monitor_start(const struct GNUNET_CONFIGURATION_Handle *cfg, int iterate_first, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, GNUNET_SCHEDULER_TaskCallback error_cb, void *error_cb_cls, GNUNET_SCHEDULER_TaskCallback sync_cb, void *sync_cb_cls, GNUNET_PEERSTORE_Processor callback, void *callback_cls)
Request watching a given key The monitoring can be filtered to contain only records matching peer and...
#define GNUNET_PEERSTORE_TRANSPORT_DVLEARN_MONOTIME
Key used to store sender's monotonic time from DV learn messages.
struct GNUNET_PEERSTORE_Handle * GNUNET_PEERSTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect to the PEERSTORE service.
void GNUNET_PEERSTORE_monitor_next(struct GNUNET_PEERSTORE_Monitor *zm, uint64_t limit)
Calls the monitor processor specified in GNUNET_PEERSTORE_monitor_start for the next record(s).
struct GNUNET_PEERSTORE_StoreContext * GNUNET_PEERSTORE_store(struct GNUNET_PEERSTORE_Handle *h, const char *sub_system, const struct GNUNET_PeerIdentity *peer, const char *key, const void *value, size_t size, struct GNUNET_TIME_Absolute expiry, enum GNUNET_PEERSTORE_StoreOption options, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Store a new entry in the PEERSTORE.
#define GNUNET_PEERSTORE_TRANSPORT_HELLO_KEY
Key used for storing HELLOs in the peerstore.
void GNUNET_PEERSTORE_iteration_stop(struct GNUNET_PEERSTORE_IterateContext *ic)
Cancel an iteration.
#define GNUNET_PEERSTORE_HELLO_KEY
Key used for storing HELLO in the peerstore.
struct GNUNET_PEERSTORE_StoreHelloContext * GNUNET_PEERSTORE_hello_add(struct GNUNET_PEERSTORE_Handle *h, const struct GNUNET_MessageHeader *msg, GNUNET_PEERSTORE_Continuation cont, void *cont_cls)
Add hello to peerstore.
@ GNUNET_PEERSTORE_STOREOPTION_MULTIPLE
Possibly store multiple values under given key.
@ GNUNET_PEERSTORE_STOREOPTION_REPLACE
Delete any previous values for the given key before storing the given value.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_CHALLENGE
P2P message: transport requests confirmation that an address works.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG_ACK
transport acknowledges processing an incoming message
#define GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT
Message from TRANSPORT notifying about a client that connected to us.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN
inform transport that a queue was torn down
#define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_HELLO_VALIDATION
Type of the 'struct RequestHelloValidationMessage' send by clients to TRANSPORT to trigger validation...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_START
Message from the core saying that the transport server should start giving it messages.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_DATA
Message sent to indicate to a monitor about events.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR
Message sent to indicate to the transport which address prefix is supported by a communicator.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV_OK
Message telling transport to limit its receive rate.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_FRAGMENT
Type of a fragment of a CORE message created by transport to adjust message length to a queue's MTU.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_FAIL
Response from communicator: address bogus, will not try to create queue.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX
Source-routed transport message based DV information gathered.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_BOX
Wrapper around non-fragmented CORE message used to measure RTT and ensure reliability.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST_CANCEL
Type of the 'struct ExpressPreferenceMessage' send by clients to TRANSPORT to abandon bandwidth prefe...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_RECV
Message from TRANSPORT notifying about a message that was received.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BACKCHANNEL_ENCAPSULATION
Message type used between transport services when they internally forward communicator backchannel me...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE
transport tells communicator it wants a queue
#define GNUNET_MESSAGE_TYPE_TRANSPORT_DV_LEARN
Message sent for topology discovery at transport level.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_BURST_FINISHED
Burst message we send to another peer for hole punching.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL
Tell transport that it should assist with exchanging a message between communicators.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT
Message from TRANSPORT notifying about a client that disconnected from us.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG
inform transport about an incoming message
#define GNUNET_MESSAGE_TYPE_TRANSPORT_START_BURST
Burst message we send to another peer for hole punching.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE_OK
Response from communicator: will try to create queue.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL_INCOMING
Transport signalling incoming backchannel message to a communicator.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG_ACK
communicator tells transports that message was sent
#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS
inform transport to add an address of this peer
#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_START
Message sent to indicate to the transport that a monitor wants to observe certain events.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_DEL_ADDRESS
inform transport to delete an address of this peer
#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_RESPONSE
P2P message: transport proves that an address worked.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL
Transport signalling incoming backchannel message to a communicator.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG
transport tells communicator it wants to transmit
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND
Request to TRANSPORT to transmit a message.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK
Confirmation from TRANSPORT that message for transmission has been queued (and that the next message ...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_ACK
Confirmation for a GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_BOX.
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP
inform transport that a queue was setup to talk to some peer
#define GNUNET_MESSAGE_TYPE_TRANSPORT_SUGGEST
Type of the 'struct ExpressPreferenceMessage' send by clients to TRANSPORT to establish bandwidth pre...
#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_UPDATE
inform transport that a queue was updated
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_at(struct GNUNET_TIME_Absolute at, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run at the specified time.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed_with_priority(struct GNUNET_TIME_Relative delay, enum GNUNET_SCHEDULER_Priority priority, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
void GNUNET_SERVICE_client_mark_monitor(struct GNUNET_SERVICE_Client *c)
Set the 'monitor' flag on this client.
void GNUNET_SERVICE_client_drop(struct GNUNET_SERVICE_Client *c)
Ask the server to disconnect from the given client.
void GNUNET_SERVICE_client_continue(struct GNUNET_SERVICE_Client *c)
Continue receiving further messages from the given client.
@ GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN
Trigger a SOFT server shutdown on signals, allowing active non-monitor clients to complete their tran...
struct GNUNET_STATISTICS_Handle * GNUNET_STATISTICS_create(const char *subsystem, const struct GNUNET_CONFIGURATION_Handle *cfg)
Get handle for the statistics service.
void GNUNET_STATISTICS_update(struct GNUNET_STATISTICS_Handle *handle, const char *name, int64_t delta, int make_persistent)
Set statistic value for the peer.
void GNUNET_STATISTICS_destroy(struct GNUNET_STATISTICS_Handle *h, int sync_first)
Destroy a handle (free all state associated with it).
struct GNUNET_TIME_Relative GNUNET_TIME_relative_min(struct GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2)
Return the minimum of two relative time values.
const char * GNUNET_TIME_relative2s(struct GNUNET_TIME_Relative delta, bool do_round)
Give relative time in human-readable fancy format.
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh(struct GNUNET_TIME_RelativeNBO a)
Convert relative time from network byte order.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration(struct GNUNET_TIME_Absolute whence)
Get the duration of an operation as the difference of the current time and the given start time "henc...
#define GNUNET_TIME_relative_cmp(t1, op, t2)
Compare two relative times.
#define GNUNET_TIME_UNIT_SECONDS
One second.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining(struct GNUNET_TIME_Absolute future)
Given a timestamp in the future, how much time remains until then?
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max(struct GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2)
Return the maximum of two absolute time values.
const char * GNUNET_STRINGS_relative_time_to_string(struct GNUNET_TIME_Relative delta, int do_round)
Give relative time in human-readable fancy format.
struct GNUNET_TIME_Relative GNUNET_TIME_randomized_backoff(struct GNUNET_TIME_Relative rt, struct GNUNET_TIME_Relative threshold)
Randomized exponential back-off, starting at 1 ms and going up by a factor of 2+r,...
struct GNUNET_TIME_Relative GNUNET_TIME_relative_subtract(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Subtract relative timestamp from the other.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get(void)
Get the current time.
#define GNUNET_TIME_UNIT_MINUTES
One minute.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply_double(struct GNUNET_TIME_Relative rel, double factor)
Multiply relative time by a given factor.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh(struct GNUNET_TIME_AbsoluteNBO a)
Convert absolute time from network byte order.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_add(struct GNUNET_TIME_Relative a1, struct GNUNET_TIME_Relative a2)
Add relative times together.
struct GNUNET_TIME_Relative GNUNET_TIME_randomize(struct GNUNET_TIME_Relative r)
Return a random time value between 0.5*r and 1.5*r.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Subtract a given relative duration from the given start time.
struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute(struct GNUNET_TIME_Relative rel)
Convert relative time to an absolute time in the future.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Multiply relative time by a given factor.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min(struct GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2)
Return the minimum of two absolute time values.
#define GNUNET_TIME_UNIT_ZERO
Relative time zero.
struct GNUNET_TIME_RelativeNBO GNUNET_TIME_relative_hton(struct GNUNET_TIME_Relative a)
Convert relative time to network byte order.
#define GNUNET_TIME_absolute_cmp(t1, op, t2)
Compare two absolute times.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Relative duration)
Add a given relative duration to the given start time.
#define GNUNET_TIME_UNIT_ZERO_ABS
Absolute time zero.
struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_monotonic(const struct GNUNET_CONFIGURATION_Handle *cfg)
Obtain the current time and make sure it is monotonically increasing.
struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide(struct GNUNET_TIME_Relative rel, unsigned long long factor)
Divide relative time by a given factor.
struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference(struct GNUNET_TIME_Absolute start, struct GNUNET_TIME_Absolute end)
Compute the time difference between the given start and end times.
struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton(struct GNUNET_TIME_Absolute a)
Convert absolute time to network byte order.
const char * GNUNET_STRINGS_absolute_time_to_string(struct GNUNET_TIME_Absolute t)
Like asctime, except for GNUnet time.
#define GNUNET_TIME_UNIT_FOREVER_ABS
Constant used to specify "forever".
static unsigned int size
Size of the "table".
static struct GNUNET_SCHEDULER_TaskContext tc
Task context of the current task.
void receiver(void *cls, const void *buf, size_t available, const struct sockaddr *addr, socklen_t addrlen, int errCode)
Callback to read from the SOCKS5 proxy.
static struct GNUNET_TIME_Relative delta
Data structure in which we track acknowledgements still to be sent to the.
struct GNUNET_SCHEDULER_Task * task
Task scheduled either to transmit the cumulative ACK message, or to clean up this data structure afte...
struct GNUNET_TIME_Absolute min_transmission_time
When is task run (only used if num_acks is non-zero)?
struct TransportCummulativeAckPayload ack_uuids[64]
ACK data being accumulated.
struct GNUNET_PeerIdentity target
Target peer for which we are accumulating ACKs here.
unsigned int num_acks
Number of entries used in ack_uuids.
uint32_t ack_counter
Counter to produce the ack_counter in the struct TransportReliabilityAckMessage.
Unique identifier to map an acknowledgement to a transmission.
struct GNUNET_Uuid value
The UUID value.
One of the addresses of this peer.
struct GNUNET_TIME_Relative expiration
What is a typical lifetime the communicator expects this address to have? (Always from now....
uint32_t aid
Address identifier used by the communicator.
size_t signed_address_len
Signed address length.
enum GNUNET_NetworkType nt
Network type offered by this address.
struct AddressListEntry * prev
Kept in a DLL.
struct TransportClient * tc
Which communicator provides this address?
struct AddressListEntry * next
Kept in a DLL.
struct GNUNET_PEERSTORE_StoreHelloContext * shc
Store hello handle.
void * signed_address
Signed address.
const char * address
The actual address.
struct GNUNET_SCHEDULER_Task * st
Task to periodically do st operation.
struct GNUNET_PEERSTORE_StoreContext * sc
Current context for storing this address in the peerstore.
A Backtalker is a peer sending us backchannel messages.
struct GNUNET_TIME_Absolute timeout
When will this entry time out?
struct CommunicatorMessageContext * cmc
Communicator context waiting on this backchannel's get, or NULL.
struct GNUNET_CRYPTO_HpkeEncapsulation last_ephemeral
Last (valid) ephemeral key received from this sender.
struct GNUNET_PEERSTORE_StoreContext * sc
Handle to a PEERSTORE store operation for this pid's monotonic_time.
struct GNUNET_SCHEDULER_Task * task
Task associated with this backtalker.
size_t body_size
Number of bytes of the original message body that follows after this struct.
struct GNUNET_TIME_Absolute monotonic_time
Last (valid) monotonic time received from this sender.
struct GNUNET_PEERSTORE_IterateContext * get
Handle for an operation to fetch monotonic_time information from the PEERSTORE, or NULL.
struct GNUNET_PeerIdentity pid
Peer this is about.
Closure for check_known_address.
struct ValidationState * vs
Set to a matching validation state, if one was found.
const char * address
Set to the address we are looking for.
Closure for check_known_challenge.
struct ValidationState * vs
Set to a matching validation state, if one was found.
const struct GNUNET_CRYPTO_ChallengeNonceP * challenge
Set to the challenge we are looking for.
Context from handle_incoming_msg().
struct CommunicatorMessageContext * next
Kept in a DLL of struct VirtualLink if waiting for CORE flow control to unchoke.
uint16_t total_hops
Number of hops the message has travelled (if DV-routed).
struct GNUNET_TRANSPORT_IncomingMessage im
Additional information for flow control and about the sender.
unsigned int continue_send
Did we already call GNUNET_SERVICE_client_continue and send ACK to communicator?
const struct GNUNET_MessageHeader * mh
The message to demultiplex.
struct CommunicatorMessageContext * prev
Kept in a DLL of struct VirtualLink if waiting for CORE flow control to unchoke.
struct TransportClient * tc
Which communicator provided us with the message.
Message from the transport service to the library informing about neighbors.
struct GNUNET_PeerIdentity id
Identity of the new neighbour.
Closure for core_env_sent_cb.
uint16_t isize
By how much should we increment vl's incoming_fc_window_size_used once we are done sending to CORE?...
struct CoreSentContext * next
Kept in a DLL to clear vl in case vl is lost.
struct VirtualLink * vl
Virtual link this is about.
struct CoreSentContext * prev
Kept in a DLL to clear vl in case vl is lost.
uint16_t size
How big was the message.
Structure of the key material used to encrypt backchannel messages.
struct GNUNET_CRYPTO_AuthKey hmac_key
Key used for HMAC calculations (via GNUNET_CRYPTO_hmac()).
gcry_cipher_hd_t cipher
State of our block cipher.
struct DVKeyState::@65 material
Actual key material.
char aes_key[256/8]
Symmetric key to use for encryption.
char aes_ctr[128/8]
Counter value to use during setup.
An entry describing a peer on a path in a struct TransportDVLearnMessage message.
struct GNUNET_CRYPTO_EddsaSignature hop_sig
Signature of this hop over the path, of purpose GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP.
struct GNUNET_PeerIdentity hop
Identity of a peer on the path.
Message from the transport service to the library informing about disconnects.
One possible hop towards a DV target.
struct PerformanceData pd
Performance data for this transmission possibility.
struct PendingAcknowledgement * pa_head
Head of DLL of PAs that used our path.
unsigned int distance
Number of hops in total to the target (excluding next_hop and target itself).
struct DistanceVectorHop * next_neighbour
Kept in a MDLL.
struct Neighbour * next_hop
What would be the next hop to target?
struct GNUNET_TIME_Absolute timeout
At what time do we forget about this path unless we see it again while learning?
struct DistanceVector * dv
Distance vector entry this hop belongs with.
const struct GNUNET_PeerIdentity * path
Array of distance hops to the target, excluding next_hop.
struct DistanceVectorHop * next_dv
Kept in a MDLL, sorted by timeout.
struct GNUNET_TIME_Absolute path_valid_until
For how long is the validation of this path considered valid? Set to ZERO if the path is learned by s...
struct DistanceVectorHop * prev_dv
Kept in a MDLL, sorted by timeout.
struct DistanceVectorHop * prev_neighbour
Kept in a MDLL.
struct PendingAcknowledgement * pa_tail
Tail of DLL of PAs that used our path.
Entry in our dv_routes table, representing a (set of) distance vector routes to a particular peer.
struct DistanceVectorHop * dv_head
Known paths to target.
struct VirtualLink * vl
Do we have a confirmed working queue and are thus visible to CORE? If so, this is the virtual link,...
struct GNUNET_TIME_Absolute monotime
What time was sender_sig created.
struct GNUNET_CRYPTO_EddsaSignature sender_sig
Signature affirming ephemeral_key of type GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL.
struct DistanceVectorHop * dv_tail
Known paths to target.
struct GNUNET_CRYPTO_HpkeEncapsulation ephemeral_key
Our ephemeral key.
struct GNUNET_ShortHashCode * km
Master secret for the setup of the Key material for the backchannel.
struct GNUNET_PeerIdentity target
To which peer is this a route?
struct GNUNET_TIME_Absolute ephemeral_validity
How long is sender_sig valid.
struct GNUNET_SCHEDULER_Task * timeout_task
Task scheduled to purge expired paths from dv_head MDLL.
Content signed by each peer during DV learning.
struct GNUNET_PeerIdentity pred
Identity of the previous peer on the path.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge value used by the initiator to re-identify the path.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Purpose is GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP.
struct GNUNET_PeerIdentity succ
Identity of the next peer on the path.
Content signed by the initiator during DV learning.
struct GNUNET_TIME_AbsoluteNBO monotonic_time
Time at the initiator when generating the signature.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Purpose is GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge value used by the initiator to re-identify the path.
Body by which a peer confirms that it is using an ephemeral key.
struct GNUNET_TIME_AbsoluteNBO sender_monotonic_time
How long is this signature over the ephemeral key valid?
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Purpose is GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL.
struct GNUNET_PeerIdentity target
Target's peer identity.
struct GNUNET_CRYPTO_HpkeEncapsulation ephemeral_key
Ephemeral key setup by the sender for target, used to encrypt the payload.
Application client to TRANSPORT service: we would like to have address suggestions for this peer.
Closure for find_by_message_uuid.
struct ReassemblyContext * rc
Set to the reassembly context if found.
struct MessageUUIDP message_uuid
UUID to look for.
32-bit bandwidth used for network exchange by GNUnet, in bytes per second.
Wrapper struct with the average RTT of message to some peer and if this peer und us is ready to sync.
enum GNUNET_GenericReturnValue sync_ready
Is this peer already ready to sync.
struct GNUNET_TIME_RelativeNBO rtt_average
The average RTT for the peer to communicate with.
Handle to a node in a heap.
Internal representation of the hash map.
Internal representation of the hash map.
Internal representation of the hash map.
Internal representation of the hash map.
Internal representation of the hash map.
type for (message) authentication keys
Type of a nonce used for challenges.
struct GNUNET_ShortHashCode value
The value of the nonce.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
uint32_t size
How many bytes does this signature sign? (including this purpose header); in network byte order (!...
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
Private ECC key encoded for transmission.
an ECC signature using EdDSA.
HPKE DHKEM encapsulation (X25519) See RFC 9180.
Context for building (or parsing) HELLO URIs.
Context for parsing HELLOs.
Handle to a message queue.
Message handler for a specific message type.
Handle for active NAT registrations.
Handle to the PEERSTORE service.
Context for a iterate request.
Context for a store request.
Context for a add hello uri request.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_CRYPTO_EddsaPublicKey public_key
Entry in list of pending tasks.
Handle to a client that is connected to a service.
Struct wrapping information we use for starting the burst.
struct VirtualLink * vl
The VirtualLink of the peer to which we like to burst with.
struct GNUNET_TIME_Relative delay
The delay - calculate from the RTT and which peer was ready to sync first, after we will start the bu...
unsigned int sync_ready
We are ready to start the burst.
struct GNUNET_TIME_Relative rtt
The average RTT between the peers.
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Time for absolute times used by GNUnet, in microseconds.
uint64_t abs_value_us
The actual value.
Time for relative time used by GNUnet, in microseconds and in network byte order.
Time for relative time used by GNUnet, in microseconds.
uint64_t rel_value_us
The actual value.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS.
struct GNUNET_TIME_RelativeNBO expiration
When does the address expire?
uint32_t nt
An enum GNUNET_NetworkType in NBO.
uint32_t aid
Address identifier (used during deletion).
Add queue to the transport.
uint32_t nt
An enum GNUNET_NetworkType in NBO.
uint32_t mtu
Maximum transmission unit, in NBO.
uint64_t q_len
Queue length, in NBO.
uint32_t qid
Queue identifier (used to identify the queue).
struct GNUNET_PeerIdentity receiver
Receiver that can be addressed via the queue.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP.
uint32_t cs
An enum GNUNET_TRANSPORT_ConnectionStatus in NBO.
Communicator goes online.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR.
uint32_t cc
NBO encoding of enum GNUNET_TRANSPORT_CommunicatorCharacteristics
uint32_t can_burst
The communicator can do burst msgs.
Message from transport to communicator passing along a backchannel message from the given peer pid.
struct GNUNET_PeerIdentity pid
Origin peer.
Message from communicator to transport service asking for transmission of a backchannel message with ...
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL.
struct GNUNET_PeerIdentity pid
Target peer.
Communicator tells transport how queue creation went down.
uint32_t request_id
Unique ID for the request.
Transport tells communicator that it wants a new queue.
uint32_t request_id
Unique ID for the request.
struct GNUNET_PeerIdentity receiver
Receiver that can be addressed via the queue.
Remove address from the list.
uint32_t aid
Address identifier.
Remove queue, it is no longer available.
struct GNUNET_PeerIdentity receiver
Receiver that can be addressed via the queue.
uint32_t qid
Address identifier.
Transport informs us about being done with an incoming message.
struct GNUNET_PeerIdentity sender
Sender identifier of the original message.
uint64_t fc_id
Which message is being ACKed?
uint32_t reserved
Reserved (0)
Inform transport about an incoming message.
struct GNUNET_PeerIdentity neighbour_sender
Direct neighbour sender identifier.
struct GNUNET_TIME_RelativeNBO expected_address_validity
How long does the communicator believe the address on which the message was received to remain valid?
struct GNUNET_PeerIdentity sender
Sender identifier.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG.
uint32_t fc_on
Do we use flow control or not?
uint64_t fc_id
64-bit number to identify the matching ACK.
uint32_t num_msg_pending
Messages pending (in NBO).
struct GNUNET_PeerIdentity peer
Target identifier.
struct GNUNET_TIME_AbsoluteNBO valid_until
struct GNUNET_TIME_AbsoluteNBO last_validation
uint32_t num_bytes_pending
Bytes pending (in NBO).
struct GNUNET_TIME_AbsoluteNBO next_validation
uint32_t nt
Network type (an enum GNUNET_NetworkType in NBO).
struct GNUNET_TIME_RelativeNBO rtt
Current round-trip time estimate.
uint32_t cs
Connection status (in NBO).
Request to start monitoring.
Inform transport that message was sent.
uint64_t mid
Message ID of the original message.
uint32_t qid
Queue ID for the queue which was used to send the message.
struct GNUNET_PeerIdentity receiver
Receiver identifier.
Inform communicator about transport's desire to send a message.
uint32_t qid
Which queue should we use?
uint64_t mid
Message ID, used for flow control.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG.
struct GNUNET_PeerIdentity receiver
Receiver identifier.
Message from transport to communicator to start a burst.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_START_BURST.
struct GNUNET_TIME_RelativeNBO rtt
struct GNUNET_PeerIdentity pid
Target peer.
A UUID, a 128 bit "random" value.
Message used to notify the transport API about a message received from the network.
struct GNUNET_PeerIdentity peer
Which peer sent the message?
Another peer attempted to talk to us, we should try to establish a connection in the other direction.
struct IncomingRequest * next
Kept in a DLL.
struct IncomingRequest * prev
Kept in a DLL.
struct GNUNET_PEERSTORE_Monitor * nc
Notify context for new HELLOs.
struct GNUNET_PeerIdentity pid
Which peer is this about?
When did we launch this DV learning activity?
struct LearnLaunchEntry * next
Kept (also) in a DLL sorted by launch time.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge that uniquely identifies this activity.
struct LearnLaunchEntry * prev
Kept (also) in a DLL sorted by launch time.
struct GNUNET_TIME_Absolute launch_time
When did we transmit the DV learn message (used to calculate RTT) and determine freshness of paths le...
Unique identifier we attach to a message.
uint64_t uuid
Unique value, generated by incrementing the message_uuid_ctr of struct Neighbour.
Details about what to notify monitors about.
enum GNUNET_TRANSPORT_ConnectionStatus cs
Connection status.
struct GNUNET_TIME_Absolute last_validation
struct GNUNET_TIME_Absolute next_validation
struct GNUNET_TIME_Absolute valid_until
struct GNUNET_TIME_Relative rtt
Current round-trip time estimate.
uint32_t num_msg_pending
Messages pending.
uint32_t num_bytes_pending
Bytes pending.
Closure for dv_neighbour_selection and dv_neighbour_transmission.
const struct TransportDVLearnMessage * dvl
Original message we received.
struct GNUNET_TIME_Absolute in_time
Time we received the message.
const struct DVPathEntryP * hops
The hops taken.
uint16_t bi_history
Bitmap of bidirectional connections encountered.
unsigned int num_eligible
Number of peers eligible for selection.
unsigned int num_selections
Number of peers that were selected for forwarding.
uint32_t selections[MAX_DV_DISCOVERY_SELECTION]
Offsets of the selected peers.
uint16_t nhops
Number of hops in hops.
A neighbour that at least one communicator is connected to.
size_t size_of_global_addresses
Size of all global natted addresses for this neighbour.
struct DistanceVectorHop * dv_tail
Tail of MDLL of DV hops that have this neighbour as next hop.
struct GNUNET_CONTAINER_MultiPeerMap * natted_addresses
Map of struct TransportGlobalNattedAddress for this neighbour.
struct GNUNET_TIME_Absolute last_dv_learn_monotime
Latest DVLearn monotonic time seen from this peer.
int dv_monotime_available
Do we have the latest value for last_dv_learn_monotime from PEERSTORE yet, or are we still waiting fo...
unsigned int number_of_addresses
Number of global natted addresses for this neighbour.
struct Queue * queue_tail
Tail of DLL of queues to this peer.
struct GNUNET_PEERSTORE_StoreContext * sc
Handle to a PEERSTORE store operation to store this pid's last_dv_learn_monotime.
struct DistanceVectorHop * dv_head
Head of MDLL of DV hops that have this neighbour as next hop.
struct VirtualLink * vl
Do we have a confirmed working queue and are thus visible to CORE? If so, this is the virtual link,...
struct Queue * queue_head
Head of DLL of queues to this peer.
struct GNUNET_PeerIdentity pid
Which peer is this about?
enum GNUNET_GenericReturnValue is_global_natted
A queue of this neighbour has a global natted address.
struct GNUNET_PEERSTORE_IterateContext * get
Handle for an operation to fetch last_dv_learn_monotime information from the PEERSTORE,...
Message used to notify the transport service about a message to be transmitted to another peer.
uint32_t priority
An enum GNUNET_MQ_PriorityPreferences in NBO.
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND.
struct GNUNET_PeerIdentity peer
Which peer should receive the message?
Information per peer and request.
struct GNUNET_BANDWIDTH_Value32NBO bw
How much bandwidth would this tc like to see?
struct TransportClient * tc
Client responsible for the request.
enum GNUNET_MQ_PriorityPreferences pk
What kind of performance preference does this tc have?
struct GSF_PendingRequest * pr
Handle to generic request (generic: from peer or local client).
struct GNUNET_PEERSTORE_Monitor * nc
Notify context for new HELLOs.
struct GNUNET_PeerIdentity pid
Which peer is this about?
Data structure kept when we are waiting for an acknowledgement.
struct AcknowledgementUUIDP ack_uuid
Unique identifier for this transmission operation.
unsigned int num_send
How often the PendingMessage was send via the Queue of this PendingAcknowledgement.
struct PendingAcknowledgement * next_pm
If pm is non-NULL, this is the DLL in which this acknowledgement is kept in relation to its pending m...
struct PendingMessage * pm
Message that was transmitted, may be NULL if the message was ACKed via another channel.
struct PendingAcknowledgement * next_dvh
If dvh is non-NULL, this is the DLL in which this acknowledgement is kept in relation to the DVH that...
struct PendingAcknowledgement * next_pa
Pointers for the DLL of all pending acknowledgements.
struct PendingAcknowledgement * next_queue
If queue is non-NULL, this is the DLL in which this acknowledgement is kept in relation to the queue ...
struct GNUNET_TIME_Absolute transmission_time
Time of the transmission, for RTT calculation.
struct Queue * queue
Queue used for transmission, NULL if the queue has been destroyed (which may happen before we get an ...
struct DistanceVectorHop * dvh
Distance vector path chosen for this transmission, NULL if transmission was to a direct neighbour OR ...
uint16_t message_size
Number of bytes of the original message (to calculate bandwidth).
struct PendingAcknowledgement * prev_pa
Pointers for the DLL of all pending acknowledgements.
struct PendingAcknowledgement * prev_queue
If queue is non-NULL, this is the DLL in which this acknowledgement is kept in relation to the queue ...
struct PendingAcknowledgement * prev_pm
If pm is non-NULL, this is the DLL in which this acknowledgement is kept in relation to its pending m...
struct PendingAcknowledgement * prev_dvh
If dvh is non-NULL, this is the DLL in which this acknowledgement is kept in relation to the DVH that...
Context for select_best_pending_from_link().
struct GNUNET_TIME_Relative to_early_retry_delay
When will we try to transmit the message again for which it was to early to retry.
struct PendingMessage * best
Set to the best message that was found, NULL for none.
int to_early
There are pending messages, but it was to early to send one of them.
unsigned int consideration_counter
Number of pending messages we seriously considered this time.
struct DistanceVectorHop * dvh
DVH that best should take, or NULL for direct transmission.
size_t real_overhead
What is the estimated total overhead for this message?
unsigned int frags_in_flight
There is a pending messages we are sending fragments at the moment.
int frag
Did we have to fragment?
int relb
Did we have to reliability box?
List containing all messages that are yet to be send.
struct PendingMessage * tail_frag
Tail of a MDLL of fragments created for this core message.
struct PendingMessage * frag_parent
Our parent in the fragmentation tree.
enum GNUNET_MQ_PriorityPreferences prefs
Preferences for this message.
struct TransportClient * client
Client that issued the transmission request, if pmt is PMT_CORE.
struct QueueEntry * qe
Set to non-NULL value if this message is currently being given to a communicator and we are awaiting ...
struct MessageUUIDP msg_uuid
UUID to use for this message (used for reassembly of fragments, only initialized if msg_uuid_set is G...
struct PendingMessage * head_frag
Head of a MDLL of fragments created for this core message.
uint16_t bytes_msg
Size of the original message.
enum PendingMessageType pmt
Type of the pending message.
struct PendingMessage * prev_client
Kept in a MDLL of messages from this client (if pmt is PMT_CORE)
struct PendingMessage * prev_vl
Kept in a MDLL of messages for this vl.
struct PendingAcknowledgement * pa_tail
Tail of DLL of PAs for this pending message.
struct PendingMessage * next_vl
Kept in a MDLL of messages for this vl.
struct VirtualLink * vl
Target of the request (always the ultimate destination!).
struct PendingAcknowledgement * pa_head
Head of DLL of PAs for this pending message.
struct DistanceVectorHop * used_dvh
If pmt is of type PMT_DV_BOX we store the used path here.
int16_t msg_uuid_set
GNUNET_YES once msg_uuid was initialized
uint32_t frags_in_flight_round
The round we are (re)-sending fragments.
struct PendingMessage * next_client
Kept in a MDLL of messages from this client (if pmt is PMT_CORE)
uint32_t frags_in_flight
Are we sending fragments at the moment?
uint16_t frag_off
Offset at which we should generate the next fragment.
struct PendingMessage * next_frag
Kept in a MDLL of messages from this cpm (if pmt is #PMT_FRAGMENT_BOx)
uint64_t logging_uuid
UUID we use to identify this message in our logs.
uint16_t frag_count
How many fragments do we have?
struct PendingMessage * prev_frag
Kept in a MDLL of messages from this cpm (if pmt is PMT_FRAGMENT_BOX)
struct PendingMessage * bpm
This message, reliability or DV-boxed.
struct GNUNET_TIME_Absolute next_attempt
What is the earliest time for us to retry transmission of this message?
struct GNUNET_TIME_Absolute timeout
At what time should we give up on the transmission (and no longer retry)?
struct GNUNET_PeerIdentity target
In case of a not validated neighbour, we store the target peer.
Entry identifying transmission in one of our struct Queue which still awaits an ACK.
struct QueueEntry * next
Kept as a DLL.
struct QueueEntry * prev
Kept as a DLL.
struct GNUNET_TIME_Absolute creation_timestamp
Timestamp this QueueEntry was created.
uint64_t mid
Message ID used for this message with the queue used for transmission.
struct PendingMessage * pm
Pending message this entry is for, or NULL for none.
struct Queue * queue
Queue this entry is queued with.
Closure for check_connection_quality.
unsigned int k
Decremented for each queue, for selection of the k-th queue in q.
struct Queue * q
Set to the k'th queue encountered.
unsigned int num_queues
Set to the total number of queues encountered.
unsigned int quality_count
Set to the number of quality queues encountered.
uint32_t qid
Unique identifier of this queue with the communicator.
struct QueueEntry * queue_tail
End of DLL of unacked transmission requests.
struct Queue * prev_client
Kept in a MDLL.
unsigned int queue_length
Length of the DLL starting at queue_head.
uint32_t num_msg_pending
Messages pending.
struct GNUNET_PEERSTORE_Monitor * mo
Handle for an operation to iterate through all hellos to compare the hello addresses with address whi...
uint64_t q_capacity
Capacity of the queue.
struct Queue * next_neighbour
Kept in a MDLL.
uint32_t num_bytes_pending
Bytes pending.
uint32_t priority
Queue priority.
struct Neighbour * neighbour
Which neighbour is this queue for?
int idle
Set to GNUNET_YES if this queue is idle waiting for some virtual link to give it a pending message.
struct Queue * prev_neighbour
Kept in a MDLL.
struct PerformanceData pd
Performance data for this queue.
enum GNUNET_NetworkType nt
Which network type does this queue use?
struct GNUNET_SCHEDULER_Task * transmit_task
Task scheduled for the time when this queue can (likely) transmit the next message.
struct QueueEntry * queue_head
Head of DLL of unacked transmission requests.
struct PendingAcknowledgement * pa_tail
Tail of DLL of PAs that used this queue.
struct TransportClient * tc
Which communicator offers this queue?
struct Queue * next_client
Kept in a MDLL.
enum GNUNET_GenericReturnValue is_global_natted
Set to GNUNET_YES, if this queues address is a global natted one.
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...
uint32_t mtu
Maximum transmission unit supported by this queue.
unsigned int unlimited_length
Is this queue of unlimited length.
enum GNUNET_TRANSPORT_ConnectionStatus cs
The connection status of this queue.
uint64_t mid_gen
Message ID generator for transmissions on this queue to the communicator.
struct PendingAcknowledgement * pa_head
Head of DLL of PAs that used this queue.
const char * address
Address served by the queue.
Information we keep for a message that we are reassembling.
struct GNUNET_CONTAINER_HeapNode * hn
Entry in the reassembly heap (sorted by expiration).
struct GNUNET_TIME_Absolute last_frag
Time we received the last fragment.
struct MessageUUIDP msg_uuid
Original message ID for of the message that all the fragments belong to.
struct VirtualLink * virtual_link
Which neighbour is this context for?
uint8_t * bitfield
Bitfield with msg_size bits representing the positions where we have received fragments.
uint16_t msg_size
How big is the message we are reassembling in total?
struct GNUNET_TIME_Absolute reassembly_timeout
At what time will we give up reassembly of this message?
uint16_t msg_missing
How many bytes of the message are still missing? Defragmentation is complete when msg_missing == 0.
Message used to notify the transport API that it can send another message to the transport service.
struct GNUNET_PeerIdentity peer
Which peer can CORE handle more from now?
uint32_t increase_window_delta
Number of messages by which to increase the window, greater or equal to one.
We got an address of another peer, TRANSPORT service should validate it.
Entry for the ring buffer caching messages send to core, when virtual link is available.
struct CommunicatorMessageContext * cmc
Communicator context for this ring buffer entry.
struct GNUNET_MessageHeader * mh
The message in this entry.
Message used to notify the transport API that it can send another message to the transport service.
struct GNUNET_PeerIdentity peer
Which peer can send more now?
Message from the transport service to the library asking to check if both processes agree about this ...
Information we keep per GOODPUT_AGING_SLOTS about historic (or current) transmission performance.
uint64_t bytes_received
Number of bytes received and acknowledged by the other peer in the interval.
uint64_t bytes_sent
Number of bytes actually sent in the interval.
Outer layer of an encapsulated backchannel message.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_BACKCHANNEL_ENCAPSULATION.
Client connected to the transport service.
enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc
Characteristics of this communicator.
struct PendingMessage * pending_msg_head
Head of list of messages pending for this client, sorted by transmission time ("next_attempt" + possi...
enum ClientType type
What type of client is this?
struct AddressListEntry * addr_tail
Tail of list of the addresses of this peer offered by this communicator.
struct TransportClient * next
Kept in a DLL.
struct GNUNET_MQ_Handle * mq
Message queue to the client.
struct GNUNET_SCHEDULER_Task * free_queue_entry_task
Task to check for timed out QueueEntry.
struct PendingMessage * pending_msg_tail
Tail of list of messages pending for this client.
struct TransportClient::@60::@62 monitor
Information for type CT_MONITOR.
struct Queue * queue_head
Head of DLL of queues offered by this communicator.
struct TransportClient::@60::@61 core
Information for type CT_CORE.
struct AddressListEntry * addr_head
Head of list of the addresses of this peer offered by this communicator.
struct GNUNET_CONTAINER_MultiPeerMap * requests
Map of requests for peers the given client application would like to see connections for.
struct TransportClient::@60::@64 application
Information for type CT_APPLICATION.
struct GNUNET_SERVICE_Client * client
Handle to the client.
struct TransportClient * prev
Kept in a DLL.
char * address_prefix
If type is CT_COMMUNICATOR, this communicator supports communicating using these addresses.
struct Queue * queue_tail
Tail of DLL of queues offered by this communicator.
union TransportClient::@60 details
struct TransportClient::@60::@63 communicator
Information for type CT_COMMUNICATOR.
unsigned int total_queue_length
Number of queue entries in all queues to this communicator.
int one_shot
Is this a one-shot monitor?
struct GNUNET_PeerIdentity peer
Peer identity to monitor the addresses of.
enum GNUNET_GenericReturnValue can_burst
Can be used for burst messages.
struct GNUNET_TIME_RelativeNBO ack_delay
How long was the ACK delayed for generating cumulative ACKs? Used to calculate the correct network RT...
struct AcknowledgementUUIDP ack_uuid
UUID of a message being acknowledged.
struct GNUNET_TIME_Absolute receive_time
When did we receive the message we are ACKing? Used to calculate the delay we introduced by cummulati...
struct AcknowledgementUUIDP ack_uuid
UUID of a message being acknowledged.
Outer layer of an encapsulated message send over multiple hops.
struct GNUNET_HashCode hmac
HMAC over the ciphertext of the encrypted, variable-size body that follows.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX.
uint16_t num_hops
Number of hops this messages includes.
uint16_t orig_size
Size this msg had initially.
struct GNUNET_CRYPTO_HpkeEncapsulation ephemeral_key
Ephemeral key setup by the sender for target, used to encrypt the payload.
unsigned int without_fc
Flag if the payload is a control message.
struct GNUNET_ShortHashCode iv
We use an IV here as the ephemeral_key is re-used for EPHEMERAL_VALIDITY time to avoid re-signing it ...
uint16_t total_hops
Number of total hops this messages travelled.
Plaintext of the variable-size payload that is encrypted within a struct TransportBackchannelEncapsul...
struct GNUNET_CRYPTO_EddsaSignature sender_sig
Signature of the sender over an GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL.
struct GNUNET_TIME_AbsoluteNBO monotonic_time
Current monotonic time of the sending transport service.
struct GNUNET_PeerIdentity sender
Sender's peer identity.
Internal message used by transport for distance vector learning.
struct GNUNET_PeerIdentity initiator
Identity of the peer that started this learning activity.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge value used by the initiator to re-identify the path.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_DV_LEARN.
struct GNUNET_TIME_RelativeNBO non_network_delay
Peers receiving this message and delaying forwarding to other peers for any reason should increment t...
struct GNUNET_TIME_AbsoluteNBO monotonic_time
Time at the initiator when generating the signature.
struct GNUNET_CRYPTO_EddsaSignature init_sig
Signature of this hop over the path, of purpose GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR.
uint16_t num_hops
Number of hops this messages has travelled, in NBO.
uint16_t bidirectional
Bitmask of the last 16 hops indicating whether they are confirmed available (without DV) in both dire...
Message for Transport-to-Transport Flow control.
uint64_t outbound_window_size
Latest flow control window size we learned from the other peer, in bytes, in NBO.
unsigned int number_of_addresses
Number of TransportGlobalNattedAddress following the struct.
size_t size_of_addresses
Size of all the addresses attached to all TransportGlobalNattedAddress.
uint64_t inbound_window_size
Flow control window size in bytes, in NBO.
struct GNUNET_TIME_AbsoluteNBO sender_time
Timestamp of the sender.
uint32_t seq
Sequence number of the flow control message.
uint64_t outbound_sent
How many bytes has the sender sent that count for flow control at this time.
struct GNUNET_TIME_RelativeNBO rtt
Average RTT for the DistanceVector of the VirtualLink we tell the target.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL.
unsigned int sync_ready
We tell the target, if we are ready to start the burst.
Outer layer of an encapsulated fragmented application message.
uint16_t frag_off
Offset of this fragment in the overall message.
struct MessageUUIDP msg_uuid
Original message ID for of the message that all the fragments belong to.
struct AcknowledgementUUIDP ack_uuid
Unique ID of this fragment (and fragment transmission!).
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_FRAGMENT.
uint16_t msg_size
Total size of the message that is being fragmented.
char * addr
The address to search for.
struct TransportGlobalNattedAddress * tgna
The struct TransportGlobalNattedAddress to set.
unsigned int address_length
Length of the address following the struct in NBO.
Confirmation that the receiver got a GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_BOX.
uint32_t ack_counter
Counter of ACKs transmitted by the sender to us.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_ACK.
Outer layer of an encapsulated unfragmented application message sent over an unreliable channel.
uint32_t ack_countdown
Number of messages still to be sent before a commulative ACK is requested.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_BOX.
struct AcknowledgementUUIDP ack_uuid
Unique ID of the message used for signalling receipt of messages sent over possibly unreliable channe...
Message send to another peer to validate that it can indeed receive messages at a particular address.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_CHALLENGE.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge to be signed by the receiving peer.
uint32_t reserved
Always zero.
struct GNUNET_TIME_AbsoluteNBO sender_time
Timestamp of the sender, to be copied into the reply to allow sender to calculate RTT.
Message signed by a peer to confirm that it can indeed receive messages at a particular address.
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Purpose is GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE.
struct GNUNET_TIME_RelativeNBO validity_duration
How long does the sender believe the address on which the challenge was received to remain valid?
struct GNUNET_CRYPTO_ChallengeNonceP challenge
Challenge signed by the receiving peer.
Message send to a peer to respond to a #GNUNET_MESSAGE_TYPE_ADDRESS_VALIDATION_CHALLENGE.
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_RESPONSE.
struct GNUNET_CRYPTO_ChallengeNonceP challenge
The challenge that was signed by the receiving peer.
uint32_t reserved
Always zero.
struct GNUNET_CRYPTO_EddsaSignature signature
The peer's signature matching the GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE purpose.
State we keep for validation activities.
struct GNUNET_TIME_Absolute valid_until
How long did the peer claim this address to be valid? Capped at minimum of MAX_ADDRESS_VALID_UNTIL re...
struct GNUNET_PeerIdentity pid
For which peer is address to be validated (or possibly valid)? Serves as key in the validation_map.
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...
A virtual link is another reachable peer that is known to CORE.
struct GNUNET_TIME_Relative other_rtt
Average RTT for over all paths of the DistanceVector of this VirtualLink calculated by the target.
int core_recv_window
How many more messages can we send to CORE before we exhaust the receive window of CORE for this peer...
char * burst_addr
global addresses for the peer.
unsigned int confirmed
Is this VirtualLink confirmed.
uint64_t incoming_fc_window_size_used
How much of the window did the other peer successfully use (and we already passed it on to CORE)?...
uint32_t last_fc_seq
Last sequence number of a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received.
struct GNUNET_SCHEDULER_Task * reassembly_timeout_task
Task to free old entries from the reassembly_heap and reassembly_map.
uint64_t incoming_fc_window_size
Last flow control window size we provided to the other peer, in bytes.
struct GNUNET_TIME_Absolute n_challenge_time
Sender timestamp of n_challenge, used to generate out-of-order challenges (as sender's timestamps mus...
struct GNUNET_TIME_Absolute last_fc_timestamp
Sender timestamp of the last GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message we have received.
uint64_t outbound_fc_window_size
Our current flow control window size in bytes.
struct GNUNET_PEERSTORE_IterateContext * ic
IterationContext for searching a burst address.
uint64_t last_outbound_window_size_received
What is the most recent FC window the other peer sent us in outbound_window_size? This is basically t...
uint64_t outbound_fc_window_size_used
How much of our current flow control window size have we used (in bytes).
struct GNUNET_TIME_Absolute last_fc_transmission
When did we last send a GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL message? Used to determine whether...
struct GNUNET_SCHEDULER_Task * visibility_task
Task scheduled to possibly notfiy core that this peer is no longer counting as confirmed.
struct Neighbour * n
Neighbour used by this virtual link, NULL if dv is used.
uint64_t message_uuid_ctr
Used to generate unique UUIDs for messages that are being fragmented.
int64_t incoming_fc_window_size_loss
What is our current estimate on the message loss rate for the sender? Based on the difference between...
struct CoreSentContext * csc_head
Kept in a DLL to clear vl in case vl is lost.
struct GNUNET_PeerIdentity target
Identity of the peer at the other end of the link.
uint32_t fc_seq_gen
Generator for the sequence numbers of GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL messages we send.
struct DistanceVector * dv
Distance vector used by this virtual link, NULL if n is used.
struct CommunicatorMessageContext * cmc_head
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase.
struct GNUNET_SCHEDULER_Task * fc_retransmit_task
Task scheduled to periodically retransmit FC messages (in case one got lost).
uint64_t incoming_fc_window_size_ram
Memory actually used to buffer packets on this virtual link.
struct PendingMessage * pending_msg_head
Head of list of messages pending for this VL.
struct CoreSentContext * csc_tail
Kept in a DLL to clear vl in case vl is lost.
enum GNUNET_GenericReturnValue sync_ready
Are we ready to start the burst?
unsigned int fc_retransmit_count
Number of FC retransmissions for this running task.
struct PendingMessage * pending_msg_tail
Tail of list of messages pending for this VL.
struct GNUNET_CONTAINER_Heap * reassembly_heap
Heap with struct ReassemblyContext structs for fragments under reassembly.
struct GNUNET_StartBurstCls * sb_cls
The actual GNUNET_StartBurstCls of this VirtualLink.
struct GNUNET_CONTAINER_MultiHashMap32 * reassembly_map
Map with struct ReassemblyContext structs for fragments under reassembly.
struct GNUNET_TIME_Relative last_fc_rtt
Expected RTT from the last FC transmission.
uint64_t available_fc_window_size
Memory allocated for this virtual link.
struct CommunicatorMessageContext * cmc_tail
Communicators blocked for receiving on target as we are waiting on the core_recv_window to increase.
common internal definitions for transport service