You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

80 lines
2.2 KiB

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