Difference between revisions of "Unit Services"

From Ultibo.org
Jump to: navigation, search
Line 10: Line 10:
 
----
 
----
  
''To be documented''
+
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''NTP specific constants''' <code> NTP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NTP_VERSION_1 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_VERSION_2 = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_VERSION_3 = 3;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_VERSION_4 = 4;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_VERSION_MASK = $07;</code>
 +
| shl 3
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_VERSION = NTP_VERSION_4;</code>
 +
| Current NTP/SNTP version
 +
|-
 +
| <code>NTP_MIN_VERSION = NTP_VERSION_2;</code>
 +
| Minimum acceptable NTP/SNTP version
 +
|-
 +
| <code>NTP_MAX_VERSION = NTP_VERSION_4;</code>
 +
| Maximum acceptable NTP/SNTP version
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_PACKET_SIZE = 48;</code>
 +
| SizeOf(TNTPPacket)
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_TIMESTAMP_START = 94354848000000000;</code>
 +
| Offset between 1/1/1601 (Ultibo) and 1/1/1900 (NTP Timestamp)
 +
|-
 +
|}
 +
</div></div>
 +
<br />  
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''NTP leap indicator constants''' <code> NTP_LEAP_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NTP_LEAP_NONE = 0;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_LEAP_LAST_61 = 1;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_LEAP_LAST_59 = 2;</code>
 +
| &nbsp;
 +
|-
 +
| <code>NTP_LEAP_ALARM = 3;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_LEAP_MASK = $03;</code>
 +
| shl 6
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''NTP mode constants''' <code> NTP_MODE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NTP_MODE_RESERVED = 0;</code>
 +
| Reserved
 +
|-
 +
| <code>NTP_MODE_SYMMETRIC_ACTIVE = 1;</code>
 +
| Symmetric active
 +
|-
 +
| <code>NTP_MODE_SYMMETRIC_PASSIVE = 2;</code>
 +
| Symmetric passive
 +
|-
 +
| <code>NTP_MODE_CLIENT = 3;</code>
 +
| Client
 +
|-
 +
| <code>NTP_MODE_SERVER = 4;</code>
 +
| Server
 +
|-
 +
| <code>NTP_MODE_BROADCAST = 5;</code>
 +
| Broadcast
 +
|-
 +
| <code>NTP_MODE_CONTROL = 6;</code>
 +
| Reserved for NTP control message
 +
|-
 +
| <code>NTP_MODE_PRIVATE = 7;</code>
 +
| Reserved for private use
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>NTP_MODE_MASK = $07;</code>
 +
| shl 0
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''NTP stratum constants''' <code> NTP_STRATUM_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>NTP_STRATUM_INVALID = 0;</code>
 +
| unspecified or invalid
 +
|-
 +
| <code>NTP_STRATUM_PRIMARY = 1;</code>
 +
| primary server (e.g., equipped with a GPS receiver)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY2 = 2;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY3 = 3;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY4 = 4;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY5 = 5;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY6 = 6;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY7 = 7;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY8 = 8;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY9 = 9;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY10 = 10;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY11 = 11;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY12 = 12;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY13 = 13;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY14 = 14;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_SECONDARY15 = 15;</code>
 +
| secondary server (via NTP)
 +
|-
 +
| <code>NTP_STRATUM_UNSYNCRONIZED = 16;</code>
 +
| unsynchronized
 +
|-
 +
| <code>NTP_STRATUM_RESERVED = 17;</code>
 +
| reserved
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Telnet char constants''' <code> TELNET_CHAR_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TELNET_CHAR_NUL = #0;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TELNET_CHAR_CR = #13;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_CHAR_LF = #10;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_CHAR_TAB = #9;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_CHAR_ESC = #27;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_CHAR_BACKSPACE = #127;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|&nbsp;
 +
|-
 +
| <code>TELNET_BUFFER_SIZE = SIZE_2K;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Telnet state constants''' <code> TELNET_STATE_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TELNET_STATE_NONE = $00000000;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>TELNET_STATE_TRANSMIT_BINARY = $00000001;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_ECHO = $00000002;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_SUPPRESS_GA = $00000004;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_TERMINAL_TYPE = $00000008;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_WINDOW_SIZE = $00000010;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_TERMINAL_SPEED = $00000020;</code>
 +
