idset.c File Reference

Parsing of GLOBSET structures. More...

#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"

Functions

_PUBLIC_ uint64_t exchange_globcnt (uint64_t globcnt)
 
_PUBLIC_ struct globset_rangeGLOBSET_parse (TALLOC_CTX *mem_ctx, DATA_BLOB buffer, uint32_t *countP, uint32_t *byte_countP)
 
_PUBLIC_ enum MAPISTATUS IDSET_check_ranges (const struct idset *idset)
 
_PUBLIC_ void IDSET_dump (const struct idset *idset, const char *label)
 
_PUBLIC_ bool IDSET_includes_eid (const struct idset *idset, uint64_t eid)
 
_PUBLIC_ bool IDSET_includes_guid_glob (const struct idset *idset, struct GUID *replica_guid, uint64_t id)
 
_PUBLIC_ struct idsetIDSET_merge_idsets (TALLOC_CTX *mem_ctx, const struct idset *left, const struct idset *right)
 
_PUBLIC_ struct idsetIDSET_parse (TALLOC_CTX *mem_ctx, DATA_BLOB buffer, bool idbased)
 
_PUBLIC_ void IDSET_remove_rawidset (struct idset *idset, const struct rawidset *rawidset)
 
_PUBLIC_ struct Binary_r * IDSET_serialize (TALLOC_CTX *mem_ctx, const struct idset *idset)
 
_PUBLIC_ void ndr_push_idset (struct ndr_push *ndr, struct idset *idset)
 
_PUBLIC_ struct idsetRAWIDSET_convert_to_idset (TALLOC_CTX *mem_ctx, const struct rawidset *rawidset)
 
_PUBLIC_ struct rawidsetRAWIDSET_make (TALLOC_CTX *mem_ctx, bool idbased, bool single)
 
_PUBLIC_ void RAWIDSET_push_eid (struct rawidset *rawidset, uint64_t eid)
 
_PUBLIC_ void RAWIDSET_push_guid_glob (struct rawidset *rawidset, const struct GUID *guid, uint64_t globcnt)
 

Detailed Description

Parsing of GLOBSET structures.

Function Documentation

◆ exchange_globcnt()

_PUBLIC_ uint64_t exchange_globcnt ( uint64_t globcnt)

Inverts the bytes of a globcnt, such as for the ids returned by Exchange

Referenced by IDSET_check_ranges(), IDSET_dump(), IDSET_includes_eid(), and IDSET_includes_guid_glob().

◆ GLOBSET_parse()

_PUBLIC_ struct globset_range * GLOBSET_parse ( TALLOC_CTX * mem_ctx,
DATA_BLOB buffer,
uint32_t * countP,
uint32_t * byte_countP )

deserialize a GLOBSET following the format described in [OXCFXICS - 2.2.2.5]

References globset_range::next, and OC_DEBUG.

Referenced by IDSET_parse().

◆ IDSET_check_ranges()

_PUBLIC_ enum MAPISTATUS IDSET_check_ranges ( const struct idset * idset)

check GLOBCNT ranges from an idset structure. [MS-OXCFXICS] Section 3.1.5.4.3.2.4

Parameters
idsetpointer to the idset structure to check
Returns
MAPI_E_SUCCESS on success, ecRpcFormat if any range is incorrect (low > high) or any range is NULL.

References exchange_globcnt(), globset_range::high, globset_range::low, globset_range::next, idset::next, OPENCHANGE_RETVAL_IF, idset::range_count, and idset::ranges.

◆ IDSET_dump()

_PUBLIC_ void IDSET_dump ( const struct idset * idset,
const char * label )

dump an idset structure

Parameters
idsetpointer to the idset structure to dump
labelstring to define the dump in log

References exchange_globcnt(), idset::guid, globset_range::high, idset::id, idset::idbased, globset_range::low, globset_range::next, idset::next, OC_DEBUG, oc_log(), OC_LOG_ERROR, idset::range_count, idset::ranges, and idset::repl.

Referenced by IDSET_parse().

◆ IDSET_includes_eid()

_PUBLIC_ bool IDSET_includes_eid ( const struct idset * idset,
uint64_t eid )

tests the presence of a specific id in the ranges of a ReplID-based idset structure

References exchange_globcnt(), globset_range::high, idset::id, idset::idbased, globset_range::low, globset_range::next, idset::next, idset::ranges, and idset::repl.

◆ IDSET_includes_guid_glob()

_PUBLIC_ bool IDSET_includes_guid_glob ( const struct idset * idset,
struct GUID * replica_guid,
uint64_t id )

tests the presence of a specific id in the ranges of a ReplGUID-based idset structure

References exchange_globcnt(), idset::guid, globset_range::high, idset::idbased, globset_range::low, globset_range::next, idset::next, idset::ranges, and idset::repl.

◆ IDSET_merge_idsets()

_PUBLIC_ struct idset * IDSET_merge_idsets ( TALLOC_CTX * mem_ctx,
const struct idset * left,
const struct idset * right )

◆ IDSET_parse()

_PUBLIC_ struct idset * IDSET_parse ( TALLOC_CTX * mem_ctx,
DATA_BLOB buffer,
bool idbased )

deserialize an IDSET following the format described in [OXCFXICS - 2.2.2.4]

References GLOBSET_parse(), idset::guid, idset::id, idset::idbased, IDSET_dump(), idset::next, idset::range_count, idset::ranges, and idset::repl.

◆ IDSET_remove_rawidset()

◆ IDSET_serialize()

_PUBLIC_ struct Binary_r * IDSET_serialize ( TALLOC_CTX * mem_ctx,
const struct idset * idset )

serialize an idset structure in a struct SBinary_r

References idset::guid, idset::id, idset::idbased, globset_range::next, idset::next, idset::ranges, and idset::repl.

Referenced by ndr_push_idset().

◆ ndr_push_idset()

_PUBLIC_ void ndr_push_idset ( struct ndr_push * ndr,
struct idset * idset )

push an idset on an ndr stream

References IDSET_serialize().

◆ RAWIDSET_convert_to_idset()

_PUBLIC_ struct idset * RAWIDSET_convert_to_idset ( TALLOC_CTX * mem_ctx,
const struct rawidset * rawidset )

◆ RAWIDSET_make()

_PUBLIC_ struct rawidset * RAWIDSET_make ( TALLOC_CTX * mem_ctx,
bool idbased,
bool single )

◆ RAWIDSET_push_eid()

_PUBLIC_ void RAWIDSET_push_eid ( struct rawidset * rawidset,
uint64_t eid )

◆ RAWIDSET_push_guid_glob()

_PUBLIC_ void RAWIDSET_push_guid_glob ( struct rawidset * rawidset,
const struct GUID * guid,
uint64_t globcnt )

Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/