[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32911 - in gnunet/src: include mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32911 - in gnunet/src: include mesh |
Date: |
Mon, 7 Apr 2014 14:00:29 +0200 |
Author: bartpolot
Date: 2014-04-07 14:00:28 +0200 (Mon, 07 Apr 2014)
New Revision: 32911
Modified:
gnunet/src/include/gnunet_mesh_service.h
gnunet/src/mesh/gnunet-mesh.c
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_connection.h
gnunet/src/mesh/gnunet-service-mesh_local.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
gnunet/src/mesh/mesh.h
gnunet/src/mesh/mesh_api.c
gnunet/src/mesh/mesh_common.c
gnunet/src/mesh/mesh_protocol.h
Log:
- rename 256 bit mesh hash type
Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h 2014-04-07 11:28:03 UTC (rev
32910)
+++ gnunet/src/include/gnunet_mesh_service.h 2014-04-07 12:00:28 UTC (rev
32911)
@@ -59,7 +59,7 @@
* instead of the 512 from @c GNUNET_HashCode.
*
*/
-struct GNUNET_MeshHash
+struct GNUNET_MESH_Hash
{
unsigned char bits[256 / 8];
};
Modified: gnunet/src/mesh/gnunet-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-mesh.c 2014-04-07 11:28:03 UTC (rev 32910)
+++ gnunet/src/mesh/gnunet-mesh.c 2014-04-07 12:00:28 UTC (rev 32911)
@@ -542,7 +542,7 @@
unsigned int n_channels,
unsigned int n_connections,
uint32_t *channels,
- struct GNUNET_MeshHash *connections,
+ struct GNUNET_MESH_Hash *connections,
unsigned int estate,
unsigned int cstate)
{
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-07 11:28:03 UTC
(rev 32910)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-07 12:00:28 UTC
(rev 32911)
@@ -171,7 +171,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash id;
+ struct GNUNET_MESH_Hash id;
/**
* State of the connection.
@@ -413,7 +413,7 @@
* @param cid Connection ID.
*/
static struct MeshConnection *
-connection_get (const struct GNUNET_MeshHash *cid)
+connection_get (const struct GNUNET_MESH_Hash *cid)
{
return GNUNET_CONTAINER_multihashmap_get (connections, GM_h2hc (cid));
}
@@ -840,7 +840,7 @@
* @param peer Peer to notify (neighbor who sent the connection).
*/
static void
-send_broken2 (struct GNUNET_MeshHash *connection_id,
+send_broken2 (struct GNUNET_MESH_Hash *connection_id,
const struct GNUNET_PeerIdentity *id1,
const struct GNUNET_PeerIdentity *id2,
GNUNET_PEER_Id peer_id)
@@ -1481,7 +1481,7 @@
static void
log_message (const struct GNUNET_MessageHeader *message,
const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MeshHash *hash)
+ const struct GNUNET_MESH_Hash *hash)
{
LOG (GNUNET_ERROR_TYPE_INFO, "<- %s on connection %s from %s\n",
GM_m2s (ntohs (message->type)), GNUNET_h2s (GM_h2hc (hash)),
@@ -1508,7 +1508,7 @@
{
struct GNUNET_MESH_ConnectionCreate *msg;
struct GNUNET_PeerIdentity *id;
- struct GNUNET_MeshHash *cid;
+ struct GNUNET_MESH_Hash *cid;
struct MeshPeerPath *path;
struct MeshPeer *dest_peer;
struct MeshPeer *orig_peer;
@@ -2405,7 +2405,7 @@
struct MeshConnection *
-GMC_new (const struct GNUNET_MeshHash *cid,
+GMC_new (const struct GNUNET_MESH_Hash *cid,
struct MeshTunnel3 *t,
struct MeshPeerPath *p,
unsigned int own_pos)
@@ -2522,7 +2522,7 @@
*
* @return ID of the connection.
*/
-const struct GNUNET_MeshHash *
+const struct GNUNET_MESH_Hash *
GMC_get_id (const struct MeshConnection *c)
{
return &c->id;
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.h 2014-04-07 11:28:03 UTC
(rev 32910)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.h 2014-04-07 12:00:28 UTC
(rev 32911)
@@ -266,7 +266,7 @@
* @return Newly created connection, NULL in case of error (own id not in
path).
*/
struct MeshConnection *
-GMC_new (const struct GNUNET_MeshHash *cid,
+GMC_new (const struct GNUNET_MESH_Hash *cid,
struct MeshTunnel3 *t,
struct MeshPeerPath *p,
unsigned int own_pos);
@@ -289,7 +289,7 @@
*
* @return ID of the connection.
*/
-const struct GNUNET_MeshHash *
+const struct GNUNET_MESH_Hash *
GMC_get_id (const struct MeshConnection *c);
Modified: gnunet/src/mesh/gnunet-service-mesh_local.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_local.c 2014-04-07 11:28:03 UTC (rev
32910)
+++ gnunet/src/mesh/gnunet-service-mesh_local.c 2014-04-07 12:00:28 UTC (rev
32911)
@@ -727,7 +727,7 @@
iter_connection (void *cls, struct MeshConnection *c)
{
struct GNUNET_MESH_LocalInfoTunnel *msg = cls;
- struct GNUNET_MeshHash *h = (struct GNUNET_MeshHash *) &msg[1];
+ struct GNUNET_MESH_Hash *h = (struct GNUNET_MESH_Hash *) &msg[1];
h[msg->connections] = *(GMC_get_id (c));
msg->connections++;
@@ -805,7 +805,7 @@
c_n = GMT_count_connections (t);
size = sizeof (struct GNUNET_MESH_LocalInfoTunnel);
- size += c_n * sizeof (struct GNUNET_MeshHash);
+ size += c_n * sizeof (struct GNUNET_MESH_Hash);
size += ch_n * sizeof (MESH_ChannelNumber);
resp = GNUNET_malloc (size);
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-04-07 11:28:03 UTC
(rev 32910)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-04-07 12:00:28 UTC
(rev 32911)
@@ -756,7 +756,7 @@
*/
static void
t_hmac (struct MeshTunnel3 *t, const void *plaintext, size_t size, uint32_t iv,
- int outgoing, struct GNUNET_MeshHash *hmac)
+ int outgoing, struct GNUNET_MESH_Hash *hmac)
{
struct GNUNET_CRYPTO_AuthKey auth_key;
static const char ctx[] = "mesh authentication key";
@@ -1675,7 +1675,7 @@
char cbuf [payload_size];
struct GNUNET_MessageHeader *msgh;
unsigned int off;
- struct GNUNET_MeshHash hmac;
+ struct GNUNET_MESH_Hash hmac;
decrypted_size = t_decrypt (t, cbuf, &msg[1], payload_size, msg->iv);
t_hmac (t, &msg[1], payload_size, msg->iv, GNUNET_NO, &hmac);
@@ -2237,7 +2237,7 @@
GMT_use_path (struct MeshTunnel3 *t, struct MeshPeerPath *p)
{
struct MeshConnection *c;
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
unsigned int own_pos;
if (NULL == t || NULL == p)
Modified: gnunet/src/mesh/mesh.h
===================================================================
--- gnunet/src/mesh/mesh.h 2014-04-07 11:28:03 UTC (rev 32910)
+++ gnunet/src/mesh/mesh.h 2014-04-07 12:00:28 UTC (rev 32911)
@@ -319,14 +319,14 @@
* @return A HashCode containing the original 256 bit hash right-padded with 0.
*/
const struct GNUNET_HashCode *
-GM_h2hc (const struct GNUNET_MeshHash *id);
+GM_h2hc (const struct GNUNET_MESH_Hash *id);
/**
* Get a string from a Mesh Hash (256 bits).
* WARNING: Not reentrant (based on GNUNET_h2s).
*/
const char *
-GM_h2s (const struct GNUNET_MeshHash *id);
+GM_h2s (const struct GNUNET_MESH_Hash *id);
/**
* Convert a message type into a string to help debug
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2014-04-07 11:28:03 UTC (rev 32910)
+++ gnunet/src/mesh/mesh_api.c 2014-04-07 12:00:28 UTC (rev 32911)
@@ -1074,7 +1074,7 @@
size_t msize;
unsigned int ch_n;
unsigned int c_n;
- struct GNUNET_MeshHash *conns;
+ struct GNUNET_MESH_Hash *conns;
MESH_ChannelNumber *chns;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Get Tunnel messasge received\n");
@@ -1097,7 +1097,7 @@
ch_n = ntohl (msg->channels);
c_n = ntohl (msg->connections);
esize += ch_n * sizeof (MESH_ChannelNumber);
- esize += c_n * sizeof (struct GNUNET_MeshHash);
+ esize += c_n * sizeof (struct GNUNET_MESH_Hash);
if (msize != esize)
{
GNUNET_break_op (0);
@@ -1111,7 +1111,7 @@
}
/* Call Callback with tunnel info. */
- conns = (struct GNUNET_MeshHash *) &msg[1];
+ conns = (struct GNUNET_MESH_Hash *) &msg[1];
chns = (MESH_ChannelNumber *) &conns[c_n];
h->info_cb.tunnel_cb (h->info_cls, &msg->destination,
ch_n, c_n, chns, conns,
@@ -1176,7 +1176,7 @@
size_t msize;
unsigned int ch_n;
unsigned int c_n;
- struct GNUNET_MeshHash *conns;
+ struct GNUNET_MESH_Hash *conns;
MESH_ChannelNumber *chns;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Get Tunnel messasge received\n");
@@ -1199,7 +1199,7 @@
ch_n = ntohl (msg->channels);
c_n = ntohl (msg->connections);
esize += ch_n * sizeof (MESH_ChannelNumber);
- esize += c_n * sizeof (struct GNUNET_MeshHash);
+ esize += c_n * sizeof (struct GNUNET_MESH_Hash);
if (msize != esize)
{
GNUNET_break_op (0);
@@ -1213,7 +1213,7 @@
}
/* Call Callback with tunnel info. */
- conns = (struct GNUNET_MeshHash *) &msg[1];
+ conns = (struct GNUNET_MESH_Hash *) &msg[1];
chns = (MESH_ChannelNumber *) &conns[c_n];
h->info_cb.tunnel_cb (h->info_cls, &msg->destination,
ch_n, c_n, chns, conns,
Modified: gnunet/src/mesh/mesh_common.c
===================================================================
--- gnunet/src/mesh/mesh_common.c 2014-04-07 11:28:03 UTC (rev 32910)
+++ gnunet/src/mesh/mesh_common.c 2014-04-07 12:00:28 UTC (rev 32911)
@@ -78,7 +78,7 @@
const struct GNUNET_HashCode *
-GM_h2hc (const struct GNUNET_MeshHash *id)
+GM_h2hc (const struct GNUNET_MESH_Hash *id)
{
static struct GNUNET_HashCode hc;
memcpy (&hc, id, sizeof (*id));
@@ -88,7 +88,7 @@
const char *
-GM_h2s (const struct GNUNET_MeshHash *id)
+GM_h2s (const struct GNUNET_MESH_Hash *id)
{
static char s[53];
Modified: gnunet/src/mesh/mesh_protocol.h
===================================================================
--- gnunet/src/mesh/mesh_protocol.h 2014-04-07 11:28:03 UTC (rev 32910)
+++ gnunet/src/mesh/mesh_protocol.h 2014-04-07 12:00:28 UTC (rev 32911)
@@ -63,7 +63,7 @@
/**
* ID of the connection
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
/**
* path_length structs defining the *whole* path from the origin [0] to the
@@ -85,7 +85,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
};
@@ -103,7 +103,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
/* Specific KX message follows. */
};
@@ -227,7 +227,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
/**
* ID of the packet (hop by hop).
@@ -248,7 +248,7 @@
* MAC of the encrypted message, used to verify message integrity.
* Everything after this value will be encrypted and authenticated.
*/
- struct GNUNET_MeshHash hmac;
+ struct GNUNET_MESH_Hash hmac;
/**
* Encrypted content follows.
@@ -374,7 +374,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
};
@@ -396,7 +396,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
};
@@ -414,7 +414,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
/**
* ID of the endpoint
@@ -441,7 +441,7 @@
/**
* ID of the connection.
*/
- struct GNUNET_MeshHash cid;
+ struct GNUNET_MESH_Hash cid;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32911 - in gnunet/src: include mesh,
gnunet <=