1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

idl: added WSPP DrsOptions bit names

This should make it much easier to work through the logic in MS-DRSR
This commit is contained in:
Andrew Tridgell 2009-10-13 18:31:21 +11:00
parent 1c1a883bd0
commit 44866f0df4
4 changed files with 122 additions and 0 deletions

View File

@ -15,6 +15,38 @@
#define DRSUAPI_DS_BIND_GUID_W2K3 ( "6afab99c-6e26-464a-975f-f58f105218bc" )
#define DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR ( 0x1 )
#define DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID ( "E3514235-4B06-11D1-AB04-00C04FC2DCD2" )
/* bitmap drsuapi_DrsOptions */
#define DRSUAPI_DRS_ASYNC_OP ( 0x00000001 )
#define DRSUAPI_DRS_GETCHG_CHECK ( 0x00000002 )
#define DRSUAPI_DRS_ADD_REF ( 0x00000004 )
#define DRSUAPI_DRS_SYNC_ALL ( 0x00000008 )
#define DRSUAPI_DRS_DEL_REF ( 0x00000008 )
#define DRSUAPI_DRS_WRIT_REP ( 0x00000010 )
#define DRSUAPI_DRS_INIT_SYNC ( 0x00000020 )
#define DRSUAPI_DRS_PER_SYNC ( 0x00000040 )
#define DRSUAPI_DRS_MAIL_REP ( 0x00000080 )
#define DRSUAPI_DRS_ASYNC_REP ( 0x00000100 )
#define DRSUAPI_DRS_IGNORE_ERROR ( 0x00000100 )
#define DRSUAPI_DRS_TWOWAY_SYNC ( 0x00000200 )
#define DRSUAPI_DRS_CRITICAL_ONLY ( 0x00000400 )
#define DRSUAPI_DRS_GET_ANC ( 0x00000800 )
#define DRSUAPI_DRS_GET_NC_SIZE ( 0x00001000 )
#define DRSUAPI_DRS_LOCAL_ONLY ( 0x00001000 )
#define DRSUAPI_DRS_SYNC_BYNAME ( 0x00004000 )
#define DRSUAPI_DRS_REF_OK ( 0x00004000 )
#define DRSUAPI_DRS_FULL_SYNC_NOW ( 0x00008000 )
#define DRSUAPI_DRS_NO_SOURCE ( 0x00008000 )
#define DRSUAPI_DRS_FULL_SYNC_PACKET ( 0x00020000 )
#define DRSUAPI_DRS_REF_GCSPN ( 0x00100000 )
#define DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING ( 0x00800000 )
#define DRSUAPI_DRS_SYNC_FORCED ( 0x02000000 )
#define DRSUAPI_DRS_DISABLE_AUTO_SYNC ( 0x04000000 )
#define DRSUAPI_DRS_DISABLE_PERIODIC_SYNC ( 0x08000000 )
#define DRSUAPI_DRS_USE_COMPRESSION ( 0x10000000 )
#define DRSUAPI_DRS_NEVER_NOTIFY ( 0x20000000 )
#define DRSUAPI_DRS_SYNC_PAS ( 0x40000000 )
#define DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP ( 0x80000000 )
/* bitmap drsuapi_SupportedExtensions */
#define DRSUAPI_SUPPORTED_EXTENSION_BASE ( 0x00000001 )
#define DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION ( 0x00000002 )

View File

@ -7,6 +7,57 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "librpc/ndr/ndr_compression.h"
_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r)
{
ndr_print_uint32(ndr, name, r);
ndr->depth++;
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_OP", DRSUAPI_DRS_ASYNC_OP, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GETCHG_CHECK", DRSUAPI_DRS_GETCHG_CHECK, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ADD_REF", DRSUAPI_DRS_ADD_REF, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_ALL", DRSUAPI_DRS_SYNC_ALL, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DEL_REF", DRSUAPI_DRS_DEL_REF, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_WRIT_REP", DRSUAPI_DRS_WRIT_REP, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_INIT_SYNC", DRSUAPI_DRS_INIT_SYNC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_PER_SYNC", DRSUAPI_DRS_PER_SYNC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_MAIL_REP", DRSUAPI_DRS_MAIL_REP, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_ASYNC_REP", DRSUAPI_DRS_ASYNC_REP, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_IGNORE_ERROR", DRSUAPI_DRS_IGNORE_ERROR, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_TWOWAY_SYNC", DRSUAPI_DRS_TWOWAY_SYNC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_CRITICAL_ONLY", DRSUAPI_DRS_CRITICAL_ONLY, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ANC", DRSUAPI_DRS_GET_ANC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_NC_SIZE", DRSUAPI_DRS_GET_NC_SIZE, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_LOCAL_ONLY", DRSUAPI_DRS_LOCAL_ONLY, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_BYNAME", DRSUAPI_DRS_SYNC_BYNAME, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_OK", DRSUAPI_DRS_REF_OK, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_NOW", DRSUAPI_DRS_FULL_SYNC_NOW, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NO_SOURCE", DRSUAPI_DRS_NO_SOURCE, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_FULL_SYNC_PACKET", DRSUAPI_DRS_FULL_SYNC_PACKET, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_REF_GCSPN", DRSUAPI_DRS_REF_GCSPN, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_FORCED", DRSUAPI_DRS_SYNC_FORCED, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_AUTO_SYNC", DRSUAPI_DRS_DISABLE_AUTO_SYNC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", DRSUAPI_DRS_DISABLE_PERIODIC_SYNC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_USE_COMPRESSION", DRSUAPI_DRS_USE_COMPRESSION, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_NEVER_NOTIFY", DRSUAPI_DRS_NEVER_NOTIFY, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_SYNC_PAS", DRSUAPI_DRS_SYNC_PAS, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP, r);
ndr->depth--;
}
static enum ndr_err_code ndr_push_drsuapi_SupportedExtensions(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));

View File

@ -63,6 +63,9 @@ extern const struct ndr_interface_table ndr_table_drsuapi;
#define NDR_DRSUAPI_QUERYSITESBYCOST (0x18)
#define NDR_DRSUAPI_CALL_COUNT (25)
enum ndr_err_code ndr_push_drsuapi_DrsOptions(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_drsuapi_DrsOptions(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
void ndr_print_drsuapi_DrsOptions(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_drsuapi_SupportedExtensions(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_drsuapi_SupportedExtensionsExt(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_drsuapi_DsBindInfo24(struct ndr_print *ndr, const char *name, const struct drsuapi_DsBindInfo24 *r);

View File

@ -15,6 +15,40 @@ interface drsuapi
{
typedef bitmap samr_GroupAttrs samr_GroupAttrs;
/* see MS-DRSR section 5.37 */
typedef [public,bitmap32bit] bitmap {
DRSUAPI_DRS_ASYNC_OP = 0x00000001,
DRSUAPI_DRS_GETCHG_CHECK = 0x00000002,
DRSUAPI_DRS_ADD_REF = 0x00000004,
DRSUAPI_DRS_SYNC_ALL = 0x00000008,
DRSUAPI_DRS_DEL_REF = 0x00000008,
DRSUAPI_DRS_WRIT_REP = 0x00000010,
DRSUAPI_DRS_INIT_SYNC = 0x00000020,
DRSUAPI_DRS_PER_SYNC = 0x00000040,
DRSUAPI_DRS_MAIL_REP = 0x00000080,
DRSUAPI_DRS_ASYNC_REP = 0x00000100,
DRSUAPI_DRS_IGNORE_ERROR = 0x00000100,
DRSUAPI_DRS_TWOWAY_SYNC = 0x00000200,
DRSUAPI_DRS_CRITICAL_ONLY = 0x00000400,
DRSUAPI_DRS_GET_ANC = 0x00000800,
DRSUAPI_DRS_GET_NC_SIZE = 0x00001000,
DRSUAPI_DRS_LOCAL_ONLY = 0x00001000,
DRSUAPI_DRS_SYNC_BYNAME = 0x00004000,
DRSUAPI_DRS_REF_OK = 0x00004000,
DRSUAPI_DRS_FULL_SYNC_NOW = 0x00008000,
DRSUAPI_DRS_NO_SOURCE = 0x00008000,
DRSUAPI_DRS_FULL_SYNC_PACKET = 0x00020000,
DRSUAPI_DRS_REF_GCSPN = 0x00100000,
DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING = 0x00800000,
DRSUAPI_DRS_SYNC_FORCED = 0x02000000,
DRSUAPI_DRS_DISABLE_AUTO_SYNC = 0x04000000,
DRSUAPI_DRS_DISABLE_PERIODIC_SYNC = 0x08000000,
DRSUAPI_DRS_USE_COMPRESSION = 0x10000000,
DRSUAPI_DRS_NEVER_NOTIFY = 0x20000000,
DRSUAPI_DRS_SYNC_PAS = 0x40000000,
DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP = 0x80000000
} drsuapi_DrsOptions;
/*****************/
/* Function 0x00 */
typedef [bitmap32bit] bitmap {
@ -219,6 +253,8 @@ interface drsuapi
/* the _WRITEABLE flag indicates a replication with all attributes
*
* --metze
*
* See drsuapi_DrsOptions for the WSPP bit names
*/
DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE = 0x00000010,
DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP = 0x00000020,