The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
queue.h
Go to the documentation of this file.
1#pragma once
2/*
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16 */
17
18/**
19 * $Id: 7e0cb8b9a89ce5b2ead9e4fd780ee90492cdc668 $
20 * @file lib/bio/queue.h
21 * @brief Binary IO abstractions for queues of raw packets
22 *
23 * Write packets of data to bios. If a packet is partially
24 * read/written, it is cached for later processing.
25 *
26 * @copyright 2024 Network RADIUS SAS (legal@networkradius.com)
27 */
28RCSIDH(lib_bio_queue_h, "$Id: 7e0cb8b9a89ce5b2ead9e4fd780ee90492cdc668 $")
29
31
32typedef void (*fr_bio_queue_callback_t)(fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size);
33typedef void (*fr_bio_queue_saved_t)(fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size, fr_bio_queue_entry_t *queue_ctx);
34
35fr_bio_t *fr_bio_queue_alloc(TALLOC_CTX *ctx, size_t max_saved,
39 fr_bio_t *next) CC_HINT(nonnull(1,6));
40
41int fr_bio_queue_cancel(fr_bio_t *bio, fr_bio_queue_entry_t *queue_ctx) CC_HINT(nonnull);
static int const char char buffer[256]
Definition acutest.h:576
Definition queue.c:43
void(* fr_bio_queue_callback_t)(fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size)
Definition queue.h:32
fr_bio_t * fr_bio_queue_alloc(TALLOC_CTX *ctx, size_t max_saved, fr_bio_queue_saved_t saved, fr_bio_queue_callback_t sent, fr_bio_queue_callback_t cancel, fr_bio_t *next))
Allocate a packet-based bio.
Definition queue.c:388
int fr_bio_queue_cancel(fr_bio_t *bio, fr_bio_queue_entry_t *queue_ctx)
Cancel the write for a packet.
Definition queue.c:450
void(* fr_bio_queue_saved_t)(fr_bio_t *bio, void *packet_ctx, const void *buffer, size_t size, fr_bio_queue_entry_t *queue_ctx)
Definition queue.h:33
#define RCSIDH(h, id)
Definition build.h:484
int nonnull(2, 5))