Go to the source code of this file.
|
static u8 * | format_syslog_timestamp (u8 *s, va_list *args) |
|
static u8 * | format_syslog_header (u8 *s, va_list *args) |
|
static u8 * | format_syslog_structured_data (u8 *s, va_list *args) |
|
static u8 * | format_syslog_msg (u8 *s, va_list *args) |
|
void | syslog_msg_sd_init (syslog_msg_t *syslog_msg, char *sd_id) |
| Initialize structured data element. More...
|
|
void | syslog_msg_add_sd_param (syslog_msg_t *syslog_msg, char *name, char *fmt,...) |
| Add structured data elemnt parameter name-value pair RFC5424 6.3.3. More...
|
|
void | syslog_msg_add_msg (syslog_msg_t *syslog_msg, char *fmt,...) |
| Add free-form message RFC5424 6.4. More...
|
|
void | syslog_msg_init (syslog_msg_t *syslog_msg, syslog_facility_t facility, syslog_severity_t severity, char *app_name, char *msgid) |
| Initialize syslog message header. More...
|
|
int | syslog_msg_send (syslog_msg_t *syslog_msg) |
| Send syslog message. More...
|
|
static uword | unformat_syslog_facility (unformat_input_t *input, va_list *args) |
|
static uword | unformat_syslog_severity (unformat_input_t *input, va_list *args) |
|
static u8 * | format_syslog_severity (u8 *s, va_list *args) |
|
vnet_api_error_t | set_syslog_sender (ip4_address_t *collector, u16 collector_port, ip4_address_t *src, u32 vrf_id, u32 max_msg_size) |
| Set syslog sender configuration. More...
|
|
static clib_error_t * | set_syslog_sender_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | show_syslog_sender_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | test_syslog_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | set_syslog_filter_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | show_syslog_filter_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
static clib_error_t * | syslog_init (vlib_main_t *vm) |
|
◆ DEFAULT_MAX_MSG_SIZE
#define DEFAULT_MAX_MSG_SIZE 480 |
◆ DEFAULT_UDP_PORT
#define DEFAULT_UDP_PORT 514 |
◆ encode_priority
#define encode_priority |
( |
|
f, |
|
|
|
p |
|
) |
| ((f << 3) | p) |
◆ NILVALUE
◆ SYSLOG_VERSION
#define SYSLOG_VERSION "1" |
◆ format_syslog_header()
static u8* format_syslog_header |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ format_syslog_msg()
static u8* format_syslog_msg |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ format_syslog_severity()
static u8* format_syslog_severity |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ format_syslog_structured_data()
static u8* format_syslog_structured_data |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ format_syslog_timestamp()
static u8* format_syslog_timestamp |
( |
u8 * |
s, |
|
|
va_list * |
args |
|
) |
| |
|
static |
◆ set_syslog_filter_command_fn()
◆ set_syslog_sender()
Set syslog sender configuration.
- Parameters
-
collector | IPv4 address of syslog collector (destination) |
collector_port | UDP port of syslog colector (destination) |
src | IPv4 address of syslog sender (source) |
vrf_id | VRF/FIB table ID |
max_msg_size | maximum message length |
Definition at line 252 of file syslog.c.
◆ set_syslog_sender_command_fn()
◆ show_syslog_filter_command_fn()
◆ show_syslog_sender_command_fn()
◆ syslog_init()
◆ syslog_msg_add_msg()
void syslog_msg_add_msg |
( |
syslog_msg_t * |
syslog_msg, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
Add free-form message RFC5424 6.4.
Definition at line 128 of file syslog.c.
◆ syslog_msg_add_sd_param()
void syslog_msg_add_sd_param |
( |
syslog_msg_t * |
syslog_msg, |
|
|
char * |
name, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
Add structured data elemnt parameter name-value pair RFC5424 6.3.3.
Definition at line 110 of file syslog.c.
◆ syslog_msg_init()
Initialize syslog message header.
- Parameters
-
facility | facility value |
severity | severity level |
app_name | application that originated message RFC424 6.2.5. (optional) |
msgid | identify the type of message RFC5424 6.2.7. (optional) |
Definition at line 142 of file syslog.c.
◆ syslog_msg_sd_init()
void syslog_msg_sd_init |
( |
syslog_msg_t * |
syslog_msg, |
|
|
char * |
sd_id |
|
) |
| |
Initialize structured data element.
- Parameters
-
sd_id | structured data element name RFC5424 6.3.2. |
Definition at line 100 of file syslog.c.
◆ syslog_msg_send()
Send syslog message.
Definition at line 159 of file syslog.c.
◆ test_syslog_command_fn()
◆ unformat_syslog_facility()
◆ unformat_syslog_severity()
◆ set_syslog_filter_command
Initial value:= {
.path = "set syslog filter",
.short_help = "set syslog filter severity <severity>",
}
static clib_error_t * set_syslog_filter_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (set_syslog_filter_command)
Definition at line 584 of file syslog.c.
◆ set_syslog_sender_command
Initial value:= {
.path = "set syslog sender",
.short_help = "set syslog sender "
"collector <ip4-address> [port <port>] "
"src <ip4-address> [vrf-id <vrf-id>] "
"[max-msg-size <max-msg-size>]",
}
static clib_error_t * set_syslog_sender_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (set_syslog_sender_command)
Definition at line 525 of file syslog.c.
◆ show_syslog_filter_command
Initial value:= {
.path = "show syslog filter",
.short_help = "show syslog filter",
}
static clib_error_t * show_syslog_filter_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (show_syslog_filter_command)
Definition at line 602 of file syslog.c.
◆ show_syslog_sender_command
Initial value:= {
.path = "show syslog sender",
.short_help = "show syslog sender",
}
static clib_error_t * show_syslog_sender_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (show_syslog_sender_command)
Definition at line 546 of file syslog.c.
◆ syslog_main
◆ test_syslog_command
Initial value:= {
.path = "test syslog",
.short_help = "test syslog <facility> <severity> <app-name> <msgid> "
"[sd-id <sd-id> sd-param <name> <value>] [<message]",
}
static clib_error_t * test_syslog_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (test_syslog_command)
Definition at line 567 of file syslog.c.