123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- /* rehash --- a decentralised hash<->hash store
- Copyright © 2020 Maxime Devos <maxime.devos@student.kuleuven.be>
- This file is part of rehash.
- rehash is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or (at
- your option) any later version.
- rehash is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with rehash. If not, see <http://www.gnu.org/licenses/>. */
- #ifndef _REHASH_EXTRA_GNUNET_PROTOCOLS_H
- #define _REHASH_EXTRA_GNUNET_PROTOCOLS_H
- #include <gnunet/gnunet_protocols.h>
- #include "rehash_service.h"
- #include <gnunet/gnunet_block_lib.h>
- /* TODO: register a real block type */
- #define GNUNET_BLOCK_TYPE_REHASH GNUNET_BLOCK_TYPE_TEST
- /* TODO: register message types */
- #define _GNUNET_MESSAGE_TYPE_REHASH_START 48400
- /**
- * C->S: Client wants to search for hash->hash mappings.
- */
- #ifndef GNUNET_MESSAGE_TYPE_REHASH_CLIENT_GET
- #define GNUNET_MESSAGE_TYPE_REHASH_CLIENT_GET _GNUNET_MESSAGE_TYPE_REHASH_START
- #endif
- /**
- * S->C: Service returns result to client.
- */
- #ifndef GNUNET_MESSAGE_TYPE_REHASH_CLIENT_RESULT
- #define GNUNET_MESSAGE_TYPE_REHASH_CLIENT_RESULT (_GNUNET_MESSAGE_TYPE_REHASH_START + 1)
- #endif
- /**
- * C->S: Client wants to stop search for hash->hash mappings.
- */
- #ifndef GNUNET_MESSAGE_TYPE_REHASH_CLIENT_GET_STOP
- #define GNUNET_MESSAGE_TYPE_REHASH_CLIENT_GET_STOP (_GNUNET_MESSAGE_TYPE_REHASH_START + 2)
- #endif
- /**
- * C->S: Client wants to store hash->hash mapping.
- */
- #ifndef GNUNET_MESSAGE_TYPE_REHASH_CLIENT_PUT
- #define GNUNET_MESSAGE_TYPE_REHASH_CLIENT_PUT (_GNUNET_MESSAGE_TYPE_REHASH_START + 3)
- #endif
- /**
- * S->C: Service gives an update on a hash insertion
- */
- #ifndef GNUNET_MESSAGE_TYPE_REHASH_PUT_DONE
- #define GNUNET_MESSAGE_TYPE_REHASH_PUT_DONE (_GNUNET_MESSAGE_TYPE_REHASH_START + 4)
- #endif
- #endif
|