| &nbsp;
 +
|-
 +
| <code>TELNET_STATE_NEW_ENVIRONMENT = $00000040;</code>
 +
| &nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Telnet command constants''' <code> TELNET_COMMAND_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TELNET_COMMAND_EOR = 239;</code>
 +
| 0xEF end of record command
 +
|-
 +
| <code>TELNET_COMMAND_SE = 240;</code>
 +
| 0xF0 end of subnegotiations command
 +
|-
 +
| <code>TELNET_COMMAND_NOP = 241;</code>
 +
| 0xF1 no operation command
 +
|-
 +
| <code>TELNET_COMMAND_DM = 242;</code>
 +
| 0xF2 data mark command
 +
|-
 +
| <code>TELNET_COMMAND_BRK = 243;</code>
 +
| 0xF3 break NVT charater
 +
|-
 +
| <code>TELNET_COMMAND_IP = 244;</code>
 +
| 0xF4 interupt process command
 +
|-
 +
| <code>TELNET_COMMAND_AO = 245;</code>
 +
| 0xF5 abort output command
 +
|-
 +
| <code>TELNET_COMMAND_AYT = 246;</code>
 +
| 0xF6 are you there command
 +
|-
 +
| <code>TELNET_COMMAND_EC = 247;</code>
 +
| 0xF7 erase character command
 +
|-
 +
| <code>TELNET_COMMAND_EL = 248;</code>
 +
| 0xF8 erase line command
 +
|-
 +
| <code>TELNET_COMMAND_GA = 249;</code>
 +
| 0xF9 go ahead command
 +
|-
 +
| <code>TELNET_COMMAND_SB = 250;</code>
 +
| 0xFA begin option subnegotiations command
 +
|-
 +
| <code>TELNET_COMMAND_WILL = 251;</code>
 +
| 0xFB will enable option
 +
|-
 +
| <code>TELNET_COMMAND_WONT = 252;</code>
 +
| 0xFC won't enable option
 +
|-
 +
| <code>TELNET_COMMAND_DO = 253;</code>
 +
| 0xFD request other party enables option
 +
|-
 +
| <code>TELNET_COMMAND_DONT = 254;</code>
 +
| 0xFE request other party doesn't enable option
 +
|-
 +
| <code>TELNET_COMMAND_IAC = 255;</code>
 +
| 0xFF interpret as command
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Telnet option constants''' <code> TELNET_OPTION_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>TELNET_OPTION_TRANSMIT_BINARY = 0;</code>
 +
| 0x00 transmit binary option
 +
|-
 +
| <code>TELNET_OPTION_ECHO = 1;</code>
 +
| 0x01 echo option
 +
|-
 +
| <code>TELNET_OPTION_SUPPRESS_GA = 3;</code>
 +
| 0x03 suppress go ahead option
 +
|-
 +
| <code>TELNET_OPTION_TERMINAL_TYPE = 24;</code>
 +
| 0x18 terminal type
 +
|-
 +
| <code>TELNET_OPTION_WINDOW_SIZE = 31;</code>
 +
| 0x1F negotiate window size
 +
|-
 +
| <code>TELNET_OPTION_TERMINAL_SPEED = 32;</code>
 +
| 0x20 terminal speed
 +
|-
 +
| <code>TELNET_OPTION_NEW_ENVIRONMENT = 39;</code>
 +
