2 * NetLabel Management Support
4 * This file defines the management functions for the NetLabel system. The
5 * NetLabel system manages static and dynamic label mappings for network
6 * protocols such as CIPSO and RIPSO.
8 * Author: Paul Moore <paul.moore@hp.com>
13 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
23 * the GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 #ifndef _NETLABEL_MGMT_H
32 #define _NETLABEL_MGMT_H
34 #include <net/netlabel.h>
35 #include <asm/atomic.h>
38 * The following NetLabel payloads are supported by the management interface.
41 * Sent by an application to add a domain mapping to the NetLabel system.
43 * Required attributes:
46 * NLBL_MGMT_A_PROTOCOL
48 * If using NETLBL_NLTYPE_CIPSOV4 the following attributes are required:
52 * If using NETLBL_NLTYPE_UNLABELED no other attributes are required.
55 * Sent by an application to remove a domain mapping from the NetLabel
58 * Required attributes:
63 * This message can be sent either from an application or by the kernel in
64 * response to an application generated LISTALL message. When sent by an
65 * application there is no payload and the NLM_F_DUMP flag should be set.
66 * The kernel should respond with a series of the following messages.
68 * Required attributes:
71 * NLBL_MGMT_A_PROTOCOL
73 * If using NETLBL_NLTYPE_CIPSOV4 the following attributes are required:
77 * If using NETLBL_NLTYPE_UNLABELED no other attributes are required.
80 * Sent by an application to set the default domain mapping for the NetLabel
83 * Required attributes:
85 * NLBL_MGMT_A_PROTOCOL
87 * If using NETLBL_NLTYPE_CIPSOV4 the following attributes are required:
91 * If using NETLBL_NLTYPE_UNLABELED no other attributes are required.
94 * Sent by an application to remove the default domain mapping from the
95 * NetLabel system, there is no payload.
98 * This message can be sent either from an application or by the kernel in
99 * response to an application generated LISTDEF message. When sent by an
100 * application there is no payload. On success the kernel should send a
101 * response using the following format.
103 * Required attributes:
105 * NLBL_MGMT_A_PROTOCOL
107 * If using NETLBL_NLTYPE_CIPSOV4 the following attributes are required:
111 * If using NETLBL_NLTYPE_UNLABELED no other attributes are required.
114 * Sent by an application to request a list of configured NetLabel protocols
115 * in the kernel. When sent by an application there is no payload and the
116 * NLM_F_DUMP flag should be set. The kernel should respond with a series of
117 * the following messages.
119 * Required attributes:
121 * NLBL_MGMT_A_PROTOCOL
124 * Sent by an application to request the NetLabel version. When sent by an
125 * application there is no payload. This message type is also used by the
126 * kernel to respond to an VERSION request.
128 * Required attributes:
130 * NLBL_MGMT_A_VERSION
134 /* NetLabel Management commands */
141 NLBL_MGMT_C_REMOVEDEF,
143 NLBL_MGMT_C_PROTOCOLS,
147 #define NLBL_MGMT_C_MAX (__NLBL_MGMT_C_MAX - 1)
149 /* NetLabel Management attributes */
154 * the NULL terminated LSM domain string */
155 NLBL_MGMT_A_PROTOCOL,
157 * the NetLabel protocol type (defined by NETLBL_NLTYPE_*) */
160 * the NetLabel protocol version number (defined by
161 * NETLBL_PROTO_VERSION) */
164 * the CIPSOv4 DOI value */
167 #define NLBL_MGMT_A_MAX (__NLBL_MGMT_A_MAX - 1)
169 /* NetLabel protocol functions */
170 int netlbl_mgmt_genl_init(void);
172 /* NetLabel configured protocol reference counter */
173 extern atomic_t netlabel_mgmt_protocount;