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

Protocol module API. More...

#include <freeradius-devel/io/base.h>
#include <freeradius-devel/server/dl_module.h>
#include <freeradius-devel/server/listen.h>
+ Include dependency graph for protocol.h:

Go to the source code of this file.

Data Structures

struct  rad_protocol_s
 Struct exported by a proto_* module. More...
 

Macros

#define TRANSPORT_DUAL   (TRANSPORT_UDP | TRANSPORT_TCP)
 
#define TRANSPORT_NONE   0
 
#define TRANSPORT_TCP   (1 << IPPROTO_TCP)
 
#define TRANSPORT_UDP   (1 << IPPROTO_UDP)
 

Typedefs

typedef void(* rad_listen_free_t) (rad_listen_t *)
 
typedef int(* rad_listen_parse_t) (CONF_SECTION *, rad_listen_t *)
 
typedef int(* rad_listen_unlang_t) (CONF_SECTION *, CONF_SECTION *)
 
typedef struct rad_protocol_s rad_protocol_t
 Struct exported by a proto_* module. More...
 

Functions

void common_packet_debug (request_t *request, fr_packet_t *packet, fr_pair_list_t *pairs, bool received)
 
int common_socket_open (CONF_SECTION *cs, rad_listen_t *this)
 
int common_socket_parse (CONF_SECTION *cs, rad_listen_t *this)
 
int common_socket_print (rad_listen_t const *this, char *buffer, size_t bufsize)
 

Detailed Description

Protocol module API.

Id
6550c11a88b99d138689f1461e1b28bd7864779e

Definition in file protocol.h.


Data Structure Documentation

◆ rad_protocol_s

struct rad_protocol_s

Struct exported by a proto_* module.

Used to pass information common to proto_* modules to the server core, and to register callbacks that get executed when processing packets of this protocol type.

Definition at line 58 of file protocol.h.

+ Collaboration diagram for rad_protocol_s:
Data Fields
rad_listen_unlang_t bootstrap Phase1 - Basic validation checks of virtual server.
rad_listen_unlang_t compile Phase2 - Compile unlang sections in the virtual server that map to packet types used by the protocol.
rad_listen_debug_t debug Print an attribute list for debugging.
rad_listen_decode_t decode Decode an incoming packet.
DL_MODULE_COMMON Common fields to all loadable modules.
rad_listen_encode_t encode Encode an outgoing packet.
rad_listen_error_t error Handle error/eol on the descriptor.
rad_listen_parse_t open Open a descriptor.
rad_listen_parse_t parse Perform extra processing of the configuration data specified by config.
rad_listen_print_t print Print a line describing the packet being sent or the packet that was received.
rad_listen_recv_t recv Read an incoming packet from the descriptor.
rad_listen_send_t send Write an outgoing packet to the descriptor.
bool tls Whether protocol can be wrapped in TLS.
uint32_t transports What can transport this protocol.

Macro Definition Documentation

◆ TRANSPORT_DUAL

#define TRANSPORT_DUAL   (TRANSPORT_UDP | TRANSPORT_TCP)

Definition at line 88 of file protocol.h.

◆ TRANSPORT_NONE

#define TRANSPORT_NONE   0

Definition at line 85 of file protocol.h.

◆ TRANSPORT_TCP

#define TRANSPORT_TCP   (1 << IPPROTO_TCP)

Definition at line 86 of file protocol.h.

◆ TRANSPORT_UDP

#define TRANSPORT_UDP   (1 << IPPROTO_UDP)

Definition at line 87 of file protocol.h.

Typedef Documentation

◆ rad_listen_free_t

typedef void(* rad_listen_free_t) (rad_listen_t *)

Definition at line 42 of file protocol.h.

◆ rad_listen_parse_t

typedef int(* rad_listen_parse_t) (CONF_SECTION *, rad_listen_t *)

Definition at line 40 of file protocol.h.

◆ rad_listen_unlang_t

typedef int(* rad_listen_unlang_t) (CONF_SECTION *, CONF_SECTION *)

Definition at line 41 of file protocol.h.

◆ rad_protocol_t

Struct exported by a proto_* module.

Used to pass information common to proto_* modules to the server core, and to register callbacks that get executed when processing packets of this protocol type.

Function Documentation

◆ common_packet_debug()

void common_packet_debug ( request_t request,
fr_packet_t packet,
fr_pair_list_t pairs,
bool  received 
)

Definition at line 199 of file auth.c.

+ Here is the call graph for this function:

◆ common_socket_open()

int common_socket_open ( CONF_SECTION cs,
rad_listen_t this 
)

◆ common_socket_parse()

int common_socket_parse ( CONF_SECTION cs,
rad_listen_t this 
)

◆ common_socket_print()

int common_socket_print ( rad_listen_t const *  this,
char *  buffer,
size_t  bufsize 
)