Lines Matching +full:kernel +full:- +full:family

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 * Author: Paul Moore <paul@paul-moore.com>
12 * (c) Copyright Hewlett-Packard Development Company, L.P., 2006, 2008
32 * NetLabel - A management interface for maintaining network packet label
38 * inside the kernel; NetLabel provides a mechanism for user space applications
42 * send messages between kernel and user space. The general format of a
45 * +-----------------+-------------------+--------- --- -- -
47 * +-----------------+-------------------+--------- --- -- -
51 * 'nlmsghdr->nlmsg_type' and should be defined below, supporting functions
88 * NetLabel - Kernel API for accessing the network packet label mappings.
90 * The following functions are provided for use by other kernel modules,
91 * specifically kernel LSM modules, to provide a consistent, transparent API
110 * struct netlbl_lsm_cache - NetLabel LSM security attribute cache
131 * struct netlbl_lsm_catmap - NetLabel LSM secattr category bitmap
160 * struct netlbl_lsm_secattr - NetLabel LSM security attributes
190 /* bitmap meta-values for 'flags' */
208 * struct netlbl_calipso_ops - NetLabel CALIPSO operations
269 * netlbl_secattr_cache_alloc - Allocate and initialize a secattr cache
283 refcount_set(&cache->refcount, 1); in netlbl_secattr_cache_alloc_noprof()
290 * netlbl_secattr_cache_free - Frees a netlbl_lsm_cache struct
299 if (!refcount_dec_and_test(&cache->refcount)) in netlbl_secattr_cache_free()
302 if (cache->free) in netlbl_secattr_cache_free()
303 cache->free(cache->data); in netlbl_secattr_cache_free()
308 * netlbl_catmap_alloc - Allocate a LSM secattr catmap
323 * netlbl_catmap_free - Free a LSM secattr catmap
336 catmap = catmap->next; in netlbl_catmap_free()
342 * netlbl_secattr_init - Initialize a netlbl_lsm_secattr struct
355 * netlbl_secattr_destroy - Clears a netlbl_lsm_secattr struct
365 if (secattr->flags & NETLBL_SECATTR_FREE_DOMAIN) in netlbl_secattr_destroy()
366 kfree(secattr->domain); in netlbl_secattr_destroy()
367 if (secattr->flags & NETLBL_SECATTR_CACHE) in netlbl_secattr_destroy()
368 netlbl_secattr_cache_free(secattr->cache); in netlbl_secattr_destroy()
369 if (secattr->flags & NETLBL_SECATTR_MLS_CAT) in netlbl_secattr_destroy()
370 netlbl_catmap_free(secattr->attr.mls.cat); in netlbl_secattr_destroy()
374 * netlbl_secattr_alloc - Allocate and initialize a netlbl_lsm_secattr struct
389 * netlbl_secattr_free - Frees a netlbl_lsm_secattr struct
407 u16 family,
412 u16 family,
420 u16 family,
427 u16 family,
472 * LSM protocol operations (NetLabel LSM/kernel API)
476 u16 family,
489 u16 family,
492 u16 family,
494 void netlbl_skbuff_err(struct sk_buff *skb, u16 family, int error, int gateway);
501 int netlbl_cache_add(const struct sk_buff *skb, u16 family,
511 u16 family, in netlbl_cfg_map_del() argument
516 return -ENOSYS; in netlbl_cfg_map_del()
519 u16 family, in netlbl_cfg_unlbl_map_add() argument
524 return -ENOSYS; in netlbl_cfg_unlbl_map_add()
530 u16 family, in netlbl_cfg_unlbl_static_add() argument
534 return -ENOSYS; in netlbl_cfg_unlbl_static_add()
540 u16 family, in netlbl_cfg_unlbl_static_del() argument
543 return -ENOSYS; in netlbl_cfg_unlbl_static_del()
548 return -ENOSYS; in netlbl_cfg_cipsov4_add()
561 return -ENOSYS; in netlbl_cfg_cipsov4_map_add()
566 return -ENOSYS; in netlbl_cfg_calipso_add()
579 return -ENOSYS; in netlbl_cfg_calipso_map_add()
584 return -ENOENT; in netlbl_catmap_walk()
589 return -ENOENT; in netlbl_catmap_walkrng()
622 u16 family, in netlbl_sock_setattr() argument
626 return -ENOSYS; in netlbl_sock_setattr()
634 return -ENOSYS; in netlbl_sock_getattr()
640 return -ENOSYS; in netlbl_conn_setattr()
645 return -ENOSYS; in netlbl_req_setattr()
652 u16 family, in netlbl_skbuff_setattr() argument
655 return -ENOSYS; in netlbl_skbuff_setattr()
658 u16 family, in netlbl_skbuff_getattr() argument
661 return -ENOSYS; in netlbl_skbuff_getattr()
673 static inline int netlbl_cache_add(const struct sk_buff *skb, u16 family, in netlbl_cache_add() argument