diff options
Diffstat (limited to 'src/include/gnunet_testbed_service.h')
-rw-r--r-- | src/include/gnunet_testbed_service.h | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h index 01d7f7f93..3c2d93272 100644 --- a/src/include/gnunet_testbed_service.h +++ b/src/include/gnunet_testbed_service.h | |||
@@ -1025,10 +1025,13 @@ enum GNUNET_TESTBED_TopologyOption | |||
1025 | GNUNET_TESTBED_TOPOLOGY_OPTION_END */ | 1025 | GNUNET_TESTBED_TOPOLOGY_OPTION_END */ |
1026 | 1026 | ||
1027 | /** | 1027 | /** |
1028 | * Disable automatic retrying for failed overlay connections. The default is | 1028 | * How many times should the failed overlay connect operations be retried |
1029 | * to always retry failed overlay connections. This parameter takes no options. | 1029 | * before giving up. The default if this option is not specified is to retry |
1030 | * 3 times. This option takes and unsigned integer as a parameter. Use this | ||
1031 | * option with parameter 0 to disable retrying of failed overlay connect | ||
1032 | * operations. | ||
1030 | */ | 1033 | */ |
1031 | GNUNET_TESTBED_TOPOLOGY_DISABLE_AUTO_RETRY | 1034 | GNUNET_TESTBED_TOPOLOGY_RETRY_CNT |
1032 | }; | 1035 | }; |
1033 | 1036 | ||
1034 | 1037 | ||
@@ -1093,15 +1096,33 @@ GNUNET_TESTBED_overlay_connect (void *op_cls, | |||
1093 | 1096 | ||
1094 | 1097 | ||
1095 | /** | 1098 | /** |
1099 | * Callbacks of this type are called when topology configuration is completed | ||
1100 | * | ||
1101 | * @param cls the operation closure given to | ||
1102 | * GNUNET_TESTBED_overlay_configure_topology_va() and | ||
1103 | * GNUNET_TESTBED_overlay_configure() calls | ||
1104 | * @param nsuccess the number of successful overlay connects | ||
1105 | * @param nfailures the number of overlay connects which failed | ||
1106 | */ | ||
1107 | typedef void (*GNUNET_TESTBED_TopologyCompletionCallback) (void *cls, | ||
1108 | unsigned int nsuccess, | ||
1109 | unsigned int nfailures); | ||
1110 | |||
1111 | |||
1112 | /** | ||
1096 | * All peers must have been started before calling this function. | 1113 | * All peers must have been started before calling this function. |
1097 | * This function then connects the given peers in the P2P overlay | 1114 | * This function then connects the given peers in the P2P overlay |
1098 | * using the given topology. | 1115 | * using the given topology. |
1099 | * | 1116 | * |
1100 | * @param op_cls closure argument to give with the operation event | 1117 | * @param op_cls closure argument to give with the peer connect operation events |
1118 | * generated through this function | ||
1101 | * @param num_peers number of peers in 'peers' | 1119 | * @param num_peers number of peers in 'peers' |
1102 | * @param peers array of 'num_peers' with the peers to configure | 1120 | * @param peers array of 'num_peers' with the peers to configure |
1103 | * @param max_connections the maximums number of overlay connections that will | 1121 | * @param max_connections the maximums number of overlay connections that will |
1104 | * be made to achieve the given topology | 1122 | * be made to achieve the given topology |
1123 | * @param comp_cb the completion callback to call when the topology generation | ||
1124 | * is completed | ||
1125 | * @param comp_cb_cls closure for the above completion callback | ||
1105 | * @param topo desired underlay topology to use | 1126 | * @param topo desired underlay topology to use |
1106 | * @param va topology-specific options | 1127 | * @param va topology-specific options |
1107 | * @return handle to the operation, NULL if connecting these | 1128 | * @return handle to the operation, NULL if connecting these |
@@ -1113,6 +1134,9 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, | |||
1113 | unsigned int num_peers, | 1134 | unsigned int num_peers, |
1114 | struct GNUNET_TESTBED_Peer **peers, | 1135 | struct GNUNET_TESTBED_Peer **peers, |
1115 | unsigned int *max_connections, | 1136 | unsigned int *max_connections, |
1137 | GNUNET_TESTBED_TopologyCompletionCallback | ||
1138 | comp_cb, | ||
1139 | void *comp_cb_cls, | ||
1116 | enum GNUNET_TESTBED_TopologyOption topo, | 1140 | enum GNUNET_TESTBED_TopologyOption topo, |
1117 | va_list va); | 1141 | va_list va); |
1118 | 1142 | ||
@@ -1122,11 +1146,15 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, | |||
1122 | * This function then connects the given peers in the P2P overlay | 1146 | * This function then connects the given peers in the P2P overlay |
1123 | * using the given topology. | 1147 | * using the given topology. |
1124 | * | 1148 | * |
1125 | * @param op_cls closure argument to give with the operation event | 1149 | * @param op_cls closure argument to give with the peer connect operation events |
1150 | * generated through this function | ||
1126 | * @param num_peers number of peers in 'peers' | 1151 | * @param num_peers number of peers in 'peers' |
1127 | * @param peers array of 'num_peers' with the peers to configure | 1152 | * @param peers array of 'num_peers' with the peers to configure |
1128 | * @param max_connections the maximums number of overlay connections that will | 1153 | * @param max_connections the maximums number of overlay connections that will |
1129 | * be made to achieve the given topology | 1154 | * be made to achieve the given topology |
1155 | * @param comp_cb the completion callback to call when the topology generation | ||
1156 | * is completed | ||
1157 | * @param comp_cb_cls closure for the above completion callback | ||
1130 | * @param topo desired underlay topology to use | 1158 | * @param topo desired underlay topology to use |
1131 | * @param ... topology-specific options | 1159 | * @param ... topology-specific options |
1132 | * @return handle to the operation, NULL if connecting these | 1160 | * @return handle to the operation, NULL if connecting these |
@@ -1138,6 +1166,9 @@ GNUNET_TESTBED_overlay_configure_topology (void *op_cls, | |||
1138 | unsigned int num_peers, | 1166 | unsigned int num_peers, |
1139 | struct GNUNET_TESTBED_Peer **peers, | 1167 | struct GNUNET_TESTBED_Peer **peers, |
1140 | unsigned int *max_connections, | 1168 | unsigned int *max_connections, |
1169 | GNUNET_TESTBED_TopologyCompletionCallback | ||
1170 | comp_cb, | ||
1171 | void *comp_cb_cls, | ||
1141 | enum GNUNET_TESTBED_TopologyOption topo, | 1172 | enum GNUNET_TESTBED_TopologyOption topo, |
1142 | ...); | 1173 | ...); |
1143 | 1174 | ||