2 * NetLabel CALIPSO Support
4 * This file defines the CALIPSO 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 * Authors: Paul Moore <paul@paul-moore.com>
9 * Huw Davies <huw@codeweavers.com>
13 /* (c) Copyright Hewlett-Packard Development Company, L.P., 2006
14 * (c) Copyright Huw Davies <huw@codeweavers.com>, 2015
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
24 * the GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see <http://www.gnu.org/licenses/>.
31 #ifndef _NETLABEL_CALIPSO
32 #define _NETLABEL_CALIPSO
34 #include <net/netlabel.h>
35 #include <net/calipso.h>
37 /* The following NetLabel payloads are supported by the CALIPSO subsystem.
40 * Sent by an application to add a new DOI mapping table.
42 * Required attributes:
45 * NLBL_CALIPSO_A_MTYPE
47 * If using CALIPSO_MAP_PASS no additional attributes are required.
51 /* NetLabel CALIPSO commands */
53 NLBL_CALIPSO_C_UNSPEC,
55 NLBL_CALIPSO_C_REMOVE,
57 NLBL_CALIPSO_C_LISTALL,
61 /* NetLabel CALIPSO attributes */
63 NLBL_CALIPSO_A_UNSPEC,
69 * the mapping table type (defined in the calipso.h header as
74 #define NLBL_CALIPSO_A_MAX (__NLBL_CALIPSO_A_MAX - 1)
76 /* NetLabel protocol functions */
77 #if IS_ENABLED(CONFIG_IPV6)
78 int netlbl_calipso_genl_init(void);
80 static inline int netlbl_calipso_genl_init(void)
86 int calipso_doi_add(struct calipso_doi *doi_def,
87 struct netlbl_audit *audit_info);
88 void calipso_doi_free(struct calipso_doi *doi_def);