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