Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  *  connector.h
0004  * 
0005  * 2004-2005 Copyright (c) Evgeniy Polyakov <zbr@ioremap.net>
0006  * All rights reserved.
0007  * 
0008  * This program is free software; you can redistribute it and/or modify
0009  * it under the terms of the GNU General Public License as published by
0010  * the Free Software Foundation; either version 2 of the License, or
0011  * (at your option) any later version.
0012  *
0013  * This program is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016  * GNU General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU General Public License
0019  * along with this program; if not, write to the Free Software
0020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0021  */
0022 
0023 #ifndef _UAPI__CONNECTOR_H
0024 #define _UAPI__CONNECTOR_H
0025 
0026 #include <linux/types.h>
0027 
0028 /*
0029  * Process Events connector unique ids -- used for message routing
0030  */
0031 #define CN_IDX_PROC         0x1
0032 #define CN_VAL_PROC         0x1
0033 #define CN_IDX_CIFS         0x2
0034 #define CN_VAL_CIFS                     0x1
0035 #define CN_W1_IDX           0x3 /* w1 communication */
0036 #define CN_W1_VAL           0x1
0037 #define CN_IDX_V86D         0x4
0038 #define CN_VAL_V86D_UVESAFB     0x1
0039 #define CN_IDX_BB           0x5 /* BlackBoard, from the TSP GPL sampling framework */
0040 #define CN_DST_IDX          0x6
0041 #define CN_DST_VAL          0x1
0042 #define CN_IDX_DM           0x7 /* Device Mapper */
0043 #define CN_VAL_DM_USERSPACE_LOG     0x1
0044 #define CN_IDX_DRBD         0x8
0045 #define CN_VAL_DRBD         0x1
0046 #define CN_KVP_IDX          0x9 /* HyperV KVP */
0047 #define CN_KVP_VAL          0x1 /* queries from the kernel */
0048 #define CN_VSS_IDX          0xA     /* HyperV VSS */
0049 #define CN_VSS_VAL          0x1     /* queries from the kernel */
0050 
0051 
0052 #define CN_NETLINK_USERS        11  /* Highest index + 1 */
0053 
0054 /*
0055  * Maximum connector's message size.
0056  */
0057 #define CONNECTOR_MAX_MSG_SIZE      16384
0058 
0059 /*
0060  * idx and val are unique identifiers which 
0061  * are used for message routing and 
0062  * must be registered in connector.h for in-kernel usage.
0063  */
0064 
0065 struct cb_id {
0066     __u32 idx;
0067     __u32 val;
0068 };
0069 
0070 struct cn_msg {
0071     struct cb_id id;
0072 
0073     __u32 seq;
0074     __u32 ack;
0075 
0076     __u16 len;      /* Length of the following data */
0077     __u16 flags;
0078     __u8 data[];
0079 };
0080 
0081 #endif /* _UAPI__CONNECTOR_H */