diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-10-12 13:19:00 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-10-12 13:19:00 +0000 |
commit | 463f45e3337c0a5d4613ecc0e2ee998564a00551 (patch) | |
tree | 1a113f52cecd70c091f1ca5d8bec2c03daa46da1 /src/include/gnunet_testing_lib.h | |
parent | 031e5ec5c661c82ca1fe12fe5e2e8525faae71f3 (diff) | |
download | gnunet-463f45e3337c0a5d4613ecc0e2ee998564a00551.tar.gz gnunet-463f45e3337c0a5d4613ecc0e2ee998564a00551.zip |
trying to make things clearer, probably failing
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index e0ea15fcd..d0b5c781a 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -835,15 +835,32 @@ GNUNET_TESTING_topology_option_get(enum GNUNET_TESTING_TopologyOption *topology_ | |||
835 | * files for the peers so they can only connect to those allowed | 835 | * files for the peers so they can only connect to those allowed |
836 | * by the topology. This will only have an effect once peers | 836 | * by the topology. This will only have an effect once peers |
837 | * are started if the FRIENDS_ONLY option is set in the base | 837 | * are started if the FRIENDS_ONLY option is set in the base |
838 | * config. Also takes an optional restrict topology which | 838 | * config. |
839 | * disallows direct TCP connections UNLESS they are specified in | 839 | * |
840 | * Also takes an optional restrict topology which | ||
841 | * disallows direct connections UNLESS they are specified in | ||
840 | * the restricted topology. | 842 | * the restricted topology. |
841 | * | 843 | * |
844 | * A simple example; if the topology option is set to LINE | ||
845 | * peers can ONLY connect in a LINE. However, if the topology | ||
846 | * option is set to 2D-torus and the restrict option is set to | ||
847 | * line with restrict_transports equal to "tcp udp", then peers | ||
848 | * may connect in a 2D-torus, but will be restricted to tcp and | ||
849 | * udp connections only in a LINE. Generally it only makes | ||
850 | * sense to do this if restrict_topology is a subset of topology. | ||
851 | * | ||
852 | * For testing peer discovery, etc. it is generally better to | ||
853 | * leave restrict_topology as "0" or ALL and then use the | ||
854 | * connect_topology function to restrict the initial connection | ||
855 | * set. | ||
856 | * | ||
842 | * @param pg the peer group struct representing the running peers | 857 | * @param pg the peer group struct representing the running peers |
843 | * @param topology which topology to connect the peers in | 858 | * @param topology which topology to connect the peers in |
844 | * @param restrict_topology allow only direct TCP connections in this topology | 859 | * @param restrict_topology allow only direct connections in this topology, |
860 | * based on those listed in restrict_transports, set to | ||
861 | * GNUNET_TESTING_TOPOLOGY_NONE for no restrictions | ||
845 | * @param restrict_transports space delimited list of transports to blacklist | 862 | * @param restrict_transports space delimited list of transports to blacklist |
846 | * to create restricted topology | 863 | * to create restricted topology, NULL for none |
847 | * | 864 | * |
848 | * @return the maximum number of connections were all allowed peers | 865 | * @return the maximum number of connections were all allowed peers |
849 | * connected to each other | 866 | * connected to each other |
@@ -882,7 +899,9 @@ GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg, | |||
882 | * @param notify_callback notification to be called once all connections completed | 899 | * @param notify_callback notification to be called once all connections completed |
883 | * @param notify_cls closure for notification callback | 900 | * @param notify_cls closure for notification callback |
884 | * | 901 | * |
885 | * @return the number of connections that will be attempted, GNUNET_SYSERR on error | 902 | * @return the number of connections that will be attempted (multiple of two, |
903 | * each bidirectional connection counts twice!), GNUNET_SYSERR on error | ||
904 | * | ||
886 | */ | 905 | */ |
887 | int | 906 | int |
888 | GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg, | 907 | GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg, |