gnunet-daemon-vpn-dns.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. This file is part of GNUnet.
  3. (C) 2010 Christian Grothoff
  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., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17. /**
  18. * @file vpn/gnunet-daemon-vpn-dns.h
  19. * @brief
  20. * @author Philipp Toelke
  21. */
  22. #ifndef GNUNET_DAEMON_VPN_DNS_H
  23. #define GNUNET_DAEMON_VPN_DNS_H
  24. /**
  25. * a list of outgoing dns-query-packets
  26. */
  27. extern struct query_packet_list *head;
  28. /**
  29. * The last element of the list of outgoing dns-query-packets
  30. */
  31. extern struct query_packet_list *tail;
  32. /**
  33. * Callback called by notify_transmit_ready; sends dns-queries or rehijack-messages
  34. * to the service-dns
  35. */
  36. size_t send_query(void* cls, size_t size, void* buf);
  37. /**
  38. * Connect to the service-dns
  39. */
  40. void connect_to_service_dns (void *cls,
  41. const struct GNUNET_SCHEDULER_TaskContext *tc);
  42. /**
  43. * This receives packets from the service-dns and schedules process_answer to
  44. * handle it
  45. */
  46. void dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg);
  47. /**
  48. * The connection to the service-dns
  49. */
  50. extern struct GNUNET_CLIENT_Connection *dns_connection;
  51. /**
  52. * A flag to show that the service-dns has to rehijack the outbound dns-packets
  53. *
  54. * This gets set when the helper restarts as the routing-tables are flushed when
  55. * the interface vanishes.
  56. */
  57. extern unsigned char restart_hijack;
  58. /**
  59. * A list of processed dns-responses.
  60. *
  61. * "processed" means that the packet is complete and can be sent out via udp
  62. * directly
  63. */
  64. extern struct answer_packet_list *answer_proc_head;
  65. /**
  66. * The last element of the list of processed dns-responses.
  67. */
  68. extern struct answer_packet_list *answer_proc_tail;
  69. extern GNUNET_SCHEDULER_TaskIdentifier conn_task;
  70. #endif /* end of include guard: GNUNET-DAEMON-VPN-DNS_H */