[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17311 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17311 - gnunet/src/core |
Date: |
Mon, 10 Oct 2011 13:20:35 +0200 |
Author: grothoff
Date: 2011-10-10 13:20:35 +0200 (Mon, 10 Oct 2011)
New Revision: 17311
Modified:
gnunet/src/core/gnunet-service-core_kx.c
gnunet/src/core/gnunet-service-core_kx.h
gnunet/src/core/gnunet-service-core_sessions.c
gnunet/src/core/gnunet-service-core_sessions.h
Log:
removing dead bw code
Modified: gnunet/src/core/gnunet-service-core_kx.c
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.c 2011-10-10 11:15:32 UTC (rev
17310)
+++ gnunet/src/core/gnunet-service-core_kx.c 2011-10-10 11:20:35 UTC (rev
17311)
@@ -113,12 +113,11 @@
* first field after header (this is where we start to encrypt!).
*/
uint32_t challenge GNUNET_PACKED;
-
+
/**
- * Desired bandwidth (how much we should send to this
- * peer / how much is the sender willing to receive).
+ * Reserved, always 'GNUNET_BANDWIDTH_VALUE_MAX'.
*/
- struct GNUNET_BANDWIDTH_Value32NBO inbound_bw_limit;
+ struct GNUNET_BANDWIDTH_Value32NBO reserved;
/**
* Intended target of the PING, used primarily to check
@@ -204,10 +203,9 @@
uint32_t sequence_number GNUNET_PACKED;
/**
- * Desired bandwidth (how much we should send to this peer / how
- * much is the sender willing to receive)?
+ * Reserved, always 'GNUNET_BANDWIDTH_VALUE_MAX'.
*/
- struct GNUNET_BANDWIDTH_Value32NBO inbound_bw_limit;
+ struct GNUNET_BANDWIDTH_Value32NBO reserved;
/**
* Timestamp. Used to prevent reply of ancient messages
@@ -899,7 +897,7 @@
return;
}
/* construct PONG */
- tx.inbound_bw_limit = GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT;
+ tx.reserved = GNUNET_BANDWIDTH_VALUE_MAX;
/* FIXME: here we should ideally ask ATS about unassigned bandwidth and fill
in
a value based on that; using the minimum here results in a rather slow
start... */
tx.challenge = t.challenge;
@@ -1124,13 +1122,9 @@
kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (kx->keep_alive_task == GNUNET_SCHEDULER_NO_TASK);
update_timeout (kx);
- GSC_SESSIONS_update (&kx->peer,
- t.inbound_bw_limit);
break;
case KX_STATE_UP:
update_timeout (kx);
- GSC_SESSIONS_update (&kx->peer,
- t.inbound_bw_limit);
break;
default:
GNUNET_break (0);
@@ -1204,15 +1198,11 @@
* Encrypt and transmit a message with the given payload.
*
* @param kx key exchange context
- * @param bw_in bandwidth limit to transmit to the other peer;
- * the other peer shall not send us more than the
- * given rate
* @param payload payload of the message
* @param payload_size number of bytes in 'payload'
*/
void
GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx,
- struct GNUNET_BANDWIDTH_Value32NBO bw_in,
const void *payload,
size_t payload_size)
{
@@ -1224,18 +1214,12 @@
struct GNUNET_CRYPTO_AesInitializationVector iv;
struct GNUNET_CRYPTO_AuthKey auth_key;
-#if DEBUG_CORE_QUOTA
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending %u b/s as new limit to peer `%4s'\n",
- (unsigned int) ntohl (bw_in.value__),
- GNUNET_i2s (&kx->peer));
-#endif
ph = (struct EncryptedMessage*) pbuf;
ph->iv_seed =
htonl (GNUNET_CRYPTO_random_u32
(GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX));
ph->sequence_number = htonl (++kx->last_sequence_number_sent);
- ph->inbound_bw_limit = bw_in;
+ ph->reserved = GNUNET_BANDWIDTH_VALUE_MAX;
ph->timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
memcpy (&ph[1], payload, payload_size);
@@ -1409,8 +1393,6 @@
/* process decrypted message(s) */
update_timeout (kx);
- GSC_SESSIONS_update (&kx->peer,
- pt->inbound_bw_limit);
GNUNET_STATISTICS_update (GSC_stats,
gettext_noop ("# bytes of payload decrypted"),
size - sizeof (struct EncryptedMessage),
GNUNET_NO);
Modified: gnunet/src/core/gnunet-service-core_kx.h
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.h 2011-10-10 11:15:32 UTC (rev
17310)
+++ gnunet/src/core/gnunet-service-core_kx.h 2011-10-10 11:20:35 UTC (rev
17311)
@@ -75,15 +75,11 @@
* Encrypt and transmit a message with the given payload.
*
* @param kx key exchange context
- * @param bw_in bandwidth limit to transmit to the other peer;
- * the other peer shall not send us more than the
- * given rate
* @param payload payload of the message
* @param payload_size number of bytes in 'payload'
*/
void
GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx,
- struct GNUNET_BANDWIDTH_Value32NBO bw_in,
const void *payload,
size_t payload_size);
Modified: gnunet/src/core/gnunet-service-core_sessions.c
===================================================================
--- gnunet/src/core/gnunet-service-core_sessions.c 2011-10-10 11:15:32 UTC
(rev 17310)
+++ gnunet/src/core/gnunet-service-core_sessions.c 2011-10-10 11:20:35 UTC
(rev 17311)
@@ -122,33 +122,6 @@
GNUNET_SCHEDULER_TaskIdentifier cork_task;
/**
- * 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 "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;
-
- /**
- * External bandwidth limit set for this peer by the
- * peer that we are communicating with. "bw_out" is MIN of
- * "bw_out_internal_limit" and "bw_out_external_limit".
- * // FIXME: check usage
- */
- struct GNUNET_BANDWIDTH_Value32NBO bw_out_external_limit;
-
-
- /**
* Is the neighbour queue empty and thus ready for us
* to transmit an encrypted message?
*/
@@ -249,19 +222,10 @@
gettext_noop ("# established sessions"),
GNUNET_CONTAINER_multihashmap_size (sessions),
GNUNET_NO);
-#if 0
- /* FIXME: integration with ATS for quota calculations... */
- /* FIXME: who should do this? Neighbours!? */
- GNUNET_TRANSPORT_set_quota (transport,
- peer,
- GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
- GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT);
-#endif
/* FIXME: we should probably do this periodically (in case
type map message is lost...) */
hdr = GSC_TYPEMAP_compute_type_map_message ();
GSC_KX_encrypt_and_transmit (kx,
- GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT,
hdr,
ntohs (hdr->size));
GNUNET_free (hdr);
@@ -539,7 +503,6 @@
/* now actually transmit... */
session->ready_to_transmit = GNUNET_NO;
GSC_KX_encrypt_and_transmit (session->kxinfo,
- GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT /* FIXME!
*/,
pbuf,
used);
}
@@ -726,23 +689,6 @@
/**
- * Update information about a session.
- *
- * @param peer peer who's session should be updated
- * @param bw_out new outbound bandwidth limit for the peer
- * @param atsi performance information
- * @param atsi_count number of performance records supplied
- */
-void
-GSC_SESSIONS_update (const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_BANDWIDTH_Value32NBO bw_out)
-{
- // FIXME
- /* not implemented */
-}
-
-
-/**
* Initialize sessions subsystem.
*/
void
Modified: gnunet/src/core/gnunet-service-core_sessions.h
===================================================================
--- gnunet/src/core/gnunet-service-core_sessions.h 2011-10-10 11:15:32 UTC
(rev 17310)
+++ gnunet/src/core/gnunet-service-core_sessions.h 2011-10-10 11:20:35 UTC
(rev 17311)
@@ -42,17 +42,6 @@
/**
- * Update information about a session.
- *
- * @param peer peer who's session should be updated
- * @param bw_out new outbound bandwidth limit for the peer
- */
-void
-GSC_SESSIONS_update (const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_BANDWIDTH_Value32NBO bw_out);
-
-
-/**
* End the session with the given peer (we are no longer
* connected).
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17311 - gnunet/src/core,
gnunet <=