Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Kernel Connection Multiplexor
0004  *
0005  * Copyright (c) 2016 Tom Herbert <tom@herbertland.com>
0006  *
0007  * This program is free software; you can redistribute it and/or modify
0008  * it under the terms of the GNU General Public License version 2
0009  * as published by the Free Software Foundation.
0010  *
0011  * User API to clone KCM sockets and attach transport socket to a KCM
0012  * multiplexor.
0013  */
0014 
0015 #ifndef KCM_KERNEL_H
0016 #define KCM_KERNEL_H
0017 
0018 struct kcm_attach {
0019     int fd;
0020     int bpf_fd;
0021 };
0022 
0023 struct kcm_unattach {
0024     int fd;
0025 };
0026 
0027 struct kcm_clone {
0028     int fd;
0029 };
0030 
0031 #define SIOCKCMATTACH   (SIOCPROTOPRIVATE + 0)
0032 #define SIOCKCMUNATTACH (SIOCPROTOPRIVATE + 1)
0033 #define SIOCKCMCLONE    (SIOCPROTOPRIVATE + 2)
0034 
0035 #define KCMPROTO_CONNECTED  0
0036 
0037 /* Socket options */
0038 #define KCM_RECV_DISABLE    1
0039 
0040 #endif
0041