summaryrefslogtreecommitdiff
path: root/src/tools/cbr/cbr_client.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-13 13:48:17 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-13 13:48:17 +0200
commit7834e92b218da69cd934679dec9c2d714d89d15e (patch)
treee2174dd2810a20e90050481e2fd54ce61e414baf /src/tools/cbr/cbr_client.c
parentddfc7091d2698d36c1cfec49eaaad96b278bb37b (diff)
downloadouroboros-7834e92b218da69cd934679dec9c2d714d89d15e.tar.gz
ouroboros-7834e92b218da69cd934679dec9c2d714d89d15e.zip
lib, irmd, tools, ipcpd: updates to dev API.
The registration function has been moved to the irm tool, applications now need to be registered by an administrator. Currently only supports one instance per registered name, and an AP can be registered under only one name. The irmd can now start a registered server application on demand. For the full functionality of the tool, execute "irm register". AP name removed from flow allocation. Flow allocation does not send the source ap name as it is quite useless. The accept() call now only returns the AE name.
Diffstat (limited to 'src/tools/cbr/cbr_client.c')
-rw-r--r--src/tools/cbr/cbr_client.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/tools/cbr/cbr_client.c b/src/tools/cbr/cbr_client.c
index b0c04f39..1cc325b8 100644
--- a/src/tools/cbr/cbr_client.c
+++ b/src/tools/cbr/cbr_client.c
@@ -35,7 +35,12 @@ static void busy_wait_until(const struct timespec * deadline)
clock_gettime(CLOCK_REALTIME, &now);
}
-int client_main(int duration, int size, long rate, bool flood, bool sleep)
+int client_main(char * server,
+ int duration,
+ int size,
+ long rate,
+ bool flood,
+ bool sleep)
{
int fd = 0;
int result = 0;
@@ -49,15 +54,10 @@ int client_main(int duration, int size, long rate, bool flood, bool sleep)
struct timespec intv = {(gap / BILLION), gap % BILLION};
int ms;
- if (ap_init(CLIENT_AP_NAME)) {
- printf("Failed to init AP.\n");
- return -1;
- }
-
printf("Client started, duration %d, rate %lu b/s, size %d B.\n",
duration, rate, size);
- fd = flow_alloc(SERVER_AP_NAME, NULL, NULL);
+ fd = flow_alloc(server, NULL, NULL);
if (fd < 0) {
printf("Failed to allocate flow.\n");
ap_fini();
@@ -122,7 +122,5 @@ int client_main(int duration, int size, long rate, bool flood, bool sleep)
flow_dealloc(fd);
- ap_fini();
-
return 0;
}