MobiCoreDriverCmd.h revision 4e9e8c9c0169b40318386436d762c3d73cf4c328
14e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park/** @addtogroup MCD_MCDIMPL_DAEMON 24e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * @{ 34e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * @file 44e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 54e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * <!-- Copyright Giesecke & Devrient GmbH 2009 - 2012 --> 64e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 74e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * Redistribution and use in source and binary forms, with or without 84e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * modification, are permitted provided that the following conditions 94e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * are met: 104e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 1. Redistributions of source code must retain the above copyright 114e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * notice, this list of conditions and the following disclaimer. 124e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 2. Redistributions in binary form must reproduce the above copyright 134e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * notice, this list of conditions and the following disclaimer in the 144e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * documentation and/or other materials provided with the distribution. 154e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 3. The name of the author may not be used to endorse or promote 164e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * products derived from this software without specific prior 174e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * written permission. 184e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * 194e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 204e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 214e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 224e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 234e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 244e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 254e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 264e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 274e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 284e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 294e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 304e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park */ 314e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#ifndef MCDAEMON_H_ 324e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#define MCDAEMON_H_ 334e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 344e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#include <inttypes.h> // ANSI C99 354e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 364e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 374e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#define SOCK_PATH "#mcdaemon" 384e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#include "mcUuid.h" 394e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#include "mcVersionInfo.h" 404e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 414e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef enum { 424e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_PING = 0, 434e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_GET_INFO = 1, 444e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_OPEN_DEVICE = 2, 454e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_CLOSE_DEVICE = 3, 464e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_NQ_CONNECT = 4, 474e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_OPEN_SESSION = 5, 484e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_CLOSE_SESSION = 6, 494e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_NOTIFY = 7, 504e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_MAP_BULK_BUF = 8, 514e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_UNMAP_BULK_BUF = 9, 524e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_GET_VERSION = 10, 534e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_CMD_GET_MOBICORE_VERSION = 11, 544e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmd_t; 554e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 564e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 574e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef enum { 584e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_OK = 0, 594e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_FAILED = 1, 604e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_DEVICE_NOT_OPENED = 2, 614e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_DEVICE_ALREADY_OPENED = 3, 624e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_COMMAND_NOT_ALLOWED = 4, 634e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_INVALID_DEVICE_NAME = 5, 644e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_MAP_BULK_ERRO = 6, 654e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_TRUSTLET_NOT_FOUND = 7, 664e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_PAYLOAD_LENGTH_ERROR = 8, 674e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_WRONG_PUBLIC_KEY = 9, /**< System Trustlet public key is wrong. */ 684e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_CONTAINER_TYPE_MISMATCH = 10, /**< Wrong containter type(s). */ 694e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_CONTAINER_LOCKED = 11, /**< Container is locked (or not activated). */ 704e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_SP_NO_CHILD = 12, /**< SPID is not registered with root container. */ 714e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_TL_NO_CHILD = 13, /**< UUID is not registered with sp container. */ 724e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_UNWRAP_ROOT_FAILED = 14, /**< Unwrapping of root container failed. */ 734e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_UNWRAP_SP_FAILED = 15, /**< Unwrapping of service provider container failed. */ 744e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park MC_DRV_RSP_UNWRAP_TRUSTLET_FAILED = 16, /**< Unwrapping of Trustlet container failed. */ 754e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRsp_t; 764e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 774e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 784e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 794e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t commandId; 804e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCommandHeader_t, *mcDrvCommandHeader_ptr; 814e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 824e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 834e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t responseId; 844e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvResponseHeader_t, *mcDrvResponseHeader_ptr; 854e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 864e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#define MC_DEVICE_ID_DEFAULT 0 /**< The default device ID */ 874e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 884e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 894e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 904e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 914e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceId; 924e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdOpenDevicePayload_t, *mcDrvCmdOpenDevicePayload_ptr; 934e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 944e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 954e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 964e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdOpenDevicePayload_t payload; 974e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdOpenDevice_t, *mcDrvCmdOpenDevice_ptr; 984e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 994e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1004e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1014e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // empty 1024e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspOpenDevicePayload_t, *mcDrvRspOpenDevicePayload_ptr; 1034e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1044e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1054e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 1064e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspOpenDevicePayload_t payload; 1074e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspOpenDevice_t, *mcDrvRspOpenDevice_ptr; 1084e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1094e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1104e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 1114e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1124e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 1134e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // no payload here because close has none. 1144e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // If we use an empty struct, C++ will count it as 4 bytes. 1154e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // This will write too much into the socket at write(cmd,sizeof(cmd)) 1164e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdCloseDevice_t, *mcDrvCmdCloseDevice_ptr; 1174e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1184e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1194e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1204e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // empty 1214e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspCloseDevicePayload_t, *mcDrvRspCloseDevicePayload_ptr; 1224e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1234e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1244e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 1254e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspCloseDevicePayload_t payload; 1264e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspCloseDevice_t, *mcDrvRspCloseDevice_ptr; 1274e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1284e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1294e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 1304e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1314e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceId; 1324e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcUuid_t uuid; 1334e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t tci; 1344e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t len; 1354e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdOpenSessionPayload_t, *mcDrvCmdOpenSessionPayload_ptr; 1364e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1374e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1384e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 1394e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdOpenSessionPayload_t payload; 1404e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdOpenSession_t, *mcDrvCmdOpenSession_ptr; 1414e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1424e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1434e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1444e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceId; 1454e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 1464e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceSessionId; 1474e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t mcResult; 1484e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionMagic; 1494e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspOpenSessionPayload_t, *mcDrvRspOpenSessionPayload_ptr; 1504e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1514e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1524e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 1534e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspOpenSessionPayload_t payload; 1544e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspOpenSession_t, *mcDrvRspOpenSession_ptr; 1554e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1564e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1574e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 1584e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1594e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 1604e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdCloseSessionPayload_t, *mcDrvCmdCloseSessionPayload_ptr; 1614e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1624e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1634e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 1644e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdCloseSessionPayload_t payload; 1654e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdCloseSession_t, *mcDrvCmdCloseSession_ptr; 1664e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1674e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1684e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1694e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // empty 1704e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspCloseSessionPayload_t, *mcDrvRspCloseSessionPayload_ptr; 1714e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1724e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1734e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 1744e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspCloseSessionPayload_t payload; 1754e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspCloseSession_t, *mcDrvRspCloseSession_ptr; 1764e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1774e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1784e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 1794e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1804e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 1814e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdNotifyPayload_t, *mcDrvCmdNotifyPayload_ptr; 1824e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1834e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1844e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 1854e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdNotifyPayload_t payload; 1864e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdNotify_t, *mcDrvCmdNotify_ptr; 1874e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1884e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1894e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1904e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // empty 1914e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspNotifyPayload_t, *mcDrvRspNotifyPayload_ptr; 1924e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1934e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 1944e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 1954e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspNotifyPayload_t payload; 1964e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspNotify_t, *mcDrvRspNotify_ptr; 1974e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1984e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 1994e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 2004e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2014e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 2024e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t pAddrL2; 2034e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t offsetPayload; 2044e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t lenBulkMem; 2054e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdMapBulkMemPayload_t, *mcDrvCmdMapBulkMemPayload_ptr; 2064e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2074e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2084e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 2094e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdMapBulkMemPayload_t payload; 2104e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdMapBulkMem_t, *mcDrvCmdMapBulkMem_ptr; 2114e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2124e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2134e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2144e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 2154e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t secureVirtualAdr; 2164e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t mcResult; 2174e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspMapBulkMemPayload_t, *mcDrvRspMapBulkMemPayload_ptr; 2184e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2194e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2204e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 2214e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspMapBulkMemPayload_t payload; 2224e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspMapBulkMem_t, *mcDrvRspMapBulkMem_ptr; 2234e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2244e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2254e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 2264e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2274e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 2284e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t secureVirtualAdr; 2294e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t lenBulkMem; 2304e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdUnmapBulkMemPayload_t, *mcDrvCmdUnmapBulkMemPayload_ptr; 2314e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2324e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2334e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 2344e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdUnmapBulkMemPayload_t payload; 2354e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdUnmapBulkMem_t, *mcDrvCmdUnmapBulkMem_ptr; 2364e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2374e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2384e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2394e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t responseId; 2404e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 2414e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t mcResult; 2424e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspUnmapBulkMemPayload_t, *mcDrvRspUnmapBulkMemPayload_ptr; 2434e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2444e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2454e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 2464e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspUnmapBulkMemPayload_t payload; 2474e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspUnmapBulkMem_t, *mcDrvRspUnmapBulkMem_ptr; 2484e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2494e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2504e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 2514e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2524e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceId; 2534e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionId; 2544e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t deviceSessionId; 2554e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t sessionMagic; //Random data 2564e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdNqConnectPayload_t, *mcDrvCmdNqConnectPayload_ptr; 2574e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2584e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2594e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 2604e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdNqConnectPayload_t payload; 2614e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdNqConnect_t, *mcDrvCmdNqConnect_ptr; 2624e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2634e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2644e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2654e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park // empty; 2664e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspNqConnectPayload_t, *mcDrvRspNqConnectPayload_ptr; 2674e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2684e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2694e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 2704e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspNqConnectPayload_t payload; 2714e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspNqConnect_t, *mcDrvRspNqConnect_ptr; 2724e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2734e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 2744e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2754e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 2764e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdGetVersion_t, *mcDrvCmdGetVersion_ptr; 2774e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2784e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2794e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2804e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t version; 2814e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspGetVersionPayload_t, *mcDrvRspGetVersionPayload_ptr; 2824e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2834e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 2844e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 2854e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspGetVersionPayload_t payload; 2864e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspGetVersion_t, mcDrvRspGetVersion_ptr; 2874e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2884e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 2894e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2904e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 2914e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCmdGetMobiCoreVersion_t, *mcDrvCmdGetMobiCoreVersion_ptr; 2924e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2934e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2944e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct { 2954e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park uint32_t mcResult; 2964e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcVersionInfo_t versionInfo; 2974e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspGetMobiCoreVersionPayload_t, *mcDrvRspGetMobiCoreVersionPayload_ptr; 2984e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 2994e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef struct{ 3004e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 3014e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspGetMobiCoreVersionPayload_t payload; 3024e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvRspGetMobiCoreVersion_t, mcDrvRspGetMobiCoreVersion_ptr; 3034e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 3044e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park//-------------------------------------------------------------- 3054e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef union { 3064e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCommandHeader_t header; 3074e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdOpenDevice_t mcDrvCmdOpenDevice; 3084e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdCloseDevice_t mcDrvCmdCloseDevice; 3094e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdOpenSession_t mcDrvCmdOpenSession; 3104e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdCloseSession_t mcDrvCmdCloseSession; 3114e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdNqConnect_t mcDrvCmdNqConnect; 3124e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdNotify_t mcDrvCmdNotify; 3134e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdMapBulkMem_t mcDrvCmdMapBulkMem; 3144e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdUnmapBulkMem_t mcDrvCmdUnmapBulkMem; 3154e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdGetVersion_t mcDrvCmdGetVersion; 3164e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvCmdGetMobiCoreVersion_t mcDrvCmdGetMobiCoreVersion; 3174e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvCommand_t, *mcDrvCommand_ptr; 3184e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 3194e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Parktypedef union { 3204e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvResponseHeader_t header; 3214e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspOpenDevice_t mcDrvRspOpenDevice; 3224e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspCloseDevice_t mcDrvRspCloseDevice; 3234e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspOpenSession_t mcDrvRspOpenSession; 3244e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspCloseSession_t mcDrvRspCloseSession; 3254e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspNqConnect_t mcDrvRspNqConnect; 3264e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspNotify_t mcDrvRspNotify; 3274e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspMapBulkMem_t mcDrvRspMapBulkMem; 3284e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspUnmapBulkMem_t mcDrvRspUnmapBulkMem; 3294e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspGetVersion_t mcDrvRspGetVersion; 3304e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park mcDrvRspGetMobiCoreVersion_t mcDrvRspGetMobiCoreVersion; 3314e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park} mcDrvResponse_t, *mcDrvResponse_ptr; 3324e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 3334e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park#endif /* MCDAEMON_H_ */ 3344e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park 3354e9e8c9c0169b40318386436d762c3d73cf4c328DongJin Park/** @} */ 336