| 0x27 new environment
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''SysLog facility code constants''' <code> SYSLOG_FACILITY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SYSLOG_FACILITY_KERNEL = 0;</code>
 +
| kernel messages
 +
|-
 +
| <code>SYSLOG_FACILITY_USER = 1;</code>
 +
| user-level messages
 +
|-
 +
| <code>SYSLOG_FACILITY_MAIL = 2;</code>
 +
| mail system
 +
|-
 +
| <code>SYSLOG_FACILITY_SYSTEM = 3;</code>
 +
| system daemons
 +
|-
 +
| <code>SYSLOG_FACILITY_SECURITY = 4;</code>
 +
| security/authorization messages (note 1)
 +
|-
 +
| <code>SYSLOG_FACILITY_SYSLOG = 5;</code>
 +
| messages generated internally by syslogd
 +
|-
 +
| <code>SYSLOG_FACILITY_PRINTER = 6;</code>
 +
| line printer subsystem
 +
|-
 +
| <code>SYSLOG_FACILITY_NEWS = 7;</code>
 +
| network news subsystem
 +
|-
 +
| <code>SYSLOG_FACILITY_UUCP = 8;</code>
 +
| UUCP subsystem
 +
|-
 +
| <code>SYSLOG_FACILITY_CLOCK = 9;</code>
 +
| clock daemon (note 2)
 +
|-
 +
| <code>SYSLOG_FACILITY_AUTH = 10;</code>
 +
| security/authorization messages (note 1)
 +
|-
 +
| <code>SYSLOG_FACILITY_FTP = 11;</code>
 +
| FTP daemon
 +
|-
 +
| <code>SYSLOG_FACILITY_NTP = 12;</code>
 +
| NTP subsystem
 +
|-
 +
| <code>SYSLOG_FACILITY_AUDIT = 13;</code>
 +
| log audit (note 1)
 +
|-
 +
| <code>SYSLOG_FACILITY_ALERT = 14;</code>
 +
| log alert (note 1)
 +
|-
 +
| <code>SYSLOG_FACILITY_CLOCK2 = 15;</code>
 +
| clock daemon (note 2)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL0 = 16;</code>
 +
| local use 0 (local0)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL1 = 17;</code>
 +
| local use 1 (local1)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL2 = 18;</code>
 +
| local use 2 (local2)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL3 = 19;</code>
 +
| local use 3 (local3)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL4 = 20;</code>
 +
| local use 4 (local4)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL5 = 21;</code>
 +
| local use 5 (local5)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL6 = 22;</code>
 +
| local use 6 (local6)
 +
|-
 +
| <code>SYSLOG_FACILITY_LOCAL7 = 23;</code>
 +
| local use 7 (local7)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''SysLog severity code constants''' <code> SYSLOG_SEVERITY_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SYSLOG_SEVERITY_EMERGENCY = 0;</code>
 +
| Emergency: system is unusable
 +
|-
 +
| <code>SYSLOG_SEVERITY_ALERT = 1;</code>
 +
| Alert: action must be taken immediately
 +
|-
 +
| <code>SYSLOG_SEVERITY_CRITICAL = 2;</code>
 +
| Critical: critical conditions
 +
|-
 +
| <code>SYSLOG_SEVERITY_ERROR = 3;</code>
 +
| Error: error conditions
 +
|-
 +
| <code>SYSLOG_SEVERITY_WARNING = 4;</code>
 +
| Warning: warning conditions
 +
|-
 +
| <code>SYSLOG_SEVERITY_NOTICE = 5;</code>
 +
| Notice: normal but significant condition
 +
|-
 +
| <code>SYSLOG_SEVERITY_INFORMATION = 6;</code>
 +
| Informational: informational messages
 +
|-
 +
| <code>SYSLOG_SEVERITY_DEBUG = 7;</code>
 +
| Debug: debug-level messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 +
<div style="font-size: 14px; padding-left: 12px;">'''Service logging constants''' <code> SERVICE_LOG_* </code></div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| <code>SERVICE_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code>
 +
| Service debugging messages
 +
|-
 +
| <code>SERVICE_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code>
 +
| Service informational messages, such as a service being created or destroyed
 +
|-
 +
| <code>SERVICE_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code>
 +
| Service error messages
 +
|-
 +
| <code>SERVICE_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code>
 +
| No Service messages
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Type definitions ===
 
=== Type definitions ===

Revision as of 02:30, 16 December 2016

Return to Unit Reference


Description


To be documented

Constants



NTP specific constants NTP_*
NTP_VERSION_1 = 1;  
NTP_VERSION_2 = 2;  
NTP_VERSION_3 = 3;  
NTP_VERSION_4 = 4;  
 
