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_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
714962d09bfaa9026ded2101fef0c2f7dc817d1c

Definition in file proto_arp.c.

Function Documentation

◆ 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.

+ Here is the call graph for this function:

◆ mod_load()

static int mod_load ( void  )
static

Definition at line 243 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 252 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,
},
.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:63
static int mod_load(void)
Definition: proto_arp.c:243
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:252
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:1302

Definition at line 257 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:627
#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.