summaryrefslogtreecommitdiffhomepage
path: root/include/ntapi/nt_ipc.h
blob: 51a76bcfb83b4df36e3c4a8ecff05bf2444efc0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#ifndef _NT_IPC_H_
#define _NT_IPC_H_

#include "nt_abi.h"
#include "nt_object.h"

/* friendly ipc guids */
#define NT_IPC_GUID_SEMCTL		{0xe47c05df,0x5f5c,0x4762,{0xa2,0x79,0xd2,0x82,0xf5,0x39,0xea,0xdf}}
#define NT_IPC_GUID_SEMKEY		{0xc6e442c3,0x2ac5,0x4d1d,{0x92,0xf3,0x6e,0x10,0xc6,0x1f,0x53,0x79}}
#define NT_IPC_GUID_SEMPID		{0x571ac9bb,0x22eb,0x43f2,{0x8d,0xd6,0x64,0x39,0x49,0xa6,0xe9,0x1f}}

#define NT_IPC_GUID_MSQCTL		{0x7c1113e3,0x224f,0x435e,{0xa9,0x58,0xb8,0x2b,0x08,0xae,0x3d,0x67}}
#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}}


/* friendly ipc object directory prefixes */
#define NT_IPC_OBJDIR_PREFIX_SEMCTL	{'s','e','m','c','t','l'}
#define NT_IPC_OBJDIR_PREFIX_SEMKEY	{'s','e','m','k','e','y'}
#define NT_IPC_OBJDIR_PREFIX_SEMPID	{'s','e','m','p','i','d'}

#define NT_IPC_OBJDIR_PREFIX_MSQCTL	{'m','s','q','c','t','l'}
#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'}


/* ipc commands */
#define NT_IPC_CMD_RMID			(0)
#define NT_IPC_CMD_SET 			(1)
#define NT_IPC_CMD_STAT			(2)
#define NT_IPC_CMD_INFO			(3)


/* ipc special keys */
#define NT_IPC_KEY_PRIVATE		(0)


/* ipc extension interfaces */
typedef int32_t __stdcall	ntapi_ipc_create_pipe(
	__out		void **		hpipe_read,
	__out		void **		hpipe_write,
	__in		uint32_t	advisory_buffer_size);


typedef int32_t __stdcall	ntapi_ipc_connect_by_attr(
	__out	void **			hport,
	__in	nt_port_attr *		attr,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_by_name(
	__out	void **			hport,
	__in	nt_port_name *		name,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_by_symlink(
	__out	void **			hport,
	__in	void *			hsymlink,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_by_port(
	__in	void *			hconn,
	__in	nt_port_attr *		attr);


typedef int32_t __stdcall	ntapi_ipc_connect_section_by_attr(
	__out	void **			hport,
	__in	nt_port_attr *		attr,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_section_by_name(
	__out	void **			hport,
	__in	nt_port_name *		name,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_section_by_symlink(
	__out	void **			hport,
	__in	void *			hsymlink,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size,
	__in	int			fexisting);


typedef int32_t __stdcall	ntapi_ipc_connect_section_by_port(
	__in	void *			hconn,
	__in	nt_port_attr *		attr,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size);


typedef int32_t __stdcall	ntapi_ipc_get_port_by_attr(
	__out	void **			hport,
	__in	nt_port_attr *		attr);


typedef int32_t __stdcall	ntapi_ipc_get_port_section_by_attr(
	__out	void **			hport,
	__in	nt_port_attr *		attr,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size);


typedef int32_t __stdcall	ntapi_ipc_init_section_by_port(
	__in	void *			hconn,
	__out	void **			hsection,
	__out	void **			section_addr,
	__out	size_t *		section_size);


typedef int32_t __stdcall	ntapi_ipc_disconnect_unmap_section_by_port(
	__in	void *			hconn);

#endif