#include <ldap.h>
#define LOOPS 100
+#define RETRIES 0
static char *
get_add_entry( char *filename, LDAPMod ***mods );
static void
do_addel( char *uri, char *host, int port, char *manager, char *passwd,
- char *dn, LDAPMod **attrs, int maxloop );
+ char *dn, LDAPMod **attrs, int maxloop, int maxretries );
static void
usage( char *name )
main( int argc, char **argv )
{
int i;
- char *host = "localhost";
+ char *host = "localhost";
char *uri = NULL;
- int port = -1;
+ int port = -1;
char *manager = NULL;
char *passwd = NULL;
char *filename = NULL;
char *entry = NULL;
- int loops = LOOPS;
- LDAPMod **attrs = NULL;
+ int loops = LOOPS;
+ int retries = RETRIES;
+ LDAPMod **attrs = NULL;
- while ( (i = getopt( argc, argv, "H:h:p:D:w:f:l:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "H:h:p:D:w:f:l:r:" )) != EOF ) {
switch( i ) {
- case 'H': /* the server's URI */
- uri = strdup( optarg );
+ case 'H': /* the server's URI */
+ uri = strdup( optarg );
break;
- case 'h': /* the servers host */
- host = strdup( optarg );
+
+ case 'h': /* the servers host */
+ host = strdup( optarg );
break;
- case 'p': /* the servers port */
- port = atoi( optarg );
- break;
+ case 'p': /* the servers port */
+ port = atoi( optarg );
+ break;
- case 'D': /* the servers manager */
- manager = strdup( optarg );
+ case 'D': /* the servers manager */
+ manager = strdup( optarg );
break;
- case 'w': /* the server managers password */
- passwd = strdup( optarg );
+ case 'w': /* the server managers password */
+ passwd = strdup( optarg );
break;
- case 'f': /* file with entry search request */
- filename = strdup( optarg );
- break;
+ case 'f': /* file with entry search request */
+ filename = strdup( optarg );
+ break;
- case 'l': /* the number of loops */
- loops = atoi( optarg );
- break;
+ case 'l': /* the number of loops */
+ loops = atoi( optarg );
+ break;
- default:
- usage( argv[0] );
- break;
+ case 'r':
+ retries = atoi( optarg );
+ break;
+
+ default:
+ usage( argv[0] );
+ break;
}
}
}
- do_addel( uri, host, port, manager, passwd, entry, attrs, loops );
+ do_addel( uri, host, port, manager, passwd, entry, attrs,
+ loops, retries );
exit( EXIT_SUCCESS );
}
char *passwd,
char *entry,
LDAPMod **attrs,
- int maxloop
+ int maxloop,
+ int maxretries
)
{
LDAP *ld = NULL;
- int i;
+ int i = 0, do_retry = maxretries;
pid_t pid = getpid();
int rc = LDAP_SUCCESS;
+retry:;
if ( uri ) {
ldap_initialize( &ld, uri );
} else {
&version );
}
- if ( ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE )
- != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_bind" );
- exit( EXIT_FAILURE );
+ if ( do_retry == maxretries ) {
+ fprintf( stderr, "PID=%ld - Add/Delete(%d): entry=\"%s\".\n",
+ (long) pid, maxloop, entry );
}
+ rc = ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE );
+ if ( rc != LDAP_SUCCESS ) {
+ ldap_perror( ld, "ldap_bind" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
+ exit( EXIT_FAILURE );
+ }
- fprintf( stderr, "PID=%ld - Add/Delete(%d): entry=\"%s\".\n",
- (long) pid, maxloop, entry );
-
- for ( i = 0; i < maxloop; i++ ) {
+ for ( ; i < maxloop; i++ ) {
/* add the entry */
rc = ldap_add_s( ld, entry, attrs );
if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_add" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
break;
}
rc = ldap_delete_s( ld, entry );
if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_delete" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
break;
-
}
-
}
fprintf( stderr, " PID=%ld - Add/Delete done (%d).\n", (long) pid, rc );
#include <ldap.h>
#define LOOPS 100
+#define RETRIES 0
static void
-do_modify( char *uri, char *host, int port, char *manager, char *passwd, char *entry,
- char *attr, char *value, int maxloop );
+do_modify( char *uri, char *host, int port, char *manager, char *passwd,
+ char *entry, char *attr, char *value, int maxloop,
+ int maxretries );
static void
{
int i;
char *uri = NULL;
- char *host = "localhost";
- int port = -1;
+ char *host = "localhost";
+ int port = -1;
char *manager = NULL;
char *passwd = NULL;
char *entry = NULL;
char *ava = NULL;
char *value = NULL;
- int loops = LOOPS;
+ int loops = LOOPS;
+ int retries = RETRIES;
- while ( (i = getopt( argc, argv, "H:h:p:D:w:e:a:l:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "H:h:p:D:w:e:a:l:r:" )) != EOF ) {
switch( i ) {
- case 'H': /* the server uri */
- uri = strdup( optarg );
+ case 'H': /* the server uri */
+ uri = strdup( optarg );
break;
- case 'h': /* the servers host */
- host = strdup( optarg );
+
+ case 'h': /* the servers host */
+ host = strdup( optarg );
break;
- case 'p': /* the servers port */
- port = atoi( optarg );
+ case 'p': /* the servers port */
+ port = atoi( optarg );
break;
- case 'D': /* the servers manager */
- manager = strdup( optarg );
+
+ case 'D': /* the servers manager */
+ manager = strdup( optarg );
break;
- case 'w': /* the server managers password */
- passwd = strdup( optarg );
+ case 'w': /* the server managers password */
+ passwd = strdup( optarg );
break;
- case 'e': /* entry to modify */
- entry = strdup( optarg );
+
+ case 'e': /* entry to modify */
+ entry = strdup( optarg );
break;
- case 'a':
- ava = strdup( optarg );
+
+ case 'a':
+ ava = strdup( optarg );
break;
- case 'l': /* the number of loops */
- loops = atoi( optarg );
+
+ case 'l': /* the number of loops */
+ loops = atoi( optarg );
+ break;
+
+ case 'r':
+ retries = atoi( optarg );
break;
- default:
- usage( argv[0] );
+ default:
+ usage( argv[0] );
break;
}
}
while ( *value && isspace( (unsigned char) *value ))
value++;
- do_modify( uri, host, port, manager, passwd, entry, ava, value, loops );
+ do_modify( uri, host, port, manager, passwd, entry, ava, value,
+ loops, retries );
exit( EXIT_SUCCESS );
}
static void
do_modify( char *uri, char *host, int port, char *manager,
- char *passwd, char *entry, char* attr, char* value, int maxloop )
+ char *passwd, char *entry, char* attr, char* value,
+ int maxloop, int maxretries )
{
LDAP *ld = NULL;
- int i;
+ int i = 0, do_retry = maxretries;
pid_t pid;
int rc = LDAP_SUCCESS;
mods[0] = &mod;
mods[1] = NULL;
-
+retry:;
if ( uri ) {
ldap_initialize( &ld, uri );
} else {
&version );
}
- if ( ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE ) != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_bind" );
- exit( EXIT_FAILURE );
+ if ( do_retry == maxretries ) {
+ fprintf( stderr, "PID=%ld - Modify(%d): entry=\"%s\".\n",
+ (long) pid, maxloop, entry );
}
-
- fprintf( stderr, "PID=%ld - Modify(%d): entry=\"%s\".\n",
- (long) pid, maxloop, entry );
+ rc = ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE );
+ if ( rc != LDAP_SUCCESS ) {
+ ldap_perror( ld, "ldap_bind" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
+ exit( EXIT_FAILURE );
+ }
for ( i = 0; i < maxloop; i++ ) {
mod.mod_op = LDAP_MOD_ADD;
- if (( rc = ldap_modify_s( ld, entry, mods )) != LDAP_SUCCESS ) {
+ rc = ldap_modify_s( ld, entry, mods );
+ if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_modify" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
}
mod.mod_op = LDAP_MOD_DELETE;
- if (( rc = ldap_modify_s( ld, entry, mods )) != LDAP_SUCCESS ) {
+ rc = ldap_modify_s( ld, entry, mods );
+ if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_modify" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
}
#include <ldap.h>
#define LOOPS 100
+#define RETRIES 0
static void
-do_modrdn( char *uri, char *host, int port, char *manager, char *passwd, char *entry, int maxloop );
+do_modrdn( char *uri, char *host, int port, char *manager, char *passwd,
+ char *entry, int maxloop, int maxretries );
static void
usage( char *name )
{
int i;
char *uri = NULL;
- char *host = "localhost";
- int port = -1;
+ char *host = "localhost";
+ int port = -1;
char *manager = NULL;
char *passwd = NULL;
char *entry = NULL;
- int loops = LOOPS;
+ int loops = LOOPS;
+ int retries = RETRIES;
- while ( (i = getopt( argc, argv, "H:h:p:D:w:e:l:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "H:h:p:D:w:e:l:r:" )) != EOF ) {
switch( i ) {
- case 'H': /* the server uri */
- uri = strdup( optarg );
+ case 'H': /* the server uri */
+ uri = strdup( optarg );
break;
- case 'h': /* the servers host */
- host = strdup( optarg );
+
+ case 'h': /* the servers host */
+ host = strdup( optarg );
break;
- case 'p': /* the servers port */
- port = atoi( optarg );
- break;
- case 'D': /* the servers manager */
- manager = strdup( optarg );
+ case 'p': /* the servers port */
+ port = atoi( optarg );
break;
- case 'w': /* the server managers password */
- passwd = strdup( optarg );
+ case 'D': /* the servers manager */
+ manager = strdup( optarg );
break;
- case 'e': /* entry to rename */
- entry = strdup( optarg );
- break;
- case 'l': /* the number of loops */
- loops = atoi( optarg );
- break;
+ case 'w': /* the server managers password */
+ passwd = strdup( optarg );
+ break;
- default:
- usage( argv[0] );
- break;
+ case 'e': /* entry to rename */
+ entry = strdup( optarg );
+ break;
+
+ case 'l': /* the number of loops */
+ loops = atoi( optarg );
+ break;
+
+ case 'r': /* the number of retries */
+ retries = atoi( optarg );
+ break;
+
+ default:
+ usage( argv[0] );
+ break;
}
}
}
- do_modrdn( uri, host, port, manager, passwd, entry, loops );
+ do_modrdn( uri, host, port, manager, passwd, entry, loops, retries );
exit( EXIT_SUCCESS );
}
static void
do_modrdn( char *uri, char *host, int port, char *manager,
- char *passwd, char *entry, int maxloop )
+ char *passwd, char *entry, int maxloop, int maxretries )
{
LDAP *ld = NULL;
- int i;
+ int i = 0, do_retry = maxretries;
pid_t pid;
char *DNs[2];
char *rdns[2];
rdns[0] = strdup( DNs[1] );
DNs[1][i] = ',';
}
-
+
+retry:;
if ( uri ) {
ldap_initialize( &ld, uri );
} else {
&version );
}
- if ( ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE ) != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_bind" );
- exit( EXIT_FAILURE );
+ if ( do_retry == maxretries ) {
+ fprintf( stderr, "PID=%ld - Modrdn(%d): entry=\"%s\".\n",
+ (long) pid, maxloop, entry );
}
-
- fprintf( stderr, "PID=%ld - Modrdn(%d): entry=\"%s\".\n",
- (long) pid, maxloop, entry );
+ rc = ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE );
+ if ( rc != LDAP_SUCCESS ) {
+ ldap_perror( ld, "ldap_bind" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
+ exit( EXIT_FAILURE );
+ }
for ( i = 0; i < maxloop; i++ ) {
- if (( rc = ldap_modrdn2_s( ld, DNs[0], rdns[0], 0 ))
- != LDAP_SUCCESS ) {
+ rc = ldap_modrdn2_s( ld, DNs[0], rdns[0], 0 );
+ if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_modrdn" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
}
- if (( rc = ldap_modrdn2_s( ld, DNs[1], rdns[1], 1 ))
- != LDAP_SUCCESS ) {
+ rc = ldap_modrdn2_s( ld, DNs[1], rdns[1], 1 );
+ if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_modrdn" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
}
#include <ldap.h>
#define LOOPS 100
+#define RETRIES 0
static void
-do_read( char *uri, char *host, int port, char *entry, int maxloop );
+do_read( char *uri, char *host, int port, char *entry, int maxloop,
+ int maxretries );
static void
usage( char *name )
{
int i;
char *uri = NULL;
- char *host = "localhost";
- int port = -1;
+ char *host = "localhost";
+ int port = -1;
char *entry = NULL;
- int loops = LOOPS;
+ int loops = LOOPS;
+ int retries = RETRIES;
- while ( (i = getopt( argc, argv, "H:h:p:e:l:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "H:h:p:e:l:r:" )) != EOF ) {
switch( i ) {
- case 'H': /* the server uri */
- uri = strdup( optarg );
+ case 'H': /* the server uri */
+ uri = strdup( optarg );
break;
- case 'h': /* the servers host */
- host = strdup( optarg );
+
+ case 'h': /* the servers host */
+ host = strdup( optarg );
break;
- case 'p': /* the servers port */
- port = atoi( optarg );
- break;
+ case 'p': /* the servers port */
+ port = atoi( optarg );
+ break;
- case 'e': /* file with entry search request */
- entry = strdup( optarg );
- break;
+ case 'e': /* DN to search for */
+ entry = strdup( optarg );
+ break;
- case 'l': /* the number of loops */
- loops = atoi( optarg );
- break;
+ case 'l': /* the number of loops */
+ loops = atoi( optarg );
+ break;
- default:
- usage( argv[0] );
- break;
+ case 'r': /* the number of retries */
+ retries = atoi( optarg );
+ break;
+
+ default:
+ usage( argv[0] );
+ break;
}
}
usage( argv[0] );
if ( *entry == '\0' ) {
-
fprintf( stderr, "%s: invalid EMPTY entry DN.\n",
argv[0] );
exit( EXIT_FAILURE );
-
}
- do_read( uri, host, port, entry, ( 20 * loops ));
+ do_read( uri, host, port, entry, ( 20 * loops ), retries );
exit( EXIT_SUCCESS );
}
static void
-do_read( char *uri, char *host, int port, char *entry, int maxloop )
+do_read( char *uri, char *host, int port, char *entry, int maxloop,
+ int maxretries )
{
LDAP *ld = NULL;
- int i;
+ int i = 0, do_retry = maxretries;
char *attrs[] = { "1.1", NULL };
pid_t pid = getpid();
int rc = LDAP_SUCCESS;
-
+
+retry:;
if ( uri ) {
ldap_initialize( &ld, uri );
} else {
&version );
}
- if ( ldap_bind_s( ld, NULL, NULL, LDAP_AUTH_SIMPLE ) != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_bind" );
- exit( EXIT_FAILURE );
+ if ( do_retry == maxretries ) {
+ fprintf( stderr, "PID=%ld - Read(%d): entry=\"%s\".\n",
+ (long) pid, maxloop, entry );
}
+ rc = ldap_bind_s( ld, NULL, NULL, LDAP_AUTH_SIMPLE );
+ if ( rc != LDAP_SUCCESS ) {
+ ldap_perror( ld, "ldap_bind" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
+ exit( EXIT_FAILURE );
+ }
- fprintf( stderr, "PID=%ld - Read(%d): entry=\"%s\".\n",
- (long) pid, maxloop, entry );
-
- for ( i = 0; i < maxloop; i++ ) {
+ for ( ; i < maxloop; i++ ) {
LDAPMessage *res;
rc = ldap_search_s( ld, entry, LDAP_SCOPE_BASE,
NULL, attrs, 1, &res );
if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_read" );
+ if ( rc == LDAP_BUSY && do_retry > 0 ) {
+ do_retry--;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
ldap_unbind( ld );
}
-
#include <ldap.h>
#define LOOPS 100
+#define RETRIES 0
static void
-do_search( char *uri, char *host, int port, char *manager, char *passwd, char *sbase, char *filter, int maxloop );
+do_search( char *uri, char *host, int port, char *manager, char *passwd,
+ char *sbase, char *filter, int maxloop, int maxretries );
static void
usage( char *name )
{
int i;
char *uri = NULL;
- char *host = "localhost";
- int port = -1;
+ char *host = "localhost";
+ int port = -1;
char *manager = NULL;
char *passwd = NULL;
- char *sbase = NULL;
+ char *sbase = NULL;
char *filter = NULL;
- int loops = LOOPS;
+ int loops = LOOPS;
+ int retries = RETRIES;
- while ( (i = getopt( argc, argv, "b:D:f:H:h:l:p:w:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "b:D:f:H:h:l:p:w:r:" )) != EOF ) {
switch( i ) {
- case 'H': /* the server uri */
- uri = strdup( optarg );
+ case 'H': /* the server uri */
+ uri = strdup( optarg );
break;
- case 'h': /* the servers host */
- host = strdup( optarg );
+
+ case 'h': /* the servers host */
+ host = strdup( optarg );
+ break;
+
+ case 'p': /* the servers port */
+ port = atoi( optarg );
break;
- case 'p': /* the servers port */
- port = atoi( optarg );
- break;
+ case 'D': /* the servers manager */
+ manager = strdup( optarg );
+ break;
- case 'D': /* the servers manager */
- manager = strdup( optarg );
+ case 'w': /* the server managers password */
+ passwd = strdup( optarg );
break;
- case 'w': /* the server managers password */
- passwd = strdup( optarg );
+ case 'b': /* file with search base */
+ sbase = strdup( optarg );
break;
- case 'b': /* file with search base */
- sbase = strdup( optarg );
+ case 'f': /* the search request */
+ filter = strdup( optarg );
break;
- case 'f': /* the search request */
- filter = strdup( optarg );
- break;
+ case 'l': /* number of loops */
+ loops = atoi( optarg );
+ break;
- case 'l': /* number of loops */
- loops = atoi( optarg );
- break;
+ case 'r': /* number of retries */
+ retries = atoi( optarg );
+ break;
- default:
- usage( argv[0] );
- break;
+ default:
+ usage( argv[0] );
+ break;
}
}
}
- do_search( uri, host, port, manager, passwd, sbase, filter, ( 10 * loops ));
+ do_search( uri, host, port, manager, passwd, sbase, filter,
+ ( 10 * loops ), retries );
exit( EXIT_SUCCESS );
}
static void
-do_search( char *uri, char *host, int port, char *manager, char *passwd, char *sbase, char *filter, int maxloop )
+do_search( char *uri, char *host, int port, char *manager, char *passwd,
+ char *sbase, char *filter, int maxloop, int maxretries )
{
LDAP *ld = NULL;
- int i;
+ int i = 0, do_retry = maxretries;
char *attrs[] = { "cn", "sn", NULL };
pid_t pid = getpid();
int rc = LDAP_SUCCESS;
+retry:;
if ( uri ) {
ldap_initialize( &ld, uri );
} else {
&version );
}
- if ( ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE ) != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_bind" );
- exit( EXIT_FAILURE );
+ if ( do_retry == maxretries ) {
+ fprintf( stderr, "PID=%ld - Search(%d): base=\"%s\", filter=\"%s\".\n",
+ (long) pid, maxloop, sbase, filter );
}
-
- fprintf( stderr, "PID=%ld - Search(%d): base=\"%s\", filter=\"%s\".\n",
- (long) pid, maxloop, sbase, filter );
+ rc = ldap_bind_s( ld, manager, passwd, LDAP_AUTH_SIMPLE );
+ if ( rc != LDAP_SUCCESS ) {
+ if ( rc == LDAP_BUSY && do_retry == 1 ) {
+ do_retry = 0;
+ goto retry;
+ }
+ ldap_perror( ld, "ldap_bind" );
+ exit( EXIT_FAILURE );
+ }
for ( i = 0; i < maxloop; i++ ) {
LDAPMessage *res;
filter, attrs, 0, &res );
if ( rc != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_search" );
+ if ( rc == LDAP_BUSY && do_retry == 1 ) {
+ do_retry = 0;
+ goto retry;
+ }
if ( rc != LDAP_NO_SUCH_OBJECT ) break;
continue;
#define MAXARGS 100
#define MAXREQS 5000
#define LOOPS "100"
+#define RETRIES "0"
#define TSEARCHFILE "do_search.0"
#define TREADFILE "do_read.0"
char *dirname = NULL;
char *progdir = NULL;
char *loops = LOOPS;
+ char *retries = RETRIES;
DIR *datadir;
struct dirent *file;
char *sfile = NULL;
char *moddn[MAXREQS];
int modnum = 0;
- while ( (i = getopt( argc, argv, "H:h:p:D:w:b:d:j:l:P:" )) != EOF ) {
+ while ( (i = getopt( argc, argv, "D:d:H:h:j:l:P:p:r:w:" )) != EOF ) {
switch( i ) {
- case 'H': /* slapd uri */
- uri = strdup( optarg );
+ case 'D': /* slapd manager */
+ manager = ArgDup( optarg );
break;
-
- case 'h': /* slapd host */
- host = strdup( optarg );
+
+ case 'd': /* data directory */
+ dirname = strdup( optarg );
+ break;
+
+ case 'H': /* slapd uri */
+ uri = strdup( optarg );
break;
- case 'p': /* the servers port number */
- port = strdup( optarg );
- break;
+ case 'h': /* slapd host */
+ host = strdup( optarg );
+ break;
- case 'D': /* slapd manager */
- manager = ArgDup( optarg );
+ case 'j': /* the number of parallel clients */
+ maxkids = atoi( optarg );
break;
- case 'w': /* the managers passwd */
- passwd = ArgDup( optarg );
- break;
+ case 'l': /* the number of loops per client */
+ loops = strdup( optarg );
+ break;
- case 'd': /* data directory */
- dirname = strdup( optarg );
+ case 'P': /* prog directory */
+ progdir = strdup( optarg );
break;
- case 'P': /* prog directory */
- progdir = strdup( optarg );
+ case 'p': /* the servers port number */
+ port = strdup( optarg );
break;
- case 'j': /* the number of parallel clients */
- maxkids = atoi( optarg );
- break;
+ case 'r':
+ retries = strdup( optarg );
+ break;
- case 'l': /* the number of loops per client */
- loops = strdup( optarg );
- break;
+ case 'w': /* the managers passwd */
+ passwd = ArgDup( optarg );
+ break;
- default:
- usage( argv[0] );
- break;
+ default:
+ usage( argv[0] );
+ break;
}
}
sargs[sanum++] = passwd;
sargs[sanum++] = "-l";
sargs[sanum++] = loops;
+ sargs[sanum++] = "-r";
+ sargs[sanum++] = retries;
sargs[sanum++] = "-b";
sargs[sanum++] = NULL; /* will hold the search base */
sargs[sanum++] = "-f";
}
rargs[ranum++] = "-l";
rargs[ranum++] = loops;
+ rargs[ranum++] = "-r";
+ rargs[ranum++] = retries;
rargs[ranum++] = "-e";
rargs[ranum++] = NULL; /* will hold the read entry */
rargs[ranum++] = NULL;
margs[manum++] = passwd;
margs[manum++] = "-l";
margs[manum++] = loops;
+ margs[manum++] = "-r";
+ margs[manum++] = retries;
margs[manum++] = "-e";
margs[manum++] = NULL; /* will hold the modrdn entry */
margs[manum++] = NULL;
modargs[modanum++] = passwd;
modargs[modanum++] = "-l";
modargs[modanum++] = loops;
+ modargs[modanum++] = "-r";
+ modargs[modanum++] = retries;
modargs[modanum++] = "-e";
modargs[modanum++] = NULL; /* will hold the modify entry */
modargs[modanum++] = "-a";;
aargs[aanum++] = passwd;
aargs[aanum++] = "-l";
aargs[aanum++] = loops;
+ aargs[aanum++] = "-r";
+ aargs[aanum++] = retries;
aargs[aanum++] = "-f";
aargs[aanum++] = NULL; /* will hold the add data file */
aargs[aanum++] = NULL;