From 35ca7f1087870c6023ef7a3dd0248501741c8194 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 19 Nov 2024 22:39:48 +0000 Subject: [PATCH] Refactor network constant page, and associated functions (#4089) Remove duplication of information Use standard markup Remove personalization --------- Co-authored-by: Christoph M. Becker --- reference/network/constants.xml | 943 +++++++++++++----- .../network/functions/dns-get-record.xml | 31 +- reference/network/functions/openlog.xml | 153 +-- reference/network/functions/syslog.xml | 59 +- 4 files changed, 727 insertions(+), 459 deletions(-) diff --git a/reference/network/constants.xml b/reference/network/constants.xml index 5906eaefc157..f76a1618c84d 100644 --- a/reference/network/constants.xml +++ b/reference/network/constants.xml @@ -3,272 +3,685 @@ &reftitle.constants; &extension.constants.core; - - <function>openlog</function> Options - - - - Constant - Description - - - - - LOG_CONS - - if there is an error while sending data to the system logger, - write directly to the system console - - - - LOG_NDELAY - - open the connection to the logger immediately - - - - LOG_ODELAY - - (default) delay opening the connection until the first - message is logged - - - - LOG_NOWAIT - - - - - LOG_PERROR - print log message also to standard error - - - LOG_PID - include PID with each message - - - -
- - - <function>openlog</function> Facilities - - - - Constant - Description - - - - - LOG_AUTH - - security/authorization messages (use LOG_AUTHPRIV instead - in systems where that constant is defined) - - - - LOG_AUTHPRIV - security/authorization messages (private) - - - LOG_CRON - clock daemon (cron and at) - - - LOG_DAEMON - other system daemons - - - LOG_KERN - kernel messages - - - LOG_LOCAL0 - reserved for local use, not available in Windows - - - LOG_LOCAL1 - reserved for local use, not available in Windows - - - LOG_LOCAL2 - reserved for local use, not available in Windows - - - LOG_LOCAL3 - reserved for local use, not available in Windows - - - LOG_LOCAL4 - reserved for local use, not available in Windows - - - LOG_LOCAL5 - reserved for local use, not available in Windows - - - LOG_LOCAL6 - reserved for local use, not available in Windows - - - LOG_LOCAL7 - reserved for local use, not available in Windows - - - LOG_LPR - line printer subsystem - - - LOG_MAIL - mail subsystem - - - LOG_NEWS - USENET news subsystem - - - LOG_SYSLOG - messages generated internally by syslogd - - - LOG_USER - generic user-level messages - - - LOG_UUCP - UUCP subsystem - - - -
- - - <function>syslog</function> Priorities (in descending order) - - - - Constant - Description - - - - - LOG_EMERG - system is unusable - - - LOG_ALERT - action must be taken immediately - - - LOG_CRIT - critical conditions - - - LOG_ERR - error conditions - - - LOG_WARNING - warning conditions - - - LOG_NOTICE - normal, but significant, condition - - - LOG_INFO - informational message - - - LOG_DEBUG - debug-level message - - - -
- - <function>dns_get_record</function> Options - - - - Constant - Description - - - - - DNS_A - IPv4 Address Resource - - - DNS_A6 - Defined as part of early IPv6 but downgraded to historic by RFC 6563 - - - DNS_CAA - Certification Authority Authorization Resource (available as of PHP 7.0.16 and 7.1.2) - - - DNS_MX - Mail Exchanger Resource - - - DNS_CNAME - Alias (Canonical Name) Resource - - - DNS_NAPTR - Naming Authority Pointer - - - DNS_NS - Authoritative Name Server Resource - - - DNS_PTR - Pointer Resource - - - DNS_HINFO - Host Info Resource (See IANA's - Operating System Names - for the meaning of these values) - - - DNS_SOA - Start of Authority Resource - - - DNS_SRV - Service locator - - - DNS_TXT - Text Resource - - - DNS_ANY - Any Resource Record. On most systems - this returns all resource records, however - it should not be counted upon for critical - uses. Try DNS_ALL instead. - - - DNS_AAAA - IPv6 Address Resource - - - DNS_ALL - Iteratively query the name server for - each available record type. - - - -
-
+ + + Available <parameter>flags</parameter> for + <function>openlog</function> + + + + + LOG_CONS + (int) + + + + If there is an error while sending data to the system logger, + write directly to the system console. + + + + + + + LOG_NDELAY + (int) + + + + Open the connection to the logger immediately. + + + + + + + LOG_ODELAY + (int) + + + + Delay opening the connection until the first message is logged. + This is the default behaviour. + + + + + + + LOG_NOWAIT + (int) + + + + + + + + + + LOG_PERROR + (int) + + + + Additionally log messages to STDERR. + + + + + + + LOG_PID + (int) + + + + Include the PID with each log message. + + + + + + + + Available <parameter>facility</parameter> for + <function>openlog</function> + + + + + LOG_AUTH + (int) + + + + For security/authorization messages. + + + + Use LOG_AUTHPRIV instead when available. + + + + + + + + LOG_AUTHPRIV + (int) + + + + For private security/authorization messages. + + + + + + + LOG_CRON + (int) + + + + For clock daemon messages. + For example cron or at. + + + + + + + LOG_DAEMON + (int) + + + + For system daemon messages. + + + + + + + LOG_KERN + (int) + + + + For kernel messages. + + + + + + + LOG_LOCAL0 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL1 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL2 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL3 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL4 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL5 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL6 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LOCAL7 + (int) + + + + Reserved for local use. + + + + Not available on Windows. + + + + + + + + LOG_LPR + (int) + + + + For messages from the line printer subsystem. + + + + + + + LOG_MAIL + (int) + + + + For messages from the mail subsystem. + + + + + + + LOG_NEWS + (int) + + + + For messages from the USENET news subsystem. + + + + + + + LOG_SYSLOG + (int) + + + + For messages generated internally by syslogd. + + + + + + + LOG_USER + (int) + + + + For generic user-level messages. + + + + + + + LOG_UUCP + (int) + + + + For messages from the UUCP subsystem. + + + + + + + + Available <parameter>priority</parameter> for + <function>syslog</function> + + + + The priority constants are listed from urgent, to debug messages. + + + + + LOG_EMERG + (int) + + + + Emergency, the system is unusable. + This corresponds to a panic condition. + Usually broadcast to all processes. + + + + + + + LOG_ALERT + (int) + + + + Alert, immediate action is required. + For example, a corrupted system database. + + + + + + + LOG_CRIT + (int) + + + + Critical, action is required. + For example, a hard device errors. + + + + + + + LOG_ERR + (int) + + + + Errors messages. + + + + + + + LOG_WARNING + (int) + + + + Warning messages. + + + + + + + LOG_NOTICE + (int) + + + + Notice messages, corresponds to conditions that are not error conditions, + but that may require special handling. + + + + + + + LOG_INFO + (int) + + + + Informational messages. + + + + + + + LOG_DEBUG + (int) + + + + Debugging messages that contain information normally of use only when + debugging a program. + + + + + + + + Available <parameter>type</parameter>s for + <function>dns_get_record</function> + + + + + + DNS_ANY + (int) + + + + Any Resource Record. + On most systems this returns all resource records, + however due to eccentricities in the performance of + libresolv between platforms this is not guaranteed. + + + The slower DNS_ALL will collect all records more reliably. + + + + + + + DNS_ALL + (int) + + + + Iteratively query the name server for each available record type. + + + + + + + DNS_A + (int) + + + + IPv4 Address Resource. + + + + + + + DNS_AAAA + (int) + + + + IPv6 Address Resource. + + + + + + + DNS_A6 + (int) + + + + Defined as part of early IPv6, but downgraded to historic by + RFC 6563. + + + + + + + DNS_CAA + (int) + + + + Certification Authority Authorization Resource. + Available as of PHP 7.0.16 and 7.1.2. + + + + Not available on Windows. + + + + + + + + DNS_CNAME + (int) + + + + Alias (Canonical Name) Resource. + + + + + + + DNS_HINFO + (int) + + + + Host Info Resource. + For more explanations and meanings of these values, visit IANA's page on + Operating System Names. + + + + + + + DNS_MX + (int) + + + + Mail Exchanger Resource. + + + + + + + DNS_NAPTR + (int) + + + + Naming Authority Pointer. + + + + + + + DNS_NS + (int) + + + + Authoritative Name Server Resource. + + + + + + + DNS_PTR + (int) + + + + Pointer Resource. + + + + + + + DNS_SOA + (int) + + + + Start of Authority Resource. + + + + + + + DNS_SRV + (int) + + + + Service locator. + + + + + + + DNS_TXT + (int) + + + + Text Resource. + + + + + +