48 #if ! ( defined ( CONSOLE_SYSLOG ) && CONSOLE_EXPLICIT ( CONSOLE_SYSLOG ) ) 50 #define CONSOLE_SYSLOG ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_TUI ) 103 return xfer_printf ( xfer,
"<%d>%s%s%s%sipxe: %s%s",
105 severity ), hostname,
106 ( domain[0] ?
"." :
"" ), domain,
133 if ( params[0] >= 0 ) {
180 DBG (
"SYSLOG could not send log message: %s\n",
205 .description =
"Syslog server",
207 .type = &setting_type_ipv4,
213 .description =
"Syslog server",
215 .type = &setting_type_ipv6,
270 syslog_console.disabled = 0;
271 DBG (
"SYSLOG using log server %s\n",
283 if ( syslog_console.disabled ) {
284 DBG (
"SYSLOG has no log server\n" );
291 DBG (
"SYSLOG cannot connect to log server: %s\n",
An object interface operation.
struct arbelprm_rc_send_wqe rc
static struct interface_operation syslogger_operations[]
Syslog UDP interface operations.
void intf_restart(struct interface *intf, int rc)
Shut down and restart an object interface.
#define SYSLOG_PRIORITY(facility, severity)
Syslog priority.
A handler for an escape sequence.
static __always_inline void off_t int c
Dynamic Host Configuration Protocol.
#define AF_INET6
IPv6 Internet addresses.
#define DHCP_LOG_SERVERS
Syslog servers.
static char syslog_buffer[SYSLOG_BUFSIZE]
Syslog line buffer.
const struct settings_scope dhcpv6_scope
IPv6 settings scope.
static void syslog_handle_priority(struct ansiesc_context *ctx __unused, unsigned int count __unused, int params[])
Handle ANSI set syslog priority (private sequence)
int xfer_open_socket(struct interface *intf, int semantics, struct sockaddr *peer, struct sockaddr *local)
Open socket.
int fetch_ipv4_setting(struct settings *settings, const struct setting *setting, struct in_addr *inp)
Fetch value of IPv4 address setting.
static union @6 logserver
The syslog server.
static unsigned int syslog_severity
Syslog severity.
#define INTF_INIT(descriptor)
Initialise a static object interface.
#define CONSOLE_DISABLED
Console is disabled for all uses.
struct eltorito_descriptor_fixed fixed
Fixed portion.
#define SETTING_MISC
Miscellaneous settings.
#define INTF_DESC_PURE(operations)
Define an object interface descriptor for a pure-interface object.
#define DHCPV6_LOG_SERVERS
DHCPv6 syslog server option.
static void syslog_fix_name(char *name)
Strip invalid characters from host/domain name.
ANSI escape sequence context.
struct golan_eq_context ctx
const struct setting syslog_setting __setting(SETTING_MISC, syslog)
IPv4 syslog server setting.
static void syslog_putchar(int character)
Print a character to syslog console.
size_t line_putchar(struct line_console *line, int character)
Print a character to a line-based console.
static int isprint(int character)
Check if character is printable.
Data transfer interfaces.
static char * syslog_domain
Domain name (for log messages)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define __unused
Declare a variable or data structure as unused.
void(* putchar)(int character)
Write a character to the console.
Transport-network layer interface.
uint16_t count
Number of entries.
int fetch_string_setting_copy(struct settings *settings, const struct setting *setting, char **data)
Fetch value of string setting.
Generalized socket address structure.
An object interface descriptor.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
struct settings_applicator syslog_applicator __settings_applicator
Syslog settings applicator.
static int syslog_entered
Syslog recursion marker.
#define ANSIESC_LOG_PRIORITY
Explicit log message priority.
static int apply_syslog_settings(void)
Apply syslog settings.
int isspace(int character)
Check to see if character is a space.
static char * syslog_hostname
Host name (for log messages)
Data transfer interface opening.
static struct ansiesc_handler syslog_handlers[]
Syslog ANSI escape sequence handlers.
#define SYSLOG_PORT
Syslog server port.
int xfer_printf(struct interface *intf, const char *format,...)
Deliver formatted string.
#define SYSLOG_DEFAULT_SEVERITY
Syslog default severity.
const char * sock_ntoa(struct sockaddr *sa)
Transcribe socket address.
static struct line_console syslog_line
Syslog line console.
static struct interface_descriptor syslogger_desc
Syslog UDP interface descriptor.
struct console_driver syslog_console __console_driver
Syslog console driver.
#define syslog(priority, fmt,...)
Write message to system log.
int syslog_send(struct interface *xfer, unsigned int severity, const char *message, const char *terminator)
Transmit formatted syslog message.
int(* apply)(void)
Apply updated settings.
char * buffer
Data buffer.
char message[VMCONSOLE_BUFSIZE]
#define DBG(...)
Print a debugging message.
#define SYSLOG_BUFSIZE
Syslog line buffer size.
#define SYSLOG_DEFAULT_FACILITY
Syslog default facility.
struct eth_slow_terminator_tlv terminator
Terminator.
int fetch_ipv6_setting(struct settings *settings, const struct setting *setting, struct in6_addr *inp)
Fetch value of IPv6 address setting.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
#define AF_INET
IPv4 Internet addresses.
Dynamic Host Configuration Protocol for IPv6.
static struct interface syslogger
The syslog UDP interface.