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.

console.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* This file is part of Netsukuku
  2. *
  3. * This source code is free software; you can redistribute it and/or
  4. * modify it under the terms of the GNU General Public License as published
  5. * by the Free Software Foundation; either version 2 of the License,
  6. * or (at your option) any later version.
  7. *
  8. * This source code is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * Please refer to the GNU Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Public License along with
  14. * this source code; if not, write to:
  15. * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. *
  17. */
  18. #ifndef CONSOLE_H
  19. #define CONSOLE_H
  20. #define CONSOLE_SOCKET_PATH "/tmp/ntk-console"
  21. #define CONSOLE_VERSION_MAJOR 0
  22. #define CONSOLE_VERSION_MINOR 3
  23. #define CONSOLE_ARGV_LENGTH 250
  24. #define CONSOLE_BUFFER_LENGTH 250
  25. #ifndef TRUE
  26. #define FALSE 0
  27. #define TRUE 1
  28. #endif
  29. typedef enum {
  30. COMMAND_HELP = 0x100,
  31. COMMAND_UPTIME,
  32. COMMAND_KILL,
  33. COMMAND_VERSION,
  34. COMMAND_INETCONN,
  35. COMMAND_CURIFS,
  36. COMMAND_CURIFSCT,
  37. COMMAND_CURQSPNID,
  38. COMMAND_CURIP,
  39. COMMAND_CURNODE,
  40. COMMAND_IFS,
  41. COMMAND_IFSCT,
  42. COMMAND_QUIT,
  43. COMMAND_CONSUPTIME,
  44. } command_t;
  45. #pragma pack(1)
  46. typedef struct {
  47. command_t command;
  48. char *argv[CONSOLE_ARGV_LENGTH];
  49. } cmd_packet_t;
  50. #pragma pack(0)
  51. #endif /* CONSOLE_H */