chiark / gitweb /
6775789fe8c3068b994e68962a1d19a9197bd1c3
[elogind.git] / src / libsystemd-bus / kdbus.h
1 /*
2  * Copyright (C) 2013 Kay Sievers
3  * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4  * Copyright (C) 2013 Linux Foundation
5  * Copyright (C) 2013 Lennart Poettering
6  * Copyright (C) 2013 Daniel Mack <daniel@zonque.org>
7  *
8  * kdbus is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU Lesser General Public License as published by the
10  * Free Software Foundation; either version 2.1 of the License, or (at
11  * your option) any later version.
12  */
13
14 #ifndef _KDBUS_H_
15 #define _KDBUS_H_
16
17 #ifndef __KERNEL__
18 #include <sys/ioctl.h>
19 #include <sys/types.h>
20 #include <linux/types.h>
21 #endif
22
23 #define KDBUS_IOC_MAGIC                 0x95
24 #define KDBUS_SRC_ID_KERNEL             (0)
25 #define KDBUS_DST_ID_NAME               (0)
26 #define KDBUS_MATCH_SRC_ID_ANY          (~0ULL)
27 #define KDBUS_DST_ID_BROADCAST          (~0ULL)
28
29 /**
30  * struct kdbus_notify_name_change - name registry change message
31  * @old_id:             Former owner of a name
32  * @new_id:             New owner of a name
33  * @flags:              flags from KDBUS_NAME_*
34  * @name:               Well-known name
35  *
36  * Data attached to:
37  *   KDBUS_ITEM_NAME_ADD
38  *   KDBUS_ITEM_NAME_REMOVE
39  *   KDBUS_ITEM_NAME_CHANGE
40  *
41  * Sent from kernel to userspace when the owner or starter of
42  * a well-known name changes.
43  */
44 struct kdbus_notify_name_change {
45         __u64 old_id;
46         __u64 new_id;
47         __u64 flags;
48         char name[0];
49 };
50
51 /**
52  * struct kdbus_notify_id_change - name registry change message
53  * @id:                 New or former owner of the name
54  * @flags:              flags field from KDBUS_HELLO_*
55  *
56  * Data attached to:
57  *   KDBUS_ITEM_ID_ADD
58  *   KDBUS_ITEM_ID_REMOVE
59  *
60  * Sent from kernel to userspace when the owner or starter of
61  * a well-known name changes.
62  */
63 struct kdbus_notify_id_change {
64         __u64 id;
65         __u64 flags;
66 };
67
68 /**
69  * struct kdbus_creds - process credentials
70  * @uid:                User ID
71  * @gid:                Group ID
72  * @pid:                Process ID
73  * @tid:                Thread ID
74  * @starttime:          Starttime of the process
75  *
76  * The starttime of the process PID. This is useful to detect PID overruns
77  * from the client side. i.e. if you use the PID to look something up in
78  * /proc/$PID/ you can afterwards check the starttime field of it, to ensure
79  * you didn't run into a PID overrun.
80  */
81 struct kdbus_creds {
82         __u64 uid;
83         __u64 gid;
84         __u64 pid;
85         __u64 tid;
86         __u64 starttime;
87 };
88
89 /**
90  * struct kdbus_audit - audit information
91  * @sessionid:          The audit session ID
92  * @loginuid:           The audit login uid
93  */
94 struct kdbus_audit {
95         __u64 sessionid;
96         __u64 loginuid;
97 };
98
99 /**
100  * struct kdbus_timestamp
101  * @monotonic_ns:       Monotonic timestamp, in nanoseconds
102  * @realtime_ns:        Realtime timestamp, in nanoseconds
103  */
104 struct kdbus_timestamp {
105         __u64 monotonic_ns;
106         __u64 realtime_ns;
107 };
108
109 /**
110  * struct kdbus_vec - I/O vector for kdbus payload items
111  * @size:               The size of the vector
112  * @address:            Memory address for memory addresses
113  * @offset:             Offset in the in-message payload memory
114  */
115 struct kdbus_vec {
116         __u64 size;
117         union {
118                 __u64 address;
119                 __u64 offset;
120         };
121 };
122
123 /**
124  * struct kdbus_memfd - a kdbus memfd
125  * @size:               The memfd's size
126  * @fd:                 The file descriptor number
127  * @__pad:              Padding to make the struct aligned
128  */
129 struct kdbus_memfd {
130         __u64 size;
131         int fd;
132         __u32 __pad;
133 };
134
135 /**
136  * struct kdbus_name - a registered well-known name with its flags
137  * @flags:              flags from KDBUS_NAME_*
138  * @name:               well-known name
139  */
140 struct kdbus_name {
141         __u64 flags;
142         char name[0];
143 };
144
145 /**
146  * struct kdbus_policy_access - policy access item
147  * @type:               One of KDBUS_POLICY_ACCESS_* types
148  * @bits:               Access to grant. One of KDBUS_POLICY_*
149  * @id:                 For KDBUS_POLICY_ACCESS_USER, the uid
150  *                      For KDBUS_POLICY_ACCESS_GROUP, the gid
151  */
152 struct kdbus_policy_access {
153         __u64 type;     /* USER, GROUP, WORLD */
154         __u64 bits;     /* RECV, SEND, OWN */
155         __u64 id;       /* uid, gid, 0 */
156 };
157
158 /*
159  * struct kdbus_policy - a policy to upload
160  * @size:               The total size of the structure
161  * @type:               KDBUS_POLICY_NAME or KDBUS_POLICY_ACCESS
162  * @name:               The well-known name to grant access to,
163  *                      if @type is KDBUS_POLICY_NAME
164  * @access:             The policy access details,
165  *                      if @type is KDBUS_POLICY_ACCESS
166  */
167 struct kdbus_policy {
168         union {
169                 struct kdbus_policy_access access;
170                 char name[0];
171         };
172 };
173
174 /* Message Item Types */
175 enum {
176         _KDBUS_ITEM_NULL,
177
178         /* Filled in by userspace */
179         _KDBUS_ITEM_USER_BASE,
180         KDBUS_ITEM_PAYLOAD_VEC  = _KDBUS_ITEM_USER_BASE,
181         KDBUS_ITEM_PAYLOAD_OFF,         /* .data_vec, reference to memory area */
182         KDBUS_ITEM_PAYLOAD_MEMFD,       /* file descriptor of a special data file */
183         KDBUS_ITEM_FDS,                 /* .data_fds of file descriptors */
184         KDBUS_ITEM_BLOOM,               /* for broadcasts, carries bloom filter blob in .data */
185         KDBUS_ITEM_DST_NAME,            /* destination's well-known name, in .str */
186         KDBUS_ITEM_PRIORITY,            /* queue priority for message */
187
188         _KDBUS_ITEM_POLICY_BASE = 0x400,
189         KDBUS_ITEM_POLICY_NAME = _KDBUS_ITEM_POLICY_BASE,
190         KDBUS_ITEM_POLICY_ACCESS,
191
192         /* Filled in by kernelspace */
193         _KDBUS_ITEM_ATTACH_BASE = 0x600,
194         KDBUS_ITEM_NAME         = _KDBUS_ITEM_ATTACH_BASE,
195         KDBUS_ITEM_STARTER_NAME,        /* Only used in HELLO for starter connection */
196         KDBUS_ITEM_TIMESTAMP,           /* .timestamp */
197         KDBUS_ITEM_CREDS,               /* .creds */
198         KDBUS_ITEM_PID_COMM,            /* optional, in .str */
199         KDBUS_ITEM_TID_COMM,            /* optional, in .str */
200         KDBUS_ITEM_EXE,                 /* optional, in .str */
201         KDBUS_ITEM_CMDLINE,             /* optional, in .str (a chain of NUL str) */
202         KDBUS_ITEM_CGROUP,              /* optional, in .str */
203         KDBUS_ITEM_CAPS,                /* caps data blob, in .data */
204         KDBUS_ITEM_SECLABEL,            /* NUL terminated string, in .str */
205         KDBUS_ITEM_AUDIT,               /* .audit */
206
207         /* Special messages from kernel, consisting of one and only one of these data blocks */
208         _KDBUS_ITEM_KERNEL_BASE = 0x800,
209         KDBUS_ITEM_NAME_ADD     = _KDBUS_ITEM_KERNEL_BASE,
210         KDBUS_ITEM_NAME_REMOVE,         /* .name_change */
211         KDBUS_ITEM_NAME_CHANGE,         /* .name_change */
212         KDBUS_ITEM_ID_ADD,              /* .id_change */
213         KDBUS_ITEM_ID_REMOVE,           /* .id_change */
214         KDBUS_ITEM_REPLY_TIMEOUT,       /* empty, but .reply_cookie in .kdbus_msg is filled in */
215         KDBUS_ITEM_REPLY_DEAD,          /* dito */
216 };
217
218 /*
219  * struct kdbus_item - chain of data blocks
220  * @size:       :       overall data record size
221  * @type:               kdbus_item type of data
222  */
223 struct kdbus_item {
224         __u64 size;
225         __u64 type;
226         union {
227                 /* inline data */
228                 __u8 data[0];
229                 __u32 data32[0];
230                 __u64 data64[0];
231                 char str[0];
232
233                 /* connection */
234                 __u64 id;
235
236                 /* data vector */
237                 struct kdbus_vec vec;
238
239                 /* process credentials and properties*/
240                 struct kdbus_creds creds;
241                 struct kdbus_audit audit;
242                 struct kdbus_timestamp timestamp;
243                 struct kdbus_name name;
244
245                 /* specific fields */
246                 struct kdbus_memfd memfd;
247                 int fds[0];
248                 struct kdbus_notify_name_change name_change;
249                 struct kdbus_notify_id_change id_change;
250                 struct kdbus_policy policy;
251         };
252 };
253
254 enum {
255         KDBUS_MSG_FLAGS_EXPECT_REPLY    = 1 << 0,
256         KDBUS_MSG_FLAGS_NO_AUTO_START   = 1 << 1,
257 };
258
259 enum {
260         KDBUS_PAYLOAD_KERNEL,
261         KDBUS_PAYLOAD_DBUS1     = 0x4442757356657231ULL, /* 'DBusVer1' */
262         KDBUS_PAYLOAD_GVARIANT  = 0x4756617269616e74ULL, /* 'GVariant' */
263 };
264
265 /**
266  * struct kdbus_msg - the representation of a kdbus message
267  * @size:               Total size of the message
268  * @flags:              Message flags (KDBUS_MSG_FLAGS_*)
269  * @dst_id:             64-bit ID of the destination connection
270  * @src_id:             64-bit ID of the source connection
271  * @payload_type:       Payload type (KDBUS_PAYLOAD_*)
272  * @cookie:             Userspace-supplied cookie
273  * @cookie_reply:       For kernel-generated messages, this is the cookie
274  *                      the message is a reply to
275  * @timeout_ns:         For non-kernel-generated messages, this denotes the
276  *                      message timeout in nanoseconds
277  * @items:              A list of kdbus_items containing the message payload
278  */
279 struct kdbus_msg {
280         __u64 size;
281         __u64 flags;
282         __u64 dst_id;
283         __u64 src_id;
284         __u64 payload_type;
285         __u64 cookie;
286         union {
287                 __u64 cookie_reply;
288                 __u64 timeout_ns;
289         };
290         struct kdbus_item items[0];
291 };
292
293 enum {
294         _KDBUS_POLICY_ACCESS_NULL,
295         KDBUS_POLICY_ACCESS_USER,
296         KDBUS_POLICY_ACCESS_GROUP,
297         KDBUS_POLICY_ACCESS_WORLD,
298 };
299
300 enum {
301         KDBUS_POLICY_RECV               = 1 <<  2,
302         KDBUS_POLICY_SEND               = 1 <<  1,
303         KDBUS_POLICY_OWN                = 1 <<  0,
304 };
305
306 /**
307  * struct kdbus_cmd_policy - a series of policies to upload
308  * @size:               The total size of the structure
309  * @policies:           The policies to upload
310  *
311  * A KDBUS_POLICY_NAME must always preceed a KDBUS_POLICY_ACCESS entry.
312  * A new KDBUS_POLICY_NAME can be added after KDBUS_POLICY_ACCESS for
313  * chaining multiple policies together.
314  */
315 struct kdbus_cmd_policy {
316         __u64 size;
317         struct kdbus_item policies[0];
318 };
319
320 /* Flags for struct kdbus_cmd_hello */
321 enum {
322         KDBUS_HELLO_STARTER             =  1 <<  0,
323         KDBUS_HELLO_ACCEPT_FD           =  1 <<  1,
324 };
325
326 /* Flags for message attachments */
327 enum {
328         KDBUS_ATTACH_TIMESTAMP          =  1 <<  0,
329         KDBUS_ATTACH_CREDS              =  1 <<  1,
330         KDBUS_ATTACH_NAMES              =  1 <<  2,
331         KDBUS_ATTACH_COMM               =  1 <<  3,
332         KDBUS_ATTACH_EXE                =  1 <<  4,
333         KDBUS_ATTACH_CMDLINE            =  1 <<  5,
334         KDBUS_ATTACH_CGROUP             =  1 <<  6,
335         KDBUS_ATTACH_CAPS               =  1 <<  7,
336         KDBUS_ATTACH_SECLABEL           =  1 <<  8,
337         KDBUS_ATTACH_AUDIT              =  1 <<  9,
338 };
339
340 /**
341  * struct kdbus_cmd_hello - struct to say hello to kdbus
342  * @size:               The total size of the structure
343  * @conn_flags:         Connection flags (KDBUS_HELLO_*). The kernel will
344  *                      return its capabilities in that field.
345  * @attach_flags:       Mask of metdata to attach to each message sent
346  *                      (KDBUS_ATTACH_*)
347  * @bus_flags:          The flags field copied verbatim from the original
348  *                      KDBUS_CMD_BUS_MAKE ioctl. It's intended to be useful
349  *                      to do negotiation of features of the payload that is
350  *                      transferred (kernel → userspace)
351  * @id:                 The ID of this connection (kernel → userspace)
352  * @bloom_size:         The bloom filter size chosen by the owner
353  *                      (kernel → userspace)
354  * @pool_size:          Maximum size of the pool buffer (kernel → userspace)
355  * @id128:              Unique 128-bit ID of the bus (kernel → userspace)
356  * @items:              A list of items
357  *
358  * This struct is used with the KDBUS_CMD_HELLO ioctl. See the ioctl
359  * documentation for more information.
360  */
361 struct kdbus_cmd_hello {
362         __u64 size;
363
364         /* userspace → kernel, kernel → userspace */
365         __u64 conn_flags;
366         __u64 attach_flags;
367
368         /* kernel → userspace */
369         __u64 bus_flags;
370         __u64 id;
371         __u64 bloom_size;
372         __u64 pool_size;
373         __u8 id128[16];
374
375         struct kdbus_item items[0];
376 };
377
378 /* Flags for KDBUS_CMD_{BUS,EP,NS}_MAKE */
379 enum {
380         KDBUS_MAKE_ACCESS_GROUP         = 1 <<  0,
381         KDBUS_MAKE_ACCESS_WORLD         = 1 <<  1,
382         KDBUS_MAKE_POLICY_OPEN          = 1 <<  2,
383 };
384
385 /* Items to append to KDBUS_CMD_{BUS,EP,NS}_MAKE */
386 enum {
387         _KDBUS_MAKE_NULL,
388         KDBUS_MAKE_NAME,
389 };
390
391 /**
392  * struct kdbus_cmd_bus_make - struct to make a bus
393  * @size:               The total size of the struct
394  * @flags:              Properties for the bus to create
395  * @bloom_size:         Size of the bloom filter for this bus
396  * @items:              Items describing details such as the name of the bus
397  *
398  * This structure is used with the KDBUS_CMD_BUS_MAKE ioctl. Refer to the
399  * documentation for more information.
400  */
401 struct kdbus_cmd_bus_make {
402         __u64 size;
403         __u64 flags;
404         __u64 bloom_size;
405         struct kdbus_item items[0];
406 };
407
408 /**
409  * struct kdbus_cmd_ep_make - struct to make an endpoint
410  * @size:               The total size of the struct
411  * @flags:              Unused for now
412  * @items:              Items describing details such as the
413  *                      name of the endpoint
414  *
415  * This structure is used with the KDBUS_CMD_EP_MAKE ioctl. Refer to the
416  * documentation for more information.
417  */
418 struct kdbus_cmd_ep_make {
419         __u64 size;
420         __u64 flags;
421         struct kdbus_item items[0];
422 };
423
424 /**
425  * struct kdbus_cmd_ns_make - struct to make a namespace
426  * @size:               The total size of the struct
427  * @flags:              Unused for now
428  * @items:              Items describing details such as the
429  *                      name of the namespace
430  *
431  * This structure is used with the KDBUS_CMD_NS_MAKE ioctl. Refer to the
432  * documentation for more information.
433  */
434 struct kdbus_cmd_ns_make {
435         __u64 size;
436         __u64 flags;
437         struct kdbus_item items[0];
438 };
439
440 enum {
441         /* userspace → kernel */
442         KDBUS_NAME_REPLACE_EXISTING             = 1 <<  0,
443         KDBUS_NAME_QUEUE                        = 1 <<  1,
444         KDBUS_NAME_ALLOW_REPLACEMENT            = 1 <<  2,
445
446         /* kernel → userspace */
447         KDBUS_NAME_IN_QUEUE                     = 1 << 16,
448 };
449
450 /**
451  * struct kdbus_cmd_name - struct to describe a well-known name
452  * @size:               The total size of the struct
453  * @flags:              Flags for a name entry (KDBUS_NAME_*)
454  * @id:                 Priviledged users may use this field to (de)register
455  *                      names on behalf of other peers.
456  * @conn_flags:         The flags of the owning connection (KDBUS_HELLO_*)
457  * @name:               The well-known name
458  *
459  * This structure is used with the KDBUS_CMD_NAME_ACQUIRE ioctl.
460  * Refer to the documentation for more information.
461  */
462 struct kdbus_cmd_name {
463         __u64 size;
464         __u64 flags;
465         __u64 id;
466         __u64 conn_flags;
467         char name[0];
468 };
469
470 enum {
471         KDBUS_NAME_LIST_UNIQUE          = 1 <<  0,
472         KDBUS_NAME_LIST_NAMES           = 1 <<  1,
473         KDBUS_NAME_LIST_STARTERS        = 1 <<  2,
474         KDBUS_NAME_LIST_QUEUED          = 1 <<  3,
475 };
476
477 /**
478  * struct kdbus_cmd_name_list - request a list of name entries
479  * @flags:              Flags for the query (KDBUS_NAME_LIST_*)
480  * @offset:             The returned offset in the caller's pool buffer.
481  *                      The user must use KDBUS_CMD_FREE to free the
482  *                      allocated memory.
483  * 
484  * This structure is used with the KDBUS_CMD_NAME_LIST ioctl.
485  */
486 struct kdbus_cmd_name_list {
487         __u64 flags;
488         __u64 offset;
489 };
490
491 /**
492  * struct kdbus_name_list - information returned by KDBUS_CMD_NAME_LIST
493  * @size:               The total size of the structure
494  * @names:              A list of names
495  *
496  * Note that the user is responsible for freeing the allocated memory with
497  * the KDBUS_CMD_FREE ioctl.
498  */
499 struct kdbus_name_list {
500         __u64 size;
501         struct kdbus_cmd_name names[0];
502 };
503
504 /**
505  * struct kdbus_cmd_conn_info - struct used for KDBUS_CMD_CONN_INFO ioctl
506  * @size:               The total size of the struct
507  * @flags:              KDBUS_ATTACH_* flags
508  * @id:                 The 64-bit ID of the connection. If set to zero, passing
509  *                      @name is required. kdbus will look up the name to determine
510  *                      the ID in this case.
511  * @offset:             Returned offset in the caller's pool buffer where the
512  *                      kdbus_name_info struct result is stored. The user must
513  *                      use KDBUS_CMD_FREE to free the allocated memory.
514  * @name:               The optional well-known name to look up. Only needed in
515  *                      case @id is zero.
516  *
517  * On success, the KDBUS_CMD_CONN_INFO ioctl will return 0 and @offset will
518  * tell the user the offset in the connection pool buffer at which to find the
519  * result in a struct kdbus_conn_info.
520  */
521 struct kdbus_cmd_conn_info {
522         __u64 size;
523         __u64 flags;
524         __u64 id;
525         __u64 offset;
526         char name[0];
527 };
528
529 /**
530  * struct kdbus_conn_info - information returned by KDBUS_CMD_CONN_INFO
531  * @size:               The total size of the struct
532  * @id:                 The connection's 64-bit ID
533  * @flags:              The connection's flags
534  * @items:              A list of struct kdbus_item
535  *
536  * Note that the user is responsible for freeing the allocated memory with
537  * the KDBUS_CMD_FREE ioctl.
538  */
539 struct kdbus_conn_info {
540         __u64 size;
541         __u64 id;
542         __u64 flags;
543         struct kdbus_item items[0];
544 };
545
546 enum {
547         _KDBUS_MATCH_NULL,
548         KDBUS_MATCH_BLOOM,              /* Matches a mask blob against KDBUS_MSG_BLOOM */
549         KDBUS_MATCH_SRC_NAME,           /* Matches a name string against KDBUS_ITEM_NAME */
550         KDBUS_MATCH_NAME_ADD,           /* Matches a name string against KDBUS_ITEM_NAME_ADD */
551         KDBUS_MATCH_NAME_REMOVE,        /* Matches a name string against KDBUS_ITEM_NAME_REMOVE */
552         KDBUS_MATCH_NAME_CHANGE,        /* Matches a name string against KDBUS_ITEM_NAME_CHANGE */
553         KDBUS_MATCH_ID_ADD,             /* Matches an ID against KDBUS_MSG_ID_ADD */
554         KDBUS_MATCH_ID_REMOVE,          /* Matches an ID against KDBUS_MSG_ID_REMOVE */
555 };
556
557 /**
558  * struct kdbus_cmd_match - struct to add or remove matches
559  * @size:               The total size of the struct
560  * @id:                 Priviledged users may (de)register matches on behalf
561  *                      of other peers.
562  *                      In other cases, set to 0.
563  * @cookie:             Userspace supplied cookie. When removing, the cookie is
564  *                      suffices as information
565  * @src_id:             The source ID to match against. Use KDBUS_MATCH_SRC_ID_ANY or
566  *                      any other value for a unique match.
567  * @items:              A list of items for additional information
568  *
569  * This structure is used with the KDBUS_CMD_ADD_MATCH and
570  * KDBUS_CMD_REMOVE_MATCH ioctl. Refer to the documentation for more
571  * information.
572  */
573 struct kdbus_cmd_match {
574         __u64 size;
575         __u64 id;
576         __u64 cookie;
577         __u64 src_id;
578         struct kdbus_item items[0];
579 };
580
581 enum {
582         KDBUS_MONITOR_ENABLE            = 1 <<  0,
583 };
584
585 /**
586  * struct kdbus_cmd_monitor - struct to enable or disable eavesdropping
587  * @id:                 Priviledged users may enable or disable the monitor feature
588  *                      on behalf of other peers
589  * @flags:              Use KDBUS_MONITOR_ENABLE to enable eavesdropping
590  *
591  * This structure is used with the KDBUS_CMD_MONITOR ioctl.
592  * Refer to the documentation for more information.
593  */
594 struct kdbus_cmd_monitor {
595         __u64 id;
596         __u64 flags;
597 };
598
599 enum {
600         /* kdbus control node commands: require unset state */
601         KDBUS_CMD_BUS_MAKE =            _IOW(KDBUS_IOC_MAGIC, 0x00, struct kdbus_cmd_bus_make),
602         KDBUS_CMD_NS_MAKE =             _IOR(KDBUS_IOC_MAGIC, 0x10, struct kdbus_cmd_ns_make),
603
604         /* kdbus ep node commands: require unset state */
605         KDBUS_CMD_EP_MAKE =             _IOW(KDBUS_IOC_MAGIC, 0x20, struct kdbus_cmd_ep_make),
606         KDBUS_CMD_HELLO =               _IOWR(KDBUS_IOC_MAGIC, 0x30, struct kdbus_cmd_hello),
607
608         /* kdbus ep node commands: require connected state */
609         KDBUS_CMD_MSG_SEND =            _IOW(KDBUS_IOC_MAGIC, 0x40, struct kdbus_msg),
610         KDBUS_CMD_MSG_RECV =            _IOR(KDBUS_IOC_MAGIC, 0x41, __u64 *),
611         KDBUS_CMD_FREE =                _IOW(KDBUS_IOC_MAGIC, 0x42, __u64 *),
612
613         KDBUS_CMD_NAME_ACQUIRE =        _IOWR(KDBUS_IOC_MAGIC, 0x50, struct kdbus_cmd_name),
614         KDBUS_CMD_NAME_RELEASE =        _IOW(KDBUS_IOC_MAGIC, 0x51, struct kdbus_cmd_name),
615         KDBUS_CMD_NAME_LIST =           _IOWR(KDBUS_IOC_MAGIC, 0x52, struct kdbus_cmd_name_list),
616
617         KDBUS_CMD_CONN_INFO =           _IOWR(KDBUS_IOC_MAGIC, 0x60, struct kdbus_cmd_conn_info),
618
619         KDBUS_CMD_MATCH_ADD =           _IOW(KDBUS_IOC_MAGIC, 0x70, struct kdbus_cmd_match),
620         KDBUS_CMD_MATCH_REMOVE =        _IOW(KDBUS_IOC_MAGIC, 0x71, struct kdbus_cmd_match),
621         KDBUS_CMD_MONITOR =             _IOW(KDBUS_IOC_MAGIC, 0x72, struct kdbus_cmd_monitor),
622
623         /* kdbus ep node commands: require ep owner state */
624         KDBUS_CMD_EP_POLICY_SET =       _IOW(KDBUS_IOC_MAGIC, 0x80, struct kdbus_cmd_policy),
625
626         /* kdbus memfd commands: */
627         KDBUS_CMD_MEMFD_NEW =           _IOR(KDBUS_IOC_MAGIC, 0x90, int *),
628         KDBUS_CMD_MEMFD_SIZE_GET =      _IOR(KDBUS_IOC_MAGIC, 0x91, __u64 *),
629         KDBUS_CMD_MEMFD_SIZE_SET =      _IOW(KDBUS_IOC_MAGIC, 0x92, __u64 *),
630         KDBUS_CMD_MEMFD_SEAL_GET =      _IOR(KDBUS_IOC_MAGIC, 0x93, int *),
631         KDBUS_CMD_MEMFD_SEAL_SET =      _IO(KDBUS_IOC_MAGIC, 0x94),
632 };
633 #endif