17#ifndef PACS_SECURITY_ATNA_SYSLOG_TRANSPORT_HPP
18#define PACS_SECURITY_ATNA_SYSLOG_TRANSPORT_HPP
199 [[nodiscard]] kcenon::pacs::VoidResult
send(
const std::string& xml_message);
215 const std::string& xml_message)
const;
Sends ATNA audit messages via Syslog protocol.
syslog_transport_config config_
void reset_statistics() noexcept
static constexpr socket_type invalid_socket
atna_syslog_transport(const syslog_transport_config &config)
Construct transport with configuration.
bool is_connected() const noexcept
Check if the transport is connected (TLS only)
std::atomic< size_t > messages_sent_
std::atomic< size_t > send_errors_
size_t send_errors() const noexcept
static std::string get_local_hostname()
size_t messages_sent() const noexcept
std::string format_syslog_message(const std::string &xml_message) const
Format an XML audit message as an RFC 5424 Syslog message.
const syslog_transport_config & config() const noexcept
kcenon::pacs::VoidResult send_tls(const std::string &syslog_message)
static uint8_t compute_priority(syslog_facility facility, syslog_severity severity)
atna_syslog_transport(const atna_syslog_transport &)=delete
void close()
Close the transport connection.
kcenon::pacs::VoidResult send_udp(const std::string &syslog_message)
static std::string get_timestamp()
kcenon::pacs::VoidResult ensure_tls_connected()
kcenon::pacs::VoidResult send(const std::string &xml_message)
Send an RFC 3881 XML audit message via Syslog.
atna_syslog_transport & operator=(const atna_syslog_transport &)=delete
syslog_transport_protocol
Syslog transport protocol.
@ udp
UDP (RFC 5426) — Fire-and-forget.
@ tls
TLS over TCP (RFC 5425) — Secure.
syslog_severity
Syslog severity levels.
@ informational
Default for audit events.
syslog_facility
Syslog facility values.
@ authpriv
Security/authorization (recommended for ATNA)
Result<T> type aliases and helpers for PACS system.
Configuration for the Syslog transport.
std::string client_key_path
Path to client private key file (mutual TLS)
std::string ca_cert_path
Path to CA certificate file for server verification.
syslog_transport_protocol protocol
Transport protocol (UDP or TLS)
uint16_t port
Port number (514 for UDP, 6514 for TLS per IANA)
std::string host
Audit Record Repository hostname or IP.
std::string app_name
Application name in Syslog header.
std::string client_cert_path
Path to client certificate file (mutual TLS)
std::string hostname
Hostname to report in Syslog header (auto-detected if empty)
syslog_severity severity
Syslog severity for audit events.
bool verify_server
Whether to verify server certificate (disable only for testing)
syslog_facility facility
Syslog facility.