|
iPXE
|
Bitmaps for multicast downloads. More...
Go to the source code of this file.
Data Structures | |
| struct | bitmap |
| A bitmap. More... | |
Macros | |
| #define | BITMAP_BLKSIZE ( sizeof ( bitmap_block_t ) * 8 ) |
| Size of a block of bits (in bits) More... | |
| #define | BITMAP_INDEX(bit) ( (bit) / BITMAP_BLKSIZE ) |
| Block index within bitmap. More... | |
| #define | BITMAP_MASK(bit) ( 1UL << ( (bit) % BITMAP_BLKSIZE ) ) |
| Block mask within bitmap. More... | |
Typedefs | |
| typedef unsigned long | bitmap_block_t |
| A single block of bits within a bitmap. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| int | bitmap_resize (struct bitmap *bitmap, unsigned int new_length) |
| Resize bitmap. More... | |
| int | bitmap_test (struct bitmap *bitmap, unsigned int bit) |
| Test bit in bitmap. More... | |
| void | bitmap_set (struct bitmap *bitmap, unsigned int bit) |
| Set bit in bitmap. More... | |
| static void | bitmap_free (struct bitmap *bitmap) |
| Free bitmap resources. More... | |
| static unsigned int | bitmap_first_gap (struct bitmap *bitmap) |
| Get first gap within bitmap. More... | |
| static int | bitmap_full (struct bitmap *bitmap) |
| Check to see if bitmap is full. More... | |
Bitmaps for multicast downloads.
Definition in file bitmap.h.
| #define BITMAP_BLKSIZE ( sizeof ( bitmap_block_t ) * 8 ) |
| #define BITMAP_INDEX | ( | bit | ) | ( (bit) / BITMAP_BLKSIZE ) |
| #define BITMAP_MASK | ( | bit | ) | ( 1UL << ( (bit) % BITMAP_BLKSIZE ) ) |
| typedef unsigned long bitmap_block_t |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| int bitmap_resize | ( | struct bitmap * | bitmap, |
| unsigned int | new_length | ||
| ) |
Resize bitmap.
| bitmap | Bitmap |
| new_length | New length of bitmap, in bits |
| rc | Return status code |
Definition at line 42 of file bitmap.c.
References BITMAP_BLKSIZE, BITMAP_INDEX, bitmap::blocks, DBGC, ENOMEM, bitmap::length, and realloc().
Referenced by slam_open(), slam_pull_header(), and tftp_presize().
| int bitmap_test | ( | struct bitmap * | bitmap, |
| unsigned int | bit | ||
| ) |
Test bit in bitmap.
| bitmap | Bitmap |
| bit | Bit index |
| is_set | Bit is set |
Definition at line 78 of file bitmap.c.
References bit, BITMAP_INDEX, BITMAP_MASK, bitmap::blocks, index, and bitmap::length.
Referenced by bitmap_set(), slam_mc_socket_deliver(), and slam_tx_nack().
| void bitmap_set | ( | struct bitmap * | bitmap, |
| unsigned int | bit | ||
| ) |
Set bit in bitmap.
| bitmap | Bitmap |
| bit | Bit index |
Definition at line 93 of file bitmap.c.
References bit, BITMAP_INDEX, BITMAP_MASK, bitmap_test(), bitmap::blocks, DBGC, bitmap::first_gap, and index.
Referenced by slam_mc_socket_deliver(), and tftp_rx_data().
|
inlinestatic |
Free bitmap resources.
| bitmap | Bitmap |
Definition at line 57 of file bitmap.h.
References bitmap::blocks, and free.
Referenced by slam_free(), slam_pull_header(), tftp_free(), and tftp_timer_expired().
|
inlinestatic |
Get first gap within bitmap.
| bitmap | Bitmap |
| first_gap | First gap |
The first gap is the first unset bit within the bitmap.
Definition at line 69 of file bitmap.h.
References bitmap::first_gap.
Referenced by slam_tx_nack(), tftp_rx_data(), and tftp_send_ack().
|
inlinestatic |
Check to see if bitmap is full.
| bitmap | Bitmap |
| is_full | Bitmap is full |
The bitmap is full if it has no gaps (i.e. no unset bits).
Definition at line 81 of file bitmap.h.
References bitmap::first_gap, and bitmap::length.
Referenced by slam_mc_socket_deliver(), and tftp_rx_data().
1.8.15