gnunet-service-ats_connectivity.h 2.4 KB

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