2 This file is part of GNUnet
3 (C) 2012-2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @brief example IPC messages between RPS API and GNS service
23 * @author Julius Bünger
26 #include "gnunet_rps_service.h"
29 * Mesh port used by RPS.
31 #define GNUNET_RPS_CADET_PORT 31337
34 GNUNET_NETWORK_STRUCT_BEGIN
36 /***********************************************************************
38 ***********************************************************************/
41 * P2P Message to push own ID to other peer.
43 struct GNUNET_RPS_P2P_PushMessage
46 * Header including size and type in NBO
48 struct GNUNET_MessageHeader header;
58 /***********************************************************************
59 * Client-Service Messages
60 ***********************************************************************/
63 * Message from client to RPS service to request random peer(s).
65 struct GNUNET_RPS_CS_RequestMessage
68 * Header including size and type in NBO
70 struct GNUNET_MessageHeader header;
73 * Number of random peer requested
75 uint32_t num_peers GNUNET_PACKED;
78 * Identifyer of the message.
80 uint64_t n GNUNET_PACKED;
85 * Message from RPS service to client to reply with random peer(s).
87 struct GNUNET_RPS_CS_ReplyMessage
90 * Type is #GNUNET_MESSAGE_TYPE_RPS_REPLY.
92 struct GNUNET_MessageHeader header;
95 * Identifyer of the message.
100 * Number of random peer replied
102 uint64_t num_peers GNUNET_PACKED;
104 /* Followed by num_peers * GNUNET_PeerIdentity */
108 * Message from client to service with seed of peers
110 struct GNUNET_RPS_CS_SeedMessage
113 * Header including size and type in NBO
115 struct GNUNET_MessageHeader header;
122 /* Followed by num_peers * GNUNET_PeerIdentity */
125 GNUNET_NETWORK_STRUCT_END