Send ICMP echo requests.
More...
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/module_rlm.h>
#include <freeradius-devel/util/cap.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/unlang/xlat_func.h>
#include <fcntl.h>
#include <unistd.h>
Go to the source code of this file.
|
static void | _xlat_icmp_timeout (xlat_ctx_t const *xctx, request_t *request, UNUSED fr_time_t fired) |
|
static int8_t | echo_cmp (void const *one, void const *two) |
|
static uint16_t | icmp_checksum (uint8_t *data, size_t data_len, uint16_t checksum) |
|
static int | mod_bootstrap (module_inst_ctx_t const *mctx) |
|
static void | mod_icmp_error (fr_event_list_t *el, UNUSED int sockfd, UNUSED int flags, UNUSED int fd_errno, void *uctx) |
|
static void | mod_icmp_read (UNUSED fr_event_list_t *el, UNUSED int sockfd, UNUSED int flags, void *uctx) |
|
static int | mod_instantiate (module_inst_ctx_t const *mctx) |
|
static int | mod_load (void) |
|
static int | mod_thread_detach (module_thread_inst_ctx_t const *mctx) |
| Destroy thread data for the submodule. More...
|
|
static int | mod_thread_instantiate (module_thread_inst_ctx_t const *mctx) |
| Instantiate thread data for the submodule. More...
|
|
static xlat_action_t | xlat_icmp (TALLOC_CTX *ctx, UNUSED fr_dcursor_t *out, xlat_ctx_t const *xctx, request_t *request, fr_value_box_list_t *in) |
| Xlat to ping a specified ip address. More...
|
|
static void | xlat_icmp_cancel (xlat_ctx_t const *xctx, request_t *request, UNUSED fr_signal_t action) |
|
static xlat_action_t | xlat_icmp_resume (TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_ctx_t const *xctx, UNUSED request_t *request, UNUSED fr_value_box_list_t *in) |
|
Send ICMP echo requests.
- Id
- fc972abb18b9dcbdb4595c20d9d9870bae0b13fb
- Copyright
- 2020 Network RADIUS SAS (legal.nosp@m.@net.nosp@m.workr.nosp@m.adiu.nosp@m.s.com)
Definition in file rlm_icmp.c.
◆ icmp_header_t
◆ rlm_icmp_echo_t
Definition at line 57 of file rlm_icmp.c.
Data Fields |
uint32_t |
counter |
for pinging the same IP multiple times |
fr_value_box_t * |
ip |
the IP we're pinging |
fr_rb_node_t |
node |
Entry in the outstanding list of echo requests. |
bool |
replied |
do we have a reply? |
request_t * |
request |
so it can be resumed when we get the echo reply |
◆ rlm_icmp_t
◆ rlm_icmp_thread_t
◆ FD_CLOEXEC
◆ ICMP_ECHOREPLY
◆ ICMP_ECHOREQUEST
◆ ICMPV6_ECHOREPLY
#define ICMPV6_ECHOREPLY (129) |
◆ ICMPV6_ECHOREQUEST
#define ICMPV6_ECHOREQUEST (128) |
◆ _xlat_icmp_timeout()
◆ echo_cmp()
static int8_t echo_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
◆ icmp_checksum()
◆ mod_bootstrap()
◆ mod_icmp_error()
◆ mod_icmp_read()
◆ mod_instantiate()
◆ mod_load()
static int mod_load |
( |
void |
| ) |
|
|
static |
◆ mod_thread_detach()
Destroy thread data for the submodule.
Definition at line 376 of file rlm_icmp.c.
◆ mod_thread_instantiate()
Instantiate thread data for the submodule.
Definition at line 392 of file rlm_icmp.c.
◆ xlat_icmp_cancel()
◆ xlat_icmp_resume()
◆ module_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_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 fr_time_delta_t timeout
@ FR_TYPE_COMBO_IP_ADDR
IPv4 or IPv6 address depending on length.
Definition at line 104 of file rlm_icmp.c.
◆ rlm_icmp
Initial value:= {
.common = {
.name = "icmp",
.thread_inst_type = "rlm_icmp_thread_t",
}
}
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
static const conf_parser_t config[]
static int mod_load(void)
static int mod_bootstrap(module_inst_ctx_t const *mctx)
static int mod_thread_instantiate(module_thread_inst_ctx_t const *mctx)
Instantiate thread data for the submodule.
static const conf_parser_t module_config[]
static int mod_thread_detach(module_thread_inst_ctx_t const *mctx)
Destroy thread data for the submodule.
static int mod_instantiate(module_inst_ctx_t const *mctx)
static int instantiate(module_inst_ctx_t const *mctx)
Definition at line 558 of file rlm_icmp.c.
◆ xlat_icmp_args
Initial value:= {
}
@ FR_TYPE_STRING
String of printable characters.
#define XLAT_ARG_PARSER_TERMINATOR
Definition at line 153 of file rlm_icmp.c.