aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_core_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-07 06:27:10 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-07 06:27:10 +0000
commitac2de52a5de68f6f4f13b7aa01a481869fffc6aa (patch)
tree856c9f0b2f55f8cae99f3c7b3bf22beaecbf58da /src/include/gnunet_core_service.h
parentc1a3c11f8665432d9db6d549c28c0329668e66af (diff)
downloadgnunet-ac2de52a5de68f6f4f13b7aa01a481869fffc6aa.tar.gz
gnunet-ac2de52a5de68f6f4f13b7aa01a481869fffc6aa.zip
hacks from trip
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r--src/include/gnunet_core_service.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 069bf5202..2434e3770 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -64,6 +64,26 @@ typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls,
64 struct GNUNET_TIME_Relative latency, 64 struct GNUNET_TIME_Relative latency,
65 uint32_t distance); 65 uint32_t distance);
66 66
67/**
68 * Method called whenever a given peer has a status change.
69 *
70 * @param cls closure
71 * @param peer peer identity this notification is about
72 * @param latency reported latency of the connection with 'other'
73 * @param distance reported distance (DV) to 'other'
74 * @param bandwidth_in available amount of inbound bandwidth
75 * @param bandwidth_out available amount of outbound bandwidth
76 * @param timeout absolute time when this peer will time out
77 * unless we see some further activity from it
78 */
79typedef void (*GNUNET_CORE_PeerStatusEventHandler) (void *cls,
80 const struct
81 GNUNET_PeerIdentity * peer,
82 struct GNUNET_TIME_Relative latency,
83 uint32_t distance,
84 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
85 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
86 struct GNUNET_TIME_Absolute timeout);
67 87
68 88
69/** 89/**
@@ -166,6 +186,7 @@ typedef void
166 * connected to the core service; note that timeout is only meaningful if init is not NULL 186 * connected to the core service; note that timeout is only meaningful if init is not NULL
167 * @param connects function to call on peer connect, can be NULL 187 * @param connects function to call on peer connect, can be NULL
168 * @param disconnects function to call on peer disconnect / timeout, can be NULL 188 * @param disconnects function to call on peer disconnect / timeout, can be NULL
189 * @param status_events function to call on peer status changes, can be NULL
169 * @param inbound_notify function to call for all inbound messages, can be NULL 190 * @param inbound_notify function to call for all inbound messages, can be NULL
170 * note that the core is allowed to drop notifications about inbound 191 * note that the core is allowed to drop notifications about inbound
171 * messages if the client does not process them fast enough (for this 192 * messages if the client does not process them fast enough (for this
@@ -201,6 +222,7 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched,
201 GNUNET_CORE_StartupCallback init, 222 GNUNET_CORE_StartupCallback init,
202 GNUNET_CORE_ConnectEventHandler connects, 223 GNUNET_CORE_ConnectEventHandler connects,
203 GNUNET_CORE_DisconnectEventHandler disconnects, 224 GNUNET_CORE_DisconnectEventHandler disconnects,
225 GNUNET_CORE_PeerStatusEventHandler status_events,
204 GNUNET_CORE_MessageCallback inbound_notify, 226 GNUNET_CORE_MessageCallback inbound_notify,
205 int inbound_hdr_only, 227 int inbound_hdr_only,
206 GNUNET_CORE_MessageCallback outbound_notify, 228 GNUNET_CORE_MessageCallback outbound_notify,