home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc2165 < prev    next >
Text File  |  1997-06-20  |  170KB  |  4,036 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                       J. Veizades
  8. Request for Comments: 2165                                @Home Network
  9. Category: Standards Track                                    E. Guttman
  10.                                                              C. Perkins
  11.                                                        Sun Microsystems
  12.                                                               S. Kaplan
  13.                                                               June 1997
  14.  
  15.                        Service Location Protocol
  16.  
  17. Status of This Memo
  18.  
  19.    This document specifies an Internet standards track protocol for the
  20.    Internet community, and requests discussion and suggestions for
  21.    improvements.  Please refer to the current edition of the "Internet
  22.    Official Protocol Standards" (STD 1) for the standardization state
  23.    and status of this protocol.  Distribution of this memo is unlimited.
  24.  
  25. Abstract
  26.  
  27.    The Service Location Protocol provides a scalable framework for the
  28.    discovery and selection of network services.  Using this protocol,
  29.    computers using the Internet no longer need so much static
  30.    configuration of network services for network based applications.
  31.    This is especially important as computers become more portable, and
  32.    users less tolerant or able to fulfill the demands of network system
  33.    administration.
  34.  
  35. Table of Contents
  36.  
  37.  1. Introduction                                                       3
  38.  2. Terminology                                                        3
  39.      2.1. Notation Conventions  . . . . . . . . . . . . . . . . . .    5
  40.      2.2. Service Information and Predicate Representation  . . . .    5
  41.      2.3. Specification Language  . . . . . . . . . . . . . . . . .    6
  42.  3. Protocol Overview                                                  6
  43.      3.1. Protocol Transactions . . . . . . . . . . . . . . . . . .    7
  44.      3.2. Schemes . . . . . . . . . . . . . . . . . . . . . . . . .    8
  45.            3.2.1. The "service:" URL scheme . . . . . . . . . . . .    9
  46.      3.3. Standard Attribute Definitions  . . . . . . . . . . . . .    9
  47.      3.4. Naming Authority  . . . . . . . . . . . . . . . . . . . .   10
  48.      3.5. Interpretation of Service Location Replies  . . . . . . .   10
  49.      3.6. Use of TCP, UDP and Multicast in Service Location . . . .   10
  50.            3.6.1. Multicast vs.  Broadcast  . . . . . . . . . . . .   11
  51.            3.6.2. Service-Specific Multicast Address  . . . . . . .   11
  52.      3.7. Service Location Scaling, and Multicast Operating Modes .   12
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Veizades, et. al.           Standards Track                     [Page 1]
  59.  
  60. RFC 2165               Service Location Protocol               June 1997
  61.  
  62.  
  63.  4. Service Location General Message Format                           14
  64.      4.1. Use of Transaction IDs (XIDs) . . . . . . . . . . . . . .   15
  65.      4.2. URL Entries . . . . . . . . . . . . . . . . . . . . . . .   16
  66.      4.3. Authentication Blocks . . . . . . . . . . . . . . . . . .   17
  67.      4.4. URL Entry Lifetime  . . . . . . . . . . . . . . . . . . .   19
  68.  5. Service Request Message Format                                    19
  69.      5.1. Service Request Usage . . . . . . . . . . . . . . . . . .   22
  70.      5.2. Directory Agent Discovery Request . . . . . . . . . . . .   23
  71.      5.3. Explanation of Terms of Predicate Grammar . . . . . . . .   24
  72.      5.4. Service Request Predicate Grammar . . . . . . . . . . . .   26
  73.      5.5. String Matching for Requests  . . . . . . . . . . . . . .   27
  74.  6. Service Reply Message Format                                      28
  75.  7. Service Type Request Message Format                               29
  76.  8. Service Type Reply Message Format                                 31
  77.  9. Service Registration Message Format                               32
  78. 10. Service Acknowledgement Message Format                            35
  79. 11. Service Deregister Message Format                                 37
  80. 12. Attribute Request Message Format                                  38
  81. 13. Attribute Reply Message Format                                    40
  82. 14. Directory Agent Advertisement Message Format                      42
  83. 15. Directory Agents                                                  43
  84.     15.1. Introduction  . . . . . . . . . . . . . . . . . . . . . .   43
  85.     15.2. Finding Directory Agents  . . . . . . . . . . . . . . . .   43
  86. 16. Scope Discovery and Use                                           45
  87.     16.1. Protected Scopes  . . . . . . . . . . . . . . . . . . . .   46
  88. 17. Language and Character Encoding Issues                            47
  89.     17.1. Character Encoding and String Issues  . . . . . . . . . .   48
  90.           17.1.1. Substitution of Character Escape Sequences  . . .   49
  91.     17.2. Language-Independent Strings  . . . . . . . . . . . . . .   49
  92. 18. Service Location Transactions                                     50
  93.     18.1. Service Location Connections  . . . . . . . . . . . . . .   50
  94.     18.2. No Synchronous Assumption . . . . . . . . . . . . . . . .   51
  95.     18.3. Idempotency . . . . . . . . . . . . . . . . . . . . . . .   51
  96. 19. Security Considerations                                           51
  97. 20. String Formats used with Service Location Messages                52
  98.     20.1. Previous Responders' Address Specification  . . . . . . .   53
  99.     20.2. Formal Definition of the "service:" Scheme  . . . . . . .   53
  100.           20.2.1. Service Type String . . . . . . . . . . . . . . .   54
  101.     20.3. Attribute Information . . . . . . . . . . . . . . . . . .   54
  102.     20.4. Address Specification in Service Location . . . . . . . .   55
  103.     20.5. Attribute Value encoding rules  . . . . . . . . . . . . .   55
  104. 21. Protocol Requirements                                             56
  105.     21.1. User Agent Requirements . . . . . . . . . . . . . . . . .   56
  106.     21.2. Service Agent Requirements  . . . . . . . . . . . . . . .   58
  107.     21.3. Directory Agent Requirements  . . . . . . . . . . . . . .   59
  108. 22. Configurable Parameters and Default Values                        61
  109.     22.1. Service Agent:  Use Predefined Directory Agent(s) . . . .   62
  110.     22.2. Time Out Intervals  . . . . . . . . . . . . . . . . . . .   63
  111.  
  112.  
  113.  
  114. Veizades, et. al.           Standards Track                     [Page 2]
  115.  
  116. RFC 2165               Service Location Protocol               June 1997
  117.  
  118.  
  119. 23. Non-configurable Parameters                                       63
  120. 24. Acknowledgments                                                   64
  121.  A. Appendix:  Technical contents of ISO 639:1988 (E/F): "Code for
  122.    the representation of names of languages"                          65
  123.  B. SLP Certificates                                                  66
  124.  C. Example of deploying SLP security using MD5 and RSA               68
  125.  D. Example of use of SLP Certificates by mobile nodes                68
  126.  E. Appendix:  For Further Reading                                    69
  127.  
  128. 1. Introduction
  129.  
  130.    Traditionally, users find services by using the name of a network
  131.    host (a human readable text string) which is an alias for a network
  132.    address.  The Service Location Protocol eliminates the need for a
  133.    user to know the name of a network host supporting a service.
  134.    Rather, the user names the service and supplies a set of attributes
  135.    which describe the service.  The Service Location Protocol allows the
  136.    user to bind this description to the network address of the service.
  137.  
  138.    Service Location provides a dynamic configuration mechanism for
  139.    applications in local area networks.  It is not a global resolution
  140.    system for the entire Internet; rather it is intended to serve
  141.    enterprise networks with shared services.  Applications are modeled
  142.    as clients that need to find servers attached to the enterprise
  143.    network at a possibly distant location.  For cases where there are
  144.    many different clients and/or services available, the protocol is
  145.    adapted to make use of nearby Directory Agents that offer a
  146.    centralized repository for advertised services.
  147.  
  148. 2. Terminology
  149.  
  150.       User Agent (UA)
  151.                 A process working on the user's behalf to acquire
  152.                 service attributes and configuration.  The User Agent
  153.                 retrieves service information from the Service Agents or
  154.                 Directory Agents.
  155.  
  156.       Service Agent (SA)
  157.                 A process working on the behalf of one or more services
  158.                 to advertise service attributes and configuration.
  159.  
  160.       Service Information
  161.                 A collection of attributes and configuration information
  162.                 associated with a single service.  The Service Agents
  163.                 advertise service information for a collection of
  164.                 service instances.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Veizades, et. al.           Standards Track                     [Page 3]
  171.  
  172. RFC 2165               Service Location Protocol               June 1997
  173.  
  174.  
  175.       Service   The service is a process or system providing a facility
  176.                 to the network.  The service itself is accessed using a
  177.                 communication mechanism external to the the Service
  178.                 Location Protocol.
  179.  
  180.       Directory Agent (DA)
  181.                 A process which collects information from Service Agents
  182.                 to provide a single repository of service information in
  183.                 order to centralize it for efficient access by User
  184.                 Agents.  There can only be one DA present per given
  185.                 host.
  186.  
  187.       Service Type
  188.                 Each type of service has a unique Service Type string.
  189.                 The Service Type defines a template, called a "service
  190.                 scheme", including expected attributes, values and
  191.                 protocol behavior.
  192.  
  193.       Naming Authority
  194.                 The agency or group which catalogues given Service Types
  195.                 and Attributes.  The default Naming Authority is IANA,
  196.                 the Internet Assigned Numbers Authority.
  197.  
  198.       Keyword
  199.                 A string describing a characteristic of a service.
  200.  
  201.       Attribute
  202.                 A (class, value-list) pair of strings describing a
  203.                 characteristic of a service.  The value string may be
  204.                 interpreted as a boolean, integer or opaque value if it
  205.                 takes specific forms (see section 20.5).
  206.  
  207.       Predicate
  208.                 A boolean expression of attributes, relations and
  209.                 logical operators.  The predicate is used to find
  210.                 services which satisfy particular requirements.  See
  211.                 section 5.3.
  212.  
  213.       Alphanumeric
  214.                 A character within the range 'a' to 'z', 'A' to 'Z', or
  215.  
  216.       Scope     A collection of services that make up a logical group.
  217.                 See sections 3.7 and 16.
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Veizades, et. al.           Standards Track                     [Page 4]
  227.  
  228. RFC 2165               Service Location Protocol               June 1997
  229.  
  230.  
  231.       Site Network
  232.                 All the hosts accessible within the Agent's multicast
  233.                 radius, which defaults to a value appropriate for
  234.                 reaching all hosts within a site (see section 22).  If
  235.                 the site does not support multicast, the agent's site
  236.                 network is restricted to a single subnet.
  237.  
  238.       URL       A Universal Resource Locator - see [6].
  239.  
  240.       Address Specification
  241.                 This is the network layer protocol dependent mechanism
  242.                 for specifying an Agent.  For Internet systems this is
  243.                 part of a URL.
  244.  
  245. 2.1. Notation Conventions
  246.  
  247.       CAPS   Strings which appear in all capital letters are protocol
  248.              literal.  All string comparison is case insensitive,
  249.              however, (see section 5.5).  Some strings are quoted in
  250.              this document to indicate they should be used literally.
  251.              Single characters inside apostrophes are included
  252.              literally.
  253.  
  254.       <>     Values set off in this manner are fully described in
  255.              section 20.  In general, all definitions of items in
  256.              messages are described in section 20 or immediately
  257.              following their first use.
  258.  
  259.       |  |
  260.       \  \   Message layouts with this notation indicate a variable
  261.       |  |   length field.
  262.  
  263. 2.2. Service Information and Predicate Representation
  264.  
  265.    Service information is represented in a text format.  The goal is
  266.    that the format be human readable and transmissible via email.  The
  267.    location of network services is encoded as a Universal Resource
  268.    Locator (URL) which is human readable.  Only the datagram headers are
  269.    encoded in a form which is not human readable.  Strings used in the
  270.    Service Location Protocol are NOT null-terminated.
  271.  
  272.    Predicates are expressed in a simple boolean notation using keywords,
  273.    attributes, and logical connectives, as described in Section 5.4.
  274.  
  275.    The logical connectives and subexpressions are presented in prefix-
  276.    order, so that the connective comes first and the expressions it
  277.    operates on follow afterwards.
  278.  
  279.  
  280.  
  281.  
  282. Veizades, et. al.           Standards Track                     [Page 5]
  283.  
  284. RFC 2165               Service Location Protocol               June 1997
  285.  
  286.  
  287. 2.3. Specification Language
  288.  
  289.    In this document, several words are used to signify the requirements
  290.    of the specification [8].  These words are often capitalized.
  291.  
  292.       MUST       This word, or the adjective "required", means that
  293.                  the definition is an absolute requirement of the
  294.                  specification.
  295.  
  296.       MUST NOT   This phrase means that the definition is an absolute
  297.                  prohibition of the specification.
  298.  
  299.       SHOULD     This word, or the adjective "recommended", means
  300.                  that, in some circumstances, valid reasons may exist to
  301.                  ignore this item, but the full implications must be
  302.                  understood and carefully weighed before choosing a
  303.                  different course.  Unexpected results may result
  304.                  otherwise.
  305.  
  306.       MAY        This word, or the adjective "optional", means that this
  307.                  item is one of an allowed set of alternatives.  An
  308.                  implementation which does not include this option MUST
  309.                  be prepared to interoperate with another implementation
  310.                  which does include the option.
  311.  
  312.       silently discard
  313.                  The implementation discards the datagram without
  314.                  further processing, and without indicating an error to
  315.                  the sender.  The implementation SHOULD provide the
  316.                  capability of logging the error, including the contents
  317.                  of the discarded datagram, and SHOULD record the event
  318.                  in a statistics counter.
  319.  
  320. 3. Protocol Overview
  321.  
  322.    The basic operation in Service Location is that a client attempts to
  323.    discover the location of a Service.  In smaller installations, each
  324.    service will be configured to respond individually to each client.
  325.    In larger installations, services will register their services with
  326.    one or more Directory Agents, and clients will contact the Directory
  327.    Agent to fulfill requests for Service Location information.  Clients
  328.    may discover the whereabouts of a Directory Agent by
  329.    preconfiguration, DHCP [2, 11], or by issuing queries to the
  330.    Directory Agent Discovery multicast address.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Veizades, et. al.           Standards Track                     [Page 6]
  339.  
  340. RFC 2165               Service Location Protocol               June 1997
  341.  
  342.  
  343. 3.1. Protocol Transactions
  344.  
  345.    The diagram below illustrates the relationships described below:
  346.  
  347.       +---------------+   we want this info:     +-----------+
  348.       |  Application  | - - - - - - - - - - - -> |  Service  |
  349.       +---------------+                          +-----------+
  350.            /|\                                      |     |
  351.             |                         +-------------+     |
  352.             |                         |                   |
  353.            \|/                       \|/                 \|/
  354.       +---------------+          +-----------+      +----------------+
  355.       |   User Agent  |<-------->|  Service  |      |    Service     |
  356.       +---------------+          |   Agent   |      | Agent which    |
  357.             |                    +-----------+      | does not reply |
  358.             |                         |             | to UA requests |
  359.             |                        \|/            +----------------+
  360.             |                   +-------------+           |
  361.             +------------------>|  Directory  |<----------+
  362.                                 |    Agent    |
  363.                                 +-------------+      ___________
  364.                                      /|\            / Many other\
  365.                                       +------------>|   SA's    |
  366.                                                     \___________/
  367.  
  368.    The following describes the operations a User Agent would employ to
  369.    find services on the site's network.  The User Agent needs no
  370.    configuration to begin network interaction.  The User Agent can
  371.    acquire information to construct predicates which describe the
  372.    services that match the user's needs.  The User Agent may build on
  373.    the information received in earlier network requests to find the
  374.    Service Agents advertising service information.
  375.  
  376.    A User Agent will operate two ways:  If the User Agent has already
  377.    obtained the location of a Directory Agent, the User Agent will
  378.    unicast a request to it in order to resolve a particular request.
  379.    The Directory Agent will unicast a reply to the User Agent.  The User
  380.    Agent will retry a request to a Directory Agent until it gets a
  381.    reply, so if the Directory Agent cannot service the request (say it
  382.    has no information) it must return an response with zero values,
  383.    possibly with an error code set.
  384.  
  385.    If the User Agent does not have knowledge of a Directory Agent or if
  386.    there are no Directory Agents available on the site network, a second
  387.    mode of discovery may be used.  The User Agent multicasts a request
  388.    to the service-specific multicast address, to which the service it
  389.    wishes to locate will respond.  All the Service Agents which are
  390.    listening to this multicast address will respond, provided they can
  391.  
  392.  
  393.  
  394. Veizades, et. al.           Standards Track                     [Page 7]
  395.  
  396. RFC 2165               Service Location Protocol               June 1997
  397.  
  398.  
  399.    satisfy the User Agent's request.  A similar mechanism is used for
  400.    Directory Agent discovery; see section 5.2.  Service Agents which
  401.    have no information for the User Agent MUST NOT respond.
  402.  
  403.    When a User Agent wishes to obtain an enumeration of ALL services
  404.    which satisfy the query, a retransmission/convergence algorithm is
  405.    used.  The User Agent resends the request, together with a list of
  406.    previous responders.  Only those Service Agents which are not on the
  407.    list respond.  Once there are no new responses to the request the
  408.    accumulation of responses is deemed complete.  Depending on the
  409.    length of the request, around 60 previous responders may be listed in
  410.    a single datagram.  If there are more responders than this, the
  411.    scaling mechanisms described in section 3.7 should be used.
  412.  
  413.    While the multicast/convergence model may be important for
  414.    discovering services (such as Directory Agents) it is the exception
  415.    rather than the rule.  Once a User Agent knows of the location of a
  416.    Directory Agent, it will use a unicast request/response transaction.
  417.  
  418.    The Service Agent SHOULD listen for multicast requests on the
  419.    service-specific multicast address, and MUST register with an
  420.    available Directory Agent.  This Directory Agent will resolve
  421.    requests from User Agents which are unicasted using TCP or UDP. This
  422.    means that a Directory Agent must first be discovered, using DHCP,
  423.    the DA Discovery Multicast address, the multicast mechanism described
  424.    above, or manual configuration.  See section 5.2.
  425.  
  426.    A Service Agent which does not respond to multicast requests will not
  427.    be useful in the absence of Directory Agents.  Some Service Agents
  428.    may not include this functionality, if an especially lightweight
  429.    implementation is required.
  430.  
  431.    If the service is to become unavailable, it should be deregistered
  432.    with the Directory Agent.  The Directory Agent responds with an
  433.    acknowledgment to either a registration or deregistration.  Service
  434.    Registrations include a lifetime, and will eventually expire.
  435.    Service Registrations need to be refreshed by the Service Agent
  436.    before their Lifetime runs out.  If need be, Service Agents can
  437.    advertise signed URLs to prove that they are authorized to provide
  438.    the service.
  439.  
  440. 3.2. Schemes
  441.  
  442.    The Service Location Protocol, designed as a way for clients to
  443.    access resources on the network, is a natural application for
  444.    Universal Resource Locators (URLs).  It is intended that by re-using
  445.    URL specification and technology from the World Wide Web, clients and
  446.    servers will be more flexible and able to be written using already
  447.  
  448.  
  449.  
  450. Veizades, et. al.           Standards Track                     [Page 8]
  451.  
  452. RFC 2165               Service Location Protocol               June 1997
  453.  
  454.  
  455.    existing code.  Moreover, it is hoped that browsers will be written
  456.    to take advantage of the similarity in locator format, so that a
  457.    client can dynamically formulate requests for services that are
  458.    resolved differently depending upon the circumstances.
  459.  
  460. 3.2.1. The "service:"  URL scheme
  461.  
  462.    The service URL scheme is used by Service Location.  It is used to
  463.    specify a Service Location.  Many Service Types will be named by
  464.    including a scheme name after the "service:"  scheme name.  Service
  465.    Types are used by SAs to register and deregister Services with DAs.
  466.    It is also used by SAs and DAs to return Service Replies to UAs.  The
  467.    formal definition of the "service:" URL scheme is in section 20.2.
  468.    The format of the information which follows the "service:"  scheme
  469.    should as closely as possible follow the URL structure and semantics
  470.    as formalized by the IETF standardization process.
  471.  
  472.    Well known Service Types are registered with the IANA and templates
  473.    are available as RFCs.  Private Service Types may also be supported.
  474.  
  475. 3.3. Standard Attribute Definitions
  476.  
  477.    Service Types used with the Service Location Protocol must describe
  478.    the following:
  479.  
  480.          Service Type string of the service
  481.          Attributes and Keywords
  482.          Attribute Descriptions and interpretations
  483.  
  484.    Service Types not registered with IANA will use their own Naming
  485.    Authority string.  The registration process for new Service Types is
  486.    defined in [13].
  487.  
  488.    Services which advertise a particular Service Type must support the
  489.    complete set of standardized attributes.  They may support additional
  490.    attributes, beyond the standardized set.  Unrecognized attributes
  491.    MUST be ignored by User Agents.
  492.  
  493.    Service Type names which begin with "x-" are guaranteed not to
  494.    conflict with any officially registered Service Type names.  It is
  495.    suggested that this prefix be used for experimental or private
  496.    Service Type names.  Similarly, attribute names which begin with "x-"
  497.    are guaranteed not to be used for any officially registered attribute
  498.    names.
  499.  
  500.    A service of a given Service Type should accept the networking
  501.    protocol which is implied in its definition.  If a Service Type can
  502.    accept multiple protocols, configuration information SHOULD be
  503.  
  504.  
  505.  
  506. Veizades, et. al.           Standards Track                     [Page 9]
  507.  
  508. RFC 2165               Service Location Protocol               June 1997
  509.  
  510.  
  511.    included in the Service Type attribute information.  This
  512.    configuration information will enable an application to use the
  513.    results of a Service Request and Attribute Request to directly
  514.    connect to a service.
  515.  
  516.    See section 20.2.1 for the format of a Service Type String as used in
  517.    the Service Location Protocol.
  518.  
  519. 3.4. Naming Authority
  520.  
  521.    The Naming Authority of a service defines the meaning of the Service
  522.    Types and attributes registered with and provided by Service
  523.    Location.  The Naming Authority itself is a string which uniquely
  524.    identifies an organization.  If no string is provided IANA is the
  525.    default.  IANA stands for the Internet Assigned Numbers Authority.
  526.  
  527.    Naming Authorities may define Service Types which are experimental,
  528.    proprietary or for private use.  The procedure to use is to create a
  529.    'unique' Naming Authority string and then specify the Standard
  530.    Attribute Definitions as described above.  This Naming Authority will
  531.    accompany registration and queries, as described in sections 5 and 9.
  532.  
  533. 3.5. Interpretation of Service Location Replies
  534.  
  535.    Replies should be considered to be valid at the time of delivery.
  536.    The service may, however, fail or change between the time of the
  537.    reply and the moment an application seeks to make use of the service.
  538.    The application making use of Service Location MUST be prepared for
  539.    the possibility that the service information provided is either stale
  540.    or incomplete.  In the case where the service information provided
  541.    does not allow a User Agent to connect to a service as desired, the
  542.    Service Request and/or Attribute Request may be resubmitted.
  543.  
  544.    Service specific configuration information (such as which protocol to
  545.    use) should be included as attribute information in Service
  546.    Registrations.  These configuration attributes will be used by
  547.    applications which interpret the Service Location Reply.
  548.  
  549. 3.6. Use of TCP, UDP and Multicast in Service Location
  550.  
  551.    The Service Location Protocol requires the implementation of UDP
  552.    (connectionless) and TCP (connection oriented) transport protocols.
  553.    The latter is used for bulk transfer, only when necessary.
  554.    Connections are always initiated by an agent request or registration,
  555.    not by a replying Directory Agent.  Service Agents and User Agents
  556.    use ephemeral ports for transmitting information to the service
  557.    location port, which is 427.
  558.  
  559.  
  560.  
  561.  
  562. Veizades, et. al.           Standards Track                    [Page 10]
  563.  
  564. RFC 2165               Service Location Protocol               June 1997
  565.  
  566.  
  567.    The Service Location discovery mechanisms typically multicast
  568.    messages to as many enterprise networks as needed to establish
  569.    service availability.  The protocol will operate in a broadcast
  570.    environment with limitations detailed in section 3.6.1.
  571.  
  572. 3.6.1. Multicast vs.  Broadcast
  573.  
  574.    The Service Location Protocol was designed for use in networks where
  575.    DHCP is available, or multicast is supported at the network layer.
  576.    To support this protocol when only network layer broadcast is
  577.    supported, the following procedures may be followed.
  578.  
  579. 3.6.1.1. Single Subnet
  580.  
  581.    If a network is not connected to any other networks simple network
  582.    layer broadcasts will work in place of multicast.
  583.  
  584.    Service Agents SHOULD and Directory Agents MUST listen for broadcast
  585.    Service Location request messages to the Service Location port.  This
  586.    allows UAs which lack multicast capabilities to still make use of
  587.    Service Location on a single subnet.
  588.  
  589. 3.6.1.2. Multiple Subnets
  590.  
  591.    The Directory Agent provides a central clearing house of information
  592.    for User Agents.  If the network is designed so that a Directory
  593.    Agent address is statically configured with each User Agent and
  594.    Service Agent, the Directory Agent will act as a bridge for
  595.    information that resides on different subnets.  The Directory Agent
  596.    address can be dynamically configured with Agents using DHCP. The
  597.    address can also be determined by static configuration.
  598.  
  599.    As dynamic discovery is not feasible in a broadcast environment with
  600.    multiple subnets and manual configuration is difficult, deploying DAs
  601.    to serve enterprises with multiple subnets will require use of
  602.    multicast discovery with multiple hops (i.e., TTL > 1 in the IP
  603.    header).
  604.  
  605. 3.6.2. Service-Specific Multicast Address
  606.  
  607.    This mechanism is used so that the number of datagrams any one
  608.    service agent receives is minimized.  The Service Location General
  609.    Multicast Address MAY be used to query for any service, though one
  610.    SHOULD use the service-specific multicast address if it exists.
  611.  
  612.    If the site network does not support multicast then the query SHOULD
  613.    be broadcast to the Service Location port.  If, on the other hand,
  614.    the underlying hardware will not support the number of needed
  615.  
  616.  
  617.  
  618. Veizades, et. al.           Standards Track                    [Page 11]
  619.  
  620. RFC 2165               Service Location Protocol               June 1997
  621.  
  622.  
  623.    multicast addresses the Service Location General Multicast Address
  624.    MAY be used.  Service Agents MUST listen on this multicast address as
  625.    well as the service-specific multicast addresses for the service
  626.    types they advertise.
  627.  
  628.    Service-Specific Multicast Addresses are computed by calculating a
  629.    string hash on the Service Type string.  The Service Type string MUST
  630.    first be converted to an ASCII string from whatever character set it
  631.    is represented in, so the hash will have well-defined results.
  632.  
  633.    The string hash function is modified from a code fragment attributed
  634.    to Chris Torek:
  635.  
  636.         /*
  637.          *  SLPhash returns a hash value in the range 0-1023 for a
  638.          *  string of single-byte characters, of specified length.
  639.          */
  640.         unsigned long SLPhash (const char *pc, unsigned int length)
  641.             unsigned long h = 0;
  642.     while (length-- != 0) {
  643.                 h *= 33;
  644.                 h += *pc++;
  645.             }
  646.             return (0x3FF & h);  /* round to a range of 0-1023 */
  647.         }
  648.  
  649.    This value is added to the base range of Service Specific Discovery
  650.    Addresses, to be assigned by IANA. These will be 1024 contiguous
  651.    multicast addresses.
  652.  
  653. 3.7. Service Location Scaling, and Multicast Operating Modes
  654.  
  655.    In a very small network, with few nodes, no DA is required.  A user
  656.    agent can detect services by multicasting requests.  Service Agents
  657.    will then reply to them.  Further, Service Agents which respond to
  658.    user requests must be used to make service information available.
  659.    This does not scale to environments with many hosts and services.
  660.  
  661.    When scaling Service Location systems to intermediate sized networks,
  662.    a central repository (Directory Agent) may be added to reduce the
  663.    number of Service Location messages transmitted in the network
  664.    infrastructure.  Since the central repository can respond to all
  665.    Service and Attribute Requests, fewer Service and Attribute Replies
  666.    will be needed; for the same reason, there is no need to
  667.    differentiate between Directory Agents.
  668.  
  669.    A site may also grow to such a size that it is not feasible to
  670.    maintain only one central repository of service information.  In this
  671.  
  672.  
  673.  
  674. Veizades, et. al.           Standards Track                    [Page 12]
  675.  
  676. RFC 2165               Service Location Protocol               June 1997
  677.  
  678.  
  679.    case more Directory Agents are needed.  The services (and service
  680.    agents) advertised by the several Directory Agents are collected
  681.    together into logical groupings called "Scopes".
  682.  
  683.    All Service Registrations that have a scope must be registered with
  684.    all DAs (within the appropriate multicast radius) of that scope which
  685.    have been or are subsequently discovered.  Service Registrations
  686.    which have no scope are only registered with unscoped DAs.  User
  687.    Agents make requests of DAs whose scope they are configured to use.
  688.  
  689.    Service Agents MUST register with unscoped DAs even if they are
  690.    configured to specifically register with DAs which have a specific
  691.    scope or set of scopes.  User Agents MAY query DAs without scopes,
  692.    even if they are configured to use DAs with a certain scope.  This is
  693.    because any DA with no scope will have all the available service
  694.    information.
  695.  
  696.    Scoped user agents SHOULD always use a DA which supports their
  697.    configured scope when possible instead of an unscoped DA. This will
  698.    prevent the unscoped DAs from becoming overused and thus a scaling
  699.    problem.
  700.  
  701.    It is possible to specially configure Service Agents to register only
  702.    with a specific set of DAs (see Section 22.1).  In that case,
  703.    services may not be available to User Agents via all Directory
  704.    Agents, but some network administrators may deem this appropriate.
  705.  
  706.    There are thus 3 distinct operating modes.  The first requires no
  707.    administrative intervention.  The second requires only that a DA be
  708.    run.  The last requires that all DAs be configured to have scope and
  709.    that a coherent strategy of assigning scopes to services be followed.
  710.    Users must be instructed which scopes are appropriate for them to
  711.    use.  This administrative effort will allow users and applications to
  712.    subsequently dynamically discover services without assistance.
  713.  
  714.    The first mode (no DAs) is intended for a LAN. The second mode (using
  715.    a DA or DAs, but not using scopes) scales well to a group of
  716.    interconnected LANs with a limited number of hosts.  The third mode
  717.    (with DAs and scopes) allows the SLP protocol to be used in an
  718.    internetworked campus environment.
  719.  
  720.    If scoped DAs are used, they will not accept unscoped registrations
  721.    or requests.  UAs which issue unscoped requests will discover only
  722.    unscoped services.  They SHOULD use a scope in their requests if
  723.    possible and SHOULD use a DA with their scope in preference to an
  724.    unscoped DA. In a large campus environment it would be a bad idea to
  725.    have ANY unscoped DAs:  They attract ALL registrations and will thus
  726.    present a scaling problem eventually.
  727.  
  728.  
  729.  
  730. Veizades, et. al.           Standards Track                    [Page 13]
  731.  
  732. RFC 2165               Service Location Protocol               June 1997
  733.  
  734.  
  735.    A subsequent protocol document will describe mechanisms for
  736.    supporting a service discovery protocol for the global Internet.
  737.  
  738. 4. Service Location General Message Format
  739.  
  740.    The following header is used in all of the message descriptions below
  741.    and is abbreviated by using "Service Location header =" followed by
  742.    the function being used.
  743.  
  744.       0                   1                   2                   3
  745.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  746.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  747.      |    Version    |    Function   |            Length             |
  748.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  749.      |O|M|U|A|F| rsvd|    Dialect    |        Language Code          |
  750.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  751.      |        Char Encoding          |              XID              |
  752.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  753.  
  754.       Version  This protocol document defines version 1 of the Service
  755.                Location protocol.
  756.  
  757.       Function Service Location datagrams can be identified as to their
  758.                operation by the function field.  The following are the
  759.                defined operations:
  760.  
  761.                Message Type             Abbreviation     Function Value
  762.  
  763.                Service Request          SrvReq               1
  764.                Service Reply            SrvRply              2
  765.                Service Registration     SrvReg               3
  766.                Service Deregister       SrvDereg             4
  767.                Service Acknowledge      SrvAck               5
  768.                Attribute Request        AttrRqst             6
  769.                Attribute Reply          AttrRply             7
  770.                DA Advertisement         DAAdvert             8
  771.                Service Type Request     SrvTypeRqst          9
  772.                Service Type Reply       SrvTypeRply          10
  773.  
  774.       Length   The number of bytes in the message, including the Service
  775.                Location Header.
  776.  
  777.       O        The 'Overflow' bit.  See Section 18 for the use of this
  778.                field.
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Veizades, et. al.           Standards Track                    [Page 14]
  787.  
  788. RFC 2165               Service Location Protocol               June 1997
  789.  
  790.  
  791.       M        The 'Monolingual' bit.  Requests with this bit set
  792.                indicate the User Agent will only accept responses in the
  793.                language (see section 17) that is indicated by the
  794.                Service or Attribute Request.
  795.  
  796.       U        The 'URL Authentication Present' bit.  See sections 4.2,
  797.                4.3, 9, and 11 for the use of this field.
  798.  
  799.       A        The 'Attribute Authentication Present' bit.  See
  800.                sections 4.2, 4.3, and 13 for the use of this field.
  801.  
  802.       F        If the 'F' bit is set in a Service Acknowledgement, the
  803.                directory agent has registered the service as a new
  804.                entry, not as an updated entry.
  805.  
  806.       rsvd     MUST be zero.
  807.  
  808.       Dialect  Dialect tags will be used by future versions of the
  809.                Service Location Protocol to indicate a variant of
  810.                vocabulary used.  This field is reserved and MUST be set
  811.                to 0 for compatibility with future versions of the
  812.                Service Location Protocol.
  813.  
  814.       Language Code
  815.                Strings within the remainder of the message which follows
  816.                are to be interpreted in the language encoded (see
  817.                section 17 and appendix A) in this field.
  818.  
  819.       Character Encoding
  820.                The characters making up strings within the remainder of
  821.                the message may be encoded in any standardized encoding
  822.                (see section 17.1).
  823.  
  824.       Transaction Identifier (XID)
  825.                The XID (transaction ID) field allows the requester to
  826.                match replies to individual requests (see section 4.1).
  827.  
  828.                Note that, whenever there is an Attribute Authentication
  829.                block, there will also be a URL Authentication block.
  830.                Thus, it is an error to have the 'A' bit set without also
  831.                having the 'U' bit set.
  832.  
  833. 4.1. Use of Transaction IDs (XIDs)
  834.  
  835.    Retransmission is used to ensure reliable transactions in the Service
  836.    Location Protocol.  If a User Agent or Service Agent sends a message
  837.    and fails to receive an expected response, the message will be sent
  838.    again.  Retransmission of the same Service Location datagram should
  839.  
  840.  
  841.  
  842. Veizades, et. al.           Standards Track                    [Page 15]
  843.  
  844. RFC 2165               Service Location Protocol               June 1997
  845.  
  846.  
  847.    not contain an updated XID. It is quite possible the original request
  848.    reached the DA or SA, but reply failed to reach the requester.  Using
  849.    the same XID allows the DA or SA to cache its reply to the original
  850.    request and then send it again, should a duplicate request arrive.
  851.    This cached information should only be held very briefly
  852.    (CONFIG_INTERVAL_0.)  Any registration or deregistration at a
  853.    Directory Agent, or change of service information at a SA should
  854.    flush this cache so that the information returned to the client is
  855.    always valid.
  856.  
  857.    The requester creates the XID from an initial random seed and
  858.    increments it by one for each request it makes.  The XIDs will
  859.    eventually wrap back to zero and continue incrementing from there.
  860.  
  861.    Directory Agents use XID values in their DA Advertisements to
  862.    indicate their state (see section 15.2).
  863.  
  864. 4.2. URL Entries
  865.  
  866.    When URLs are registered, they have lifetimes and lengths, and may be
  867.    authenticated.  These values are associated with the URL for the
  868.    duration of the registration.  The association is known as a "URL-
  869.    entry", and has the following format:
  870.  
  871.       0                   1                   2                   3
  872.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  873.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  874.      |           Lifetime            |        Length of URL          |
  875.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  876.      |                                                               |
  877.      \                              URL                              \
  878.      |                                                               |
  879.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  880.      |              (if present) URL Authentication Block .....
  881.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  882.  
  883.       Lifetime   The length of time that the registration is valid, in
  884.                the absence of later registrations or deregistration.
  885.  
  886.       Length of URL
  887.                The length of the URL, measured in bytes and < 32768.
  888.  
  889.       URL Authentication Block
  890.                (if present) A timestamped authenticator (section 4.3)
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Veizades, et. al.           Standards Track                    [Page 16]
  899.  
  900. RFC 2165               Service Location Protocol               June 1997
  901.  
  902.  
  903.    The URL conforms to RFC 1738 [6].  If the 'U' bit is set in the
  904.    message header, the URL is followed by an URL Authentication Block.
  905.    If the scheme used in the URL does not have a standardized
  906.    representation, the minimal requirement is:
  907.  
  908.       service:<srvtype>://<addr-spec>
  909.  
  910.    "service" is the URL scheme of all Service Location Information
  911.    included in service registrations and service replies.  Each URL
  912.    entry contains the service:<srvtype> scheme name.  It may also
  913.    include an <addr-spec> except in the case of a reply to a Service
  914.    Type request (see section 7).
  915.  
  916. 4.3. Authentication Blocks
  917.  
  918.    Authentication blocks are used to authenticate service registrations
  919.    and deregistrations.  URLs are registered along with an URL
  920.    Authentication block to retain the authentication information in the
  921.    URL entry for subsequent use by User Agents who receive a Service
  922.    Reply containing the URL entry.  Service attributes are registered
  923.    along with an Attribute Authentication block.  Both authentication
  924.    blocks have the format illustrated below.
  925.  
  926.    If a service registration is accompanied by authentication which can
  927.    be validated by the DA, the DA MUST validate any subsequent service
  928.    deregistrations, so that unauthorized entities cannot invalidate such
  929.    registered services.  Likewise, if a service registration is
  930.    accompanied by an Attribute Authentication block which can be
  931.    validated by the DA, the DA MUST validate any subsequent attribute
  932.    registrations, so that unauthorized entities cannot invalidate such
  933.    registered attributes.
  934.  
  935.    To avoid replay attacks which use previously validated
  936.    deregistrations, the deregistration or attribute registration message
  937.    must contain a timestamp for use by the DA. To avoid replay attacks
  938.    which use previously validated registrations to nullify a valid
  939.    deregistration, registrations must also contain a timestamp.
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Veizades, et. al.           Standards Track                    [Page 17]
  955.  
  956. RFC 2165               Service Location Protocol               June 1997
  957.  
  958.  
  959.    An authentication block has the following format:
  960.  
  961.       0                   1                   2                   3
  962.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  963.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  964.      |                                                               |
  965.      +                           Timestamp                           +
  966.      |                                                               |
  967.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  968.      |  Block Structure Descriptor   |            Length             |
  969.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  970.      |            Structured Authenticator ...
  971.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  972.  
  973.       Timestamp A 64-bit value formatted as specified by the Network
  974.                Time Protocol (NTP) [16].
  975.  
  976.       Block Structure Descriptor (BSD)
  977.                A value describing the structure of the Authenticator.
  978.                The only value currently defined is 1, for
  979.                Object-Identifier.
  980.  
  981.       Length   The length of the Authenticator
  982.  
  983.       Structured Authenticator
  984.                An algorithm specification, and the authentication data
  985.                produced by the algorithm.
  986.  
  987.    The Structured Authenticator contains a digital signature of the
  988.    information being authenticated.  It contains sufficient information
  989.    to determine the algorithm to be used and the keys to be selected to
  990.    verify the digital signature.
  991.  
  992.    The digital signature is computed over the following ordered stream
  993.    of data:
  994.  
  995.        CHARACTER ENCODING OF URL   (2 bytes in network byte order)
  996.        LIFETIME                    (2 bytes in network byte order)
  997.        LENGTH OF URL               (2 bytes in network byte order)
  998.        URL                         (n bytes)
  999.        TIMESTAMP                   (8 bytes in SNTP format [16])
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Veizades, et. al.           Standards Track                    [Page 18]
  1011.  
  1012. RFC 2165               Service Location Protocol               June 1997
  1013.  
  1014.  
  1015.    When producing a URL Authentication block, the authentication data
  1016.    produced by the algorithm identified within the Structured
  1017.    Authenticator calculated over the following ordered stream of data:
  1018.  
  1019.        ATTRIBUTE CHARACTER ENCODING   (2 bytes in network byte order)
  1020.        LENGTH OF ATTRIBUTES           (2 bytes in network byte order)
  1021.        ATTRIBUTES                     (n bytes)
  1022.        TIMESTAMP                      (8 bytes in SNTP format [16])
  1023.  
  1024.    Every Service Location Protocol entity (User Agent, Service Agent, or
  1025.    Directory Agent) which is configured for use with protected scopes
  1026.    SHOULD implement "md5WithRSAEncryption" [4] and be able to associate
  1027.    it with BSD value == 1.
  1028.  
  1029.    In the case where BSD value == 1 and the OID "md5WithRSAEncryption"
  1030.    is selected, the Structured Authenticator will start with the ASN.1
  1031.    Distinguished Encoding (DER) [9] for "md5WithRSAEncryption", which
  1032.    has the as its value the bytes (MSB first in hex):
  1033.  
  1034.       "30 0d 06 09 2a 86 48 86 f7 0d 01 01 04 05 00"
  1035.  
  1036.    This is then immediately followed by an ASN.1 Distinguished Encoding
  1037.    (as a "Bitstring") of the RSA encryption (using the Scope's private
  1038.    key) of a bitstring consisting of the OID for "MD5" concatenated by
  1039.    the MD5 [22] message digest computed over the fields above.  The
  1040.    exact construction of the MD5 OID and digest can be found in RFC 1423
  1041.    [4].
  1042.  
  1043. 4.4. URL Entry Lifetime
  1044.  
  1045.    The Lifetime field is set to the number of seconds the reply can be
  1046.    cached by any agent.  A value of 0 means the information must not be
  1047.    cached.  User Agents MAY cache service information, but if they do,
  1048.    they must provide a way for applications to flush this cached
  1049.    information and issue the request directly onto the network.
  1050.  
  1051.    Services should be registered with DAs with a Lifetime, the suggested
  1052.    value being CONFIG_INTERVAL_1.  The service must be reregistered
  1053.    before this interval elapses, or the service advertisement will no
  1054.    longer be available.  Thus, services which vanish and fail to
  1055.    deregister eventually become automatically deregistered.
  1056.  
  1057. 5. Service Request Message Format
  1058.  
  1059.    The Service Request is used to obtain URLs from a Directory Agent or
  1060.    Service Agents.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Veizades, et. al.           Standards Track                    [Page 19]
  1067.  
  1068. RFC 2165               Service Location Protocol               June 1997
  1069.  
  1070.  
  1071.    The format of the Service Request is as follows:
  1072.  
  1073.       0                   1                   2                   3
  1074.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1075.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1076.      |         Service Location header (function = SrvReq)           |
  1077.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1078.      |length of prev resp list string|<Previous Responders Addr Spec>|
  1079.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1080.      |                                                               |
  1081.      \                  <Previous Responders Addr Spec>              \
  1082.      |                                                               |
  1083.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1084.      |  length of predicate string   |  Service Request <predicate>  |
  1085.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1086.      |                                                               |
  1087.      \               Service Request <predicate>, contd.             \
  1088.      |                                                               |
  1089.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1090.  
  1091.    If a UA issues a request which will result in a reply which is too
  1092.    large, the SA or DA will return an abbreviated response (in a
  1093.    datagram the size of the site's MTU) which has the 'Overflow' bit
  1094.    flag set.  The UA must then issue the request again using TCP.
  1095.  
  1096.    The <Previous Responders Addr Spec> is described in sections 7 and
  1097.    20.1.
  1098.  
  1099.    After a User Agent restarts (say, after rebooting of a system,
  1100.    loading of the network kernel), Service Requests should be delayed
  1101.    for some random time uniformly distributed within a one second
  1102.    interval centered about a configured delay value (by default,
  1103.    CONFIG_INTERVAL_4).
  1104.  
  1105.    The Service Request allows the User Agent to specify the Service Type
  1106.    of the service and a Predicate in a specific language.  The general
  1107.    form of a Service Request is shown below:
  1108.  
  1109.       <srvtype>[.<na>]/[<scope>]/[<where>]/
  1110.  
  1111.    The punctuation is necessary even where the fields are omitted.
  1112.  
  1113.     -  The <srvtype> refers to the Service Type.  For each type of
  1114.        service available, there is a unique Service type name string.
  1115.        See section 20.2.1.
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Veizades, et. al.           Standards Track                    [Page 20]
  1123.  
  1124. RFC 2165               Service Location Protocol               June 1997
  1125.  
  1126.  
  1127.     -  The <na> is the Naming Authority.  This string determines the
  1128.        semantic interpretation of the attribute information in the
  1129.        <where> part of the Service Request.
  1130.  
  1131.     -  The <scope> is a string used to restrict the range of the query.
  1132.        Scope is determined administratively, at a given site.  It is not
  1133.        necessarily related to network topology (see Section 16).
  1134.        Leaving this field out means that the request can be satisfied
  1135.        only by unscoped service advertisements.
  1136.  
  1137.     -  The <where> string is the Where Clause of the request.  It
  1138.        contains a query which allows the selection of those service
  1139.        instances which the User Agent is interested in.  The query
  1140.        includes attributes, boolean operators and relations.  (See
  1141.        section 5.3.)
  1142.  
  1143.    In the case of a multicast service request, a list of previous
  1144.    responders is sent.  This list will prevent those in the list from
  1145.    responding, to be sure that responses from other sources are not
  1146.    drowned out.  The request is multicast repeatedly (with a recommended
  1147.    wait interval of CONFIG_INTERVAL_2) until there are no new responses,
  1148.    or a certain time (CONFIG_INTERVAL_3) has elapsed.  Different timing
  1149.    values are applied to a Service Request used for Directory Agent
  1150.    Discovery, see Section 5.2.
  1151.  
  1152.    In order for a request to succeed in matching registered information,
  1153.    the following conditions must be met:
  1154.  
  1155.     1. The result must have the same Service Type as the request.
  1156.  
  1157.     2. It must have the same Naming Authority.
  1158.  
  1159.     3. It must have the same scope.  (If the scope of the request
  1160.        as omitted, the request will only match services which were
  1161.        registered with no scope.  Note that a scoped request WILL match
  1162.        all unscoped Services).
  1163.  
  1164.     4. The conditions specified in the Where Clause must match the
  1165.        attributes and keywords registered for the service.
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Veizades, et. al.           Standards Track                    [Page 21]
  1179.  
  1180. RFC 2165               Service Location Protocol               June 1997
  1181.  
  1182.  
  1183. 5.1. Service Request Usage
  1184.  
  1185.    The User Agent may form Service Requests using preconfigured
  1186.    knowledge of a Service Type's attributes.  It may also issue
  1187.    Attribute Requests to obtain the attribute values for a Service Type
  1188.    before issuing Service Requests (see Section 13).  Having obtained
  1189.    the attributes which describe a particular kind of service from an
  1190.    Attribute Request, or using configured knowledge of a service's
  1191.    attributes, the User Agent can build a predicate that describes the
  1192.    service needs of the user.
  1193.  
  1194.    Service Requests may be sent directly to a Directory Agent.  Suppose
  1195.    a printer supporting the lpr protocol is needed on the 12th floor
  1196.    which has UNRESTRICTED_ACCESS and prints 12 pages per minute.
  1197.    Suppose further that a Attribute Request indicates that there is a
  1198.    printer on the 12th floor, a printer that prints 12 pages per minute,
  1199.    and a printer that offers UNRESTRICTED_ACCESS. To check whether they
  1200.    are same printer, issue the following request:
  1201.  
  1202.       lpr//(& (PAGES PER MINUTE==12)
  1203.                (UNRESTRICTED_ACCESS)
  1204.                (LOCATION==12th FLOOR))/
  1205.  
  1206.    Suppose there is no such printer.  The Directory Agent responds with
  1207.    a Service Reply with 0 in the number of responses and no reply
  1208.    values.
  1209.  
  1210.    The User Agent then tries a less restrictive query to find a printer,
  1211.    using the 12th floor as "where" criteria.
  1212.  
  1213.       lpr//(LOCATION==12th FLOOR)/
  1214.  
  1215.    In this case, there is now only one reply:
  1216.  
  1217.       Returned URL:   service:lpr://igore.wco.ftp.com:515/draft
  1218.  
  1219.    The Address Specification for the printer is:  igore.wco.ftp.com:515,
  1220.    containing the name of the host managing the requested printer.
  1221.    Files would be printed by spooling to that port on that host.  The
  1222.    word 'draft' refers to the name of the print queue the lpr server
  1223.    supports.
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Veizades, et. al.           Standards Track                    [Page 22]
  1235.  
  1236. RFC 2165               Service Location Protocol               June 1997
  1237.  
  1238.  
  1239.    In the absence of a Directory Agent, the request above could be
  1240.    multicast.  In this case it would be sent to the Service Specific
  1241.    Multicast Address for "service:printer" and not to the Directory
  1242.    Agent.  Service Agents that can satisfy the predicate will reply.
  1243.    Service Agents which cannot support the character set of the request
  1244.    MUST return CHARSET_NOT_UNDERSTOOD in the SrvRply.  In all other
  1245.    circumstances, Service Agents which cannot satisfy the reply do not
  1246.    send any reply at all.
  1247.  
  1248.    The only way a User Agent can be sure there are no services which
  1249.    match the query is by retrying the request (CONFIG_INTERVAL_8).  If
  1250.    no response comes, the User Agent gives up and assumes there are no
  1251.    such printers.
  1252.  
  1253.    Another form of query is a simpler 'join' query.  Its syntax has no
  1254.    parentheses or logical operators.  Each term is conjoined (AND-ed
  1255.    together.)  Rewriting the initial query provides an example:
  1256.  
  1257.       lpr//PAGES PER MINUTE==12,
  1258.            UNRESTRICTED_ACCESS,
  1259.            LOCATION==12th FLOOR/
  1260.  
  1261. 5.2. Directory Agent Discovery Request
  1262.  
  1263.    Normally a Service Request returns a Service Reply.  The sole
  1264.    exception to this is a Service Request for the Service Type
  1265.    "directory-agent".  This Service Request is answered with a DA
  1266.    Advertisement.
  1267.  
  1268.    Without configured knowledge of a Directory Agent (DA), a User Agent
  1269.    or Service Agent uses a Service Request to discover a DA. (See
  1270.    section 15.1 for mechanisms by which a client may be configured to
  1271.    have knowledge of a DA.) Such a Service Request used for Directory
  1272.    Agent Discovery includes a predicate of the form:
  1273.  
  1274.       directory-agent///
  1275.  
  1276.    This query is always sent to the Directory Agent Discovery multicast
  1277.    address.  The Service Type of a Directory Agent is "directory-agent",
  1278.    hence it is the Service Type used in the request.  No scope is
  1279.    included in the request, so all Directory Agents will reply.  This is
  1280.    the only request which omits a scope which all Directory Agents MUST
  1281.    respond to.  Normally, a Directory Agent with a scope ONLY responds
  1282.    to requests with that scope.  No Naming Authority is included, so
  1283.    "IANA" is assumed.  We want to reach all the available directory
  1284.    agents.  If the scope were supplied, only DAs supporting that scope
  1285.    would reply.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Veizades, et. al.           Standards Track                    [Page 23]
  1291.  
  1292. RFC 2165               Service Location Protocol               June 1997
  1293.  
  1294.  
  1295.    DA Advertisement Replies may arrive from different sources, similar
  1296.    in form to:
  1297.  
  1298.      URL returned:   service:directory-agent://slp-resolver.catch22.com
  1299.      Scope returned: ACCOUNTING
  1300.  
  1301.      URL returned:   service:directory-agent://204.182.15.66 Scope
  1302.      returned: JANITORIAL SERVICES
  1303.  
  1304.    The DA Advertisement format is defined in Section 14.
  1305.  
  1306.    If the goal is merely to discover any Directory Agent, the first
  1307.    reply will do.  If the goal, however, is to discover all reachable
  1308.    DAs, the request must be retransmitted after an interval (the
  1309.    recommended time is CONFIG_INTERVAL_5).  This retransmitted request
  1310.    will include a list of DAs which have already responded.  See
  1311.    sections 7 and 20.1.  Directory Agents which receive the request will
  1312.    only respond if they are not on this list.  After there are no new
  1313.    replies, all DAs are presumed to have been discovered.
  1314.  
  1315.    If a DA fails to respond after CONFIG_INTERVAL_6 seconds, the UA or
  1316.    Service Agent should use a different DA. DA addresses may be cached
  1317.    from previous discovery attempts, preconfigured, or by use of DHCP
  1318.    (see section 15.2).  If no such DA responds, DA discovery should be
  1319.    used to find a new DA. Only after CONFIG_INTERVAL_7 seconds should it
  1320.    be assumed that no DA exists and multicast based Service Requests
  1321.    should be used.
  1322.  
  1323. 5.3. Explanation of Terms of Predicate Grammar
  1324.  
  1325.    A predicate has a simple structure, which depends on parentheses,
  1326.    commas and slashes to delimit the elements.  Examples of proper usage
  1327.    are given throughout this document.  The terms used in the grammar
  1328.    are as follows:
  1329.  
  1330.       predicate:
  1331.  
  1332.          Placed in a Service Request, this is interpreted by a Service
  1333.          Agent or Directory Agent to determine what information to
  1334.          return.
  1335.  
  1336.       scope:
  1337.  
  1338.          If this is absent in a Service Request, the request will match
  1339.          only services registered without a scope.  If it is present,
  1340.          only services registered under that scope or are unscoped will
  1341.          match the request.
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Veizades, et. al.           Standards Track                    [Page 24]
  1347.  
  1348. RFC 2165               Service Location Protocol               June 1997
  1349.  
  1350.  
  1351.       where-clause:
  1352.  
  1353.          This determines which services the request matches.  An empty
  1354.          where-clause will match all services.  The request will be
  1355.          limited to services which have the specified Service Type, so
  1356.          the where-clause is not the sole factor in picking out which
  1357.          services match the request.
  1358.  
  1359.       where-list:
  1360.  
  1361.          The where-list is a logical expression.  It can be a single
  1362.          expression, a disjunction or a conjunction.  A single
  1363.          expression must apply for the where-clause to match.  A
  1364.          disjunction matches if any expression in the OR list matches.
  1365.          A conjunction matches only if all elements in the AND list
  1366.          match.
  1367.  
  1368.          Note that there is no logical negation operator:  This is
  1369.          because there is no notion of returning "everything except"
  1370.          what matches a given criteria.
  1371.  
  1372.          A where-list can be nested and complex.  For example, the
  1373.          following requires that three subexpressions must all be true:
  1374.  
  1375.                 (& (| <query-item> <query-item>)
  1376.                    <query-item>
  1377.                    (& <query-item> <query-item> <query-item>)
  1378.                 )
  1379.  
  1380.          Notice that white space, tabs or carriage returns can be added
  1381.          anywhere outside query-items.  Each list has 2 or more items in
  1382.          it, and lists can be nested.  Services which fulfill the entire
  1383.          logical expression match the where-clause.
  1384.  
  1385.          degenerate expressions but they should be tolerated.  They are
  1386.          equivalent to <query-item>.
  1387.  
  1388.       query-item:
  1389.  
  1390.          A query item has the form:
  1391.  
  1392.                '(' <attr-tag> <comp-op> <attr-val> ')'
  1393.  
  1394.          or
  1395.  
  1396.                '(' <keyword> ')'
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Veizades, et. al.           Standards Track                    [Page 25]
  1403.  
  1404. RFC 2165               Service Location Protocol               June 1997
  1405.  
  1406.  
  1407.          Examples of this would be:
  1408.  
  1409.             (SOME ATTRIBUTE == SOME VALUE)
  1410.             (RESERVED)
  1411.             (QUEUE LENGTH <= 234)
  1412.  
  1413.       query-join:
  1414.  
  1415.          The query-join is a comma delimited list of conditions which
  1416.          the service must satisfy in order to match the query.  The
  1417.          items are considered to be logically conjoined.  Thus the
  1418.          query-join:
  1419.  
  1420.                ATTR1=VALUE1, KEYWORD1, KEYWORD2, ATTR2>=34
  1421.  
  1422.          is equivalent to the where-list:
  1423.  
  1424.                (& (ATTR1=VALUE1) (KEYWORD1) (KEYWORD2) (ATTR2>=34))
  1425.  
  1426.          The query-join cannot be mixed with a where-list.  It is
  1427.          provided as a convenient mechanism to provide a statement of
  1428.          necessary conditions without building a logical expression.
  1429.  
  1430. 5.4. Service Request Predicate Grammar
  1431.  
  1432.    Service Requests can precisely describe the services they need by
  1433.    including a Predicate the body of the Request.  This Predicate must
  1434.    be constructed according to the grammar below.
  1435.  
  1436.    <predicate>  ::= <srvtype>['.'<na>]'/'<scope>'/'<where>'/'
  1437.  
  1438.    <srvtype>    ::= string representing type of service.  Only
  1439.                     alphanumeric characters, '+', and '-' are allowed.
  1440.  
  1441.    <na>         ::= string representing the Naming Authority.
  1442.                     Only alphanumeric characters, '+',
  1443.                     and '-' are allowed.  If this field is
  1444.                     omitted then "IANA" is assumed.
  1445.  
  1446.    <scope>      ::= string representing the directory agent scope.
  1447.                     '/', ',' (comma) and ':'  are not allowed in
  1448.                     this string.  The scopes "LOCAL" and "REMOTE"
  1449.                     are reserved.
  1450.  
  1451.    <attr-tag>   ::= class name of an attribute of a given Service
  1452.                     Type.  This tag cannot include the following
  1453.                      characters:  '(', ')', ',', '=', '!', '>',
  1454.                      '<', '/', '*', except where escaped (see 17.1.)
  1455.  
  1456.  
  1457.  
  1458. Veizades, et. al.           Standards Track                    [Page 26]
  1459.  
  1460. RFC 2165               Service Location Protocol               June 1997
  1461.  
  1462.  
  1463.    <keyword>    ::= a class name of an attribute which will have
  1464.                     no values.  This string has the same limits
  1465.                     as the <attr-tag>, except that white space
  1466.                     internal to the keyword is illegal.
  1467.  
  1468.    <where>      ::= <where-any> |
  1469.                     <where-list> |
  1470.                     <query-join>
  1471.  
  1472.    <where-any>  ::=
  1473.                     That is NOTHING, or white space.
  1474.  
  1475.    <where-list> ::= '(' '&' <where-list> <query-list> ')' |
  1476.                     '(' '|' <where-list> <query-list> ')' |
  1477.                     '(' <keyword> ')'
  1478.                     '(' <attr-tag> <comp-op> <attr-val> ')'
  1479.  
  1480.    <query-list> ::= <where-list> |
  1481.                     <where-list> <query-list>
  1482.    <query-join> ::= <keyword> |
  1483.                     <join-item> |
  1484.                     <query-join> ',' <keyword> |
  1485.                     <query-join> ',' <join-item>
  1486.  
  1487.    <join-item>  ::= <attr-tag> <comp-op> <attr-val>
  1488.  
  1489.    <comp-op>    ::= "!=" | "==" | '<' | "<=" | '>' | ">="
  1490.  
  1491.    <attr-val>   ::= any string (see Section 20.5 for the ways
  1492.                     in which attr-vals are interpreted.)
  1493.                     Value strings may not contain '/', ','
  1494.                     '=', '<', '>', or '*' except where escaped
  1495.                     (see 17.1.).
  1496.  
  1497.                     '(' and ')' may be used in attribute values
  1498.                      for the purpose of encoding a binary values.
  1499.                      Binary encodings (See 20.5) may
  1500.                      include the above reserved characters.
  1501.  
  1502. 5.5. String Matching for Requests
  1503.  
  1504.    All strings are case insensitive, with respect to string matching on
  1505.    queries.  All preceding or trailing blanks should not be considered
  1506.    for a match, but blanks internal to a string are relevant.
  1507.  
  1508.    For example, "  Some String  " matches "SOME STRING", but not "some
  1509.    string".
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Veizades, et. al.           Standards Track                    [Page 27]
  1515.  
  1516. RFC 2165               Service Location Protocol               June 1997
  1517.  
  1518.  
  1519.    String matching may only be performed over the same character sets.
  1520.    If a request cannot be satisfied due to a lack of support for the
  1521.    character set of the request a CHARSET_NOT_UNDERSTOOD error is
  1522.    returned.
  1523.  
  1524.    String comparisons (using comparison operators such as '<' or
  1525.    registration, not using any language specific rules.  The ordering is
  1526.    strictly by the character value, i.e.  "0" < "A" is true when the
  1527.    character set is US-ASCII, since "0" has the value of 48 and "A" has
  1528.    the value 65.
  1529.  
  1530.    The special character '*' may precede or follow a string in order to
  1531.    allow substring matching.  If the '*' precedes a string, it matches
  1532.    any attribute value which ends with the string.  If the string ends
  1533.    with a '*', it matches any attribute value which begins with the
  1534.    string.  Finally, if a string begins and ends with a '*', the string
  1535.    will match any attribute value which contains the string.
  1536.  
  1537.    Examples:
  1538.  
  1539.         "bob*" matches "bob", "bobcat", and "bob and sue" "*bob" matches
  1540.         "bob", "bigbob", and "sue and bob" "*bob*" matches "bob",
  1541.         "bobcat", "bigbob", and "a bob I know"
  1542.  
  1543.    String matching is done after escape sequences have been substituted.
  1544.    See sections 17, 5.3, 17.1.
  1545.  
  1546. 6. Service Reply Message Format
  1547.  
  1548.    The format of the Service Reply Message is:
  1549.  
  1550.       0                   1                   2                   3
  1551.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1552.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1553.      |          Service Location header (function = SrvRply)         |
  1554.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1555.      |         Error Code            |         URL Entry count       |
  1556.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1557.      |                         <URL Entry 1> ...
  1558.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1559.      |                              .                                |
  1560.      \                              .                                \
  1561.      |                              .                                |
  1562.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1563.      |                         <URL Entry N> ...
  1564.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1565.  
  1566.    Each Service Reply message is composed of a list of URL Entries.
  1567.  
  1568.  
  1569.  
  1570. Veizades, et. al.           Standards Track                    [Page 28]
  1571.  
  1572. RFC 2165               Service Location Protocol               June 1997
  1573.  
  1574.  
  1575.    The Error Code may have one of the following values:
  1576.  
  1577.       0        Success
  1578.  
  1579.       LANGUAGE_NOT_SUPPORTED
  1580.                A SA or DA returns this when a request is received from a
  1581.                UA which is in a language for which there is no
  1582.                registered Service Information and the request arrived
  1583.                with the Monolingual bit set.  See Section 17.
  1584.  
  1585.       PROTOCOL_PARSE_ERROR
  1586.                A SA or DA returns this error when a SrvRply is received
  1587.                which cannot be parsed or the declared string lengths
  1588.                overrun the message.
  1589.  
  1590.       SCOPE_NOT_SUPPORTED
  1591.                A DA will return this error if it receives a request
  1592.                which has a scope not supported by the DA. An SA will not
  1593.                return this error; it will simply not reply to the
  1594.                multicast request.
  1595.  
  1596.       CHARSET_NOT_UNDERSTOOD
  1597.                If the DA or SA receives a request or registration in a
  1598.                character set which it does not support, it will return
  1599.                this error.
  1600.  
  1601.    Each <URL Entry> in the list has the form defined in Section 4.2.
  1602.    The URL entries in the reply have no delimiters between them, other
  1603.    than the length fields.  The URL length fields indicate where the URL
  1604.    strings end.  If the presence of an URL Authenticator block is
  1605.    signalled by the 'U' bit, the length of the authenticator block is
  1606.    determined by information within the block as discussed in section
  1607.    4.3.  A User Agent MAY use the authentication block to determine
  1608.    whether the Service Agent advertising the URL is, in fact, authorized
  1609.    to offer the indicated service.  If, in a list of URL entries, some
  1610.    of the URLs indicate services which are in protected scopes (see
  1611.    section 16.1) while other URLs in the list indicate services which
  1612.    are not in protected scopes, the latter must still have
  1613.    Authentication Blocks, but the length of the authentcitor is shown as
  1614.    zero, and no authentication need be done.
  1615.  
  1616. 7. Service Type Request Message Format
  1617.  
  1618.    The Service Type Request is used to determine all the types of
  1619.    services supported on a network.
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626. Veizades, et. al.           Standards Track                    [Page 29]
  1627.  
  1628. RFC 2165               Service Location Protocol               June 1997
  1629.  
  1630.  
  1631.    The request should be sent directly to a DA (though it may also be
  1632.    sent to the Service Location General Multicast Address), in order to
  1633.    find out all services available on the site network (which are
  1634.    advertised by Directory Agents and Service Agents.)  If no DA is
  1635.    available, a User Agent MAY issue more than one request to insure
  1636.    that all replies have been received.  In each subsequent request, a
  1637.    User Agent includes those Service Types that it is aware of.  When no
  1638.    new replies arrive within CONFIG_INTERVAL_3 from a request, the User
  1639.    Agent can presume that it has acquired a complete set of available
  1640.    Service Types.
  1641.  
  1642.    The format of a Service Type Request is:
  1643.  
  1644.       0                   1                   2                   3
  1645.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1646.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1647.      |        Service Location header (function = SrvTypeRqst)       |
  1648.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1649.      |  length of prev resp string   |<Previous Responders Addr Spec>|
  1650.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1651.      |                                                               |
  1652.      \                  <Previous Responders Addr Spec>              \
  1653.      |                                                               |
  1654.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1655.      |   length of naming authority  |   <Naming Authority String>   |
  1656.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1657.      |                                                               |
  1658.      \            <Naming Authority String>, continued               \
  1659.      |                                                               |
  1660.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1661.      |     length of Scope String    |         <Scope String>        |
  1662.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1663.      |                                                               |
  1664.      \                   <Scope String>, continued                   \
  1665.      |                                                               |
  1666.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1667.  
  1668.    Note that the <Previous Responders Addr Spec> is a comma delimited
  1669.    list.  (See section 20.1.)  The 'length of prev responder list' field
  1670.    indicates the length of the comma delimited list string.  A previous
  1671.    responder list with 3 elements takes this form:
  1672.  
  1673.          <addr-spec>,<addr-spec>,<addr-spec>
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682. Veizades, et. al.           Standards Track                    [Page 30]
  1683.  
  1684. RFC 2165               Service Location Protocol               June 1997
  1685.  
  1686.  
  1687.    The Naming Authority, if included, will limit the replies to Service
  1688.    Type Requests to Service Types which have the specified Naming
  1689.    Authority.  If this field is omitted (i.e., the length field is
  1690.    zero), the default Naming Authority ("IANA") is assumed.  If the
  1691.    length field is -1, service types from all naming authorities are
  1692.    requested.
  1693.  
  1694.    The Scope String Field, if included, will limit replies to Service
  1695.    Types which have the specified scope or are unscoped.  If this field
  1696.    is omitted, all Service Types (from the specified Naming Authority)
  1697.    are returned.
  1698.  
  1699. 8. Service Type Reply Message Format
  1700.  
  1701.    The Service Type Reply has the following format:
  1702.  
  1703.       0                   1                   2                   3
  1704.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1705.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1706.      |        Service Location header (function = SrvTypeRply)       |
  1707.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1708.      |          Error Code           |    number of service types    |
  1709.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1710.      |                                                               |
  1711.      \                     <Service Type Item 1>                     \
  1712.      |                                                               |
  1713.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1714.      |                             . . .                             |
  1715.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1716.      |                                                               |
  1717.      \                     <Service Type Item N>                     \
  1718.      |                                                               |
  1719.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1720.  
  1721.    The format of a Service Type Item is as follows:
  1722.  
  1723.       0                   1                   2                   3
  1724.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1725.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1726.      | length of Service Type String |     <Service Type String>     |
  1727.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1728.      |                                                               |
  1729.      \                 <Service Type String>, continued              \
  1730.      |                                                               |
  1731.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738. Veizades, et. al.           Standards Track                    [Page 31]
  1739.  
  1740. RFC 2165               Service Location Protocol               June 1997
  1741.  
  1742.  
  1743.    The Error Code may have one of the following values:
  1744.  
  1745.       0        Success
  1746.  
  1747.       PROTOCOL_PARSE_ERROR
  1748.                A SA or DA returns this error when a SrvTypeRqst is
  1749.                received which cannot be parsed.
  1750.  
  1751.       SCOPE_NOT_SUPPORTED
  1752.                A DA which is configured to have a scope will return this
  1753.                error if it receives a SrvTypeRqst which is set to have a
  1754.                scope which it does not support.  An SA will not return
  1755.                this error, it will simply silently discard the multicast
  1756.                request.
  1757.  
  1758.       CHARSET_NOT_UNDERSTOOD
  1759.                If the DA receives a SrvTypeRqst in a character set which
  1760.                it does not support, it MUST use this error.
  1761.  
  1762.    The service type's name is provided in the <Service Type String>.  If
  1763.    the service type has a naming authority other than "IANA" it should
  1764.    be returned following the service type string and a "." character.
  1765.    See section 20.2.1 for the formal definition of this field.  User
  1766.    Agents calculate Service Specific Multicast addresses based on a hash
  1767.    of the Service Type (see Section 3.6.2).  This multicast address may
  1768.    then be used for issuing Service and Attribute Requests directly to
  1769.    SAs.
  1770.  
  1771.    The following are examples of Service Type Strings which might be
  1772.    found in Service Type Replies:
  1773.  
  1774.          service:lpr://
  1775.          service:http://
  1776.          service:nfs://
  1777.  
  1778. 9. Service Registration Message Format
  1779.  
  1780.    After a Service Agent has found a Directory Agent, it begins to
  1781.    register its advertised services one at a time.  A Service Agent must
  1782.    wait for some random time uniformly distributed within the range
  1783.    specified by CONFIG_INTERVAL_11 before registering again.
  1784.    Registration is done using the Service Registration message
  1785.    specifying all attributes for a service.  If the service registration
  1786.    in a protected scope 16.1, then the service MUST include both a URL
  1787.    Authentication block and an Attribute Authentication block (see
  1788.    section 4.3).  In that case, the service agent MUST set both the 'U'
  1789.    bit and the 'A' bit (see section 4).
  1790.  
  1791.  
  1792.  
  1793.  
  1794. Veizades, et. al.           Standards Track                    [Page 32]
  1795.  
  1796. RFC 2165               Service Location Protocol               June 1997
  1797.  
  1798.  
  1799.    A Directory Agent must acknowledge each service registration request.
  1800.    If authentication blocks are included, the Directory Agent MUST
  1801.    verify the authentication before registering the service.  This
  1802.    requires obtaining key information, either by preconfiguration,
  1803.    maintenance of a security association with the service agent, or
  1804.    acquiring the appropriate certificate.
  1805.  
  1806.    The format of a Service Registration is:
  1807.  
  1808.       0                   1                   2                   3
  1809.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1810.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1811.      |           Service Location header (function = SrvReg)         |
  1812.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1813.      |                                                               |
  1814.      \                          <URL-Entry>                          \
  1815.      |                                                               |
  1816.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1817.      |  Length of Attr List String   |          <attr-list>          |
  1818.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1819.      |                                                               |
  1820.      \                    <attr-list>, Continued.                    \
  1821.      |                                                               |
  1822.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1823.      |    (if present) Attribute Authentication Block ...
  1824.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1825.  
  1826.    The <URL-Entry> is defined at the end of Section 4.2.  The <attr-
  1827.    list> is defined in Section 20.3.  The Attribute Authentication
  1828.    Block, which is only present if the 'A' bit is set in the message
  1829.    header, is defined in section 4.3.
  1830.  
  1831.    Service registration may use a connectionless protocol (e.g.  UDP),
  1832.    or a connection oriented protocol (e.g.  TCP). If the registration
  1833.    operation may contain more information than can be sent in one
  1834.    datagram, the Service Agent MUST use a connection oriented protocol
  1835.    to register itself with the DA. When a Service Agent registers the
  1836.    same attribute class more than once for a service instance, the
  1837.    Directory Agent overwrites the all the values associated with that
  1838.    attribute class for that service instance.  Separate registrations
  1839.    must be made for each language that the service is to be advertised
  1840.    in.
  1841.  
  1842.    If a SA attempts to register a service with a DA and the registration
  1843.    is larger than the site path MTU, then the DA will reply with a
  1844.    SrvAck, with the error set to INVALID_REGISTRATION and the 'Overflow'
  1845.    byte set.
  1846.  
  1847.  
  1848.  
  1849.  
  1850. Veizades, et. al.           Standards Track                    [Page 33]
  1851.  
  1852. RFC 2165               Service Location Protocol               June 1997
  1853.  
  1854.  
  1855.    An example of Service Registration information is:
  1856.  
  1857.       Lifetime (seconds):   16-bit unsigned integer
  1858.       URL (at least):       service:<srvtype>://<addr-spec>
  1859.       Attributes (if any):  (ATTR1=VALUE),KEYWORD,(ATTR2 = VAL1, VAL2)
  1860.  
  1861.    In order to offer continuously advertised services, Service Agents
  1862.    should start the reregistration process before the Lifetime they used
  1863.    in the registration expires.
  1864.  
  1865.    An example of a service registration (valid for 3 hours) is as
  1866.    follows:
  1867.  
  1868.       Lifetime:   10800
  1869.       URL:        service:lpr://igore.wco.ftp.com:515/draft
  1870.       Attributes: (SCOPE=DEVELOPMENT),
  1871.                   (PAPER COLOR=WHITE),
  1872.                   (PAPER SIZE=LETTER),
  1873.                   UNRESTRICTED_ACCESS,
  1874.                   (LANGUAGE=POSTSCRIPT, HPGCL),
  1875.                   (LOCATION=12 FLOOR)
  1876.  
  1877.    The same registration could be done again, as shown below, in German;
  1878.    however, note that "lpr", "service", and "SCOPE" are reserved terms
  1879.    and will remain in the language they were originally registered
  1880.    (English).
  1881.  
  1882.       Lifetime:   10800
  1883.       URL:        service:lpr://igore.wco.ftp.com:515/draft
  1884.       Attributes: (SCOPE=ENTWICKLUNG),
  1885.                   (PAPIERFARBE=WEISS),
  1886.                   (PAPIERFORMAT=BRIEF),
  1887.                   UNBEGRENTZTER_ZUGANG,
  1888.                   (DRUECKERSPRACHE=POSTSCRIPT,HPGCL),
  1889.                   (STANDORT=11 ETAGE)
  1890.  
  1891.    Scoped registrations must contain the SCOPE attribute.  Unscoped
  1892.    registrations must be registered with all unscoped Directory Agents.
  1893.  
  1894.    Registrations of a previously registered service are considered an
  1895.    update.  If such an attribute registration is performed in a
  1896.    protected scope (see section 16.1), a new Attribute Authentication
  1897.    block must also be included, and the 'A' bit set in the registration
  1898.    message header.
  1899.  
  1900.    The new registration's attributes replace the previous
  1901.    registration's, but do not effect attributes which were included
  1902.    previously and are not present in the update.
  1903.  
  1904.  
  1905.  
  1906. Veizades, et. al.           Standards Track                    [Page 34]
  1907.  
  1908. RFC 2165               Service Location Protocol               June 1997
  1909.  
  1910.  
  1911.    For example, suppose service:x://a.org has been registered with
  1912.    attributes A=1, B=2, C=3.  If a new registration comes for
  1913.    service:x://a.org with attributes C=30, D=40, then the attributes for
  1914.    the service after the update are A=1, B=2, C=30, D=40.
  1915.  
  1916.    In the example above, the SCOPE is set to DEVELOPMENT (in English)
  1917.    and ENTWICKLUNG (in German).  Recall that all strings in a message
  1918.    must be in one language, which is specified in the header.  The
  1919.    string SCOPE is *not* translated, as it is one of the reserved
  1920.    strings in the Service Location Protocol (see section 17.2.)
  1921.  
  1922.    The Directory Agent may return a server error in the acknowledgment.
  1923.    This error is carried in the Error Codes field of the service
  1924.    location message header.  A Directory Agent MUST decline to register
  1925.    a service if it is specified with an unsupported scope.  In this case
  1926.    a SCOPE_NOT_SUPPORTED error is returned in the SrvAck.  A Directory
  1927.    Agent MUST NOT accept Service Registrations which have an unsupported
  1928.    scope unless it is an unscoped Directory Agent, in which case it MUST
  1929.    accept all Service Registrations.
  1930.  
  1931.    An unscoped Service Registration will match all requests.  A request
  1932.    which specifies a certain scope will therefore return services which
  1933.    have that scope and services which are unscoped.  It is strongly
  1934.    suggested that one should use scopes in all registrations or none.
  1935.    See Sections 16 and 3.7 for details.
  1936.  
  1937.    When the URL entry accompanying a registration also contains an
  1938.    authentication block (section 4.3), the DA MUST perform the indicated
  1939.    authentication, and subsequently indicate the results in the Service
  1940.    Acknowledgement message.
  1941.  
  1942. 10. Service Acknowledgement Message Format
  1943.  
  1944.    A Service Acknowledgement is sent as the result of a DA receiving and
  1945.    processing a Service Registration or Service Deregistration.  An
  1946.    acknowledgment indicating success must have the error code set to
  1947.    zero.  Once a DA acknowledges a service registration it makes the
  1948.    information available to clients.
  1949.  
  1950.       0                   1                   2                   3
  1951.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1952.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1953.      |            Service Location header (function = SrvAck)        |
  1954.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1955.      |          Error Code           |
  1956.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962. Veizades, et. al.           Standards Track                    [Page 35]
  1963.  
  1964. RFC 2165               Service Location Protocol               June 1997
  1965.  
  1966.  
  1967.    The Error Code may have one of the following values:
  1968.  
  1969.       0        Success
  1970.  
  1971.       PROTOCOL_PARSE_ERROR
  1972.                A DA returns this error when the SrvReg or SrvDereg is
  1973.                received which cannot be parsed or the declared string
  1974.                lengths overrun the message.
  1975.  
  1976.       INVALID_REGISTRATION
  1977.                A DA returns this error when a SrvReg or SrvDeReg is
  1978.                invalid.  For instance, an invalid URL, unknown or
  1979.                malformed attributes, or deregistering an unregistered
  1980.                service all cause this error to be reported.
  1981.  
  1982.       SCOPE_NOT_SUPPORTED
  1983.                A DA which is configured to have a scope will return this
  1984.                error if it receives a SrvReq which is set to have a
  1985.                scope which it does not support.
  1986.  
  1987.       CHARSET_NOT_UNDERSTOOD
  1988.                If the DA receives a SrvReg or SrvDereg in a character
  1989.                set which it does not support, it will return this error.
  1990.  
  1991.       AUTHENTICATION_ABSENT
  1992.                If DA has been configured to require an authentication
  1993.                for any service registered in the requested scope, and
  1994.                there are no authentication blocks in the registration,
  1995.                the DA will return this error.
  1996.  
  1997.       AUTHENTICATION_FAILED
  1998.                If the registration contains an authentication block
  1999.                which fails to match the correct result as calculated
  2000.                (see section 4.3) over the URL or attribute data to be
  2001.                authenticated, the DA will return this error.
  2002.  
  2003.    If the Directory Agent accpets a Service Registration, and already
  2004.    has an existing entry, it updates the existing entry with the new
  2005.    lifetime information and possibly new attributes and new attribute
  2006.    values.  Otherwise, if the registration is acceptable (including all
  2007.    necessary authentication checks) the Directory Agent creates a new
  2008.    entry, and sets the 'F' bit in the Service Acknowledgement returned
  2009.    to the Service Agent.
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. Veizades, et. al.           Standards Track                    [Page 36]
  2019.  
  2020. RFC 2165               Service Location Protocol               June 1997
  2021.  
  2022.  
  2023. 11. Service Deregister Message Format
  2024.  
  2025.    When a service is no longer available for use, the Service Agent must
  2026.    deregister itself from Directory Agents that it has been registered
  2027.    with.  A service uses the following PDU to deregister itself.
  2028.  
  2029.       0                   1                   2                   3
  2030.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2031.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2032.      |           Service Location header (function = SrvDereg)       |
  2033.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2034.      |         length of URL         |              URL              |
  2035.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2036.      |                                                               |
  2037.      \              URL of Service to Deregister, contd.             \
  2038.      |                                                               |
  2039.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2040.      |             (if present) authentication block .....
  2041.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2042.      |  length of <tag spec> string  |            <tag spec>         |
  2043.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2044.      |                                                               |
  2045.      \                     <tag spec>, continued                     \
  2046.      |                                                               |
  2047.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2048.  
  2049.    The Service Agent should retry this operation if there is no response
  2050.    from the Directory Agent.  The Directory Agent acknowledges this
  2051.    operation with a Service Acknowledgment message.  Once the Service
  2052.    Agent receives an acknowledgment indicating success, it can assume
  2053.    that the service is no longer advertised by the Directory Agent.  The
  2054.    Error Code in the Acknowledgment of the Service Deregistration may
  2055.    have the same values as described in section 10.
  2056.  
  2057.    The Service Deregister Information sent to the directory agent has
  2058.    the following form:
  2059.  
  2060.         service:<srvtype>://<addr-spec>
  2061.         Attribute tags (if any):  ATTR1,KEYWORD,ATTR2
  2062.  
  2063.    This will deregister the specified attributes from the service
  2064.    information from the directory agent.  If no attribute tags are
  2065.    included, the entire service information is deregistered in every
  2066.    language and every scope it was registered in.  To deregister the
  2067.    printer from the preceding example, use:
  2068.  
  2069.          service:lpr://igore.wco.ftp.com:515/draft
  2070.  
  2071.  
  2072.  
  2073.  
  2074. Veizades, et. al.           Standards Track                    [Page 37]
  2075.  
  2076. RFC 2165               Service Location Protocol               June 1997
  2077.  
  2078.  
  2079.    If the service was originally registered with a URL entry containing
  2080.    a URL authentication block, then the Service Deregistration message
  2081.    header MUST have the 'U' bit set, and the URL entry is then followed
  2082.    by the authentication block, with the authenticator calculated over
  2083.    the URL data, the timestamp, and the length of the authenticator as
  2084.    explained in section 4.3.  In this calculation, the lifetime of the
  2085.    URL data is considered to be zero, no matter what the current value
  2086.    for the remaining lifetime of the registered URL.
  2087.  
  2088. 12. Attribute Request Message Format
  2089.  
  2090.    The Attribute Request is used to obtain attribute information.  The
  2091.    UA supplies a request and the appropriate attribute information is
  2092.    returned.
  2093.  
  2094.    If the UA supplies only a Service Type, then the reply includes all
  2095.    attributes and all values for that Service Type.  The reply includes
  2096.    only those attributes for which services exist and are advertised by
  2097.    the DA or SA which received the Attribute Request.  Since different
  2098.    instances of a given service can, and very likely will, have
  2099.    different values for the attributes defined by the Service Type, the
  2100.    User Agent must form a union of all attributes returned by all
  2101.    service Agents.  The Attribute information will be used to form
  2102.    Service Requests.
  2103.  
  2104.    If the UA supplies a URL, the reply will contain service information
  2105.    corresponding to that URL.
  2106.  
  2107.    Attribute Requests include a 'select clause'.  This may be used to
  2108.    limit the amount of information returned.  If the select clause is
  2109.    empty, all information is returned.  Otherwise, the UA supplies a
  2110.    comma delimited list of attribute tags and keywords.  If the
  2111.    attribute or keyword is defined for a service, it will be returned in
  2112.    the Attribute Reply, along with all registered values for that
  2113.    attribute.  If the attribute selected has not been registered for
  2114.    that URL or Service Type, the attribute or keyword information is
  2115.    simply not returned.
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130. Veizades, et. al.           Standards Track                    [Page 38]
  2131.  
  2132. RFC 2165               Service Location Protocol               June 1997
  2133.  
  2134.  
  2135.    The Attribute Request message has the following form:
  2136.  
  2137.       0                   1                   2                   3
  2138.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2139.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2140.      |         Service Location header (function = AttrRqst)         |
  2141.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2142.      |length of prev resp list string|<Previous Responders Addr Spec>|
  2143.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2144.      |                                                               |
  2145.      \         <Previous Responders Addr Spec>, continued            \
  2146.      |                                                               |
  2147.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2148.      |         length of URL         |              URL              |
  2149.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2150.      |                                                               |
  2151.      \                         URL, continued                        \
  2152.      |                                                               |
  2153.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2154.      |        length of <Scope>      |           <Scope>             |
  2155.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2156.      |                                                               |
  2157.      \                      <Scope>, continued                       \
  2158.      |                                                               |
  2159.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2160.      |   length of <select-list>     |        <select-list>          |
  2161.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2162.      |                                                               |
  2163.      \                   <select-list>, continued                    \
  2164.      |                                                               |
  2165.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2166.  
  2167.  
  2168.    The <Previous Responder Address List> functions exactly as introduced
  2169.    in Section 7.  See also Section 20.1.
  2170.  
  2171.    The URL can take two forms:  Either it is simply a Service Type, such
  2172.    as "service:http:", or it can be a URL, such as
  2173.    "service:lpr://igore.wco.ftp.com:515/draft".  In the former case, all
  2174.    attributes and the full range of values for each attribute for the
  2175.    Service Type is returned.  In the latter case, only the attributes
  2176.    for the service whose URL is defined are returned.
  2177.  
  2178.    The Scope String is provided so that Attribute Requests for Service
  2179.    Types can be made so that only the Attribute information pertaining
  2180.    to a specific scope will be returned.  This field is ignored in the
  2181.    case when a full URL is sent in the Attribute Request.  The rules for
  2182.    encoding of the Scope String are given in Section 5.4.
  2183.  
  2184.  
  2185.  
  2186. Veizades, et. al.           Standards Track                    [Page 39]
  2187.  
  2188. RFC 2165               Service Location Protocol               June 1997
  2189.  
  2190.  
  2191.    The select list takes the form:
  2192.  
  2193.     <select-list>  ::= <select-item> |
  2194.                        <select-item> ',' <select-list>
  2195.  
  2196.     <select-item>  ::= <keyword> | <attr-tag> | <partial-tag> '*'
  2197.  
  2198.     <partial-tag>  ::= the partial class name of an attribute
  2199.                        If followed by an '*', it matches all class names
  2200.                        which begin with the partial tag.  If preceded by
  2201.                        a partial tag.  If both preceded and followed by
  2202.                        '*' it matches all class names which contain the
  2203.                        partial tag.
  2204.  
  2205.    For definitions of <attr-tag> and <keyword> see 5.4.
  2206.  
  2207.    An example of a select-list following the printer example is:
  2208.  
  2209.    PAGES PER MINUTE, UNRESTRICTED_ACCESS, LOCATION
  2210.  
  2211.    If sent to a Directory Agent, the number of previous responders is
  2212.    zero and there are no Previous Responder Address Specification.
  2213.    These fields are only used for repeated multicasting, exactly as for
  2214.    the Service Request.
  2215.  
  2216. 13. Attribute Reply Message Format
  2217.  
  2218.    An Attribute Reply Message takes the form:
  2219.  
  2220.       0                   1                   2                   3
  2221.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2222.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2223.      |         Service Location header (function = AttrRply)         |
  2224.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2225.      |         Error Code            |  length of <attr-list> string |
  2226.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2227.      |                                                               |
  2228.      \                          <attr-list>                          \
  2229.      |                                                               |
  2230.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2231.  
  2232.    The Error Code may have the following values:
  2233.  
  2234.       0        Success
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242. Veizades, et. al.           Standards Track                    [Page 40]
  2243.  
  2244. RFC 2165               Service Location Protocol               June 1997
  2245.  
  2246.  
  2247.       LANGUAGE_NOT_SUPPORTED
  2248.                A SA or DA returns this when a request is received from a
  2249.                UA which is in a language for which there is no
  2250.                registered Service Information and the request arrived
  2251.                with the Monolingual bit set.  See Section 17.
  2252.  
  2253.       PROTOCOL_PARSE_ERROR
  2254.                A DA or SA returns this error when a AttrRqst is received
  2255.                which cannot be parsed or the declared string lengths
  2256.                overrun the message.
  2257.  
  2258.       SCOPE_NOT_SUPPORTED
  2259.                A DA which is configured to have a scope will return this
  2260.                error if it receives an AttrRqst which is set to have a
  2261.                scope which it does not support.  SAs will silently
  2262.                discard multicast AttrRqst messages for scopes they do
  2263.                not support.
  2264.  
  2265.       CHARSET_NOT_UNDERSTOOD
  2266.                If the DA receives an AttrRqst in a character set which
  2267.                it does not support, it will return this error.  SAs will
  2268.                silently discard multicast AttrRqst messages which arrive
  2269.                using character sets they do not support.
  2270.  
  2271.    The <attr-list> (attribute list) has the same form as the attribute
  2272.    list in a Service Registration, see Section 20.3 for a formal
  2273.    definition of this field.
  2274.  
  2275.    An Attribute Request for "lpr" might elicit the following reply
  2276.    (UNRESTRICTED_ACCESS is a keyword):
  2277.  
  2278.          (PAPER COLOR=WHITE,BLUE),
  2279.          (PAPER SIZE=LEGAL,LETTER,ENVELOPE,TRACTOR FEED),
  2280.          UNRESTRICTED_ACCESS,
  2281.          (PAGES PER MINUTE=1,3,12),
  2282.          (LOCATION=12th, NEAR ARUNA'S OFFICE),
  2283.          (QUEUES=LEGAL,LETTER,ENVELOPE,LETTER HEAD)
  2284.  
  2285.    If the message header has the 'A' bit set, the Attribute Reply will
  2286.    have an Attribute Authentication block set.  In this case, the
  2287.    Attribute Authenticator must be returned with the entire list of
  2288.    attributes, exactly as it was registered by an SA in a protected
  2289.    scope.  In this case, the URL was registered in a protected scope and
  2290.    the UA included a URL but not a select clause.  If the AttrRqst
  2291.    specifies that only certain attributes are to be returned, the DA
  2292.    does not (typically cannot) compute a new Authenticator so it simply
  2293.    returns the attributes without an authenticator block.
  2294.  
  2295.  
  2296.  
  2297.  
  2298. Veizades, et. al.           Standards Track                    [Page 41]
  2299.  
  2300. RFC 2165               Service Location Protocol               June 1997
  2301.  
  2302.  
  2303.    A UA which wishes to obtain authenticated attributes for a service in
  2304.    a protected scope MUST therefore must include a particular URL and no
  2305.    select list with the AttrRqst.
  2306.  
  2307. 14. Directory Agent Advertisement Message Format
  2308.  
  2309.    Directory Agent Advertisement Messages have the following format:
  2310.  
  2311.       0                   1                   2                   3
  2312.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2313.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2314.      |          Service Location header (function = DAAdvert)        |
  2315.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2316.      |           Error Code          |         Length of URL         |
  2317.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2318.      |                                                               |
  2319.      \                              URL                              \
  2320.      |                                                               |
  2321.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2322.      |     Length of <Scope-list>    |          <Scope-list>         |
  2323.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2324.      |                                                               |
  2325.      \                    <Scope-list>, continued                    \
  2326.      |                                                               |
  2327.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2328.  
  2329.    The Error Code is set when a DA Advertisement is returned as the
  2330.    result of a Service Request.  It will always be set to 0 in the case
  2331.    of an unsolicited DA Advertisement.  The Error Code may take the
  2332.    values specified in Section 6.
  2333.  
  2334.    The URL corresponds to the Directory Agent's location.  The <Scope-
  2335.    list> is a comma delimited list of scopes which the DA supports, in
  2336.    the following format:
  2337.  
  2338.          <Scope-list>    ::=    <Scope> | <Scope-list> ',' <Scope>
  2339.          <Scope>         ::=    String representing a scope
  2340.  
  2341.    See Section 5.4 for the lexical rules regarding <Scope>.
  2342.  
  2343.    DA Advertisements sent in reply to a Directory Agent Discovery
  2344.    Request has the same format as the unsolicited DA Advertisement, for
  2345.    example:
  2346.  
  2347.       URL:        service:directory-agent://SLP-RESOLVER.CATCH22.COM
  2348.       SCOPE List: ADMIN
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354. Veizades, et. al.           Standards Track                    [Page 42]
  2355.  
  2356. RFC 2165               Service Location Protocol               June 1997
  2357.  
  2358.  
  2359.    The Directory Agent can be reached at the Address Specification
  2360.    returned, and supports the SCOPE called "ADMIN".
  2361.  
  2362. 15. Directory Agents
  2363.  
  2364. 15.1. Introduction
  2365.  
  2366.    A Directory Agent acts on behalf of many Service Agents.  It acquires
  2367.    information from them and acts as a single point of contact to supply
  2368.    that information to User Agents.
  2369.  
  2370.    The queries that a User Agent multicasts to Service Agents (in an
  2371.    environment without a Directory Agent) are the same as queries that
  2372.    the User Agent might unicast to a Directory Agent.  A User Agent may
  2373.    cache information about the presence of alternate Directory Agents to
  2374.    use in case a selected Directory Agent fails.
  2375.  
  2376.    Aside from enhancing the scalability of the protocol (see section
  2377.    3.7), running multiple DAs provides robustness of operation.  The DAs
  2378.    may have replicated service information which remain accessible even
  2379.    when one of the DAs fail.  Directory Agents, in the future, may use
  2380.    mechanisms outside of this protocol to coordinate the maintenance of
  2381.    a distributed database of Service Location information, and thus
  2382.    scale to enterprise networks or larger administrative domains.
  2383.  
  2384.    Each Service Agent must register with all DAs they are configured to
  2385.    use.  UAs may choose among DAs they are configured to use.
  2386.  
  2387.    Locally, Directory Agent consistency is guaranteed using mechanisms
  2388.    in the protocol.  There isn't any Directory to Directory Agent
  2389.    protocol yet.  Rather, passive detection of DAs by SAs ensures that
  2390.    eventually service information will be registered consistently
  2391.    between DAs.  Invalid data will age out of the Directory Agents
  2392.    leaving only transient stale registrations even in the case of a
  2393.    failure of a Service Agent.
  2394.  
  2395. 15.2. Finding Directory Agents
  2396.  
  2397.    A User or Service Agent may be statically configured to use a
  2398.    particular DA. This is discouraged unless the application resides on
  2399.    a network where any form of multicast or broadcast is impossible.
  2400.  
  2401.    Alternatively, a host which uses DHCP [2, 11] may use it to obtain a
  2402.    Directory Agent's address.  DHCP options 78 and 79 have been assigned
  2403.    for this purpose [21].
  2404.  
  2405.    The third way to discover DAs is dynamically.  This is done by
  2406.    sending out a Directory Agent Discovery request (see Section 5.2).
  2407.  
  2408.  
  2409.  
  2410. Veizades, et. al.           Standards Track                    [Page 43]
  2411.  
  2412. RFC 2165               Service Location Protocol               June 1997
  2413.  
  2414.  
  2415.    Lastly, the agent may be informed passively as follows:
  2416.  
  2417.    When a Directory Agent first comes on-line it sends an unsolicited DA
  2418.    Advertisement to the Service Location general multicast address.  If
  2419.    a DA supports a particular scope or set of scopes these are placed in
  2420.    the reply.  The class for this attribute is 'SCOPE'.
  2421.  
  2422.    Every CONFIG_INTERVAL_9 a Directory Agent will send an unsolicited DA
  2423.    Advertisement.  This will ensure that eventually it will be
  2424.    discovered by all applications which are concerned.
  2425.  
  2426.    When a Directory Agent first comes up it begins with 0 as its XID,
  2427.    and increments this by one each time it sends an unsolicited DA
  2428.    Advertisement.  When the counter wraps, it should go from 0xFFFF to
  2429.    0x0100, not 0.
  2430.  
  2431.    If the Directory Agent has stored all of the service information in a
  2432.    nonvolatile store, it should initially set the XID to 0x100, as it is
  2433.    not coming up 'stateless.'  If it stores service registrations in
  2434.    memory only, it will restart without any state.  It should indicate
  2435.    this by resetting its XID to 0.
  2436.  
  2437.    All Service Agents which receive the unsolicited DA Advertisement
  2438.    should examine its XID. If the Directory Agent has never before been
  2439.    heard from or if the XID is less than it was previously and less than
  2440.    256, the Service Agent should assume the DA does not have its service
  2441.    registration, even if it once did.  If this is the case and the DA
  2442.    has the proper scope, the SA should register all service information
  2443.    with the Directory Agent, after waiting a random interval
  2444.    CONFIG_INTERVAL_10.
  2445.  
  2446.    When a Service Agent or User Agent first comes on-line it must issue
  2447.    a Directory Agent Discovery Request unless it is using static or DHCP
  2448.    configuration, as described in 5.2.
  2449.  
  2450.    A Service Agent registers information with ALL newly discovered
  2451.    Directory Agents when either of the above two events take place.
  2452.    When scopes are being used, a Service Agent SHOULD choose a set of
  2453.    scopes to be advertised in and need only register with Directory
  2454.    Agents that support the scopes in which they wish to be registered.
  2455.    Services MUST be registered with DAs that support their scope and
  2456.    those which have no scope, unless specifically configured not to do
  2457.    so (see section 22.1.)
  2458.  
  2459.  
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466. Veizades, et. al.           Standards Track                    [Page 44]
  2467.  
  2468. RFC 2165               Service Location Protocol               June 1997
  2469.  
  2470.  
  2471.    Once a User Agent becomes aware of a Directory Agent it will unicast
  2472.    its queries there.  In the event that more than one Directory Agent
  2473.    is detected, it will select one to communicate with.  When scopes are
  2474.    supported, the User Agent will direct its queries to different
  2475.    Directory Agents depending on which scopes are appropriate domains
  2476.    for the query to be answered in.
  2477.  
  2478.    The protocol will cause all DAs (of the same scope) to eventually
  2479.    obtain consistent information.  Thus one DA should be as good as any
  2480.    other for obtaining service information.  There may be temporary
  2481.    inconsistencies between DAs.
  2482.  
  2483. 16. Scope Discovery and Use
  2484.  
  2485.    The scope mechanism in the Service Location Protocol enhances its
  2486.    scalability.  The primary use of scopes is to provide the capability
  2487.    to organize a site network along administrative lines.  A set of
  2488.    services can be assigned to a given department of an organization, to
  2489.    a certain building or geographical area or for a certain purpose.
  2490.    The users of the system can be presented with these organizational
  2491.    elements as a top level selection, before services within this domain
  2492.    are sought.
  2493.  
  2494.    A site network that has grown beyond a size that can be reasonably
  2495.    serviced by a few DAs can use the scope mechanism.  DAs have the
  2496.    attribute class "SCOPE".  The values for this attribute are a list of
  2497.    strings that represent the administrative areas for which this
  2498.    Directory Agent is configured.  The semantics and language of the
  2499.    strings used to describe the scope are almost entirely the choice of
  2500.    the administrative entity of the particular domain in which these
  2501.    scopes exist.  The values of SCOPE should be configurable, so the
  2502.    system administrator can set its value.  The scopes "LOCAL" and
  2503.    "REMOTE" are reserved and SHOULD NOT be used.  Use of these reserved
  2504.    values is to be defined in a future protocol document.
  2505.  
  2506.    Services with the attribute SCOPE should only be registered with DAs
  2507.    which support the same scope or DAs which have no scope.
  2508.  
  2509.    Directory Agents advertise their available scopes.  A Service Agent
  2510.    may then choose a scope in which to register, and SHOULD register
  2511.    with all Directory Agents in that scope, as well as all DAs which
  2512.    have no scope.  Failure to be comprehensive in registration according
  2513.    to this rule will mean that the service advertisement may not be
  2514.    available to all User Agents.
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522. Veizades, et. al.           Standards Track                    [Page 45]
  2523.  
  2524. RFC 2165               Service Location Protocol               June 1997
  2525.  
  2526.  
  2527.    A Directory Agent which has a scope will return advertisements in
  2528.    response to Directory Agent Discovery requests with the scope
  2529.    information included.  Note that the "service:directory-agent" scheme
  2530.    is registered with the IANA naming authority (which is automatically
  2531.    selected by leaving the Naming Authority field empty.)
  2532.  
  2533.    The query:
  2534.  
  2535.          directory-agent/MATH DEPT//
  2536.  
  2537.    Could receive the following DA Advertisement:
  2538.  
  2539.       Returned URL:        service:directory-agent://diragent.blah.edu
  2540.       Returned SCOPE:      MATH DEPT
  2541.  
  2542.    The same Directory Agent if it had no scope value would reply:
  2543.  
  2544.       Returned URL:        service:directory-agent://diragent.void.com
  2545.       Returned SCOPE:
  2546.  
  2547.    If a Directory Agent supported more than one scope it would reply as:
  2548.  
  2549.       Returned URL:        service:directory-agent://srv.domain.org
  2550.       Returned SCOPE:      MATH DEPT,ENGLISH DEPT,CS DEPT
  2551.  
  2552.    A DA which has no scope will reply to any Directory Agent Discovery
  2553.    Request.
  2554.  
  2555.    Being a member of a scope means that an agent SHOULD use those
  2556.    Directory Agents that support its scope.  User Agents send all
  2557.    requests to DAs which support the indicated scope.  Services are
  2558.    registered with the DA(s) in their scope.  For a UA to find a service
  2559.    that is registered in a particular scope it must send requests to a
  2560.    DA which supports the indicated scope.  There is no limitation on
  2561.    scope membership built into the protocol; that is to say, a User
  2562.    Agent or Service Agent may be a member of more than one scope.
  2563.    Membership is open to all, unless some external authorization
  2564.    mechanism is added to limit access.
  2565.  
  2566. 16.1. Protected Scopes
  2567.  
  2568.    Scope membership MAY also define the security access and
  2569.    authorization for services in the scope; such scopes are called
  2570.    protected scopes.  If a User Agent wishes to be sure that Service
  2571.    Agents are authorized to provide the service they advertise, then the
  2572.    User Agent should request services from a protected scope which has
  2573.    been configured to have the necessary authentication mechanism and
  2574.    keys distributed to the Service Agents within the scope.  A directory
  2575.  
  2576.  
  2577.  
  2578. Veizades, et. al.           Standards Track                    [Page 46]
  2579.  
  2580. RFC 2165               Service Location Protocol               June 1997
  2581.  
  2582.  
  2583.    agent distributing URLs for services in a protected scope will reject
  2584.    any registrations or deregistrations for service agents which cannot
  2585.    provide cryptographically strong authentication to prove their
  2586.    authorization to provide the services.
  2587.  
  2588.    For instance, if a campus registrar wishes to find a working printer
  2589.    to produce student grade information for mailing, the registrar would
  2590.    require the printing user agent to transmit the printable output only
  2591.    to those printing Service Agents which have been registered in the
  2592.    appropriate protected scope.  Notice that each service agent is,
  2593.    under normal circumstances, validated two times:  once when
  2594.    registering with the directory agent, and once when the user agent
  2595.    validates the URL received with the Service Reply.  This protects
  2596.    against the possibilities of malicious Directory Agents as well as
  2597.    malicious Service Agents.
  2598.  
  2599.    Note that services in protected scopes provide separate
  2600.    authentication for their URL entry, and for their attributes.  This
  2601.    follows naturally from the needs of the protocol operation.  User
  2602.    Agents which specify a service type and attributes needed for service
  2603.    in that service type will not receive attribute information from the
  2604.    directory agent; they will only receive the appropriate URL entries.
  2605.    Only the information returned needs to be authenticated.
  2606.  
  2607.    User agents which receive attribute information for a particular URL
  2608.    (see section 12), on the other hand, need to authenticate the
  2609.    attributes when they are returned (see section 13).  In this case,
  2610.    there may be much more data to authenticate, but this operation is
  2611.    also performed much less often, usually only while the user is
  2612.    browsing the available network resources.
  2613.  
  2614. 17. Language and Character Encoding Issues
  2615.  
  2616.    All Service Registrations declare the language in which the strings
  2617.    in the service attributes are written by specifying the appropriate
  2618.    code in the message header.  For each language the Service advertises
  2619.    a separate registration takes place.  Each of these registrations
  2620.    uses the same URL to indicate that they refer to the same service.
  2621.  
  2622.    If a Service is fully deregistered (the URL is given in the Service
  2623.    Deregister request, without any attribute information) then the
  2624.    Service needs to be deregistered only once.  This will effectively
  2625.    deregister the service in all languages it has been registered in.
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634. Veizades, et. al.           Standards Track                    [Page 47]
  2635.  
  2636. RFC 2165               Service Location Protocol               June 1997
  2637.  
  2638.  
  2639.    If, on the other hand, attribute information is included in the
  2640.    Service Deregistration request, a separate Service Deregistration of
  2641.    selected attributes must be undertaken in each language in which
  2642.    service information has been provided to the DA by a Service Agent.
  2643.    Service Registrations in different languages are mutually
  2644.    unintelligible.  They share no information except for their service
  2645.    type and URL with which they were registered.  No attempt is made to
  2646.    match queries with "language independence." Instead, queries are
  2647.    handled using string matching against registrations in the same
  2648.    language as the query.
  2649.  
  2650.    Service Types which are standardized will have definitions for all
  2651.    attributes and value strings.  Official translations to other
  2652.    languages of the attribute tags and values may be created and
  2653.    submitted as part of the standard; this is not feasible for all
  2654.    languages.  For those languages which are not defined as part of the
  2655.    Service Type, a best effort translation of the standard definitions
  2656.    of the Service type's attribute strings MAY be used.
  2657.  
  2658.    All Service Requests specify a requested language in the message
  2659.    header.  The Directory Agent or Service Agent will respond in the
  2660.    same language as the request, if it has a registration in the same
  2661.    language as the request.  If this language is not supported, and the
  2662.    Monolingual bit is not specified, a reply can be sent in the default
  2663.    language (which is English.)  If the 'monolingual bit' flag in the
  2664.    header is set and the requested language is not supported, a SrvRply
  2665.    is returned with the error field set to LANGUAGE_NOT_SUPPORTED.
  2666.  
  2667.    If a query is in a supported language on a SA or DA, but has a
  2668.    different dialect than the available service information, the query
  2669.    MUST be serviced on a best-effort basis.  If possible, the query
  2670.    should be matched against the same dialect.  If that is not possible,
  2671.    it MAY be matched against any dialect of the same language.
  2672.  
  2673. 17.1. Character Encoding and String Issues
  2674.  
  2675.    Values for character encoding can be found in IANA's database
  2676.          http://www.isi.edu/in-notes/iana/assignments/character-sets
  2677.    and have the values referred by the MIBEnum value.
  2678.  
  2679.    The encoding will determine the interpretation of all character data
  2680.    which follows the Service Location Protocol header.  There is no way
  2681.    to mix ASCII and UNICODE, for example.  All responses must be in the
  2682.    character set of the request, or use US-ASCII. If a request is sent
  2683.    to a DA or SA or a registration is sent to a DA, which is unable to
  2684.    manipulate or store the character set of the incoming message, the
  2685.    request will fail.  The SA or DA returns a CHARSET_NOT_UNDERSTOOD
  2686.    error in a SrvAck message in this case.  Requests using US-ASCII will
  2687.  
  2688.  
  2689.  
  2690. Veizades, et. al.           Standards Track                    [Page 48]
  2691.  
  2692. RFC 2165               Service Location Protocol               June 1997
  2693.  
  2694.  
  2695.    never fail for this reason, since all SAs and DAs must be able to
  2696.    accept this character set.
  2697.  
  2698.    Certain characters are illegal in certain contexts of the protocol.
  2699.    Since the protocol is largely character string based, in some
  2700.    contexts characters are used as protocol delimiters.  In these cases
  2701.    the delimiting characters must not be used as 'data text.'
  2702.  
  2703. 17.1.1. Substitution of Character Escape Sequences
  2704.  
  2705.    The Service Location Protocol has an 'escape mechanism' which is
  2706.    consistent with HTTP 2.0 [5] and SGML [15].  If the character
  2707.    sequence "&#" is followed by one or more digits, followed by a
  2708.    semicolon ';' the entire sequence is interpreted as a single
  2709.    character.  The digits are interpreted as a decimal value in the
  2710.    character set of the request, as specified by the header.  Thus, in
  2711.    US-ASCII , would be interpreted as a comma.  Substitution of
  2712.    these escape strings must be done in all <attr-list> and strings
  2713.    present in SrvReq and AttrRqst messages.  Only numerical character
  2714.    references are accepted, not 'Entity References,' as defined in HTML.
  2715.    These escape values should only be used to provide a mechanism for
  2716.    including reserved characters in attribute tag and value strings.
  2717.  
  2718.    The interpretation of these escape values is different than in HTML
  2719.    in one respect:  In HTML the escape values are considered to be in
  2720.    the ISO Latin-1 character set.  In Service Location they are
  2721.    interpreted in the character set defined in the header of the
  2722.    message.
  2723.  
  2724.    This escape mechanism allows characters like commas to be included in
  2725.    attribute tags and values, which would otherwise be illegal as the
  2726.    comma is a protocol delimiter.
  2727.  
  2728.    Attribute tags and values of different languages are considered to be
  2729.    mutually unintelligible.  A query in one language SHOULD use service
  2730.    information registered in that language.
  2731.  
  2732. 17.2. Language-Independent Strings
  2733.  
  2734.    Some strings, such as Service Type names, have standard definitions.
  2735.    These strings should be considered as tokens and not as words in a
  2736.    language to be translated.
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746. Veizades, et. al.           Standards Track                    [Page 49]
  2747.  
  2748. RFC 2165               Service Location Protocol               June 1997
  2749.  
  2750.  
  2751.     Reserved String Section xDefinition
  2752.     --------------- ------- --------------------------------------
  2753.     SCOPE           3, 15   Used to limit the matching of requests.
  2754.     SERVICE         6, 9    The URL scheme of all Service Location
  2755.                             information registered with a DA or
  2756.                             returned from a Service Request.
  2757.     <srvtype>       20.2.1  Used in all service registrations
  2758.                             and replies.
  2759.     domain names    20.4    A fully qualified domain name, used
  2760.                             in registrations and replies.
  2761.     IANA            3.3     The default naming authority.
  2762.     LOCAL           16      Reserved.
  2763.     REMOTE          16      Reserved.
  2764.     TRUE            20.5    Boolean true.
  2765.     FALSE           20.5    Boolean false.
  2766.  
  2767.  
  2768. 18. Service Location Transactions
  2769.  
  2770. 18.1. Service Location Connections
  2771.  
  2772.    When a Service Location Request or Attribute Request results in a UDP
  2773.    reply from a Service or Directory Agent that will overflow a
  2774.    datagram, the User Agent can open a connection to the Agent and
  2775.    reissue the request over the connection.  The reply will be returned
  2776.    with the overflow bit set (see section 4).  The reply will contain as
  2777.    much data as will fit into a single datagram.  If no MTU information
  2778.    is available for the route, assume that the MTU is 1400; this value
  2779.    is configurable (see section 22).
  2780.  
  2781.    When a request results in overflowed data that cannot be correctly
  2782.    parsed (say, because of duplicate or dropped IP datagrams), a User
  2783.    Agent that wishes to reliably obtain the overflowed data must
  2784.    establish a TCP connection with the Directory Agent or Service Agent
  2785.    with the data.  When the request is sent again with a new XID, the
  2786.    reply is returned over the connection.
  2787.  
  2788.    When registration data exceeds one datagram in length, the Service
  2789.    Registration should be made by establishing a connection with a
  2790.    Directory Agent and sending the registration over the connection
  2791.    stream.
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802. Veizades, et. al.           Standards Track                    [Page 50]
  2803.  
  2804. RFC 2165               Service Location Protocol               June 1997
  2805.  
  2806.  
  2807.    Directory Agents and Service Agents must respond to connection
  2808.    requests; services whose registration data can overflow a datagram
  2809.    must be able to use TCP to send the registration.  User Agents should
  2810.    be able to make Service and Attribute Requests using TCP. If they
  2811.    fail to implement this, they must be able to interpret partial
  2812.    replies and/or reissue requests with more selective criteria to
  2813.    reduce the size of the replies.
  2814.  
  2815.    A connection initiated by an Agent may be used for a single
  2816.    transaction.  It may also be used for multiple transactions.  Since
  2817.    there are length fields in the message headers, the Agents may send
  2818.    multiple requests along a connection and read the return stream for
  2819.    acknowledgments and replies.
  2820.  
  2821.    The initiating agent is responsible for closing the TCP connection.
  2822.    The DA should wait at least CONFIG_INTERVAL_12 before closing an idle
  2823.    connection.  DAs and SAs SHOULD eventually close idle connections to
  2824.    ensure robust operation, even when the agent which opened a
  2825.    connection neglects to close it.
  2826.  
  2827. 18.2. No Synchronous Assumption
  2828.  
  2829.    There is no requirement that one transaction complete before a given
  2830.    host begins another.  An agent may have multiple outstanding
  2831.    transactions, initiated either using UDP or TCP.
  2832.  
  2833. 18.3. Idempotency
  2834.  
  2835.    All Service Location actions are idempotent.  Of course registration
  2836.    and deregistration will change the state of a DA, but repeating these
  2837.    actions with the same XID will have exactly the same effect each
  2838.    time.  Repeating a registration with a new XID has the effect of
  2839.    extending the lifetime of the registration.
  2840.  
  2841. 19. Security Considerations
  2842.  
  2843.    The Service Location Protocol provides for authentication of Service
  2844.    Agents as part of the scope mechanism, and consequently, integrity of
  2845.    the data received as part of such registrations.  Service Location
  2846.    does not provide confidentiality.  Because the objective of this
  2847.    protocol is to advertise services to a community of users,
  2848.    confidentiality might not generally be needed when this protocol is
  2849.    used in non-sensitive environments.  Specialized schemes might be
  2850.    able to provide confidentiality, if needed in the future.  Sites
  2851.    requiring confidentiality should implement the IP Encapsulating
  2852.    Security Payload (ESP) [3] to provide confidentiality for Service
  2853.    Location messages.
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Veizades, et. al.           Standards Track                    [Page 51]
  2859.  
  2860. RFC 2165               Service Location Protocol               June 1997
  2861.  
  2862.  
  2863.    Using unprotected scopes, an adversary might easily use this protocol
  2864.    to advertise services on servers controlled by the adversary and
  2865.    thereby gain access to users' private information.  Further, an
  2866.    adversary using this protocol will find it much easier to engage in
  2867.    selective denial of service attacks.  Sites that are in potentially
  2868.    hostile environments (e.g.  are directly connected to the Internet)
  2869.    should consider the advantages of distributing keys associated with
  2870.    protected scopes prior to deploying the sensitive directory agents or
  2871.    service agents.
  2872.  
  2873.    Service Location is useful as a bootstrap protocol.  It may be used
  2874.    in environments in which no preconfiguration is possible.  In such
  2875.    situations, a certain amount of "blind faith" is required:  Without
  2876.    any prior configuration it is impossible to use any of the security
  2877.    mechanisms described above.  Service Location will make use of the
  2878.    mechanisms provided by the Security Area of the IETF for key
  2879.    distribution as they become available.  At this point it would only
  2880.    be possible to gain the benefits associated with the use of protected
  2881.    scopes if some cryptographic information can be preconfigured with
  2882.    the end systems before they use Service Location.  For User Agents,
  2883.    this could be as simple as supplying the public key of a Certificate
  2884.    Authority.  See Appendix B.
  2885.  
  2886. 20. String Formats used with Service Location Messages
  2887.  
  2888.    The following section supplies formal definitions for fields and
  2889.    protocol elements introduced in the sections indicated.
  2890.  
  2891.       Protocol Element                      Defined in         Used in
  2892.       -----------------------------------   ------------     ------------
  2893.       <Previous Responders' Addr Spec>      20.1             SrvReq
  2894.       Service Request <predicate>           5.4              SrvReq
  2895.       URL                                   20.2             SrvReg,
  2896.                                                                SrvDereg,
  2897.                                                                SrvRply
  2898.       <attr-list>                           20.3             SrvReg,
  2899.                                                                SrvRply,
  2900.                                                                AttrRply
  2901.       <Service Registration Information>    9                SrvReg
  2902.       <Service Deregister Information>      11               SrvDereg
  2903.       <Service Type String>                 20.2.1           AttrRqst
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914. Veizades, et. al.           Standards Track                    [Page 52]
  2915.  
  2916. RFC 2165               Service Location Protocol               June 1997
  2917.  
  2918.  
  2919. 20.1. Previous Responders' Address Specification
  2920.  
  2921.    The previous responders' Address Specification is specified as
  2922.  
  2923.       <Previous Responders' Address Specification> ::=
  2924.              <addr-spec> |
  2925.              <addr-spec>, <Previous Responders' Address Specification>
  2926.  
  2927.    i.e., a list separated by commas with no intervening white space.
  2928.    The Address Specification is the address of the Directory Agent or
  2929.    Service Agent which supplied the previous response.  The format for
  2930.    Address Specifications in Service Location is defined in section
  2931.    20.4.  The comma delimiter is required between each <addr-spec>.  The
  2932.    use of dotted decimal IP address notation should only be used in
  2933.    environments which have no Domain Name Service.
  2934.  
  2935.    Example:
  2936.  
  2937.          RESOLVO.NEATO.ORG,128.127.203.63
  2938.  
  2939. 20.2. Formal Definition of the "service:"  Scheme
  2940.  
  2941.    A URL with a "service:"  scheme is used in the SrvReg, SrvDereg,
  2942.    SrvRply and AttrRqst messages in Service Location.  URLs are defined
  2943.    in RFC 1738 [6].  A URL with the "service:"  scheme must contain at
  2944.    least:
  2945.  
  2946.    <url> ::= service:<srvtype>://<addr-spec>
  2947.  
  2948.    where:
  2949.  
  2950.       service       the URL scheme for Service Location, to return
  2951.                     Replies.
  2952.  
  2953.       <srvtype>     a string; Service Types may be standardized
  2954.                     by developing a specification for the "service
  2955.                     type"-specific part and registering it with IANA.
  2956.                     See sections 20.2.1 and 3.3.
  2957.  
  2958.       <addr-spec>   the service access point of the service.  It is the
  2959.                     network address or domain name where the service can
  2960.                     be accessed.  See section 20.4.
  2961.  
  2962.    The "service:"  scheme may be followed by any legal URL. The a
  2963.    particular service.  The protocol used to access the service at the
  2964.    given service access <addr-spec> may be implicit in the Service Type
  2965.    name.  If this is not the case, the Service Type MUST be defined in
  2966.    such a way that attribute information will include all necessary
  2967.  
  2968.  
  2969.  
  2970. Veizades, et. al.           Standards Track                    [Page 53]
  2971.  
  2972. RFC 2165               Service Location Protocol               June 1997
  2973.  
  2974.  
  2975.    configuration and protocol information.  A User Agent MUST therefore
  2976.    be able to use either a "service:"  URL alone or a "service:"  URL in
  2977.    conjunction with service attributes to make use of a service.
  2978.  
  2979. 20.2.1. Service Type String
  2980.  
  2981.    The Service Type is a string describing the type of service.  These
  2982.    strings may only be comprised of alphanumeric characters, '+', and
  2983.    Type names.
  2984.  
  2985.    If the Service Type name is followed by a '.'  and a string (which
  2986.    has the same limitations) the 'suffix' is considered to be the Naming
  2987.    Authority of the service.  If the Naming Authority is omitted, IANA
  2988.    is assumed to be the Naming Authority.
  2989.  
  2990.    Service Types developed for in-house or experimental use may have any
  2991.    name and attribute semantics provided that they do not conflict with
  2992.    the standardized Service Types.
  2993.  
  2994. 20.3. Attribute Information
  2995.  
  2996.    The <attr-list> is returned in the Attribute Reply if the Attribute
  2997.    Request does not result in an empty result.
  2998.  
  2999.    <attr-list> ::= <attribute> | <attribute>, <attr-list>
  3000.    <attribute> ::= (<attr-tag>=<attr-val-list>) | <keyword>
  3001.    <attr-val-list> ::= <attr-val> | <attr-val>, <attr-val-list>
  3002.  
  3003.    An <attr-list> must be scanned prior to evaluation for all
  3004.    occurrences of the string "&#" followed by one or more digit followed
  3005.    by ';'.  See Section 17.1.1.
  3006.  
  3007.    A keyword has only an <attr-tag>, and no values.
  3008.  
  3009.    A comma cannot appear in an <attr-val>, as the comma is used as the
  3010.    multiple value delimiter.  Examples of an <attr-list> are:
  3011.  
  3012.          (SCOPE=ADMINISTRATION)
  3013.          (COLOR=RED, WHITE, BLUE)
  3014.          (DELAY=10 MINS),BUSY,(LATEST BUILD=10-5-95),(PRIORITY=L,M,H)
  3015.  
  3016.    The third example has three attributes in the list.  Color can take
  3017.    on the values red, white and blue.  There are several other examples
  3018.    of replies throughout the document.
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026. Veizades, et. al.           Standards Track                    [Page 54]
  3027.  
  3028. RFC 2165               Service Location Protocol               June 1997
  3029.  
  3030.  
  3031. 20.4. Address Specification in Service Location
  3032.  
  3033.    The address specification used in Service Location is:
  3034.  
  3035.      <addr-spec> ::= [<user>:<password>@]<host>[:<port>]
  3036.  
  3037.      <host>      ::= Fully qualified domain name |
  3038.                      dotted decimal IP address notation
  3039.  
  3040.    When no Domain Name Server is available, SAs and DAs must use dotted
  3041.    decimal conventions for IP addresses.  Otherwise, it is preferable to
  3042.    use a fully qualified domain name wherever possible as renumbering of
  3043.    host addresses will make IP addresses invalid over time.
  3044.  
  3045.    Generally, just the host domain name (or address) is returned.  When
  3046.    there is a non-standard port for the protocol, that should be
  3047.    returned as well.  Some applications may make use of the
  3048.    <user>:<password>@ syntax, but its use is not encouraged in this
  3049.    context until mechanisms are established to maintain confidentiality.
  3050.  
  3051.    Address specification in Service Location is consistent with standard
  3052.    URL format [6].
  3053.  
  3054. 20.5. Attribute Value encoding rules
  3055.  
  3056.    Attribute values, and attribute tags are CASE INSENSITIVE for
  3057.    purposes of lexical comparison.
  3058.  
  3059.    Attribute values are strings containing any characters with the
  3060.    exception of '(', ')', '=', '>', '<', '/', '*', and ',' (the comma)
  3061.    except in the case described below where opaque values are encoded.
  3062.    These characters may be included using the character value escape
  3063.    mechanism described in section 17.1.1.
  3064.  
  3065.    While an attribute can take any value, there are three types of
  3066.    values which differentiate themselves from general strings:
  3067.    Booleans, Integers and Opaque values.
  3068.  
  3069.     -  Boolean values are either "TRUE" or "FALSE".  This is the case
  3070.        regardless of the language (i.e.  in French or Telugu, Boolean
  3071.        TRUE is "TRUE", as well as in English.)  Boolean attributes can
  3072.        take only one value.
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082. Veizades, et. al.           Standards Track                    [Page 55]
  3083.  
  3084. RFC 2165               Service Location Protocol               June 1997
  3085.  
  3086.  
  3087.     -  Integer values are expressed as a sequence of numbers.  The
  3088.        range of allowable values for integers is "-2147483648" to
  3089.        "2147483647".  No other form of numeric representation is
  3090.        interpreted as such except integers.  For example, hexadecimal
  3091.        numbers such as "0x342" are not interpreted as integers, but as
  3092.        strings.
  3093.  
  3094.     -  Opaque values (i.e.  binary values) are expressed in radix-64
  3095.        notation.  The syntax is:
  3096.  
  3097.             <opaque-val>    ::=  (<len>:<radix-64-data>)
  3098.             <len>           ::=  number of bytes of the original data
  3099.             <radix-64-data> ::=  radix-64 encoding of the original data
  3100.  
  3101.        <len> is a 16-bit binary number.  Radix-64 encodes every 3 bytes
  3102.        of binary data into 4 bytes of ASCII data which is in the range
  3103.        of characters which are fully printable and transferable by mail.
  3104.        For a formal definition of the Radix-64 format see RFC 1521 [7],
  3105.        MIME Part One, Section 5.2 Base64 Content Transfer Encoding, page
  3106.        21.
  3107.  
  3108. 21. Protocol Requirements
  3109.  
  3110.    In this section are listed various protocol requirements for User
  3111.    Agents, Service Agents, and Directory Agents.
  3112.  
  3113. 21.1. User Agent Requirements
  3114.  
  3115.    A User Agent MAY:
  3116.  
  3117.     -  Provide a way for the application to configure the default DA, so
  3118.        that it can be used without needing to find it each initially.
  3119.  
  3120.     -  Be able to request the address of a DA from DHCP, if configured
  3121.        to do so.
  3122.  
  3123.     -  Ignore any unauthenticated Service Reply.
  3124.  
  3125.     -  Be able to issue requests in any language or character set
  3126.        provided that it can switch to the default language and character
  3127.        set if the request can not be serviced by DAs and SAs at the
  3128.        site.
  3129.  
  3130.     -  Require an authentication block in any URL entry returned as
  3131.        part of a Service Request, before making use of the advertised
  3132.        service.
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138. Veizades, et. al.           Standards Track                    [Page 56]
  3139.  
  3140. RFC 2165               Service Location Protocol               June 1997
  3141.  
  3142.  
  3143.    A User Agent SHOULD:
  3144.  
  3145.     -  Try to contact DHCP to obtain the address of a DA.
  3146.  
  3147.     -  Use a scope in all requests, if possible.
  3148.  
  3149.     -  Issue requests to scoped DAs if the UA has been configured with a
  3150.        scope.
  3151.  
  3152.     -  Listen on the Service Location General Multicast address for
  3153.        unsolicited DA Advertisements.  This will increase the set of
  3154.        Directory Agents available to it for making requests.  See
  3155.        Section 15.2.
  3156.  
  3157.     -  Be able to be configured to require an authentication block in
  3158.        any received URL entry advertised as belonging to a protected
  3159.        scope, before making use of the service.
  3160.  
  3161.    If the UA does not listen for DA Advertisements, new DAs will not be
  3162.    passively detected.  A UA which does not have a configured DA and has
  3163.    not yet discovered one and is not listening for unsolicited DA
  3164.    Advertisements will remain ignorant of DAs.  It may then do a DA
  3165.    discovery before each query performed or it may simply use multicast
  3166.    queries to Service Agents.
  3167.  
  3168.    A User Agent MUST:
  3169.  
  3170.     -  Be able to unicast requests and receive replies from a DA.
  3171.        Transactions should be made reliable by using retransmission of
  3172.        the request if the reply does not arrive within a timeout
  3173.        interval.
  3174.  
  3175.     -  Be able to detect DAs using a Directory Agent Discovery request
  3176.        issued when the UA starts up.
  3177.  
  3178.     -  Be able to send requests to a multicast address.  Service
  3179.        Specific Multicast addresses are computed based on a hash of the
  3180.        Service Type.  See Section 3.6.2.
  3181.  
  3182.     -  Be able to handle numerous replies after a multicast request.
  3183.        The implementation may be configurable so it will either return
  3184.        the first reply, all replies until a timeout or keep trying till
  3185.        the results converge.
  3186.  
  3187.     -  Ignore any unauthenticated Service Reply or Attribute Reply when
  3188.        an appropriate IPSec Security Association for that Reply exists.
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194. Veizades, et. al.           Standards Track                    [Page 57]
  3195.  
  3196. RFC 2165               Service Location Protocol               June 1997
  3197.  
  3198.  
  3199.     -  Whenever it obtains its IP address from DHCP in the first place,
  3200.        also attempt to obtain scope information, and the address of a
  3201.        DA, from DHCP.
  3202.  
  3203.     -  Use the IP Authentication Header or IP Encapsulating Payload in
  3204.        all Service Location messages, whenever an appropriate IPSec
  3205.        Security Association exists.
  3206.  
  3207.     -  Be able to issue requests using the US-ASCII character set.
  3208.  
  3209.     -  If configured to use a protected scope, be able to use
  3210.        "md5WithRSAEncryption" [4] to verify the signed data.
  3211.  
  3212. 21.2. Service Agent Requirements
  3213.  
  3214.    A Service Agent MAY be able to:
  3215.  
  3216.     -  Get the address of a local Directory Agent by way of DHCP.
  3217.  
  3218.     -  Accept requests in non-US-ASCII character encodings.  This is
  3219.        encouraged, especially for UNICODE [1] and UTF-8 [24] encodings.
  3220.  
  3221.     -  Register services with a DA in non-US-ASCII character encodings.
  3222.        This is encouraged, especially for UNICODE [1] and UTF-8 [24]
  3223.        encodings.
  3224.  
  3225.    A Service Agent SHOULD be able to:
  3226.  
  3227.      -  Listen to the service-specific multicast address of the service
  3228.        it is advertising.  The incoming requests should be filtered:  If
  3229.        the Address Specification of the SA is in the Previous Responders
  3230.        Address Specification list, the SA SHOULD NOT respond.
  3231.        Otherwise, a response to the multicast query SHOULD be unicast to
  3232.        the UA which sent the request.
  3233.  
  3234.     -  Listen for and respond to broadcast requests and TCP connection
  3235.        requests, to the Service Location port.
  3236.  
  3237.     -  Be configurable to calculate authentication blocks and thereby
  3238.     be enabled to register in protected scopes.  This requires that the
  3239.     service agent be configured to possess the necessary keys to
  3240.     calculate the authenticator.
  3241.  
  3242.    A Service Agent MUST be able to:
  3243.  
  3244.     -  Listen to the Service Location General Multicast address for
  3245.        queries (e.g., Service Type Requests).  If the query can be
  3246.        replied to by the Service Agent, the Service Agent MUST do so.
  3247.  
  3248.  
  3249.  
  3250. Veizades, et. al.           Standards Track                    [Page 58]
  3251.  
  3252. RFC 2165               Service Location Protocol               June 1997
  3253.  
  3254.  
  3255.        It MUST check first to make sure it is not on the list of
  3256.        'previous responders.'
  3257.  
  3258.     -  Listen to the Service Location General Multicast address for
  3259.        unsolicited DA Advertisements.  If one is detected, and the DA
  3260.        has the right scope, (or has no scope), all services which are
  3261.        currently being advertised MUST be registered with the DA (unless
  3262.        configured to only use a single DA (see section 22.1), or the DA
  3263.        has already been detected, subject to certain rules (see section
  3264.        15.2)).
  3265.  
  3266.     -  Whenever it obtains its IP address from DHCP in the first place,
  3267.        also attempt to obtain scope information, and the address of a
  3268.        DA, from DHCP.
  3269.  
  3270.     -  Unicast registrations and deregistrations to a DA. Transactions
  3271.        should be made reliable by using retransmission of the request if
  3272.        the reply does not arrive within a timeout interval.
  3273.  
  3274.     -  Be able to detect DAs using a Directory Agent Discovery request
  3275.        issued when the SA starts up (unless configured to only use a
  3276.        single DA, see section 22.1.)
  3277.  
  3278.     -  Use the IP Authentication Header or IP Encapsulating Payload in
  3279.        all Service Location messages, whenever an appropriate IPSec
  3280.        Security Association exists.
  3281.  
  3282.     -  Be able to register service information with a DA using US-ASCII
  3283.        character encoding.  It must also be able to reply to requests
  3284.        from UAs which use US-ASCII character encoding.
  3285.  
  3286.     -  Reregister with a DA before the Lifetime of registered service
  3287.        information elapses.
  3288.  
  3289.     -  If configured to use a protected scope, be able to use
  3290.        "md5WithRSAEncryption" [4] to produce the signed data.
  3291.  
  3292. 21.3. Directory Agent Requirements
  3293.  
  3294.    A Directory Agent MAY:
  3295.  
  3296.     -  Accept registrations and requests in non-US-ASCII character
  3297.        encodings.  This is encouraged, especially for UNICODE [1] and
  3298.        UTF-8 [24] encodings.
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306. Veizades, et. al.           Standards Track                    [Page 59]
  3307.  
  3308. RFC 2165               Service Location Protocol               June 1997
  3309.  
  3310.  
  3311.    A Directory Agent SHOULD:
  3312.  
  3313.     -  Be able to configure certain scopes as protected scopes, so that
  3314.        registrations within those scopes require the calculation of
  3315.        cryptographically strong authenticators.  This requires that the
  3316.        DA be able to possess the keys needed for the authentication, or
  3317.        that the DA be able to acquire a certificate generated by a
  3318.        trusted Certificate Authority [23], before completing Service
  3319.        Registrations for protected scopes.
  3320.  
  3321.    A Directory Agent MUST be able to:
  3322.  
  3323.     -  Send an unsolicited DA Advertisements to the Service Location
  3324.        General Multicast address on startup and repeat it periodically.
  3325.        This reply has an XID which is incremented by one each time.  If
  3326.        the DA starts with state, it initializes the XID to 0x0100.  If
  3327.        it starts up stateless, it initializes the XID to 0x0000.
  3328.  
  3329.     -  Ignore any unauthenticated Service Registration or Service
  3330.        Deregistration from an entity with which it maintains a security
  3331.        association.
  3332.  
  3333.     -  Listen on the Directory Agent Discovery Multicast Address for
  3334.        Directory Agent Discovery requests.  Filter these requests if the
  3335.        Previous Responder Address Specification list includes the DA's
  3336.        Address Specification.
  3337.  
  3338.     -  Listen for broadcast requests to the Service Location port.
  3339.  
  3340.     -  Listen on the TCP and UDP Service Location Ports for unicast
  3341.        requests, registrations and deregistrations and service them.
  3342.  
  3343.     -  Provide a way in which scope information can be used to configure
  3344.        the Directory Agent.
  3345.  
  3346.     -  Expire registrations when the service registration's lifetime
  3347.        expires.
  3348.  
  3349.     -  When a Directory Agent has been configured with a scope, it MUST
  3350.        refuse all requests and registrations which do not have this
  3351.        scope.  The DA replies with a SCOPE_NOT_SUPPORTED error.  There
  3352.        is one exception:  All DAs MUST respond to DA discovery requests
  3353.        which have no scope.
  3354.  
  3355.     -  When a Directory Agent has been configured without a scope, it
  3356.        MUST accept ALL registrations and requests.
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362. Veizades, et. al.           Standards Track                    [Page 60]
  3363.  
  3364. RFC 2165               Service Location Protocol               June 1997
  3365.  
  3366.  
  3367.     -  Ignore any unauthenticated Service Location messages when an
  3368.        appropriate IPSec Security Association exists for that request.
  3369.  
  3370.     -  Use the IP Authentication and IP Encapsulating Security Payload
  3371.        in Service Location messages whenever an appropriate IPSec
  3372.        Security Association exists.
  3373.  
  3374.     -  Accept requests and registrations in US-ASCII.
  3375.  
  3376.     -  If configured with a protected scope, be able to authenticate (at
  3377.        least by using "md5WithRSAEncryption" [4]) Service Registrations
  3378.        advertising services purporting to belong to such configured
  3379.        protected scopes.
  3380.  
  3381. 22. Configurable Parameters and Default Values
  3382.  
  3383.    There are several configuration parameters for Service Location.
  3384.    Default values are chosen to allow protocol operation without the
  3385.    need for selection of these configuration parameters, but other
  3386.    values may be selected by the site administrator.  The configurable
  3387.    parameters will allow an implementation of Service Location to be
  3388.    more useful in a variety of scenarios.
  3389.  
  3390.       Multicast vs.  Broadcast
  3391.                All Service Location entities must use multicast by
  3392.                default.  The ability to use broadcast messages must be
  3393.                configurable for UAs and SAs.  Broadcast messages are to
  3394.                be used in environments where not all Service Location
  3395.                entities have hardware or software which supports
  3396.                multicast.
  3397.  
  3398.       Multicast Radius
  3399.                Multicast requests should be sent to all subnets in a
  3400.                site.  The default multicast radius for a site is 32.
  3401.                This value must be configurable.  The value for the
  3402.                site's multicast TTL may be obtained from DHCP using an
  3403.                option which is currently unassigned.
  3404.  
  3405.       Directory Agent Address
  3406.                The Directory Agent address discovery mechanism must be
  3407.                configurable.  There are three possibilities for this
  3408.                configuration:  A default address, no default address and
  3409.                the use of DHCP to locate a DA as described in section
  3410.                15.2.  The default value should be use of DHCP, with "no
  3411.                default address" used if DHCP does not respond.  In this
  3412.                case the UA or SA must do a Directory Agent Discovery
  3413.                query.
  3414.  
  3415.  
  3416.  
  3417.  
  3418. Veizades, et. al.           Standards Track                    [Page 61]
  3419.  
  3420. RFC 2165               Service Location Protocol               June 1997
  3421.  
  3422.  
  3423.       Directory Agent Scope Assignment
  3424.                The scope or scopes of a DA must be configurable.  The
  3425.                default value for a DA is to have no scope if not
  3426.                otherwise configured.
  3427.  
  3428.       Path MTU
  3429.                The default path MTU is assumed to be 1400.  This value
  3430.                may be too large for the infrastructure of some sites.
  3431.                For this reason this value MUST be configurable for all
  3432.                SAs and DAs.
  3433.  
  3434.       Keys for Protected Scopes
  3435.  
  3436.                If the local administration designates certain scopes as
  3437.                "protected scopes", the agents making use of those scopes
  3438.                have to be able to acquire keys to authenticate data sent
  3439.                by services along with their advertised URLs for services
  3440.                within the protected scope.  For instance, service agents
  3441.                would use a private key to produce authentication data.
  3442.                By default, service agents use "md5WithRSAEncryption" [4]
  3443.                to produce the signed data, to be be included with
  3444.                service registrations and deregistrations (see appendix
  3445.                B, 4.3).  This authentication data could be verified by
  3446.                user agents and directory agents that possess the
  3447.                corresponding public key.
  3448.  
  3449. 22.1. Service Agent:  Use Predefined Directory Agent(s)
  3450.  
  3451.    A Service Agent's default configuration is to do passive and active
  3452.    DA discovery and to register with all DAs which are properly scoped.
  3453.  
  3454.    A Service Agent SHOULD be configurable to allow a special mode of
  3455.    operation:  They will use only preconfigured DAs.  This means they
  3456.    will *NOT* actively or passively detect DAs.
  3457.  
  3458.    If a Service Agent is configured this way, knowledge of the DA must
  3459.    come through another channel, either static configuration or by the
  3460.    use of DHCP.
  3461.  
  3462.    The availability of the Service information will not be consistent
  3463.    between DAs.  The mechanisms which achieve eventual consistency
  3464.    between DAs are ignored by the SA, so their service information will
  3465.    not be distributed.  This leaves the SA open to failure if the DA
  3466.    they are configured to use fails.
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474. Veizades, et. al.           Standards Track                    [Page 62]
  3475.  
  3476. RFC 2165               Service Location Protocol               June 1997
  3477.  
  3478.  
  3479. 22.2. Time Out Intervals
  3480.  
  3481.    These values should be configurable in case the site deploying
  3482.    Service Location has special requirements (such as very slow links.)
  3483.  
  3484.    Interval name       Section Default Value Meaning
  3485.    -----------------   ------- ------------- -----------------------
  3486.    CONFIG_INTERVAL_0   4.1     1 minute      Cache replies by XID.
  3487.    CONFIG_INTERVAL_1   4.4     10800 seconds registration Lifetime,
  3488.                                (ie.  3 hours)after which ad expires
  3489.    CONFIG_INTERVAL_2   5       each second,  Retry multicast query
  3490.                                backing off   until no new values
  3491.                                gradually     arrive.
  3492.    CONFIG_INTERVAL_3   5       15 seconds    Max time to wait for a
  3493.                                              complete multicast query
  3494.                                              response (all values.)
  3495.    CONFIG_INTERVAL_4   9       3 seconds     Wait to register on
  3496.                                              reboot.
  3497.    CONFIG_INTERVAL_5   5.2     3 seconds     Retransmit DA discovery,
  3498.                                              try it 3 times.
  3499.    CONFIG_INTERVAL_6   5.2     5 seconds     Give up on requests sent
  3500.                                              to a DA.
  3501.    CONFIG_INTERVAL_7   5.2     15 seconds    Give up on DA discovery
  3502.    CONFIG_INTERVAL_8   5.1     15 seconds    Give up on requests
  3503.                                              sent to SAs.
  3504.    CONFIG_INTERVAL_9   15.2    3 hours       DA Heartbeat, so that SAs
  3505.                                              passively detect new DAs.
  3506.    CONFIG_INTERVAL_10  15.2    1-3 seconds   Wait to register services
  3507.                                              on passive DA discovery.
  3508.    CONFIG_INTERVAL_11  9       1-3 seconds   Wait to register services
  3509.                                              on active DA discovery.
  3510.    CONFIG_INTERVAL_12  18.1    5 minutes     DAs and SAs close idle
  3511.                                              connections.
  3512.  
  3513.    A note on CONFIG_INTERVAL_9:  While it might seem advantageous to
  3514.    have frequent heartbeats, this poses a significant risk of generating
  3515.    a lot of overhead traffic.  This value should be kept high to prevent
  3516.    routine protocol operations from using any significant bandwidth.
  3517.  
  3518. 23. Non-configurable Parameters
  3519.  
  3520.    IP Port number for unicast requests to Directory Agents:
  3521.  
  3522.          UDP and TCP Port Number:                          427
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530. Veizades, et. al.           Standards Track                    [Page 63]
  3531.  
  3532. RFC 2165               Service Location Protocol               June 1997
  3533.  
  3534.  
  3535.    Multicast Addresses
  3536.  
  3537.          Service Location General Multicast Address:       224.0.1.22
  3538.          Directory Agent Discovery Multicast Address:      224.0.1.35
  3539.  
  3540.    A range of 1024 contiguous multicast addresses for use as Service
  3541.    Specific Discovery Multicast Addresses will be assigned by IANA.
  3542.  
  3543.    Error Codes:
  3544.  
  3545.          No Error                   0
  3546.          LANGUAGE_NOT_SUPPORTED     1
  3547.          PROTOCOL_PARSE_ERROR       2
  3548.          INVALID_REGISTRATION       3
  3549.          SCOPE_NOT_SUPPORTED        4
  3550.          CHARSET_NOT_UNDERSTOOD     5
  3551.          AUTHENTICATION_ABSENT      6
  3552.          AUTHENTICATION_FAILED      7
  3553.  
  3554.  
  3555. 24. Acknowledgments
  3556.  
  3557.    This protocol owes some of the original ideas to other service
  3558.    location protocols found in many other networking protocols.  Leo
  3559.    McLaughlin and Mike Ritter (Metricom) provided much input into early
  3560.    version of this document.  Thanks also to Steve Deering (Xerox) for
  3561.    providing his insight into distributed multicast protocols.  Harry
  3562.    Harjono and Charlie Perkins supplied the basis for the URL based wire
  3563.    protocol in their Resource Discovery Protocol.  Thanks also to
  3564.    Peerlogic, Inc.  for supporting this work.  Lastly, thanks to Jeff
  3565.    Schiller for his help in shaping the security architecture specified
  3566.    in this document.
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586. Veizades, et. al.           Standards Track                    [Page 64]
  3587.  
  3588. RFC 2165               Service Location Protocol               June 1997
  3589.  
  3590.  
  3591.   A. Appendix:  Technical contents of ISO 639:1988 (E/F): "Code for the
  3592.    representation of names of languages"
  3593.  
  3594.    Two-letter lower-case symbols are used.  The Registration Authority
  3595.    for ISO 639 [14] is Infoterm, Osterreiches Normungsinstitut (ON),
  3596.    Postfach 130, A-1021 Vienna, Austria.  Contains additions from ISO
  3597.    639/RA Newsletter No.1/1989. See also RFC 1766.
  3598.  
  3599.     aa Afar               ga Irish               mg Malagasy
  3600.     ab Abkhazian          gd Scots Gaelic        mi Maori
  3601.     af Afrikaans          gl Galician            mk Macedonian
  3602.     am Amharic            gn Guarani             ml Malayalam
  3603.     ar Arabic             gu Gujarati            mn Mongolian
  3604.     as Assamese                                  mo Moldavian
  3605.     ay Aymara             ha Hausa               mr Marathi
  3606.     az Azerbaijani        he Hebrew              ms Malay
  3607.                           hi Hindi               mt Maltese
  3608.     ba Bashkir            hr Croatian            my Burmese
  3609.     be Byelorussian       hu Hungarian
  3610.     bg Bulgarian          hy Armenian            na Nauru
  3611.     bh Bihari                                    ne Nepali
  3612.     bi Bislama            ia Interlingua         nl Dutch
  3613.     bn Bengali; Bangla    in Indonesian          no Norwegian
  3614.     bo Tibetan            ie Interlingue
  3615.     br Breton             ik Inupiak             oc Occitan
  3616.                           is Icelandic           om (Afan) Oromo
  3617.     ca Catalan            it Italian             or Oriya
  3618.     co Corsican           ja Japanese
  3619.     cs Czech              jw Javanese            pa Punjabi
  3620.     cy Welsh                                     pl Polish
  3621.                           ka Georgian            ps Pashto, Pushto
  3622.     da Danish             kk Kazakh              pt Portuguese
  3623.     de German             kl Greenlandic
  3624.     dz Bhutani            km Cambodian           qu Quechua
  3625.                           rw Kinyarwanda
  3626.     el Greek              kn Kannada             rm Rhaeto-Romance
  3627.     en English            ko Korean              rn Kirundi
  3628.     eo Esperanto          ks Kashmiri            ro Romanian
  3629.     es Spanish            ku Kurdish             ru Russian
  3630.     et Estonian           ky Kirghiz
  3631.     eu Basque
  3632.                           la Latin
  3633.     fa Persian            ln Lingala
  3634.     fi Finnish            lo Laothian
  3635.     fj Fiji               lt Lithuanian
  3636.     fo Faeroese           lv Latvian, Lettish
  3637.     fr French
  3638.     fy Frisian
  3639.  
  3640.  
  3641.  
  3642. Veizades, et. al.           Standards Track                    [Page 65]
  3643.  
  3644. RFC 2165               Service Location Protocol               June 1997
  3645.  
  3646.  
  3647.     sa Sanskrit           ta Tamil               ug Uigar
  3648.     sd Sindhi             te Telugu              uk Ukrainian
  3649.     sg Sangro             tg Tajik               ur Urdu
  3650.     sh Serbo-Croatian     th Thai                uz Uzbek
  3651.     si Singhalese         ti Tigrinya
  3652.     sk Slovak             tk Turkmen             vi Vietnamese
  3653.     sl Slovenian          tl Tagalog             vo Volapuk
  3654.     sm Samoan             tn Setswana
  3655.     sn Shona              to Tonga               wo Wolof
  3656.     so Somali             tr Turkish
  3657.     sq Albanian           ts Tsonga              xh Xhosa
  3658.     sr Serbian            tt Tatar
  3659.     ss Siswati            tw Twi                 yi Yiddish
  3660.     st Sesotho                                   yo Yoruba
  3661.     su Sundanese
  3662.     sv Swedish                                   za Zhuang
  3663.     sw Swahili                                   zh Chinese
  3664.                                                  zu Zulu
  3665.  
  3666.  
  3667. B. SLP Certificates
  3668.  
  3669.    Certificates may be used in SLP in order to distribute the public
  3670.    keys of trusted protected scopes.  Assuming public keys, this
  3671.    appendix discusses the use of such certificates in the Service
  3672.    Location Protocol.
  3673.  
  3674.    Possession of the private key of a protected scope is equivalent to
  3675.    being a trusted SA. The trustworthiness of the protected scope
  3676.    depends upon all of these private keys being held by trusted hosts,
  3677.    and used only for legitimate service registrations and
  3678.    deregistrations.
  3679.  
  3680.    With access to the proper Certificate Authority (CA), DAs and UAs do
  3681.    not need (in advance) hold public keys which correspond to these
  3682.    protected scopes.  They do require the public key of the CA. The CA
  3683.    produces certificates using its unique private key.  This private key
  3684.    is not shared with any other system, and must remain secure.  The
  3685.    certificates declare that a given protected scope has a given public
  3686.    key, as well as the expiration date of the certificate.
  3687.  
  3688.    The ASCII (mail-safe) string format for the certificate is the
  3689.    following list of tag and value pairs:
  3690.  
  3691.       "certificate-alg=" 1*ASN1CHAR       CRLF
  3692.       "scope-charset="   1*DIGIT          CRLF
  3693.       "scope="           1*RADIX-64-CHAR  CRLF
  3694.       "timestamp="       16HEXDIGIT       CRLF
  3695.  
  3696.  
  3697.  
  3698. Veizades, et. al.           Standards Track                    [Page 66]
  3699.  
  3700. RFC 2165               Service Location Protocol               June 1997
  3701.  
  3702.  
  3703.       "public-key="      1*RADIX-64-CHAR  CRLF
  3704.       "cert-digest="     1*RADIX-64-CHAR  CRLF
  3705.  
  3706.       ASN1CHAR          = DIGIT | '.'
  3707.       HEXDIGIT          = DIGIT | 'a'..'f' | 'A'..'F'
  3708.       RADIX-64-CHAR     = DIGIT | 'a'..'z' | 'A'..'Z' | '+' | '/' | '='
  3709.  
  3710.    The radix-64 notation is described in RFC 1521 [7].  Spaces are
  3711.    ignored in the computation of the binary value corresponding to a
  3712.    Radix-64 string.  If the value for scope, public-key or cert-digest
  3713.    is greater than 72 characters, the Radix-64 notation may be broken up
  3714.    on to separate lines.  The continuation lines must be preceded by one
  3715.    or more spaces.  Only the tags listed above may start in the first
  3716.    column of the certificate string.  This removes ambiguity in parsing
  3717.    the Radix-64 values (since the tags consist of legal Radix-64
  3718.    values.)
  3719.  
  3720.    The certificate-alg is the ASN.1 string for the Object Identifier
  3721.    value of the algorithm used to produce the "cert-digest".  The
  3722.    scope-charset is a decimal representation of the MIBEnum value for
  3723.    the character set in which the scope is represented.
  3724.  
  3725.    The radix-64 encoding of the scope string will allow the ASCII
  3726.    rendering of a scope string any character set.
  3727.  
  3728.    The 8 byte NTP format timestamp is represented as 16 hex digits.
  3729.    This timestamp is the time at which the certificate will expire.
  3730.  
  3731.    The format for the public key will depend on the type of cryptosystem
  3732.    used, which is identified by the certificate-alg.  When the CA
  3733.    generated the certificate holding the public key being obtained, it
  3734.    used the message digest algorithm identified by certificate-alg to
  3735.    calculate a digest D on the string encoding of the certificate,
  3736.    excepting the cert-digest.  The CA then encrypted this value using
  3737.    the CA's private key to produce the cert-digest, which is included in
  3738.    the certificate.
  3739.  
  3740.    The CA generates the certificate off-line.  The mechanism to
  3741.    distibute certificates is not specified in the Service Location
  3742.    Protocol, but may be in the future.  The CA specifies the algorithms
  3743.    to use for message digest and public key decryption.  The DA or SA
  3744.    need only obtain the certificate, have a preconfigured public key for
  3745.    the CA and support the algorithm specified in the certificate-alg in
  3746.    order to obtain certified new public keys for protected scopes.
  3747.  
  3748.    The DA or UA may confirm the certificate by calculating the message
  3749.    digest D, using the message digest algorithm identified by the
  3750.    certificate-alg.  The input to the message digest algorithm is the
  3751.  
  3752.  
  3753.  
  3754. Veizades, et. al.           Standards Track                    [Page 67]
  3755.  
  3756. RFC 2165               Service Location Protocol               June 1997
  3757.  
  3758.  
  3759.    string encoding of the certificate, excepting the cert-digest.  The
  3760.    cert-digest is decrypted using the CA's public key to produce D'. If
  3761.    D is the same as D', the certificate is legitimate.  The public-key
  3762.    for the protected scope may be used until the expiration date
  3763.    indicated by the certificate timestamp.
  3764.  
  3765.    The certificate may be distributed along untrusted channels, such as
  3766.    email or through file transfer, as it must be verified anyhow.  The
  3767.    CA's public key must be delivered using a trusted channel.
  3768.  
  3769. C. Example of deploying SLP security using MD5 and RSA
  3770.  
  3771.    In our site, we have a protected scope "CONTROLLED".  We generate a
  3772.    private key - public key pair for the scope, using RSA. The private
  3773.    key is maintained on a secret key ring by all SAs in the protected
  3774.    scope.  The public key is available to all DAs which support the
  3775.    protected scope and to all UAs which will use it.
  3776.  
  3777.    In order to register or deregister a URL, the data required to be
  3778.    authenticated (as described in section 4.3) is digestified using MD5
  3779.    [22] to create a digital signature, then encrypted by RSA with the
  3780.    protected scope's private key.  The output of RSA is used in the
  3781.     authenticator data field of the authenticator block.
  3782.  
  3783.    The DA or UA discovers the appropriate method for verifying the
  3784.    authentication by looking inside the authentication block.  Suppose
  3785.    that the "md5WithRSAEncryption" [4] algorithm has to be used to
  3786.    verify the signed data.  The DA or UA calculates the message digest
  3787.    of the URL Entry by using md5, exactly as the SA did.  The
  3788.    authenticator block is decrypted using the public key for the
  3789.    "CONTROLLED" scope, which is stored in the public key ring of the UA
  3790.    or DA under the name "CONTROLLED".  If the digest calculated by the
  3791.    UA or DA matches that of the SA, the URL Entry has been validated.
  3792.  
  3793. D. Example of use of SLP Certificates by mobile nodes
  3794.  
  3795.    Say a mobile node needs to make use of protected scopes.  The mobile
  3796.    node is first preconfigured by adding a single public key to its
  3797.    public key ring:  We will call it the CA-Key.  This key will be used
  3798.    to obtain SLP certificates in the format described in Appendix B.
  3799.    The corresponding private key will be used by the CA to create the
  3800.    certificates in the necessary format.
  3801.  
  3802.    The CA might be operated by a system administrator using a computer
  3803.    which is not connected to any networks.  The certificate's duration
  3804.    will depend on the policy of the site.  The duration, scope, and
  3805.    public key for the protected scope, are used as input to 'md5sum'.
  3806.    This sum is then encrypted with RSA using the CA's private key.  The
  3807.  
  3808.  
  3809.  
  3810. Veizades, et. al.           Standards Track                    [Page 68]
  3811.  
  3812. RFC 2165               Service Location Protocol               June 1997
  3813.  
  3814.  
  3815.    radix 64 encoding of this is added to the mail-safe string based
  3816.    certificate encoding defined in Appendix B.
  3817.  
  3818.    The certificate, say for the protected scope "CONTROLLED" could be
  3819.    made available to the mobile node.  For example, it might be on a web
  3820.    page.  The mobile node could then process the certificate in order to
  3821.    obtain the public key for the CONTROLLED scope.  There is still no
  3822.    reason to *trust* this key is really the one to use (as in Appendix
  3823.    C).  To trust it, calculate the md5 checksum of the ascii encoded
  3824.    certificate, excluding the cert-digest.  Next, decrypt the cert-
  3825.    digest using the CA's public key and RSA. If the cert-digest matches
  3826.    the output of MD5, the certificate may be trusted (until it expires).
  3827.  
  3828.    The mobile node requires only one key (CA-key) in order to obtain
  3829.    others dynamically and make use of protected scopes.  Notice that we
  3830.    do not define any method for access control by arbitrary UAs to SAs
  3831.    in protected scopes.
  3832.  
  3833. E. Appendix:  For Further Reading
  3834.  
  3835.    Three related resource discovery protocols are NBP and ZIP which are
  3836.    part of the AppleTalk protocol family [12], the Legato Resource
  3837.    Administration Platform [25], and the Xerox Clearinghouse system
  3838.    [20].  Domain names and representation of addresses are used
  3839.    extensively in the Service Location Protocol.  The references for
  3840.    these are RFCs 1034 and 1035 [17, 18].  Example of a discovery
  3841.    protocol for routers include Router Discovery [10] and Neighbor
  3842.    Discovery [19].
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866. Veizades, et. al.           Standards Track                    [Page 69]
  3867.  
  3868. RFC 2165               Service Location Protocol               June 1997
  3869.  
  3870.  
  3871. References
  3872.  
  3873.    [1] Unicode Technical Report #4.  The unicode standard, version 1.1
  3874.        (volumes 1 and 2).  Technical Report (ISBN 0-201-56788-1) and
  3875.        (ISBN 0-201-60845-6), Unicode Consortium, 1994.
  3876.  
  3877.    [2] Alexander, S. and R. Droms.  DHCP Options and BOOTP Vendor
  3878.        Extensions.  RFC 2131, March 1997.
  3879.  
  3880.    [3] Atkinson, R.  IP Encapsulating Security Payload.  RFC 1827,
  3881.        August 1995.
  3882.  
  3883.    [4] Balenson, D.  Privacy Enhancement for Internet Electronic
  3884.        Mail:  Part III: Algorithms, Modes, and Identifiers.  RFC 1423,
  3885.        February 1993.
  3886.  
  3887.    [5] Berners-Lee, T. and D. Connolly.  Hypertext Markup Language -
  3888.        2.0.  RFC 1866, November 1995.
  3889.  
  3890.    [6] Berners-Lee, T., L. Masinter, and M. McCahill.  Uniform Resource
  3891.        Locators (URL).  RFC 1738, December 1994.
  3892.  
  3893.    [7] Borenstein, N. and N. Freed.  MIME (Multipurpose Internet Mail
  3894.        Extensions) Part One:  Mechanisms for Specifying and Describing
  3895.        the Format of Internet Message Bodies.  RFC 2045, November 1996.
  3896.  
  3897.    [8] Bradner, Scott.  Key words for use in RFCs to Indicate
  3898.        Requirement Levels. BCP 14, RFC 2119, March 1997.
  3899.  
  3900.    [9] CCITT.  Specification of the Abstract Syntax Notation One
  3901.        (ASN.1).  Recommendation X.208, 1988.
  3902.  
  3903.    [10] Deering, Stephen E., editor.  ICMP Router Discovery Messages.
  3904.         RFC 1256, September 1991.
  3905.  
  3906.    [11] Droms, Ralph.  Dynamic Host Configuration Protocol.  RFC 2131,
  3907.         March 1997.
  3908.  
  3909.    [12] Gursharan, S., R. Andrews, and A. Oppenheimer.  Inside
  3910.         AppleTalk. Addison-Wesley, 1990.
  3911.  
  3912.    [13] Guttman, E.  The service:  URL scheme, November 1996.
  3913.         Work In Progress.
  3914.  
  3915.    [14] Geneva ISO.  Code for the representation of names of languages.
  3916.         ISO 639:1988 (E/F), 1988.
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922. Veizades, et. al.           Standards Track                    [Page 70]
  3923.  
  3924. RFC 2165               Service Location Protocol               June 1997
  3925.  
  3926.  
  3927.    [15] ISO 8879, Geneva.  Information Processing -- Text and Office
  3928.         Systems - Standard Generalized Markup Language (SGML).
  3929.         <URL:http://www.iso.ch/cate/d16387.html>, 1986.
  3930.  
  3931.    [16] Mills, D.  Simple Network Time Protocol (SNTP) Version 4 for
  3932.         IPv4, IPv6 and OSI.  RFC 2030, October 1996.
  3933.  
  3934.    [17] Mockapetris, P.  Domain Names - Concepts and Facilities. STD 13,
  3935.         RFC 1034, November 1987.
  3936.  
  3937.    [18] Mockapetris, P.  DOMAIN NAMES - IMPLEMENTATION AND
  3938.         SPECIFICATION.  STD 13, RFC 1035, November 1987.
  3939.  
  3940.    [19] Narten, T., E. Nordmark, and W. Simpson.  Neighbor Discovery for
  3941.         IP version 6 (IPv6).  RFC 1970, August 1996.
  3942.  
  3943.    [20] Oppen, D. and Y. Dalal.  The clearinghouse:  A decentralized
  3944.         agent for locating named objects in a distributed environment.
  3945.         Technical Report Tech. Rep. OPD-78103, Xerox Office Products
  3946.         Division, 1981.
  3947.  
  3948.    [21] Perkins, C.  DHCP Options for Service Location Protocol, August
  3949.         1996. Work In Progress.
  3950.  
  3951.    [22] Rivest, Ronald.  The MD5 Message-Digest Algorithm.  RFC 1321,
  3952.         April 1992.
  3953.  
  3954.    [23] Schneier, Bruce.  Applied Cryptography:  Protocols, Algorithms,
  3955.         and Source Code in C.  John Wiley, New York, NY, USA, 1994.
  3956.  
  3957.    [24] X/Open Preliminary Specification.  File System Safe UCS
  3958.         Transformation Format (FSS_UTF).  Technical Report Document
  3959.         Number:  P316, X/Open Company Ltd., 1994.
  3960.  
  3961.    [25] Legato Systems.  The Legato Resource Administration Platform.
  3962.         Legato Systems, 1991.
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978. Veizades, et. al.           Standards Track                    [Page 71]
  3979.  
  3980. RFC 2165               Service Location Protocol               June 1997
  3981.  
  3982.  
  3983. Authors' Addresses
  3984.  
  3985.    Questions about this memo can be directed to:
  3986.  
  3987.    John Veizades                       Erik Guttman
  3988.    @Home Network                       Sun Microsystems
  3989.    385 Ravendale Dr.                   Gaisbergstr. 6
  3990.    Mountain View, CA 94043             69115 Heidelberg Germany
  3991.  
  3992.    Phone: +1 415 944 7332              Phone: +1 415 336 6697
  3993.    Fax:   +1 415 944 8500
  3994.  
  3995.    Email: veizades@home.com            Email: Erik.Guttman@eng.sun.com
  3996.  
  3997.    Charles E. Perkins                  Scott Kaplan
  3998.    Sun Microsystems
  3999.    2550 Garcia Avenue                  346 Fair Oaks St.
  4000.    Mountain View, CA  94043            San Francisco, CA 94110
  4001.  
  4002.    Phone: +1 415 336 7153              Phone: +1 415 285 4526
  4003.    Fax:   +1 415 336 0670
  4004.  
  4005.    EMail: cperkins@Corp.sun.com        Email: scott@catch22.com
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034. Veizades, et. al.           Standards Track                    [Page 72]
  4035.  
  4036.