• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IPC_MakeHeader函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: PS_EncryptSignDecryptVerifyAesCcm

Result PS_EncryptSignDecryptVerifyAesCcm(u8* in, u32 in_size, u8* out, u32 out_size, u32 data_len, u32 mac_data_len, u32 mac_len, PS_AESAlgorithm aes_algo, PS_AESKeyType key_type, u8* nonce)
{
	Result ret = 0;
	u32 *cmdbuf = getThreadCommandBuffer();

	u32 *_nonce = (u32*)nonce;

	cmdbuf[0] = IPC_MakeHeader(0x5,10,4); // 0x50284
	cmdbuf[1] = in_size;
	cmdbuf[2] = mac_data_len;
	cmdbuf[3] = data_len;
	cmdbuf[4] = out_size;
	cmdbuf[5] = mac_len;
	memcpy(&cmdbuf[6], _nonce, 12);
	cmdbuf[9] = aes_algo;
	cmdbuf[10] = key_type;
	cmdbuf[11] = IPC_Desc_Buffer(in_size, IPC_BUFFER_R);
	cmdbuf[12] = (u32)in;
	cmdbuf[13] = IPC_Desc_Buffer(out_size, IPC_BUFFER_W);
	cmdbuf[14] = (u32)out;

	if(R_FAILED(ret = svcSendSyncRequest(psHandle)))return ret;

	return (Result)cmdbuf[1];
}
开发者ID:TuxSH,项目名称:ctrulib,代码行数:25,代码来源:ps.c


示例2: socListen

int socListen(int sockfd, int max_connections)
{
    Result ret = 0;
    u32 *cmdbuf = getThreadCommandBuffer();

    cmdbuf[0] = IPC_MakeHeader(0x3,2,2); // 0x30082
    cmdbuf[1] = (u32)sockfd;
    cmdbuf[2] = (u32)max_connections;
    cmdbuf[3] = IPC_Desc_CurProcessHandle();

    ret = svcSendSyncRequest(SOCU_handle);
    if(ret != 0)
    {
        //errno = SYNC_ERROR;
        return ret;
    }

    ret = (int)cmdbuf[1];
    if(ret == 0)
        ret = _net_convert_error(cmdbuf[2]);

    if(ret < 0) {
        //errno = -ret;
        return -1;
    }

    return 0;
}
开发者ID:TemplarsCreed,项目名称:Luma3DS,代码行数:28,代码来源:minisoc.c


示例3: soc_close

static int
soc_close(struct _reent *r,
          int           fd)
{
	Handle sockfd = *(Handle*)fd;

	int ret = 0;
	u32 *cmdbuf = getThreadCommandBuffer();

	cmdbuf[0] = IPC_MakeHeader(0xB,1,2); // 0xB0042
	cmdbuf[1] = (u32)sockfd;
	cmdbuf[2] = IPC_Desc_CurProcessHandle();

	ret = svcSendSyncRequest(SOCU_handle);
	if(ret != 0) {
		errno = SYNC_ERROR;
		return ret;
	}

	ret = (int)cmdbuf[1];
	if(ret == 0)
		ret =_net_convert_error(cmdbuf[2]);

	if(ret < 0) {
		errno = -ret;
		return -1;
	}

	return 0;
}
开发者ID:vtsingaras,项目名称:ctrulib,代码行数:30,代码来源:soc_init.c


示例4: PS_EncryptDecryptAes

Result PS_EncryptDecryptAes(u32 size, u8* in, u8* out, PS_AESAlgorithm aes_algo, PS_AESKeyType key_type, u8* iv)
{
	Result ret = 0;
	u32 *cmdbuf = getThreadCommandBuffer();

	u32 *_iv = (u32*)iv;

	cmdbuf[0] = IPC_MakeHeader(0x4,7,4); // 0x401C4
	cmdbuf[1] = size;
	cmdbuf[2] = _iv[0];
	cmdbuf[3] = _iv[1];
	cmdbuf[4] = _iv[2];
	cmdbuf[5] = _iv[3];
	cmdbuf[6] = aes_algo;
	cmdbuf[7] = key_type;
	cmdbuf[8] = IPC_Desc_PXIBuffer(size,0,false);
	cmdbuf[9] = (u32)in;
	cmdbuf[10] = IPC_Desc_PXIBuffer(size,1,false);
	cmdbuf[11] = (u32)out;

	if(R_FAILED(ret = svcSendSyncRequest(psHandle)))return ret;

	_iv[0] = cmdbuf[2] & 0xFF;
	_iv[1] = cmdbuf[3] & 0xFF;
	_iv[2] = cmdbuf[4] & 0xFF;
	_iv[3] = cmdbuf[5] & 0xFF;

	return (Result)cmdbuf[1];
}
开发者ID:Bownairo,项目名称:ctrulib,代码行数:29,代码来源:ps.c


示例5: udsGetApplicationData

Result udsGetApplicationData(void *buf, size_t size, size_t *actual_size)
{
	u32* cmdbuf=getThreadCommandBuffer();
	u32 saved_threadstorage[2];

	cmdbuf[0]=IPC_MakeHeader(0x11,1,0); // 0x110040
	cmdbuf[1]=size;

	u32 * staticbufs = getThreadStaticBuffers();
	saved_threadstorage[0] = staticbufs[0];
	saved_threadstorage[1] = staticbufs[1];

	staticbufs[0] = IPC_Desc_StaticBuffer(size,0);
	staticbufs[1] = (u32)buf;

	Result ret=0;
	ret=svcSendSyncRequest(__uds_servhandle);

	staticbufs[0] = saved_threadstorage[0];
	staticbufs[1] = saved_threadstorage[1];

	if(R_FAILED(ret))return ret;

	ret = cmdbuf[1];

	if(R_SUCCEEDED(ret))
	{
		if(actual_size)*actual_size = cmdbuf[2];
	}

	return ret;
}
开发者ID:Caboosium,项目名称:ctrulib,代码行数:32,代码来源:uds.c


示例6: udsipc_DecryptBeaconData

static Result udsipc_DecryptBeaconData(udsNetworkStruct *network, u8 *tag0, u8 *tag1, udsNodeInfo *out)
{
	u32* cmdbuf=getThreadCommandBuffer();
	u32 tagsize = 0xfe;

	u32 saved_threadstorage[2];

	cmdbuf[0]=IPC_MakeHeader(0x1F,0,6); // 0x1F0006
	cmdbuf[1]=IPC_Desc_StaticBuffer(sizeof(udsNetworkStruct), 1);
	cmdbuf[2]=(u32)network;
	cmdbuf[3]=IPC_Desc_StaticBuffer(tagsize, 2);
	cmdbuf[4]=(u32)tag0;
	cmdbuf[5]=IPC_Desc_StaticBuffer(tagsize, 3);
	cmdbuf[6]=(u32)tag1;

	u32 * staticbufs = getThreadStaticBuffers();
	saved_threadstorage[0] = staticbufs[0];
	saved_threadstorage[1] = staticbufs[1];

	staticbufs[0] = IPC_Desc_StaticBuffer(0x280,0);
	staticbufs[1] = (u32)out;

	Result ret=0;
	ret=svcSendSyncRequest(__uds_servhandle);

	staticbufs[0] = saved_threadstorage[0];
	staticbufs[1] = saved_threadstorage[1];

	if(R_FAILED(ret))return ret;

	return cmdbuf[1];
}
开发者ID:Caboosium,项目名称:ctrulib,代码行数:32,代码来源:uds.c


示例7: sockatmark

int sockatmark(int sockfd)
{
	int ret = 0;
	u32 *cmdbuf = getThreadCommandBuffer();

	sockfd = soc_get_fd(sockfd);
	if(sockfd < 0) {
		errno = -sockfd;
		return -1;
	}

	cmdbuf[0] = IPC_MakeHeader(0x15,1,2); // 0x150042
	cmdbuf[1] = (u32)sockfd;
	cmdbuf[2] = IPC_Desc_CurProcessHandle();

	ret = svcSendSyncRequest(SOCU_handle);
	if(ret != 0) {
		errno = SYNC_ERROR;
		return -1;
	}

	ret = (int)cmdbuf[1];
	if(ret == 0)
		ret = _net_convert_error(cmdbuf[2]);

	if(ret < 0) {
		errno = -ret;
		return -1;
	}

	return ret;
}
开发者ID:Bownairo,项目名称:ctrulib,代码行数:32,代码来源:soc_sockatmark.c


示例8: FSLDR_OpenFileDirectly

Result FSLDR_OpenFileDirectly(Handle* out, FS_Archive archive, FS_Path path, u32 openFlags, u32 attributes)
{
  u32 *cmdbuf = getThreadCommandBuffer();

  cmdbuf[0] = IPC_MakeHeader(0x803,8,4); // 0x8030204
  cmdbuf[1] = 0;
  cmdbuf[2] = archive.id;
  cmdbuf[3] = archive.lowPath.type;
  cmdbuf[4] = archive.lowPath.size;
  cmdbuf[5] = path.type;
  cmdbuf[6] = path.size;
  cmdbuf[7] = openFlags;
  cmdbuf[8] = attributes;
  cmdbuf[9] = IPC_Desc_StaticBuffer(archive.lowPath.size, 2);
  cmdbuf[10] = (u32) archive.lowPath.data;
  cmdbuf[11] = IPC_Desc_StaticBuffer(path.size, 0);
  cmdbuf[12] = (u32) path.data;

  Result ret = 0;
  if(R_FAILED(ret = svcSendSyncRequest(fsldrHandle))) return ret;

  if(out) *out = cmdbuf[3];

  return cmdbuf[1];
}
开发者ID:Reisyukaku,项目名称:loader,代码行数:25,代码来源:fsldr.c


示例9: socSetsockopt

int socSetsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)
{
    int ret = 0;
    u32 *cmdbuf = getThreadCommandBuffer();

    cmdbuf[0] = IPC_MakeHeader(0x12,4,4); // 0x120104
    cmdbuf[1] = (u32)sockfd;
    cmdbuf[2] = (u32)level;
    cmdbuf[3] = (u32)optname;
    cmdbuf[4] = (u32)optlen;
    cmdbuf[5] = IPC_Desc_CurProcessHandle();
    cmdbuf[7] = IPC_Desc_StaticBuffer(optlen,9);
    cmdbuf[8] = (u32)optval;

    ret = svcSendSyncRequest(SOCU_handle);
    if(ret != 0) {
        return ret;
    }

    ret = (int)cmdbuf[1];
    if(ret == 0)
        ret = _net_convert_error(cmdbuf[2]);

    if(ret < 0) {
        //errno = -ret;
        return -1;
    }

    return ret;
}
开发者ID:TemplarsCreed,项目名称:Luma3DS,代码行数:30,代码来源:minisoc.c


示例10: APT_ReceiveDeliverArg_

Result APT_ReceiveDeliverArg_(void* param, size_t param_size, void* hmac, size_t hmac_size, u64* source_pid, bool* received)
{
	u32 cmdbuf[16];
	cmdbuf[0]=IPC_MakeHeader(0x35,2,0);
	cmdbuf[1]=param_size;
	cmdbuf[2]=hmac_size;

	u32 saved_threadstorage[4];
	u32* staticbufs = getThreadStaticBuffers();
   saved_threadstorage[0]=staticbufs[0];
	saved_threadstorage[1]=staticbufs[1];
   saved_threadstorage[2]=staticbufs[2];
	saved_threadstorage[3]=staticbufs[3];
   staticbufs[0]=IPC_Desc_StaticBuffer(param_size, 0);
	staticbufs[1]=(u32)param;
   staticbufs[2]=IPC_Desc_StaticBuffer(hmac_size, 2);
	staticbufs[3]=(u32)hmac;

	Result ret = aptSendCommand(cmdbuf);
   staticbufs[0]=saved_threadstorage[0];
	staticbufs[1]=saved_threadstorage[1];
   staticbufs[2]=saved_threadstorage[2];
	staticbufs[3]=saved_threadstorage[3];

   if(R_FAILED(ret))
      return ret;

   if(source_pid)
      *source_pid = ((u64*)cmdbuf)[1];
   if(received)
      *received = ((bool*)cmdbuf)[16];

	return cmdbuf[1];
}
开发者ID:DSkywalk,项目名称:RetroArch,代码行数:34,代码来源:ctr_system.c


示例11: APT_AppletUtility

Result APT_AppletUtility(u32* out, u32 a, u32 size1, u8* buf1, u32 size2, u8* buf2)
{
	u32 saved_threadstorage[2];
	
	u32* cmdbuf=getThreadCommandBuffer();
	cmdbuf[0]=IPC_MakeHeader(0x4B,3,2); // 0x4B00C2
	cmdbuf[1]=a;
	cmdbuf[2]=size1;
	cmdbuf[3]=size2;
	cmdbuf[4]=IPC_Desc_StaticBuffer(size1,1);
	cmdbuf[5]=(u32)buf1;

	u32 *staticbufs = getThreadStaticBuffers();
	saved_threadstorage[0]=staticbufs[0];
	saved_threadstorage[1]=staticbufs[1];
	
	staticbufs[0]=IPC_Desc_StaticBuffer(size2,0);
	staticbufs[1]=(u32)buf2;
	
	Result ret=svcSendSyncRequest(aptuHandle);
	
	staticbufs[0]=saved_threadstorage[0];
	staticbufs[1]=saved_threadstorage[1];
	
	if(R_FAILED(ret))return ret;
	
	if(out)*out=cmdbuf[2];

	return cmdbuf[1];
}
开发者ID:botanyaki,项目名称:ctrulib,代码行数:30,代码来源:apt.c


示例12: CAMU_DriverFinalize

Result CAMU_DriverFinalize(void) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x3A,0,0); // 0x3A0000

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:8,代码来源:cam.c


示例13: CAMU_SetBrightnessSynchronization

Result CAMU_SetBrightnessSynchronization(bool brightnessSynchronization) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x3E,1,0); // 0x3E0040
	cmdbuf[1] = brightnessSynchronization;

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例14: Y2RU_DriverInitialize

Result Y2RU_DriverInitialize(void)
{
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x2B,0,0); // 0x2B0000

	if (R_FAILED(ret = svcSendSyncRequest(y2rHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Bownairo,项目名称:ctrulib,代码行数:9,代码来源:y2r.c


示例15: CAMU_SetStereoCameraCalibrationData

Result CAMU_SetStereoCameraCalibrationData(CAMU_StereoCameraCalibrationData data) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x2C,16,0); // 0x2C0400
	*(CAMU_StereoCameraCalibrationData*) cmdbuf[1] = data;

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例16: CAMU_GetSuitableY2rStandardCoefficient

Result CAMU_GetSuitableY2rStandardCoefficient(Y2RU_StandardCoefficient* coefficient) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x36,0,0); // 0x360000

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	*coefficient = (Y2RU_StandardCoefficient) cmdbuf[2];
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例17: CAMU_SetPackageParameterWithContextDetail

Result CAMU_SetPackageParameterWithContextDetail(CAMU_PackageParameterContextDetail param) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x35,7,0); // 0x3501C0
	*(CAMU_PackageParameterContextDetail*) cmdbuf[1] = param;

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例18: CAMU_SetPackageParameterWithoutContext

Result CAMU_SetPackageParameterWithoutContext(CAMU_PackageParameterCameraSelect param) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x33,11,0); // 0x3302C0
	*(CAMU_PackageParameterCameraSelect*) cmdbuf[1] = param;

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例19: CAMU_GetImageQualityCalibrationData

Result CAMU_GetImageQualityCalibrationData(CAMU_ImageQualityCalibrationData* data) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x32,0,0); // 0x320000

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	*data = *(CAMU_ImageQualityCalibrationData*) cmdbuf[2];
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c


示例20: CAMU_SetImageQualityCalibrationData

Result CAMU_SetImageQualityCalibrationData(CAMU_ImageQualityCalibrationData data) {
	Result ret = 0;
	u32* cmdbuf = getThreadCommandBuffer();
	cmdbuf[0] = IPC_MakeHeader(0x31,6,0); // 0x310180
	*(CAMU_ImageQualityCalibrationData*) cmdbuf[1] = data;

	if (R_FAILED(ret = svcSendSyncRequest(camHandle))) return ret;
	return cmdbuf[1];
}
开发者ID:Findus79,项目名称:ctrulib,代码行数:9,代码来源:cam.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IPC_TRACE函数代码示例发布时间:2022-05-30
下一篇:
C++ IPAddress函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap