1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * connector.h 4607ca46eSDavid Howells * 5607ca46eSDavid Howells * 2004-2005 Copyright (c) Evgeniy Polyakov <zbr@ioremap.net> 6607ca46eSDavid Howells * All rights reserved. 7607ca46eSDavid Howells * 8607ca46eSDavid Howells * This program is free software; you can redistribute it and/or modify 9607ca46eSDavid Howells * it under the terms of the GNU General Public License as published by 10607ca46eSDavid Howells * the Free Software Foundation; either version 2 of the License, or 11607ca46eSDavid Howells * (at your option) any later version. 12607ca46eSDavid Howells * 13607ca46eSDavid Howells * This program is distributed in the hope that it will be useful, 14607ca46eSDavid Howells * but WITHOUT ANY WARRANTY; without even the implied warranty of 15607ca46eSDavid Howells * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16607ca46eSDavid Howells * GNU General Public License for more details. 17607ca46eSDavid Howells * 18607ca46eSDavid Howells * You should have received a copy of the GNU General Public License 19607ca46eSDavid Howells * along with this program; if not, write to the Free Software 20607ca46eSDavid Howells * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21607ca46eSDavid Howells */ 22607ca46eSDavid Howells 23607ca46eSDavid Howells #ifndef _UAPI__CONNECTOR_H 24607ca46eSDavid Howells #define _UAPI__CONNECTOR_H 25607ca46eSDavid Howells 26607ca46eSDavid Howells #include <linux/types.h> 27607ca46eSDavid Howells 28607ca46eSDavid Howells /* 29607ca46eSDavid Howells * Process Events connector unique ids -- used for message routing 30607ca46eSDavid Howells */ 31607ca46eSDavid Howells #define CN_IDX_PROC 0x1 32607ca46eSDavid Howells #define CN_VAL_PROC 0x1 33607ca46eSDavid Howells #define CN_IDX_CIFS 0x2 34607ca46eSDavid Howells #define CN_VAL_CIFS 0x1 35607ca46eSDavid Howells #define CN_W1_IDX 0x3 /* w1 communication */ 36607ca46eSDavid Howells #define CN_W1_VAL 0x1 37607ca46eSDavid Howells #define CN_IDX_V86D 0x4 38607ca46eSDavid Howells #define CN_VAL_V86D_UVESAFB 0x1 39607ca46eSDavid Howells #define CN_IDX_BB 0x5 /* BlackBoard, from the TSP GPL sampling framework */ 40607ca46eSDavid Howells #define CN_DST_IDX 0x6 41607ca46eSDavid Howells #define CN_DST_VAL 0x1 42607ca46eSDavid Howells #define CN_IDX_DM 0x7 /* Device Mapper */ 43607ca46eSDavid Howells #define CN_VAL_DM_USERSPACE_LOG 0x1 44607ca46eSDavid Howells #define CN_IDX_DRBD 0x8 45607ca46eSDavid Howells #define CN_VAL_DRBD 0x1 46607ca46eSDavid Howells #define CN_KVP_IDX 0x9 /* HyperV KVP */ 47607ca46eSDavid Howells #define CN_KVP_VAL 0x1 /* queries from the kernel */ 4896dd86faSK. Y. Srinivasan #define CN_VSS_IDX 0xA /* HyperV VSS */ 4996dd86faSK. Y. Srinivasan #define CN_VSS_VAL 0x1 /* queries from the kernel */ 50607ca46eSDavid Howells 5196dd86faSK. Y. Srinivasan 5296dd86faSK. Y. Srinivasan #define CN_NETLINK_USERS 11 /* Highest index + 1 */ 53607ca46eSDavid Howells 54607ca46eSDavid Howells /* 55607ca46eSDavid Howells * Maximum connector's message size. 56607ca46eSDavid Howells */ 57607ca46eSDavid Howells #define CONNECTOR_MAX_MSG_SIZE 16384 58607ca46eSDavid Howells 59607ca46eSDavid Howells /* 60607ca46eSDavid Howells * idx and val are unique identifiers which 61607ca46eSDavid Howells * are used for message routing and 62607ca46eSDavid Howells * must be registered in connector.h for in-kernel usage. 63607ca46eSDavid Howells */ 64607ca46eSDavid Howells 65607ca46eSDavid Howells struct cb_id { 66607ca46eSDavid Howells __u32 idx; 67607ca46eSDavid Howells __u32 val; 68607ca46eSDavid Howells }; 69607ca46eSDavid Howells 70607ca46eSDavid Howells struct cn_msg { 71607ca46eSDavid Howells struct cb_id id; 72607ca46eSDavid Howells 73607ca46eSDavid Howells __u32 seq; 74607ca46eSDavid Howells __u32 ack; 75607ca46eSDavid Howells 76607ca46eSDavid Howells __u16 len; /* Length of the following data */ 77607ca46eSDavid Howells __u16 flags; 78*94dfc73eSGustavo A. R. Silva __u8 data[]; 79607ca46eSDavid Howells }; 80607ca46eSDavid Howells 81607ca46eSDavid Howells #endif /* _UAPI__CONNECTOR_H */ 82