Binary IO abstractions for fr_packet_t.
More...
#include <freeradius-devel/util/packet.h>
#include <freeradius-devel/bio/base.h>
Go to the source code of this file.
Binary IO abstractions for fr_packet_t.
- Id
- 67853fd048f654ca4e0d5094fcfdfb72b21164d7
- Copyright
- 2024 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file packet.h.
◆ fr_bio_packet_cb_funcs_t
struct fr_bio_packet_cb_funcs_t |
◆ fr_bio_packet_s
◆ fr_bio_packet_callback_t
◆ fr_bio_packet_io_t
◆ fr_bio_packet_read_t
Read a packet and pairs from the network.
- Parameters
-
bio | the packet-based bio |
request_ctx_p | the request context associated with the response |
packet_p | the response packet. Contains raw protocol data (IDs, counts, etc.) |
out_ctx | talloc context for the list |
out | the decoded pairs from the packet |
- Returns
- <0 on error
- 0 for success (*packet_p may still be NULL tho)
Definition at line 45 of file packet.h.
◆ fr_bio_packet_signal_t
Signal an outgoing packet.
- Parameters
-
bio | the packet-based bio |
packet | the output packet descriptor. Contains raw protocol data (IDs, counts, etc.) |
Definition at line 64 of file packet.h.
◆ fr_bio_packet_t
◆ fr_bio_packet_write_t
Write a packet and pairs from the network.
- Parameters
-
bio | the packet-based bio |
rctx | the request context |
packet | the request packet. Contains raw protocol data (IDs, counts, etc.) |
list | the pairs to encode in the packet |
- Returns
- <0 on error (EOF, fail, etc,)
- 0 for success
Definition at line 57 of file packet.h.
◆ fr_bio_packet_connect()
int fr_bio_packet_connect |
( |
fr_bio_t * |
bio | ) |
|
◆ fr_bio_packet_connected()
void fr_bio_packet_connected |
( |
fr_bio_t * |
bio | ) |
|
Called when a particular BIO is connected.
We see if we can connect the previous BIOs.
Definition at line 116 of file packet.c.
◆ fr_bio_packet_init()
◆ fr_bio_packet_read()
Read a packet from a packet BIO.
Note that the bio MAY return fr_bio_error(IO_WOULD_BLOCK), which is not a fatal error. The caller has to check for that case, and handle blocking errors. Typically by pushing the packet to a queue, and trying it again later.
- Parameters
-
| my | the packet-based bio |
[out] | pctx_p | the larger context for the original request packet |
[out] | packet_p | Where the allocated fr_packet_t will be stored |
[out] | out_ctx | for the output pairs |
[out] | out | decoded output pairs |
- Returns
-
Definition at line 119 of file packet.h.
◆ fr_bio_packet_write()
Write a packet to a packet BIO.
Note that the bio MAY return fr_bio_error(IO_WOULD_BLOCK), which is not a fatal error. The caller has to check for that case, and handle blocking errors. Typically by pushing the packet to a queue, and trying it again later.
- Parameters
-
my | the packet-based bio |
pctx | the larger context for the packet |
packet | the output packet descriptor. Contains raw protocol data (IDs, counts, etc.) |
list | of pairs to write |
- Returns
-
Definition at line 138 of file packet.h.
◆ fr_bio_packet_write_flush()
Flush a bio which is blocked.
Note that the bio MAY return fr_bio_error(IO_WOULD_BLOCK), which is not a fatal error. The caller has to check for that case, and handle blocking errors. Typically by pushing the packet to a queue, and trying it again later.
- Parameters
-
- Returns
-
Definition at line 165 of file packet.h.