diff options
Diffstat (limited to 'src/dv/dv.h')
-rw-r--r-- | src/dv/dv.h | 172 |
1 files changed, 0 insertions, 172 deletions
diff --git a/src/dv/dv.h b/src/dv/dv.h deleted file mode 100644 index b85d9c33f..000000000 --- a/src/dv/dv.h +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2013 GNUnet e.V. | ||
4 | |||
5 | GNUnet is free software: you can redistribute it and/or modify it | ||
6 | under the terms of the GNU Affero General Public License as published | ||
7 | by the Free Software Foundation, either version 3 of the License, | ||
8 | or (at your option) any later version. | ||
9 | |||
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 | Affero General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Affero General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @author Christian Grothoff | ||
23 | * @file dv/dv.h | ||
24 | * @brief IPC messages between DV service and DV plugin | ||
25 | */ | ||
26 | #ifndef DV_H | ||
27 | #define DV_H | ||
28 | |||
29 | #include "gnunet_common.h" | ||
30 | |||
31 | GNUNET_NETWORK_STRUCT_BEGIN | ||
32 | |||
33 | /** | ||
34 | * DV service tells plugin about a DV-connection being | ||
35 | * now available. | ||
36 | */ | ||
37 | struct GNUNET_DV_ConnectMessage | ||
38 | { | ||
39 | /** | ||
40 | * Type: #GNUNET_MESSAGE_TYPE_DV_CONNECT | ||
41 | */ | ||
42 | struct GNUNET_MessageHeader header; | ||
43 | |||
44 | /** | ||
45 | * The distance to the peer that we are now connected to | ||
46 | */ | ||
47 | uint32_t distance GNUNET_PACKED; | ||
48 | |||
49 | /** | ||
50 | * The other peer (at the given distance). | ||
51 | */ | ||
52 | struct GNUNET_PeerIdentity peer; | ||
53 | |||
54 | /** | ||
55 | * The network the peer is in | ||
56 | */ | ||
57 | uint32_t network GNUNET_PACKED; | ||
58 | |||
59 | }; | ||
60 | |||
61 | |||
62 | /** | ||
63 | * DV service tells plugin about a DV-connection being | ||
64 | * no longer available. | ||
65 | * | ||
66 | * Sender address is copied to the end of this struct, | ||
67 | * followed by the actual message received. | ||
68 | */ | ||
69 | struct GNUNET_DV_DisconnectMessage | ||
70 | { | ||
71 | /** | ||
72 | * Type: #GNUNET_MESSAGE_TYPE_DV_DISCONNECT | ||
73 | */ | ||
74 | struct GNUNET_MessageHeader header; | ||
75 | |||
76 | /** | ||
77 | * Always zero. | ||
78 | */ | ||
79 | uint32_t reserved GNUNET_PACKED; | ||
80 | |||
81 | /** | ||
82 | * The peer that is no longer available. | ||
83 | */ | ||
84 | struct GNUNET_PeerIdentity peer; | ||
85 | |||
86 | }; | ||
87 | |||
88 | |||
89 | /** | ||
90 | * DV Message, contains a message that was received via DV for this | ||
91 | * peer. Send from the DV service to the DV plugin. | ||
92 | * | ||
93 | * Sender address is copied to the end of this struct, | ||
94 | * followed by the actual message received. | ||
95 | */ | ||
96 | struct GNUNET_DV_ReceivedMessage | ||
97 | { | ||
98 | /** | ||
99 | * Type: #GNUNET_MESSAGE_TYPE_DV_RECV | ||
100 | */ | ||
101 | struct GNUNET_MessageHeader header; | ||
102 | |||
103 | /** | ||
104 | * The distance to the peer that we received the message from | ||
105 | */ | ||
106 | uint32_t distance GNUNET_PACKED; | ||
107 | |||
108 | /** | ||
109 | * The (actual) sender of the message | ||
110 | */ | ||
111 | struct GNUNET_PeerIdentity sender; | ||
112 | |||
113 | /* payload follows */ | ||
114 | }; | ||
115 | |||
116 | |||
117 | /** | ||
118 | * Message from plugin to DV service, requesting a | ||
119 | * message to be routed. | ||
120 | */ | ||
121 | struct GNUNET_DV_SendMessage | ||
122 | { | ||
123 | /** | ||
124 | * Type: #GNUNET_MESSAGE_TYPE_DV_SEND | ||
125 | */ | ||
126 | struct GNUNET_MessageHeader header; | ||
127 | |||
128 | /** | ||
129 | * Reserved for alignment. 0. | ||
130 | */ | ||
131 | uint32_t reserved GNUNET_PACKED; | ||
132 | |||
133 | /** | ||
134 | * The (actual) target of the message | ||
135 | */ | ||
136 | struct GNUNET_PeerIdentity target; | ||
137 | |||
138 | }; | ||
139 | |||
140 | |||
141 | /** | ||
142 | * Message from service to DV plugin, saying that our | ||
143 | * distance to another peer changed. | ||
144 | */ | ||
145 | struct GNUNET_DV_DistanceUpdateMessage | ||
146 | { | ||
147 | /** | ||
148 | * Type: #GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED. | ||
149 | */ | ||
150 | struct GNUNET_MessageHeader header; | ||
151 | |||
152 | /** | ||
153 | * What is the new distance? | ||
154 | */ | ||
155 | uint32_t distance GNUNET_PACKED; | ||
156 | |||
157 | /** | ||
158 | * The peer for which the distance changed. | ||
159 | */ | ||
160 | struct GNUNET_PeerIdentity peer; | ||
161 | |||
162 | /** | ||
163 | * The network the peer is in | ||
164 | */ | ||
165 | uint32_t network GNUNET_PACKED; | ||
166 | |||
167 | }; | ||
168 | |||
169 | |||
170 | GNUNET_NETWORK_STRUCT_END | ||
171 | |||
172 | #endif | ||