1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * connector.h 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * 2004-2005 Copyright (c) Evgeniy Polyakov <zbr@ioremap.net> 6*4882a593Smuzhiyun * All rights reserved. 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify 9*4882a593Smuzhiyun * it under the terms of the GNU General Public License as published by 10*4882a593Smuzhiyun * the Free Software Foundation; either version 2 of the License, or 11*4882a593Smuzhiyun * (at your option) any later version. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 14*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*4882a593Smuzhiyun * GNU General Public License for more details. 17*4882a593Smuzhiyun * 18*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License 19*4882a593Smuzhiyun * along with this program; if not, write to the Free Software 20*4882a593Smuzhiyun * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21*4882a593Smuzhiyun */ 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun #ifndef _UAPI__CONNECTOR_H 24*4882a593Smuzhiyun #define _UAPI__CONNECTOR_H 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #include <linux/types.h> 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun /* 29*4882a593Smuzhiyun * Process Events connector unique ids -- used for message routing 30*4882a593Smuzhiyun */ 31*4882a593Smuzhiyun #define CN_IDX_PROC 0x1 32*4882a593Smuzhiyun #define CN_VAL_PROC 0x1 33*4882a593Smuzhiyun #define CN_IDX_CIFS 0x2 34*4882a593Smuzhiyun #define CN_VAL_CIFS 0x1 35*4882a593Smuzhiyun #define CN_W1_IDX 0x3 /* w1 communication */ 36*4882a593Smuzhiyun #define CN_W1_VAL 0x1 37*4882a593Smuzhiyun #define CN_IDX_V86D 0x4 38*4882a593Smuzhiyun #define CN_VAL_V86D_UVESAFB 0x1 39*4882a593Smuzhiyun #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ 40*4882a593Smuzhiyun #define CN_DST_IDX 0x6 41*4882a593Smuzhiyun #define CN_DST_VAL 0x1 42*4882a593Smuzhiyun #define CN_IDX_DM 0x7 /* Device Mapper */ 43*4882a593Smuzhiyun #define CN_VAL_DM_USERSPACE_LOG 0x1 44*4882a593Smuzhiyun #define CN_IDX_DRBD 0x8 45*4882a593Smuzhiyun #define CN_VAL_DRBD 0x1 46*4882a593Smuzhiyun #define CN_KVP_IDX 0x9 /* HyperV KVP */ 47*4882a593Smuzhiyun #define CN_KVP_VAL 0x1 /* queries from the kernel */ 48*4882a593Smuzhiyun #define CN_VSS_IDX 0xA /* HyperV VSS */ 49*4882a593Smuzhiyun #define CN_VSS_VAL 0x1 /* queries from the kernel */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun #define CN_NETLINK_USERS 11 /* Highest index + 1 */ 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun /* 55*4882a593Smuzhiyun * Maximum connector's message size. 56*4882a593Smuzhiyun */ 57*4882a593Smuzhiyun #define CONNECTOR_MAX_MSG_SIZE 16384 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun /* 60*4882a593Smuzhiyun * idx and val are unique identifiers which 61*4882a593Smuzhiyun * are used for message routing and 62*4882a593Smuzhiyun * must be registered in connector.h for in-kernel usage. 63*4882a593Smuzhiyun */ 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun struct cb_id { 66*4882a593Smuzhiyun __u32 idx; 67*4882a593Smuzhiyun __u32 val; 68*4882a593Smuzhiyun }; 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun struct cn_msg { 71*4882a593Smuzhiyun struct cb_id id; 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun __u32 seq; 74*4882a593Smuzhiyun __u32 ack; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun __u16 len; /* Length of the following data */ 77*4882a593Smuzhiyun __u16 flags; 78*4882a593Smuzhiyun __u8 data[0]; 79*4882a593Smuzhiyun }; 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun #endif /* _UAPI__CONNECTOR_H */ 82