Detail handler for files.
More...
#include <freeradius-devel/io/application.h>
#include <freeradius-devel/io/listen.h>
#include <freeradius-devel/io/schedule.h>
#include <freeradius-devel/server/main_config.h>
#include <freeradius-devel/server/protocol.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/misc.h>
#include "proto_detail.h"
#include <netdb.h>
#include <fcntl.h>
#include <sys/stat.h>
Go to the source code of this file.
|
static int8_t | _detail_file_cmp (void const *one, void const *two) |
| Compare two thread instances based on node pointer. More...
|
|
static int | mod_close (fr_listen_t *li) |
|
static int | mod_decode (void const *instance, request_t *request, uint8_t *const data, size_t data_len) |
|
static void | mod_event_list_set (fr_listen_t *li, fr_event_list_t *el, UNUSED void *nr) |
| Set the event list for a new IO instance. More...
|
|
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
|
static char const * | mod_name (fr_listen_t *li) |
|
static int | mod_open (fr_listen_t *li) |
| Open a detail listener. More...
|
|
static void | mod_vnode_delete (fr_event_list_t *el, int fd, UNUSED int fflags, void *ctx) |
|
static void | mod_vnode_extend (fr_listen_t *li, UNUSED uint32_t fflags) |
|
static int | work_exists (proto_detail_file_thread_t *thread, int fd) |
|
static void | work_init (proto_detail_file_thread_t *thread, bool triggered_by_delete) |
| Start processing a new work file. More...
|
|
static int | work_rename (proto_detail_file_thread_t *thread) |
|
static void | work_retry_timer (UNUSED fr_event_list_t *el, UNUSED fr_time_t now, void *uctx) |
|
Detail handler for files.
- Id
- 663ba8cb66b7a74d2df732c017d59da4a2575d7e
- Copyright
- 2017 The FreeRADIUS server project.
-
2017 Alan DeKok (aland.nosp@m.@dep.nosp@m.loyin.nosp@m.grad.nosp@m.ius.c.nosp@m.om)
Definition in file proto_detail_file.c.
◆ MPRINT
◆ proto_detail_file_t
◆ proto_detail_file_thread_t
◆ _detail_file_cmp()
static int8_t _detail_file_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
Compare two thread instances based on node pointer.
- Parameters
-
[in] | one | First thread specific xlat expansion instance. |
[in] | two | Second thread specific xlat expansion instance. |
- Returns
- CMP(one, two)
Definition at line 634 of file proto_detail_file.c.
◆ mod_close()
◆ mod_decode()
◆ mod_event_list_set()
Set the event list for a new IO instance.
- Parameters
-
[in] | li | the listener |
[in] | el | the event list |
[in] | nr | context from the network side |
Definition at line 591 of file proto_detail_file.c.
◆ mod_instantiate()
◆ mod_name()
◆ mod_open()
◆ mod_vnode_delete()
◆ mod_vnode_extend()
◆ work_exists()
◆ work_init()
Start processing a new work file.
- Parameters
-
[in] | thread | the thread instance. |
[in] | triggered_by_delete | true if this was triggered by a vnode_delete. When a new file is moved over a workfile vnode delete can serve as an indication that new data is available. It can also mean however, that the file has just been deleted, so we shouldn't treat this failure to open the new file as a fatal error. |
Definition at line 478 of file proto_detail_file.c.
◆ work_rename()
◆ work_retry_timer()
◆ detail_file_mutex
◆ detail_file_tree
◆ file_listen_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
#define FR_CONF_OFFSET_FLAGS(_name, _flags, _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.
Definition at line 74 of file proto_detail_file.c.
◆ proto_detail_file
Initial value:= {
.common = {
.name = "detail_file",
},
.default_message_size = 65536,
.default_reply_size = 32,
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static void mod_vnode_extend(fr_listen_t *li, UNUSED uint32_t fflags)
static const conf_parser_t file_listen_config[]
struct proto_detail_work_s proto_detail_file_t
static int mod_decode(void const *instance, request_t *request, uint8_t *const data, size_t data_len)
static int mod_open(fr_listen_t *li)
Open a detail listener.
static char const * mod_name(fr_listen_t *li)
static void mod_event_list_set(fr_listen_t *li, fr_event_list_t *el, UNUSED void *nr)
Set the event list for a new IO instance.
static int mod_close(fr_listen_t *li)
static int mod_instantiate(module_inst_ctx_t const *mctx)
Private interface for use by proto_detail_file.
Definition at line 779 of file proto_detail_file.c.