Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove commented code from surf_routing_cluster
[simgrid.git] / examples / msg / bittorrent / bittorrent.c
1 /* Copyright (c) 2012. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6 #include "bittorrent.h"
7 #include "peer.h"
8 #include "tracker.h"
9 #include <msg/msg.h>
10 /**
11  * Bittorrent example launcher
12  */
13 int main(int argc, char *argv[])
14 {
15   MSG_init(&argc, argv);
16
17   /* Check the arguments */
18   if (argc < 3) {
19     printf("Usage: %s platform_file deployment_file \n", argv[0]);
20     return -1;
21   }
22
23   const char *platform_file = argv[1];
24   const char *deployment_file = argv[2];
25
26   MSG_create_environment(platform_file);
27
28   MSG_function_register("tracker", tracker);
29   MSG_function_register("peer", peer);
30
31   MSG_launch_application(deployment_file);
32
33   MSG_main();
34
35   return 0;
36 }