<?xml version="1.0" encoding="US-ASCII"?>
<!--
  XML2RFC offers an include feature described in the XML2RFC README
  file.  That syntax, however, contradicts the DTD requirements to
  have <reference> elements within the <references> element, so an 
  XML parser is likely to find your XML file invalid.  It may be
  possible that XML2RFC will change their DTD so that the XML file
  remains valid when their style of include is used.

  In the meantime therefore, we use an alternative valid-XML approach
  to includes, which unfortunately require that define your includes
  at the beginning of the file. Since the biggest benefit of includes
  is for references, this requires that your references be defined in
  ENTITY clauses here before being "included" and cited elsewhere in
  the file.
-->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY rfc4944 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4944.xml">
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc2165 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2165.xml">
<!ENTITY rfc2608 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2608.xml">
<!ENTITY rfc2609 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2609.xml">
<!ENTITY rfc3111 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3111.xml">
<!ENTITY rfc4919 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4919.xml">
<!ENTITY rfc2234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2234.xml">
<!ENTITY rfc2396 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2396.xml">
<!ENTITY rfc2434 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2434.xml">
<!ENTITY rfc3629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml">
]>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc strict="no"?>
<?rfc rfcedstyle="yes"?>
<!--
  This template is for authors of IETF specifications containing MIB
  modules.  This template can be used as a starting point to produce
  specifications that comply with the Operations &amp; Management Area
  guidelines for MIB module documents.
-->
<!--
  Throughout this template, the marker "[TODO]" is used to indicate an
  element or text that requires replacement or removal.
-->
<!-- Intellectual Property section -->
<!--
  The Intellectual Property section will be generated automatically by
  XML2RFC, based on the ipr attribute in the rfc element.
-->
<!-- 
  [TODO] specify the name of the output document. This is optional;
the default is to use the base portion of the XML filename. 
[TODO]For Internet-drafts, indicate which intellectual property notice 
to use per the rules of RFC3978.
Specify this in the ipr attribute.  The value can be:
    full3978 -
    noModification3978 -
    noDerivatives3978 -
[TODO] Specify the category attribute per RFC2026 
options are info, std, bcp, or exp.
[TODO] if this document updates an RFC, specify the RFC in the 
"updates" attribute
-->
<rfc category="std" docName="draft-daniel-6lowpan-sslp-02.txt"
     ipr="pre5378Trust200902">
  <front>
    <!--
  Throughout this template, the marker "[TODO]" is used to indicate an
  element or text that requires replacement or removal.
-->

    <!--
[TODO] Enter the full document title and an abbreviated version
  to use in the page header.
-->

    <title abbrev="SSLP for 6LoWPAN">Simple Service Location Protocol (SSLP) for 6LoWPAN</title>

    <!-- [TODO] copy the author block as many times as needed, one for each author.-->

    <!-- If the author is acting as editor, use the <role=editor> attribute-->

    <!-- see RFC2223 for guidelines regarding author names -->

    <author fullname="Kim, Ki Hyung" initials="K" role="editor"
            surname="Kim">
      <organization>Ajou University</organization>

      <address>
        <postal>
          <street>San 5 Wonchun-dong, Yeongtong-gu</street>

          <city>Suwon-si, Gyeonggi-do  443-749</city>

          <country>KOREA</country>
        </postal>

        <phone>+82 31 219 2433</phone>

        <email>kkim86@ajou.ac.kr</email>
      </address>
    </author>

	    <author fullname="Waleed Akram Baig" initials="Waleed A."
            surname="Baig">
      <organization>Ajou University</organization>

      <address>
        <postal>
          <street>San 5 Wonchun-dong, Yeongtong-gu</street>

          <city>Suwon-si, Gyeonggi-do  443-749</city>

          <country>KOREA</country>
        </postal>

        <phone>+82 31 219 1894</phone>

        <email>waleedbaig@ajou.ac.kr</email>
      </address>
    </author>

    <author fullname="Seung Wha Yoo" initials="S"
            surname="Yoo">
      <organization>Ajou University</organization>

      <address>
        <postal>
          <street>San 5 Wonchun-dong, Yeongtong-gu</street>

          <city>Suwon-si, Gyeonggi-do  443-749</city>

          <country>KOREA</country>
        </postal>

        <phone>+82 31 219 1603</phone>

        <email>swyoo@ajou.ac.kr</email>
      </address>
    </author>

 

        <author fullname="Soohong Daniel Park" initials="S"  surname="Daniel Park">
      <organization>SAMSUNG Electronics</organization>

      <address>
        <postal>
          <street>Mobile Platform Laboratory, SAMSUNG Electronics 416
          Maetan-3dong, Yeongtong-gu</street>

          <city>Suwon-si, Gyeonggi-do  442-742</city>

          <country>KOREA</country>
        </postal>

        <phone>+82 31 200 4508</phone>

        <email>soohong.park@samsung.com</email>
      </address>
    </author>

		<author initials="H." surname="Mukhtar" fullname="Hamid Mukhtar">
			<organization abbrev="ETRI">ETRI</organization>
			<address>
				<postal>
					<street>USN Research Division, ETRI, 161 Gajeong-dong, Yuseong-gu,</street>
					<city>Daejeon</city>
					<code>305-350</code>
					<country>KOREA</country>
				</postal>
				<phone>+82 42 860 5435</phone>
				<email>hamid@etri.re.kr</email>
			</address>
		</author>





    <!-- [TODO]: month and day will be generated automatically by XML2RFC; 
be sure the year is current.-->

    <date year="2009" />

    <!--[TODO] IETF area is optional -->

    <!--<area>Operations &amp; Management Area</area>-->

    <!--[TODO] WG name at the upperleft corner of the doc, 
IETF is fine for non-WG submissions -->

    <workgroup>Network Working Group</workgroup>

    <keyword>service discovery</keyword>


    <!--[TODO] add additional keywords here for IETF website search engine -->

    <abstract>
      <t>The Simple Service Location Protocol (SSLP) provides a framework for the discovery and selection of the services working on 6LoWPAN.  The protocol has a simple structure that is easy to be implemented on 6LoWPAN devices that are characterized by short range, low bit rate and low power.  The protocol also offers a mechanism for interoperability with the IP networks under SLP.  It enables communication between 6LoWPAN and other IP networks.</t>


      <!--Remember, don't put any citations in the abstract, and expand your acronyms. -->
    </abstract>


    <note title="Requirements Language">
        <t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;,
        &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
        &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,
        &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be
        interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
        </t>
    </note>

  </front>

  <middle>
    <section title="Introduction">
      <!-- It is good practice to echo the abstract in the Introduction, 
providing citations here. -->

      <t>6LoWPAN stands for IPv6 layer over low-power wireless personal area networks (LoWPAN) which consist of devices that conform to the IEEE 802.15.4-2003 standard [ieee802.15.4].  IEEE 802.15.4 devices are used to provide services like home security, fire alarm, medical sensing/monitoring, heating control, and building automation, etc. When clients want to use services without configuration, a service discovery mechanism is needed.</t>
	  <t>In IP networks, the Service Location Protocol(SLP) is used for access to information about the existence, location, and configuration of networked services [RFC2608].  SLP is well operating in IP networks, but there are several issues to be solved [I-D.kushalnagar-lowpan- goals-assumptions] to apply it to 6LoWPAN.  The limited packet size of 6LoWPANs is one of them; Given that in the worst case the maximum size available for transmitting IP packets over IEEE 802.15.4 frame is 81 octets, and that the IPv6 header is 40 octets long, (without optional headers), this leaves only 41 octets for upper-layer protocols, like UDP and TCP.  UDP uses 8 octets in the header, thereby leaving 33 octets for data, like SLP, over UDP.  However, the SLP message could easily be greater than this remaining octets, and it should be transmitted as multiple packets, causing traffic overheads to 6LoWPAN. </t>
	  <t>[RFC4944] introduces the adaption layer of fragmentation and reassembly  for IPv6 packets, while providing a header compression scheme for reducing the size of the IPv6 header.  Also,  it expects that 6LoWPAN uses mesh routing for the multi-hop forwarding of IPv6 packets at sub-IP layer.  This makes it difficult to use SLP directly, requiring to define a simple service discovery protcol to discover, control, and maintain services provided by devices in 6LoWPAN.</t>
	  <t>This document defines the Simple Service Location Protocol(SSLP) which provides a framework for the discovery and selection of network services in 6LoWPAN.  SSLP is simple and lightweight to be transmitted efficiently in 6LoWPAN. SSLP uses the Tokenized XML strings to minimize the packet excange. SSLP in 6LoWPAN could also interwork with SLPv2[RFC2608] in external IP networks.  That is, clients can discover and control services in 6LoWPAN regardless of whether they are located inside the 6LoWPAN or not.</t>
    </section>

    <section title="Terminology">

      <t>Terminologies used in this document are defined in [RFC2608] as follows:</t>
	  <t><list>
          <t>User Agent (UA): A process working on the user's behalf to establish contact with some service. The UA retrieves service information from the Service Agents or Directory Agents.</t>
          <t>Service Agent (SA): A process working on the behalf of one or more services to advertise the services.</t>
          <t>Directory Agent (DA): A process which collects service advertisements.</t>
		  <t>Service Type: Each type of service has a unique Service Type string.</t>
		  <t>Naming Authority: The agency or group which catalogs given Service Types and Attributes.  The default Naming Authority is IANA.</t>
		  <t>Scope: A set of services, typically making up a logical administrative group.</t>
		  <t>Translation Agent(TA): is newly defined in this document for interworking with SLPv2 in IP networks. TA is a process working on a device which has interfaces to both IP networks and 6LoWPAN.  It translates SLPv2 messages into SSLP messages, and vice versa.</t>

      </list></t>

		    <section title="Notation Conventions">

		  <t><list>
			  <t>Syntax: Syntax for string based protocols follow the conventions defined for ABNF [RFC2234].</t>
			  <t>Strings: All strings are encoded using the UTF-8 [RFC3629] transformation of the Unicode character set and are NOT null terminated when transmitted.  Strings are preceded by a two byte length field.</t>
			  <t>string-list: A comma delimited list of strings with the following syntax:
					   string-list = string / string ',' string-list</t>
		  </list></t>
			<t>In format diagrams, any field ending with a \ indicates a variable length field, given by a prior length field in the protocol.</t>

		</section>

    </section>



    <section title="Protocol Overview">

      <t>The Simple Service Location Protocol (SSLP) supports the same framework as SLP in which client applications are modeled as 'User Agents' (UAs), and services are advertised by 'Service Agents' (SAs). The 'Directory Agent' (DA) functions as a cache of the information about services registered by SAs and informs UAs of the existence of services.  Besides, SSLP introduces 'Translation Agents' which perform the translation of messages (which are defined in Section 4) for the interoperability with SLPv2.</t>
	  <t>The role of UA, SA, and DA in SSLP is not quite different from the ones in SLP.  The UA issues a 'Service Request' (SREQ) on behalf of the client application, specifying the characteristics of the service which the client requires.  The UA will receive a 'Service Reply' (SREP) specifying the location of all services in the 6LoWPAN which satisfy the request.</t>	  
	  
	  <t>SSLP allows both the two-party and three-party service discovery mechanisms.  In the two-party discovery, the UA directly issues SREQ to SAs.  This mechanism is useful for a small-sized 6LoWPAN because it doesn't require the configuration of DAs.  In this case, the UA broadcasts (or multicasts if possible) a SREQ to the entire 6LoWPAN to which it belongs using the link layer broadcasting scheme. </t>

	  <t>In the three-party discovery, one or more DAs are employed in order to reduce the broadcasting overheads of service requests especially for a large 6LoWPAN.  SAs send a 'Service Registration' (SREG) containing all the services they advertise to DAs and receive 'Service Acknowledgement' (SACK) in reply. DA caches mapping of Service to XML Token. SACK includes the corresponding Token that DA has assign to the SREG service. These advertisements must be refreshed with the DA or they expire.  UAs unicast SREQ to DAs instead of SAs if any DAs are known.  UAs and SAs MAY discover DAs in two ways. One, they broadcast a (SREQ) message for the DA service when they start up. Two, the DA sends unsilicited DA advetisment message periodially, which is listened by UAs and SAs. In both the cases the UAs and SAs receive DA Advertisement (DADV) message. DADV message contains the XML token corresponding to SREQ service message.</t>

	  <t>Services are grouped together using 'scopes'.  These are strings which identify services by location, administrative grouping, proximity in a network topology or some other category.</t>
		<artwork align='center' type='abnf'><![CDATA[
 +--------+-SSLP message- > +-----------+-SLPv2 message- > +--------+
 |UA,SA,DA|                 |Translation|                  |UA,SA,DA|
 |of SSLP |                 |   Agent   |                  |of SLPv2|
 +--------+ < -SSLP message-+-----------+ < -SLPv2 message-+--------+
          Figure 1: The operation of Translation Agent(TA)
]]></artwork>
      <t>The 'Translation Agent' (TA) must work on a machine which reaches both a IP network and a 6LoWPAN.  If a TA receives either a SLP message from a IP network or a SSLP message from a 6LoWPAN, it maps the SSLP messages to SLP messages and vice versa. TA gets Service Request Messages from DA of SSLP and forwards to corresponding SLP messages .  This operation is essentially needed for SSLP to be interoperable with SLP and vice versa.  With the TA, a UA can discover and control services in 6LoWPAN regardless of whether they are located inside the 6LoWPAN or not. Further work on TA TBD.</t>
	</section>

	 <section title="Required Simple Service Location Protocol(SSLP) Messages">

		<t>The minimum required implementation of SSLP consists of a UA, SA or both. The use of DA in itself is optional but in case a DA is deployed it MUST support all the SSLP messages.</t>
		<t>SAs and UAs MUST support SREQ, SREP, and DADV.  SAs MUST also support SREG, SACK, and SADV.  For UAs and SAs, to support the other messages is OPTIONAL.</t>
		<t>All SSLP messages begin with the following header:</t>
		<artwork align='center' type='abnf'><![CDATA[
                     1                   2                   3
 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Ver  |   Msg-ID  |O|F|  rsv  |        Sequence number        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
             Figure 2: SSLP general header format
]]></artwork>

		<t>Ver field describes the version of SSLP being used.</t>
		<t>Msg-ID is the number representing a message type as shown below:</t>

		<artwork align='center' type='abnf'><![CDATA[
 Message Type       Abbreviation    Msg-ID

 Service Request         SREQ        1
 Service Reply           SREP        2
 Service Registration    SREG        3
 Service Acknowledge     SACK        4
 DA Advertisement        DADV        5
 SA Advertisement        SADV        6
 Service Type Request    STREQ       7
 Service Type Reply      STREP       8
 Service Deregistration  SDER        9
]]></artwork>
<t> Two more message types and there detail needs TBD </t>
<t>O and F bit are compatible with the flag field in SLPv2 and defined in [RFC2608].  OVERFLOW is set when a message's length exceeds what can fit into a datagram.  FRESH is set on every new SREG.</t>
<t>The sequence number is set to a unique value for each unique SREQ message.  If the request message is retransmitted, the same sequence number is used.  Replies set the sequence number to the same value as the sequence number in the SREQ message.  This field is compatible with XID field in SLPv2.</t>
  
		
		    <section title="Service Request Message">

		<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = SREQ = 1)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AM|              Source Address (16/64/128 bit)               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   length of <service-type>    |      <service-type> String    \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    length of <scope-list>     |       <scope-list> String     \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     Figure 3: SSLP service request message header format
]]></artwork>
   <t>Addressing Mode (AM) field has three different values as follows:</t>

		<artwork align='center' type='abnf'><![CDATA[
Value   Meaning
01      16 bit short address is used as Source Address field
10      64 bit extended address is used as Source Address field
11      128 bit IPv6 address is used as Source Address field
]]></artwork>


		  <t>If< scope-list >field is omitted, length of< scope-list >field MUST be set to zero and all services matching < service-type > are discovered independent of < scope-list >.</t>
		  <t>The < service-type > field consists of service type strings.  Service Types SHOULD be defined by a "Service Template" [RFC2609], which provides expected attributes, values and protocol behavior.</t>
		  <t>In the presence of one or more DAs, UAs unicast SREQ messages to them. DAs MUST issue SREP messages in response to SREQ messages whether they know the service location UAs inquire or not.</t>

		   </section>


				    <section title="Service Reply Message">

		<artwork align='center' type='abnf'><![CDATA[
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = SREP = 2)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Error Code         |  Service Location Entry count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| < Service Location Entry 1 > ... < Service Location Entry N > \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      Figure 4: SSLP service reply message header format
]]></artwork>
   <t>A nonzero value in Error Code field indicates an error. In case of a
   nonzero value of Error Code, the rest of the message MAY be ignored.
   Moreover, errors are only returned against unicast requests.</t>

   <t>Error Code field has different values as follows:</t>

		<artwork align='center' type='abnf'><![CDATA[
Value   Meaning
 1      PARSING_ERROR: The message does not obey the SSLP syntax.
 2      SCOPE_ERROR: The scope field in SSLP message did not
        match to the scope supported by DA or SA.
 3      INTERNAL_ERROR: The DA or SA is not working properly
 4      MSG_NOT_SUPPORTED: The DA or SA gets an optional message
        not being supported
 5      ILLEGAL_REGISTRATION: The SREG has problems
 6      DA_BUSY: UA or SA should retry
]]></artwork>


		  <t>SREP message contains zero or more service location entries.  If no matching service locations are present in SAs or DAs, the SREP message with zero service location entries is returned in response to a unicast SREQ message.  However, a SREP message with zero service location entries MUST NOT be sent in response to a broadcast SREQ message.</t>
		  <t>The service location entry is defined as follows:</t>

		<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Lifetime            |LT |     Service Location      \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           Figure 5: Service location entry format
]]></artwork>
   <t>A service location entry may not be cached longer than the Lifetime
   seconds mentioned in the Lifetime field of Service location entry.</t>

   <t>Location Type (LT) field has three different values as follows:</t>

		<artwork align='center' type='abnf'><![CDATA[
Value   Meaning
01      16 bit short address is used as Service Location field
10      64 bit extended address is used as Service Location field
11      URL Location field is used as Service Location field
]]></artwork>
   <t>If LT field has the value of 11, Service Location field is replaced
   by the URL Location field defined as follows.</t>

		<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          length of URL        |      URL (variable length)    \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           Figure 6: URL location field format
]]></artwork>


		   </section>

    <section title="Service Acknowledgment Message">

		<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = SACK = 4)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Error Code         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Figure 7: SSLP service acknowledgement message header format
]]></artwork>

   
      <t>Service Acknowledgement Messages (SACK) messages are received in response to the SREG messages. The values of Error Code are same as defined in section 4.2.</t>

	</section>

    <section title="Directory Agent Advertisement Message">

		<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = DADV = 5)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Error Code         |    Service Location Entry     \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    length of <scope-list>     |       <scope-list> String     \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   Figure 8: SSLP directory agent advertisement header format
]]></artwork>

   
      <t>A DADV message is sent in two cases. First, when a DA receives a SREQ message with service type of "service: directory-agent". Second, to send an unsolicited advertising message by the DA.</t>
	  
      <t>The Error Code is set to zero when the DA broadcsts an unsolicited advetisement message. If the DADV is unicast (in response to SREQ message with "service:directory agent") the DA returns the same errors a SREP would.</t>
	  
      <t>The< scope-list >includes the scope provided by the DA. The< scope-list >of DA MUST not be NULL.</t>

      <t>DAs MUST send unsolicited periodically. SAs MUST listen for DADVs. UAs MAY do this. In case UAs do not listen to the DADVs, they must discover the DAs by sending SREQ message with service type of "service: directory-agent".</t>
	</section>

    <section title="Service Agent Advertisement Message">

		<artwork align='center' type='abnf'><![CDATA[
                     1                   2                   3
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = SADV = 6)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Service Location Entry count  |< Service Location Entry 1...N>\
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     length of <scope-list>    |      <scope-list> String      \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    Figure 9: SSLP service agent advertisement header format
]]></artwork>

   
      <t>A SADV message is sent when a SA receives a SREQ message with service type of "service: service-agent" or when SAs send unsolicited advertisment messages in the absence of DAs. SAs MUST not generate Service Agent Advertisement (SADV) messages if they have been configured to use specific DA(s).</t>

      <t>The Service Location Entry Count is set to 1 while responding to a SERQ with service type of "service: directory-agent". The Service Location Entry is filled as "service:directory-agent://< adr of SA >. In case of unsolited DADV, all the services provided by the SA are listed in the Service Location Entry preceded by the Service Location Entry count.</t>

	</section>


	</section>



    <section title="Optional Simple Service Location Protocol(SSLP) Messages">

		<section title="Service Type Request">

            <t>The service type request (STREQ) allows a UA to find all the service types available on the network.</t>

			<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = STREQ = 7)       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| AM|              Source Address (16/64/128 bit)               \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     length of <scope-list>    |      <scope-list> String      \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    Figure 10: SSLP service type message header format
]]></artwork>

	   
		  <t>In the presence of one or more DAs, UAs unicast STREQ messages to them.  DAs MUST issue Service Type Reply (STREP) messages in response to STREQ messages.</t>
		  <t>In the absence of DAs, STREQ messages are broadcasted over 6LoWPAN and SAs respond with STREP messages.</t>


		</section>

		<section title="Service Type Reply">

			<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = STREP = 8)       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Error Code         |    Service Location Entry     \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     length of <stype-list>    |      <stype-list> String      \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    Figure 11: SSLP service type reply header format
]]></artwork>

	   
		  <t>The Service Location Entry is included in STREQ to reduce the communication overhead when there is no DA. Without Service Location Entry the UA ahs to maks two broadcasts. First, it shall broadcast STREQ to find all the service types in the network. Second, UA shall broadcast SREQ to discover the SAs which can provide a specific service type. However, in the presence of Service Location Entry a unicast SREQ can be made after knowing all the service types.</t>
		  <t>The service type list < stype-list > is a < string-list > field which contains the list of available service types with an SA or a DA.</t>


		</section>

		<section title="Service Deregistration Message">

            <t>The DA deletes a service registration when the Lifetime for the service expires. In case an SA terminates the service provisioning before its Lifetime is expired, it SHOULD deregister with the DA. SA MUST derigister the services with the same scope list which was used for service registration.</t>

			<artwork align='center' type='abnf'><![CDATA[
                    1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Simple Service Location header (Msg-ID = SDER = 9)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Service Location Entry                    \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    length of <service-type>   |     <service-type> String     \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     length of <scope-list>    |      <scope-list> String      \
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 Figure 12: SSLP service deregisteration message header format
	]]></artwork>

	   
		  <t>SDER messages are sent to DAs when SAs do not provide their services any more. These messages help eliminating any stale entries in the DAs.</t>
		</section>

	</section>


    <section title="Interoperability">

      <t>SSLP interoperates with SLPv2 via Translation Agent (TA).  A TA MUST be capable of the translation between SLPv2 and SSLP.  In other words, TA translates SLPv2 messages into SSLP messages, and vice versa.  SSLP Service Request will be tranformed to SLP Service Request message. TA receives Service Reply from SLP and then transforms that message to SSLP Service Reply Message.  </t>
	</section>



    <section title="Security Considerations">
     

      <t>The security considerations of the [RFC3111] are applicable to this document.  Especially, Translation Agent (TA) MUST be secured for processing SSLP/SLP messages translation and specific considerations will be carefully studied in the next versions.</t>

    </section>

    <section title="IANA Considerations">
	<t>TBD.</t>

    </section>

    <!-- The Author's Addresses section will be generated automatically by XML2RFC from the front information -->

    <section title="Acknowledgements">
      <t>Thanks to Shafique Ahmad Chaudhry, Byung-hee Roh, Sun-ho Kim, Mi-jung Lee, and Minho Lee for their useful discussions and supports for writing this document.</t>

    </section>
  </middle>

  <back>

-->

    <references title="Normative References">
	
      &rfc2119;

      &rfc4919;
      &rfc4944;

      &rfc2165;

      &rfc2608;

      &rfc2609;

	  &rfc3111;



      <!-- end of references that are required to support the boilerplate text. -->

      <!-- [TODO]: start of normative references samples. Replace with your own. -->
  <reference anchor="IEEE802.15.4">
  <front>
  <title>Wireless medium access control and physical layer specifications for low-rate wireless personal area networks.</title> 
  <author initials="IEEE Standard" surname="802.15.4-2003" fullname="IEEE Standard, 802.15.4-2003">
  <organization>IEEE Standard, 802.15.4-2003</organization> 
  </author>
  <date year="2003" month="May" /> 
  </front>
  </reference>


      <!-- end of normative references samples. -->
    </references>

    <references title="Informative References">
      <!-- start of informative references that are required to support the boilerplate text. -->


	  &rfc2234;
	  &rfc2396;
	  &rfc2434;
	  &rfc3629;

	
	</references>

  </back>
</rfc>