⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc2167.txt

📁 RFC 的详细文档!
💻 TXT
📖 第 1 页 / 共 5 页
字号:
RFC 2167                    RWhois Protocol                    June 1997


   dns-char = alpha / digit / "-"
   email-char = <see [RFC 822]>
   space = " "
   tab = <ASCII TAB (tab)>
   lf = <ASCII LF (linefeed)>
   cr = <ASCII CR (carriage return)>
   crlf = cr lf

   Grammar

   year = 4digit
   month = 2digit
   day = 2digit
   hour = 2digit
   minute = 2digit
   second = 2digit
   milli-second = 3digit
   host-name = dns-char *(dns-char / ".")
   ip-address = 1*3digit "." 1*3digit "." 1*3digit "." 1*3digit
   email = 1*email-char "@" host-name
   authority-area = (dns-char / ".") *(dns-char / "." / "/")
   object-id = 1*id-char "." authority-area
   host-port = (host-name / ip-address) ":" 1*5digit
   class-name = 1*id-char
   attribute-name = 1*id-char
   attribute-value = 1*any-char
   time-stamp = year month day hour minute second milli-second
   on-off = "on" / "off"

   Note that the time-stamp must be in the Greenwich Mean Time (GMT)
   time zone.  Also note that since in the above any-char is 1..255
   ASCII that the RWhois protocol is an 8 bit protocol.

   Response

   The general response for every directive and query is either "%ok" or
   "%error". In addition, a "%info" response may be sent.

   response = ok-response crlf / error-response crlf / info-response
   ok-response = "%ok"
   error-response = "%error" space error-code space error-text
   error-code = 3digit
   error-text = 1*any-char
   info-response = "%info" space "on" crlf *(*any-char crlf) "%info"
           space "off" crlf






Williamson, et. al.          Informational                     [Page 19]

RFC 2167                    RWhois Protocol                    June 1997


   Banner

   The server must send a banner to the client when the connection is
   opened.  The banner contains the version(s) of the protocol the
   server supports and a capability ID of encoded bit flags that
   indicates which directives are implemented. If the server supports
   more than one version of the protocol, the lowest-numbered version
   must be specified first. The bits in extra-id are reserved for future
   use. The end of the banner should contain a free-form string
   indicating the name of the server implementation. A server must
   support at least one version of the protocol, and may accept more
   versions for compatibility reasons.

   rwhois-banner = "%rwhois" space version-list space host-name
         [space implementation] crlf
   version-list = version *("," version)
   version = version-number [":" capability-id]
           / "V-1.5" ":" capability-id
   version-number = "V-" 1*digit "." 1*digit
   capability-id = response-id ":" extra-id
   response-id = 6hex-digit
   extra-id = 2hex-digit
   implementation = 1*any-char

   Protocol

   The entire RWhois protocol can be defined as a series of directives,
   responses, queries, and results.

   rwhois-protocol = client-sends / server-returns
   client-sends = *(directives / rwhois-query)
   server-returns = *(responses / rwhois-query-result)

3.2 Required Directives

   The server must implement the following directives.















Williamson, et. al.          Informational                     [Page 20]

RFC 2167                    RWhois Protocol                    June 1997


3.2.1 rwhois

   Description

   The "-rwhois" directive may be issued by the client at the start of
   every session . It tells the server which version of the protocol the
   client can handle. The server must respond with a banner containing
   the protocol version and directives it implements. This banner is the
   same banner that is sent by the server when the connection is opened,
   except that the server must indicate only one version number. The
   banner issued when opening a connection may contain more than one
   version number. The directive flags are encoded into three octets,
   which are described in Appendix D.

   ABNF

   rwhois-dir = "-rwhois" space version-number [space implementation]
                crlf
   rwhois-response = "%rwhois" space version space host-name
           [space implementation] crlf

   Errors

   300 Not compatible with version
   338 Invalid directive syntax

   Examples

   # When a connection is opened, the server issues the banner.
   S %rwhois V-1.0,V-1.5:00ffff:00 rs.internic.net (NSI Server 1.5.4)
   # The client sends the rwhois directive.
   C -rwhois V-1.5 NSI Client 1.2.3
   S %rwhois V-1.5:00ffff:00 rs.internic.net (NSI Server 1.5.4)
   S %ok

3.3 Optional Directives

   The server should implement the following directives.













Williamson, et. al.          Informational                     [Page 21]

RFC 2167                    RWhois Protocol                    June 1997


3.3.1 class

   Description

   The "-class" directive can be used by the client to get the meta-
   information for one or more classes in an authority area. The
   response must contain the description and version number of each
   specified class and may be expanded in the future with additional
   attributes. When no class name is given, the server must return the
   meta-information for all the classes in the authority area. Every
   class record must end with an empty "%class" line.

   ABNF

   class-dir = "-class" space authority-area *(space class-name) crlf
   class-response = *class-record response
   class-record = *class-line "%class" crlf
   class-line = "%class" space class-name ":" "description" ":"
                1*any-char crlf
      / "%class" space class-name ":" "version" ":" time-stamp crlf
      / "%class" space class-name ":" meta-field ":" meta-value crlf
   meta-field = 1*id-char
   meta-value = 1*any-char

   The following fields are required.

    meta-field   meta-value  Description

    description  1*any-char  Class description.
                           Time/date stamp indicating version of class,

    version      time-stamp  must be updated after class definition is
                             changed.

   Errors

   338 Invalid directive syntax
   340 Invalid authority area
   341 Invalid class
   400 Directive not available
   401 Not authorized for directive

   Examples

   C -class rwhois.net domain host
   S %class domain:description:Domain information
   S %class domain:version:19970103101232000
   S %class



Williamson, et. al.          Informational                     [Page 22]

RFC 2167                    RWhois Protocol                    June 1997


   S %class host:description:Host information
   S %class host:version:19970214213241000
   S %class
   S %ok

3.3.2 directive

   Description

   The "-directive" directive can be used by the client to get
   information about the directives that the server supports. The
   response must contain the name and description of each specified
   directive and may be expanded in the future with additional
   attributes. When no directive name is given, the server must return
   information about all the directives. Every directive record must end
   with an empty "%directive" line.

   ABNF

   directive-dir = "-directive" *(space directive-name) crlf
   directive-name = 1*id-char
   directive-response = *directive-record response
   directive-record = "%directive" space "directive" ":" directive-name
                      crlf *directive-line "%directive" crlf
   directive-line = "%directive" space "description" ":" 1*any-char crlf
           / "%directive" space attribute-name ":" attribute-value crlf

   Errors

   338 Invalid directive syntax
   400 Directive not available
   401 Not authorized for directive

   Examples

   Without parameters:

   C -directive
   S %directive directive:rwhois
   S %directive description:RWhois directive
   S %directive
   S %directive directive:quit
   S %directive description:Quit connection
   S %directive
   S %ok






Williamson, et. al.          Informational                     [Page 23]

RFC 2167                    RWhois Protocol                    June 1997


   With parameters:

   C -directive quit
   S %directive directive:quit
   S %directive description:Quit connection
   S %directive
   S %ok

3.3.3 display

   Description

   By default, the server uses the dump format for the output of a query
   result. The output format can be changed with the "-display"
   directive.  When no parameter is given, the server must list all the
   display formats it supports. Every display record must end with an
   empty "%display" line.

   Currently, only the dump format is standard and must be supported by
   the server. Other output formats may be added in the future. See
   Section 3.4 for the definition of the dump format.

   ABNF

   display-dir = "-display" crlf
       / "-display" space display-name crlf
   display-name = 1*id-char
   display-response = *(display-record) response
   display-record = "%display" space "name" ":" display-name crlf
   *display-line "%display" crlf
   display-line = "%display" space attribute-name ":"
                  attribute-value crlf

   Errors

   338 Invalid directive syntax
   400 Directive not available
   401 Not authorized for directive
   436 Invalid display format

   Examples

   # Get the available display formats.
   C -display
   S %display name:dump
   S %display
   S %ok




Williamson, et. al.          Informational                     [Page 24]

RFC 2167                    RWhois Protocol                    June 1997

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -