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

Functions to encode/decode DHCP packets. More...

#include <freeradius-devel/util/pair.h>
#include <freeradius-devel/util/rand.h>
#include <freeradius-devel/protocol/dhcpv4/rfc2131.h>
#include "dhcpv4.h"
#include "attrs.h"
+ Include dependency graph for packet.c:

Go to the source code of this file.

Functions

int fr_dhcpv4_decode (TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const *data, size_t data_len, unsigned int *code)
 
fr_packet_tfr_dhcpv4_packet_alloc (uint8_t const *data, ssize_t data_len)
 
int fr_dhcpv4_packet_encode (fr_packet_t *packet, fr_pair_list_t *list)
 
uint8_t const * fr_dhcpv4_packet_get_option (dhcp_packet_t const *packet, size_t packet_size, fr_dict_attr_t const *da)
 Retrieve a DHCP option from a raw packet buffer. More...
 

Detailed Description

Functions to encode/decode DHCP packets.

Id
c17c3ec21b5d95428725eb0fffda9d54fc668221

Definition in file packet.c.

Function Documentation

◆ fr_dhcpv4_decode()

int fr_dhcpv4_decode ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
uint8_t const *  data,
size_t  data_len,
unsigned int *  code 
)

Definition at line 100 of file packet.c.

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

◆ fr_dhcpv4_packet_alloc()

fr_packet_t* fr_dhcpv4_packet_alloc ( uint8_t const *  data,
ssize_t  data_len 
)

Definition at line 395 of file packet.c.

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

◆ fr_dhcpv4_packet_encode()

int fr_dhcpv4_packet_encode ( fr_packet_t packet,
fr_pair_list_t list 
)

Definition at line 367 of file packet.c.

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

◆ fr_dhcpv4_packet_get_option()

uint8_t const* fr_dhcpv4_packet_get_option ( dhcp_packet_t const *  packet,
size_t  packet_size,
fr_dict_attr_t const *  da 
)

Retrieve a DHCP option from a raw packet buffer.

Definition at line 37 of file packet.c.

+ Here is the caller graph for this function: