Lines Matching refs:catmap

539  * _netlbl_catmap_getnode - Get a individual node from a catmap
540 * @catmap: pointer to the category bitmap
542 * @cm_flags: catmap flags, see _CM_F_*
546 * Iterate through the catmap looking for the node associated with @offset.
548 * one will be created and inserted into the catmap. If the _CM_F_WALK flag is
554 struct netlbl_lsm_catmap **catmap,
559 struct netlbl_lsm_catmap *iter = *catmap;
588 iter->next = *catmap;
589 *catmap = iter;
599 * netlbl_catmap_walk - Walk a LSM secattr catmap looking for a bit
600 * @catmap: the category bitmap
608 int netlbl_catmap_walk(struct netlbl_lsm_catmap *catmap, u32 offset)
615 iter = _netlbl_catmap_getnode(&catmap, offset, _CM_F_WALK, 0);
654 * @catmap: the category bitmap
663 int netlbl_catmap_walkrng(struct netlbl_lsm_catmap *catmap, u32 offset)
672 iter = _netlbl_catmap_getnode(&catmap, offset, _CM_F_WALK, 0);
713 * @catmap: pointer to the category bitmap
720 * updated on return if different from what was requested; if the catmap is
725 int netlbl_catmap_getlong(struct netlbl_lsm_catmap *catmap,
737 /* a null catmap is equivalent to an empty one */
738 if (!catmap) {
743 if (off < catmap->startbit) {
744 off = catmap->startbit;
747 iter = _netlbl_catmap_getnode(&catmap, off, _CM_F_WALK, 0);
765 * netlbl_catmap_setbit - Set a bit in a LSM secattr catmap
766 * @catmap: pointer to the category bitmap
771 * Set the bit specified by @bit in @catmap. Returns zero on success,
775 int netlbl_catmap_setbit(struct netlbl_lsm_catmap **catmap,
782 iter = _netlbl_catmap_getnode(catmap, bit, _CM_F_ALLOC, flags);
795 * netlbl_catmap_setrng - Set a range of bits in a LSM secattr catmap
796 * @catmap: pointer to the category bitmap
806 int netlbl_catmap_setrng(struct netlbl_lsm_catmap **catmap,
817 rc = netlbl_catmap_setlong(catmap,
823 rc = netlbl_catmap_setbit(catmap, spot++, flags);
831 * @catmap: pointer to the category bitmap
837 * Import the bitmap specified in @bitmap into @catmap, using the offset
842 int netlbl_catmap_setlong(struct netlbl_lsm_catmap **catmap,
854 iter = _netlbl_catmap_getnode(catmap, offset, _CM_F_ALLOC, flags);