NTP_VERSION_MASK = $07; shl 3
 
NTP_VERSION = NTP_VERSION_4; Current NTP/SNTP version
NTP_MIN_VERSION = NTP_VERSION_2; Minimum acceptable NTP/SNTP version
NTP_MAX_VERSION = NTP_VERSION_4; Maximum acceptable NTP/SNTP version
 
NTP_PACKET_SIZE = 48; SizeOf(TNTPPacket)
 
NTP_TIMESTAMP_START = 94354848000000000; Offset between 1/1/1601 (Ultibo) and 1/1/1900 (NTP Timestamp)


NTP leap indicator constants NTP_LEAP_*
NTP_LEAP_NONE = 0;  
NTP_LEAP_LAST_61 = 1;  
NTP_LEAP_LAST_59 = 2;  
NTP_LEAP_ALARM = 3;  
 
NTP_LEAP_MASK = $03; shl 6


NTP mode constants NTP_MODE_*
NTP_MODE_RESERVED = 0; Reserved
NTP_MODE_SYMMETRIC_ACTIVE = 1; Symmetric active
NTP_MODE_SYMMETRIC_PASSIVE = 2; Symmetric passive
NTP_MODE_CLIENT = 3; Client
NTP_MODE_SERVER = 4; Server
NTP_MODE_BROADCAST = 5; Broadcast
NTP_MODE_CONTROL = 6; Reserved for NTP control message
NTP_MODE_PRIVATE = 7; Reserved for private use
 
NTP_MODE_MASK = $07; shl 0


NTP stratum constants NTP_STRATUM_*
NTP_STRATUM_INVALID = 0; unspecified or invalid
NTP_STRATUM_PRIMARY = 1; primary server (e.g., equipped with a GPS receiver)
NTP_STRATUM_SECONDARY2 = 2; secondary server (via NTP)
NTP_STRATUM_SECONDARY3 = 3; secondary server (via NTP)
NTP_STRATUM_SECONDARY4 = 4; secondary server (via NTP)
NTP_STRATUM_SECONDARY5 = 5; secondary server (via NTP)
NTP_STRATUM_SECONDARY6 = 6; secondary server (via NTP)
NTP_STRATUM_SECONDARY7 = 7; secondary server (via NTP)
NTP_STRATUM_SECONDARY8 = 8; secondary server (via NTP)
NTP_STRATUM_SECONDARY9 = 9; secondary server (via NTP)
NTP_STRATUM_SECONDARY10 = 10; secondary server (via NTP)
NTP_STRATUM_SECONDARY11 = 11; secondary server (via NTP)
NTP_STRATUM_SECONDARY12 = 12; secondary server (via NTP)
NTP_STRATUM_SECONDARY13 = 13; secondary server (via NTP)
NTP_STRATUM_SECONDARY14 = 14; secondary server (via NTP)
NTP_STRATUM_SECONDARY15 = 15; secondary server (via NTP)
NTP_STRATUM_UNSYNCRONIZED = 16; unsynchronized
NTP_STRATUM_RESERVED = 17; reserved


Telnet char constants TELNET_CHAR_*
TELNET_CHAR_NUL = #0;  
TELNET_CHAR_CR = #13;  
TELNET_CHAR_LF = #10;  
TELNET_CHAR_TAB = #9;  
TELNET_CHAR_ESC = #27;  
TELNET_CHAR_BACKSPACE = #127;  
 
TELNET_BUFFER_SIZE = SIZE_2K;  


Telnet state constants TELNET_STATE_*
TELNET_STATE_NONE = $00000000;  
TELNET_STATE_TRANSMIT_BINARY = $00000001;  
TELNET_STATE_ECHO = $00000002;  
TELNET_STATE_SUPPRESS_GA = $00000004;  
TELNET_STATE_TERMINAL_TYPE = $00000008;  
TELNET_STATE_WINDOW_SIZE = $00000010;  
TELNET_STATE_TERMINAL_SPEED = $00000020;  
TELNET_STATE_NEW_ENVIRONMENT = $00000040;  


