19 #ifndef __included_syslog_h__ 20 #define __included_syslog_h__ 27 #define foreach_syslog_facility \ 28 _(0, KERNEL, "kernel") \ 29 _(1, USER_LEVEL, "user-level") \ 30 _(2, MAIL_SYSTEM, "mail-system") \ 31 _(3, SYSTEM_DAEMONS, "system-daemons") \ 32 _(4, SEC_AUTH, "security-authorization") \ 33 _(5, SYSLOGD, "syslogd") \ 34 _(6, LINE_PRINTER, "line-printer") \ 35 _(7, NETWORK_NEWS, "network-news") \ 37 _(9, CLOCK, "clock-daemon") \ 38 _(11, FTP, "ftp-daemon") \ 39 _(12, NTP, "ntp-subsystem") \ 40 _(13, LOG_AUDIT, "log-audit") \ 41 _(14, LOG_ALERT, "log-alert") \ 42 _(16, LOCAL0, "local0") \ 43 _(17, LOCAL1, "local1") \ 44 _(18, LOCAL2, "local2") \ 45 _(19, LOCAL3, "local3") \ 46 _(20, LOCAL4, "local4") \ 47 _(21, LOCAL5, "local5") \ 48 _(22, LOCAL6, "local6") \ 49 _(23, LOCAL7, "local7") 53 #define _(v, N, s) SYSLOG_FACILITY_##N = v, 59 #define foreach_syslog_severity \ 60 _(0, EMERGENCY, "emergency") \ 61 _(1, ALERT, "alert") \ 62 _(2, CRITICAL, "critical") \ 63 _(3, ERROR, "error") \ 64 _(4, WARNING, "warning") \ 65 _(5, NOTICE, "notice") \ 66 _(6, INFORMATIONAL, "informational") \ 71 #define _(v, N, s) SYSLOG_SEVERITY_##N = v,
#define foreach_syslog_facility
u16 collector_port
UDP port number of remote host (destination)
f64 time_offset
time offset
u32 fib_index
FIB table index.
u32 max_msg_size
message size limit
vlib_main_t * vlib_main
convenience variables
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.
u32 procid
process ID RFC5424 6.2.6.
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.
int syslog_msg_send(syslog_msg_t *syslog_msg)
Send syslog message.
syslog_header_t header
header
u8 * msg
free-form message RFC5424 6.4.
void syslog_msg_sd_init(syslog_msg_t *syslog_msg, char *sd_id)
Initialize structured data element.
syslog_severity_t severity_filter
severity filter (specified severity and greater match)
void syslog_msg_add_msg(syslog_msg_t *syslog_msg, char *fmt,...)
Add free-form message RFC5424 6.4.
syslog_main_t syslog_main
ip4_address_t src_address
IPv4 address of sender (source)
#define foreach_syslog_severity
u32 ip4_lookup_node_index
ip4-lookup node index
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.
u8 ** structured_data
structured data RFC5424 6.3.
ip4_address_t collector
IPv4 address of remote host (destination)
static int syslog_severity_filter_block(syslog_severity_t s)
Severity filter test.
static int syslog_is_enabled(void)
Check if syslog logging is enabled.