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


C++ prs_align函数代码示例

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


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

示例1: net_io_netinfo_2

static BOOL net_io_netinfo_2(char *desc, NETLOGON_INFO_2 *info, prs_struct *ps, int depth)
{
	if (info == NULL)
		return False;

	prs_debug(ps, depth, desc, "net_io_netinfo_2");
	depth++;

	if(!prs_align(ps))
		return False;
	
	if(!prs_uint32("flags              ", ps, depth, &info->flags))
		return False;
	if(!prs_uint32("pdc_status         ", ps, depth, &info->pdc_status))
		return False;
	if(!prs_uint32("ptr_trusted_dc_name", ps, depth, &info->ptr_trusted_dc_name))
		return False;
	if(!prs_uint32("tc_status          ", ps, depth, &info->tc_status))
		return False;

	if (info->ptr_trusted_dc_name != 0) {
		if(!smb_io_unistr2("unistr2", &info->uni_trusted_dc_name, info->ptr_trusted_dc_name, ps, depth))
			return False;
	}

	if(!prs_align(ps))
		return False;

	return True;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:30,代码来源:parse_net.c

示例2: svcctl_io_r_enum_dependent_services

BOOL svcctl_io_r_enum_dependent_services(const char *desc, SVCCTL_R_ENUM_DEPENDENT_SERVICES *r_u, prs_struct *ps, int depth)
{
	if (r_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_r_enum_dependent_services");
	depth++;

	if(!prs_align(ps))
		return False;

	if (!prs_rpcbuffer("", ps, depth, &r_u->buffer))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("needed", ps, depth, &r_u->needed))
		return False;
	if(!prs_uint32("returned", ps, depth, &r_u->returned))
		return False;

	if(!prs_werror("status", ps, depth, &r_u->status))
		return False;

	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:27,代码来源:parse_svcctl.c

示例3: dfs_io_q_dfs_get_info

BOOL dfs_io_q_dfs_get_info(const char *desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth)
{
	if(q_i == NULL)
		return False;

	prs_debug(ps, depth, desc, "dfs_io_q_dfs_get_info");
	depth++;

	if(!smb_io_unistr2("",&q_i->uni_path, 1, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("ptr_server", ps, depth, &q_i->ptr_server))
		return False;

	if(q_i->ptr_server)
		if (!smb_io_unistr2("",&q_i->uni_server, q_i->ptr_server, ps, depth))
			return False;
	if(!prs_align(ps))
		return False;

	if(!prs_uint32("ptr_share", ps, depth, &q_i->ptr_share))
		return False;
	if(q_i->ptr_share)
		if(!smb_io_unistr2("", &q_i->uni_share, q_i->ptr_share, ps, depth))
			return False;
	if(!prs_align(ps))
		return False;

	if(!prs_uint32("level", ps, depth, &q_i->level))
		return False;
	return True;
}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:35,代码来源:parse_dfs.c

示例4: net_io_q_logon_ctrl2

BOOL net_io_q_logon_ctrl2(char *desc, NET_Q_LOGON_CTRL2 *q_l, prs_struct *ps, int depth)
{
	if (q_l == NULL)
		return False;

	prs_debug(ps, depth, desc, "net_io_q_logon_ctrl2");
	depth++;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("ptr          ", ps, depth, &q_l->ptr))
		return False;

	if(!smb_io_unistr2 ("", &q_l->uni_server_name, q_l->ptr, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("function_code", ps, depth, &q_l->function_code))
		return False;
	if(!prs_uint32("query_level  ", ps, depth, &q_l->query_level))
		return False;
	if(!prs_uint32("switch_value ", ps, depth, &q_l->switch_value))
		return False;

	return True;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:29,代码来源:parse_net.c

示例5: svcctl_io_r_enum_services_status

BOOL svcctl_io_r_enum_services_status(const char *desc, SVCCTL_R_ENUM_SERVICES_STATUS *r_u, prs_struct *ps, int depth)
{
	if (r_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_r_enum_services_status");
	depth++;

	if(!prs_align(ps))
		return False;

	if (!prs_rpcbuffer("", ps, depth, &r_u->buffer))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("needed", ps, depth, &r_u->needed))
		return False;
	if(!prs_uint32("returned", ps, depth, &r_u->returned))
		return False;

	if(!prs_pointer("resume", ps, depth, (void**)&r_u->resume, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32))
		return False;

	if(!prs_werror("status", ps, depth, &r_u->status))
		return False;

	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:30,代码来源:parse_svcctl.c

示例6: svcctl_io_r_get_display_name

BOOL svcctl_io_r_get_display_name(const char *desc, SVCCTL_R_GET_DISPLAY_NAME *r_u, prs_struct *ps, int depth)
{
	if (r_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_r_get_display_name");
	depth++;

	if(!prs_align(ps))
		return False;

	
	if(!smb_io_unistr2("displayname", &r_u->displayname, 1, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("display_name_len", ps, depth, &r_u->display_name_len))
		return False;

	if(!prs_werror("status", ps, depth, &r_u->status))
		return False;

	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:26,代码来源:parse_svcctl.c

示例7: svcctl_io_q_open_service

BOOL svcctl_io_q_open_service(const char *desc, SVCCTL_Q_OPEN_SERVICE *q_u, prs_struct *ps, int depth)
{
	if (q_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_q_open_service");
	depth++;

	if(!prs_align(ps))
		return False;

	if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth))
		return False;

	if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("access", ps, depth, &q_u->access))
		return False;
	
	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:25,代码来源:parse_svcctl.c

示例8: svcctl_io_q_open_scmanager

BOOL svcctl_io_q_open_scmanager(const char *desc, SVCCTL_Q_OPEN_SCMANAGER *q_u, prs_struct *ps, int depth)
{
	if (q_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_q_open_scmanager");
	depth++;

	if(!prs_align(ps))
		return False;

	if(!prs_pointer("servername", ps, depth, (void**)&q_u->servername, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2))
		return False;
	if(!prs_align(ps))
		return False;

	if(!prs_pointer("database", ps, depth, (void**)&q_u->database, sizeof(UNISTR2), (PRS_POINTER_CAST)prs_io_unistr2))
		return False;
	if(!prs_align(ps))
		return False;

	if(!prs_uint32("access", ps, depth, &q_u->access))
		return False;

	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:26,代码来源:parse_svcctl.c

示例9: svcctl_io_q_get_display_name

BOOL svcctl_io_q_get_display_name(const char *desc, SVCCTL_Q_GET_DISPLAY_NAME *q_u, prs_struct *ps, int depth)
{
	if (q_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_q_get_display_name");
	depth++;

	if(!prs_align(ps))
		return False;

	if(!smb_io_pol_hnd("scm_pol", &q_u->handle, ps, depth))
		return False;

	if(!smb_io_unistr2("servicename", &q_u->servicename, 1, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("display_name_len", ps, depth, &q_u->display_name_len))
		return False;
	
	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:25,代码来源:parse_svcctl.c

示例10: svcctl_io_q_set_service_sec

BOOL svcctl_io_q_set_service_sec(const char *desc, SVCCTL_Q_SET_SERVICE_SEC *q_u, prs_struct *ps, int depth)
{
	if (q_u == NULL)
		return False;

	prs_debug(ps, depth, desc, "svcctl_io_q_set_service_sec");
	depth++;

	if(!prs_align(ps))
		return False;

	if(!smb_io_pol_hnd("handle", &q_u->handle, ps, depth))
		return False;
	if(!prs_uint32("security_flags", ps, depth, &q_u->security_flags))
		return False;

	if (!prs_rpcbuffer("buffer", ps, depth, &q_u->buffer))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("buffer_size", ps, depth, &q_u->buffer_size))
		return False;

	return True;

}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:28,代码来源:parse_svcctl.c

示例11: eventlog_io_q_open_eventlog

BOOL eventlog_io_q_open_eventlog(const char *desc, EVENTLOG_Q_OPEN_EVENTLOG *q_u,
				 prs_struct *ps, int depth)
{
	if(q_u == NULL)
		return False;
    
	prs_debug(ps, depth, desc, "eventlog_io_q_open_eventlog");
	depth++;

	if(!prs_align(ps))
		return False;

	if ( !prs_pointer("", ps, depth, (void*)&q_u->unknown0, sizeof(EVENTLOG_OPEN_UNKNOWN0), (PRS_POINTER_CAST)prs_ev_open_unknown0))
		return False;

	if ( !prs_unistr4("logname", ps, depth, &q_u->logname) )
		return False;
	if ( !prs_align(ps) )
		return False;

	if ( !prs_unistr4("servername", ps, depth, &q_u->servername) )
		return False;
	if ( !prs_align(ps) )
		return False;

	if ( !prs_uint32("unknown1", ps, depth, &q_u->unknown1) )
		return False;
	if ( !prs_uint32("unknown2", ps, depth, &q_u->unknown2) )
		return False;

	return True;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:32,代码来源:parse_eventlog.c

示例12: smb_io_clnt_srv

BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth)
{
	if (logcln == NULL)
		return False;

	prs_debug(ps, depth, desc, "smb_io_clnt_srv");
	depth++;

	if(!prs_align(ps))
		return False;
	
	if(!prs_uint32("undoc_buffer ", ps, depth, &logcln->undoc_buffer))
		return False;

	if (logcln->undoc_buffer != 0) {
		if(!smb_io_unistr2("unistr2", &logcln->uni_logon_srv, logcln->undoc_buffer, ps, depth))
			return False;
	}

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("undoc_buffer2", ps, depth, &logcln->undoc_buffer2))
		return False;

	if (logcln->undoc_buffer2 != 0) {
		if(!smb_io_unistr2("unistr2", &logcln->uni_comp_name, logcln->undoc_buffer2, ps, depth))
			return False;
	}

	return True;
}
开发者ID:DeezNuts12,项目名称:freestyledash,代码行数:32,代码来源:parse_misc.c

示例13: dfs_io_q_dfs_remove

BOOL dfs_io_q_dfs_remove(const char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth)
{
	if(q_d == NULL)
		return False;

	prs_debug(ps, depth, desc, "dfs_io_q_dfs_remove");
	depth++;
  
	if(!prs_align(ps))
		return False;
  
	if(!smb_io_unistr2("DfsEntryPath",&q_d->DfsEntryPath, 1, ps, depth))
		return False;

	if(!prs_align(ps))
		return False;

	if(!prs_uint32("ptr_ServerName", ps, depth, &q_d->ptr_ServerName))
		return False;
	if(q_d->ptr_ServerName)
		if (!smb_io_unistr2("ServerName",&q_d->ServerName, q_d->ptr_ServerName, ps, depth))
			return False;
	if(!prs_align(ps))
		return False;

	if(!prs_uint32("ptr_ShareName", ps, depth, &q_d->ptr_ShareName))
		return False;
	if(q_d->ptr_ShareName)
		if (!smb_io_unistr2("ShareName",&q_d->ShareName,  q_d->ptr_ShareName, ps, depth))
			return False;
	if(!prs_align(ps))
		return False;

	return True;
}
开发者ID:Nymphetaminer,项目名称:dsl-n55u,代码行数:35,代码来源:parse_dfs.c

示例14: net_io_r_sam_logon

BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int depth)
{
	if (r_l == NULL)
		return False;

	prs_debug(ps, depth, desc, "net_io_r_sam_logon");
	depth++;

	if(!prs_uint32("buffer_creds", ps, depth, &r_l->buffer_creds)) /* undocumented buffer pointer */
		return False;
	if(!smb_io_cred("", &r_l->srv_creds, ps, depth)) /* server credentials.  server time stamp appears to be ignored. */
		return False;

	if(!prs_uint16("switch_value", ps, depth, &r_l->switch_value))
		return False;
	if(!prs_align(ps))
		return False;

	if (r_l->switch_value != 0) {
		if(!net_io_user_info3("", r_l->user, ps, depth))
			return False;
	}

	if(!prs_uint32("auth_resp   ", ps, depth, &r_l->auth_resp)) /* 1 - Authoritative response; 0 - Non-Auth? */
		return False;

	if(!prs_uint32("status      ", ps, depth, &r_l->status))
		return False;

	if(!prs_align(ps))
		return False;

	return True;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:34,代码来源:parse_net.c

示例15: ds_io_dom_trusts_ctr

static BOOL ds_io_dom_trusts_ctr( const char *desc, prs_struct *ps, int depth, DS_DOMAIN_TRUSTS_CTR *ctr)
{
	int i;

	prs_debug(ps, depth, desc, "ds_io_dom_trusts_ctr");
	depth++;
	
	if ( !prs_uint32( "ptr", ps, depth, &ctr->ptr ) )
		return False;
	
	if ( !prs_uint32( "max_count", ps, depth, &ctr->max_count ) )
		return False;
	
	/* are we done? */
	
	if ( ctr->max_count == 0 )
		return True;
	
	/* allocate the domain trusts array are parse it */
	
	ctr->trusts = (DS_DOMAIN_TRUSTS*)talloc(ps->mem_ctx, sizeof(DS_DOMAIN_TRUSTS)*ctr->max_count);
	
	if ( !ctr->trusts )
		return False;
	
	/* this stinks; the static portion o fthe structure is read here and then
	   we need another loop to read the UNISTR2's and SID's */
	   
	for ( i=0; i<ctr->max_count;i++ ) {
		if ( !ds_io_domain_trusts("domain_trusts", ps, depth, &ctr->trusts[i] ) )
			return False;
	}

	for ( i=0; i<ctr->max_count; i++ ) {
	
		if ( !smb_io_unistr2("netbios_domain", &ctr->trusts[i].netbios_domain, ctr->trusts[i].netbios_ptr, ps, depth) )
			return False;

		if(!prs_align(ps))
			return False;
		
		if ( !smb_io_unistr2("dns_domain", &ctr->trusts[i].dns_domain, ctr->trusts[i].dns_ptr, ps, depth) )
			return False;

		if(!prs_align(ps))
			return False;
			
		if ( ctr->trusts[i].sid_ptr ) {
			if ( !smb_io_dom_sid2("sid", &ctr->trusts[i].sid, ps, depth ) )
				return False;		
		}
	}
	
	return True;
}
开发者ID:cmtsij,项目名称:Vizio_XWR100_GPL,代码行数:55,代码来源:parse_ds.c


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