/*
 * CALIPSO - Common Architecture Label IPv6 Security Option
 *
 * This is an implementation of the CALIPSO protocol as specified in
 * RFC 5570.
 *
 * Authors: Paul Moore <paul@paul-moore.com>
 *          Huw Davies <huw@codeweavers.com>
 *
 */

/*
 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006
 * (c) Copyright Huw Davies <huw@codeweavers.com>, 2015
 *
 * This program is free software;  you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY;  without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 * the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program;  if not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef _CALIPSO_H
#define _CALIPSO_H

#include <linux/types.h>
#include <linux/rcupdate.h>
#include <linux/list.h>
#include <linux/net.h>
#include <linux/skbuff.h>
#include <net/netlabel.h>
#include <net/request_sock.h>
#include <linux/atomic.h>
#include <asm/unaligned.h>

/* known doi values */
#define CALIPSO_DOI_UNKNOWN          0x00000000

/* doi mapping types */
#define CALIPSO_MAP_UNKNOWN          0
#define CALIPSO_MAP_PASS             2

/*
 * CALIPSO DOI definitions
 */

/* DOI definition struct */
struct calipso_doi {
	u32 doi;
	u32 type;

	atomic_t refcount;
	struct list_head list;
	struct rcu_head rcu;
};

/*
 * Sysctl Variables
 */
extern int calipso_cache_enabled;
extern int calipso_cache_bucketsize;

#ifdef CONFIG_NETLABEL
int __init calipso_init(void);
void calipso_exit(void);
bool calipso_validate(const struct sk_buff *skb, const unsigned char *option);
#else
static inline int __init calipso_init(void)
{
	return 0;
}

static inline void calipso_exit(void)
{
}
static inline bool calipso_validate(const struct sk_buff *skb,
				    const unsigned char *option)
{
	return true;
}
#endif /* CONFIG_NETLABEL */

#endif /* _CALIPSO_H */
rnel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/kernel/membarrier.c'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='3efa70d78f218e4c9276b0bac0545e5184c1c47b'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/kernel?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>kernel</a>/<a href='/cgit.cgi/linux/net-next.git/commit/kernel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>membarrier.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='3efa70d78f218e4c9276b0bac0545e5184c1c47b'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>David S. Miller &lt;davem@davemloft.net&gt;</td><td class='right'>2017-02-07 16:29:30 -0500</td></tr>
<tr><th>committer</th><td>David S. Miller &lt;davem@davemloft.net&gt;</td><td class='right'>2017-02-07 16:29:30 -0500</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/kernel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>3efa70d78f218e4c9276b0bac0545e5184c1c47b</a> (<a href='/cgit.cgi/linux/net-next.git/patch/kernel/membarrier.c?id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>f4abe2f05e173023d2a262afd4aebb1e89fe6985</a> /<a href='/cgit.cgi/linux/net-next.git/tree/kernel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>kernel/membarrier.c</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/kernel/membarrier.c?h=nds-private-remove&amp;id=76e0e70e6452b971a69cc9794ff4a6715c11f7f2'>76e0e70e6452b971a69cc9794ff4a6715c11f7f2</a> (<a href='/cgit.cgi/linux/net-next.git/diff/kernel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b&amp;id2=76e0e70e6452b971a69cc9794ff4a6715c11f7f2'>diff</a>)</td></tr><tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/kernel/membarrier.c?h=nds-private-remove&amp;id=926af6273fc683cd98cd0ce7bf0d04a02eed6742'>926af6273fc683cd98cd0ce7bf0d04a02eed6742</a> (<a href='/cgit.cgi/linux/net-next.git/diff/kernel/membarrier.c?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b&amp;id2=926af6273fc683cd98cd0ce7bf0d04a02eed6742'>diff</a>)</td></tr></table>
<div class='commit-subject'>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</div><div class='commit-msg'>The conflict was an interaction between a bug fix in the
netvsc driver in 'net' and an optimization of the RX path
in 'net-next'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?h=nds-private-remove&amp;id=3efa70d78f218e4c9276b0bac0545e5184c1c47b'>Diffstat</a> (limited to 'kernel/membarrier.c')</div><table summary='diffstat' class='diffstat'>