diff options
author | Nils Durner <durner@gnunet.org> | 2009-08-23 22:11:49 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2009-08-23 22:11:49 +0000 |
commit | 2518cfc0a86865ebe4d0550e0013ed52a494231b (patch) | |
tree | e9a130b782597e18bcff24a9fdab6e5c6aae1f9c /src/util/disk.h | |
parent | 2ae973618f3b51fa9bbf5532eaa1352cafc24ecc (diff) | |
download | gnunet-2518cfc0a86865ebe4d0550e0013ed52a494231b.tar.gz gnunet-2518cfc0a86865ebe4d0550e0013ed52a494231b.zip |
low level network API
Diffstat (limited to 'src/util/disk.h')
-rw-r--r-- | src/util/disk.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/util/disk.h b/src/util/disk.h new file mode 100644 index 000000000..9857a0fed --- /dev/null +++ b/src/util/disk.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2009 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 2, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file util/disk.h | ||
23 | * @brief Internal DISK related helper functions | ||
24 | * @author Nils Durner | ||
25 | */ | ||
26 | |||
27 | |||
28 | #ifndef GNUNET_DISK_H_ | ||
29 | #define GNUNET_DISK_H_ | ||
30 | |||
31 | #include "gnunet_disk_lib.h" | ||
32 | |||
33 | struct GNUNET_DISK_FileHandle | ||
34 | { | ||
35 | #ifdef MINGW | ||
36 | HANDLE h; | ||
37 | #else | ||
38 | int fd; | ||
39 | #endif | ||
40 | }; | ||
41 | |||
42 | /** | ||
43 | * Retrieve OS file handle | ||
44 | * @internal | ||
45 | * @param fh GNUnet file descriptor | ||
46 | * @param dst destination buffer | ||
47 | * @param dst_len length of dst | ||
48 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | ||
49 | */ | ||
50 | int GNUNET_internal_disk_file_handle (const struct GNUNET_DISK_FileHandle *fh, | ||
51 | void *dst, unsigned int dst_len); | ||
52 | |||
53 | #endif /* GNUNET_DISK_H_ */ | ||