1 /* Copyright (c) 2012-2022. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "app-bittorrent.h"
7 #include "bittorrent-peer.h"
10 #include <simgrid/engine.h>
11 #include <xbt/asserts.h>
13 /** Bittorrent example launcher */
14 int main(int argc, char* argv[])
16 simgrid_init(&argc, argv);
18 /* Check the arguments */
19 xbt_assert(argc > 2, "Usage: %s platform_file deployment_file", argv[0]);
21 simgrid_load_platform(argv[1]);
23 simgrid_register_function("tracker", tracker_run);
24 simgrid_register_function("peer", peer_run);
26 simgrid_load_deployment(argv[2]);