aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-04-11 11:49:51 +0000
committerChristian Grothoff <christian@grothoff.org>2014-04-11 11:49:51 +0000
commit24712c94e185b72c30da25ea1b3a1784bde0defa (patch)
tree1ca399a023e0cdf48dbf9b411bb4b245081a1100 /src/core/core.h
parenta61a4e0ffd7d563f3ae4d758f06a894edee71f58 (diff)
downloadgnunet-24712c94e185b72c30da25ea1b3a1784bde0defa.tar.gz
gnunet-24712c94e185b72c30da25ea1b3a1784bde0defa.zip
towards fixing #3363: replacing old iteration API with new monitoring API for core (needs testing, gnunet-core incomplete)
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/core/core.h b/src/core/core.h
index 1c6e0bc72..fba9ad1f3 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -62,7 +62,7 @@ struct InitMessage
62{ 62{
63 63
64 /** 64 /**
65 * Header with type GNUNET_MESSAGE_TYPE_CORE_INIT. 65 * Header with type #GNUNET_MESSAGE_TYPE_CORE_INIT.
66 */ 66 */
67 struct GNUNET_MessageHeader header; 67 struct GNUNET_MessageHeader header;
68 68
@@ -82,7 +82,7 @@ struct InitReplyMessage
82{ 82{
83 83
84 /** 84 /**
85 * Header with type GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY 85 * Header with type #GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY
86 */ 86 */
87 struct GNUNET_MessageHeader header; 87 struct GNUNET_MessageHeader header;
88 88
@@ -106,7 +106,7 @@ struct InitReplyMessage
106struct ConnectNotifyMessage 106struct ConnectNotifyMessage
107{ 107{
108 /** 108 /**
109 * Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT 109 * Header with type #GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT
110 */ 110 */
111 struct GNUNET_MessageHeader header; 111 struct GNUNET_MessageHeader header;
112 112
@@ -130,7 +130,7 @@ struct ConnectNotifyMessage
130struct DisconnectNotifyMessage 130struct DisconnectNotifyMessage
131{ 131{
132 /** 132 /**
133 * Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT. 133 * Header with type #GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT.
134 */ 134 */
135 struct GNUNET_MessageHeader header; 135 struct GNUNET_MessageHeader header;
136 136
@@ -159,8 +159,8 @@ struct DisconnectNotifyMessage
159struct NotifyTrafficMessage 159struct NotifyTrafficMessage
160{ 160{
161 /** 161 /**
162 * Header with type GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND 162 * Header with type #GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND
163 * or GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND. 163 * or #GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND.
164 */ 164 */
165 struct GNUNET_MessageHeader header; 165 struct GNUNET_MessageHeader header;
166 166
@@ -291,6 +291,35 @@ struct SendMessage
291}; 291};
292 292
293 293
294/**
295 * Message sent by the service to monitor clients to notify them
296 * about a peer changing status.
297 */
298struct MonitorNotifyMessage
299{
300 /**
301 * Header with type #GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY
302 */
303 struct GNUNET_MessageHeader header;
304
305 /**
306 * New peer state, an `enum GNUNET_CORE_KxState` in NBO.
307 */
308 uint32_t state GNUNET_PACKED;
309
310 /**
311 * Identity of the peer.
312 */
313 struct GNUNET_PeerIdentity peer;
314
315 /**
316 * How long will we stay in this state (if nothing else happens)?
317 */
318 struct GNUNET_TIME_AbsoluteNBO timeout;
319
320};
321
322
294GNUNET_NETWORK_STRUCT_END 323GNUNET_NETWORK_STRUCT_END
295#endif 324#endif
296/* end of core.h */ 325/* end of core.h */