18 #ifndef __included_syslog_h__ 19 #define __included_syslog_h__ 26 #define foreach_syslog_facility \ 27 _(0, KERNEL, "kernel") \ 28 _(1, USER_LEVEL, "user-level") \ 29 _(2, MAIL_SYSTEM, "mail-system") \ 30 _(3, SYSTEM_DAEMONS, "system-daemons") \ 31 _(4, SEC_AUTH, "security-authorization") \ 32 _(5, SYSLOGD, "syslogd") \ 33 _(6, LINE_PRINTER, "line-printer") \ 34 _(7, NETWORK_NEWS, "network-news") \ 36 _(9, CLOCK, "clock-daemon") \ 37 _(11, FTP, "ftp-daemon") \ 38 _(12, NTP, "ntp-subsystem") \ 39 _(13, LOG_AUDIT, "log-audit") \ 40 _(14, LOG_ALERT, "log-alert") \ 41 _(16, LOCAL0, "local0") \ 42 _(17, LOCAL1, "local1") \ 43 _(18, LOCAL2, "local2") \ 44 _(19, LOCAL3, "local3") \ 45 _(20, LOCAL4, "local4") \ 46 _(21, LOCAL5, "local5") \ 47 _(22, LOCAL6, "local6") \ 48 _(23, LOCAL7, "local7") 52 #define _(v, N, s) SYSLOG_FACILITY_##N = v, 58 #define foreach_syslog_severity \ 59 _(0, EMERGENCY, "emergency") \ 60 _(1, ALERT, "alert") \ 61 _(2, CRITICAL, "critical") \ 62 _(3, ERROR, "error") \ 63 _(4, WARNING, "warning") \ 64 _(5, NOTICE, "notice") \ 65 _(6, INFORMATIONAL, "informational") \ 70 #define _(v, N, s) SYSLOG_SEVERITY_##N = v, 189 u32 vrf_id,
u32 max_msg_size);
#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.