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