1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * Netlink event notifications for SELinux. 4607ca46eSDavid Howells * 5607ca46eSDavid Howells * Author: James Morris <jmorris@redhat.com> 6607ca46eSDavid Howells * 7607ca46eSDavid Howells * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com> 8607ca46eSDavid Howells * 9607ca46eSDavid Howells * This program is free software; you can redistribute it and/or modify 10607ca46eSDavid Howells * it under the terms of the GNU General Public License version 2, 11607ca46eSDavid Howells * as published by the Free Software Foundation. 12607ca46eSDavid Howells */ 13607ca46eSDavid Howells #ifndef _LINUX_SELINUX_NETLINK_H 14607ca46eSDavid Howells #define _LINUX_SELINUX_NETLINK_H 15607ca46eSDavid Howells 16607ca46eSDavid Howells #include <linux/types.h> 17607ca46eSDavid Howells 18607ca46eSDavid Howells /* Message types. */ 19607ca46eSDavid Howells #define SELNL_MSG_BASE 0x10 20607ca46eSDavid Howells enum { 21607ca46eSDavid Howells SELNL_MSG_SETENFORCE = SELNL_MSG_BASE, 22607ca46eSDavid Howells SELNL_MSG_POLICYLOAD, 23607ca46eSDavid Howells SELNL_MSG_MAX 24607ca46eSDavid Howells }; 25607ca46eSDavid Howells 26607ca46eSDavid Howells #ifndef __KERNEL__ 27607ca46eSDavid Howells /* Multicast groups - backwards compatiblility for userspace */ 28607ca46eSDavid Howells #define SELNL_GRP_NONE 0x00000000 29607ca46eSDavid Howells #define SELNL_GRP_AVC 0x00000001 /* AVC notifications */ 30607ca46eSDavid Howells #define SELNL_GRP_ALL 0xffffffff 31607ca46eSDavid Howells #endif 32607ca46eSDavid Howells 33607ca46eSDavid Howells enum selinux_nlgroups { 34607ca46eSDavid Howells SELNLGRP_NONE, 35607ca46eSDavid Howells #define SELNLGRP_NONE SELNLGRP_NONE 36607ca46eSDavid Howells SELNLGRP_AVC, 37607ca46eSDavid Howells #define SELNLGRP_AVC SELNLGRP_AVC 38607ca46eSDavid Howells __SELNLGRP_MAX 39607ca46eSDavid Howells }; 40607ca46eSDavid Howells #define SELNLGRP_MAX (__SELNLGRP_MAX - 1) 41607ca46eSDavid Howells 42607ca46eSDavid Howells /* Message structures */ 43607ca46eSDavid Howells struct selnl_msg_setenforce { 44607ca46eSDavid Howells __s32 val; 45607ca46eSDavid Howells }; 46607ca46eSDavid Howells 47607ca46eSDavid Howells struct selnl_msg_policyload { 48607ca46eSDavid Howells __u32 seqno; 49607ca46eSDavid Howells }; 50607ca46eSDavid Howells 51607ca46eSDavid Howells #endif /* _LINUX_SELINUX_NETLINK_H */ 52