blob: ccc8b4422686ae172b225851a0d3c29284348b21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
Unix SMB/CIFS implementation.
Main metadata server / Spotlight routines
Copyright (C) Ralph Boehme 2015
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MDSSVC_MARSHALLING_H
#define _MDSSVC_MARSHALLING_H
#include "dalloc.h"
#include "libcli/util/ntstatus.h"
#include "lib/util/data_blob.h"
#include "librpc/gen_ndr/mdssvc.h"
#define MAX_SL_FRAGMENT_SIZE 0xFFFFF
#define MAX_MDSCMD_SIZE 0xFFFFFF
/* Can be ored and used as flags */
#define SL_ENC_LITTLE_ENDIAN 1
#define SL_ENC_BIG_ENDIAN 2
#define SL_ENC_UTF_16 4
typedef DALLOC_CTX sl_array_t; /* an array of elements */
typedef DALLOC_CTX sl_dict_t; /* an array of key/value elements */
typedef DALLOC_CTX sl_filemeta_t; /* contains one sl_array_t */
typedef int sl_nil_t; /* a nil element */
typedef bool sl_bool_t;
typedef struct timeval sl_time_t;
typedef struct {
char sl_uuid[16];
} sl_uuid_t;
typedef struct {
uint16_t ca_unkn1;
uint32_t ca_context;
DALLOC_CTX *ca_cnids;
} sl_cnids_t; /* an array of CNIDs */
/******************************************************************************
* Function declarations
******************************************************************************/
extern NTSTATUS sl_pack_alloc(TALLOC_CTX *mem_ctx,
DALLOC_CTX *d,
struct mdssvc_blob *b,
size_t max_fragment_size);
extern bool sl_unpack(DALLOC_CTX *query, const char *buf, size_t bufsize);
#endif
|