23 RCSID(
"$Id: 62da5ac014009284fdc84801e84423fcd33e8319 $")
25 #include <freeradius-devel/util/misc.h>
26 #include <freeradius-devel/util/packet.h>
27 #include <freeradius-devel/util/rand.h>
67 if (!packet)
return NULL;
70 if (!reply)
return NULL;
76 reply->
id = packet->
id;
93 if (!packet_p || !*packet_p)
return;
fr_packet_t * fr_packet_alloc_reply(TALLOC_CTX *ctx, fr_packet_t *packet)
Allocate a new fr_packet_t response.
fr_packet_t * fr_packet_alloc(TALLOC_CTX *ctx, bool new_vector)
Allocate a new fr_packet_t.
void fr_packet_free(fr_packet_t **packet_p)
Free a fr_packet_t.
void fr_rand_buffer(void *start, size_t length)
unsigned int code
Packet code (type).
fr_socket_t socket
This packet was received on.
int id
Packet ID (used to link requests/responses).
#define PACKET_VERIFY(_x)
uint8_t * data
Packet data (body).
size_t data_len
Length of packet data.
uint8_t vector[RADIUS_AUTH_VECTOR_LENGTH]
RADIUS authentication vector.
static void fr_socket_addr_swap(fr_socket_t *dst, fr_socket_t const *src)
Swap src/dst information of a fr_socket_t.
#define fr_strerror_const(_msg)