2 This file is part of GNUnet.
3 (C) 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 * @author Christian Grothoff
24 * @brief IPC messages between DV service and DV plugin
29 #include "gnunet_common.h"
31 GNUNET_NETWORK_STRUCT_BEGIN
34 * DV service tells plugin about a DV-connection being
37 struct GNUNET_DV_ConnectMessage
40 * Type: GNUNET_MESSAGE_TYPE_TRANSPORT_DV_CONNECT
42 struct GNUNET_MessageHeader header;
45 * The distance to the peer that we are now connected to
47 uint32_t distance GNUNET_PACKED;
50 * The other peer (at the given distance).
52 struct GNUNET_PeerIdentity peer;
58 * DV service tells plugin about a DV-connection being
59 * no longer available.
61 * Sender address is copied to the end of this struct,
62 * followed by the actual message received.
64 struct GNUNET_DV_DisconnectMessage
67 * Type: GNUNET_MESSAGE_TYPE_TRANSPORT_DV_DISCONNECT
69 struct GNUNET_MessageHeader header;
74 uint32_t reserved GNUNET_PACKED;
77 * The peer that is no longer available.
79 struct GNUNET_PeerIdentity peer;
85 * DV Message, contains a message that was received via DV for this
86 * peer. Send from the DV service to the DV plugin.
88 * Sender address is copied to the end of this struct,
89 * followed by the actual message received.
91 struct GNUNET_DV_ReceivedMessage
94 * Type: GNUNET_MESSAGE_TYPE_TRANSPORT_DV_RECV
96 struct GNUNET_MessageHeader header;
99 * The distance to the peer that we received the message from
101 uint32_t distance GNUNET_PACKED;
104 * The (actual) sender of the message
106 struct GNUNET_PeerIdentity sender;
108 /* payload follows */
113 * Message from plugin to DV service, requesting a
114 * message to be routed.
116 struct GNUNET_DV_SendMessage
119 * Type: GNUNET_MESSAGE_TYPE_DV_SEND
121 struct GNUNET_MessageHeader header;
124 * Unique ID for this message, for confirm callback, must never be zero.
126 uint32_t uid GNUNET_PACKED;
129 * The (actual) target of the message
131 struct GNUNET_PeerIdentity target;
137 * Message from service to DV plugin, saying that a
138 * SEND request was handled.
140 struct GNUNET_DV_AckMessage
143 * Type: GNUNET_MESSAGE_TYPE_DV_SEND_ACK or
144 * GNUNET_MESSAGE_TYPE_DV_SEND_NACK.
146 struct GNUNET_MessageHeader header;
149 * Which message is being acknowledged?
151 uint32_t uid GNUNET_PACKED;
154 * The (actual) target of the message
156 struct GNUNET_PeerIdentity target;
162 * Message from service to DV plugin, saying that our
163 * distance to another peer changed.
165 struct GNUNET_DV_DistanceUpdateMessage
168 * Type: GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED.
170 struct GNUNET_MessageHeader header;
173 * What is the new distance?
175 uint32_t distance GNUNET_PACKED;
178 * The peer for which the distance changed.
180 struct GNUNET_PeerIdentity peer;
185 GNUNET_NETWORK_STRUCT_END