aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_network_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-24 18:17:50 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-24 18:18:48 +0100
commit2ad934742422ecb63fe3fafdc8c73d067a9e2fb7 (patch)
tree780edc647a3ce9fdfd824e2dc233dd70a2bb79f3 /src/include/gnunet_network_lib.h
parent7307d73db807dd1fa295629d2b89c70cf603aeb4 (diff)
downloadgnunet-2ad934742422ecb63fe3fafdc8c73d067a9e2fb7.tar.gz
gnunet-2ad934742422ecb63fe3fafdc8c73d067a9e2fb7.zip
implement GNUNET_NETWORK_test_port_free() for testcases to conveniently check if a port is available
Diffstat (limited to 'src/include/gnunet_network_lib.h')
-rw-r--r--src/include/gnunet_network_lib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h
index beca83807..d9d3d90e7 100644
--- a/src/include/gnunet_network_lib.h
+++ b/src/include/gnunet_network_lib.h
@@ -588,6 +588,18 @@ void
588GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds); 588GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds);
589 589
590 590
591/**
592 * Test if the given @a port is available.
593 *
594 * @param ipproto transport protocol to test (i.e. IPPROTO_TCP)
595 * @param port port number to test
596 * @return #GNUNET_OK if the port is available, #GNUNET_NO if not
597 */
598int
599GNUNET_NETWORK_test_port_free (int ipproto,
600 uint16_t port);
601
602
591#if 0 /* keep Emacsens' auto-indent happy */ 603#if 0 /* keep Emacsens' auto-indent happy */
592{ 604{
593#endif 605#endif