aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cipso_ipv4.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cipso_ipv4.h')
-rw-r--r--include/net/cipso_ipv4.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index a6bb94530cfd..5fe6556fb3c5 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -40,6 +40,7 @@
40#include <linux/net.h> 40#include <linux/net.h>
41#include <linux/skbuff.h> 41#include <linux/skbuff.h>
42#include <net/netlabel.h> 42#include <net/netlabel.h>
43#include <asm/atomic.h>
43 44
44/* known doi values */ 45/* known doi values */
45#define CIPSO_V4_DOI_UNKNOWN 0x00000000 46#define CIPSO_V4_DOI_UNKNOWN 0x00000000
@@ -79,10 +80,9 @@ struct cipso_v4_doi {
79 } map; 80 } map;
80 u8 tags[CIPSO_V4_TAG_MAXCNT]; 81 u8 tags[CIPSO_V4_TAG_MAXCNT];
81 82
82 u32 valid; 83 atomic_t refcount;
83 struct list_head list; 84 struct list_head list;
84 struct rcu_head rcu; 85 struct rcu_head rcu;
85 struct list_head dom_list;
86}; 86};
87 87
88/* Standard CIPSO mapping table */ 88/* Standard CIPSO mapping table */
@@ -128,25 +128,26 @@ extern int cipso_v4_rbm_strictvalid;
128 128
129#ifdef CONFIG_NETLABEL 129#ifdef CONFIG_NETLABEL
130int cipso_v4_doi_add(struct cipso_v4_doi *doi_def); 130int cipso_v4_doi_add(struct cipso_v4_doi *doi_def);
131int cipso_v4_doi_remove(u32 doi, 131void cipso_v4_doi_free(struct cipso_v4_doi *doi_def);
132 struct netlbl_audit *audit_info, 132int cipso_v4_doi_remove(u32 doi, struct netlbl_audit *audit_info);
133 void (*callback) (struct rcu_head * head));
134struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi); 133struct cipso_v4_doi *cipso_v4_doi_getdef(u32 doi);
134void cipso_v4_doi_putdef(struct cipso_v4_doi *doi_def);
135int cipso_v4_doi_walk(u32 *skip_cnt, 135int cipso_v4_doi_walk(u32 *skip_cnt,
136 int (*callback) (struct cipso_v4_doi *doi_def, void *arg), 136 int (*callback) (struct cipso_v4_doi *doi_def, void *arg),
137 void *cb_arg); 137 void *cb_arg);
138int cipso_v4_doi_domhsh_add(struct cipso_v4_doi *doi_def, const char *domain);
139int cipso_v4_doi_domhsh_remove(struct cipso_v4_doi *doi_def,
140 const char *domain);
141#else 138#else
142static inline int cipso_v4_doi_add(struct cipso_v4_doi *doi_def) 139static inline int cipso_v4_doi_add(struct cipso_v4_doi *doi_def)
143{ 140{
144 return -ENOSYS; 141 return -ENOSYS;
145} 142}
146 143
144static inline void cipso_v4_doi_free(struct cipso_v4_doi *doi_def)
145{
146 return;
147}
148
147static inline int cipso_v4_doi_remove(u32 doi, 149static inline int cipso_v4_doi_remove(u32 doi,
148 struct netlbl_audit *audit_info, 150 struct netlbl_audit *audit_info)
149 void (*callback) (struct rcu_head * head))
150{ 151{
151 return 0; 152 return 0;
152} 153}