block_regex.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2012,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
  18. * regex block formats
  19. *
  20. * @author Bartlomiej Polot
  21. */
  22. #ifndef BLOCK_REGEX_H
  23. #define BLOCK_REGEX_H
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #if 0
  28. /* keep Emacsens' auto-indent happy */
  29. }
  30. #endif
  31. #endif
  32. #include "gnunet_util_lib.h"
  33. #include <stdint.h>
  34. GNUNET_NETWORK_STRUCT_BEGIN
  35. /**
  36. * @brief Block to announce a peer accepting a state.
  37. */
  38. struct RegexAcceptBlock
  39. {
  40. /**
  41. * Accept blocks must be signed. Signature
  42. * goes over expiration time and key.
  43. */
  44. struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
  45. /**
  46. * When does the signature expire?
  47. */
  48. struct GNUNET_TIME_AbsoluteNBO expiration_time;
  49. /**
  50. * The key of the state.
  51. */
  52. struct GNUNET_HashCode key;
  53. /**
  54. * Public key of the peer signing.
  55. */
  56. struct GNUNET_PeerIdentity peer;
  57. /**
  58. * The signature.
  59. */
  60. struct GNUNET_CRYPTO_EddsaSignature signature;
  61. };
  62. GNUNET_NETWORK_STRUCT_END
  63. #if 0 /* keep Emacsens' auto-indent happy */
  64. {
  65. #endif
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif