home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-svrloc-protocol-16.txt < prev    next >
Text File  |  1997-03-20  |  172KB  |  4,203 lines

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