Telnet command constants TELNET_COMMAND_*
TELNET_COMMAND_EOR = 239; 0xEF end of record command
TELNET_COMMAND_SE = 240; 0xF0 end of subnegotiations command
TELNET_COMMAND_NOP = 241; 0xF1 no operation command
TELNET_COMMAND_DM = 242; 0xF2 data mark command
TELNET_COMMAND_BRK = 243; 0xF3 break NVT charater
TELNET_COMMAND_IP = 244; 0xF4 interupt process command
TELNET_COMMAND_AO = 245; 0xF5 abort output command
TELNET_COMMAND_AYT = 246; 0xF6 are you there command
TELNET_COMMAND_EC = 247; 0xF7 erase character command
TELNET_COMMAND_EL = 248; 0xF8 erase line command
TELNET_COMMAND_GA = 249; 0xF9 go ahead command
TELNET_COMMAND_SB = 250; 0xFA begin option subnegotiations command
TELNET_COMMAND_WILL = 251; 0xFB will enable option
TELNET_COMMAND_WONT = 252; 0xFC won't enable option
TELNET_COMMAND_DO = 253; 0xFD request other party enables option
TELNET_COMMAND_DONT = 254; 0xFE request other party doesn't enable option
TELNET_COMMAND_IAC = 255; 0xFF interpret as command


Telnet option constants TELNET_OPTION_*
TELNET_OPTION_TRANSMIT_BINARY = 0; 0x00 transmit binary option
TELNET_OPTION_ECHO = 1; 0x01 echo option
TELNET_OPTION_SUPPRESS_GA = 3; 0x03 suppress go ahead option
TELNET_OPTION_TERMINAL_TYPE = 24; 0x18 terminal type
TELNET_OPTION_WINDOW_SIZE = 31; 0x1F negotiate window size
TELNET_OPTION_TERMINAL_SPEED = 32; 0x20 terminal speed
TELNET_OPTION_NEW_ENVIRONMENT = 39; 0x27 new environment


SysLog facility code constants SYSLOG_FACILITY_*
SYSLOG_FACILITY_KERNEL = 0; kernel messages
SYSLOG_FACILITY_USER = 1; user-level messages
SYSLOG_FACILITY_MAIL = 2; mail system
SYSLOG_FACILITY_SYSTEM = 3; system daemons
SYSLOG_FACILITY_SECURITY = 4; security/authorization messages (note 1)
SYSLOG_FACILITY_SYSLOG = 5; messages generated internally by syslogd
SYSLOG_FACILITY_PRINTER = 6; line printer subsystem
SYSLOG_FACILITY_NEWS = 7; network news subsystem
SYSLOG_FACILITY_UUCP = 8; UUCP subsystem
SYSLOG_FACILITY_CLOCK = 9; clock daemon (note 2)
SYSLOG_FACILITY_AUTH = 10; security/authorization messages (note 1)
SYSLOG_FACILITY_FTP = 11; FTP daemon
SYSLOG_FACILITY_NTP = 12; NTP subsystem
SYSLOG_FACILITY_AUDIT = 13; log audit (note 1)
SYSLOG_FACILITY_ALERT = 14; log alert (note 1)
SYSLOG_FACILITY_CLOCK2 = 15; clock daemon (note 2)
SYSLOG_FACILITY_LOCAL0 = 16; local use 0 (local0)
SYSLOG_FACILITY_LOCAL1 = 17; local use 1 (local1)
SYSLOG_FACILITY_LOCAL2 = 18; local use 2 (local2)
SYSLOG_FACILITY_LOCAL3 = 19; local use 3 (local3)
SYSLOG_FACILITY_LOCAL4 = 20; local use 4 (local4)
SYSLOG_FACILITY_LOCAL5 = 21; local use 5 (local5)
SYSLOG_FACILITY_LOCAL6 = 22; local use 6 (local6)
SYSLOG_FACILITY_LOCAL7 = 23; local use 7 (local7)


