|
|
b92a12 |
#ifndef _NT_AFL_H_
|
|
|
b92a12 |
#define _NT_AFL_H_
|
|
|
b92a12 |
|
|
|
b92a12 |
#include "nt_abi.h"
|
|
|
b92a12 |
#include "nt_object.h"
|
|
|
b92a12 |
|
|
|
b92a12 |
/* advisory file locking command bits */
|
|
|
b92a12 |
#define NT_AFL_CMD_LOCK_NONE (0x0000)
|
|
|
b92a12 |
#define NT_AFL_CMD_LOCK_READ (0x0001)
|
|
|
b92a12 |
#define NT_AFL_CMD_LOCK_WRITE (0x0002)
|
|
|
b92a12 |
#define NT_AFL_CMD_LOCK_PROBE (0x0400)
|
|
|
b92a12 |
#define NT_AFL_CMD_LOCK_NOWAIT (0x0800)
|
|
|
b92a12 |
|
|
|
b92a12 |
/* advisory file locking info info */
|
|
|
b92a12 |
typedef struct __attr_ptr_size_aligned__ _nt_afl_info {
|
|
|
b92a12 |
void * hport;
|
|
|
b92a12 |
void * hevent;
|
|
|
b92a12 |
void * apc_routine;
|
|
|
b92a12 |
void * apc_context;
|
|
|
b92a12 |
nt_guid afldev;
|
|
|
b92a12 |
void * l_hfile;
|
|
|
b92a12 |
int64_t l_fileid;
|
|
|
b92a12 |
int64_t l_start;
|
|
|
b92a12 |
int64_t l_len;
|
|
|
b92a12 |
int32_t l_pid;
|
|
|
b92a12 |
uint32_t l_cmd;
|
|
|
b92a12 |
nt_iosb ntiosb;
|
|
|
b92a12 |
nt_iosb * riosb;
|
|
|
b92a12 |
} nt_afl_info;
|
|
|
b92a12 |
|
|
|
b92a12 |
/* advisory file locking operation */
|
|
|
b92a12 |
typedef struct __attr_ptr_size_aligned__ _nt_afl_op {
|
|
|
b92a12 |
void * l_hfile;
|
|
|
b92a12 |
int64_t l_fileid;
|
|
|
b92a12 |
int64_t l_start;
|
|
|
b92a12 |
int64_t l_len;
|
|
|
b92a12 |
uint32_t l_pid;
|
|
|
b92a12 |
uint32_t l_cmd;
|
|
|
b92a12 |
} nt_afl_op;
|
|
|
b92a12 |
|
|
|
b92a12 |
/* advisory file locking client interfaces */
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_create(
|
|
|
b92a12 |
__in void * hport,
|
|
|
b92a12 |
__out nt_afl_info * afl,
|
|
|
b92a12 |
__in nt_oa * oa,
|
|
|
b92a12 |
__out nt_iosb * iosb);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_open(
|
|
|
b92a12 |
__in void * hport,
|
|
|
b92a12 |
__out nt_afl_info * afl,
|
|
|
b92a12 |
__in nt_oa * oa,
|
|
|
b92a12 |
__out nt_iosb * iosb);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_fcntl(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__in void * hevent __optional,
|
|
|
b92a12 |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
b92a12 |
__in void * apc_context __optional,
|
|
|
b92a12 |
__out nt_iosb * iosb,
|
|
|
b92a12 |
__in uint32_t afl_control_code,
|
|
|
b92a12 |
__in void * input_buffer __optional,
|
|
|
b92a12 |
__in uint32_t input_buffer_length,
|
|
|
b92a12 |
__out void * output_buffer __optional,
|
|
|
b92a12 |
__in uint32_t output_buffer_length);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_ioctl(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__in void * hevent __optional,
|
|
|
b92a12 |
__in nt_io_apc_routine * apc_routine __optional,
|
|
|
b92a12 |
__in void * apc_context __optional,
|
|
|
b92a12 |
__out nt_iosb * iosb,
|
|
|
b92a12 |
__in uint32_t afl_control_code,
|
|
|
b92a12 |
__in void * input_buffer __optional,
|
|
|
b92a12 |
__in uint32_t input_buffer_length,
|
|
|
b92a12 |
__out void * output_buffer __optional,
|
|
|
b92a12 |
__in uint32_t output_buffer_length);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_query(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__out nt_io_status_block * iosb,
|
|
|
b92a12 |
__out void * afl_info,
|
|
|
b92a12 |
__in uint32_t afl_info_length,
|
|
|
b92a12 |
__in int32_t afl_ctl_cmd);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_set(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__out nt_io_status_block * iosb,
|
|
|
b92a12 |
__in void * afl_info,
|
|
|
b92a12 |
__in uint32_t afl_info_length,
|
|
|
b92a12 |
__in int32_t afl_ctl_cmd);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_cancel(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__out nt_iosb * iosb);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
typedef int32_t __stdcall ntapi_afl_free(
|
|
|
b92a12 |
__in nt_afl_info * afl,
|
|
|
b92a12 |
__out nt_iosb * iosb);
|
|
|
b92a12 |
|
|
|
b92a12 |
|
|
|
b92a12 |
#endif
|