view Side-By-Side changes
Date: Tue, 09 Apr 2002 09:08:31 GMT Server: Apache/1.3.20 (Unix) Last-Modified: Tue, 31 Jan 1995 23:00:00 GMT ETag: "323e6b-15cc9-2f2ec0f0" Accept-Ranges: bytes Content-Length: 89289 Connection: close Content-Type: text/plain Network Working GroupPeterP. DeutschINTERNET-DRAFTRequest for Comments: 1835 BUNYIP INFORMATION SYSTEMS,inc <draft-ietf-wnils-whois-arch-02.txt> RickardInc. Category: Standards Track R. SchoultzExpires: 25 July 95KTHNOCPatrikP. Faltstrom BUNYIP INFORMATION SYSTEMS,inc ChrisInc. C. Weider BUNYIP INFORMATION SYSTEMS,inc 25 JanuaryInc. August 1995 Architecture of the WHOIS++ serviceSTATUS OF THIS MEMOStatus of this Memo This documentisspecifies anInternet-Draft. Internet-Drafts are working documents ofInternet standards track protocol for the InternetEngineering Task Force (IETF), its areas,community, andits working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six monthsrequests discussion andmay be updated, replaced, or obsoleted by other docu- ments at any time. It is inappropriate to use Internet- Drafts as reference material orsuggestions for improvements. Please refer tocite them other than as ``work in pro- gress.'' To learnthe currentstatusedition ofany Internet-Draft, please checkthe``1id-abstracts.txt'' listing contained in"Internet Official Protocol Standards" (STD 1) for theInternet- Drafts Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).standardization state and status of this protocol. Distribution of this memo is unlimited. Abstract This document describes WHOIS++, an extension to the trivial WHOIS service described in RFC 954 to permit WHOIS-like servers to make available more structured information to the Internet. We describe an extension to the simple WHOIS data model and query protocol and a companion extensible, distributed indexing service. A number of options have also been added such as the use of multiple languages and character sets, more advanced search expressions, structured data and a number of other useful features. An optionalauthenti- cationauthentication mechanism for protecting all or part of the associated WHOIS++ information database from unauthorized access is also described.Deutsch, et al [Page 1] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Table ofcontentsContents Part I - WHOIS++ Overview ................................. 3 1.1. Purpose andMotivation....................................... 2Motivation .............................. 3 1.2. Basic InformationModel...................................... 3Model ............................. 4 1.2.1. Changes to the current WHOISModel......................... 3Model ................ 5 1.2.2. Registering WHOIS++servers................................ 4servers ....................... 5 1.2.3. The WHOIS++ Search SelectionMechanism..................... 5Mechanism ............ 7 1.2.4. The WHOIS++Architecture................................... 6Architecture .......................... 7 1.3. Indexing inWHOIS++.......................................... 6WHOIS++ ................................. 8 1.4. GettingHelp................................................. 7Help ........................................ 9 1.4.1. Minimum HELPRequired...................................... 8Required ............................. 9 1.5. Options andConstraints...................................... 8Constraints ............................. 10 1.6. FormattingResponses......................................... 8Responses ................................ 10 Deutsch, et al Standards Track [Page 1] RFC 1835 Architecture of the WHOIS++ service August 1995 1.7. Reporting Warnings andErrors................................ 9Errors ....................... 11 1.8. Privacy and SecurityIssues.................................. 9Issues ......................... 11 Part II - WHOIS++ Implementation .......................... 12 2.1.Introduction................................................. 11 2.1.1.The WHOIS++ interactionmodel.............................. 11model ....................... 12 2.2. The WHOIS++ Commandset......................................set ............................. 12 2.2.1. SystemCommands............................................ 12Commands ................................... 13 2.2.1.1. The COMMANDScommand..................................... 13command ............................ 14 2.2.1.2. The CONSTRAINTScommand.................................. 13command ......................... 15 2.2.1.3. The DESCRIBEcommand..................................... 14command ............................ 15 2.2.1.4. The HELPcommand......................................... 14command ................................ 15 2.2.1.5. The LISTcommand......................................... 14command ................................ 15 2.2.1.6. The POLLED-BYcommand.................................... 14command ........................... 15 2.2.1.7. The POLLED-FORcommand................................... 15command .......................... 16 2.2.1.8. The SHOWcommand......................................... 15command ................................ 16 2.2.1.9. The VERSIONcommand...................................... 15command ............................. 16 2.2.2. The SearchCommand......................................... 15Command ................................ 16 2.2.2.1. Format of a SearchTerm.................................. 16Term ......................... 17 2.2.2.2. Format of a SearchString................................ 17String ....................... 18 2.3. WHOIS++Constraints.......................................... 18Constraints ................................. 19 2.3.1. RequiredConstraints....................................... 18Constraints .............................. 20 2.3.2. OptionalConstraints....................................... 19CONSTRAINTS .............................. 21 2.3.2.1. The SEARCHConstraint.................................... 20Constraint ........................... 22 2.3.2.2. The FORMATConstraint.................................... 21Constraint ........................... 22 2.3.2.3. The MAXFULLConstraint................................... 21Constraint .......................... 22 2.3.2.4. The MAXHITSConstraint................................... 21Constraint .......................... 23 2.3.2.5. The CASEConstraint...................................... 21Constraint ............................. 23 2.3.2.6. The AUTHENTICATEConstraint.............................. 21Constraint ..................... 23 2.3.2.7. The NAMEConstraint...................................... 22Constraint ............................. 23 2.3.2.8. The PASSWORDConstraint.................................. 22Constraint ......................... 23 2.3.2.9. The LANGUAGEConstraint.................................. 22Constraint ......................... 23 2.3.2.10. The INCHARSETConstraint................................ 22Constraint ....................... 24 2.3.2.11. The IGNOREConstraint................................... 23Constraint .......................... 24 2.3.2.12. The INCLUDEConstraint.................................. 23 Deutsch, et al [Page 2] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Constraint ......................... 24 2.4. Server ResponseModes........................................ 23Modes ............................... 24 2.4.1. DefaultResponses.......................................... 24Responses ................................. 25 2.4.2. Format ofResponses........................................ 24Responses ............................... 25 2.4.3. Syntax of a FormattedResponse............................. 24Response .................... 26 2.4.3.1. A FULL formatresponse................................... 25response .......................... 26 2.4.3.2. ABRIDGED FormatResponse................................. 26Response ........................ 27 2.4.3.3. HANDLE FormatResponse................................... 26Response .......................... 27 2.4.3.4. SUMMARY FormatResponse..................................Response ......................... 27 2.4.3.5. SERVERS-TO-ASKResponse.................................. 27Response ......................... 28 2.4.4. System GeneratedMessages..................................Messages ......................... 28 2.5. Compatibility with Older WHOISServers....................... 28Servers .............. 29 3.Miscellaneous.................................................. 28Miscellaneous ......................................... 29 3.1.Acknowledgements............................................. 28Acknowledgements .................................... 29 3.2.Contact information..........................................References .......................................... 29 3.3. Authors' Addresses .................................. 30 Deutsch, et al Standards Track [Page 2] RFC 1835 Architecture of the WHOIS++ service August 1995 Appendix A - Some SampleQueries................................... 30Queries .......................... 31 Appendix B - Some sampleresponses.................................responses ........................ 31 Appendix C - Sample responses to systemcommands...................commands .......... 33 Appendix D - Sample whois++session................................session ....................... 35 Appendix E - Systemmessages....................................... 37messages .............................. 36 Appendix F - The WHOIS++ BNFGrammar............................... 39Grammar ...................... 38 Appendix G - Description of Regularexpressions.................... 41 Deutsch, et al [Page 3] Internet-Draft Architecture of the WHOIS++ service 25 January 1995expressions ........... 40 1. Part I - WHOIS++ Overview 1.1. Purpose and Motivation The current NIC WHOIS service [HARR85] is used to provide a very limited directory service, serving information about a small number of Internet users registered with the DDN NIC. Over time the basic service has been expanded to serve additional information andsimi- larsimilar services have also been set up on other hosts. Unfortunately, these additions and extensions have been done in an ad hoc and uncoordinated manner. The basic WHOIS information model represents each individual record as a Rolodex-like collection of text. Each record has a unique identifier (or handle), but otherwise is assumed to have little structure. The current service allows users to issue searches for individual strings within individual records, as well as searches for individual record handles using a very simple query-response protocol. Despite its utility, the current NIC WHOIS service cannot function as a general White Pages service for the entire Internet. Given the inability of a single server to offer guaranteed response orrelia- bility,reliability, the huge volume of traffic that a full scale directoryser- viceservice will generate and the potentially huge number of users of such a service, such a trivial architecture is obviously unsuitable for the current Internet's needs for information services. This document describes the architecture and protocol for WHOIS++, a simple, distributed and extensible information lookup service based upon a small set of extensions to the original WHOISinforma- tioninformation model. These extensions allow the new service to address the community's needs for a simple directory service, yet theextensi- bleextensible architecture is expected to also allow it to find application in a number of other information service areas. Added features include an extension to the trivial WHOIS data model and query protocol and a companion extensible, distributed indexing service. A number of other options have also been added, like boolean operators, more powerful search constraints and searchmethodsmethods, and Deutsch, et al Standards Track [Page 3] RFC 1835 Architecture of the WHOIS++ service August 1995 most specificly structured the data to make both the client and the server part of the dialogue more stringent and parseable. An optional authentication mechanism for protecting all or parts of the associated WHOIS++ information database fromunau- thorizedunauthorized access is also briefly described. The basic architecture of WHOIS++ allows distributed maintenance of the directory contents and the use of the WHOIS++ indexing service for locating additionalWHOISWHOIS++ servers. Although a general overview of this service is included for completeness, the indexingexten- sionsextensions are described in a separate paper.Deutsch, et al [Page 4] Internet-Draft Architecture of the WHOIS++ service 25 January 19951.2. Basic Information ModelOur extensions to the existing WHOISThe WHOIS++ serviceareis centereduponin a recommendation to structure user information around a series of standardized informationtemplates, such as to those described by [IAFA1].templates. Such templates consist of ordered sets of data elements (or attribute-valuepairs) and a number of groups at the IETF are now working on standardizing their format and content [IAFA], [NIR].pairs). It is intended that adding such structured templates to a server and subsequently identifying and searching them be simple tasks. The creation and use of customized templates should also bepossi- blepossible with little effort, although their use should be discouraged where appropriate standardized templates exist. We also offera set of extensions to the trivial protocol described in RFC954 [HARR85]methods to allow the user to constrain searches to desired attributes or template types, in addition to the existing commands for specifying handles or simple strings. It is expected that the minimalist approach we have taken will find application where the high cost of configuring and operatingtradi- tionaltraditional White Pages services can not currently be justified. Also note that thenewarchitecture makes no assumptions about the search and retrieval mechanisms used within individual servers. Operators are free to use dedicated database formats, fast indexing software or even provide gateways to other directory services to store and retrieve information, if desired. The WHOIS++ server simply functions as a known front end, offering a simple data model and communicating through a well known port and query protocol. The format of both queries and replies has been structured to allow the use of client software for generating searches and displaying the results. At the same time, some effort has been made to keep responses at least to some degree readible by humans, to ensure low entry cost and to ease debugging. Deutsch, et al Standards Track [Page 4] RFC 1835 Architecture of the WHOIS++ service August 1995 The actual implemention details ofofan individualWHOISWHOIS++ search engine are left to the imagination of the implementor and it is hoped that the simple, extensible approach taken will encourage experimentation and the development of improved search engines. 1.2.1. Changes to the current WHOIS Model The current WHOIS service is based upon an extremely simple data model. The NIC WHOIS database consists of a series of individual records, each of which is identified by a single unique identifer (the "handle"). Each record contains one or more lines ofinforma- tion.information. Currently, there is no structure or implicit ordering of this information, although by implication each record is concerned withDeutsch, et al [Page 5] Internet-Draft Architecture of the WHOIS++ service 25 January 1995information about a single user or service. We have implemented two basic changes to this model. First, we have structured the information within the database as collections of data elements, or simple attribute/value pairs. Each individual record contains a specified ordered set of these data elements. Secondly, we have introduced typing of the database records. In effect, each record is based upon one of a specified set oftem- plates,templates, each containing a finite and specified number of dataele- ments.elements. This allow users to easily limit searches to specificcol- lectionscollections of information, such as information about users, services, abstracts of papers, descriptions of software, and so on. As a final extension, we require that each individual WHOIS++data- basedatabase on the Internet be assigned a unique handle, analogous to the handle associated with each database record. The WHOIS++ database structure is shown in Fig. 1. 1.2.2. Registering WHOIS++ servers We propose that individual database handles be registered through the Internet Assigned Numbers Authority (the IANA), ensuring their uniqueness. This will allow us to specify each WHOIS++ entry on the Internet as a unique pair consisting of a server handle and auniquerecordhandle pair. This pair is called the ``composed handle''.handle. A unique registered handle is preferable to using the host's IP address, since it is conceivable that the WHOIS++ server for apar- ticularparticular domain may move over time. If we preserve the unique WHOIS++ handle in such cases we have the option of using it for resource discovery and networked information retrieval (see [IIIR] for a discussion of resource and discovery and support issues). Deutsch, et al Standards Track [Page 5] RFC 1835 Architecture of the WHOIS++ service August 1995 There are many ways of guaranteeing uniqueness of server handles; we will discuss them in a separate paper. We believe that organizing information around a series of suchtem- platestemplates will make it easier for administrators to gather andmain- tainmaintain this information and thus encourage them to make suchinforma- tioninformation available. At the same time, as users become more familiar with the data elements available within specific templates they will be better able to specify their searches, leading to a more useful service.Deutsch, et al [Page 6] Internet-Draft Architecture of the WHOIS++ service 25 January 1995______________________________________________________________________ | | | + Single unique WHOIS++ database handle | | | | _______ _______ _______ | | handle3 |.. .. | handle6 |.. .. | handle9 |.. .. | | | _______ | _______ | _______ | | | handle2 |.. .. | handle5 |.. .. | handle8 |.. .. | | | _______ | _______ | _______ | | | handle1 |.. .. | handle4 |.. .. | handle7 |.. .. | | | |.. .. | |.. .. | |.. .. | | | ------- ------- ------- | | Template Template Template | | Type 1 Type 2 Type 3 | | | | | | | | | | Fig.1 - Structure of a WHOIS++ database. | | | | Notes: - Entire database is identified by a single unique WHOIS | | handle. | | - Each record has a single unique handle and a specific set | | of attributes, determined by the template type used. | | - Each value associated with an attribute can be any ASCII | | string up to a specified length. | |______________________________________________________________________| Deutsch, et al Standards Track [Page 6] RFC 1835 Architecture of the WHOIS++ service August 1995 1.2.3. The WHOIS++ Search Selection Mechanism The WHOIS++ search mechanism is intended to be extremely simple. A search command consists of one or more search terms, with an optionalnvsetset of global constraints (specifiers that modify or control a search). Search terms allow the user to specify template type, attribute, value or handle that any record returns must satisfy. Each search term can have an optional set of local constraints that apply to only that term. A WHOIS++ database may be seen as a single rolodex-like collection of typed records. Each term specifies a further constraint that the selected set of output records must satisfy. Each term may thus be thought of as performing a subtractive selection, in the sense that any record that does notfulfillfulfil the term is discarded from the result set. Boolean searches are possible by the use of AND, OR, NOT and parenthesis.Deutsch, et al [Page 7] Internet-Draft Architecture of the WHOIS++ service 25 January 19951.2.4. The WHOIS++ Architecture The WHOIS++ directory service has an architecture which is separated into two components; the base level server, which is described in this paper, and a indexing server. A single physical server can act as both a base level server and an indexing server. A base level server is one which contains only filled templates. An indexing server is one which contains forward knowledge (q.v.) and pointers to other indexing servers or base level servers. Deutsch, et al Standards Track [Page 7] RFC 1835 Architecture of the WHOIS++ service August 1995 1.3. Indexing in WHOIS++ Indexing in WHOIS++ is used to tie together many base level servers and index servers into a unified directory service. Each base level server and index server which wishes to participate in the unified directory service must generate "forward knowledge" for the entries it contains. One type of forward knowledge is the "centroid". An example of a centroid is as follows: if a whois++ servercon- tainedcontained exactly three records, as follows: Record 1 Record 2 Template: Person Template: Person First-Name: John First-Name: Joe Last-Name: Smith Last-Name: Smith Favourite-Drink: Labatt Beer Favourite-Drink: Molson Beer Record 3 Template: Domain Domain-Name: foo.edu Contact-Name: Mike Foobar the centroid for this server would be Template: Person First-Name: Joe John Last-Name: Smith Favourite-Drink:Beer Labatt Molson Template: Domain Domain-Name: foo.edu Contact-Name: Mike FoobarDeutsch, et al [Page 8] Internet-Draft Architecture of the WHOIS++ service 25 January 1995An index server would then collect this centroid for this server as forward knowledge. Index servers can collect forward knowledge for any servers it wishes. In effect, all of the servers that the index server knows about can be searched with a single query to the index server; the index server holds the forward knowledge along with pointers to the servers it indexes, and can refer the query to servers which might hold information which satisfies the query. Deutsch, et al Standards Track [Page 8] RFC 1835 Architecture of the WHOIS++ service August 1995 Implementors of this protocol are strongly encouraged toincor- porateincorporate centroid generation abilities into their servers. ------------------------------------------------------------------- ____ ____ top level | | | | whois index | | | | servers ---- ---- ____ ____ first level | | | | whois index | | | | servers ---- ---- ____ ____ ____ individual | | | | | | whois servers | | | | | | ---- ---- ---- Fig. 2 - Indexing system architecture. ------------------------------------------------------------------- 1.4. Getting Help Another extension to the basic WHOIS service is the requirement that all servers support at least a minimal set of help commands, allowing users to find out information about both the individual server and the entire WHOIS++ service itself. This is done in the context of the new extended information model by defining two specific template formats and requiring each server to offer at least one example of each record using these formats. The operator of each WHOIS service is therefor expected to have, as a minimum, a single example of SERVICES and HELP records, which can be accessed through appropriate commands.Deutsch, et al [Page 9] Internet-Draft Architecture of the WHOIS++ service 25 January 19951.4.1. Minimum HELP Required Executing the command: DESCRIBE gives a brief information about the WHOIS++ server. Deutsch, et al Standards Track [Page 9] RFC 1835 Architecture of the WHOIS++ service August 1995 Executing the command: HELP gives a brief description of the WHOIS++ service itself. The text of both required helped records should contain pointers to additional help subjects that are available. Executing the command: HELP <searchstring> may give information on any topic. 1.5. Options and Constraints The WHOIS++ service is based upon a minimal core set of commands and controlling constraints. A small set of additional optional commands and constraints can be supported. These would allow users to perform such tasks as provide security options, modify the information contents of a server or add multilingual support. The required set of WHOIS++ commands are summarized in section 2.2. WHOIS++ constraints are described in section2.4.2.3. Optionalcommands andconstraints are described in section2.5.2.3.2. 1.6. Formatting Responses The output returned by a WHOIS++ server is structured to allow machine parsing and automated handling. Of particular interest in the ability to return summary information about a search (without having to return the entire results). All output of searches will be returned in one of five outputfor- mats,formats, which will be one of FULL, ABRIDGED, HANDLE, SUMMARY orSERVERS-TO-ASK.SERVER-TO-ASK. Note that a conforming server is only required to support the first four formats. When available,SERVERS-TO-ASKSERVER-TO-ASK format is used to indicate that a search cannot be completed but that one or more alternative WHOIS++ servers may be able to perform the search. Details of each output format are specified in section 2.4. Deutsch, et al Standards Track [Page 10]Internet-DraftRFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995Details of each output format are specified in section 2.5.1.7. Reporting Warnings and Errors The formatted response of WHOIS++ commands allows the encoding of warning or error messages to simplify parsing and machine handling. The syntax of output formats are described in detail in section2.5,2.4, and details of WHOIS++ warnings and error conditions are given insection appendixAppendix E. All system messages are numerical, but can be tagged with text. It is the clients decision if the text is presented to the user. 1.8. Privacy and Security Issues The basic WHOIS++ service was conceived as a simple,unauthenti- catedunauthenticated information lookup service, but there are occasions when authentication mechanisms are required. To handle such cases, an optional mechanism is provided for authenticating each WHOIS++ transaction. The current identified authentication mechanism is PASSWORD, which uses simple password authentication. Any other scheme name used must begin with the characters "X-" and should thus be regarded as experimental and non-standard. Note that the WHOIS++ authentication mechanism does not dictate the actual authentication scheme used, it merely provides a framework for indicating that a particular transaction is to beauthenti- cated,authenticated, and the appropriate mechanisms to use. This mechanism is extensible and individual implementors are free to add additional mechanisms. This document includes a very simple authentication scheme where a combination of username and password is sent together with the search string so the server can verify that the user have access to the information. Note that this is NOT by any means a methodrecom- mendedrecommended to secure the data itself because both password andinforma- tioninformation are tranferred unencrypted over the network. Given the unauthenticated nature that default services like white pages services are, it is easy to either forget the implications of this and just show all data to the public Internet, or think that Internet is so dangerous that information is hidden from theInter- netInternet so the whole idea of a globalwhitepageswhite pages service is lost. Therefore the type of authentication scheme selected and the public nature of the Internet environment must still be taken intocon- siderationconsideration when assessing the security and authentication of the information served.Deutsch, et al [Page 11] Internet-Draft Architecture of the WHOIS++ service 25 January 1995A more detailed exposition on security is outside the scope of this document. Deutsch, et al Standards Track [Page12] Internet-Draft11] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995 2. Part II - WHOIS++ Implementation 2.1.IntroductionThe WHOIS++protocol specifies the interactions between a WHOIS client and a WHOISinteraction model A WHOIS++ serversupportingwill normally listen for a TCP connections on the allocated WHOIS++extensions. These extensions are designed to be backwards compatible with existing servers, in the sense thatport (although anewWHOIS++ serverreceivingcan be accessed over anyofTCP connection). Once a connection is established, theolder commandsserver issues a banner message, and listens for input. The command specified inRFC 954 [HARR85] will behave inthis input is processed and thesame manner asresults returned including an ending system message. If theoriginal NIC WHOIS server. Obviously, it isoptional HOLD constraint has notpossible to ensure desired behaviour if one ofbeen specified theextended commandsconnection issent to an older WHOIS server, sincethen terminated. If therequested functionality is simply not there. Still, it would be possible to query whetherserver supports theWHOIS++ command setoptional HOLD constraint, and this constraint issupportedspecified asan attribute for each WHOIS server in an appropriate services registry (which itself could be set up using a WHOIS++ server). Thus, in practice this should not be a problem. In addition, any such command sent to an older WHOIS server would simply be treated as a search term, and thus no harm should result. The small number of older servers, and the probability that at least some of the older servers will be converted to WHOIS++ as implementations become available, means that backwards compatibil- ity is not expected to be a problem in practice. 2.1.1. The WHOIS++ interaction model A WHOIS++ server will normally listen for a TCP connections on the allocated WHOIS port (port 43) (although a WHOIS++ server can be accessed over any TCP connection). Once a connection is esta- blished, the server issues a banner message, then listens for input. The command specified in this input is processed and the results returned including an ending system message. If the optional HOLD constraint has not been specified the connection is then terminated. If the server supports the optional HOLD constraint, and this con- straint is specified as part of any command, thepart of any command, the server continues to listen on the connection for another line of input. This cycle continues as long as the sender continues to append the required HOLD constraint to each subsequent command. At the same time, each server is permitted to set an optional timeout value (which should be indicated in the response to the CONSTRAINTS command). If set, the server is free to terminate an idle connection at any time after this delay has passed with no input from the client. If the server terminates the connection due to timeout, it will be indicated by the system message. The timeout value is not changeable by the client.Deutsch, et al [Page 13] Internet-Draft Architecture of the WHOIS++ service 25 January 19952.2. The WHOIS++ Command set There are two types of WHOIS++ commands - system commands and the WHOIS++ search command. The WHOIS++ command set consists of a core set of required systems commands, a single required search command and an set of optional system commands which support features that are not required by all servers. The set of required WHOIS++ system commands are listed in Table I. Details of the allowable search terms for the searchcom- mandcommand are included in Table II. Each WHOIS++ command also allows the use of one or more controlling constraints,which selectwhen selected can be used to override defaults oroth- erwiseotherwise modify server behavior. There is a core set of constraints that must be supported by all conforming servers. These include SEARCH (which controls the type of search performed), FORMAT (which determines the output format used) and MAXHITS (which determines the maximum number of matches that aasearch can return). These required constraints are summarized in Table III. Deutsch, et al Standards Track [Page 12] RFC 1835 Architecture of the WHOIS++ service August 1995 An additional set of optional constraints are used to providesup- portsupport for different character sets, indicate the need and type of authentication to perform on a transaction, and permit multiple transactions during a single communications session. These optional constraints are listed in Table IV. It is possible, using the required COMMANDS and CONSTRAINTS system commands, to query any WHOIS++ server for its list of supported commands and constraints. 2.2.1. System Commands System commands are commands to the server for information or to control its operation. These include commands to list the template types available from individual servers, to obtain a single blank template of any available type, and commands to obtain the list of valid commands and constraints supported on a server. There are also commands to obtain the current version of the WHOIS++ protocol supported, to access a simple help subsystem, to obtain a brief description of the service (which is intended, among other things, to support the automated registration of the service by yellow pages directory services). All of these commands are required from a conforming WHOIS++ server. Deutsch, et al Standards Track [Page 13] RFC 1835 Architecture of the WHOIS++ service August 1995 ------------------------------------------------------------------------ Short Long Form Functionality ----- --------- ------------- COMMANDS [ ':' HOLD ] list valid WHOIS++ commandsDeutsch, et al [Page 14] Internet-Draft Architecture of the WHOIS++ service 25 January 1995supported by this server CONSTRAINTS [ ':' HOLD ] List valid constraints supported by this server DESCRIBE [ ':' HOLD ] Describe this server, formating the response usingthea standardIAFA"Services" template '?' HELP [<string> [':' <cnstrnts>]] System help, usingstandard IAFAa "Help" template LIST [':' <cnstrnts>] List templates supported by this system POLLED-BY [ ':' HOLD ] List indexing servers that are know to track this server POLLED-FOR [ ':' HOLD ] List information about what this server is tracking for SHOW <string> [':' <cnstrnts>] Show contents of templates specified VERSION [ ':' HOLD ] return current version of the protocol supported. Table I - Required WHOIS++ SYSTEM commands. ------------------------------------------------------------------------ Below follows a descriptions for each command. Examples of responses to each command is in Appendix C. 2.2.1.1. The COMMANDS command The COMMANDS command returns a list of commands that the server supports. The response is formatted asan ABRIDGEDa FULL response. Deutsch, et al Standards Track [Page 14] RFC 1835 Architecture of the WHOIS++ service August 1995 2.2.1.2. The CONSTRAINTS command The CONSTRAINTS command returns a list of constraints and the values of those that the server supports. The response is formatted as a FULL response, where every constraint is represented as a separate record. The template name for these records is CONSTRAINT. No attention is paid to handles. Each record has, as a minimum, theDeutsch, et al [Page 15] Internet-Draft Architecture of the WHOIS++ service 25 January 1995following two fields: - "Constraint", which contains the attribute name described - "Default", which shows the default value for this constraint. If the client is permitted to change the value of the constraint, there is also: - "Range" field, which contains a list of values that this server supports, as a comma separated list; Or, if the range is numerical, as a pair of numbers separated with a hyphen. 2.2.1.3. The DESCRIBE commandThis is equivalent to issuing the searchThe DESCRIBE commandongives a brief description about thelocalserverwith only the terms "template=services" and "subject=describe" and will resultinthe display of the corresponding SERVICES template with an attribute of "subject" and value of "describe", except that the DESCRIBE command only searches local information and may not return pointers to other servers.a "Services" template. The result is formatted as a FULL response. 2.2.1.4. The HELP command The HELP command takes an optional argument as subject to get help for.This is equivalent to issuing the search command on the local server only with the terms "template=help and subject=<subject>" (or "subject=help" if no argument specified) and will result in the display of the corresponding HELP template with subject "help". The HELP command differs from the above search command in that the HELP command only searches local information and may not return pointers to other servers.2.2.1.5. The LIST command The LIST command returns the name of the templates available on the server. The answer isin ABRIDGEDformatted FULL formatwith the template name as the first word on each line.response. 2.2.1.6. The POLLED-BY command The POLLED-BY command returns a list of servers and the templates and attribute names that those server polled as centroids from this server. The format is in FULL format with two attributes, Template and Field. Each of these is a list of names of the templates or fields polled. An empty result means either that the server is not polled by anyone, or that it doesn't support indexing. Deutsch, et al Standards Track [Page16] Internet-Draft15] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995 2.2.1.7. The POLLED-FOR command The POLLED-FOR command returns a list of servers that this server has polled, and the template and attribute names for each of those. The answer is in FULL format with two attributes, Template and Field. An empty result means either that the server is not polling anyone, or that it doesn't support indexing. 2.2.1.8. The SHOW command The SHOW command takes a template name as argument and returns information about a specific template, formatted as a FULL response. The answer is formatted as a blank template with the requested name. 2.2.1.9. The VERSION commandThis is equivalent to issuing the search command on the local server only with the terms "template=version" and will result in the display of the VERSION template, except that the VERSION com- mand only searches local information and may not return pointers to other servers.The output format is a FULL response containg a record withtem- platetemplate name VERSION. Thehandle for this record is unspecified. Therecord must have attribute name "Version", which value is "1.0" for this version of the protocol. The record may also have theaddi- tionaladditional fields "Program-Name" and "Program-Version" which gives information about the server implementation if the server so desires. 2.2.2. The Search Command A search command consists of one or more search terms, which might each have local constraints, followed by an optional colon with a set of global search constraints. Each attribute value in the WHOIS++ database is divided into one or more words separated by whitespace. Each search term operates on every word in the attribute value. Two or more search terms may be combined with boolean operators AND, OR or NOT (other than the implied AND between terms). The operator AND has higher precedence than the operator OR, but this can be changed by the use of parentheses. Search constraints that apply to every search term are specified as global constraints. Local constraints override global constraints for the search term they are bound to. The search terms and theDeutsch, et al [Page 17] Internet-Draft Architecture of the WHOIS++ service 25 January 1995global constraints are separated with a colon (':'). Additional global constraints are appended to the end of the search command delimited with a semicolon ';'. If different search constraints can not be fulfilled, or thecombi- nationcombination of different search constraints is uncombinable, the server may choose to ignore some constraints, but still do the search Deutsch, et al Standards Track [Page 16] RFC 1835 Architecture of the WHOIS++ service August 1995 and return some records. The set of required constraints are summarized in Table III. The set of optional constraints are summarized in Table IV. As an option, the server may accept specifications for attributes for either inclusion or exclusion from a reply. Thus, users could specify_only_-only- those attributes to return, or specific attributes to filter out, thus creating custom views. 2.2.2.1. Format of a Search Term Each search term consists of one of the following: 1) A search string, followed by an optionalcommasemicolon and set ofcomma-separatedsemicolon-separated local constraints. 2) A search term specifier (as listed in Table II), followed by a '=', followed by a search string, an optionalcommasemicolon and a set ofcomma-separatesemicolon-separate local constraints. 3) An abbreviated search term specifier, followed by a search string, followed by an optionalcommasemicolon and set ofcomma-separatesemicolon-separated local constraints. 4) A combination of attribute name, followed by '=', followed by a search string, followed by an optionalcommasemicolon and set ofcomma-separatesemicolon-separate local constraints. If no term identifier is provided, then the search will be applied to attribute values only. This corresponds to an identifier of VALUE. If aHANDLE specifier is used then the search term can specify either a composed handle or a record handle. The server is respon- sible for resolving the composed handle to a server handle and a record handle. If aSEARCH-ALL specifier is used then the search will be applied to all template names, handles, attribute names and attribute values. When the user specifies the search term using the form:Deutsch, et al [Page 18] Internet-Draft Architecture of the WHOIS++ service 25 January 1995"<attribute_name> = <value>" this is considered to be an ATTRIBUTE-VALUE search. For discussion of the system reply format, and selecting the appropriate reply format, see section2.5. ----------------------------------------------------------------------2.4. Deutsch, et al Standards Track [Page 17] RFC 1835 Architecture of the WHOIS++ service August 1995 ------------------------------------------------------------------- Valid specifiers: ----------------- Name Functionality ---- ------------- ATTRIBUTE-VALUE [','';' <constrnt>]* allows combining attribute and value specifiers in one term. HANDLE [','';' <constrnt>]* Confine search to handles. SEARCH-ALL [','';' <constrnt>]* Search everything. TEMPLATE [','';' <constrnt>]* Confine search to template names. VALUE [','';' <constrnt>]* Confine search to attribute values. This is the default. (Note: The name HANDLE can be replaced with the shortname '!') Acceptable forms of a search specifier: --------------------------------------- 1) <searchstring>[','[';' <constraint>]* 2) <specifier> = <searchstring>[','[';' <constraint>]* 3) <shortspecifier> <searchstring>[','[';' <constraint>]* 4) <attribute_name> = <searchstring>[','[';' <constraint>]* (Note: A <constraint> is a name of a valid local constraint.) Table II - Valid search command term specifiers.----------------------------------------------------------------------------------------------------------------------------------------- 2.2.2.2. Format of a Search String Special characters that need to be quoted are preceeded by a backslash, '\'. Special characters are space ' ', tab, equal sign '=', comma ',', colon ':', backslash '\', semicolon ';', asterisk '*', period '.', parenthesis '()', square brackets '[]', dollar sign '$' andcircum- flexcircumflex '^'. Deutsch, et al Standards Track [Page19] Internet-Draft18] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995 If the search term is given in some other character set than ISO- 8859-1, it must be specified by the constraint INCHARSET. 2.3. WHOIS++ Constraints Constraints are intended to be hints or recommendations to the server about how to process a command. They may also be used to override default behaviour, such as requesting that a server not drop the connection after performing a command. Thus, a user might specify a search constraint as "SEARCH=exact", which means that the search engine is to perform an exact match search. It might also specify "LANGUAGE=Fr", which implies that the server should use French in fuzzy matches. It might also be able to issue system messages in French. In general, contraints take the form "<constraintname>=<value>", with <value> being one of a specified set of valid values. Thenot- ablenotable exception is "HOLD", which takes no argument. All constraints can be used as a global constraint, but only a few can be used as local. See tables IV and V for information of which constraints can be local. The CONSTRAINTS system command is used to list the searchcon- straintsconstraints supported by an individual server. If a server cannot satisfy the specified constraint there will be a mechanism for informing the user in the reply, using systemmes- sages.messages. In such cases, the search is still performed, with the the server ignoring unsupported constraints. Deutsch, et al Standards Track [Page 19] RFC 1835 Architecture of the WHOIS++ service August 1995 2.3.1. Required Constraints The following CONSTRAINTS must be supported in all conforming WHOIS++ servers.Deutsch, et al [Page 20] Internet-Draft Architecture of the WHOIS++ service 25 January 1995------------------------------------------------------------------ Format LOCAL/GLOBAL ------ ------------- SEARCH= {exact | lstring } LOCAL/GLOBAL FORMAT= {full | abridged | handle | summary } GLOBAL MAXHITS= { 1-<max-allowed> } GLOBAL Table III - Required WHOIS++ constraints. ------------------------------------------------------------------ Deutsch, et al Standards Track [Page 20] RFC 1835 Architecture of the WHOIS++ service August 1995 2.3.2. Optional CONSTRAINTS The following CONSTRAINTS and constraint values are not required of a conforming WHOIS++ server, but may be supported. If supported, their names and supported values must be returned in the response to the CONSTRAINTS command.Deutsch, et al [Page 21] Internet-Draft Architecture of the WHOIS++ service 25 January 1995--------------------------------------------------------------------- Format LOCAL/GLOBAL ------ ------------- SEARCH= { regex | fuzzy | substring | <X-format> } LOCAL/GLOBAL CASE= { ignore | consider } LOCAL/GLOBAL FORMAT= {servers-to-askserver-to-ask | <X-format> } GLOBAL MAXFULL= { 1-<max-allowed> } GLOBAL AUTHENTICATE= password GLOBAL NAME= <string> GLOBAL PASSWORD= <string> GLOBAL INCHARSET= { us-ascii | iso-8859-* } GLOBAL LANGUAGE= <As defined in ISO 639:1988> GLOBAL HOLD GLOBAL IGNORE= {attributelist} GLOBAL INCLUDE= {attributelist} GLOBAL Table IV - Optional WHOIS++ constraints. ---------------------------------------------------------------------- Deutsch, et al Standards Track [Page 21] RFC 1835 Architecture of the WHOIS++ service August 1995 2.3.2.1. The SEARCH Constraint The SEARCH constraint is used for specifying the method that is to be used for the search. The default method is "exact". Following is a definition of each search method. exact The search will succeed for a word that exactly matches the search string. substring The search will succeed for a word that matches a part of a word. regex The search will succeed for a word when a regular expression matches the searched data. Regular expression is built up by using constructions of '*', '.', '^', '$', and '[]'. For use of regular expressions see Appendix G.Deutsch, et al [Page 22] Internet-Draft Architecture of the WHOIS++ service 25 January 1995fuzzy The search will succeed for words that matches the search string by using an algorithm designed to catch closely related names with different spelling, e.g. names with the same pronounciation. The server chooses which algorithm to use, but it may vary depending on template name, attribute name and language used (see Constraint Language above). lstring The search will succed for words that begins with the search string. 2.3.2.2. The FORMAT Constraint The FORMAT constraint describes what format the result will be in. Default format is FULL. For a description of each format, see Server Response Modes below. 2.3.2.3. The MAXFULL Constraint The MAXFULL constraint sets the limit of the number of matching records the server allows before it enforces SUMMARY responses. The client may attempt to override this value by specifying another value to that constraint. Example: If, for privacy reasons, the server will return the response in SUMMARY format if the number of hits exceeds 2, the MAXFULL constraint is set to 2 by the server. Regardless of what format the client did or did not ask for, the server will change the response format to SUMMARY when the number of matching records equals or exceeds this value. Deutsch, et al Standards Track [Page 22] RFC 1835 Architecture of the WHOIS++ service August 1995 2.3.2.4. The MAXHITS Constraint The MAXHITS constraint sets the maximum number of records the client can get in a search respone. 2.3.2.5. The CASE Constraint The CASE constraint defines if the search should be done casesen- sistivesensistive or not. Default value is to have case ignored. 2.3.2.6. The AUTHENTICATE Constraint The AUTHENTICATE constraint describes which authentication methodDeutsch, et al [Page 23] Internet-Draft Architecture of the WHOIS++ service 25 January 1995to use when executing the search. By using a specificauthentica- tionauthentication method, some other constraints might be needed which isspeci- fiedspecified by the authentication method. The only authentication method described in this document is"pass- word","password", if used, also the two other constraints "name" and"pass- word""password" need to be set. 2.3.2.7. The NAME Constraint The NAME constraint is only used together with some authentication method named by the constraint "authenticate". The only use described in this document is by sending a username as a string of characters which together with the string given as an argument to the "password" constraint is sent to the server. The server can use that pair of strings to do a simple authentication check,likesimilar to the UNIX loginprogram do.program. 2.3.2.8. The PASSWORD Constraint The PASSWORD constraint is only used together with someauthentica- tionauthentication method named by the constraint "authenticate". The only use described in this document is by sending a password as a string of characters which together with the string given as an argument to the "name" constraint is sent to the server. The server can use that pair of strings to do a simple authentication check,like thesimilar tothe UNIX loginprogram do.program. 2.3.2.9. The LANGUAGE Constraint The LANGUAGE constraints can be used as an extra information to the fuzzy matching search method, and it might also be used to tell the server to give the system responses in another language, although this ability should be handled by the client. Thetwo-letterlanguage code defined inISO 639:1988RFC 1766 [ALVE95] can be used as a value for the language Deutsch, et al Standards Track [Page 23] RFC 1835 Architecture of the WHOIS++ service August 1995 constraint. In these, the case of the letters are insignigicant.Other language codes shall be interpreted according to the Internet standard for language codes in RFC 822/MIME mes- sages, if and when such a standard is adopted.2.3.2.10. The INCHARSET Constraint The INCHARSET constraint tells the server in which character set the search string itself is given in. The default character set is"ISO-8859-1". Deutsch, et al [Page 24] Internet-Draft Architecture of the WHOIS++ service 25 January 1995ISO- 8859-1. 2.3.2.11. The IGNORE Constraint The IGNORE constraint specifies which attributes to NOT include in the result. All other attributes will be included (as if named explicitly by the "include" constraint). If an attribute is named both with the "include" and "ignore"con- straint,constraint, the attribute is to be included in the result, but the system message must be "% 205 Requested constraint not fulfilled". 2.3.2.12. The INCLUDE Constraint The INCLUDE constraint specifies which attributes to include in the result. All other attributes will be excluded (as if namedexpli- citlyexplicitly by the "ignore" constraint). If an attribute is named both with the "include" and "ignore"con- straint,constraint, the attribute is to be included in the result, but the system message must be "% 205 Requested constraint not fulfilled". 2.4. Server Response Modes There are currently a total of five different response modespossi- blepossible for WHOIS++ servers. These are FULL, ABRIDGED, HANDLE, SUMMARY andSERVERS-TO-ASK.SERVER-TO-ASK. The syntax of each output format is specified in more detail in the following section. 1) A FULL format response provides the complete contents ofeacha template matching the specified query, including the templatetype andtype, thecomposedserver handlefor each record.and an optional record handle. 2) An ABRIDGED format response provides a brief summary, including (as a minimum) thecomposedserver handle, the corresponding record handle and relevant information for that template. 3) A HANDLE format response returnsonlyalist of handlesline with information about the server handle and record handle for a record that matched the specified query. Deutsch, et al Standards Track [Page 24] RFC 1835 Architecture of the WHOIS++ service August 1995 4) A SUMMARY response provides only a brief summary of information the number of matches and the list of template types in which the matches occured. 5) ASERVERS-TO-ASKSERVER-TO-ASK responsereturnsonlya pointerreturns pointers toanother WHOIS++ server,other index servers which might possibly be able to answer the specified query. The server may respond with a null answer and may also respond with a null answer together with a correct system message to indicateDeutsch, et al [Page 25] Internet-Draft Architecture of the WHOIS++ service 25 January 1995that the query was too complex. 2.4.1. Default Responses By default, a WHOIS++ server will provideaFULLresponse.responses. This may be changed by the client with the use of the global constraint "format". The server is allowed to provide response in SUMMARY format if the number of hits exceeds the value of the global constraint"max- full"."maxfull". The server will not respond with more matches than the valuespeci- fiedspecified with the global constraint "maxhits"; Not in any responsefor- mat.format. If the number of matches exceeds this value, the server will issues the system message 110 (maxhits value exceeded), but will still show the responses, up to the number of the "maxhits"con- straintconstraint value. This mechanism will allow the server to hide the number of possible matches to a search command. The server response modes are summarized in Table V. 2.4.2. Format of Responses Each response consists of a numerical system generated message, which can be tagged with text, followed by an optional formatted response message, followed by a second system generated messages. That is: '%' <system messages> <nl> [ <formatted response> ] '%' <system messages> <nl> If there are no matches to a query, the system is not required to generate any output as a formatted response, although it must still generate system messages. Deutsch, et al Standards Track [Page 25] RFC 1835 Architecture of the WHOIS++ service August 1995 For information about the format for system messages, see Appendix E. 2.4.3. Syntax of a Formatted Response All formatted responsesconsistexcept for the HANDLE response, consists of a response-specific START line, followed bya Deutsch, et al [Page 26] Internet-Draft Architecture of the WHOIS++ service 25 January 1995 response-specifican optional response- specific data section, followed by a TERMINATION line. The HANDLE response is different in that it only consists of a START line. It is permissible to insert any number of lines consisting solely ofnew- linesnewlines within a formatted response to improve readibility.A STARTEach lineconsists ofshall be limited to no more than 81 characters, including the terminating newline. If a line (including the required leading single space) would exceed 81 characters, it is to be broken into lines of no more than 81 characters, with each continuation line beginning with a'#'"+" character in the firstcolumn, followed by one white space character (SPACE or TAB), fol- lowed by onecolumn instead of thefollowing keywords FULL, ABRIDGED, HANDLE, SUM- MARY or SERVERS-TO-ASK. A STARTleading character. If an attribute value in a data section includes a line break, the line break mustcontain no more than 81 characters, includingbe replaced by a CR/LF pair and theterminating newlinefollowing line begin with a "-" character in the first column, instead of the leading character. The attribute name is not repeated on consecutive lines. A TERMINATION line consists of a linebeginningwith a '#' in the first column, followed by one white space character (SPACE or TAB), followed by the keyword END, followed by zero or more characters, followed by a newline. ATERMINATION line must contain no more than 81 characters, includ- ing the terminating newline character. Aresponse-specific section will be one of the following: 1) FULL Format Response 2) ABRIDGED Format Response 3) HANDLE Format Response 4) SUMMARY Format Response 5)SERVERS-TO-ASKSERVER-TO-ASK Format Response The details of each are specified in the following sections: 2.4.3.1. A FULL format response A FULL format response consists of a series of responses, eachcon- sistingconsisting of aFORMAT specifierSTART line, followed by the completetem- platetemplate information for the matchingrecord.record and a TERMINATION line. EachFORMAT specifierSTART line consists of a '#' in the first column, followed by one white space character, the word "FULL", a white space character, the name of thecorrespond- ingcorresponding template type, one white space Deutsch, et al Standards Track [Page 26] RFC 1835 Architecture of the WHOIS++ service August 1995 character, theserverhandle,server handle, acolon, thewhite space character, an optional handle forthatthe record, and a terminating newline. The template information foreachthe record will be returned as a series of lines consisting of a single space, followed by the corresponding line of the record. The line of the record shall consist of a single space and the attributename,name followed by a ':', a single space, the value of that attribute, and a newline.Deutsch, et al [Page 27] Internet-Draft Architecture of the WHOIS++ service 25 January 1995 Each such line shall be limited to no more than 81 characters, including the terminating newline. If a line (including the required leading single space) would exceed 81 characters, it is to be broken into lines of no more than 81 characters, with each con- tinuation line beginning with a "+" character in the first column, instead of the leading space. If the attribute value includes a line break, the line break must be replaced by a CR/LF pair and the following line begin with a "-" character in the first column, instead of the space character. The attribute name is not repeated on consecutive lines.2.4.3.2. ABRIDGED Format ResponseAnEach ABRIDGED format response consists of asingle set of responses, consisting ofSTART line, a single line excerpt of the template information from each matchingrecord.record and a TERMINATION line. The excerpt information shallinclude, as a minimum, the composed handle of the record, as well as otherinclude information that is relevant to the template type. The START line consists of a '#' in the first column, followed by one white space character, the word "ABRIDGED", a white space character, the name of the corresponding template type, a white space character, the server handle, a white space character, the handle for the record, and a terminating newline. The abridged template informationfor each recordwill be returned as aseries of lines, each of which must consistline, consisting of a single space, followed by the abridged line of therecord, one or more space characters, the composed handle,record and aCR/LFnewline pair.Each line shall be limited to no more than 81 characters, including the terminating newline. If a line (including the required single space, would exceed 81 characters, it is to be broken into lines of no more than 81 characters, with the remainder following on the subsequent line, with the space replaced by a "+" character in the first column. If the attribute value includes a line break, the line break must be replaced by a CR/LF pair and the following line begin with a "-" character in the first column, instead of the space character. The attribute name is not repeated on consecutive lines.2.4.3.3. HANDLE Format Response A HANDLEformatresponse consists of a singleset of responses, consisting of a single line listing the composed handle and tem- plate type for each matching record. Each lineSTART line, which shall start withone space, followed by the server han- dle,acolon,'#' in therecord handle,first column, followed by oneor more whitespace characters,white space character, thetemplate type and terminated byword "HANDLE", anewline. Each such line must contain no more than 81 characters, includingwhite space character, theterminating newline character. Ifname of the corresponding template, aline (includingwhite space character, therequired first space) would exceed 81 characters, it shall be split Deutsch, et al [Page 28] Internet-Draft Architecture ofhandle for theWHOIS++ service 25 January 1995 into multiple lines, with each continuation line beginning withserver, a'+' instead ofwhite space character, the handle for that record, and aspace.terminating newline. 2.4.3.4. SUMMARY Format Response A SUMMARY format response consists of a single set of responses, consisting of a line listing the number of matches to thespecified query, followed byspecified query, followed by a list of all template types which satisfied the query at least once. The START line shall begin with a '#' in the first column, be followed by one white space character, the word "SUMMARY", a white space character, the handle for the server, and alistterminating newline. Deutsch, et al Standards Track [Page 27] RFC 1835 Architecture ofall template types which satisfiedthequery at least once.WHOIS++ service August 1995 All following lines until the TERMINATION line starts with a leading space. The first line shall begin with the string "matches: ", be followed by a space and the number of responses to the query and terminated by a newline. The second line shall begin with the string"tem- plates:"templates: ", be followed by a newline separated list of the name of the template types which matched the query. Each line following the first which include the text "templates:" must begin with a '-' instead of a space.If the line is longer than 81 characters including the terminating CR/LF pair, it shall be split into multiple lines with each con- tinuation line beginning with a '+' instead of a space.2.4.3.5.SERVERS-TO-ASKSERVER-TO-ASK Response ASERVERS-TO-ASKSERVER-TO-ASK response consists of information to the client aboutwhich serversa server to contact next to resolve a query. If the server has pointers to more than one server, it will present additional SERVER- TO-ASK responses. Theservers-to-askSERVER-TO-ASK response will consist of a START line and a number ofattribute- valuelines with attribute-value pairs, separated by CRLF. Each line is indented with one space.Required attributes are "Version-number", which will be "1.0", and "Next-Servers".The"Next-Servers" field will be returned asend of aseriesSERVER-TO-ASK response is indicated with a TERMINATION line. Each START line consists oflines, each holding pointer information to one server. Consecutive lines shall haveahyphen "-"'#' in the firstcolumn. Each line will be separated into five fields, separated withcolumn, followed by one white space character, the word "SERVER-TO-ASK", asemicolon. Those fields are:white space character, the handle of the server and a terminating newline. 1. "Server-Handle" - The server handle of the server pointed at.(required)(req.) 2. "Host-Name" - A cached host named for the server pointed at.(optional)(opt.) 3. "Host-Port" - A cached port number for the server pointed at.(optional) Each such line shall be limited to no more than 81 characters, including the terminating newline. If a line (including the required leading single space) would exceed 81 characters, it is to(opt.) Other attributes may bebroken into lines of no more than 81 characters, with each con- tinuation line beginning with a "+" character in the first column. Deutsch, et al [Page 29] Internet-Draft Architecture ofpresent, depending on theWHOIS++ service 25 January 1995index server. 2.4.4. System Generated Messages All system generated messages must begin with a '%' as the first character, a space as the second one, followed by a three digit number, a space and an optional text message. The total length of the line must be no more than 81 characters long, including the terminating CR LF pair. There is no limit to the number of system messages that may be generated. The format for multiline replies requires that every line, except the last, begin with "%", followed by space, the reply code, a hyphen, and an optional text. The last line will begin with "%", followed by space, the reply code, a space and some optional text. Deutsch, et al Standards Track [Page 28] RFC 1835 Architecture of the WHOIS++ service August 1995 System generated messages displayed before or after the formatted response section are expected to refer to operation of the system or refer to the entire query. System generated messages within the output of an individual record during a FULL reponse are expected to refer to that record only, and could (for example) be used to indicate problems with that record of the response. See Appendix E for a description of system messages. 2.5. Compatibility with Older WHOIS Servers Note that this format, although potentially more verbose, is still in a human readible form. Responses from older systems that do not follow this format are still conformant, since their responses would be interpreted as being equivalent to optional text messages, without a formatted response. Clients written to thisspecifica- tionspecification would display the responses as a advisory text message, where it would still be readible by the user. 3. Miscellaneous 3.1. Acknowledgements The WHOIS++ effort began as an intensive brainstorming session at the 24th IETF, in Boston Massachusetts. Present at the birth, and contributing ideas through this early phase, were (alphabetically) Peter Deutsch, Alan Emtage, Jim Fullton, Joan Gargano, BradPasswa- ters,Passwaters, Simon Spero, and Chris Weider. Others who have since helped shape this document with feedback and suggestions include Roxana Bradescu, Patrik Faltstrom, Kevin Gamiel, Dan Kegel, MichaelMeal- ling,Mealling, Mark Prior andRickard Schoultz.Rickard Schoultz. 3.2 References [ALVE95] Alvestrand H., "Tags for the Identification of Languages", RFC 1766, UNINETT, March 1995. [HARR85] Harrenstein K., Stahl M., and E. Feinler, "NICNAME/WHOIS", RFC 954, SRI, October 1985. [IIIR] Weider C., and P. Deutsch, "A Vision of an Integrated Internet Information Service", RFC 1727 Bunyip Information Systems, Inc., December 1994. [POST82] Postel J., "Simple Mail Transfer Protocol", STD 10, RFC 821, USC/Information Sciences Institute, August 1982. Deutsch, et al Standards Track [Page30] Internet-Draft29] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 19953.2. Contact information3.3. Authors' Addresses PeterDeutsch,Deutsch BUNYIP INFORMATION SYSTEMS,incInc. 310 St-Catherine St West,suiteSuite 202, Montreal, Quebec H2X 2A1 CANADA<peterd@bunyip.com>EMail: peterd@bunyip.com RickardSchoultz,Schoultz KTHNOC, SUNET/NORDUnet/Ebone Operations Centre 100 44 STOCKHOLM SWEDEN<schoultz@sunet.se>EMail: schoultz@sunet.se Patrik Faltstrom BUNYIP INFORMATION SYSTEMS,incInc. 310 St-Catherine St West,suiteSuite 202, Montreal, Quebec H2X 2A1 CANADA<paf@bunyip.com>EMail: paf@bunyip.com Chris Weider BUNYIP INFORMATION SYSTEMS,incInc. 2001 S. Huron Parkway, #12 Ann Arbor, MI 48104 USA<clw@bunyip.com>EMail: clw@bunyip.com Deutsch, et al Standards Track [Page31] Internet-Draft30] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995 Appendix A - Some Sample Queries author=chris and template=user The result will consist of all records where attribute "author" matches "chris" with case ignored. Only USER templates will be searched. An example of a matching record is "Author=Chris Weider". This is the typical case of search. schoultz and rick;search=lstring The result will consist of all records which have one attribute value matching "schoultz" exactly and one having "rick" as leading substring, both with case ignored. One example is "Name=RickardSchoultz".choultz". value=phone;search=substring The result will consist of all records which have attribute values matching *phone*, for example the record "Name=Acme telephone inc.", but will not match the attribute name "phone". (Since "value" term specifier is the default, the search term could be "phone" as well as "value=phone".) search-all=Peter ; search=substring;case=consider The result will consist of all records which have attribute names, template names or attribute values matching "Peter" with respect to case. One example is "Friend-Of-Peter: Yes". ucdavis;search=substring and (gargano or joan):include=name,email This search command will find records which have records containing the words "gargano" or "joan" somewhere in the record, and has the word "ucdavis" somewhere in a word. The result will only show the "name" and "email" fields.Deutsch, et al [Page 32] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Appendix B - Some sampleresponses.responses 1)AFULL formatresponse:responses: # FULL#USERSERVHANDLE1:PD45SERVERHANDLE1 PD45 Name: Peter Deutsch email: peterd@bunyip.com # END # FULL USERSERVHANDLE1:AE1SERVERHANDLE1 AE1 Name: Alan Emtage email: bajan@bunyip.com Deutsch, et al Standards Track [Page 31] RFC 1835 Architecture of the WHOIS++ service August 1995 # END # FULL USERSERVHANDLE1:NW1SERVERHANDLE1 NW1 Name: Nick West Favourite-Bicycle-Forward-Wheel-Brand: New Bicy +cles Acme Inc. email: nick@bicycle.acme.com My-favourite-song: Happy birthday to you! -Happy birthday to you! -Happy birthday dear Nick! -Happy birthday to you. # END # FULL SERVICESSERVHANDLE1:WWW1SERVERHANDLE1 WWW1 Type: World Wide Web Location: the world # END -------------------- 2) An ABRIDGED format response: # ABRIDGED USER SERVERHANDLE1 PD45 Peter Deutsch peterd@bunyip.comPD45# END # ABRIDGED USER SERVERHANDLE1 AE1 Alan Emtage bajan@bunyip.comAE1# END # ABRIDGED USER SERVERHANDLE1 WWW1 World Wide Web the worldWWW1# END -------------------- 3)AHANDLE formatresponse:responses: # HANDLESERVHANDLE1:PD45 User SERVHANDLE1:AE1 UserUSER SERVERHANDLE1 PD45 # HANDLE USER SERVERHANDLE1 AE1 # HANDLE SERVICES SERVERHANDLE1 WWW1 -------------------- Deutsch, et al Standards Track [Page33] Internet-Draft32] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995SERVHANDLE1:WWW1 Services # END --------------------4) A SUMMARY HANDLE format response: # SUMMARY SERVERHANDLE1 Matches: 175 Templates: User - Services - Abstracts # ENDDeutsch, et al [Page 34] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Appendix C - Sample responses to system commands C.1 Response to the LIST command #ABRIDGEDFULL LIST SERVERHANDLE1 Templates: USERSERVICES HELP-SERVICES -HELP # END C.2 Response to the SHOW command This exampleshowshows the result after issuing "showhelp":user": # FULL# TEMPLATE serverhandle1:user-template Template-Name:USERAttribute-Names: Name,Organization-Name,Organization-Type,Work-Phone, +Work-Fax,Work-Postal,Job-Title,Department,Email,Handle,Home-Phone, +Home-Postal,Home-Fax # TEMPLATE serverhandle1:help Template-Name: HELP Attribute-Names: Subject,Description,HandleSERVERHANDLE1 Name: Email: Work-Phone: Organization-Name: City: Country: # END C.3 Response to the POLLED-BY command # FULL#POLLED-BYxyz:serverhandle1SERVERHANDLE1 Server-handle:serverhandle1serverhandle2 Cached-Host-Name: sunic.sunet.se Cached-Host-Port: 7070 Template:userUSER Field: ALL # END # FULL POLLED-BYxyz:serverhandle2SERVERHANDLE1 Server-handle:serverhandle2serverhandle3 Cached-Host-Name: kth.se Cached-Host-Port: 7070 Template: ALL Deutsch, et al Standards Track [Page 33] RFC 1835 Architecture of the WHOIS++ service August 1995 Field: Name,Email # END C.4 Response to the POLLED-FOR command # FULL#POLLED-FORxyz:serverhandle3SERVERHANDLE1 Server-Handle:serverhandle3serverhandle5 Template: ALLDeutsch, et al [Page 35] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Field:Name,Address,Job-Title,Organization-Name,Organization-Address, +Organization-NameName,Address,Job-Title,Organization-Name, +Organization-Address,Organization-Name # END # FULL POLLED-FORxyz:serverhandle4SERVERHANDLE1 Server-Handle: serverhandle4 Template:UserUSER Field: ALL # END C.5 Response to the VERSION command # FULL#VERSIONserverhandle:versionBUNYIP.COM Version: 1.0 Program-Name: kth-whoisd Program-Version: 2.0 # END C.6 Response to the CONSTRAINTS command # FULL#CONSTRAINTasdjkqCOMEDIA.SE Constraint: format Default: full Range: full,abridged,summary,handle # END # FULL CONSTRAINTljkqwerCOMEDIA.SE Constraint: maxhits Default: 200 Range: 1-1000 # END # FULL CONSTRAINTslkjewerCOMEDIA.SE Constraint: search Default: exact Range: exact,substring,lstring # END # FULL CONSTRAINTqwewerqCOMEDIA.SE Constraint: maxfull Default: 20# ENDDeutsch, et al Standards Track [Page36] Internet-Draft34] RFC 1835 Architecture of the WHOIS++ service25 JanuaryAugust 1995 # END C.3 Response to the COMMANDS command # FULL COMMANDS SERVERHANDLE1 Commands: commands -constraints -describe -help -list -polled-by -polled-for -show -version # END Appendix D - Sample whois++ session Below is an example of a session between a client and a server. The angle brackets to the left is not part of the communication, but is just put there to denonte the direction of the communication between the server or the client. Text appended to '>' meansmes- sagesmessages from the server and '<' from the client. Client connects to the server >% 220-Welcome to >% 220-the whois++ server >% 220 at ACME inc. <name=Nick:hold >% 200 Command okay > ># FULL> >#USERserverhandle:nw1ACME.COM NW1 > name: Nick West > email: nick@acme.com ># END >#SERVERS-TO-ASKSERVER-TO-ASK ACME.COM >Version-number: 1.0Server-Handle: SUNETSE01 > Host-Name: whois.sunet.se > Host-Port: 7070 ># END ># SERVER-TO-ASK ACME.COM >Next-Servers: sunetse01;whois.sunet.se;7070 >- kthse01 >- anotherserverhandle01;whois.acme.com;7070Server-Handle: KTHSE01 ># END >% 226 Tranfer complete <version >% 200 Command okay ># FULL>#VERSIONignoredserverhandle:versionACME.COM Deutsch, et al Standards Track [Page 35] RFC 1835 Architecture of the WHOIS++ service August 1995 > Version: 1.0 ># END >% 226 Tranfer complete >% 203 Bye Server closes the connection In the example above, the client connected to a whois++ server and queried for all records where the attribute "name" equals "Nick", and asked the server not to close the connection after the response by using the global constraint "HOLD". The server responds with one record and a pointer tothreetwo other servers that either holds records or pointers to other servers. Thefirst server was polled for "USER" templates and "name" and "email" fields. Theclient continues with asking for the servers version number without using the HOLD constraint. After responding with protocol version, the server closes the connection.Deutsch, et al [Page 37] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Note that each response from the server begins system message 200 (Command OK), and ends with system message 226 (Transfer Complete).Deutsch, et al [Page 38] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Appendix E - System messages A system message begins with a '%', followed by a space and a three digit number, a space, and an optional text message. The linemes- sagemessage must be no more than 81 characters long, including theter- minatingterminating CR LF pair. There is no limit to the number of systemmes- sagesmessages that may be generated. A multiline system message have a hyphen instead of a space in column 6, immediately after the numeric response code in all lines, except the last one, where the space is used. Example 1 % 200 Command okay Example 2 % 220-Welcome to % 220-the whois++ server % 220 at ACME inc. The client is not expected to parse the text part of the response message except when receiving reply 600, in which case the text part is the name of a character set that will be used by the server in the rest of the response. The valid values for characters sets is specified in the "characterset" list in the BNF listing inappendixAppendix Deutsch, et al Standards Track [Page 36] RFC 1835 Architecture of the WHOIS++ service August 1995 F. The theory of reply codes is described inappendixAppendix E in STD 10, RFC 821 [POST82]. ------------------------------------------------------------------------ List of system response codes ------------------------------ 110 Too many hits The number of matches exceeded the value specified by the maxhits constraint. Server will still reply with as many records as "maxhits" allows. 111 Requested constraint not supported One or more constraints in query is not implemented, but the search is still done. 112 Requested constraint not fullfilled One or more constraints in query has unacceptable value and was therefore not used, but the search is still done.Deutsch, et al [Page 39] Internet-Draft Architecture of the WHOIS++ service 25 January 1995200 Command Ok Command accepted and executed. The client must wait for a transaction end system message. 201 Command Completed successfully Command accepted and executed. 203 Bye Server is closing connection 220 Service Ready Greeting message. Server is accepting commands. 226 Transaction complete End of data. All responses to query are sent. 430 Authentication needed Client requested information that needs authentication. 500 Syntax error 502 Search expression too complicated This message is sent when the server is not able to resolve a query (i.e. when a client sent a regular expression that Deutsch, et al Standards Track [Page 37] RFC 1835 Architecture of the WHOIS++ service August 1995 is too deeply nested). 530 Authentication failed The authentication phase failed. 600 <token> Subsequent attribute values are encoded in the charater set specified by <token>. Table V - System response codes ------------------------------------------------------------------------Deutsch, et al [Page 40] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Appendix F - The WHOIS++ BNF Grammar whois-command = ( system-command [":" "hold"] / terms [":" globalcnstrnts] ) NL system-command = "constraints" / "describe" / "commands" / "polled-by" / "polled-for" / "version" / "list" / "show" [1*SP string] / "help" [1*SP string] / "?" [string] terms = and-expr *("or" and-expr) and-expr = not-expr *("and" not-expr) not-expr = ["not"] (term / ( "(" terms ")" )) term = generalterm / specificterm / shorthandle / combinedterm generalterm = string *(";" localcnstrnt) specificterm = specificname "=" string *(";" localcnstrnt) specificname = "handle" / "value" shorthandle = "!" string *(";" localcnstrnt) Deutsch, et al Standards Track [Page 38] RFC 1835 Architecture of the WHOIS++ service August 1995 combinedterm = string "=" string *(";" localcnstrnt) globalcnstrnts = globalcnstrnt *(";" globalcnstrnt) globalcnstrnt = localcnstrnt / "format" "=" format / "maxfull" "=" 1*digit / "maxhits" "=" 1*digit / opt-globalcnst opt-globalcnst = "hold" / "authenticate" "=" auth-method / "name" "=" string / "password" "=" string / "language" "=" language / "incharset" "=" characterset / "ignore" "=" string / "include" "=" stringDeutsch, et al [Page 41] Internet-Draft Architecture of the WHOIS++ service 25 January 1995format = "full" / "abridged" / "handle" / "summary" /"servers-to-ask""server-to-ask" language = <Thetwo-letterlanguage code defined inISO 639-1988 can be used as language constraint. In these the case of the letters are insignificant. Other language codes shall be interpreted according to the Internet standard for language codes in RFC 822/MIME messages, if and when such a standard is adopted>RFC1766 [ALVE95]> characterset = "us-ascii" / "iso-8859-1" / "iso-8859-2" / "iso-8859-3" / "iso-8859-4" / "iso-8859-5" / "iso-8859-6" / "iso-8859-7" / "iso-8859-8" / "iso-8859-9" / "iso-8859-10" / "utf-8" / charset-value charset-value = 1*char localcnstrnt = "search" "=" searchvalue / "case" "=" casevalue searchvalue = "exact" / "substring" / "regex" / "fuzzy" / "lstring" casevalue = "ignore" / "consider" auth-method = "password" string = 0*char char = "\" specialchar / <Characters 0-255 (decimal) except specialchar> Deutsch, et al Standards Track [Page 39] RFC 1835 Architecture of the WHOIS++ service August 1995 specialchar = " " / <tab> / "=" / "," / ":" / ";" / "\" / "*" / "." / "(" / ")" / "[" / "]" / "^" / "$" / "!" / "?" digit = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" NL = <CR LF (decimal 13 10)> NOTE: Significant blanks must be escaped. The followingchar- acters,characters, when significant to the query, may be preceded and/or followed by a single blank: : ; , ( ) = !Deutsch, et al [Page 42] Internet-Draft Architecture of the WHOIS++ service 25 January 1995Appendix G - Description of Regular expressions The regular expressions described in this section is the same as used in many other applications and operating systems. It is though very simple and does not include logical operators AND and OR. Searches using regular expressions are always using substring matching except when the regular expression contains thechar- acterscharacters '^' or '$'. Character Function --------- -------- <any except those listed in this table> Matches itself . Matches any character a* Matches zero or more 'a' [ab] Matches 'a' or 'b' [a-c] Matches 'a', 'b' or 'c' ^ Matches beginning of a token $ Matches end of a token Deutsch, et al Standards Track [Page 40] RFC 1835 Architecture of the WHOIS++ service August 1995 Examples --------- String Matches Matches not ------- ------- ----------- hello xhelloy heello h.llo hello helio h.*o hello helloa h[a-f]llo hello hgllo ^he.* hello ehello .*lo$ hello helloo Deutsch, et al Standards Track [Page43] Internet-Draft Architecture of the WHOIS++ service 25 January 1995 References [HARR85] Harrenstein K., Stahl M., Feinler E., NICNAME/WHOIS, RFC954, SRI, October 1985 [IAFA] Internet Anonymous FTP Archives Working Group (now closed). [IAFA1] Emtage A., and Deutsch P.. IAFA (Internet Anonymous FTP Archives) (not yet issued, pending some editing...) [IIIR] Weider C., and Deutsch P., A vision of an integrated internet information service, Internet Draft, October, 1993. < URL:ftp://nic.merit.edu/documents/ internet-drafts/draft-ietf-iiir-vision-02.txt > [NIR] Network Information Retrieval Working Group. [POST82] Postel J., Simple Mail Transfer Protocol, RFC 821, ISI, August 1982. Expires: 25 July 95 Deutsch, et al [Page 44]41] ----