|
static int8_t | _entry_cmp (void const *one, void const *two) |
|
fr_bio_t * | fr_bio_dedup_alloc (TALLOC_CTX *ctx, size_t max_saved, fr_bio_dedup_receive_t receive, fr_bio_dedup_release_t release, fr_bio_dedup_get_item_t get_item, fr_bio_dedup_config_t const *cfg, fr_bio_t *next) |
| Allocate a fr_bio_dedup_t. More...
|
|
static ssize_t | fr_bio_dedup_blocked (fr_bio_dedup_t *my, fr_bio_dedup_entry_t *item, ssize_t rcode) |
| The write is blocked. More...
|
|
static ssize_t | fr_bio_dedup_blocked_data (fr_bio_dedup_t *my, uint8_t const *buffer, size_t size, ssize_t rcode) |
| The write is blocked, but we don't have "item". More...
|
|
static int | fr_bio_dedup_buffer_save (fr_bio_dedup_t *my, uint8_t const *buffer, size_t size, ssize_t rcode) |
| Save partially written data to our local buffer. More...
|
|
static ssize_t | fr_bio_dedup_buffer_write (fr_bio_dedup_t *my) |
| Write data from our local buffer to the next bio. More...
|
|
static int | fr_bio_dedup_destructor (fr_bio_dedup_t *my) |
| Remove the dedup cache. More...
|
|
void | fr_bio_dedup_entry_cancel (fr_bio_t *bio, fr_bio_dedup_entry_t *item) |
| Cancel one item. More...
|
|
int | fr_bio_dedup_entry_extend (fr_bio_t *bio, fr_bio_dedup_entry_t *item, fr_time_t expires) |
| Extend the expiry time for an entry. More...
|
|
static ssize_t | fr_bio_dedup_flush_pending (fr_bio_dedup_t *my) |
| Flush any packets in the pending queue. More...
|
|
static ssize_t | fr_bio_dedup_read (fr_bio_t *bio, void *packet_ctx, void *buffer, size_t size) |
|
static void | fr_bio_dedup_release (fr_bio_dedup_t *my, fr_bio_dedup_entry_t *item, fr_bio_dedup_release_reason_t reason) |
| Release an entry back to the free list. More...
|
|
static void | fr_bio_dedup_replied (fr_bio_dedup_t *my, fr_bio_dedup_entry_t *item) |
| Move an item from active to replied. More...
|
|
static int | fr_bio_dedup_reset_timer (fr_bio_dedup_t *my) |
| Reset the timer after changing the rb tree. More...
|
|
static void | fr_bio_dedup_reset_timer_item (fr_bio_dedup_t *my, fr_bio_dedup_entry_t *item) |
|
ssize_t | fr_bio_dedup_respond (fr_bio_t *bio, fr_bio_dedup_entry_t *item) |
| Resend a reply when we receive a duplicate request. More...
|
|
static void | fr_bio_dedup_timer (UNUSED fr_event_list_t *el, fr_time_t now, void *uctx) |
| Expire an entry when its timer fires. More...
|
|
static ssize_t | fr_bio_dedup_write (fr_bio_t *bio, void *packet_ctx, void const *buffer, size_t size) |
| Write raw data to the bio. More...
|
|
static ssize_t | fr_bio_dedup_write_data (fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size) |
| There's a partial block of data written. More...
|
|
static ssize_t | fr_bio_dedup_write_partial (fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size) |
| There's a partial packet written. More...
|
|
Binary IO abstractions for deduping packets.
- Id
- ab4555a4d2ce7461cc77a460269fd40343d29961
- Copyright
- 2024 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file dedup.c.
The write is blocked, but we don't have "item".
We couldn't write out the entire packet, the bio is blocked. Don't write anything else until we become unblocked!
Do NOT free the timer. We can still expire old entries. This newly written entry usually ends up as the last item in the RB tree.
Definition at line 699 of file dedup.c.
static ssize_t fr_bio_dedup_write |
( |
fr_bio_t * |
bio, |
|
|
void * |
packet_ctx, |
|
|
void const * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
static |
Write raw data to the bio.
This function is largely a duplicate of fr_bio_dedup_respond(). Except due to the BIO API, it can be passed a NULL buffer (for flushing the BIOs), and it can't be passed a fr_bio_dedup_entry_t, and instead has to be passed a "void *packet_ctx".
The caller is free to ignore this function,
Definition at line 759 of file dedup.c.
static ssize_t fr_bio_dedup_write_partial |
( |
fr_bio_t * |
bio, |
|
|
void * |
packet_ctx, |
|
|
const void * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
static |
There's a partial packet written.
Write all of that one first, before writing another packet.
The packet can either be cancelled, or IO blocked. In either case, we must write this packet before we can write another one.
Definition at line 530 of file dedup.c.