Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
linux
netfilter
ipset
ip_set_bitmap.h
Go to the documentation of this file.
1
#ifndef __IP_SET_BITMAP_H
2
#define __IP_SET_BITMAP_H
3
4
#include <
uapi/linux/netfilter/ipset/ip_set_bitmap.h
>
5
6
#define IPSET_BITMAP_MAX_RANGE 0x0000FFFF
7
8
/* Common functions */
9
10
static
inline
u32
11
range_to_mask(
u32
from
,
u32
to,
u8
*
bits
)
12
{
13
u32
mask
= 0xFFFFFFFE;
14
15
*bits = 32;
16
while
(--(*bits) > 0 && mask && (to & mask) != from)
17
mask <<= 1;
18
19
return
mask
;
20
}
21
22
#endif
/* __IP_SET_BITMAP_H */
Generated on Thu Jan 10 2013 14:52:07 for Linux Kernel by
1.8.2