idnits 2.17.1 draft-ietf-wnils-whois-arch-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-27) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 44 longer pages, the longest (page 2) being 65 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 44 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** There are 96 instances of too long lines in the document, the longest one being 7 characters in excess of 72. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (25 January 1995) is 10685 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? 'HARR85' on line 1853 looks like a reference -- Missing reference section? 'IAFA1' on line 1859 looks like a reference -- Missing reference section? 'IAFA' on line 1856 looks like a reference -- Missing reference section? 'NIR' on line 1868 looks like a reference -- Missing reference section? 'IIIR' on line 1863 looks like a reference -- Missing reference section? 'POST82' on line 1870 looks like a reference Summary: 9 errors (**), 0 flaws (~~), 4 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Peter Deutsch 3 INTERNET-DRAFT BUNYIP INFORMATION SYSTEMS, inc 4 Rickard Schoultz 5 Expires: 25 July 95 KTHNOC 6 Patrik Faltstrom 7 BUNYIP INFORMATION SYSTEMS, inc 8 Chris Weider 9 BUNYIP INFORMATION SYSTEMS, inc 11 25 January 1995 13 Architecture of the WHOIS++ service 15 STATUS OF THIS MEMO 17 This document is an Internet-Draft. Internet-Drafts are working 18 documents of the Internet Engineering Task Force (IETF), its areas, 19 and its working groups. Note that other groups may also distribute 20 working documents as Internet-Drafts. 22 Internet-Drafts are draft documents valid for a maximum of six 23 months and may be updated, replaced, or obsoleted by other docu- 24 ments at any time. It is inappropriate to use Internet- Drafts as 25 reference material or to cite them other than as ``work in pro- 26 gress.'' 28 To learn the current status of any Internet-Draft, please check the 29 ``1id-abstracts.txt'' listing contained in the Internet- Drafts 30 Shadow Directories on ds.internic.net (US East Coast), 31 nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or 32 munnari.oz.au (Pacific Rim). 34 Abstract 36 This document describes WHOIS++, an extension to the trivial WHOIS 37 service described in RFC 954 to permit WHOIS-like servers to make 38 available more structured information to the Internet. We describe 39 an extension to the simple WHOIS data model and query protocol and 40 a companion extensible, distributed indexing service. A number of 41 options have also been added such as the use of multiple languages 42 and character sets, more advanced search expressions, structured 43 data and a number of other useful features. An optional authenti- 44 cation mechanism for protecting all or part of the associated 45 WHOIS++ information database from unauthorized access is also 46 described. 48 Table of contents 50 Part I - WHOIS++ Overview 52 1.1. Purpose and Motivation....................................... 2 53 1.2. Basic Information Model...................................... 3 54 1.2.1. Changes to the current WHOIS Model......................... 3 55 1.2.2. Registering WHOIS++ servers................................ 4 56 1.2.3. The WHOIS++ Search Selection Mechanism..................... 5 57 1.2.4. The WHOIS++ Architecture................................... 6 58 1.3. Indexing in WHOIS++.......................................... 6 59 1.4. Getting Help................................................. 7 60 1.4.1. Minimum HELP Required...................................... 8 61 1.5. Options and Constraints...................................... 8 62 1.6. Formatting Responses......................................... 8 63 1.7. Reporting Warnings and Errors................................ 9 64 1.8. Privacy and Security Issues.................................. 9 66 Part II - WHOIS++ Implementation 68 2.1. Introduction................................................. 11 69 2.1.1. The WHOIS++ interaction model.............................. 11 70 2.2. The WHOIS++ Command set...................................... 12 71 2.2.1. System Commands............................................ 12 72 2.2.1.1. The COMMANDS command..................................... 13 73 2.2.1.2. The CONSTRAINTS command.................................. 13 74 2.2.1.3. The DESCRIBE command..................................... 14 75 2.2.1.4. The HELP command......................................... 14 76 2.2.1.5. The LIST command......................................... 14 77 2.2.1.6. The POLLED-BY command.................................... 14 78 2.2.1.7. The POLLED-FOR command................................... 15 79 2.2.1.8. The SHOW command......................................... 15 80 2.2.1.9. The VERSION command...................................... 15 81 2.2.2. The Search Command......................................... 15 82 2.2.2.1. Format of a Search Term.................................. 16 83 2.2.2.2. Format of a Search String................................ 17 84 2.3. WHOIS++ Constraints.......................................... 18 85 2.3.1. Required Constraints....................................... 18 86 2.3.2. Optional Constraints....................................... 19 87 2.3.2.1. The SEARCH Constraint.................................... 20 88 2.3.2.2. The FORMAT Constraint.................................... 21 89 2.3.2.3. The MAXFULL Constraint................................... 21 90 2.3.2.4. The MAXHITS Constraint................................... 21 91 2.3.2.5. The CASE Constraint...................................... 21 92 2.3.2.6. The AUTHENTICATE Constraint.............................. 21 93 2.3.2.7. The NAME Constraint...................................... 22 94 2.3.2.8. The PASSWORD Constraint.................................. 22 95 2.3.2.9. The LANGUAGE Constraint.................................. 22 96 2.3.2.10. The INCHARSET Constraint................................ 22 97 2.3.2.11. The IGNORE Constraint................................... 23 98 2.3.2.12. The INCLUDE Constraint.................................. 23 99 2.4. Server Response Modes........................................ 23 100 2.4.1. Default Responses.......................................... 24 101 2.4.2. Format of Responses........................................ 24 102 2.4.3. Syntax of a Formatted Response............................. 24 103 2.4.3.1. A FULL format response................................... 25 104 2.4.3.2. ABRIDGED Format Response................................. 26 105 2.4.3.3. HANDLE Format Response................................... 26 106 2.4.3.4. SUMMARY Format Response.................................. 27 107 2.4.3.5. SERVERS-TO-ASK Response.................................. 27 108 2.4.4. System Generated Messages.................................. 28 109 2.5. Compatibility with Older WHOIS Servers....................... 28 110 3. Miscellaneous.................................................. 28 111 3.1. Acknowledgements............................................. 28 112 3.2. Contact information.......................................... 29 114 Appendix A - Some Sample Queries................................... 30 115 Appendix B - Some sample responses................................. 31 116 Appendix C - Sample responses to system commands................... 33 117 Appendix D - Sample whois++ session................................ 35 118 Appendix E - System messages....................................... 37 119 Appendix F - The WHOIS++ BNF Grammar............................... 39 120 Appendix G - Description of Regular expressions.................... 41 122 1. 123 Part I - WHOIS++ Overview 125 1.1. Purpose and Motivation 127 The current NIC WHOIS service [HARR85] is used to provide a very 128 limited directory service, serving information about a small number 129 of Internet users registered with the DDN NIC. Over time the basic 130 service has been expanded to serve additional information and simi- 131 lar services have also been set up on other hosts. Unfortunately, 132 these additions and extensions have been done in an ad hoc and 133 uncoordinated manner. 135 The basic WHOIS information model represents each individual record 136 as a Rolodex-like collection of text. Each record has a unique 137 identifier (or handle), but otherwise is assumed to have little 138 structure. The current service allows users to issue searches for 139 individual strings within individual records, as well as searches 140 for individual record handles using a very simple query-response 141 protocol. 143 Despite its utility, the current NIC WHOIS service cannot function 144 as a general White Pages service for the entire Internet. Given the 145 inability of a single server to offer guaranteed response or relia- 146 bility, the huge volume of traffic that a full scale directory ser- 147 vice will generate and the potentially huge number of users of such 148 a service, such a trivial architecture is obviously unsuitable for 149 the current Internet's needs for information services. 151 This document describes the architecture and protocol for WHOIS++, 152 a simple, distributed and extensible information lookup service 153 based upon a small set of extensions to the original WHOIS informa- 154 tion model. These extensions allow the new service to address the 155 community's needs for a simple directory service, yet the extensi- 156 ble architecture is expected to also allow it to find application 157 in a number of other information service areas. 159 Added features include an extension to the trivial WHOIS data model 160 and query protocol and a companion extensible, distributed indexing 161 service. A number of other options have also been added, like 162 boolean operators, more powerful search constraints and search 163 methods and most specificly structured the data to make both the 164 client and the server part of the dialogue more stringent and 165 parseable. An optional authentication mechanism for protecting all 166 or parts of the associated WHOIS++ information database from unau- 167 thorized access is also briefly described. 169 The basic architecture of WHOIS++ allows distributed maintenance of 170 the directory contents and the use of the WHOIS++ indexing service 171 for locating additional WHOIS servers. Although a general overview 172 of this service is included for completeness, the indexing exten- 173 sions are described in a separate paper. 175 1.2. Basic Information Model 177 Our extensions to the existing WHOIS service are centered upon a 178 recommendation to structure user information around a series of 179 standardized information templates, such as to those described by 180 [IAFA1]. Such templates consist of ordered sets of data elements 181 (or attribute-value pairs) and a number of groups at the IETF are 182 now working on standardizing their format and content [IAFA], 183 [NIR]. 185 It is intended that adding such structured templates to a server 186 and subsequently identifying and searching them be simple tasks. 187 The creation and use of customized templates should also be possi- 188 ble with little effort, although their use should be discouraged 189 where appropriate standardized templates exist. 191 We also offer a set of extensions to the trivial protocol described 192 in RFC954 [HARR85] to allow the user to constrain searches to 193 desired attributes or template types, in addition to the existing 194 commands for specifying handles or simple strings. 196 It is expected that the minimalist approach we have taken will find 197 application where the high cost of configuring and operating tradi- 198 tional White Pages services can not currently be justified. 200 Also note that the new architecture makes no assumptions about the 201 search and retrieval mechanisms used within individual servers. 202 Operators are free to use dedicated database formats, fast indexing 203 software or even provide gateways to other directory services to 204 store and retrieve information, if desired. 206 The WHOIS++ server simply functions as a known front end, offering 207 a simple data model and communicating through a well known port and 208 query protocol. The format of both queries and replies has been 209 structured to allow the use of client software for generating 210 searches and displaying the results. At the same time, some effort 211 has been made to keep responses at least to some degree readible by 212 humans, to ensure low entry cost and to ease debugging. 214 The actual implemention details of of an individual WHOIS search 215 engine are left to the imagination of the implementor and it is 216 hoped that the simple, extensible approach taken will encourage 217 experimentation and the development of improved search engines. 219 1.2.1. Changes to the current WHOIS Model 221 The current WHOIS service is based upon an extremely simple data 222 model. The NIC WHOIS database consists of a series of individual 223 records, each of which is identified by a single unique identifer 224 (the "handle"). Each record contains one or more lines of informa- 225 tion. Currently, there is no structure or implicit ordering of this 226 information, although by implication each record is concerned with 227 information about a single user or service. 229 We have implemented two basic changes to this model. First, we have 230 structured the information within the database as collections of 231 data elements, or simple attribute/value pairs. Each individual 232 record contains a specified ordered set of these data elements. 234 Secondly, we have introduced typing of the database records. In 235 effect, each record is based upon one of a specified set of tem- 236 plates, each containing a finite and specified number of data ele- 237 ments. This allow users to easily limit searches to specific col- 238 lections of information, such as information about users, services, 239 abstracts of papers, descriptions of software, and so on. 241 As a final extension, we require that each individual WHOIS++ data- 242 base on the Internet be assigned a unique handle, analogous to the 243 handle associated with each database record. 245 The WHOIS++ database structure is shown in Fig. 1. 247 1.2.2. Registering WHOIS++ servers 249 We propose that individual database handles be registered through 250 the Internet Assigned Numbers Authority (the IANA), ensuring their 251 uniqueness. This will allow us to specify each WHOIS++ entry on the 252 Internet as a server handle and a unique record handle pair. This 253 pair is called the ``composed handle''. 255 A unique registered handle is preferable to using the host's IP 256 address, since it is conceivable that the WHOIS++ server for a par- 257 ticular domain may move over time. If we preserve the unique 258 WHOIS++ handle in such cases we have the option of using it for 259 resource discovery and networked information retrieval (see [IIIR] 260 for a discussion of resource and discovery and support issues). 261 There are many ways of guaranteeing uniqueness of server handles; 262 we will discuss them in a separate paper. 264 We believe that organizing information around a series of such tem- 265 plates will make it easier for administrators to gather and main- 266 tain this information and thus encourage them to make such informa- 267 tion available. At the same time, as users become more familiar 268 with the data elements available within specific templates they 269 will be better able to specify their searches, leading to a more 270 useful service. 272 ______________________________________________________________________ 273 | | 274 | + Single unique WHOIS++ database handle | 275 | | 276 | _______ _______ _______ | 277 | handle3 |.. .. | handle6 |.. .. | handle9 |.. .. | | 278 | _______ | _______ | _______ | | 279 | handle2 |.. .. | handle5 |.. .. | handle8 |.. .. | | 280 | _______ | _______ | _______ | | 281 | handle1 |.. .. | handle4 |.. .. | handle7 |.. .. | | 282 | |.. .. | |.. .. | |.. .. | | 283 | ------- ------- ------- | 284 | Template Template Template | 285 | Type 1 Type 2 Type 3 | 286 | | 287 | | 288 | | 289 | | 290 | Fig.1 - Structure of a WHOIS++ database. | 291 | | 292 | Notes: - Entire database is identified by a single unique WHOIS | 293 | handle. | 294 | - Each record has a single unique handle and a specific set | 295 | of attributes, determined by the template type used. | 296 | - Each value associated with an attribute can be any ASCII | 297 | string up to a specified length. | 298 |______________________________________________________________________| 300 1.2.3. The WHOIS++ Search Selection Mechanism 302 The WHOIS++ search mechanism is intended to be extremely simple. A 303 search command consists of one or more search terms, with an 304 optional nvset of global constraints (specifiers that modify or 305 control a search). 307 Search terms allow the user to specify template type, attribute, 308 value or handle that any record returns must satisfy. Each search 309 term can have an optional set of local constraints that apply to 310 only that term. 312 A WHOIS++ database may be seen as a single rolodex-like collection 313 of typed records. Each term specifies a further constraint that 314 the selected set of output records must satisfy. Each term may thus 315 be thought of as performing a subtractive selection, in the sense 316 that any record that does not fulfill the term is discarded from 317 the result set. Boolean searches are possible by the use of AND, 318 OR, NOT and parenthesis. 320 1.2.4. The WHOIS++ Architecture 322 The WHOIS++ directory service has an architecture which is 323 separated into two components; the base level server, which is 324 described in this paper, and a indexing server. A single physical 325 server can act as both a base level server and an indexing server. 327 A base level server is one which contains only filled templates. An 328 indexing server is one which contains forward knowledge (q.v.) and 329 pointers to other indexing servers or base level servers. 331 1.3. Indexing in WHOIS++ 333 Indexing in WHOIS++ is used to tie together many base level servers 334 and index servers into a unified directory service. 336 Each base level server and index server which wishes to participate 337 in the unified directory service must generate "forward knowledge" 338 for the entries it contains. One type of forward knowledge is the 339 "centroid". 341 An example of a centroid is as follows: if a whois++ server con- 342 tained exactly three records, as follows: 344 Record 1 Record 2 345 Template: Person Template: Person 346 First-Name: John First-Name: Joe 347 Last-Name: Smith Last-Name: Smith 348 Favourite-Drink: Labatt Beer Favourite-Drink: Molson Beer 350 Record 3 351 Template: Domain 352 Domain-Name: foo.edu 353 Contact-Name: Mike Foobar 355 the centroid for this server would be 357 Template: Person 358 First-Name: Joe 359 John 360 Last-Name: Smith 361 Favourite-Drink:Beer 362 Labatt 363 Molson 365 Template: Domain 366 Domain-Name: foo.edu 367 Contact-Name: Mike 368 Foobar 370 An index server would then collect this centroid for this server as 371 forward knowledge. 373 Index servers can collect forward knowledge for any servers it 374 wishes. In effect, all of the servers that the index server knows 375 about can be searched with a single query to the index server; the 376 index server holds the forward knowledge along with pointers to the 377 servers it indexes, and can refer the query to servers which might 378 hold information which satisfies the query. 380 Implementors of this protocol are strongly encouraged to incor- 381 porate centroid generation abilities into their servers. 383 ------------------------------------------------------------------- 385 ____ ____ 386 top level | | | | 387 whois index | | | | 388 servers ---- ---- 390 ____ ____ 391 first level | | | | 392 whois index | | | | 393 servers ---- ---- 395 ____ ____ ____ 396 individual | | | | | | 397 whois servers | | | | | | 398 ---- ---- ---- 400 Fig. 2 - Indexing system architecture. 402 ------------------------------------------------------------------- 404 1.4. Getting Help 406 Another extension to the basic WHOIS service is the requirement 407 that all servers support at least a minimal set of help commands, 408 allowing users to find out information about both the individual 409 server and the entire WHOIS++ service itself. This is done in the 410 context of the new extended information model by defining two 411 specific template formats and requiring each server to offer at 412 least one example of each record using these formats. The operator 413 of each WHOIS service is therefor expected to have, as a minimum, a 414 single example of SERVICES and HELP records, which can be accessed 415 through appropriate commands. 417 1.4.1. Minimum HELP Required 419 Executing the command: 421 DESCRIBE 423 gives a brief information about the WHOIS++ server. 425 Executing the command: 427 HELP 429 gives a brief description of the WHOIS++ service itself. 431 The text of both required helped records should contain pointers to 432 additional help subjects that are available. 434 Executing the command: 436 HELP 438 may give information on any topic. 440 1.5. Options and Constraints 442 The WHOIS++ service is based upon a minimal core set of commands 443 and controlling constraints. A small set of additional optional 444 commands and constraints can be supported. These would allow users 445 to perform such tasks as provide security options, modify the 446 information contents of a server or add multilingual support. The 447 required set of WHOIS++ commands are summarized in section 2.2. 448 WHOIS++ constraints are described in section 2.4. Optional commands 449 and constraints are described in section 2.5. 451 1.6. Formatting Responses 453 The output returned by a WHOIS++ server is structured to allow 454 machine parsing and automated handling. Of particular interest in 455 the ability to return summary information about a search (without 456 having to return the entire results). 458 All output of searches will be returned in one of five output for- 459 mats, which will be one of FULL, ABRIDGED, HANDLE, SUMMARY or 460 SERVERS-TO-ASK. Note that a conforming server is only required to 461 support the first four formats. 463 When available, SERVERS-TO-ASK format is used to indicate that a 464 search cannot be completed but that one or more alternative WHOIS++ 465 servers may be able to perform the search. 467 Details of each output format are specified in section 2.5. 469 1.7. Reporting Warnings and Errors 471 The formatted response of WHOIS++ commands allows the encoding of 472 warning or error messages to simplify parsing and machine handling. 473 The syntax of output formats are described in detail in section 474 2.5, and details of WHOIS++ warnings and error conditions are given 475 in section appendix E. 477 All system messages are numerical, but can be tagged with text. It 478 is the clients decision if the text is presented to the user. 480 1.8. Privacy and Security Issues 482 The basic WHOIS++ service was conceived as a simple, unauthenti- 483 cated information lookup service, but there are occasions when 484 authentication mechanisms are required. To handle such cases, an 485 optional mechanism is provided for authenticating each WHOIS++ 486 transaction. 488 The current identified authentication mechanism is PASSWORD, which 489 uses simple password authentication. Any other scheme name used 490 must begin with the characters "X-" and should thus be regarded as 491 experimental and non-standard. 493 Note that the WHOIS++ authentication mechanism does not dictate the 494 actual authentication scheme used, it merely provides a framework 495 for indicating that a particular transaction is to be authenti- 496 cated, and the appropriate mechanisms to use. This mechanism is 497 extensible and individual implementors are free to add additional 498 mechanisms. 500 This document includes a very simple authentication scheme where a 501 combination of username and password is sent together with the 502 search string so the server can verify that the user have access to 503 the information. Note that this is NOT by any means a method recom- 504 mended to secure the data itself because both password and informa- 505 tion are tranferred unencrypted over the network. 507 Given the unauthenticated nature that default services like white 508 pages services are, it is easy to either forget the implications of 509 this and just show all data to the public Internet, or think that 510 Internet is so dangerous that information is hidden from the Inter- 511 net so the whole idea of a global whitepages service is lost. 512 Therefore the type of authentication scheme selected and the public 513 nature of the Internet environment must still be taken into con- 514 sideration when assessing the security and authentication of the 515 information served. 517 A more detailed exposition on security is outside the scope of this 518 document. 520 2. Part II - WHOIS++ Implementation 522 2.1. Introduction 524 The WHOIS++ protocol specifies the interactions between a WHOIS 525 client and a WHOIS server supporting the WHOIS++ extensions. These 526 extensions are designed to be backwards compatible with existing 527 servers, in the sense that a new server receiving any of the older 528 commands specified in RFC 954 [HARR85] will behave in the same 529 manner as the original NIC WHOIS server. 531 Obviously, it is not possible to ensure desired behaviour if one of 532 the extended commands is sent to an older WHOIS server, since the 533 requested functionality is simply not there. Still, it would be 534 possible to query whether the WHOIS++ command set is supported as 535 an attribute for each WHOIS server in an appropriate services 536 registry (which itself could be set up using a WHOIS++ server). 537 Thus, in practice this should not be a problem. In addition, any 538 such command sent to an older WHOIS server would simply be treated 539 as a search term, and thus no harm should result. 541 The small number of older servers, and the probability that at 542 least some of the older servers will be converted to WHOIS++ as 543 implementations become available, means that backwards compatibil- 544 ity is not expected to be a problem in practice. 546 2.1.1. The WHOIS++ interaction model 548 A WHOIS++ server will normally listen for a TCP connections on the 549 allocated WHOIS port (port 43) (although a WHOIS++ server can be 550 accessed over any TCP connection). Once a connection is esta- 551 blished, the server issues a banner message, then listens for 552 input. The command specified in this input is processed and the 553 results returned including an ending system message. If the 554 optional HOLD constraint has not been specified the connection is 555 then terminated. 557 If the server supports the optional HOLD constraint, and this con- 558 straint is specified as part of any command, the server continues 559 to listen on the connection for another line of input. This cycle 560 continues as long as the sender continues to append the required 561 HOLD constraint to each subsequent command. 563 At the same time, each server is permitted to set an optional 564 timeout value (which should be indicated in the response to the 565 CONSTRAINTS command). If set, the server is free to terminate an 566 idle connection at any time after this delay has passed with no 567 input from the client. If the server terminates the connection due 568 to timeout, it will be indicated by the system message. The timeout 569 value is not changeable by the client. 571 2.2. The WHOIS++ Command set 573 There are two types of WHOIS++ commands - system commands and the 574 WHOIS++ search command. 576 The WHOIS++ command set consists of a core set of required systems 577 commands, a single required search command and an set of optional 578 system commands which support features that are not required by all 579 servers. The set of required WHOIS++ system commands are listed in 580 Table I. Details of the allowable search terms for the search com- 581 mand are included in Table II. 583 Each WHOIS++ command also allows the use of one or more controlling 584 constraints, which select can be used to override defaults or oth- 585 erwise modify server behavior. There is a core set of constraints 586 that must be supported by all conforming servers. These include 587 SEARCH (which controls the type of search performed), FORMAT (which 588 determines the output format used) and MAXHITS (which determines 589 the maximum number of matches that a a search can return). These 590 required constraints are summarized in Table III. 592 An additional set of optional constraints are used to provide sup- 593 port for different character sets, indicate the need and type of 594 authentication to perform on a transaction, and permit multiple 595 transactions during a single communications session. These optional 596 constraints are listed in Table IV. 598 It is possible, using the required COMMANDS and CONSTRAINTS system 599 commands, to query any WHOIS++ server for its list of supported 600 commands and constraints. 602 2.2.1. System Commands 604 System commands are commands to the server for information or to 605 control its operation. These include commands to list the template 606 types available from individual servers, to obtain a single blank 607 template of any available type, and commands to obtain the list of 608 valid commands and constraints supported on a server. 610 There are also commands to obtain the current version of the 611 WHOIS++ protocol supported, to access a simple help subsystem, to 612 obtain a brief description of the service (which is intended, among 613 other things, to support the automated registration of the service 614 by yellow pages directory services). All of these commands are 615 required from a conforming WHOIS++ server. 617 ------------------------------------------------------------------------ 619 Short Long Form Functionality 620 ----- --------- ------------- 621 COMMANDS [ ':' HOLD ] list valid WHOIS++ commands 622 supported by this server 624 CONSTRAINTS [ ':' HOLD ] List valid constraints 625 supported by this server 627 DESCRIBE [ ':' HOLD ] Describe this server, 628 formating the response using 629 the standard IAFA "Services" 630 template 632 '?' HELP [ [':' ]] System help, using standard 633 IAFA "Help" template 635 LIST [':' ] List templates supported 636 by this system 638 POLLED-BY [ ':' HOLD ] List indexing servers 639 that are know to track 640 this server 642 POLLED-FOR [ ':' HOLD ] List information about 643 what this server is 644 tracking for 646 SHOW [':' ] Show contents of templates 647 specified 649 VERSION [ ':' HOLD ] return current version of 650 the protocol supported. 652 Table I - Required WHOIS++ SYSTEM commands. 654 ------------------------------------------------------------------------ 656 Below follows a descriptions for each command. Examples of 657 responses to each command is in Appendix C. 659 2.2.1.1. The COMMANDS command 661 The COMMANDS command returns a list of commands that the server 662 supports. The response is formatted as an ABRIDGED response. 664 2.2.1.2. The CONSTRAINTS command 666 The CONSTRAINTS command returns a list of constraints and the 667 values of those that the server supports. The response is formatted 668 as a FULL response, where every constraint is represented as a 669 separate record. The template name for these records is CONSTRAINT. 670 No attention is paid to handles. Each record has, as a minimum, the 671 following two fields: 673 - "Constraint", which contains the attribute name described - 674 "Default", which shows the default value for this constraint. 676 If the client is permitted to change the value of the constraint, 677 there is also: 679 - "Range" field, which contains a list of values that this 680 server supports, as a comma separated list; Or, if the range 681 is numerical, as a pair of numbers separated with a hyphen. 683 2.2.1.3. The DESCRIBE command 685 This is equivalent to issuing the search command on the local 686 server with only the terms "template=services" and 687 "subject=describe" and will result in the display of the 688 corresponding SERVICES template with an attribute of "subject" and 689 value of "describe", except that the DESCRIBE command only searches 690 local information and may not return pointers to other servers. 692 2.2.1.4. The HELP command 694 The HELP command takes an optional argument as subject to get help 695 for. This is equivalent to issuing the search command on the local 696 server only with the terms "template=help and subject=" 697 (or "subject=help" if no argument specified) and will result in the 698 display of the corresponding HELP template with subject "help". 699 The HELP command differs from the above search command in that the 700 HELP command only searches local information and may not return 701 pointers to other servers. 703 2.2.1.5. The LIST command 705 The LIST command returns the name of the templates available on the 706 server. The answer is in ABRIDGED format with the template name as 707 the first word on each line. 709 2.2.1.6. The POLLED-BY command 711 The POLLED-BY command returns a list of servers and the templates 712 and attribute names that those server polled as centroids from this 713 server. The format is in FULL format with two attributes, Template 714 and Field. Each of these is a list of names of the templates or 715 fields polled. 717 2.2.1.7. The POLLED-FOR command 719 The POLLED-FOR command returns a list of servers that this server 720 has polled, and the template and attribute names for each of those. 721 The answer is in FULL format with two attributes, Template and 722 Field. 724 2.2.1.8. The SHOW command 726 The SHOW command takes a template name as argument and returns 727 information about a specific template, formatted as a FULL 728 response. The answer is formatted as a blank template with the 729 requested name. 731 2.2.1.9. The VERSION command 733 This is equivalent to issuing the search command on the local 734 server only with the terms "template=version" and will result in 735 the display of the VERSION template, except that the VERSION com- 736 mand only searches local information and may not return pointers to 737 other servers. 739 The output format is a FULL response containg a record with tem- 740 plate name VERSION. The handle for this record is unspecified. The 741 record must have attribute name "Version", which value is "1.0" for 742 this version of the protocol. The record may also have the addi- 743 tional fields "Program-Name" and "Program-Version" which gives 744 information about the server implementation if the server so 745 desires. 747 2.2.2. The Search Command 749 A search command consists of one or more search terms, which might 750 each have local constraints, followed by an optional colon with a 751 set of global search constraints. 753 Each attribute value in the WHOIS++ database is divided into one or 754 more words separated by whitespace. Each search term operates on 755 every word in the attribute value. 757 Two or more search terms may be combined with boolean operators 758 AND, OR or NOT (other than the implied AND between terms). The 759 operator AND has higher precedence than the operator OR, but this 760 can be changed by the use of parentheses. 762 Search constraints that apply to every search term are specified as 763 global constraints. Local constraints override global constraints 764 for the search term they are bound to. The search terms and the 765 global constraints are separated with a colon (':'). Additional 766 global constraints are appended to the end of the search command 767 delimited with a semicolon ';'. 769 If different search constraints can not be fulfilled, or the combi- 770 nation of different search constraints is uncombinable, the server 771 may choose to ignore some constraints, but still do the search and 772 return some records. 774 The set of required constraints are summarized in Table III. The 775 set of optional constraints are summarized in Table IV. 777 As an option, the server may accept specifications for attributes 778 for either inclusion or exclusion from a reply. Thus, users could 779 specify _only_ those attributes to return, or specific attributes 780 to filter out, thus creating custom views. 782 2.2.2.1. Format of a Search Term 784 Each search term consists of one of the following: 786 1) A search string, followed by an optional comma and set of 787 comma-separated local constraints. 789 2) A search term specifier (as listed in Table II), followed by '=', 790 followed by a search string, an optional comma and a set of 791 comma-separate local constraints. 793 3) An abbreviated search term specifier, followed by a search 794 string, followed by an optional comma and set of comma-separate 795 local constraints. 797 4) A combination of attribute name, followed by '=', followed by a 798 search string, followed by an optional comma and set of 799 comma-separate local constraints. 801 If no term identifier is provided, then the search will be applied 802 to attribute values only. This corresponds to an identifier of 803 VALUE. 805 If a HANDLE specifier is used then the search term can specify 806 either a composed handle or a record handle. The server is respon- 807 sible for resolving the composed handle to a server handle and a 808 record handle. 810 If a SEARCH-ALL specifier is used then the search will be applied 811 to all template names, handles, attribute names and attribute 812 values. 814 When the user specifies the search term using the form: 816 " = " 818 this is considered to be an ATTRIBUTE-VALUE search. 820 For discussion of the system reply format, and selecting the 821 appropriate reply format, see section 2.5. 823 ---------------------------------------------------------------------- 825 Valid specifiers: 826 ----------------- 828 Name Functionality 829 ---- ------------- 831 ATTRIBUTE-VALUE [ ',' ]* allows combining attribute and 832 value specifiers in one term. 833 HANDLE [ ',' ]* Confine search to handles. 834 SEARCH-ALL [ ',' ]* Search everything. 835 TEMPLATE [ ',' ]* Confine search to template names. 836 VALUE [ ',' ]* Confine search to attribute 837 values. This is the default. 838 (Note: The name HANDLE can be replaced with the shortname '!') 840 Acceptable forms of a search specifier: 841 --------------------------------------- 843 1) [',' ]* 845 2) = [',' ]* 847 3) [',' ]* 849 4) = [',' ]* 851 (Note: A is a name of a valid local constraint.) 853 Table II - Valid search command term specifiers. 855 ---------------------------------------------------------------------- 857 2.2.2.2. Format of a Search String 859 Special characters that need to be quoted are preceeded by a 860 backslash, '\'. 862 Special characters are space ' ', tab, equal sign '=', comma ',', 863 colon ':', backslash '\', semicolon ';', asterisk '*', period '.', 864 parenthesis '()', square brackets '[]', dollar sign '$' and circum- 865 flex '^'. 867 If the search term is given in some other character set than ISO- 868 8859-1, it must be specified by the constraint INCHARSET. 870 2.3. WHOIS++ Constraints 872 Constraints are intended to be hints or recommendations to the 873 server about how to process a command. They may also be used to 874 override default behaviour, such as requesting that a server not 875 drop the connection after performing a command. 877 Thus, a user might specify a search constraint as "SEARCH=exact", 878 which means that the search engine is to perform an exact match 879 search. It might also specify "LANGUAGE=Fr", which implies that the 880 server should use French in fuzzy matches. It might also be able to 881 issue system messages in French. 883 In general, contraints take the form "=", 884 with being one of a specified set of valid values. The not- 885 able exception is "HOLD", which takes no argument. 887 All constraints can be used as a global constraint, but only a few 888 can be used as local. See tables IV and V for information of which 889 constraints can be local. 891 The CONSTRAINTS system command is used to list the search con- 892 straints supported by an individual server. 894 If a server cannot satisfy the specified constraint there will be a 895 mechanism for informing the user in the reply, using system mes- 896 sages. In such cases, the search is still performed, with the the 897 server ignoring unsupported constraints. 899 2.3.1. Required Constraints 901 The following CONSTRAINTS must be supported in all conforming 902 WHOIS++ servers. 904 ------------------------------------------------------------------ 906 Format LOCAL/GLOBAL 907 ------ ------------- 909 SEARCH= {exact | lstring } LOCAL/GLOBAL 911 FORMAT= {full | abridged | handle | summary } GLOBAL 913 MAXHITS= { 1- } GLOBAL 915 Table III - Required WHOIS++ constraints. 917 ------------------------------------------------------------------ 919 2.3.2. Optional CONSTRAINTS 921 The following CONSTRAINTS and constraint values are not required of 922 a conforming WHOIS++ server, but may be supported. If supported, 923 their names and supported values must be returned in the response 924 to the CONSTRAINTS command. 926 --------------------------------------------------------------------- 928 Format LOCAL/GLOBAL 929 ------ ------------- 931 SEARCH= { regex | fuzzy | substring | } LOCAL/GLOBAL 933 CASE= { ignore | consider } LOCAL/GLOBAL 935 FORMAT= { servers-to-ask | } GLOBAL 937 MAXFULL= { 1- } GLOBAL 939 AUTHENTICATE= password GLOBAL 941 NAME= GLOBAL 943 PASSWORD= GLOBAL 945 INCHARSET= { us-ascii | iso-8859-* } GLOBAL 947 LANGUAGE= GLOBAL 949 HOLD GLOBAL 951 IGNORE= {attributelist} GLOBAL 953 INCLUDE= {attributelist} GLOBAL 955 Table IV - Optional WHOIS++ constraints. 957 ---------------------------------------------------------------------- 959 2.3.2.1. The SEARCH Constraint 961 The SEARCH constraint is used for specifying the method that is to 962 be used for the search. The default method is "exact". Following is 963 a definition of each search method. 965 exact The search will succeed for a word that exactly 966 matches the search string. 968 substring The search will succeed for a word that matches 969 a part of a word. 971 regex The search will succeed for a word when a regular 972 expression matches the searched data. Regular 973 expression is built up by using constructions of 974 '*', '.', '^', '$', and '[]'. For use of 975 regular expressions see Appendix G. 977 fuzzy The search will succeed for words that matches the 978 search string by using an algorithm designed to catch 979 closely related names with different spelling, e.g. 980 names with the same pronounciation. The server 981 chooses which algorithm to use, but it may vary 982 depending on template name, attribute name and 983 language used (see Constraint Language above). 985 lstring The search will succed for words that begins 986 with the search string. 988 2.3.2.2. The FORMAT Constraint 990 The FORMAT constraint describes what format the result will be in. 991 Default format is FULL. For a description of each format, see 992 Server Response Modes below. 994 2.3.2.3. The MAXFULL Constraint 996 The MAXFULL constraint sets the limit of the number of matching 997 records the server allows before it enforces SUMMARY responses. 998 The client may attempt to override this value by specifying another 999 value to that constraint. Example: If, for privacy reasons, the 1000 server will return the response in SUMMARY format if the number of 1001 hits exceeds 2, the MAXFULL constraint is set to 2 by the server. 1003 Regardless of what format the client did or did not ask for, the 1004 server will change the response format to SUMMARY when the number 1005 of matching records equals or exceeds this value. 1007 2.3.2.4. The MAXHITS Constraint 1009 The MAXHITS constraint sets the maximum number of records the 1010 client can get in a search respone. 1012 2.3.2.5. The CASE Constraint 1014 The CASE constraint defines if the search should be done case sen- 1015 sistive or not. Default value is to have case ignored. 1017 2.3.2.6. The AUTHENTICATE Constraint 1019 The AUTHENTICATE constraint describes which authentication method 1020 to use when executing the search. By using a specific authentica- 1021 tion method, some other constraints might be needed which is speci- 1022 fied by the authentication method. 1024 The only authentication method described in this document is "pass- 1025 word", if used, also the two other constraints "name" and "pass- 1026 word" need to be set. 1028 2.3.2.7. The NAME Constraint 1030 The NAME constraint is only used together with some authentication 1031 method named by the constraint "authenticate". The only use 1032 described in this document is by sending a username as a string of 1033 characters which together with the string given as an argument to 1034 the "password" constraint is sent to the server. The server can use 1035 that pair of strings to do a simple authentication check, like the 1036 UNIX login program do. 1038 2.3.2.8. The PASSWORD Constraint 1040 The PASSWORD constraint is only used together with some authentica- 1041 tion method named by the constraint "authenticate". The only use 1042 described in this document is by sending a password as a string of 1043 characters which together with the string given as an argument to 1044 the "name" constraint is sent to the server. The server can use 1045 that pair of strings to do a simple authentication check, like the 1046 UNIX login program do. 1048 2.3.2.9. The LANGUAGE Constraint 1050 The LANGUAGE constraints can be used as an extra information to the 1051 fuzzy matching search method, and it might also be used to tell the 1052 server to give the system responses in another language, although 1053 this ability should be handled by the client. The two-letter 1054 language code defined in ISO 639:1988 can be used as a value for 1055 the language constraint. In these, the case of the letters are 1056 insignigicant. Other language codes shall be interpreted according 1057 to the Internet standard for language codes in RFC 822/MIME mes- 1058 sages, if and when such a standard is adopted. 1060 2.3.2.10. The INCHARSET Constraint 1062 The INCHARSET constraint tells the server in which character set 1063 the search string itself is given in. The default character set is 1064 "ISO-8859-1". 1066 2.3.2.11. The IGNORE Constraint 1068 The IGNORE constraint specifies which attributes to NOT include in 1069 the result. All other attributes will be included (as if named 1070 explicitly by the "include" constraint). 1072 If an attribute is named both with the "include" and "ignore" con- 1073 straint, the attribute is to be included in the result, but the 1074 system message must be "% 205 Requested constraint not fulfilled". 1076 2.3.2.12. The INCLUDE Constraint 1078 The INCLUDE constraint specifies which attributes to include in the 1079 result. All other attributes will be excluded (as if named expli- 1080 citly by the "ignore" constraint). 1082 If an attribute is named both with the "include" and "ignore" con- 1083 straint, the attribute is to be included in the result, but the 1084 system message must be "% 205 Requested constraint not fulfilled". 1086 2.4. Server Response Modes 1088 There are currently a total of five different response modes possi- 1089 ble for WHOIS++ servers. These are FULL, ABRIDGED, HANDLE, SUMMARY 1090 and SERVERS-TO-ASK. The syntax of each output format is specified 1091 in more detail in the following section. 1093 1) A FULL format response provides the complete contents of each 1094 template matching the specified query, including the template 1095 type and the composed handle for each record. 1097 2) An ABRIDGED format response provides a brief summary, including 1098 (as a minimum) the composed handle and relevant information for 1099 that template. 1101 3) A HANDLE format response returns only a list of handles that 1102 matched the specified query. 1104 4) A SUMMARY response provides only a brief summary of information 1105 the number of matches and the list of template types in which the 1106 matches occured. 1108 5) A SERVERS-TO-ASK response returns only a pointer to another 1109 WHOIS++ server, which might possibly be able to answer the 1110 specified query. 1112 The server may respond with a null answer and may also respond with 1113 a null answer together with a correct system message to indicate 1114 that the query was too complex. 1116 2.4.1. Default Responses 1118 By default, a WHOIS++ server will provide a FULL response. This may 1119 be changed by the client with the use of the global constraint 1120 "format". 1122 The server is allowed to provide response in SUMMARY format if the 1123 number of hits exceeds the value of the global constraint "max- 1124 full". 1126 The server will not respond with more matches than the value speci- 1127 fied with the global constraint "maxhits"; Not in any response for- 1128 mat. If the number of matches exceeds this value, the server will 1129 issues the system message 110 (maxhits value exceeded), but will 1130 still show the responses, up to the number of the "maxhits" con- 1131 straint value. This mechanism will allow the server to hide the 1132 number of possible matches to a search command. 1134 The server response modes are summarized in Table V. 1136 2.4.2. Format of Responses 1138 Each response consists of a numerical system generated message, 1139 which can be tagged with text, followed by an optional formatted 1140 response message, followed by a second system generated messages. 1142 That is: 1144 '%' 1146 [ ] 1148 '%' 1150 If there are no matches to a query, the system is not required to 1151 generate any output as a formatted response, although it must still 1152 generate system messages. 1154 For information about the format for system messages, see Appendix 1155 E. 1157 2.4.3. Syntax of a Formatted Response 1159 All formatted responses consist of a START line, followed by a 1160 response-specific section, followed by a TERMINATION line. It is 1161 permissible to insert any number of lines consisting solely of new- 1162 lines within a formatted response to improve readibility. 1164 A START line consists of a line beginning with a '#' in the first 1165 column, followed by one white space character (SPACE or TAB), fol- 1166 lowed by one of the following keywords FULL, ABRIDGED, HANDLE, SUM- 1167 MARY or SERVERS-TO-ASK. 1169 A START line must contain no more than 81 characters, including the 1170 terminating newline character. 1172 A TERMINATION line consists of a line beginning with a '#' in the 1173 first column, followed by one white space character (SPACE or TAB), 1174 followed by the keyword END, followed by zero or more characters, 1175 followed by a newline. 1177 A TERMINATION line must contain no more than 81 characters, includ- 1178 ing the terminating newline character. 1180 A response-specific section will be one of the following: 1182 1) FULL Format Response 1183 2) ABRIDGED Format Response 1184 3) HANDLE Format Response 1185 4) SUMMARY Format Response 1186 5) SERVERS-TO-ASK Format Response 1188 The details of each are specified in the following sections: 1190 2.4.3.1. A FULL format response 1192 A FULL format response consists of a series of responses, each con- 1193 sisting of a FORMAT specifier line, followed by the complete tem- 1194 plate information for the matching record. 1196 Each FORMAT specifier line consists of a '#' in the first column, 1197 followed by one white space character, the name of the correspond- 1198 ing template type, one white space character, the serverhandle, a 1199 colon, the handle for that record, and a terminating newline. 1201 The template information for each record will be returned as a 1202 series of lines consisting of a single space, followed by the 1203 corresponding line of the record. 1205 The line of the record shall consist of a single space and the 1206 attribute name, followed by a ':', a single space, the value of 1207 that attribute, and a newline. 1209 Each such line shall be limited to no more than 81 characters, 1210 including the terminating newline. If a line (including the 1211 required leading single space) would exceed 81 characters, it is to 1212 be broken into lines of no more than 81 characters, with each con- 1213 tinuation line beginning with a "+" character in the first column, 1214 instead of the leading space. 1216 If the attribute value includes a line break, the line break must 1217 be replaced by a CR/LF pair and the following line begin with a "-" 1218 character in the first column, instead of the space character. The 1219 attribute name is not repeated on consecutive lines. 1221 2.4.3.2. ABRIDGED Format Response 1223 An ABRIDGED format response consists of a single set of responses, 1224 consisting of a single line excerpt of the template information 1225 from each matching record. The excerpt information shall include, 1226 as a minimum, the composed handle of the record, as well as other 1227 information that is relevant to the template type. 1229 The abridged template information for each record will be returned 1230 as a series of lines, each of which must consist of a single space, 1231 followed by the abridged line of the record, one or more space 1232 characters, the composed handle, and a CR/LF pair. 1234 Each line shall be limited to no more than 81 characters, including 1235 the terminating newline. If a line (including the required single 1236 space, would exceed 81 characters, it is to be broken into lines of 1237 no more than 81 characters, with the remainder following on the 1238 subsequent line, with the space replaced by a "+" character in the 1239 first column. 1241 If the attribute value includes a line break, the line break must 1242 be replaced by a CR/LF pair and the following line begin with a "-" 1243 character in the first column, instead of the space character. The 1244 attribute name is not repeated on consecutive lines. 1246 2.4.3.3. HANDLE Format Response 1248 A HANDLE format response consists of a single set of responses, 1249 consisting of a single line listing the composed handle and tem- 1250 plate type for each matching record. 1252 Each line shall start with one space, followed by the server han- 1253 dle, a colon, the record handle, one or more whitespace characters, 1254 the template type and terminated by a newline. 1256 Each such line must contain no more than 81 characters, including 1257 the terminating newline character. If a line (including the 1258 required first space) would exceed 81 characters, it shall be split 1259 into multiple lines, with each continuation line beginning with a 1260 '+' instead of a space. 1262 2.4.3.4. SUMMARY Format Response 1264 A SUMMARY format response consists of a single set of responses, 1265 consisting of a line listing the number of matches to the specified 1266 query, followed by a list of all template types which satisfied the 1267 query at least once. 1269 The first line shall begin with the string "matches: ", be followed 1270 by a space and the number of responses to the query and terminated 1271 by a newline. The second line shall begin with the string "tem- 1272 plates: ", be followed by a newline separated list of the name of 1273 the template types which matched the query. Each line following the 1274 first which include the text "templates:" must begin with a '-' 1275 instead of a space. 1277 If the line is longer than 81 characters including the terminating 1278 CR/LF pair, it shall be split into multiple lines with each con- 1279 tinuation line beginning with a '+' instead of a space. 1281 2.4.3.5. SERVERS-TO-ASK Response 1283 A SERVERS-TO-ASK response consists of information to the client 1284 about which servers to contact next to resolve a query. 1286 The servers-to-ask response will consist of a number of attribute- 1287 value pairs, separated by CRLF. Each line is indented with one 1288 space. 1290 Required attributes are "Version-number", which will be "1.0", and 1291 "Next-Servers". 1293 The "Next-Servers" field will be returned as a series of lines, 1294 each holding pointer information to one server. Consecutive lines 1295 shall have a hyphen "-" in the first column. Each line will be 1296 separated into five fields, separated with a semicolon. Those 1297 fields are: 1299 1. The server handle of the server pointed at. (required) 1300 2. A cached host named for the server pointed at. (optional) 1301 3. A cached port number for the server pointed at. (optional) 1303 Each such line shall be limited to no more than 81 characters, 1304 including the terminating newline. If a line (including the 1305 required leading single space) would exceed 81 characters, it is to 1306 be broken into lines of no more than 81 characters, with each con- 1307 tinuation line beginning with a "+" character in the first column. 1309 2.4.4. System Generated Messages 1311 All system generated messages must begin with a '%' as the first 1312 character, a space as the second one, followed by a three digit 1313 number, a space and an optional text message. The total length of 1314 the line must be no more than 81 characters long, including the 1315 terminating CR LF pair. There is no limit to the number of system 1316 messages that may be generated. 1318 The format for multiline replies requires that every line, except 1319 the last, begin with "%", followed by space, the reply code, a 1320 hyphen, and an optional text. The last line will begin with "%", 1321 followed by space, the reply code, a space and some optional text. 1323 System generated messages displayed before or after the formatted 1324 response section are expected to refer to operation of the system 1325 or refer to the entire query. System generated messages within the 1326 output of an individual record during a FULL reponse are expected 1327 to refer to that record only, and could (for example) be used to 1328 indicate problems with that record of the response. See Appendix E 1329 for a description of system messages. 1331 2.5. Compatibility with Older WHOIS Servers 1333 Note that this format, although potentially more verbose, is still 1334 in a human readible form. Responses from older systems that do not 1335 follow this format are still conformant, since their responses 1336 would be interpreted as being equivalent to optional text messages, 1337 without a formatted response. Clients written to this specifica- 1338 tion would display the responses as a advisory text message, where 1339 it would still be readible by the user. 1341 3. Miscellaneous 1343 3.1. Acknowledgements 1345 The WHOIS++ effort began as an intensive brainstorming session at 1346 the 24th IETF, in Boston Massachusetts. Present at the birth, and 1347 contributing ideas through this early phase, were (alphabetically) 1348 Peter Deutsch, Alan Emtage, Jim Fullton, Joan Gargano, Brad Passwa- 1349 ters, Simon Spero, and Chris Weider. Others who have since helped 1350 shape this document with feedback and suggestions include Roxana 1351 Bradescu, Patrik Faltstrom, Kevin Gamiel, Dan Kegel, Michael Meal- 1352 ling, Mark Prior and Rickard Schoultz. 1354 3.2. Contact information 1356 Peter Deutsch, 1357 BUNYIP INFORMATION SYSTEMS, inc 1358 310 St-Catherine St West, 1359 suite 202, 1360 Montreal, Quebec H2X 2A1 1361 CANADA 1362 1364 Rickard Schoultz, 1365 KTHNOC, SUNET/NORDUnet/Ebone Operations Centre 1366 100 44 STOCKHOLM 1367 SWEDEN 1368 1370 Patrik Faltstrom 1371 BUNYIP INFORMATION SYSTEMS, inc 1372 310 St-Catherine St West, 1373 suite 202, 1374 Montreal, Quebec H2X 2A1 1375 CANADA 1376 1378 Chris Weider 1379 BUNYIP INFORMATION SYSTEMS, inc 1380 2001 S. Huron Parkway, #12 1381 Ann Arbor, MI 48104 1382 USA 1383 1384 Appendix A - Some Sample Queries 1386 author=chris and template=user 1388 The result will consist of all records where attribute "author" 1389 matches "chris" with case ignored. Only USER templates will be 1390 searched. An example of a matching record is "Author=Chris Weider". 1391 This is the typical case of search. 1393 schoultz and rick;search=lstring 1395 The result will consist of all records which have one attribute 1396 value matching "schoultz" exactly and one having "rick" as leading 1397 substring, both with case ignored. One example is "Name=Rickard 1398 Schoultz". 1400 value=phone;search=substring 1402 The result will consist of all records which have attribute values 1403 matching *phone*, for example the record "Name=Acme telephone 1404 inc.", but will not match the attribute name "phone". (Since 1405 "value" term specifier is the default, the search term could be 1406 "phone" as well as "value=phone".) 1408 search-all=Peter ; search=substring;case=consider 1410 The result will consist of all records which have attribute names, 1411 template names or attribute values matching "Peter" with respect to 1412 case. One example is "Friend-Of-Peter: Yes". 1414 ucdavis;search=substring and (gargano or joan):include=name,email 1416 This search command will find records which have records containing 1417 the words "gargano" or "joan" somewhere in the record, and has the 1418 word "ucdavis" somewhere in a word. The result will only show the 1419 "name" and "email" fields. 1421 Appendix B - Some sample responses. 1423 1) A FULL format response: 1425 # FULL 1427 # USER SERVHANDLE1:PD45 1428 Name: Peter Deutsch 1429 email: peterd@bunyip.com 1431 # USER SERVHANDLE1:AE1 1432 Name: Alan Emtage 1433 email: bajan@bunyip.com 1435 # USER SERVHANDLE1:NW1 1436 Name: Nick West 1437 Favourite-Bicycle-Forward-Wheel-Brand: New Bicy 1438 +cles Acme Inc. 1439 email: nick@bicycle.acme.com 1440 My-favourite-song: Happy birthday to you! 1441 -Happy birthday to you! 1442 -Happy birthday dear Nick! 1443 -Happy birthday to you. 1445 # SERVICES SERVHANDLE1:WWW1 1446 Type: World Wide Web 1447 Location: the world 1449 # END 1451 -------------------- 1453 2) An ABRIDGED format response: 1455 # ABRIDGED 1457 Peter Deutsch peterd@bunyip.com PD45 1458 Alan Emtage bajan@bunyip.com AE1 1459 World Wide Web the world WWW1 1461 # END 1463 -------------------- 1465 3) A HANDLE format response: 1467 # HANDLE 1469 SERVHANDLE1:PD45 User 1470 SERVHANDLE1:AE1 User 1471 SERVHANDLE1:WWW1 Services 1473 # END 1475 -------------------- 1477 4) A SUMMARY HANDLE format response: 1479 # SUMMARY 1481 Matches: 175 1482 Templates: User 1483 - Services 1484 - Abstracts 1485 # END 1486 Appendix C - Sample responses to system commands 1488 C.1 Response to the LIST command 1490 # ABRIDGED 1491 USER 1492 SERVICES 1493 HELP 1494 # END 1496 C.2 Response to the SHOW command 1498 This example show the result after issuing "show help": 1500 # FULL 1501 # TEMPLATE serverhandle1:user-template 1502 Template-Name: USER 1503 Attribute-Names: Name,Organization-Name,Organization-Type,Work-Phone, 1504 +Work-Fax,Work-Postal,Job-Title,Department,Email,Handle,Home-Phone, 1505 +Home-Postal,Home-Fax 1506 # TEMPLATE serverhandle1:help 1507 Template-Name: HELP 1508 Attribute-Names: Subject,Description,Handle 1509 # END 1511 C.3 Response to the POLLED-BY command 1513 # FULL 1514 # POLLED-BY xyz:serverhandle1 1515 Server-handle: serverhandle1 1516 Cached-Host-Name: sunic.sunet.se 1517 Cached-Host-Port: 7070 1518 Template: user 1519 Field: ALL 1520 # POLLED-BY xyz:serverhandle2 1521 Server-handle: serverhandle2 1522 Cached-Host-Name: kth.se 1523 Cached-Host-Port: 7070 1524 Template: ALL 1525 Field: Name,Email 1526 # END 1528 C.4 Response to the POLLED-FOR command 1530 # FULL 1531 # POLLED-FOR xyz:serverhandle3 1532 Server-Handle: serverhandle3 1533 Template: ALL 1534 Field: Name,Address,Job-Title,Organization-Name,Organization-Address, 1535 +Organization-Name 1536 # POLLED-FOR xyz:serverhandle4 1537 Server-Handle: serverhandle4 1538 Template: User 1539 Field: ALL 1540 # END 1542 C.5 Response to the VERSION command 1544 # FULL 1545 # VERSION serverhandle:version 1546 Version: 1.0 1547 Program-Name: kth-whoisd 1548 Program-Version: 2.0 1549 # END 1551 C.6 Response to the CONSTRAINTS command 1553 # FULL 1554 # CONSTRAINT asdjkq 1555 Constraint: format 1556 Default: full 1557 Range: full,abridged,summary,handle 1558 # CONSTRAINT ljkqwer 1559 Constraint: maxhits 1560 Default: 200 1561 Range: 1-1000 1562 # CONSTRAINT slkjewer 1563 Constraint: search 1564 Default: exact 1565 Range: exact,substring,lstring 1566 # CONSTRAINT qwewerq 1567 Constraint: maxfull 1568 Default: 20 1569 # END 1570 Appendix D - Sample whois++ session 1572 Below is an example of a session between a client and a server. The 1573 angle brackets to the left is not part of the communication, but is 1574 just put there to denonte the direction of the communication 1575 between the server or the client. Text appended to '>' means mes- 1576 sages from the server and '<' from the client. 1578 Client connects to the server 1580 >% 220-Welcome to 1581 >% 220-the whois++ server 1582 >% 220 at ACME inc. 1583 % 200 Command okay 1585 > 1586 ># FULL 1587 > 1588 ># USER serverhandle:nw1 1589 > name: Nick West 1590 > email: nick@acme.com 1591 ># END 1592 ># SERVERS-TO-ASK 1593 > Version-number: 1.0 1594 > Next-Servers: sunetse01;whois.sunet.se;7070 1595 >- kthse01 1596 >- anotherserverhandle01;whois.acme.com;7070 1597 ># END 1598 >% 226 Tranfer complete 1599 % 200 Command okay 1601 ># FULL 1602 ># VERSION ignoredserverhandle:version 1603 > Version: 1.0 1604 ># END 1605 >% 226 Tranfer complete 1606 >% 203 Bye 1607 Server closes the connection 1609 In the example above, the client connected to a whois++ server and 1610 queried for all records where the attribute "name" equals "Nick", 1611 and asked the server not to close the connection after the response 1612 by using the global constraint "HOLD". 1614 The server responds with one record and a pointer to three other 1615 servers that either holds records or pointers to other servers. 1616 The first server was polled for "USER" templates and "name" and 1617 "email" fields. 1619 The client continues with asking for servers version number without 1620 using the HOLD constraint. After responding with protocol version, 1621 the server closes the connection. 1623 Note that each response from the server begins system message 200 1624 (Command OK), and ends with system message 226 (Transfer Complete). 1626 Appendix E - System messages 1628 A system message begins with a '%', followed by a space and a three 1629 digit number, a space, and an optional text message. The line mes- 1630 sage must be no more than 81 characters long, including the ter- 1631 minating CR LF pair. There is no limit to the number of system mes- 1632 sages that may be generated. 1634 A multiline system message have a hyphen instead of a space in 1635 column 6, immediately after the numeric response code in all lines, 1636 except the last one, where the space is used. 1638 Example 1 1640 % 200 Command okay 1642 Example 2 1644 % 220-Welcome to 1645 % 220-the whois++ server 1646 % 220 at ACME inc. 1648 The client is not expected to parse the text part of the response 1649 message except when receiving reply 600, in which case the text 1650 part is the name of a character set that will be used by the server 1651 in the rest of the response. The valid values for characters sets 1652 is specified in the "characterset" list in the BNF listing in 1653 appendix F. 1655 The theory of reply codes is described in appendix E in RFC 821 1656 [POST82]. 1658 ------------------------------------------------------------------------ 1660 List of system response codes 1661 ------------------------------ 1663 110 Too many hits The number of matches exceeded 1664 the value specified by the 1665 maxhits constraint. Server 1666 will still reply with as many 1667 records as "maxhits" allows. 1669 111 Requested constraint not supported One or more constraints in 1670 query is not implemented, but 1671 the search is still done. 1673 112 Requested constraint not fullfilled One or more constraints in 1674 query has unacceptable value 1675 and was therefore not used, 1676 but the search is still done. 1678 200 Command Ok Command accepted and executed. 1679 The client must wait for a 1680 transaction end system message. 1682 201 Command Completed successfully Command accepted and executed. 1684 203 Bye Server is closing connection 1686 220 Service Ready Greeting message. Server is 1687 accepting commands. 1689 226 Transaction complete End of data. All responses to 1690 query are sent. 1692 430 Authentication needed Client requested information 1693 that needs authentication. 1695 500 Syntax error 1697 502 Search expression too complicated This message is sent when the 1698 server is not able to resolve 1699 a query (i.e. when a client 1700 sent a regular expression that 1701 is too deeply nested). 1703 530 Authentication failed The authentication phase 1704 failed. 1706 600 Subsequent attribute values are 1707 encoded in the charater set 1708 specified by . 1710 Table V - System response codes 1712 ------------------------------------------------------------------------ 1713 Appendix F - The WHOIS++ BNF Grammar 1715 whois-command = ( system-command [":" "hold"] 1716 / terms [":" globalcnstrnts] ) NL 1718 system-command = "constraints" 1719 / "describe" 1720 / "commands" 1721 / "polled-by" 1722 / "polled-for" 1723 / "version" 1724 / "list" 1725 / "show" [1*SP string] 1726 / "help" [1*SP string] 1727 / "?" [string] 1729 terms = and-expr *("or" and-expr) 1731 and-expr = not-expr *("and" not-expr) 1733 not-expr = ["not"] (term / ( "(" terms ")" )) 1735 term = generalterm / specificterm 1736 / shorthandle / combinedterm 1738 generalterm = string *(";" localcnstrnt) 1740 specificterm = specificname "=" string 1741 *(";" localcnstrnt) 1743 specificname = "handle" / "value" 1745 shorthandle = "!" string *(";" localcnstrnt) 1747 combinedterm = string "=" string *(";" localcnstrnt) 1749 globalcnstrnts = globalcnstrnt *(";" globalcnstrnt) 1751 globalcnstrnt = localcnstrnt 1752 / "format" "=" format 1753 / "maxfull" "=" 1*digit 1754 / "maxhits" "=" 1*digit 1755 / opt-globalcnst 1757 opt-globalcnst = "hold" 1758 / "authenticate" "=" auth-method 1759 / "name" "=" string 1760 / "password" "=" string 1761 / "language" "=" language 1762 / "incharset" "=" characterset 1763 / "ignore" "=" string 1764 / "include" "=" string 1766 format = "full" / "abridged" / "handle" / "summary" 1767 / "servers-to-ask" 1769 language = 1777 characterset = "us-ascii" / "iso-8859-1" / "iso-8859-2" / 1778 "iso-8859-3" / "iso-8859-4" / "iso-8859-5" / 1779 "iso-8859-6" / "iso-8859-7" / "iso-8859-8" / 1780 "iso-8859-9" / "iso-8859-10" / charset-value 1782 charset-value = 1*char 1784 localcnstrnt = "search" "=" searchvalue / 1785 "case" "=" casevalue 1787 searchvalue = "exact" / "substring" / "regex" / "fuzzy" 1788 / "lstring" 1790 casevalue = "ignore" / "consider" 1792 auth-method = "password" 1794 string = 0*char 1796 char = "\" specialchar 1797 / 1799 specialchar = " " / / "=" / "," / ":" / ";" / "\" / 1800 "*" / "." / "(" / ")" / "[" / "]" / "^" / 1801 "$" / "!" / "?" 1803 digit = "0" / "1" / "2" / "3" / "4" / 1804 "5" / "6" / "7" / "8" / "9" 1806 NL = 1808 NOTE: Significant blanks must be escaped. The following char- 1809 acters, when significant to the query, may be preceded and/or 1810 followed by a single blank: 1811 : ; , ( ) = ! 1812 Appendix G - Description of Regular expressions 1814 The regular expressions described in this section is the same 1815 as used in many other applications and operating systems. It 1816 is though very simple and does not include logical operators 1817 AND and OR. 1819 Searches using regular expressions are always using substring 1820 matching except when the regular expression contains the char- 1821 acters '^' or '$'. 1823 Character Function 1824 --------- -------- 1826 Matches itself 1828 . Matches any character 1830 a* Matches zero or more 'a' 1832 [ab] Matches 'a' or 'b' 1834 [a-c] Matches 'a', 'b' or 'c' 1836 ^ Matches beginning of a token 1838 $ Matches end of a token 1840 Examples 1841 --------- 1843 String Matches Matches not 1844 ------- ------- ----------- 1845 hello xhelloy heello 1846 h.llo hello helio 1847 h.*o hello helloa 1848 h[a-f]llo hello hgllo 1849 ^he.* hello ehello 1850 .*lo$ hello helloo 1851 References 1853 [HARR85] Harrenstein K., Stahl M., Feinler E., NICNAME/WHOIS, 1854 RFC954, SRI, October 1985 1856 [IAFA] Internet Anonymous FTP Archives Working Group (now 1857 closed). 1859 [IAFA1] Emtage A., and Deutsch P.. IAFA (Internet Anonymous 1860 FTP Archives) 1861 (not yet issued, pending some editing...) 1863 [IIIR] Weider C., and Deutsch P., A vision of an integrated 1864 internet information service, Internet Draft, 1865 October, 1993. < URL:ftp://nic.merit.edu/documents/ 1866 internet-drafts/draft-ietf-iiir-vision-02.txt > 1868 [NIR] Network Information Retrieval Working Group. 1870 [POST82] Postel J., Simple Mail Transfer Protocol, RFC 821, 1871 ISI, August 1982. 1873 Expires: 25 July 95