block_dns.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2013 Christian Grothoff (and other contributing authors)
  4. GNUnet is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published
  6. by the Free Software Foundation; either version 3, or (at your
  7. 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. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNUnet; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. /**
  18. * @author Christian Grothoff
  19. *
  20. * @file
  21. * DNS network structs
  22. *
  23. * @defgroup block-dns DNS Service network protocol definitions
  24. * @{
  25. */
  26. #ifndef BLOCK_DNS_H
  27. #define BLOCK_DNS_H
  28. #include "gnunet_util_lib.h"
  29. GNUNET_NETWORK_STRUCT_BEGIN
  30. /**
  31. * This is the structure describing an DNS exit service.
  32. */
  33. struct GNUNET_DNS_Advertisement
  34. {
  35. /**
  36. * Signature of the peer affirming that he is offering the service.
  37. */
  38. struct GNUNET_CRYPTO_EddsaSignature signature;
  39. /**
  40. * Beginning of signed portion of the record, signs everything until
  41. * the end of the struct.
  42. */
  43. struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
  44. /**
  45. * When does this signature expire?
  46. */
  47. struct GNUNET_TIME_AbsoluteNBO expiration_time;
  48. /**
  49. * The peer providing this service
  50. */
  51. struct GNUNET_PeerIdentity peer;
  52. };
  53. GNUNET_NETWORK_STRUCT_END
  54. #endif
  55. /** @} */ /* end of group */