The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Typedefs
test_point.h File Reference
#include <freeradius-devel/util/dcursor.h>
#include <freeradius-devel/util/pair.h>
#include "proto.h"
#include "pair.h"
+ Include dependency graph for test_point.h:

Go to the source code of this file.

Data Structures

struct  fr_test_point_pair_decode_t
 Entry point for pair decoders. More...
 
struct  fr_test_point_pair_encode_t
 Entry point for pair encoders. More...
 
struct  fr_test_point_proto_decode_t
 Entry point for protocol decoders. More...
 
struct  fr_test_point_proto_encode_t
 Entry point for protocol encoders. More...
 

Typedefs

typedef int(* fr_test_point_ctx_alloc_t) (void **out, TALLOC_CTX *ctx)
 Allocate an encoder/decoder ctx. More...
 
typedef ssize_t(* fr_tp_proto_decode_t) (TALLOC_CTX *ctx, fr_pair_list_t *list, uint8_t const *data, size_t data_len, void *decode_ctx)
 A generic interface for decoding packets to fr_pair_ts. More...
 
typedef ssize_t(* fr_tp_proto_encode_t) (TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, void *encode_ctx)
 A generic interface for encoding fr_pair_ts to packets. More...
 

Data Structure Documentation

◆ fr_test_point_pair_decode_t

struct fr_test_point_pair_decode_t

Entry point for pair decoders.

Definition at line 83 of file test_point.h.

+ Collaboration diagram for fr_test_point_pair_decode_t:
Data Fields
fr_pair_decode_t func Decoder for pairs.
fr_test_point_ctx_alloc_t test_ctx Allocate a test ctx for the encoder.

◆ fr_test_point_pair_encode_t

struct fr_test_point_pair_encode_t

Entry point for pair encoders.

Definition at line 91 of file test_point.h.

+ Collaboration diagram for fr_test_point_pair_encode_t:
Data Fields
fr_dcursor_eval_t eval Evaluation function to filter attributes to encode.
fr_pair_encode_t func Encoder for pairs.
fr_dcursor_iter_t next_encodable Iterator to use to select attributes to encode.
fr_test_point_ctx_alloc_t test_ctx Allocate a test ctx for the encoder.

◆ fr_test_point_proto_decode_t

struct fr_test_point_proto_decode_t

Entry point for protocol decoders.

Definition at line 65 of file test_point.h.

+ Collaboration diagram for fr_test_point_proto_decode_t:
Data Fields
fr_tp_proto_decode_t func Decoder for proto layer.
fr_test_point_ctx_alloc_t test_ctx Allocate a test ctx for the encoder.

◆ fr_test_point_proto_encode_t

struct fr_test_point_proto_encode_t

Entry point for protocol encoders.

Definition at line 73 of file test_point.h.

+ Collaboration diagram for fr_test_point_proto_encode_t:
Data Fields
fr_dcursor_eval_t eval Evaluation function to filter attributes to encode.
fr_tp_proto_encode_t func Encoder for proto layer.
fr_test_point_ctx_alloc_t test_ctx Allocate a test ctx for the encoder.

Typedef Documentation

◆ fr_test_point_ctx_alloc_t

typedef int(* fr_test_point_ctx_alloc_t) (void **out, TALLOC_CTX *ctx)

Allocate an encoder/decoder ctx.

Parameters
[out]outWhere the decoder context should be written.
[in]ctxto allocate the test point context in.
Returns
proto or pair encoder or decoder ctx.

Definition at line 28 of file test_point.h.

◆ fr_tp_proto_decode_t

typedef ssize_t(* fr_tp_proto_decode_t) (TALLOC_CTX *ctx, fr_pair_list_t *list, uint8_t const *data, size_t data_len, void *decode_ctx)

A generic interface for decoding packets to fr_pair_ts.

A decoding function should decode a single top level packet from wire format.

Parameters
[in]ctxto allocate new pairs in.
[in]listwhere new VPs will be added
[in]datato decode.
[in]data_lenThe length of the incoming data.
[in]decode_ctxAny decode specific data such as secrets or configurable.
Returns
  • <= 0 on error. May be the offset (as a negative value) where the error occurred.
  • > 0 on success. How many bytes were decoded.

Definition at line 43 of file test_point.h.

◆ fr_tp_proto_encode_t

typedef ssize_t(* fr_tp_proto_encode_t) (TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, void *encode_ctx)

A generic interface for encoding fr_pair_ts to packets.

An encoding function should encode multiple VPs to a wire format packet

Parameters
[in]ctxto allocate any data in
[in]vpsvps to encode
[in]databuffer where data can be written
[in]data_lenThe length of the buffer, i.e. maximum packet length
[in]encode_ctxAny enccode specific data such as secrets or configurable.
Returns
  • <= 0 on error. May be the offset (as a negative value) where the error occurred.
  • > 0 on success. How many bytes were encoded

Definition at line 59 of file test_point.h.