proto_defs.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // This file is generated from ./proto_defs.cc
  2. // by the const2hdr.py script.
  3. // Do not edit, all changes will be lost.
  4. // Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
  5. //
  6. // Permission to use, copy, modify, and/or distribute this software for any
  7. // purpose with or without fee is hereby granted, provided that the above
  8. // copyright notice and this permission notice appear in all copies.
  9. //
  10. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  11. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  12. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  13. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  14. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  15. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. // PERFORMANCE OF THIS SOFTWARE.
  17. #ifndef KEA_COMMON_DEFS_H
  18. #define KEA_COMMON_DEFS_H
  19. // \file proto_defs.h
  20. // \brief Common shared constants
  21. // This file contains common definitions of constasts used across the sources.
  22. // It includes, but is not limited to the definitions of messages sent from
  23. // one process to another. Since the names should be self-explanatory and
  24. // the variables here are used mostly to synchronize the same values across
  25. // multiple programs, separate documentation for each variable is not provided.
  26. namespace isc {
  27. namespace cc {
  28. // Aside from defining the values for the C++ library, this file is also
  29. // used as direct input of the generator of the python counterpart. Please,
  30. // keep the syntax here simple and check the generated file
  31. // (lib/python/isc/cc/proto_defs.py) is correct and sane.
  32. // The constants used in the CC protocol
  33. // First the header names
  34. extern const char* const CC_HEADER_TYPE;
  35. extern const char* const CC_HEADER_FROM;
  36. extern const char* const CC_HEADER_TO;
  37. extern const char* const CC_HEADER_GROUP;
  38. extern const char* const CC_HEADER_INSTANCE;
  39. extern const char* const CC_HEADER_SEQ;
  40. extern const char* const CC_HEADER_WANT_ANSWER;
  41. extern const char* const CC_HEADER_REPLY;
  42. // The commands in the "type" header
  43. extern const char* const CC_COMMAND_SEND;
  44. extern const char* const CC_COMMAND_SUBSCRIBE;
  45. extern const char* const CC_COMMAND_UNSUBSCRIBE;
  46. extern const char* const CC_COMMAND_GET_LNAME;
  47. extern const char* const CC_COMMAND_PING;
  48. extern const char* const CC_COMMAND_PONG;
  49. extern const char* const CC_COMMAND_STOP;
  50. // The wildcards of some headers
  51. extern const char* const CC_TO_WILDCARD;
  52. extern const char* const CC_INSTANCE_WILDCARD;
  53. // Prefixes for groups
  54. extern const char* const CC_GROUP_NOTIFICATION_PREFIX;
  55. // Reply codes
  56. extern const int CC_REPLY_NO_RECPT;
  57. extern const int CC_REPLY_SUCCESS;
  58. // Payload in the message
  59. extern const char *const CC_PAYLOAD_LNAME;
  60. extern const char *const CC_PAYLOAD_RESULT;
  61. extern const char *const CC_PAYLOAD_COMMAND;
  62. extern const char *const CC_PAYLOAD_NOTIFICATION;
  63. }
  64. }
  65. #endif