fs.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2003--2012 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. * (extract)
  18. * @file fs/fs.h
  19. * @brief definitions for the entire fs module
  20. * @author Igor Wronsky, Christian Grothoff
  21. */
  22. #ifndef FS_H
  23. #define FS_H
  24. #include <gnunet/gnunet_common.h>
  25. /**
  26. * Size of the individual blocks used for file-sharing.
  27. */
  28. #define DBLOCK_SIZE (32 * 1024)
  29. /**
  30. * Blocksize to use when hashing files for indexing (blocksize for IO,
  31. * not for the DBlocks). Larger blocksizes can be more efficient but
  32. * will be more disruptive as far as the scheduler is concerned.
  33. */
  34. #define HASHING_BLOCKSIZE (1024 * 128)
  35. GNUNET_NETWORK_STRUCT_BEGIN
  36. /**
  37. * @brief content hash key
  38. */
  39. struct ContentHashKey
  40. {
  41. /**
  42. * Hash of the original content, used for encryption.
  43. */
  44. struct GNUNET_HashCode key;
  45. /**
  46. * Hash of the encrypted content, used for querying.
  47. */
  48. struct GNUNET_HashCode query;
  49. };
  50. GNUNET_NETWORK_STRUCT_END
  51. #endif
  52. /* end of fs.h */