nicer alignment, unsigned sizes
authorChristian Grothoff <christian@grothoff.org>
Tue, 30 Aug 2011 11:09:37 +0000 (11:09 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 30 Aug 2011 11:09:37 +0000 (11:09 +0000)
src/mesh/mesh_api_new.c

index b103b96e78aedf7d5307fec234deb9caa45c608e..5ec7a4875e0bcc3486a105e90e432b6281fb8c2a 100644 (file)
@@ -69,14 +69,15 @@ struct GNUNET_MESH_queue
   struct GNUNET_MESH_queue *prev;
 
     /**
-     * Size of the data to follow
+     * Data itself
      */
-  uint16_t size;
+  void *data;
 
     /**
-     * Data itself
+     * Size of the data to follow
      */
-  void *data;
+  uint16_t size;
+
 };
 
 
@@ -94,7 +95,6 @@ struct GNUNET_MESH_Handle
      * Set of handlers used for processing incoming messages in the tunnels
      */
   const struct GNUNET_MESH_MessageHandler *message_handlers;
-  int n_handlers;
 
     /**
      * Set of applications that should be claimed to be offered at this node.
@@ -102,8 +102,7 @@ struct GNUNET_MESH_Handle
      * registered independently and the mapping is up to the developer of the
      * client application.
      */
-  const GNUNET_MESH_ApplicationType *applications;
-  int n_applications;
+  const GNUNET_MESH_ApplicationType *applications; 
 
     /**
      * Double linked list of the tunnels this client is connected to.
@@ -111,11 +110,6 @@ struct GNUNET_MESH_Handle
   struct GNUNET_MESH_Tunnel *tunnels_head;
   struct GNUNET_MESH_Tunnel *tunnels_tail;
 
-    /**
-     * tid of the next tunnel to create (to avoid reusing IDs often)
-     */
-  MESH_TunnelNumber next_tid;
-
     /**
      * Callback for tunnel disconnection
      */
@@ -137,6 +131,15 @@ struct GNUNET_MESH_Handle
   struct GNUNET_MESH_queue *queue_head;
   struct GNUNET_MESH_queue *queue_tail;
 
+    /**
+     * tid of the next tunnel to create (to avoid reusing IDs often)
+     */
+  MESH_TunnelNumber next_tid;
+
+  unsigned int n_handlers;
+
+  unsigned int n_applications;
+
   /**
    * Have we started the task to receive messages from the service
    * yet? We do this after we send the 'MESH_LOCAL_CONNECT' message.
@@ -156,16 +159,6 @@ struct GNUNET_MESH_Tunnel
   struct GNUNET_MESH_Tunnel *next;
   struct GNUNET_MESH_Tunnel *prev;
 
-    /**
-     * Local ID of the tunnel
-     */
-  MESH_TunnelNumber tid;
-
-    /**
-     * Owner of the tunnel
-     */
-  GNUNET_PEER_Id owner;
-
     /**
      * Callback to execute when peers connect to the tunnel
      */
@@ -181,11 +174,6 @@ struct GNUNET_MESH_Tunnel
      */
   GNUNET_PEER_Id *peers;
 
-    /**
-     * Number of peer added to the tunnel
-     */
-  uint32_t npeers;
-
     /**
      * Closure for the connect/disconnect handlers
      */
@@ -195,6 +183,21 @@ struct GNUNET_MESH_Tunnel
      * Handle to the mesh this tunnel belongs to
      */
   struct GNUNET_MESH_Handle *mesh;
+
+    /**
+     * Local ID of the tunnel
+     */
+  MESH_TunnelNumber tid;
+
+    /**
+     * Owner of the tunnel
+     */
+  GNUNET_PEER_Id owner;
+
+    /**
+     * Number of peer added to the tunnel
+     */
+  uint32_t npeers;
 };
 
 struct GNUNET_MESH_TransmitHandle