SysLog severity code constants SYSLOG_SEVERITY_*
SYSLOG_SEVERITY_EMERGENCY = 0; Emergency: system is unusable
SYSLOG_SEVERITY_ALERT = 1; Alert: action must be taken immediately
SYSLOG_SEVERITY_CRITICAL = 2; Critical: critical conditions
SYSLOG_SEVERITY_ERROR = 3; Error: error conditions
SYSLOG_SEVERITY_WARNING = 4; Warning: warning conditions
SYSLOG_SEVERITY_NOTICE = 5; Notice: normal but significant condition
SYSLOG_SEVERITY_INFORMATION = 6; Informational: informational messages
SYSLOG_SEVERITY_DEBUG = 7; Debug: debug-level messages


Service logging constants SERVICE_LOG_*
SERVICE_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG; Service debugging messages
SERVICE_LOG_LEVEL_INFO = LOG_LEVEL_INFO; Service informational messages, such as a service being created or destroyed
SERVICE_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR; Service error messages
SERVICE_LOG_LEVEL_NONE = LOG_LEVEL_NONE; No Service messages


Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

procedure ServicesInit;
Description: To be documented
Note None documented


NTP functions

procedure NTPUpdateTime(Client:TNTPClient);
Description: To be documented
Note None documented


SysLog functions

function SysLogLoggingStart(Logging:PLoggingDevice):LongWord;
Description: To be documented
Note None documented


function SysLogLoggingStop(Logging:PLoggingDevice):LongWord;
Description: To be documented
Note None documented


function SysLogLoggingOutput(Logging:PLoggingDevice; const Data:String):LongWord;
Description: To be documented
Note None documented


function SysLogLoggingOutputEx(Logging:PLoggingDevice; Facility,Severity:LongWord; const Tag,Content:String):LongWord;
Description: To be documented
Note None documented


function SysLogLoggingGetTarget(Logging:PLoggingDevice):String;
Description: To be documented
Note None documented


function SysLogLoggingSetTarget(Logging:PLoggingDevice; const Target:String):LongWord;
Description: To be documented
Note None documented


Service helper functions

procedure ServiceLog(Level:LongWord;const AText:String);
Description: To be documented
Note None documented


procedure ServiceLogInfo(const AText:String);
Description: To be documented
Note None documented


procedure ServiceLogError(const AText:String);
Description: To be documented
Note None documented


procedure ServiceLogDebug(const AText:String);
Description: To be documented
Note None documented


NTP helper functions

function NTPTimestampToHost(const Timestamp:TNTPTimestamp):TNTPTimestamp;
Description: Convert an NTP Timestamp to Host order
Note None documented


function NTPTimestampToNetwork(const Timestamp:TNTPTimestamp):TNTPTimestamp;
Description: Convert an NTP Timestamp to Network order
Note None documented


function NTPTimestampAdd(const Timestamp1,Timestamp2:TNTPTimestamp):TNTPTimestamp;
Description: To be documented
Note Expects Timestamp to be in Host order


function NTPTimestampSubtract(const Timestamp1,Timestamp2:TNTPTimestamp):TNTPTimestamp;
Description: To be documented
Note Expects Timestamp to be in Host order


function ClockTimeToNTPTimestamp(const Time:Int64):TNTPTimestamp;
Description: To be documented
Note Returns Timestamp in Host order


function NTPTimestampToClockTime(const Timestamp:TNTPTimestamp):Int64;
Description: To be documented
Note Expects Timestamp to be in Host order


Telnet helper functions

function TelnetCommandToString(Command:Byte):String;
Description: To be documented
Note None documented


function TelnetCommandHasOption(Command:Byte):Boolean;
Description: To be documented
Note None documented


function TelnetOptionToString(Option:Byte):String;
Description: To be documented
Note None documented


SysLog helper functions

function FileTimeToSysLogDateTime(const AFileTime:TFileTime):String;
Description: To be documented
Note None documented


function LoggingFacilityToSysLogFacility(Facility:LongWord):LongWord;
Description: To be documented
Note None documented


function LoggingSeverityToSysLogSeverity(Severity:LongWord):LongWord;
Description: To be documented
Note None documented


Return to Unit Reference