diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ipc/ntapi_ipc_connect.c | 69 | ||||
-rw-r--r-- | src/port/ntapi_port_name_helper.c | 8 |
2 files changed, 75 insertions, 2 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; } diff --git a/src/port/ntapi_port_name_helper.c b/src/port/ntapi_port_name_helper.c index b4f0065..e71b873 100644 --- a/src/port/ntapi_port_name_helper.c +++ b/src/port/ntapi_port_name_helper.c @@ -23,7 +23,9 @@ static const __port_service_prefix __port_service_prefixes[NT_PORT_TYPE_CAP][NT_ {{'s','e','m','c','t','l'}}, {{'s','e','m','s','v','c'}}, {{'m','s','q','c','t','l'}}, - {{'m','s','q','s','v','c'}}}; + {{'m','s','q','s','v','c'}}, + {{'a','f','l','c','t','l'}}, + {{'a','f','l','s','v','c'}}}; static const nt_guid __port_guids[NT_PORT_TYPE_CAP][NT_PORT_SUBTYPE_CAP] = { {NT_PORT_GUID_DEFAULT}, @@ -35,7 +37,9 @@ static const nt_guid __port_guids[NT_PORT_TYPE_CAP][NT_PORT_SUBTYPE_CAP] = { {NT_PORT_GUID_SEMCTL}, {NT_PORT_GUID_SEMSVC}, {NT_PORT_GUID_MSQCTL}, - {NT_PORT_GUID_MSQSVC}}; + {NT_PORT_GUID_MSQSVC}, + {NT_PORT_GUID_AFLCTL}, + {NT_PORT_GUID_AFLSVC}}; int32_t __stdcall __ntapi_tt_port_guid_from_type( __out nt_guid * guid, |