1 #ifndef __IP_SET_BITMAP_H
2 #define __IP_SET_BITMAP_H
4 /* Bitmap type specific error codes */
6 /* The element is out of the range of the set */
7 IPSET_ERR_BITMAP_RANGE = IPSET_ERR_TYPE_SPECIFIC,
8 /* The range exceeds the size limit of the set type */
9 IPSET_ERR_BITMAP_RANGE_SIZE,
13 #define IPSET_BITMAP_MAX_RANGE 0x0000FFFF
15 /* Common functions */
18 range_to_mask(u32 from, u32 to, u8 *bits)
20 u32 mask = 0xFFFFFFFE;
23 while (--(*bits) > 0 && mask && (to & mask) != from)
29 #endif /* __KERNEL__ */
31 #endif /* __IP_SET_BITMAP_H */