nsswitch: explicitly mark nss_module_register() _PUBLIC_ on FreeBSD
[Samba.git] / source3 / lib / file_id.h
blob630d154c077f05377231fa9f6ca4ad660f7a3f5b
1 /*
2 Unix SMB/CIFS implementation.
4 file_id structure handling
6 Copyright (C) Andrew Tridgell 2007
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __LIB_FILE_ID_H__
23 #define __LIB_FILE_ID_H__
25 #include "librpc/gen_ndr/file_id.h"
27 /* The following definitions come from lib/file_id.c */
29 bool file_id_equal(const struct file_id *id1, const struct file_id *id2);
32 * strlen("18446744073709551615")=20 times 3 plus 2 colons plus trailing 0
34 struct file_id_buf { char buf[63]; };
35 char *file_id_str_buf(struct file_id fid, struct file_id_buf *dst);
38 an allocated string for a file_id structure
40 void push_file_id_16(char *buf, const struct file_id *id);
41 void push_file_id_24(char *buf, const struct file_id *id);
42 void pull_file_id_24(const char *buf, struct file_id *id);
45 * Make a SMB File-ID from itime
47 struct stat_ex;
48 uint64_t make_file_id_from_itime(const struct stat_ex *st);
50 #endif