📄 rfc2167.txt
字号:
# Change the active display format.
C -display dump
S %ok
3.3.4 forward
Description
The "-forward" directive instructs the server to follow all the
referrals and return the results to the client. This directive can be
used to run an RWhois server as a proxy server. The default value
must be "off". When the value is set to "on", the server must not
return referrals.
ABNF
forward-dir = "-forward" space on-off crlf
forward-response = response
Errors
338 Invalid directive syntax
400 Directive not available
401 Not authorized for directive
Examples
C -forward on
S %ok
C -forward off
S %ok
3.3.5 holdconnect
Description
Normally, the server closes the connection after each query. This
behavior is controlled by the holdconnect state, which can be changed
with the "-holdconnect" directive. When the holdconnect state is set
to "off", the server must close the connection after a query; when it
is set to "on", the server must not close the connection after a
query. By default, the holdconnect state must be set to "off" for
each connection.
Williamson, et. al. Informational [Page 25]
RFC 2167 RWhois Protocol June 1997
ABNF
holdconnect-dir = "-holdconnect" space on-off crlf
holdconnect-response = response
Errors
338 Invalid directive syntax
400 Directive not available
401 Not authorized for directive
Examples
C -holdconnect on
S %ok
C -holdconnect off
S %ok
3.3.6 limit
Description
When returning a query result, the server should limit the number of
objects returned to the client. The "-limit" directive changes this
limit. The default and maximum limit is server-dependent. The client
can get the current limit by using the "-status" directive (see
Section 3.3.13).
ABNF
limit-dir = "-limit" space 1*digit crlf
limit-response = response
Errors
331 Invalid limit
338 Invalid directive syntax
400 Directive not available
401 Not authorized for directive
Examples
C -limit 100
S %ok
Williamson, et. al. Informational [Page 26]
RFC 2167 RWhois Protocol June 1997
3.3.7 notify
Description
The "-notify" directive performs several functions.
* If the server returns a referral that results in an error, the
client can report the bad referral to the server using the
"badref" option.
* When the client follows referrals and goes through the same
referral twice, that referral is a recursive referral and causes
a referral loop. The client can report the recursive referral to
the server using the "recurref" option.
* When the data in an authority area changes, a master server can
use the "update" option to notify its slave servers to update
the data.
* The "inssec" option allows an RWhois server to register itself
as a slave server for an authority area with a master server.
The master server may reject the request on the basis of its
registration policy.
* The "delsec" option allows a slave server to cancel its
registration with the master server.
ABNF
notify-dir = "-notify" space "badref" space referral-query crlf
/ "-notify" space "recurref" space referral-query crlf
/ "-notify" space "update" space host-port ":" authority-area crlf
/ "-notify" space "inssec" space host-port ":"
authority-area crlf
/ "-notify" space "delsec" space host-port ":"
authority-area crlf
referral-query = referral-url space [class-name space] query
notify-response = response
See Section 3.4 for the definitions of referral-url and query.
Errors
338 Invalid directive syntax
340 Invalid authority area
342 Invalid host/port
400 Directive not available
401 Not authorized for directive
Williamson, et. al. Informational [Page 27]
RFC 2167 RWhois Protocol June 1997
Examples
# The client reports a bad referral to rwhois.foobar.com to the
# server.
C -notify badref rwhois://rwhois.foobar.com:4321/auth-area=foobar.com
domain foobar.com
S %ok
# The client reports a recursive referral to rwhois.foobar.com to the
# server.
C -notify recurref rwhois://rwhois.foobar.com:4321/auth-area=
foobar.com contact Last-Name="Beeblebrox"
S %ok
# The master server for the foobar.com authority area notifies its
# slave servers to update the data.
C -notify update master.foobar.com:4321:foobar.com
S %ok
# The server rwhois2.foobar.com registers as a slave server for the
# foobar.com authority area.
C -notify inssec rwhois2.foobar.com:4321:foobar.com
S %ok
# The server rwhois2.foobar.com cancels its registration as a slave
# server for the foobar.com authority area.
C -notify delsec rwhois2.foobar.com:4321:foobar.com
S %ok
3.3.8 quit
Description
The "-quit" directive can be used by the client to close the
connection. Before the server closes the connection, it must respond
with "%ok".
ABNF
quit-dir = "-quit" crlf
quit-response = response
Errors
No errors.
Williamson, et. al. Informational [Page 28]
RFC 2167 RWhois Protocol June 1997
Examples
C -quit
S %ok
3.3.9 register
Description
The "-register" directive can be used by the client to add, modify,
or delete objects in the server's database. The client must wait to
send the registration data until the "%ok" response is received from
the server. This directive has the following options.
* The "add" option indicates that the object being sent should be
added to the server's database.
* The "mod" option indicates that the object being sent is a
modification of an object that already resides on the server's
database. During a modify operation, the "_NEW_" tag is used to
delineate the end of the original (unmodified) object and the
beginning of the replacement object. That is, the identifying
characteristics of the original object are sent first, then the
"_NEW_" separator is sent, and then the entire replacement
object is sent.
The "del" option indicates that the object being sent should be
deleted from the server's database.
After a register operation (add, modify, or delete an object) in an
authority area, the server should update the "Serial-Number" variable
in the SOA information for the authority area. This is useful for
data replication because a slave server checks the "Serial-Number"
variable to detect a data change at the master server (see Section
3.6.2).
ABNF
register-dir = register-on space "add" space maintainer-id crlf
register-add register-off
/ register-on space "mod" space maintainer-id crlf
register-mod register-off
/ register-on space "del" space maintainer-id crlf
register-del register-off
register-on = "-register" space "on"
register-off = "-register" space "off" crlf
register-add = 1*(register-line crlf)
register-mod = 1*(register-line crlf) "_NEW_" crlf
1*(register-line crlf)
register-del = 1*(register-line crlf)
Williamson, et. al. Informational [Page 29]
RFC 2167 RWhois Protocol June 1997
maintainer-id = email
register-line = attribute-name ":" attribute-value
register-on-response = response
register-off-response = "%register" space "ID" ":" object-id crlf
response
/ "%register" space "Updated" ":" time-stamp crlf response
/ response
* The server must return the register-on-response for the
"-register on" directive and the register-off-response for the
"-register off" directive.
* The maintainer-id identifies, for maintenance purposes, the
sender of registration information. The server should not use it
to authenticate the sender.
* For the "add" option, the client must send all the required
attributes for the object, including the Class-Name and Auth-
Area attributes. However, the client must not send the ID and
Updated attributes. These attributes are assigned by the server
and returned in the response.
* For the "mod" option, the client must send the identifying
information for the object to be modified, followed by the
"_NEW_" separator and the entire replacement object. The
identifying information must contain the ID and Updated
attributes; it may contain other attributes, but the server may
not check them. The ID, Auth-Area, and Class-Name attributes
must match in both the original object data and the replacement
object. The original object data is sent before the replacement
object to enable the server to lock the record in the database.
* For the "del" option, the client must send the identifying
information for the object to be deleted. The identifying
information must contain the ID and Updated attributes; it may
contain other attributes, but the server may not check them.
Errors
120 Registration deferred
320 Invalid attribute
321 Invalid attribute syntax
322 Required attribute missing
323 Object reference not found
324 Primary key not unique
325 Failed to update outdated object
336 Object not found
338 Invalid directive syntax
340 Invalid authority area
341 Invalid class
400 Directive not available
401 Not authorized for directive
Williamson, et. al. Informational [Page 30]
RFC 2167 RWhois Protocol June 19
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -