aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-08-11 22:04:27 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-08-11 22:04:27 +0000
commitcb11932b64344bc9bde5f5163eefdfc059946c9a (patch)
treeb7f02a55d2ba78322a190617d809733527d21194 /src/transport/transport-testing.h
parentc34cc2e767ce2e48787148694c810602f19f7d5e (diff)
downloadgnunet-cb11932b64344bc9bde5f5163eefdfc059946c9a.tar.gz
gnunet-cb11932b64344bc9bde5f5163eefdfc059946c9a.zip
cb wrapper for connecting peers
Diffstat (limited to 'src/transport/transport-testing.h')
-rw-r--r--src/transport/transport-testing.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h
index 2c45ca67c..8e67944ba 100644
--- a/src/transport/transport-testing.h
+++ b/src/transport/transport-testing.h
@@ -41,13 +41,23 @@ struct PeerContext
41 struct GNUNET_TRANSPORT_Handle *th; 41 struct GNUNET_TRANSPORT_Handle *th;
42 struct GNUNET_PeerIdentity id; 42 struct GNUNET_PeerIdentity id;
43 struct GNUNET_OS_Process *arm_proc; 43 struct GNUNET_OS_Process *arm_proc;
44
45 GNUNET_TRANSPORT_ReceiveCallback rec;
46 GNUNET_TRANSPORT_NotifyConnect nc;
47 GNUNET_TRANSPORT_NotifyDisconnect nd;
48 void * cb_cls;
49
44 char * servicehome; 50 char * servicehome;
45}; 51};
46 52
47typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1, struct PeerContext * p2, void *cls); 53typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1, struct PeerContext * p2, void *cls);
48 54
49struct PeerContext * 55struct PeerContext *
50GNUNET_TRANSPORT_TESTING_start_peer (const char * cfgname); 56GNUNET_TRANSPORT_TESTING_start_peer (const char * cfgname,
57 GNUNET_TRANSPORT_ReceiveCallback rec,
58 GNUNET_TRANSPORT_NotifyConnect nc,
59 GNUNET_TRANSPORT_NotifyDisconnect nd,
60 void * cb_cls);
51 61
52void 62void
53GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext * pc); 63GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext * pc);