Lines Matching defs:bitmap

540  * @catmap: pointer to the category bitmap
600 * @catmap: the category bitmap
604 * This function walks a LSM secattr category bitmap starting at @offset and
613 NETLBL_CATMAP_MAPTYPE bitmap;
626 bitmap = iter->bitmap[idx] >> bit;
629 if (bitmap != 0) {
630 while ((bitmap & NETLBL_CATMAP_BIT) == 0) {
631 bitmap >>= 1;
644 bitmap = iter->bitmap[idx];
654 * @catmap: the category bitmap
658 * This function walks a LSM secattr category bitmap starting at @offset and
660 * the end of the bitmap.
670 NETLBL_CATMAP_MAPTYPE bitmap;
686 bitmap = iter->bitmap[idx];
687 while (bitmask != 0 && (bitmap & bitmask) != 0) {
712 * netlbl_catmap_getlong - Export an unsigned long bitmap
713 * @catmap: pointer to the category bitmap
715 * @bitmap: the exported bitmap
718 * Export a bitmap with an offset greater than or equal to @offset and return
719 * it in @bitmap. The @offset must be aligned to an unsigned long and will be
727 unsigned long *bitmap)
759 *bitmap = iter->bitmap[idx] >> (off % NETLBL_CATMAP_MAPSIZE);
766 * @catmap: pointer to the category bitmap
788 iter->bitmap[idx] |= NETLBL_CATMAP_BIT << (bit % NETLBL_CATMAP_MAPSIZE);
796 * @catmap: pointer to the category bitmap
830 * netlbl_catmap_setlong - Import an unsigned long bitmap
831 * @catmap: pointer to the category bitmap
832 * @offset: offset to the start of the imported bitmap
833 * @bitmap: the bitmap to import
837 * Import the bitmap specified in @bitmap into @catmap, using the offset
844 unsigned long bitmap,
860 iter->bitmap[idx] |= (NETLBL_CATMAP_MAPTYPE)bitmap
870 * netlbl_bitmap_walk - Walk a bitmap looking for a bit
871 * @bitmap: the bitmap
877 * Starting at @offset, walk the bitmap from left to right until either the
881 int netlbl_bitmap_walk(const unsigned char *bitmap, u32 bitmap_len,
892 byte = bitmap[byte_offset];
905 byte = bitmap[++byte_offset];
915 * netlbl_bitmap_setbit - Sets a single bit in a bitmap
916 * @bitmap: the bitmap
924 void netlbl_bitmap_setbit(unsigned char *bitmap, u32 bit, u8 state)
933 bitmap[byte_spot] |= bitmask;
935 bitmap[byte_spot] &= ~bitmask;