aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_testing_lib-new.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_testing_lib-new.h')
-rw-r--r--src/include/gnunet_testing_lib-new.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/gnunet_testing_lib-new.h b/src/include/gnunet_testing_lib-new.h
index bf6abfc44..9d8bc364b 100644
--- a/src/include/gnunet_testing_lib-new.h
+++ b/src/include/gnunet_testing_lib-new.h
@@ -73,6 +73,7 @@ GNUNET_TESTING_system_create (const char *tmppath,
73 const char *controller); 73 const char *controller);
74 74
75 75
76
76/** 77/**
77 * Free system resources. 78 * Free system resources.
78 * 79 *
@@ -109,6 +110,31 @@ GNUNET_TESTING_hostkey_get (uint32_t key_number,
109 struct GNUNET_PeerIdentity *id); 110 struct GNUNET_PeerIdentity *id);
110 111
111 112
113/**
114 * Reserve a TCP or UDP port for a peer.
115 *
116 * @param system system to use for reservation tracking
117 * @param is_tcp GNUNET_YES for TCP ports, GNUNET_NO for UDP
118 * @return 0 if no free port was available
119 */
120uint16_t
121GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system,
122 int is_tcp);
123
124
125/**
126 * Release reservation of a TCP or UDP port for a peer
127 * (used during GNUNET_TESTING_peer_destroy).
128 *
129 * @param system system to use for reservation tracking
130 * @param is_tcp GNUNET_YES for TCP ports, GNUNET_NO for UDP
131 * @param port reserved port to release
132 */
133void
134GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
135 int is_tcp,
136 uint16_t port);
137
112 138
113/** 139/**
114 * Create a new configuration using the given configuration 140 * Create a new configuration using the given configuration