Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (C) 2013 Michael Brown <mbrown@fensystems.co.uk>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  17. * 02110-1301, USA.
  18. *
  19. * You can also choose to distribute this program under the terms of
  20. * the Unmodified Binary Distribution Licence (as given in the file
  21. * COPYING.UBDL), provided that you have satisfied its requirements.
  22. */
  23. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  24. /** @file
  25. *
  26. * Neighbour management commands
  27. *
  28. */
  29. #include <getopt.h>
  30. #include <ipxe/parseopt.h>
  31. #include <ipxe/command.h>
  32. #include <usr/neighmgmt.h>
  33. /** "nstat" options */
  34. struct nstat_options {};
  35. /** "nstat" option list */
  36. static struct option_descriptor nstat_opts[] = {};
  37. /** "nstat" command descriptor */
  38. static struct command_descriptor nstat_cmd =
  39. COMMAND_DESC ( struct nstat_options, nstat_opts, 0, 0, NULL );
  40. /**
  41. * The "nstat" command
  42. *
  43. * @v argc Argument count
  44. * @v argv Argument list
  45. * @ret rc Return status code
  46. */
  47. static int nstat_exec ( int argc, char **argv ) {
  48. struct nstat_options opts;
  49. int rc;
  50. /* Parse options */
  51. if ( ( rc = parse_options ( argc, argv, &nstat_cmd, &opts ) ) != 0)
  52. return rc;
  53. nstat();
  54. return 0;
  55. }
  56. /** Neighbour management commands */
  57. struct command neighbour_commands[] __command = {
  58. {
  59. .name = "nstat",
  60. .exec = nstat_exec,
  61. },
  62. };