Internet Direct (Indy)
Home
PreviousUpNext
TWKSRecord Class

Represents a Well Known Service Resource Record from a DNS Response packet.

Pascal
TWKSRecord = class(TResultRecord);

TWKSRecord is a TResultRecord descendant that represents a resource record returned in the results for a DNS query. TWKSRecord is the collection item created to represent a resource resource returned when TIdDNSResolver.QueryRecords includes the value qtWKS for Well Known Service resource records. 

Well Known Service resoure records are used to describe the well known services supported by a particular protocol on a particular internet address. If a server supports both TCP and UDP variants of a service, multiple WKS resource records are returned in a DNS response. 

A Well Known Service resoure record uses the same DNS packet layout as other TResultRecord-based responses, but extends the use of RData to include the following definition and format: 

 

  • ADDRESS - 32-bit Internet address.
 

  • PROTOCOL - 8-bit IP protocol number. Uses BITMAP to indicate one bit per port of the specified protocol.
 

  • BITMAP - Variable length bit map with a length that is a multiple of 8-bits long. The first bit corresponds to port 0, the second to port 1, etc. If the bit map does not include a bit for a protocol of interest, that bit is assumed zero.
 

TWKSRecord extends TResultRecord to implement the specifics of accessing RData values as properties, including Address, Protocol, ByteCount, and BitMap. TWKSRecord also overrides the Parse method to read the values in RData into their property counterparts. 

The appropriate values and mnemonics for ports and protocols are specified in RFC 1010. For example, if PROTOCOL=TCP, the 26th bit corresponds to TCP port 25 (SMTP). If this bit is set, a SMTP server should be listening on TCP port 25; if zero, SMTP service is not supported on the specified address. 

Protocol specifies the IP protocol the host supports, as described in RFC 1010, and may contain one of the following values: 

 

Value 
Meaning 
Reserved 
ICMP Internet Control Message 
IGMP Internet Group Management 
GGP Gateway-to-Gateway 
Unassigned 
ST Stream 
TCP Transmission Control 
UCL 
EGP Exterior Gateway Protocol 
IGP any private interior gateway 
10 
BBN-RCC-MON BBN RCC Monitoring 
11 
NVP-II Network Voice Protocol 
12 
PUP 
13 
ARGUS 
14 
EMCON 
15 
XNET Cross Net Debugger 
16 
CHAOS 
17 
UDP User Datagram 
18 
MUX Multiplexing 
19 
DCN-MEAS DCN Measurement Subsystems 
20 
HMP Host Monitoring 
21 
PRM Packet Radio Measurement 
22 
XNS-IDP XEROX NS IDP 
23 
TRUNK-1 Trunk-1 
24 
TRUNK-2 Trunk-2 
25 
LEAF-1 Leaf-1 
26 
LEAF-2 Leaf-2 
27 
RDP Reliable Data Protocol 
28 
IRTP Internet Reliable Transaction 
29 
ISO-TP4 ISO Transport Protocol Class 4 
30 
NETBLT Bulk Data Transfer Protocol 
31 
MFE-NSP MFE Network Services Protocol 
32 
MERIT-INP MERIT Internodal Protocol 
33 
SEP Sequential Exchange Protocol 
34-60 
Unassigned 
61 
any host internal protocol 
62 
CFTP 
63 
any local network 
64 
SAT-EXPAK SATNET and Backroom EXPAK 
65 
MIT-SUBNET MIT Subnet Support 
66 
RVD MIT Remote Virtual Disk Protocol 
67 
IPPC Internet Pluribus Packet Core 
68 
any distributed file system 
69 
SAT-MON SATNET Monitoring 
70 
Unassigned 
71 
IPCV Internet Packet Core Utility 
72-75 
Unassigned 
76 
BR-SAT-MON Backroom SATNET Monitoring 
77 
Unassigned 
78 
WB-MON WIDEBAND Monitoring 
79 
WB-EXPAK WIDEBAND EXPAK 
80-254 
Unassigned 
255 
Reserved 
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.