summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ntapi/nt_afl.h108
-rw-r--r--include/ntapi/nt_ipc.h8
-rw-r--r--include/ntapi/nt_port.h4
-rw-r--r--include/ntapi/nt_tty.h27
4 files changed, 146 insertions, 1 deletions
diff --git a/include/ntapi/nt_afl.h b/include/ntapi/nt_afl.h
new file mode 100644
index 0000000..995df26
--- /dev/null
+++ b/include/ntapi/nt_afl.h
@@ -0,0 +1,108 @@
+#ifndef _NT_AFL_H_
+#define _NT_AFL_H_
+
+#include "nt_abi.h"
+#include "nt_object.h"
+
+/* advisory file locking command bits */
+#define NT_AFL_CMD_LOCK_NONE (0x0000)
+#define NT_AFL_CMD_LOCK_READ (0x0001)
+#define NT_AFL_CMD_LOCK_WRITE (0x0002)
+#define NT_AFL_CMD_LOCK_PROBE (0x0400)
+#define NT_AFL_CMD_LOCK_NOWAIT (0x0800)
+
+/* advisory file locking info info */
+typedef struct __attr_ptr_size_aligned__ _nt_afl_info {
+ void * hport;
+ void * hevent;
+ void * apc_routine;
+ void * apc_context;
+ nt_guid afldev;
+ void * l_hfile;
+ int64_t l_fileid;
+ int64_t l_start;
+ int64_t l_len;
+ int32_t l_pid;
+ uint32_t l_cmd;
+ nt_iosb ntiosb;
+ nt_iosb * riosb;
+} nt_afl_info;
+
+/* advisory file locking operation */
+typedef struct __attr_ptr_size_aligned__ _nt_afl_op {
+ void * l_hfile;
+ int64_t l_fileid;
+ int64_t l_start;
+ int64_t l_len;
+ uint32_t l_pid;
+ uint32_t l_cmd;
+} nt_afl_op;
+
+/* advisory file locking client interfaces */
+typedef int32_t __stdcall ntapi_afl_create(
+ __in void * hport,
+ __out nt_afl_info * afl,
+ __in nt_oa * oa,
+ __out nt_iosb * iosb);
+
+
+typedef int32_t __stdcall ntapi_afl_open(
+ __in void * hport,
+ __out nt_afl_info * afl,
+ __in nt_oa * oa,
+ __out nt_iosb * iosb);
+
+
+typedef int32_t __stdcall ntapi_afl_fcntl(
+ __in nt_afl_info * afl,
+ __in void * hevent __optional,
+ __in nt_io_apc_routine * apc_routine __optional,
+ __in void * apc_context __optional,
+ __out nt_iosb * iosb,
+ __in uint32_t afl_control_code,
+ __in void * input_buffer __optional,
+ __in uint32_t input_buffer_length,
+ __out void * output_buffer __optional,
+ __in uint32_t output_buffer_length);
+
+
+typedef int32_t __stdcall ntapi_afl_ioctl(
+ __in nt_afl_info * afl,
+ __in void * hevent __optional,
+ __in nt_io_apc_routine * apc_routine __optional,
+ __in void * apc_context __optional,
+ __out nt_iosb * iosb,
+ __in uint32_t afl_control_code,
+ __in void * input_buffer __optional,
+ __in uint32_t input_buffer_length,
+ __out void * output_buffer __optional,
+ __in uint32_t output_buffer_length);
+
+
+typedef int32_t __stdcall ntapi_afl_query(
+ __in nt_afl_info * afl,
+ __out nt_io_status_block * iosb,
+ __out void * afl_info,
+ __in uint32_t afl_info_length,
+ __in int32_t afl_ctl_cmd);
+
+
+typedef int32_t __stdcall ntapi_afl_set(
+ __in nt_afl_info * afl,
+ __out nt_io_status_block * iosb,
+ __in void * afl_info,
+ __in uint32_t afl_info_length,
+ __in int32_t afl_ctl_cmd);
+
+
+typedef int32_t __stdcall ntapi_afl_cancel(
+ __in nt_afl_info * afl,
+ __out nt_iosb * iosb);
+
+
+typedef int32_t __stdcall ntapi_afl_free(
+ __in nt_afl_info * afl,
+ __out nt_iosb * iosb);
+
+
+#endif
diff --git a/include/ntapi/nt_ipc.h b/include/ntapi/nt_ipc.h
index 7d80296..9eab304 100644
--- a/include/ntapi/nt_ipc.h
+++ b/include/ntapi/nt_ipc.h
@@ -13,6 +13,10 @@
#define NT_IPC_GUID_MSQKEY {0x8f700621,0x45d2,0x4470,{0x82,0xe4,0xbc,0xad,0x06,0x71,0xb7,0x14}}
#define NT_IPC_GUID_MSQPID {0x3c6c2b5b,0x727f,0x4a2e,{0xb2,0x21,0xed,0xd2,0xe6,0xe7,0x80,0xdc}}
+#define NT_IPC_GUID_AFLCTL {0xf96dd87c,0x89b7,0x4f9f,{0x81,0x78,0x0f,0x03,0xdb,0x9d,0x2e,0x97}}
+#define NT_IPC_GUID_AFLDEV {0xa7a098f4,0xda85,0x4bb1,{0xba,0xa4,0x78,0x13,0x71,0x65,0x4c,0x18}}
+#define NT_IPC_GUID_AFLPID {0xa50a4f60,0x1f4e,0x4963,{0x9b,0x2f,0xbf,0x39,0x23,0xbc,0x35,0x68}}
+
#define NT_IPC_GUID_SHMCTL {0xb6103154,0xa110,0x427e,{0x81,0x87,0x98,0xa3,0xd5,0xba,0x48,0x5a}}
#define NT_IPC_GUID_SHMKEY {0xf0581270,0xcb8d,0x46e0,{0x8f,0x4f,0x03,0xfe,0x17,0xa4,0x08,0xd5}}
#define NT_IPC_GUID_TMPFSL {0x63e12727,0x1653,0x402e,{0x84,0x9d,0x35,0x8d,0x01,0xcf,0x43,0xf4}}
@@ -27,6 +31,10 @@
#define NT_IPC_OBJDIR_PREFIX_MSQKEY {'m','s','q','k','e','y'}
#define NT_IPC_OBJDIR_PREFIX_MSQPID {'m','s','q','p','i','d'}
+#define NT_IPC_OBJDIR_PREFIX_AFLCTL {'a','f','l','c','t','l'}
+#define NT_IPC_OBJDIR_PREFIX_AFLDEV {'a','f','l','d','e','v'}
+#define NT_IPC_OBJDIR_PREFIX_AFLPID {'a','f','l','p','i','d'}
+
#define NT_IPC_OBJDIR_PREFIX_SHMCTL {'s','h','m','c','t','l'}
#define NT_IPC_OBJDIR_PREFIX_SHMKEY {'s','h','m','k','e','y'}
#define NT_IPC_OBJDIR_PREFIX_TMPFSL {'t','m','p','f','s','l'}
diff --git a/include/ntapi/nt_port.h b/include/ntapi/nt_port.h
index 3e4b293..ff1cdb9 100644
--- a/include/ntapi/nt_port.h
+++ b/include/ntapi/nt_port.h
@@ -39,6 +39,8 @@ typedef enum _nt_port_type {
NT_PORT_TYPE_SEMSVC, /* {'s','e','m','s','v','c'} */
NT_PORT_TYPE_MSQCTL, /* {'m','s','q','c','t','l'} */
NT_PORT_TYPE_MSQSVC, /* {'m','s','q','s','v','c'} */
+ NT_PORT_TYPE_AFLCTL, /* {'a','f','l','c','t','l'} */
+ NT_PORT_TYPE_AFLSVC, /* {'a','f','l','s','v','c'} */
NT_PORT_TYPE_CAP
} nt_port_type;
@@ -67,6 +69,8 @@ typedef enum _nt_port_subtype {
#define NT_PORT_GUID_SEMSVC {0xa50f4380,0x854a,0x4260,{0x9d,0x8d,0xc2,0xc2,0xa1,0x16,0xde,0xf3}}
#define NT_PORT_GUID_MSQCTL {0xd2a8c20a,0x0e4b,0x4a7b,{0xb2,0x3a,0x86,0xa4,0x3b,0x87,0x9a,0x26}}
#define NT_PORT_GUID_MSQSVC {0x3e443cd7,0xdd08,0x4133,{0x9c,0x92,0x02,0x5d,0x9e,0xbd,0x3a,0xcd}}
+#define NT_PORT_GUID_AFLCTL {0xb76ce06d,0x60c6,0x4404,{0xa8,0x31,0xc1,0x82,0xea,0xb8,0x1d,0xa2}}
+#define NT_PORT_GUID_AFLSVC {0xdb346154,0xa096,0x450d,{0x80,0xb7,0x33,0x97,0x73,0xde,0xf4,0xbd}}
/* lpc messages */
diff --git a/include/ntapi/nt_tty.h b/include/ntapi/nt_tty.h
index 3ad46c7..07797d4 100644
--- a/include/ntapi/nt_tty.h
+++ b/include/ntapi/nt_tty.h
@@ -17,6 +17,7 @@
#include "nt_termios.h"
#include "nt_sem.h"
#include "nt_msq.h"
+#include "nt_afl.h"
/* tty affiliation */
typedef struct _nt_tty_affiliation {
@@ -67,7 +68,7 @@ typedef enum _nt_tty_opcode {
NT_TTY_QUERY_INFORMATION_PTY,
NT_TTY_QUERY_INFORMATION_SEMAPHORE,
NT_TTY_QUERY_INFORMATION_MSGQUEUE,
- NT_TTY_QUERY_INFORMATION_RESERVED,
+ NT_TTY_QUERY_INFORMATION_AFLOCK,
/* peer daemon calls */
NT_TTY_REQUEST_PEER,
NT_TTY_SIGNAL_PEER,
@@ -110,6 +111,19 @@ typedef enum _nt_tty_opcode {
NT_TTY_MSQ_TRACE,
NT_TTY_MSQ_TRANSFER,
NT_TTY_MSQ_WAIT,
+ /* aflock */
+ NT_TTY_AFL_ALLOC,
+ NT_TTY_AFL_FREE,
+ NT_TTY_AFL_OPEN,
+ NT_TTY_AFL_CLOSE,
+ NT_TTY_AFL_QUERY,
+ NT_TTY_AFL_SET,
+ NT_TTY_AFL_FCNTL,
+ NT_TTY_AFL_IOCTL,
+ NT_TTY_AFL_CANCEL,
+ NT_TTY_AFL_TRACE,
+ NT_TTY_AFL_TRANSFER,
+ NT_TTY_AFL_WAIT,
/* virtual mount system */
NT_TTY_VMS_QUERY,
NT_TTY_VMS_REQUEST,
@@ -139,6 +153,7 @@ typedef enum _nt_tty_server_info_class {
NT_TTY_SERVER_DBG_SLOT_INFORMATION,
NT_TTY_SERVER_SEM_SLOT_INFORMATION,
NT_TTY_SERVER_MSQ_SLOT_INFORMATION,
+ NT_TTY_SERVER_AFL_SLOT_INFORMATION,
NT_TTY_SERVER_INFORMATION_CAP
} nt_tty_server_info_class;
@@ -464,6 +479,15 @@ typedef struct __attr_ptr_size_aligned__ _nt_msq_info_msg {
} nt_msq_info_msg;
+typedef struct __attr_ptr_size_aligned__ _nt_afl_info_msg {
+ nt_port_message header;
+ struct {
+ nt_tty_msg_info ttyinfo;
+ nt_afl_info aflinfo;
+ } data;
+} nt_afl_info_msg;
+
+
typedef struct __attr_ptr_size_aligned__ _nt_tty_session_msg {
nt_port_message header;
struct {
@@ -493,6 +517,7 @@ typedef struct __attr_ptr_size_aligned__ _nt_tty_port_msg {
nt_tty_section_info secinfo;
nt_sem_info seminfo;
nt_msq_info msqinfo;
+ nt_afl_info aflinfo;
};
} nt_tty_port_msg;