gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32545 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r32545 - gnunet/src/mesh
Date: Thu, 6 Mar 2014 02:36:24 +0100

Author: bartpolot
Date: 2014-03-06 02:36:24 +0100 (Thu, 06 Mar 2014)
New Revision: 32545

Modified:
   gnunet/src/mesh/gnunet-service-mesh_connection.c
   gnunet/src/mesh/gnunet-service-mesh_peer.c
   gnunet/src/mesh/mesh_protocol.h
Log:
- remove unneccessary reserved fields

Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c    2014-03-06 01:36:22 UTC 
(rev 32544)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c    2014-03-06 01:36:24 UTC 
(rev 32545)
@@ -2818,13 +2818,11 @@
     case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY:
       dmsg = (struct GNUNET_MESH_ConnectionDestroy *) data;
       dmsg->cid = c->id;
-      dmsg->reserved = 0;
       break;
 
     case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN:
       bmsg = (struct GNUNET_MESH_ConnectionBroken *) data;
       bmsg->cid = c->id;
-      bmsg->reserved = 0;
       break;
 
     case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE:

Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-03-06 01:36:22 UTC (rev 
32544)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-03-06 01:36:24 UTC (rev 
32545)
@@ -500,10 +500,7 @@
   msg->header.size = htons (sizeof (struct GNUNET_MESH_ConnectionACK));
   msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK);
   msg->cid = *GMC_get_id (c);
-  msg->reserved = 0;
 
-  /* TODO add signature */
-
   LOG (GNUNET_ERROR_TYPE_DEBUG, "CONNECTION ACK sent!\n");
   return sizeof (struct GNUNET_MESH_ConnectionACK);
 }

Modified: gnunet/src/mesh/mesh_protocol.h
===================================================================
--- gnunet/src/mesh/mesh_protocol.h     2014-03-06 01:36:22 UTC (rev 32544)
+++ gnunet/src/mesh/mesh_protocol.h     2014-03-06 01:36:24 UTC (rev 32545)
@@ -83,16 +83,10 @@
   struct GNUNET_MessageHeader header;
 
     /**
-     * Always 0.
-     */
-  uint32_t reserved GNUNET_PACKED;
-
-    /**
      * ID of the connection.
      */
   struct GNUNET_HashCode cid;
 
-  /* TODO: signature */
 };
 
 
@@ -107,11 +101,6 @@
   struct GNUNET_MessageHeader header;
 
     /**
-     * Always 0.
-     */
-  uint32_t reserved GNUNET_PACKED;
-
-    /**
      * ID of the connection.
      */
   struct GNUNET_HashCode cid;
@@ -236,11 +225,6 @@
   struct GNUNET_MessageHeader header;
 
   /**
-   * Initialization Vector for payload encryption.
-   */
-  uint32_t iv GNUNET_PACKED;
-
-  /**
    * ID of the connection.
    */
   struct GNUNET_HashCode cid;
@@ -256,10 +240,25 @@
   uint32_t ttl GNUNET_PACKED;
 
   /**
+   * Initialization Vector for payload encryption.
+   */
+  uint32_t iv GNUNET_PACKED;
+
+  /**
+   * MAC of the encrypted message, used to verify message integrity.
+   * Everything after this value  will be encrypted and authenticated.
+   */
+  struct GNUNET_HashCode hmac;
+
+  /**
    * Encrypted content follows.
    */
 };
 
+
+/**
+ * Message to create a Channel.
+ */
 struct GNUNET_MESH_ChannelCreate
 {
   /**
@@ -283,6 +282,10 @@
   uint32_t opt GNUNET_PACKED;
 };
 
+
+/**
+ * Message to manage a Channel (ACK, NACK, Destroy).
+ */
 struct GNUNET_MESH_ChannelManage
 {
   /**
@@ -296,6 +299,7 @@
   MESH_ChannelNumber chid GNUNET_PACKED;
 };
 
+
 /**
  * Message for mesh data traffic.
  */
@@ -408,11 +412,6 @@
   struct GNUNET_MessageHeader header;
 
     /**
-     * Always 0.
-     */
-  uint32_t reserved GNUNET_PACKED;
-
-    /**
      * ID of the connection.
      */
   struct GNUNET_HashCode cid;
@@ -426,8 +425,6 @@
      * ID of the endpoint
      */
   struct GNUNET_PeerIdentity peer2;
-
-  /* TODO: signature */
 };
 
 
@@ -442,16 +439,9 @@
   struct GNUNET_MessageHeader header;
 
     /**
-     * Always 0.
-     */
-  uint32_t reserved GNUNET_PACKED;
-
-    /**
      * ID of the connection.
      */
   struct GNUNET_HashCode cid;
-
-  /* TODO: signature */
 };
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]