The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
packet.h File Reference

Structures and functions for packet manipulation. More...

#include <freeradius-devel/util/packet.h>
#include <freeradius-devel/util/socket.h>
+ Include dependency graph for packet.h:

Go to the source code of this file.

Functions

int fr_packet_pairs_from_packet (TALLOC_CTX *ctx, fr_pair_list_t *list, fr_packet_t const *packet)
 Allocate a "Net." struct with src/dst host and port. More...
 
void fr_packet_pairs_to_packet (fr_packet_t *packet, fr_pair_list_t const *list)
 Convert pairs to information in a packet. More...
 
void packet_global_free (void)
 
int packet_global_init (void)
 Initialises the Net. More...
 

Detailed Description

Structures and functions for packet manipulation.

copyright 2023 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)

Definition in file packet.h.

Function Documentation

◆ fr_packet_pairs_from_packet()

int fr_packet_pairs_from_packet ( TALLOC_CTX *  ctx,
fr_pair_list_t list,
fr_packet_t const *  packet 
)

Allocate a "Net." struct with src/dst host and port.

Parameters
ctxThe context in which the packet is allocated.
[in]listfr_pair_list_t value to resolve to fr_packet_t.
[out]packetThe request packet.
Returns
  • 0 on success
  • <0 on error.

Definition at line 86 of file packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_packet_pairs_to_packet()

void fr_packet_pairs_to_packet ( fr_packet_t packet,
fr_pair_list_t const *  list 
)

Convert pairs to information in a packet.

Parameters
packetthe packet to send
listthe list to check for Net.*

Definition at line 136 of file packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ packet_global_free()

void packet_global_free ( void  )

Definition at line 176 of file packet.c.

+ Here is the caller graph for this function:

◆ packet_global_init()

int packet_global_init ( void  )

Initialises the Net.

packet attributes.

Note
Call packet_global_free() when the server is done to avoid leaks.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 163 of file packet.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: