xref: /openbmc/linux/include/uapi/linux/kcm.h (revision 5214cae7)
1 /*
2  * Kernel Connection Multiplexor
3  *
4  * Copyright (c) 2016 Tom Herbert <tom@herbertland.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2
8  * as published by the Free Software Foundation.
9  *
10  * User API to clone KCM sockets and attach transport socket to a KCM
11  * multiplexor.
12  */
13 
14 #ifndef KCM_KERNEL_H
15 #define KCM_KERNEL_H
16 
17 struct kcm_attach {
18 	int fd;
19 	int bpf_fd;
20 };
21 
22 struct kcm_unattach {
23 	int fd;
24 };
25 
26 struct kcm_clone {
27 	int fd;
28 };
29 
30 #define SIOCKCMATTACH	(SIOCPROTOPRIVATE + 0)
31 #define SIOCKCMUNATTACH	(SIOCPROTOPRIVATE + 1)
32 #define SIOCKCMCLONE	(SIOCPROTOPRIVATE + 2)
33 
34 #define KCMPROTO_CONNECTED	0
35 
36 /* Socket options */
37 #define KCM_RECV_DISABLE	1
38 
39 #endif
40 
41