2 * File: scalarproduct_testing.h
5 * Created on June 29, 2013, 7:39 PM
8 #ifndef SCALARPRODUCT_TESTING_H
9 #define SCALARPRODUCT_TESTING_H
15 struct GNUNET_SCALARPRODUCT_TESTING_handle
18 * Testing library system handle
20 struct GNUNET_TESTING_System *tl_system;
25 struct PeerContext *p_head;
30 struct PeerContext *p_tail;
36 * Next element in the DLL
38 struct PeerContext *next;
41 * Previous element in the DLL
43 struct PeerContext *prev;
46 * Peer's testing handle
48 struct GNUNET_TESTING_Peer *peer;
53 struct GNUNET_PeerIdentity id;
56 * Handle for the peer's ARM process
58 struct GNUNET_OS_Process *arm_proc;
61 * Pointer to Vector Product Handle
63 struct GNUNET_SCALARPRODUCT_Handle *vh;
66 * Closure for the callbacks
71 * An unique number to identify the peer
76 * Peer's configuration
78 struct GNUNET_CONFIGURATION_Handle *cfg;
81 * Pointer to the master testing handle
83 struct GNUNET_SCALARPRODUCT_TESTING_handle * vth;
86 * Callback when two peers are connected and both have called the connect callback
87 * to notify clients about a new peer
89 void (*start_cb) (struct PeerContext * p, void *cls);
92 // * Pointer to function where the test occurs
94 // GNUNET_SCALARPRODUCT_TESTING_start_cb start_cb;
98 * Callback when two peers are connected and both have called the connect callback
99 * to notify clients about a new peer
101 typedef void (*GNUNET_SCALARPRODUCT_TESTING_start_cb) (struct PeerContext * p,
104 struct GNUNET_SCALARPRODUCT_TESTING_handle *
105 GNUNET_SCALARPRODUCT_TESTING_init();
108 GNUNET_SCALARPRODUCT_TESTING_done(struct GNUNET_SCALARPRODUCT_TESTING_handle * vth);
111 GNUNET_SCALARPRODUCT_TESTING_start_peer (struct GNUNET_SCALARPRODUCT_TESTING_handle * vth,
112 const char *cfgname, int peer_id,
113 GNUNET_SCALARPRODUCT_TESTING_start_cb start_cb,
117 GNUNET_SCALARPRODUCT_TESTING_stop_peer
118 (struct GNUNET_SCALARPRODUCT_TESTING_handle * vth,
119 struct PeerContext *p);
128 #endif /* SCALARPRODUCT_TESTING_H */