summaryrefslogtreecommitdiffhomepage
path: root/src/ipc
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-05-04 20:26:39 +0000
committermidipix <writeonce@midipix.org>2018-05-07 01:27:03 -0400
commitb92a12fc14551f51f02a68fdf6c0265a758f1c15 (patch)
tree39647c9e41f6fa6cc40f480ce3d129e1b744802e /src/ipc
parent0e25b018afe1d358f8734205c2b42e1eb045ccb6 (diff)
downloadntapi-b92a12fc14551f51f02a68fdf6c0265a758f1c15.tar.bz2
ntapi-b92a12fc14551f51f02a68fdf6c0265a758f1c15.tar.xz
subsystem interfaces: integrated advisory file locking definitions.
Diffstat (limited to 'src/ipc')
-rw-r--r--src/ipc/ntapi_ipc_connect.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/ipc/ntapi_ipc_connect.c b/src/ipc/ntapi_ipc_connect.c
index fc05efb..8b2e4a0 100644
--- a/src/ipc/ntapi_ipc_connect.c
+++ b/src/ipc/ntapi_ipc_connect.c
@@ -116,6 +116,54 @@ static void __ipc_init_ctrl_msg_msqsvc(
}
+static void __ipc_init_ctrl_msg_aflctl(
+ const nt_port_attr * attr,
+ nt_tty_ipc_msg * msg)
+{
+ __ntapi->tt_aligned_block_memset(
+ (uintptr_t *)msg,
+ 0,sizeof(*msg));
+
+ msg->data.ipcinfo.ctrlsvc.type = attr->type;
+ msg->data.ipcinfo.ctrlsvc.subtype = attr->subtype;
+
+ msg->data.ipcinfo.ctrlsvc.keys.key[0] = attr->keys.key[0];
+ msg->data.ipcinfo.ctrlsvc.keys.key[1] = attr->keys.key[1];
+ msg->data.ipcinfo.ctrlsvc.keys.key[2] = attr->keys.key[2];
+ msg->data.ipcinfo.ctrlsvc.keys.key[3] = attr->keys.key[3];
+ msg->data.ipcinfo.ctrlsvc.keys.key[4] = attr->keys.key[4];
+ msg->data.ipcinfo.ctrlsvc.keys.key[5] = attr->keys.key[5];
+
+ __ntapi->tt_guid_copy(
+ &msg->data.ipcinfo.ctrlsvc.guid,
+ &attr->guid);
+}
+
+
+static void __ipc_init_ctrl_msg_aflsvc(
+ nt_rtdata * rtdata,
+ nt_tty_ipc_msg * msg)
+{
+ __ntapi->tt_aligned_block_memset(
+ (uintptr_t *)msg,
+ 0,sizeof(*msg));
+
+ msg->data.ipcinfo.ctrlsvc.type = rtdata->aflctl_type;
+ msg->data.ipcinfo.ctrlsvc.subtype = rtdata->aflctl_subtype;
+
+ msg->data.ipcinfo.ctrlsvc.keys.key[0] = rtdata->aflctl_keys[0];
+ msg->data.ipcinfo.ctrlsvc.keys.key[1] = rtdata->aflctl_keys[1];
+ msg->data.ipcinfo.ctrlsvc.keys.key[2] = rtdata->aflctl_keys[2];
+ msg->data.ipcinfo.ctrlsvc.keys.key[3] = rtdata->aflctl_keys[3];
+ msg->data.ipcinfo.ctrlsvc.keys.key[4] = rtdata->aflctl_keys[4];
+ msg->data.ipcinfo.ctrlsvc.keys.key[5] = rtdata->aflctl_keys[5];
+
+ __ntapi->tt_guid_copy(
+ &msg->data.ipcinfo.ctrlsvc.guid,
+ &rtdata->aflctl_guid);
+}
+
+
static void __ipc_init_ctrl_msg_ipcpeer(
nt_rtdata * rtdata,
nt_tty_ipc_msg * msg)
@@ -192,6 +240,27 @@ static int32_t __ipc_set_client_keys(
opcode = NT_TTY_MSQ_FCNTL;
break;
+ case NT_PORT_TYPE_AFLCTL:
+ if (rtdata->srv_type == NT_PORT_TYPE_AFLSVC)
+ __ipc_init_ctrl_msg_ipcpeer(
+ rtdata,&msg);
+ else
+ __ipc_init_ctrl_msg_aflctl(
+ attr,&msg);
+
+ opcode = NT_TTY_AFL_FCNTL;
+ break;
+
+ case NT_PORT_TYPE_AFLSVC:
+ if (rtdata->srv_type == NT_PORT_TYPE_AFLCTL)
+ return NT_STATUS_SUCCESS;
+
+ __ipc_init_ctrl_msg_aflsvc(
+ rtdata,&msg);
+
+ opcode = NT_TTY_AFL_FCNTL;
+ break;
+
default:
return NT_STATUS_SUCCESS;
}