gnunet-service-ats_connectivity.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2011-2015 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., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17. /**
  18. * @file ats/gnunet-service-ats_connectivity.h
  19. * @brief ats service, interaction with 'connecivity' API
  20. * @author Matthias Wachs
  21. * @author Christian Grothoff
  22. *
  23. * TODO: will need API to query connectivity requests!
  24. */
  25. #ifndef GNUNET_SERVICE_ATS_CONNECTIVITY_H
  26. #define GNUNET_SERVICE_ATS_CONNECTIVITY_H
  27. /**
  28. * Is the given peer in the list of peers for which we
  29. * have an address request?
  30. *
  31. * @param peer peer to query for
  32. * @return #GNUNET_YES if so, #GNUNET_NO if not
  33. */
  34. int
  35. GAS_connectivity_has_peer (const struct GNUNET_PeerIdentity *peer);
  36. /**
  37. * Handle 'request address' messages from clients.
  38. *
  39. * @param cls unused, NULL
  40. * @param client client that sent the request
  41. * @param message the request message
  42. */
  43. void
  44. GAS_handle_request_address (void *cls,
  45. struct GNUNET_SERVER_Client *client,
  46. const struct GNUNET_MessageHeader *message);
  47. /**
  48. * Cancel 'request address' messages from clients.
  49. *
  50. * @param cls unused, NULL
  51. * @param client client that sent the request
  52. * @param message the request message
  53. */
  54. void
  55. GAS_handle_request_address_cancel (void *cls,
  56. struct GNUNET_SERVER_Client *client,
  57. const struct GNUNET_MessageHeader *message);
  58. /**
  59. * Unregister a client (which may have been a connectivity client,
  60. * but this is not assured).
  61. *
  62. * @param client handle of the (now dead) client
  63. */
  64. void
  65. GAS_connectivity_remove_client (struct GNUNET_SERVER_Client *client);
  66. /**
  67. * Initialize connectivity subsystem.
  68. */
  69. void
  70. GAS_connectivity_init (void);
  71. /**
  72. * Shutdown connectivity subsystem.
  73. */
  74. void
  75. GAS_connectivity_done (void);
  76. #endif
  77. /* end of gnunet-service-ats_connectivity.h */