glitch in the license text detected by hyazinthe, thank you!
[oweals/gnunet.git] / src / multicast / gnunet-multicast.c
1 /*
2      This file is part of GNUnet.
3      Copyright (C) 2013 GNUnet e.V.
4
5      GNUnet is free software: you can redistribute it and/or modify it
6      under the terms of the GNU Affero General Public License as published
7      by the Free Software Foundation, either version 3 of the License,
8      or (at your option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      Affero General Public License for more details.
14 */
15
16 /**
17  * @file multicast/gnunet-multicast.c
18  * @brief multicast for writing a tool
19  * @author Christian Grothoff
20  */
21 #include "platform.h"
22 #include "gnunet_util_lib.h"
23 /* #include "gnunet_multicast_service.h" */
24
25 /**
26  * Final status code.
27  */
28 static int ret;
29
30 /**
31  * Main function that will be run by the scheduler.
32  *
33  * @param cls closure
34  * @param args remaining command-line arguments
35  * @param cfgfile name of the configuration file used (for saving, can be NULL!)
36  * @param cfg configuration
37  */
38 static void
39 run (void *cls, char *const *args, const char *cfgfile,
40      const struct GNUNET_CONFIGURATION_Handle *cfg)
41 {
42   /* main code here */
43   puts( gettext_noop ("This command doesn't do anything yet.") );
44   ret = -1;
45 }
46
47
48 /**
49  * The main function.
50  *
51  * @param argc number of arguments from the command line
52  * @param argv command line arguments
53  * @return 0 ok, 1 on error
54  */
55 int
56 main (int argc, char *const *argv)
57 {
58   static const struct GNUNET_GETOPT_CommandLineOption options[] = {
59     /* FIMXE: add options here */
60     GNUNET_GETOPT_OPTION_END
61   };
62   if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
63     return 2;
64
65   ret = (GNUNET_OK ==
66          GNUNET_PROGRAM_run (argc, argv, "gnunet-multicast",
67                              gettext_noop ("This command doesn't do anything yet."),
68                              options, &run,
69                              NULL)) ? ret : 1;
70   GNUNET_free ((void*) argv);
71   return ret;
72 }
73
74 /* end of gnunet-multicast.c */