The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Data Structures | Typedefs
application.h File Reference

Application interfaces. More...

#include <freeradius-devel/io/base.h>
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/dl_module.h>
#include <freeradius-devel/server/virtual_servers.h>
#include <freeradius-devel/io/app_io.h>
+ Include dependency graph for application.h:

Go to the source code of this file.

Data Structures

struct  fr_app_t
 Describes a new application (protocol) More...
 
struct  fr_app_worker_t
 Public structure describing an application (protocol) specialisation. More...
 

Typedefs

typedef void(* fr_app_event_list_set_t) (fr_listen_t *li, fr_event_list_t *el, void *nr)
 Called by the network thread to pass an event list for the module to use for timer events. More...
 
typedef int(* fr_app_open_t) (void *instance, fr_schedule_t *sc, CONF_SECTION *cs)
 Open a new socket or other packet source. More...
 
typedef int(* fr_app_priority_get_t) (void const *instance, uint8_t const *buffer, size_t buflen)
 Set the priority of a packet. More...
 
typedef struct fr_schedule_s fr_schedule_t
 

Detailed Description

Application interfaces.

Id
2af80794111f17e16cafd9631a2eb22709d43eba

Definition in file application.h.


Data Structure Documentation

◆ fr_app_t

struct fr_app_t

Describes a new application (protocol)

This is the main application structure. It contains different callbacks that are run at different points during the server lifecycle and are called by the IO framework.

How the fr_app_t operates is specific to each protocol.

Definition at line 71 of file application.h.

+ Collaboration diagram for fr_app_t:
Data Fields
module_t common Common fields provided by all modules.
fr_io_decode_t decode Translate raw bytes into fr_pair_ts and metadata.

May be NULL. Here for convenience, so that decode operations common to all fr_app_io_t can be performed by the fr_app_t.

fr_dict_t const ** dict default dictionary for this application.
fr_io_encode_t encode Pack fr_pair_ts back into a byte array.

May be NULL. Here for convenience, so that encode operations common to all fr_app_io_t can be performed by the fr_app_t.

fr_app_open_t open Callback to allow the fr_app_t to build an fr_listen_t and register it with the scheduler so we can receive data.
fr_app_priority_get_t priority Assign a priority to the packet.

◆ fr_app_worker_t

struct fr_app_worker_t

Public structure describing an application (protocol) specialisation.

The fr_app_worker_t provides the state machine that's used to process the packet after its been decoded.

Definition at line 98 of file application.h.

+ Collaboration diagram for fr_app_worker_t:
Data Fields
module_t common Common fields to all loadable modules.
virtual_server_compile_t const * compile_list list of processing sections
module_method_t entry_point Entry point into the protocol subtype's state machine.

Typedef Documentation

◆ fr_app_event_list_set_t

typedef void(* fr_app_event_list_set_t) (fr_listen_t *li, fr_event_list_t *el, void *nr)

Called by the network thread to pass an event list for the module to use for timer events.

Definition at line 61 of file application.h.

◆ fr_app_open_t

typedef int(* fr_app_open_t) (void *instance, fr_schedule_t *sc, CONF_SECTION *cs)

Open a new socket or other packet source.

Parameters
[in]instanceof the fr_app_t.
[in]scwe should register sockets with.
[in]csof the listen section that created this fr_app_t.
Returns
  • 0 on success.
  • <0 on failure.

Definition at line 45 of file application.h.

◆ fr_app_priority_get_t

typedef int(* fr_app_priority_get_t) (void const *instance, uint8_t const *buffer, size_t buflen)

Set the priority of a packet.

Parameters
[in]instanceof the fr_app_t.
[in]bufferraw packet
[in]buflenlength of the packet
Returns
-1 - error, drop the packet 0 - no error, but we still drop the packet
  • - the priority of this packet

Definition at line 57 of file application.h.

◆ fr_schedule_t

typedef struct fr_schedule_s fr_schedule_t

Definition at line 1 of file application.h.