当前位置: 首页>>代码示例>>C++>>正文


C++ NDR_CHECK函数代码示例

本文整理汇总了C++中NDR_CHECK函数的典型用法代码示例。如果您正苦于以下问题:C++ NDR_CHECK函数的具体用法?C++ NDR_CHECK怎么用?C++ NDR_CHECK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NDR_CHECK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ndr_pull_generic_ptr

/*
  parse a pointer referent identifier
*/
_PUBLIC_ enum ndr_err_code ndr_pull_generic_ptr(struct ndr_pull *ndr, uint32_t *v)
{
	NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, v));
	if (*v != 0) {
		ndr->ptr_count++;
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:11,代码来源:ndr_basic.c

示例2: ndr_push_AuthenticationInformationArray_with_count

/* Modified to have 'count' specified */
static enum ndr_err_code ndr_push_AuthenticationInformationArray_with_count(struct ndr_push *ndr, int ndr_flags, int count, 
								 const struct AuthenticationInformationArray *r)
{
	uint32_t cntr_array_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_push_align(ndr, 4));
		for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
			NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS, &r->array[cntr_array_0]));
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		for (cntr_array_0 = 0; cntr_array_0 < count; cntr_array_0++) {
			NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_BUFFERS, &r->array[cntr_array_0]));
		}
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:18,代码来源:ndr_drsblobs.c

示例3: ndr_pull_HRESULT

/*
  pull a HRESULT
*/
_PUBLIC_ enum ndr_err_code ndr_pull_HRESULT(struct ndr_pull *ndr, int ndr_flags, HRESULT *status)
{
	uint32_t v;
	NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
	*status = HRES_ERROR(v);
	return NDR_ERR_SUCCESS;
}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:11,代码来源:ndr_basic.c

示例4: ndr_pull_dom_sid

_PUBLIC_ enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r)
{
	uint32_t cntr_sub_auths_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sid_rev_num));
		NDR_CHECK(ndr_pull_int8(ndr, NDR_SCALARS, &r->num_auths));
		if (r->num_auths < 0 || r->num_auths > 15) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
		for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) {
			NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auths[cntr_sub_auths_0]));
		}
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:0x24bin,项目名称:winexe-1,代码行数:17,代码来源:ndr_sec_helper.c

示例5: ndr_push_dom_sid2

/*
  parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
*/
enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
{
	if (!(ndr_flags & NDR_SCALARS)) {
		return NDR_ERR_SUCCESS;
	}
	NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, sid->num_auths));
	return ndr_push_dom_sid(ndr, ndr_flags, sid);
}
开发者ID:0x24bin,项目名称:winexe-1,代码行数:11,代码来源:ndr_sec_helper.c

示例6: ndr_push_rot_get_modification_time

static enum ndr_err_code ndr_push_rot_get_modification_time(struct ndr_push *ndr, int flags, const struct rot_get_modification_time *r)
{
	if (flags & NDR_IN) {
		if (r->in.moniker == NULL) {
			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.moniker));
	}
	if (flags & NDR_OUT) {
		if (r->out.t == NULL) {
			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
		}
		NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.t));
		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:nikatshun,项目名称:asuswrt-merlin,代码行数:17,代码来源:ndr_rot.c

示例7: ndr_pull_NTSTATUS

/*
  pull a NTSTATUS
*/
_PUBLIC_ enum ndr_err_code ndr_pull_NTSTATUS(struct ndr_pull *ndr, int ndr_flags, NTSTATUS *status)
{
	uint32_t v;
	NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
	*status = NT_STATUS(v);
	return NDR_ERR_SUCCESS;
}
开发者ID:DanilKorotenko,项目名称:samba,代码行数:11,代码来源:ndr_basic.c

示例8: ndr_pull_rot_is_listed

