Detail master protocol handler.
More...
#include <freeradius-devel/io/application.h>
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/io/schedule.h>
#include <freeradius-devel/radius/radius.h>
#include <freeradius-devel/util/pair_legacy.h>
#include <freeradius-devel/server/dl_module.h>
#include <freeradius-devel/server/module.h>
#include <freeradius-devel/server/module_rlm.h>
#include "proto_detail.h"
Go to the source code of this file.
|
static int | mod_decode (void const *instance, request_t *request, uint8_t *const data, size_t data_len) |
| Decode the packet, and set the request->process function. More...
|
|
static ssize_t | mod_encode (UNUSED 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_open (void *instance, fr_schedule_t *sc, CONF_SECTION *conf) |
| Open listen sockets/connect to external event source. More...
|
|
static int | mod_priority_set (void const *instance, UNUSED uint8_t const *buffer, UNUSED size_t buflen) |
|
static int | transport_parse (TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
|
static int | type_parse (TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule) |
|
static int | type_parse (UNUSED TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule) |
| Translates the packet-type into a submodule name. More...
|
|
Detail master protocol handler.
- Id
- 20e537c678922e935c0282347211e73d2b094d02
- Copyright
- 2017 Arran Cudbard-Bell (a.cud.nosp@m.bard.nosp@m.b@fre.nosp@m.erad.nosp@m.ius.o.nosp@m.rg)
-
2016 Alan DeKok (aland.nosp@m.@fre.nosp@m.eradi.nosp@m.us.o.nosp@m.rg)
Definition in file proto_detail.c.
◆ MPRINT
◆ mod_decode()
Decode the packet, and set the request->process function.
Definition at line 217 of file proto_detail.c.
◆ mod_encode()
◆ mod_instantiate()
Instantiate the application.
Instantiate I/O and type submodules.
- Returns
- 0 on success.
- -1 on failure.
Definition at line 522 of file proto_detail.c.
◆ mod_open()
Open listen sockets/connect to external event source.
- Parameters
-
[in] | instance | Ctx data for this application. |
[in] | sc | to add our file descriptor to. |
[in] | conf | Listen section parsed to give us instance. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 432 of file proto_detail.c.
◆ mod_priority_set()
◆ transport_parse()
static int transport_parse |
( |
TALLOC_CTX * |
ctx, |
|
|
void * |
out, |
|
|
void * |
parent, |
|
|
CONF_ITEM * |
ci, |
|
|
conf_parser_t const * |
rule |
|
) |
| |
|
static |
◆ type_parse() [1/2]
◆ type_parse() [2/2]
Translates the packet-type into a submodule name.
- Parameters
-
[in] | ctx | to allocate data in (instance of proto_detail). |
[out] | out | Where to write a module_instance_t containing the module handle and instance. |
[in] | parent | Base structure address. |
[in] | ci | CONF_PAIR specifying the name of the type module. |
[in] | rule | unused. |
- Returns
- 0 on success.
- -1 on failure.
Definition at line 118 of file proto_detail.c.
◆ attr_packet_dst_ip_address
◆ attr_packet_dst_port
◆ attr_packet_original_timestamp
◆ attr_packet_src_ip_address
◆ attr_packet_src_port
◆ attr_protocol
◆ dict_freeradius
◆ proto_detail
Initial value:= {
.common = {
.name = "detail",
},
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8_t *buffer, size_t buffer_len)
static int mod_open(void *instance, fr_schedule_t *sc, CONF_SECTION *conf)
Open listen sockets/connect to external event source.
static int mod_decode(void const *instance, request_t *request, uint8_t *const data, size_t data_len)
Decode the packet, and set the request->process function.
static int mod_priority_set(void const *instance, UNUSED uint8_t const *buffer, UNUSED size_t buflen)
static int mod_instantiate(module_inst_ctx_t const *mctx)
Instantiate the application.
static conf_parser_t const proto_detail_config[]
How to parse a Detail listen section.
static int instantiate(module_inst_ctx_t const *mctx)
Definition at line 568 of file proto_detail.c.
◆ proto_detail_config
Initial value:= {
}
#define CONF_PARSER_TERMINATOR
#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
@ CONF_FLAG_REQUIRED
Error out if no matching CONF_PAIR is found, and no dflt value is set.
@ CONF_FLAG_NOT_EMPTY
CONF_PAIR is required to have a non zero length value.
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
static int type_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
static int transport_parse(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, conf_parser_t const *rule)
fr_aka_sim_id_type_t type
How to parse a Detail listen section.
Definition at line 55 of file proto_detail.c.
◆ proto_detail_dict
Initial value:= {
{ NULL }
}
static fr_dict_t const * dict_freeradius
Definition at line 82 of file proto_detail.c.
◆ proto_detail_dict_attr
Initial value:= {
{ NULL }
}
@ FR_TYPE_UINT16
16 Bit unsigned integer.
@ FR_TYPE_DATE
Unix time stamp, always has value >2^31.
@ FR_TYPE_UINT32
32 Bit unsigned integer.
@ FR_TYPE_COMBO_IP_ADDR
IPv4 or IPv6 address depending on length.
static fr_dict_attr_t const * attr_protocol
static fr_dict_attr_t const * attr_packet_src_port
static fr_dict_attr_t const * attr_packet_original_timestamp
static fr_dict_attr_t const * attr_packet_dst_ip_address
static fr_dict_attr_t const * attr_packet_src_ip_address
static fr_dict_attr_t const * attr_packet_dst_port
Definition at line 96 of file proto_detail.c.