xref: /aosp_15_r20/external/wpa_supplicant_8/src/utils/bitfield.h (revision 03f9172ca588f91df233974f4258bab95191f931)
1*03f9172cSAndroid Build Coastguard Worker /*
2*03f9172cSAndroid Build Coastguard Worker  * Bitfield
3*03f9172cSAndroid Build Coastguard Worker  * Copyright (c) 2013, Jouni Malinen <[email protected]>
4*03f9172cSAndroid Build Coastguard Worker  *
5*03f9172cSAndroid Build Coastguard Worker  * This software may be distributed under the terms of the BSD license.
6*03f9172cSAndroid Build Coastguard Worker  * See README for more details.
7*03f9172cSAndroid Build Coastguard Worker  */
8*03f9172cSAndroid Build Coastguard Worker 
9*03f9172cSAndroid Build Coastguard Worker #ifndef BITFIELD_H
10*03f9172cSAndroid Build Coastguard Worker #define BITFIELD_H
11*03f9172cSAndroid Build Coastguard Worker 
12*03f9172cSAndroid Build Coastguard Worker struct bitfield;
13*03f9172cSAndroid Build Coastguard Worker 
14*03f9172cSAndroid Build Coastguard Worker struct bitfield * bitfield_alloc(size_t max_bits);
15*03f9172cSAndroid Build Coastguard Worker void bitfield_free(struct bitfield *bf);
16*03f9172cSAndroid Build Coastguard Worker void bitfield_set(struct bitfield *bf, size_t bit);
17*03f9172cSAndroid Build Coastguard Worker void bitfield_clear(struct bitfield *bf, size_t bit);
18*03f9172cSAndroid Build Coastguard Worker int bitfield_is_set(struct bitfield *bf, size_t bit);
19*03f9172cSAndroid Build Coastguard Worker int bitfield_get_first_zero(struct bitfield *bf);
20*03f9172cSAndroid Build Coastguard Worker 
21*03f9172cSAndroid Build Coastguard Worker #endif /* BITFIELD_H */
22