static enum ndr_err_code ndr_pull_rot_is_listed(struct ndr_pull *ndr, int flags, struct rot_is_listed *r)
{
	TALLOC_CTX *_mem_save_moniker_0;
	if (flags & NDR_IN) {
		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
			NDR_PULL_ALLOC(ndr, r->in.moniker);
		}
		_mem_save_moniker_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->in.moniker, LIBNDR_FLAG_REF_ALLOC);
		NDR_CHECK(ndr_pull_MInterfacePointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.moniker));
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_moniker_0, LIBNDR_FLAG_REF_ALLOC);
	}
	if (flags & NDR_OUT) {
		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:nikatshun,项目名称:asuswrt-merlin,代码行数:17,代码来源:ndr_rot.c

示例9: ndr_pull_sec_desc_buf

_PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
{
	uint32_t _ptr_sd;
	TALLOC_CTX *_mem_save_sd_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 5));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
		if (r->sd_size > 0x40000) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
		if (_ptr_sd) {
			NDR_PULL_ALLOC(ndr, r->sd);
		} else {
			r->sd = NULL;
		}
		NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->sd) {
			_mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
			{
				struct ndr_pull *_ndr_sd;
				NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
				NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
				NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
			}
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:33,代码来源:ndr_security.c

示例10: ndr_pull_PAC_INFO

_PUBLIC_ enum ndr_err_code ndr_pull_PAC_INFO(struct ndr_pull *ndr, int ndr_flags, union PAC_INFO *r)
{
	int level;
	level = ndr_pull_get_switch_value(ndr, r);
	if (ndr_flags & NDR_SCALARS) {
		switch (level) {
			case PAC_TYPE_LOGON_INFO: {
				NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_SCALARS, &r->logon_info));
			break; }

			case PAC_TYPE_SRV_CHECKSUM: {
				NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->srv_cksum));
			break; }

			case PAC_TYPE_KDC_CHECKSUM: {
				NDR_CHECK(ndr_pull_PAC_SIGNATURE_DATA(ndr, NDR_SCALARS, &r->kdc_cksum));
			break; }

			case PAC_TYPE_LOGON_NAME: {
				NDR_CHECK(ndr_pull_PAC_LOGON_NAME(ndr, NDR_SCALARS, &r->logon_name));
			break; }

			default: {
				{
					struct ndr_pull *_ndr_unknown;
					NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_unknown, 0, -1));
					NDR_CHECK(ndr_pull_DATA_BLOB_REM(_ndr_unknown, NDR_SCALARS, &r->unknown));
					NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_unknown, 0, -1));
				}
			break; }

		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		switch (level) {
			case PAC_TYPE_LOGON_INFO:
				NDR_CHECK(ndr_pull_PAC_LOGON_INFO_CTR(ndr, NDR_BUFFERS, &r->logon_info));
			break;

			case PAC_TYPE_SRV_CHECKSUM:
			break;

			case PAC_TYPE_KDC_CHECKSUM:
			break;

			case PAC_TYPE_LOGON_NAME:
			break;

			default:
			break;

		}
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:55,代码来源:ndr_krb5pac.c

示例11: ndr_pull_PAC_LOGON_INFO

static enum ndr_err_code ndr_pull_PAC_LOGON_INFO(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO *r)
{
	uint32_t _ptr_res_group_dom_sid;
	TALLOC_CTX *_mem_save_res_group_dom_sid_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info3));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_res_group_dom_sid));
		if (_ptr_res_group_dom_sid) {
			NDR_PULL_ALLOC(ndr, r->res_group_dom_sid);
		} else {
			r->res_group_dom_sid = NULL;
		}
		NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_SCALARS, &r->res_groups));
	}
	if (ndr_flags & NDR_BUFFERS) {
		NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info3));
		if (r->res_group_dom_sid) {
			_mem_save_res_group_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->res_group_dom_sid, 0);
			NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->res_group_dom_sid));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_res_group_dom_sid_0, 0);
		}
		NDR_CHECK(ndr_pull_samr_RidWithAttributeArray(ndr, NDR_BUFFERS, &r->res_groups));
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:27,代码来源:ndr_krb5pac.c

示例12: ndr_pull_PAC_LOGON_INFO_CTR

_PUBLIC_ enum ndr_err_code ndr_pull_PAC_LOGON_INFO_CTR(struct ndr_pull *ndr, int ndr_flags, struct PAC_LOGON_INFO_CTR *r)
{
	uint32_t _ptr_info;
	TALLOC_CTX *_mem_save_info_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
		if (_ptr_info) {
			NDR_PULL_ALLOC(ndr, r->info);
		} else {
			r->info = NULL;
		}
	}
	if (ndr_flags & NDR_BUFFERS) {
		if (r->info) {
			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
			NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
			NDR_CHECK(ndr_pull_PAC_LOGON_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
		}
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:27,代码来源:ndr_krb5pac.c

示例13: ndr_pull_security_acl

_PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r)
{
	uint32_t cntr_aces_0;
	TALLOC_CTX *_mem_save_aces_0;
	if (ndr_flags & NDR_SCALARS) {
		NDR_CHECK(ndr_pull_align(ndr, 4));
		NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision));
		NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces));
		if (r->num_aces > 1000) {
			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
		}
		NDR_PULL_ALLOC_N(ndr, r->aces, r->num_aces);
		_mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
		for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
			NDR_CHECK(ndr_pull_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
		NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
	}
	if (ndr_flags & NDR_BUFFERS) {
		_mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
		NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
		for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
			NDR_CHECK(ndr_pull_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
		}
		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:31,代码来源:ndr_security.c

示例14: ndr_pull_decode_pac_raw

static enum ndr_err_code ndr_pull_decode_pac_raw(struct ndr_pull *ndr, int flags, struct decode_pac_raw *r)
{
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_pull_PAC_DATA_RAW(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
	}
	if (flags & NDR_OUT) {
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:9,代码来源:ndr_krb5pac.c

示例15: ndr_push_decode_pac

static enum ndr_err_code ndr_push_decode_pac(struct ndr_push *ndr, int flags, const struct decode_pac *r)
{
	if (flags & NDR_IN) {
		NDR_CHECK(ndr_push_PAC_DATA(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.pac));
	}
	if (flags & NDR_OUT) {
	}
	return NDR_ERR_SUCCESS;
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:9,代码来源:ndr_krb5pac.c


注:本文中的NDR_CHECK函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。