uint32_t rim_id GNUNET_PACKED;
/**
- * Limit the number of bytes of outbound traffic to this
- * peer to at most the specified amount (naturally, the
- * amount is also limited by the receiving peer).
+ * Reserved, always zero.
*/
- struct GNUNET_BANDWIDTH_Value32NBO limit_outbound;
+ uint32_t reserved GNUNET_PACKED;
/**
* Number of bytes of inbound traffic to reserve, can
rim->header.size = htons (sizeof (struct RequestInfoMessage));
rim->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_REQUEST_INFO);
rim->rim_id = htonl (pr->rim_id = h->rim_id_gen++);
- rim->limit_outbound = GNUNET_BANDWIDTH_VALUE_MAX; // FIXME: remove entirely soon...
+ rim->reserved = htonl (0);
rim->reserve_inbound = htonl (amount);
rim->preference_change = GNUNET_htonll (preference);
rim->peer = *peer;
*/
GNUNET_SCHEDULER_TaskIdentifier retry_plaintext_task;
- /**
- * Tracking bandwidth for sending to this peer.
- */
- struct GNUNET_BANDWIDTH_Tracker available_send_window;
-
/**
* Tracking bandwidth for sending to this peer.
*/
GNUNET_assert (size >= m->size);
memcpy (cbuf, &m[1], m->size);
ret = m->size;
- GNUNET_BANDWIDTH_tracker_consume (&n->available_send_window, m->size);
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Copied message of type %u and size %u into transport buffer for `%4s'\n",
#endif
n = GNUNET_malloc (sizeof (struct Neighbour));
n->peer = *peer;
- GNUNET_BANDWIDTH_tracker_init (&n->available_send_window,
- GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
- MAX_WINDOW_TIME_S);
GNUNET_BANDWIDTH_tracker_init (&n->available_recv_window,
GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
MAX_WINDOW_TIME_S);
*/
GNUNET_SCHEDULER_TaskIdentifier cork_task;
- /**
- * Tracking bandwidth for sending to this peer.
- * // FIXME: unused! should it be used?
- */
- struct GNUNET_BANDWIDTH_Tracker available_send_window;
-
/**
* Tracking bandwidth for receiving from this peer.
* // FIXME: need to set it!
struct GNUNET_BANDWIDTH_Tracker available_recv_window;
/**
- * Available bandwidth out for this peer (current target).
- * // FIXME: check usage!
+ * Available bandwidth out for this peer (current target). This
+ * value should be the 'MIN' of 'bw_out_internal_limit' and
+ * 'bw_out_external_limit'.
*/
struct GNUNET_BANDWIDTH_Value32NBO bw_out;
/**
* Internal bandwidth limit set for this peer (initially typically
- * set to "-1"). Actual "bw_out" is MIN of
+ * set to "MAX_INT"). Actual "bw_out" is MIN of
* "bpm_out_internal_limit" and "bw_out_external_limit".
+ *
+ *
+ *
* // FIXME: check usage
*/
struct GNUNET_BANDWIDTH_Value32NBO bw_out_internal_limit;
}
want_reserv = ntohl (rcm->reserve_inbound);
- if (session->bw_out_internal_limit.value__ != rcm->limit_outbound.value__)
- {
- session->bw_out_internal_limit = rcm->limit_outbound;
- if (session->bw_out.value__ !=
- GNUNET_BANDWIDTH_value_min (session->bw_out_internal_limit,
- session->bw_out_external_limit).value__)
- {
- session->bw_out =
- GNUNET_BANDWIDTH_value_min (session->bw_out_internal_limit,
- session->bw_out_external_limit);
- GNUNET_BANDWIDTH_tracker_update_quota (&session->available_recv_window,
- session->bw_out);
-#if 0
- // FIXME: who does this?
- GNUNET_TRANSPORT_set_quota (transport, &session->peer,
- session->bw_in,
- session->bw_out);
-#endif
- }
- }
if (want_reserv < 0)
{
got_reserv = want_reserv;