aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h27
-rw-r--r--src/include/gnunet_transport_monitor_service.h18
2 files changed, 32 insertions, 13 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index fbdee5415..6f3b886d8 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 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/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -3041,7 +3041,7 @@ extern "C"
3041#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP 1204 3041#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP 1204
3042 3042
3043/** 3043/**
3044 * @brief inform transport that a queue was torn down 3044 * @brief inform transport that a queue was torn down
3045 */ 3045 */
3046#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN 1205 3046#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN 1205
3047 3047
@@ -3072,12 +3072,31 @@ extern "C"
3072 3072
3073/** 3073/**
3074 * Message sent to indicate to the transport which address 3074 * Message sent to indicate to the transport which address
3075 * prefix is supported by a communicator. 3075 * prefix is supported by a communicator.
3076 */ 3076 */
3077#define GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR 1211 3077#define GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR 1211
3078 3078
3079
3080/**
3081 * Message sent to indicate to the transport that a monitor
3082 * wants to observe certain events.
3083 */
3084#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_START 1250
3085
3086/**
3087 * Message sent to indicate to a monitor about events.
3088 */
3089#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_DATA 1251
3090
3091/**
3092 * Message sent to indicate to a monitor that a one-shot
3093 * iteration over events is done.
3094 */
3095#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_END 1252
3096
3097
3079/** 3098/**
3080 * Next available: 1300 3099 * Next available: 1400
3081 */ 3100 */
3082 3101
3083 3102
diff --git a/src/include/gnunet_transport_monitor_service.h b/src/include/gnunet_transport_monitor_service.h
index b9d024d59..76fec0af4 100644
--- a/src/include/gnunet_transport_monitor_service.h
+++ b/src/include/gnunet_transport_monitor_service.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 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/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -29,7 +29,6 @@
29 * 29 *
30 * @{ 30 * @{
31 */ 31 */
32
33#ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H 32#ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H
34#define GNUNET_TRANSPORT_MONITOR_SERVICE_H 33#define GNUNET_TRANSPORT_MONITOR_SERVICE_H
35 34
@@ -42,6 +41,7 @@ extern "C"
42#endif 41#endif
43 42
44#include "gnunet_util_lib.h" 43#include "gnunet_util_lib.h"
44#include "gnunet_ats_service.h"
45 45
46/** 46/**
47 * Version number of the transport API. 47 * Version number of the transport API.
@@ -121,7 +121,7 @@ struct GNUNET_TRANSPORT_MonitorInformation
121 * @param mi monitoring data on the peer 121 * @param mi monitoring data on the peer
122 */ 122 */
123typedef void 123typedef void
124(*GNUNET_TRANSPORT_MontiorCallback) (void *cls, 124(*GNUNET_TRANSPORT_MonitorCallback) (void *cls,
125 const struct GNUNET_PeerIdentity *peer, 125 const struct GNUNET_PeerIdentity *peer,
126 const struct GNUNET_TRANSPORT_MonitorInformation *mi); 126 const struct GNUNET_TRANSPORT_MonitorInformation *mi);
127 127
@@ -155,24 +155,24 @@ struct GNUNET_TRANSPORT_MonitorContext;
155 * NULL for all peers 155 * NULL for all peers
156 * @param one_shot #GNUNET_YES to return the current state and then end (with NULL+NULL), 156 * @param one_shot #GNUNET_YES to return the current state and then end (with NULL+NULL),
157 * #GNUNET_NO to monitor peers continuously 157 * #GNUNET_NO to monitor peers continuously
158 * @param mc function to call with the results 158 * @param cb function to call with the results
159 * @param mc_cls closure for @a mc 159 * @param cb_cls closure for @a mc
160 */ 160 */
161struct GNUNET_TRANSPORT_MonitorContext * 161struct GNUNET_TRANSPORT_MonitorContext *
162GNUNET_TRANSPORT_monitor (const struct GNUNET_CONFIGURATION_Handle *cfg, 162GNUNET_TRANSPORT_monitor (const struct GNUNET_CONFIGURATION_Handle *cfg,
163 const struct GNUNET_PeerIdentity *peer, 163 const struct GNUNET_PeerIdentity *peer,
164 int one_shot, 164 int one_shot,
165 GNUNET_TRANSPORT_MonitorCallback mc, 165 GNUNET_TRANSPORT_MonitorCallback cb,
166 void *mc_cls); 166 void *cb_cls);
167 167
168 168
169/** 169/**
170 * Cancel request to monitor peers 170 * Cancel request to monitor peers
171 * 171 *
172 * @param pmc handle for the request to cancel 172 * @param mc handle for the request to cancel
173 */ 173 */
174void 174void
175GNUNET_TRANSPORT_monitor_cancel (struct GNUNET_TRANSPORT_MonitorContext *pmc); 175GNUNET_TRANSPORT_monitor_cancel (struct GNUNET_TRANSPORT_MonitorContext *mc);
176 176
177 177
178#if 0 /* keep Emacsens' auto-indent happy */ 178#if 0 /* keep Emacsens' auto-indent happy */