w32resolver.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2009, 2012 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. * @author Christian Grothoff
  18. * @file gns/w32resolver.h
  19. */
  20. #ifndef W32RESOLVER_H
  21. #define W32RESOLVER_H
  22. #include "platform.h"
  23. #include "gnunet_crypto_lib.h"
  24. #include "gnunet_common.h"
  25. /**
  26. * Request DNS resolution.
  27. */
  28. #define GNUNET_MESSAGE_TYPE_W32RESOLVER_REQUEST 4
  29. /**
  30. * Response to a DNS resolution request.
  31. */
  32. #define GNUNET_MESSAGE_TYPE_W32RESOLVER_RESPONSE 5
  33. GNUNET_NETWORK_STRUCT_BEGIN
  34. /**
  35. * Request for the resolver. Followed by the 0-terminated hostname.
  36. *
  37. * The response will be one or more messages of type
  38. * W32RESOLVER_RESPONSE, each with the message header immediately
  39. * followed by the requested data (struct in[6]_addr).
  40. * The last W32RESOLVER_RESPONSE will just be a header without any data
  41. * (used to indicate the end of the list).
  42. */
  43. struct GNUNET_W32RESOLVER_GetMessage
  44. {
  45. /**
  46. * Type: GNUNET_MESSAGE_TYPE_W32RESOLVER_REQUEST
  47. */
  48. struct GNUNET_MessageHeader header;
  49. uint32_t af GNUNET_PACKED;
  50. uint32_t sc_data1 GNUNET_PACKED;
  51. uint16_t sc_data2 GNUNET_PACKED;
  52. uint16_t sc_data3 GNUNET_PACKED;
  53. uint8_t sc_data4[8];
  54. /* followed by 0-terminated string for A/AAAA lookup */
  55. };
  56. GNUNET_NETWORK_STRUCT_END
  57. #endif