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

Generic functions for decoding protocols. More...

#include <freeradius-devel/io/test_point.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/encode.h>
+ Include dependency graph for encode.c:

Go to the source code of this file.

Functions

ssize_t fr_pair_array_to_network (fr_dbuff_t *dbuff, fr_da_stack_t *da_stack, int depth, fr_dcursor_t *cursor, void *encode_ctx, fr_encode_dbuff_t encode_value)
 Encode an array of values from the network. More...
 
ssize_t fr_pair_cursor_to_network (fr_dbuff_t *dbuff, fr_da_stack_t *da_stack, unsigned int depth, fr_dcursor_t *cursor, void *encode_ctx, fr_encode_dbuff_t encode_pair)
 
ssize_t fr_pair_ref_to_network (fr_dbuff_t *dbuff, fr_da_stack_t *da_stack, unsigned int depth, fr_dcursor_t *cursor)
 Encode a foreign reference to the network. More...
 

Detailed Description

Generic functions for decoding protocols.

Id
9a776f1bccb6fda44ce026f2b5226ed31f045b25

Definition in file encode.c.

Function Documentation

◆ fr_pair_array_to_network()

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

Encode an array of values from the network.

Parameters
[out]dbuffbuffer to write the TLV to.
[in]da_stackDescribing nesting of options.
[in]depthin the da_stack.
[in,out]cursorCurrent attribute we're encoding.
[in]encode_ctxContaining DHCPv4 dictionary.
[in]encode_valueFunction to perform encoding of a single value.
Returns
  • >0 length of data encoded.
  • 0 if we ran out of space.
  • < 0 on error.

Definition at line 42 of file encode.c.

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

◆ fr_pair_cursor_to_network()

ssize_t fr_pair_cursor_to_network ( fr_dbuff_t dbuff,
fr_da_stack_t da_stack,
unsigned int  depth,
fr_dcursor_t cursor,
void *  encode_ctx,
fr_encode_dbuff_t  encode_pair 
)

Definition at line 71 of file encode.c.

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

◆ fr_pair_ref_to_network()

ssize_t fr_pair_ref_to_network ( fr_dbuff_t dbuff,
fr_da_stack_t da_stack,
unsigned int  depth,
fr_dcursor_t cursor 
)

Encode a foreign reference to the network.

Parameters
[out]dbuffbuffer to write the TLV to.
[in]da_stackDescribing nesting of options.
[in]depthin the da_stack.
[in,out]cursorCurrent attribute we're encoding.
Returns
  • >0 length of data encoded.
  • 0 if we ran out of space.
  • < 0 on error.

Definition at line 123 of file encode.c.

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