Blame include/ntapi/nt_symlink.h

45c7e6
#ifndef _NT_SYMLINK_H_
45c7e6
#define _NT_SYMLINK_H_
45c7e6
414ad3
#include "nt_abi.h"
414ad3
#include "nt_compiler.h"
45c7e6
#include "nt_object.h"
643bab
#include "nt_port.h"
45c7e6
45c7e6
typedef enum _nt_symlinkd_opcode {
45c7e6
	NT_SYMLINKD_OPCODE_BASE	=  0x200000,
45c7e6
	/* primary connection */
45c7e6
	NT_SYMLINKD_CONNECT	= NT_SYMLINKD_OPCODE_BASE,
45c7e6
	NT_SYMLINKD_DISCONNECT,
45c7e6
	NT_SYMLINKD_QUERY,
45c7e6
	NT_SYMLINKD_SET,
45c7e6
	/* daemon information */
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_SERVER,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_SESSION,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_PROCESS,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_THREAD,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_DEVICE,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_VOLUME,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_DIRECTORY,
45c7e6
	NT_SYMLINKD_QUERY_INFORMATION_FILE,
45c7e6
	/* symlink creation */
45c7e6
	NT_SYMLINKD_CREATE_SYMLINK,
45c7e6
	NT_SYMLINKD_CREATE_JUNCTION,
45c7e6
	/* exclusive upper limit */
45c7e6
	NT_SYMLINKD_OPCODE_CAP
45c7e6
} nt_symlinkd_opcode;
45c7e6
45c7e6
45c7e6
typedef struct __attr_ptr_size_aligned__ _nt_symlinkd_reparse_data {
45c7e6
	void *		hdstdir;
45c7e6
	uint16_t	dir_name_offset;
45c7e6
	uint16_t	dir_name_length;
45c7e6
	uint16_t	base_name_offset;
45c7e6
	uint16_t	base_name_length;
45c7e6
	uint16_t	reparse_data_offset;
45c7e6
	uint16_t	reparse_data_length;
45c7e6
	uint32_t	flags;
45c7e6
	wchar16_t	path_buffer[];
45c7e6
} nt_symlinkd_reparse_data;
45c7e6
45c7e6
45c7e6
typedef struct __attr_ptr_size_aligned__ _nt_symlinkd_msg_info {
45c7e6
	uintptr_t	msg_id;
45c7e6
	uint32_t	opcode;
45c7e6
	int32_t		status;
45c7e6
	void *		reserved;
45c7e6
} nt_symlinkd_msg_info;
45c7e6
45c7e6
45c7e6
typedef struct __attr_ptr_size_aligned__ _nt_symlinkd_create_info {
45c7e6
	void *		hdstdir;
45c7e6
	void *		hsection;
45c7e6
	uint32_t	mapsize;
45c7e6
	uint32_t	offset;
45c7e6
	void *		hsymlink;
45c7e6
	nt_iosb		iosb;
45c7e6
} nt_symlinkd_create_info;
45c7e6
45c7e6
typedef struct __attr_ptr_size_aligned__ _nt_symlinkd_create_msg {
45c7e6
	nt_port_message			header;
45c7e6
	struct {
45c7e6
		nt_symlinkd_msg_info		msginfo;
45c7e6
		nt_symlinkd_create_info		lnkinfo;
45c7e6
	} data;
45c7e6
} nt_symlinkd_create_msg;
45c7e6
45c7e6
45c7e6
__assert_aligned_size(nt_symlinkd_reparse_data,	__SIZEOF_POINTER__);
45c7e6
__assert_aligned_size(nt_symlinkd_msg_info,	__SIZEOF_POINTER__);
45c7e6
__assert_aligned_size(nt_symlinkd_create_msg,	__SIZEOF_POINTER__);
45c7e6
45c7e6
/* symlink creation bits */
45c7e6
#define NT_SYMLINK_CREATE_DEFAULT		0x0000
45c7e6
#define NT_SYMLINK_CREATE_CURRENT_PROCESS	0x0000
45c7e6
#define NT_SYMLINK_CREATE_ALLOW_CHILD_DAEMON	0x0001
45c7e6
#define NT_SYMLINK_CREATE_ALLOW_SESSION_DAEMON	0x0002
45c7e6
#define NT_SYMLINK_CREATE_ALLOW_SYSTEM_DAEMON	0x0004
45c7e6
45c7e6
#define NT_SYMLINK_CREATE_ALLOW_ANY_DAEMON	NT_SYMLINK_CREATE_ALLOW_CHILD_DAEMON     \
45c7e6
						| NT_SYMLINK_CREATE_ALLOW_SESSION_DAEMON \
45c7e6
						| NT_SYMLINK_CREATE_ALLOW_SYSTEM_DAEMON
45c7e6
45c7e6
typedef int32_t	__stdcall ntapi_tt_create_symlink(
45c7e6
	__out	void **			hsymlink		__optional,
45c7e6
	__in	void *			hevent			__optional,
45c7e6
	__in	nt_io_apc_routine *	apc_routine		__optional,
45c7e6
	__in	void *			apc_context		__optional,
45c7e6
	__out	nt_iosb *		iosb,
45c7e6
	__in	uint32_t		options,
45c7e6
	__in	void *			input_buffer,
45c7e6
	__in	uint32_t		input_buffer_length,
45c7e6
	__out	void *			output_buffer		__optional,
45c7e6
	__in	uint32_t		output_buffer_length);
45c7e6
45c7e6
#endif