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

RADIUS master protocol handler. More...

#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/server/virtual_servers.h>
#include <freeradius-devel/server/packet.h>
#include <freeradius-devel/util/debug.h>
#include "proto_arp.h"
+ Include dependency graph for proto_arp.c:

Go to the source code of this file.

Functions

static int mod_bootstrap (module_inst_ctx_t const *mctx)
 Bootstrap the application. More...
 
static int mod_decode (UNUSED void const *instance, request_t *request, uint8_t *const data, size_t data_len)
 Decode the packet. More...
 
static ssize_t mod_encode (void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len)
 
static int mod_instantiate (module_inst_ctx_t const *mctx)
 Instantiate the application. More...
 
static int mod_load (void)
 
static int mod_open (void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf)
 Open listen sockets/connect to external event source. More...
 
static void mod_unload (void)
 

Variables

static fr_dict_t const * dict_arp
 
fr_app_t proto_arp
 
static conf_parser_t const proto_arp_config []
 How to parse an ARP listen section. More...
 
fr_dict_autoload_t proto_arp_dict []
 
static uint8_t const zeros [6] = { 0 }
 

Detailed Description

RADIUS master protocol handler.

Id
12a7b9fad664d01f9e79ae7db9c49bf650f44241

Definition in file proto_arp.c.

Function Documentation

◆ mod_bootstrap()

static int mod_bootstrap ( module_inst_ctx_t const *  mctx)
static

Bootstrap the application.

Bootstrap I/O and type submodules.

Returns
  • 0 on success.
  • -1 on failure.

Definition at line 255 of file proto_arp.c.

+ Here is the call graph for this function:

◆ mod_decode()

static int mod_decode ( UNUSED void const *  instance,
request_t request,
uint8_t *const  data,
size_t  data_len 
)
static

Decode the packet.

Definition at line 65 of file proto_arp.c.

+ Here is the call graph for this function:

◆ mod_encode()

static ssize_t mod_encode ( void const *  instance,
request_t request,
uint8_t buffer,
size_t  buffer_len 
)
static

Definition at line 109 of file proto_arp.c.

+ Here is the call graph for this function:

◆ mod_instantiate()

static int mod_instantiate ( module_inst_ctx_t const *  mctx)
static

Instantiate the application.

Instantiate I/O and type submodules.

Returns
  • 0 on success.
  • -1 on failure.

Definition at line 224 of file proto_arp.c.

◆ mod_load()

static int mod_load ( void  )
static

Definition at line 297 of file proto_arp.c.

+ Here is the call graph for this function:

◆ mod_open()

static int mod_open ( void *  instance,
fr_schedule_t sc,
UNUSED CONF_SECTION conf 
)
static

Open listen sockets/connect to external event source.

Parameters
[in]instanceCtx data for this application.
[in]scto add our file descriptor to.
[in]confListen section parsed to give us instance.
Returns
  • 0 on success.
  • -1 on failure.

Definition at line 161 of file proto_arp.c.

+ Here is the call graph for this function:

◆ mod_unload()

static void mod_unload ( void  )
static

Definition at line 306 of file proto_arp.c.

+ Here is the call graph for this function:

Variable Documentation

◆ dict_arp

fr_dict_t const* dict_arp
static

Definition at line 44 of file proto_arp.c.

◆ proto_arp

fr_app_t proto_arp
Initial value:
= {
.common = {
.name = "arp",
.config = proto_arp_config,
.inst_size = sizeof(proto_arp_t),
.onload = mod_load,
.unload = mod_unload,
.bootstrap = mod_bootstrap,
},
.dict = &dict_arp,
.open = mod_open,
.decode = mod_decode,
.encode = mod_encode,
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
Definition: dl_module.h:65
static int mod_load(void)
Definition: proto_arp.c:297
static int mod_bootstrap(module_inst_ctx_t const *mctx)
Bootstrap the application.
Definition: proto_arp.c:255
static ssize_t mod_encode(void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len)
Definition: proto_arp.c:109
static void mod_unload(void)
Definition: proto_arp.c:306
static conf_parser_t const proto_arp_config[]
How to parse an ARP listen section.
Definition: proto_arp.c:36
static fr_dict_t const * dict_arp
Definition: proto_arp.c:44
static int mod_decode(UNUSED void const *instance, request_t *request, uint8_t *const data, size_t data_len)
Decode the packet.
Definition: proto_arp.c:65
static int mod_instantiate(module_inst_ctx_t const *mctx)
Instantiate the application.
Definition: proto_arp.c:224
static int mod_open(void *instance, fr_schedule_t *sc, UNUSED CONF_SECTION *conf)
Open listen sockets/connect to external event source.
Definition: proto_arp.c:161
static int instantiate(module_inst_ctx_t const *mctx)
Definition: rlm_rest.c:1312

Definition at line 311 of file proto_arp.c.

◆ proto_arp_config

conf_parser_t const proto_arp_config[]
static
Initial value:
= {
{ FR_CONF_OFFSET("num_messages", proto_arp_t, num_messages) } ,
{ FR_CONF_OFFSET("active", proto_arp_t, active), .dflt = "false" } ,
}
#define CONF_PARSER_TERMINATOR
Definition: cf_parse.h:626
#define FR_CONF_OFFSET(_name, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Definition: cf_parse.h:268

How to parse an ARP listen section.

Definition at line 36 of file proto_arp.c.

◆ proto_arp_dict

fr_dict_autoload_t proto_arp_dict
Initial value:
= {
{ .out = &dict_arp, .proto = "arp" },
{ NULL }
}

Definition at line 47 of file proto_arp.c.

◆ zeros

uint8_t const zeros[6] = { 0 }
static

Definition at line 107 of file proto_arp.c.