smd_ns.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*****************************************************************************\
  2. * smd_ns.h - Library for fault tolerant application support
  3. *****************************************************************************
  4. * Copyright (C) 2013-2014 SchedMD LLC
  5. * Written by Morris Jette and David Bigagli (SchedMD LLC)
  6. *
  7. * This file is part of Slurm, a resource management program.
  8. * For details, see <https://slurm.schedmd.com/>.
  9. * Please also read the included file: DISCLAIMER.
  10. *
  11. * Slurm is free software; you can redistribute it and/or modify it under
  12. * the terms of the GNU General Public License as published by the Free
  13. * Software Foundation; either version 2 of the License, or (at your option)
  14. * any later version.
  15. *
  16. * In addition, as a special exception, the copyright holders give permission
  17. * to link the code of portions of this program with the OpenSSL library under
  18. * certain conditions as described in each individual source file, and
  19. * distribute linked combinations including the two. You must obey the GNU
  20. * General Public License in all respects for all of the code used other than
  21. * OpenSSL. If you modify file(s) with this exception, you may extend this
  22. * exception to your version of the file(s), but you are not obligated to do
  23. * so. If you do not wish to do so, delete this exception statement from your
  24. * version. If you delete this exception statement from all source files in
  25. * the program, then also delete it here.
  26. *
  27. * Slurm is distributed in the hope that it will be useful, but WITHOUT ANY
  28. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  29. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  30. * details.
  31. *
  32. * You should have received a copy of the GNU General Public License along
  33. * with Slurm; if not, write to the Free Software Foundation, Inc.,
  34. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  35. \*****************************************************************************/
  36. #ifndef _HAVE_SMD_NS_H
  37. #define _HAVE_SMD_NS_H
  38. #include <arpa/inet.h>
  39. #include <assert.h>
  40. #include <ctype.h>
  41. #include <errno.h>
  42. #include <getopt.h>
  43. #include <inttypes.h>
  44. #include <netdb.h>
  45. #include <netinet/in.h>
  46. #include <poll.h>
  47. #include <pthread.h>
  48. #include <stdarg.h>
  49. #include <stdbool.h>
  50. #include <stdio.h>
  51. #include <stdlib.h>
  52. #include <string.h>
  53. #include <sys/param.h>
  54. #include <sys/socket.h>
  55. #include <sys/stat.h>
  56. #include <sys/types.h>
  57. #include <sys/time.h>
  58. #include <sys/wait.h>
  59. #include <time.h>
  60. #include <unistd.h>
  61. /* Faulty can be in state FAILED or FAILING
  62. * these flags tell the controller which one
  63. * the caller is interested in.
  64. */
  65. #define FAILED_NODES (1 << 1)
  66. #define FAILING_NODES (1 << 2)
  67. /* These are the events sent from slurm to the client that
  68. * has registered for any of these events.
  69. * We use define as user can subscribe to more than one
  70. * events.
  71. */
  72. #define SMD_EVENT_NODE_FAILED (1 << 1) /* node has failed */
  73. #define SMD_EVENT_NODE_FAILING (1 << 2) /* node failing can be drained */
  74. #define SMD_EVENT_NODE_REPLACE (1 << 3) /* replacement ready */
  75. #endif /* _HAVE_SMD_NS_H */