Structures and functions for packet manipulation.
More...
#include <freeradius-devel/build.h>
#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/inet.h>
#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/rb.h>
#include <freeradius-devel/util/socket.h>
#include <freeradius-devel/util/talloc.h>
#include <freeradius-devel/util/time.h>
Go to the source code of this file.
Structures and functions for packet manipulation.
- Copyright
- 2001, 2002, 2003, 2004, 2005, 2006 The FreeRADIUS server project
Definition in file packet.h.
◆ fr_packet_t
Definition at line 56 of file packet.h.
| Data Fields |
|
unsigned int |
code |
Packet code (type). |
|
uint8_t * |
data |
Packet data (body). |
|
size_t |
data_len |
Length of packet data. |
|
int |
id |
Packet ID (used to link requests/responses). |
|
fr_rb_node_t |
node |
Allows insertion into the list.c rbtree, may be removed in future. |
|
size_t |
partial |
|
|
fr_socket_t |
socket |
This packet was received on. |
|
fr_time_t |
timestamp |
When we received the packet. |
|
void * |
uctx |
|
|
uint8_t |
vector[RADIUS_AUTH_VECTOR_LENGTH] |
RADIUS authentication vector. |
◆ PACKET_VERIFY
◆ RADIUS_AUTH_VECTOR_LENGTH
| #define RADIUS_AUTH_VECTOR_LENGTH 16 |
◆ fr_packet_alloc()
Allocate a new fr_packet_t.
- Parameters
-
| ctx | the context in which the packet is allocated. May be NULL if the packet is not associated with a request_t. |
| new_vector | if true a new request authenticator will be generated. |
- Returns
-
Definition at line 38 of file packet.c.
◆ fr_packet_alloc_reply()
Allocate a new fr_packet_t response.
- Parameters
-
| ctx | the context in which the packet is allocated. May be NULL if the packet is not associated with a request_t. |
| packet | The request packet. |
- Returns
-
Definition at line 63 of file packet.c.
◆ fr_packet_free()