gnunet-daemon-vpn-helper.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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-helper.h
  19. * @brief
  20. * @author Philipp Toelke
  21. */
  22. #ifndef GNUNET_DAEMON_VPN_HELPER_H
  23. #define GNUNET_DAEMON_VPN_HELPER_H
  24. #include "gnunet-helper-vpn-api.h"
  25. /**
  26. * Handle to the helper. contains filedescriptors and such
  27. */
  28. extern struct GNUNET_VPN_HELPER_Handle *helper_handle;
  29. extern GNUNET_SCHEDULER_TaskIdentifier shs_task;
  30. /**
  31. * Start the helper-process
  32. */
  33. void start_helper_and_schedule(void *cls,
  34. const struct GNUNET_SCHEDULER_TaskContext *tc);
  35. /**
  36. * Restart the helper-process
  37. */
  38. void restart_helper(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx);
  39. /**
  40. * Read from the helper-process
  41. */
  42. void helper_read(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx);
  43. /**
  44. * Send an dns-answer-packet to the helper
  45. */
  46. void helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx);
  47. /**
  48. * Receive packets from the helper-process
  49. */
  50. void message_token(void *cls,
  51. void *client,
  52. const struct GNUNET_MessageHeader *message);
  53. void write_to_helper(void* buf, size_t len);
  54. void schedule_helper_write(struct GNUNET_TIME_Relative, void* cls);
  55. #endif /* end of include guard: GNUNET-DAEMON-VPN-HELPER_H */