The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions | Variables
encode.c File Reference

Functions to encode BFD packets. More...

#include <freeradius-devel/util/dbuff.h>
#include <freeradius-devel/util/struct.h>
#include <freeradius-devel/io/test_point.h>
#include <freeradius-devel/internal/internal.h>
#include "attrs.h"
+ Include dependency graph for encode.c:

Go to the source code of this file.

Functions

static int encode_test_ctx (void **out, TALLOC_CTX *ctx)
 
static ssize_t encode_value (fr_dbuff_t *dbuff, fr_da_stack_t *da_stack, unsigned int depth, fr_dcursor_t *cursor, void *encode_ctx)
 Encodes the data portion of an attribute. More...
 
ssize_t fr_bfd_encode (uint8_t *out, size_t outlen, UNUSED uint8_t const *original, char const *secret, size_t secret_len, fr_pair_list_t *vps)
 Encode VPS into a BFD packet. More...
 
static ssize_t fr_bfd_encode_proto (UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, void *proto_ctx)
 
void * fr_bfd_next_encodable (fr_dlist_head_t *list, void *to_eval, void *uctx)
 

Variables

fr_test_point_proto_encode_t bfd_tp_encode_proto
 

Detailed Description

Functions to encode BFD packets.

Id
6c8153134cf5e2601198614054bf338b729e2a93

Definition in file encode.c.

Function Documentation

◆ encode_test_ctx()

static int encode_test_ctx ( void **  out,
TALLOC_CTX *  ctx 
)
static

Definition at line 165 of file encode.c.

◆ encode_value()

static ssize_t encode_value ( fr_dbuff_t dbuff,
fr_da_stack_t da_stack,
unsigned int  depth,
fr_dcursor_t cursor,
void *  encode_ctx 
)
static

Encodes the data portion of an attribute.

Returns
> 0, Length of the data portion. = 0, we could not encode anything, skip this attribute (and don't encode the header) unless it's one of a list of exceptions. < 0, How many additional bytes we'd need as a negative integer. PAIR_ENCODE_FATAL_ERROR - Abort encoding the packet.

Definition at line 43 of file encode.c.

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

◆ fr_bfd_encode()

ssize_t fr_bfd_encode ( uint8_t out,
size_t  outlen,
UNUSED uint8_t const *  original,
char const *  secret,
size_t  secret_len,
fr_pair_list_t vps 
)

Encode VPS into a BFD packet.

Definition at line 100 of file encode.c.

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

◆ fr_bfd_encode_proto()

static ssize_t fr_bfd_encode_proto ( UNUSED TALLOC_CTX *  ctx,
fr_pair_list_t vps,
uint8_t data,
size_t  data_len,
void *  proto_ctx 
)
static

Definition at line 179 of file encode.c.

+ Here is the call graph for this function:

◆ fr_bfd_next_encodable()

void* fr_bfd_next_encodable ( fr_dlist_head_t list,
void *  to_eval,
void *  uctx 
)

Variable Documentation

◆ bfd_tp_encode_proto

fr_test_point_proto_encode_t bfd_tp_encode_proto
Initial value:
= {
.test_ctx = encode_test_ctx,
}
static int encode_test_ctx(void **out, TALLOC_CTX *ctx)
Definition: encode.c:165
static ssize_t fr_bfd_encode_proto(UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, void *proto_ctx)
Definition: encode.c:179

Definition at line 212 of file encode.c.