mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3-mdssvc: (un)marshalling Spotlight RPC blob
Add code for marshalling and unmarshalling Spotlight RPC blobs from/into a dalloc object store. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
222e863d4e
commit
5d4eceae15
1362
source3/rpc_server/mdssvc/marshalling.c
Normal file
1362
source3/rpc_server/mdssvc/marshalling.c
Normal file
File diff suppressed because it is too large
Load Diff
55
source3/rpc_server/mdssvc/marshalling.h
Normal file
55
source3/rpc_server/mdssvc/marshalling.h
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
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"
|
||||
|
||||
#define MAX_SL_FRAGMENT_SIZE 0xFFFFF
|
||||
|
||||
/* 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 ssize_t sl_pack(DALLOC_CTX *query, char *buf, size_t bufsize);
|
||||
extern bool sl_unpack(DALLOC_CTX *query, const char *buf, size_t bufsize);
|
||||
|
||||
#endif
|
@ -18,4 +18,19 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MDSSVC_H
|
||||
#define _MDSSVC_H
|
||||
|
||||
#include "dalloc.h"
|
||||
#include "marshalling.h"
|
||||
|
||||
/******************************************************************************
|
||||
* Function declarations
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* mdssvc.c
|
||||
*/
|
||||
int mds_dispatch(void);
|
||||
|
||||
#endif /* _MDSSVC_H */
|
||||
|
@ -131,6 +131,7 @@ bld.SAMBA3_SUBSYSTEM('RPC_WKSSVC',
|
||||
bld.SAMBA3_SUBSYSTEM('RPC_MDSSVC',
|
||||
source='''mdssvc/mdssvc.c
|
||||
mdssvc/dalloc.c
|
||||
mdssvc/marshalling.c
|
||||
mdssvc/srv_mdssvc_nt.c
|
||||
../../librpc/gen_ndr/srv_mdssvc.c''',
|
||||
deps='samba-util ' + bld.env['libtracker'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user