-code cleanup
[oweals/gnunet.git] / src / core / core.h
index abbe9acc097a6a19a41268bb20dd9952c2c3fe34..9b342c3ebf8f760fbe1662a18f6ed9df9ce1b33a 100644 (file)
  * @brief common internal definitions for core service
  * @author Christian Grothoff
  */
+#ifndef CORE_H
+#define CORE_H
+
 #include "gnunet_bandwidth_lib.h"
+#include "gnunet_transport_service.h"
 #include "gnunet_crypto_lib.h"
 #include "gnunet_time_lib.h"
 
  */
 #define DEBUG_CORE GNUNET_EXTRA_LOGGING
 
-/**
- * Debugging interaction core-clients.
- */
-#define DEBUG_CORE_CLIENT GNUNET_EXTRA_LOGGING
-
 /**
  * Definition of bits in the InitMessage's options field that specify
  * which events this client cares about.  Note that inbound messages
@@ -44,8 +43,6 @@
  * transmitted to the client.
  */
 #define GNUNET_CORE_OPTION_NOTHING             0
-#define GNUNET_CORE_OPTION_SEND_CONNECT        1
-#define GNUNET_CORE_OPTION_SEND_DISCONNECT     2
 #define GNUNET_CORE_OPTION_SEND_STATUS_CHANGE  4
 #define GNUNET_CORE_OPTION_SEND_FULL_INBOUND   8
 #define GNUNET_CORE_OPTION_SEND_HDR_INBOUND   16
@@ -53,6 +50,8 @@
 #define GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND  64
 
 
+GNUNET_NETWORK_STRUCT_BEGIN
+
 /**
  * Message transmitted core clients to gnunet-service-core
  * to start the interaction.  This header is followed by
@@ -122,12 +121,6 @@ struct ConnectNotifyMessage
    */
   struct GNUNET_PeerIdentity peer;
 
-  /**
-   * First of the ATS information blocks (we must have at least
-   * one due to the 0-termination requirement).
-   */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
-
 };
 
 
@@ -172,7 +165,7 @@ struct PeerStatusNotifyMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
 };
 
@@ -233,7 +226,7 @@ struct NotifyTrafficMessage
    * First of the ATS information blocks (we must have at least
    * one due to the 0-termination requirement).
    */
-  struct GNUNET_TRANSPORT_ATS_Information ats;
+  struct GNUNET_ATS_Information ats;
 
 };
 
@@ -339,7 +332,7 @@ struct SendMessage
   struct GNUNET_TIME_AbsoluteNBO deadline;
 
   /**
-   * Identity of the receiver or sender.
+   * Identity of the intended receiver.
    */
   struct GNUNET_PeerIdentity peer;
 
@@ -356,31 +349,6 @@ struct SendMessage
 };
 
 
-/**
- * Client asking core to connect to a particular target.  There is no
- * response from the core to this type of request (however, if an
- * actual connection is created or destroyed, be it because of this
- * type request or not, the core generally needs to notify the
- * clients).
- */
-struct ConnectMessage
-{
-  /**
-   * Header with type GNUNET_MESSAGE_TYPE_REQUEST_CONNECT or
-   * GNUNET_MESSAGE_TYPE_REQUEST_DISCONNECT.
-   */
-  struct GNUNET_MessageHeader header;
-
-  /**
-   * For alignment.
-   */
-  uint32_t reserved GNUNET_PACKED;
-
-  /**
-   * Identity of the other peer.
-   */
-  struct GNUNET_PeerIdentity peer;
-
-};
-
+GNUNET_NETWORK_STRUCT_END
+#endif
 /* end of core.h */