2 /* Copyright (c) 2007 Kayo Fujiwara. All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 // Interface for GTNetS.
8 #ifndef _GTNETS_INTERFACE_H
9 #define _GTNETS_INTERFACE_H
15 int gtnets_initialize();
16 int gtnets_add_link(int id, double bandwidth, double latency);
17 int gtnets_add_route(int src, int dst, int* links, int nlink);
18 int gtnets_add_router(int id);
19 int gtnets_add_onehop_route(int src, int dst, int link);
20 int gtnets_create_flow(int src, int dst, long datasize, void* metadata);
21 double gtnets_get_time_to_next_flow_completion();
22 int gtnets_run_until_next_flow_completion(void*** metadata, int* number_of_flows);
23 int gtnets_run(double delta);
24 int gtnets_finalize();