home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-piscitello-mncp-00.txt < prev    next >
Text File  |  1997-08-29  |  149KB  |  3,408 lines

  1.  
  2.  
  3. INTERNET-DRAFT                                                D.Piscitello,
  4. Expires: February 28, 1998                                         L.Phifer
  5.                                                             Core Competence
  6.                                                                     Y.Wang,
  7.                                                                     R.Hovey
  8.                                                                    Bellcore
  9.                                                             August 28, 1997
  10.  
  11.  
  12.                    Mobile Network Computing Protocol (MNCP)
  13.                         <draft-piscitello-mncp-00.txt>
  14.  
  15. Status of this Memo
  16.  
  17.    This document is an Internet-Draft.  Internet-Drafts are working
  18.    documents of the Internet Engineering Task Force (IETF), its areas, and
  19.    its working groups.  Note that other groups may also distribute working
  20.    documents as Internet-Drafts.
  21.  
  22.    Internet-Drafts are draft documents valid for a maximum of six months
  23.    and may be updated, replaced, or obsoleted by other documents at any
  24.    time. It is inappropriate to use Internet-Drafts as reference material
  25.    or to cite them other than as "works in progress."
  26.  
  27.    To view the entire list of current Internet-Drafts, please check the
  28.    "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  29.    Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe),
  30.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  31.    ftp.isi.edu (US West Coast).
  32.  
  33.    Distribution of this memo is unlimited.  Please send comments to the
  34.    authors.
  35.  
  36. Abstract
  37.  
  38.    This memo documents an architecture and protocol for mobile network
  39.    computing. The protocol described herein provides session control and
  40.    reliable delivery services to accommodate mobile client access to
  41.    internetworked applications within a 'client-agent-server'
  42.    architecture.  Client middleware based on this architecture can operate
  43.    over wireless data networking services such as RAM, ARDIS, CDPD, PCS
  44.    data services and wireless local area networks.  This client middleware
  45.    can be implemented using any standard application programming interface
  46.    to a commercial UDP/IP stack on Hand-held PC's (HPC), personal digital
  47.    assistants (PDA's), four-line browsers or 'smart' phones as well as
  48.    laptop and desktop computers.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.    <draft-piscitello-mncp-00.txt>                               Page 1
  60.  
  61.  
  62. INTERNET DRAFT                   MNCP                   August 28, 1997
  63.  
  64.  
  65.                              Table of Contents
  66.  
  67. 1. Introduction...........................................................4
  68. 1.1 Motivation............................................................4
  69. 1.2 Design Goals..........................................................4
  70. 1.3 Mobile Network Computing Architecture.................................6
  71. 1.4 Relationship of MNCP to other Internet Protocols......................7
  72. 1.5 Requirements..........................................................8
  73. 1.6 Terms.................................................................8
  74. 2. Protocol Overview......................................................9
  75. 2.1 Single Packet Reliable Delivery Service...............................9
  76. 2.2 Multi-Packet Reliable Delivery Service...............................10
  77. 2.2.1 NOTIFICATION Packet Processing (Sender)............................10
  78. 2.2.2 NOTIFICATION Packet Processing (Receiver)..........................12
  79. 2.2.3 Data Transfer (Sender).............................................12
  80. 2.2.4 Data Transfer (Receiver)...........................................13
  81. 2.3 Session Control Service..............................................14
  82. 2.3.1 Subscriber Validation..............................................14
  83. 2.3.2 Registration.......................................................14
  84. 2.3.3 Application Data Transfer..........................................15
  85. 2.3.4 Deregistration.....................................................15
  86. 2.3.5 Correlation Identifiers............................................16
  87. 3. MNCP Reliable Delivery Packets........................................16
  88. 3.1 Packet Types.........................................................16
  89. 3.2 Packet Headers.......................................................17
  90. 3.3 Packet Body..........................................................18
  91. 3.4 Packet Length........................................................20
  92. 3.5 Information Elements.................................................20
  93. 3.5.1 Data (Final and More)..............................................21
  94. 3.5.2 Message Length.....................................................21
  95. 3.5.3 Acknowledge Code...................................................22
  96. 3.5.4 Data Compression...................................................22
  97. 3.5.5 Data Offset........................................................23
  98. 3.5.6 Packet Size........................................................23
  99. 3.6 PT_CMD...............................................................23
  100. 3.7 PT_ACK...............................................................24
  101. 3.8 PT_NTFN..............................................................24
  102. 3.9 PT_DATA..............................................................24
  103. 4. MNCP Session Control Packets..........................................25
  104. 4.1 Packet Types.........................................................25
  105. 4.2 Session Control Headers..............................................25
  106. 4.3 Session Control Body.................................................26
  107. 4.4 Packet Length........................................................26
  108. 4.5 Information Elements.................................................26
  109. 4.5.1 Subscriber ID......................................................26
  110. 4.5.2 Application ID.....................................................26
  111. 4.5.3 Subscriber Password................................................27
  112. 4.5.4 Registration Status................................................27
  113. 4.5.5 Message Cross-Correlation ID.......................................27
  114. 4.5.6 Acknowledge Code...................................................27
  115. 4.6 FUN_REG_REQ..........................................................28
  116. 4.7 FUN_DEREG_REQ........................................................28
  117. 4.8 FUN_<other>..........................................................29
  118. 5. MNCP Reliable Delivery Processing.....................................29
  119.  
  120.  
  121. <draft-piscitello-mncp-00.txt>                                  Page 2
  122.  
  123.  
  124. INTERNET DRAFT                   MNCP                   August 28, 1997
  125.  
  126.  
  127. 5.1 Phase Diagram........................................................29
  128. 5.2 State Diagram........................................................31
  129. 5.3 States...............................................................32
  130. 5.4 Events...............................................................33
  131. 5.5 Actions..............................................................34
  132. 5.6 Timers, Acknowledgment, and Retransmission...........................37
  133. 5.7 Packet Size Negotiation, Segmentation and Reassembly.................37
  134. 5.7.1 Computing the payload size for PT_DATA packets.....................38
  135. 5.7.2 Segmentation and PT_DATA Packet Composition........................38
  136. 5.7.3 Reassembly.........................................................39
  137. 5.8 Data Compression.....................................................39
  138. 6. MNCP Session Control Processing.......................................40
  139. 6.1 Phase Diagram........................................................40
  140. 6.2 State Diagram........................................................42
  141. 6.3 States...............................................................42
  142. 6.4 Events...............................................................43
  143. 6.5 Actions..............................................................44
  144. 7. Security Considerations...............................................48
  145. 8. References............................................................48
  146. 9. Authors' Addresses....................................................49
  147. Appendix A. HDML Transactions using MNCP.................................50
  148. Appendix B. Future Protocol Extensions...................................55
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183. <draft-piscitello-mncp-00.txt>                                  Page 3
  184.  
  185.  
  186. INTERNET DRAFT                   MNCP                   August 28, 1997
  187.  
  188.  
  189.  
  190. 1. Introduction
  191.  
  192. 1.1 Motivation
  193.  
  194.    Mobile network computing, if constrained by consumer interest alone,
  195.    would at this point in time increase more rapidly than the growth of
  196.    the Internet itself.  Applications that drive consumer interest --
  197.    access to the public web and intranets, remote access to corporate and
  198.    public databases, unified messaging and two-way paging -- are already
  199.    present and widely available, having already been enabled by public and
  200.    enterprise IP-based internetworking.
  201.  
  202.    The need to access internetworked applications remotely has already
  203.    been established, but the means of addressing that need are only
  204.    partially satisfied through the use of wireline and portable (laptop)
  205.    PC solutions.
  206.  
  207.    The rapid acceptance of cellular telephony provides a strong indication
  208.    of how quickly similarly untethered computer communications will be
  209.    embraced by consumers. Recent technology advances now make it possible
  210.    to produce handheld devices that are as small as cellular phones yet
  211.    smart as portable PC's.  These devices are very adapted for wireless
  212.    communications environments, better able to maintain signal strength
  213.    and intelligently manage power consumption.  It is thus likely that
  214.    mobile network computers (MNCs), hand-held PC's (HPCs), personal
  215.    digital assistants, and four-line browser or "smart" phones operating
  216.    over wireless data networks will complement (or inherit) existing
  217.    remote access alternatives, and create a potentially enormous consumer
  218.    market for wireless data networking services such as RAM, ARDIS, CDPD,
  219.    and PCS data services.
  220.  
  221.    This new class of mobile computing devices (MCD's) will often operate
  222.    in low bandwidth, high latency environments, where it is important to
  223.    minimize communications consumption.  Such environments are not,
  224.    however, the exclusive operating domains for every mobile computing
  225.    device, and a device does not have to be among those types previously
  226.    enumerated to be mobile.  Any classification of MCD's must also include
  227.    desktop and docking laptop computers in wireless LAN environments,
  228.    where mobility within a building or campus is provided by wireless
  229.    Ethernet or similar technology.  It is also true that many mobile
  230.    computing devices may be used in both wireless and wireline
  231.    environments: change a network interface card (NIC) on many of these
  232.    devices, and the MCD can operate over analog dial, ISDN, or in a LAN.
  233.  
  234. 1.2 Design Goals
  235.  
  236.    Because of the diverse nature of Mobile Computing Devices, the
  237.    communications environments over which they may operate, and the
  238.    applications MCD's may provide, several design goals emerge.
  239.  
  240.    1) It is important to minimize communications consumption when low
  241.    bandwidth, high latency networks are used by MCDs;
  242.  
  243.  
  244.  
  245. <draft-piscitello-mncp-00.txt>                                  Page 4
  246.  
  247.  
  248. INTERNET DRAFT                   MNCP                   August 28, 1997
  249.  
  250.  
  251.    2) Applications should operate well irrespective of wireless or
  252.    wireline network characteristics; and
  253.  
  254.    3) It should be possible for certain classes of MCD's to operate in a
  255.    disconnected state.
  256.  
  257.    4) It should be relatively simple for end users to change
  258.    communications environments; optimally, an end user would be able to
  259.    install the appropriate network interface and begin communicating over
  260.    a different type of network.
  261.  
  262.    5) It is desirable to have a mechanism to allow subscriber
  263.    identification and authentication to be IP address independent.
  264.  
  265.    6) It is desirable to minimize communications consumption for low
  266.    bandwidth devices with limited battery life.
  267.  
  268.    7) Both mobile computing devices and mobility servers should be able to
  269.    initiate communications and transfers of data; i.e., client initiated
  270.    or pull" applications as well as server initiated or "push"
  271.    applications should be accommodated.
  272.  
  273.    +----------+  +----------+  +-------+  +---------+
  274.    | desktop  |  | handheld |  |  PDA  |  |  smart  |
  275.    |    PC    |  |    PC    |  |       |  |  phone  |
  276.    +----------+  +----------+  +-------+  +---------+
  277.          |             |           |           |
  278.    +------------------------------------------------+
  279.    |                  Applications                  |
  280.    +------------------------------------------------+
  281.    |         mobile network computing middleware    |
  282.    +------------------------------------------------+
  283.    |        commercial UDP/IP implementation        |
  284.    +------------------------------------------------+
  285.  
  286.    Mobile client applications will operate on wireless networks in a
  287.    bandwidth-latency range where many commercial TCP's have insufficient
  288.    tuning parameters to permit efficient operation.  Custom TCP's might be
  289.    developed to accommodate the specific bandwidth-delay characteristics
  290.    of wireless networks, but these custom TCP's would need to be installed
  291.    in all networked hosts with which the user wishes to communicate, which
  292.    is not practical.
  293.  
  294.    To meet the design goals enumerated, and to avoid situations where the
  295.    end user would be responsible for reconfiguring TCP for each
  296.    environment, or where the user might have to install a different TCP
  297.    entirely to operate over a LAN or wireless WAN, we believe it is
  298.    appropriate to build a middleware element that can operate on top of
  299.    any commercial, off-the-shelf UDP/IP implementation.
  300.  
  301.    [Note: It is conceivable that a standard TCP could be adapted to
  302.    satisfy the network transparency design goals.  The difficulty with
  303.    this approach is that it will be some time before this can propagate
  304.    into existing TCP implementations.  More importantly, the existing TCP
  305.  
  306.  
  307. <draft-piscitello-mncp-00.txt>                                  Page 5
  308.  
  309.  
  310. INTERNET DRAFT                   MNCP                   August 28, 1997
  311.  
  312.  
  313.    architecture does not allow optimizations for minimizing communications
  314.    consumption for low bandwidth devices with limited battery life, as
  315.    will be described with MNCP.]
  316.  
  317.    These requirements suggest that important efficiencies can be achieved
  318.    by adopting an agent-enabled, transmission independent messaging
  319.    paradigm. This client-agent-server architecture allows for the
  320.    introduction of increased efficiencies such as session level data
  321.    compression.
  322.  
  323.    [Note: This client-agent-server relationship is euphemistically
  324.    referred to as a thin-client architecture. However, it is appropriate
  325.    to consider so-called thin clients as one of many, rather than the
  326.    only, type of client accommodated by the MNC architecture.]
  327.  
  328.    +-----------+            +-------------+             +-------------+
  329.    |  Mobile   |            |   Mobile    |             | Enterprise  |
  330.    |  client   |            |   Agent/    |             |     or      |
  331.    | (HPC,PDA, |            | application |             |  Internet   |
  332.    |  laptop.) |            |   proxy     |             | application |
  333.    |           |            |             |             |  server(s)  |
  334.    +-----------+            +-------------+             +-------------+
  335.          |                     |    |                         |
  336.          |                     |    |        Internet or      |
  337.          |___wireless network__|    |___Enterprise network____|
  338.  
  339.    In addition, client-server behavior and the "chatty" protocol behavior
  340.    associated with client-server (web) interaction and transactions can be
  341.    optimized by introducing a degree of parallelism, i.e., by adopting
  342.    common service or "session layer" framing as well as application
  343.    specific framing, on top of traditional transfer control framing.  In
  344.    addition to the operational efficiencies introduced with this approach,
  345.    mechanisms for providing reliable delivery over wireless technologies
  346.    can be developed and applied in application, rather than TCP "kernel"
  347.    and operating system, space.
  348.  
  349.  
  350. 1.3 Mobile Network Computing Architecture
  351.  
  352.    The Mobile Network Computing architecture consists of a middleware
  353.    service component to support user registration and authentication, data
  354.    transfer (with compression) and reliable delivery.  A diverse set of
  355.    application service components may ride on top of this middleware, each
  356.    providing application-specific services such as mobile (unified)
  357.    messaging, paging, browsing, and remote database access.
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369. <draft-piscitello-mncp-00.txt>                                  Page 6
  370.  
  371.  
  372. INTERNET DRAFT                   MNCP                   August 28, 1997
  373.  
  374.  
  375.          MCD             Mobility Server        External Server
  376.  
  377.      +--------------+                             +--------------+
  378.    +-------------+  |    +--------------+       +-------------+  |
  379.    |Client App(s)|--+    |  Appl Agent  |       |Server App(s)|--+
  380.    +-------------+       +------+-------+       +-------------+
  381.    |    MNCP     |       | MNCP | Other |       | Other Stack |
  382.    +-------------+       +------+ Stack |       |(HTTP, SMTP, |
  383.    |    UDP      |       | UDP  |(HTTP, |       |TCP/IP, etc) |
  384.    +-------------+       +------+ SMTP, |       |             |
  385.    |    IP       |       | IP   | TCPIP)|       |             |
  386.    +-------------+--------------+-------+-------+-------------+
  387.    |      Wireless Network      |      Wireline Network       |
  388.    +----------------------------+-----------------------------+
  389.  
  390.    This internet-draft describes the Mobile Network Computing Protocol,
  391.    which provides the services ascribed to the middleware component of the
  392.    architecture.
  393.  
  394. 1.4 Relationship of MNCP to other Internet Protocols
  395.  
  396.    MNCP is designed to be implemented on top of the Datagram protocol
  397.    (UDP).  MNCP packets have an IP header, a UDP header, and an MNCP
  398.    header.
  399.  
  400.          MCD                Mobility Server
  401.      +--------------+         +--------------+  Server Apps can
  402.    +-------------+  |       +-------------+  |  be Local or
  403.    |Client App(s)|--+       |Server App(s)|--+  Distributed to
  404.    +-------------+          +-------------+     External Server
  405.    |    MNCP     |          |    MNCP     |
  406.    +-------------+          +-------------+   +-----+-----+--------+
  407.    |    UDP      |          |    UDP      |   | IP  | UDP | MNCP   |
  408.    +-------------+          +-------------+   | Hdr | Hdr | Packet |
  409.    |    IP       |          |    IP       |   +-----+-----+--------+
  410.    +-------------+------------------------+      ^     ^
  411.    |           Wireless Network           |      |     +- Src/DestPort
  412.    +--------------------------------------+      |        Checksum
  413.                                                  +- Src/Dest IP Address
  414.  
  415.    The source and destination address fields of the IP header are used by
  416.    MNCP to identify the requesting and responding hosts.  For example, a
  417.    request initiated by an MCD to a Mobility Server will carry the MCD's
  418.    IP address in the source field and the Mobility Server's IP address in
  419.    the destination field.
  420.  
  421.    The source and destination port fields of the UDP header are used by
  422.    identify the requesting and responding MNCP's.  An MNCP implementation
  423.    listens to an assigned "well known" UDP port number (to be assigned and
  424.    recorded by IANA[2]) for incoming requests, and demultiplexes them to
  425.    the appropriate application based upon Service ID (see Section 4.5.2).
  426.    For example, a request initiated by a mobile messaging client
  427.    application will carry the application's UDP port number in the source
  428.    port field (selected from the range of values for UDP "ephemeral" or
  429.  
  430.  
  431. <draft-piscitello-mncp-00.txt>                                  Page 7
  432.  
  433.  
  434. INTERNET DRAFT                   MNCP                   August 28, 1997
  435.  
  436.  
  437.    client ports) and the "well known" port number for MNCP in the
  438.    destination port field.
  439.  
  440.    The UDP header length field reflects the total size of the MNCP packet.
  441.    MNCP relies upon the UDP header's checksum field and error checking to
  442.    protect the MNCP packet.  MNCP provides end-to-end acknowledgment,
  443.    retransmission, flow control, and segmentation as needed to insulate
  444.    supported applications from the diverse characteristics of the
  445.    underlying mobile network.
  446.  
  447.    Client and server applications supported by MNCP are identified by a
  448.    Service ID field carried in the first MNCP packet of each packet
  449.    sequence.  In order to send or receive MNCP packets with a given
  450.    Service ID, the MCD must register for that service with the Mobility
  451.    Server.  The MNCP is responsible for authenticating the client and
  452.    performing access control, based upon Subscriber ID and Password fields
  453.    supplied by the MCD.  The MNCP relays messages between server
  454.    applications and client applications currently registered for that
  455.    Service ID.
  456.  
  457. 1.5 Requirements
  458.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  459.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  460.    document are to be interpreted as described in RFC 2119[5].
  461.  
  462. 1.6 Terms
  463.    This memo uses a number of terms to describe components of the MNCP.
  464.    Other common terms are used as specified in RFC 1983[4].
  465.  
  466.    Mobile Computing Device (MCD)
  467.      PDA, laptop, hand-held device, desktop PC, or other network computer
  468.      connected via wireless technology to a Mobility Server.
  469.  
  470.    Mobility Server (MS)
  471.      The system which acts as an application layer gateway or agent between
  472.      MCDs and networked application services such as mobile messaging or
  473.      web-enabled database access.
  474.  
  475.    Client Application
  476.      An application located on an MCD which uses MNCP to communicate with
  477.      Server Applications.
  478.  
  479.    Server Application
  480.      An application conceptually located on a Mobility Server, but which
  481.      may be physically distributed (i.e., a service-specific application
  482.      gateway on the Mobility Server relays messages to and from a server
  483.      application running on an external server).
  484.  
  485.    Packet
  486.      The basic unit of MCNP communication, consisting of a structured
  487.      sequence of octets matching the syntax defined in Sections 3-4 and
  488.      transmitted over wireless networks connecting an MCD and its Mobility
  489.      Server.
  490.  
  491.  
  492.  
  493. <draft-piscitello-mncp-00.txt>                                  Page 8
  494.  
  495.  
  496. INTERNET DRAFT                   MNCP                   August 28, 1997
  497.  
  498.  
  499. 2. Protocol Overview
  500.    This section provides a brief overview of each type of service,
  501.    enumerating the features provided by each service.
  502.  
  503.    MNCP operates over the User Datagram Protocol, and relies on UDP
  504.    protocol for protocol demultiplexing and data integrity . MNCP provides
  505.    the following basic services:
  506.  
  507.    - A single packet (acknowledged datagram) reliable delivery service
  508.      supports applications where a single datagram request and reply
  509.      sequence is sufficient for application data transfer.
  510.  
  511.    - A multi-packet reliable delivery service supports applications
  512.      requiring the reliable delivery of arbitrarily long data.
  513.  
  514.    - A set of registration and request/response correlation (message flow
  515.      support) services collectively referred to as SESSION CONTROL.
  516.  
  517.    The MNC protocol consists of a message set of four basic packet types:
  518.    COMMAND, NOTIFICATION, DATA, and ACKNOWLEDGE.  Reliable delivery and
  519.    session control services are provided through the use of Information
  520.    Elements (IE's) encoded in these four packet types.  The encodings of
  521.    Information Elements for each packet type are described in sections 3
  522.    and 4.
  523.  
  524.    The remainder of section 2 provides an overview of how MNCP provides
  525.    data transfer and session control services to mobile applications.
  526.  
  527. 2.1 Single Packet Reliable Delivery Service
  528.    The single packet reliable delivery service is an acknowledged datagram
  529.    service.  The service makes use of the COMMAND (PT_CMD) and ACKNOWLEDGE
  530.    (PT_ACK) packets. The basic features of the service are:
  531.  
  532.    - Data transfer
  533.    - Packet correlation
  534.    - error detection and recovery using positive acknowledgment with
  535.      retransmission based on timeout
  536.  
  537.    The single packet reliable delivery service is used when an application
  538.    invokes the service with a request to send data, and a single MNCP
  539.    datagram request and reply sequence is sufficient for application data
  540.    transfer.  This is true when the total amount of data to be sent is
  541.    less than or equal to the default packet size (470 octets).
  542.  
  543.    The MNCP constructs a COMMAND packet as follows.  Common header fields
  544.    are populated as discussed in section 3.2. A correlation identifier
  545.    value is chosen for the packet exchange by the MNCP and encoded in the
  546.    COMMAND packet (see section 2.3.5).  Session Control information
  547.    supplied by the application in the MNCP service request (service,
  548.    function, and subscriber identifiers, and the subscriber password, see
  549.    Section 2.3) are encoded in the packet header, along with any
  550.    application-specific information elements supplied in the request.
  551.    Application data are then appended to the header as "payload".
  552.  
  553.  
  554.  
  555. <draft-piscitello-mncp-00.txt>                                  Page 9
  556.  
  557.  
  558. INTERNET DRAFT                   MNCP                   August 28, 1997
  559.  
  560.  
  561.    The COMMAND packet is sent in a UDP packet to the well-known MNCP port
  562.    (source UDP port value is assigned from UDP client space), and a retry
  563.    timer is initiated by the sender.  If an acknowledgment is not received
  564.    before the retry timer expires, the COMMAND packet is resent.  If a
  565.    specified maximum number of retry attempts is exceeded and an
  566.    ACKNOWLEDGMENT is not received, the failure is reported to the
  567.    application.  If an ACKNOWLEDGMENT is received, a confirmation
  568.    (delivery success or failure) is returned to the application.
  569.  
  570.    When a COMMAND packet is received, the MNCP parses the packet and
  571.    composes and returns a ACKNOWLEDGMENT packet containing a negative ACK
  572.    code if errors were detected.  Otherwise, the MNCP forwards the packet
  573.    to the MNCP session control for processing (see section 2.3). If
  574.    subscriber authentication and application service access control are
  575.    successful, session control passes the contents of the data payload to
  576.    the application service indicted in the header, and returns a positive
  577.    acknowledgment to MNCP.  If authentication fails, or the subscriber is
  578.    not authorized to use this application, session control will return a
  579.    negative acknowledgment code to MNCP.  Upon reception of a response
  580.    from session control, the MNCP composes and returns an ACKNOWLEDGMENT
  581.    packet with a positive or negative ACK code (the ACK code may be
  582.    negative, indicating a session control failure, such as an invalid
  583.    subscriber identifier or password).
  584.  
  585. 2.2 Multi-Packet Reliable Delivery Service
  586.    The multi-packet reliable delivery service is used when an application
  587.    attempts to send a message that is longer than the default packet size
  588.    offered (see section 3.4), i.e., when the entire user data,
  589.    uncompressed, cannot be transferred in a single packet.  The service
  590.    makes use of the NOTIFICATION (PT_NTFN) DATA (PT_DATA) and ACKNOWLEDGE
  591.    (PT_ACK) packets. The basic features of the service are:
  592.  
  593.    - Data Transfer
  594.    - Packet correlation
  595.    - Packet size selection
  596.    - Data compression method selection
  597.    - Error detection and recovery using positive acknowledgment with
  598.      retransmission based on timeout
  599.    - Flow control
  600.    - Segmentation and reassembly
  601.    - Data compression (when selected)
  602.  
  603. 2.2.1 NOTIFICATION Packet Processing (Sender)
  604.    When the multi-packet reliable delivery service is used, the MNCP
  605.    constructs a NOTIFICATION packet to initiate a sequence of data
  606.    packets.  The purpose of the NOTIFICATION packet is to convey to the
  607.    receiver certain information regarding overall and compressed size of
  608.    the data to be transferred, and to propose a data compression method
  609.    and maximum packet size to use when transferring subsequent data in the
  610.    context of this multi-packet transfer.
  611.  
  612.    The NOTIFICATION packet is always default packet size (470 octets) or
  613.    less, and is constructed as follows. Common header fields are populated
  614.    as discussed in section 3.2.  A correlation identifier value is chosen
  615.  
  616.  
  617. <draft-piscitello-mncp-00.txt>                                 Page 10
  618.  
  619.  
  620. INTERNET DRAFT                   MNCP                   August 28, 1997
  621.  
  622.  
  623.    for the packet exchange by the MNCP (see section 2.3.5) and encoded in
  624.    the NOTIFICATION packet.  The sequence number in the NOTIFICATION is
  625.    set to an initial value of zero (all subsequent DATA packets within the
  626.    same packet sequence are incremented sequentially by one).  The total
  627.    (uncompressed) length of the application message to be sent is encoded
  628.    in the packet as the Original Message Length.
  629.  
  630.    To increase network efficiency, the sender can propose to use a packet
  631.    size larger than the default packet size.  For this version of the
  632.    protocol, the maximum packet size that can be proposed is 2048 octets
  633.    (see section 3.4).  The sender can also propose to use data
  634.    compression, by specifying a compression method in the Data Compression
  635.    Option.  Proposing a larger packet size and a data compression method
  636.    are options in the MNCP.
  637.  
  638.    Session Control information supplied by the application in the MNCP
  639.    service request (service, function, and subscriber identifiers, and the
  640.    subscriber password, see Section 2.3) are encoded in the packet header,
  641.    along with any application-specific information elements supplied in
  642.    the request.
  643.  
  644.    The NOTIFICATION packet is sent in a UDP packet to the well-known MNCP
  645.    port (source UDP port value is assigned from client space), and a retry
  646.    timer is initiated by the sender.  If an ACKNOWLEDGMENT packet is not
  647.    received before the retry timer expires, the NOTIFICATION packet is
  648.    resent.  If a specified maximum number of retry attempts is exceeded
  649.    and an ACKNOWLEDGMENT packet is not received, a failure is reported to
  650.    the application (see section 5.6).
  651.  
  652.    If an ACKNOWLEDGMENT packet containing a positive ACK code is received,
  653.    the sender begins transferring application data (see section 2.2.3).
  654.    If the receiver has accepted an increased packet size, then the sender
  655.    extracts the packet size specified in the ACKNOWLEDGMENT packet and
  656.    uses this for subsequent message transfer.  The packet size indicated
  657.    in the ACKNOWLEDGMENT packet may be equal to or less than the size
  658.    proposed by the sender. If the sender has proposed a data compression
  659.    method, a positive ACK code indicates that the receiver has agreed to
  660.    the data compression option proposed by the sender in the NOTIFICATION
  661.    packet being ACKed.
  662.  
  663.    The receiver may return a negative code to reject the compression
  664.    method proposed in a NOTIFICATION packet, and may propose an
  665.    alternative compression methods in the ACKNOWLEDGEMENT packet, to
  666.    expedite the compression selection process. If the sender supports the
  667.    data compression method proposed, the sender resends the NOTIFICATION,
  668.    identifying the data compression proposed by the receiver in the
  669.    ACKNOWLEDGMENT packet; alternatively, the sender may bid a new method.
  670.    The receiver may again return a negative acknowledgment code to reject
  671.    the proposed compression method, and (optionally) propose an
  672.    alternative method.  This form of "bidding" continues until a mutually
  673.    acceptable compression method is identified (no compression is a
  674.    legitimate option).  The sender recognizes that compression selection
  675.    has concluded when it receives an ACKNOWLEDGMENT packet containing a
  676.    positive acknowledgment code.
  677.  
  678.  
  679. <draft-piscitello-mncp-00.txt>                                 Page 11
  680.  
  681.  
  682. INTERNET DRAFT                   MNCP                   August 28, 1997
  683.  
  684.  
  685.  
  686.    [NOTE: Under this compression selection scheme, the sending MNCP must
  687.    compress the data using a particular algorithm before it sends the
  688.    PT_NTFN in order to convey the compressed length.  This reflects
  689.    current implementation practice.  This memo does not preclude the use
  690.    and future specification of stream compression algorithms that could be
  691.    more closely coupled with an underlying transmission service, to
  692.    optimize performance.]
  693.  
  694. 2.2.2 NOTIFICATION Packet Processing (Receiver)
  695.    The MNCP parses an incoming NOTIFICATION packet and composes and
  696.    returns a ACKNOWLEDGMENT packet containing a negative ACK code if
  697.    errors were detected in the common header.  Otherwise, the receiver
  698.    examines the NOTIFICATION packet to determine if the sender has
  699.    proposed any options.  If the sender has proposed a packet size greater
  700.    than the default packet size, the receiver may agree to use the larger
  701.    packet size or it may propose an alternative size that is less than the
  702.    size specified in the NOTIFICATION packet.  The receiver can propose a
  703.    smaller packet size and still return a positive acknowledgment.
  704.  
  705.    If the NOTIFICATION proposes a data compression method that is not
  706.    supported by the receiver, the receiver may reject the proposed data
  707.    compression method and propose an alternative method in the
  708.    ACKNOWLEDGMENT packet returned to the sender.  As described in section
  709.    2.2.1, a form of "bidding" continues until both receiver and sender
  710.    identify a mutually acceptable compression method.
  711.  
  712.    When processing associated with multi-packet reliable delivery is
  713.    completed by the receiver, the MNCP forwards the NOTIFICATION packet to
  714.    the MNCP session control for processing (see section 2.3).  Upon
  715.    reception of a response from session control, the MNCP composes and
  716.    returns an ACKNOWLEDGMENT packet with an ACK code indicating success or
  717.    failure of session control processing.
  718.  
  719. 2.2.3 Data Transfer (Sender)
  720.    When the NOTIFICATION processing is completed, the MNCP attempts to
  721.    transfer data.  The original application data submitted in the request
  722.    is first compressed (if compression is selected), then segmented into a
  723.    sequence of DATA packets containing data payloads of size {negotiated
  724.    packet size - DATA packet header information}, i.e., when constructing
  725.    a DATA packet, the MNCP attempts to create "n" packets of this fixed
  726.    size.  The last segment of application data transferred in this
  727.    sequence of DATA packets may contain fewer octets than the negotiated
  728.    packet size minus the header.
  729.  
  730.    The processing and transmission of a sequence of DATA packets is as
  731.    follows.  All packets in a sequence of DATA packets carry the same
  732.    Correlation Identifier as the NOTIFICATION packet.  A Data Offset is
  733.    encoded in each DATA packet to assist in the reassembly of the
  734.    application message.  The first in a sequence of DATA packets has a
  735.    Data Offset value of zero .  When compression is used, the sending MNCP
  736.    will fill the first DATA packet to the maximum payload available with
  737.    compressed data, otherwise, each packet is filled to the maximum
  738.    payload available with a segment of the original uncompressed message.
  739.  
  740.  
  741. <draft-piscitello-mncp-00.txt>                                 Page 12
  742.  
  743.  
  744. INTERNET DRAFT                   MNCP                   August 28, 1997
  745.  
  746.  
  747.    A sequence number is encoded in each DATA packet to assist in
  748.    determining packet order.  The sequence number of the initial DATA
  749.    packet in a sequence is set to one (1).
  750.  
  751.    For each additional DATA packet in the sequence, the Data Offset value
  752.    represents the offset from the beginning of the transmitted data
  753.    (hence, if the message was compressed before it was sent, the offset is
  754.    relative to the beginning of the compressed message, not the original
  755.    uncompressed message).  The sequence number value is incremented by one
  756.    for each subsequent segment created.  The sequence number is not
  757.    altered if a packet is retransmitted.
  758.  
  759.    Each packet in a sequence of DATA packets except the final DATA packet
  760.    carries an indication that more DATA packets follow this packet.  The
  761.    final DATA packet may contain less that the maximum data payload number
  762.    of octets, and must not be padded.
  763.  
  764.    Each DATA packet is sent as a UDP packet to the source port which sent
  765.    the last ACKNOWLEDGMENT packet, and a retry timer is initiated by the
  766.    sender.  If an acknowledgment is not received before the retry timer
  767.    expires, the DATA packet is resent.  If a specified maximum number of
  768.    retry attempts is exceeded and an ACKNOWLEDGMENT is not received, the
  769.    failure is reported to the application (see section 5.6).  If an
  770.    ACKNOWLEDGMENT containing the sequence number of the DATA packet sent
  771.    is received, the next DATA packet in the sequence is transmitted (out
  772.    of sequence ACKNOWLEDGMENT packets are discarded). Upon reception of a
  773.    positive ACKNOWLEDGMENT to the final DATA packet, a confirmation is
  774.    provided to the sending application, indicating successful delivery.
  775.  
  776. 2.2.4 Data Transfer (Receiver)
  777.    When the receiver sends a positive ACKNOWLDEGMENT in response to a
  778.    NOTIFICATION request, the receiving MNCP awaits the arrival of DATA
  779.    packets.
  780.  
  781.    Reliable delivery of data is achieved through the use of a stop-and-go
  782.    with timeout retransmission mechanism. Each DATA packet must be
  783.    individually acknowledged by the receiving MNCP. The ACKNOWLEDGMENT
  784.    packet must contain the same sequence number as the packet it is
  785.    acknowledging.
  786.  
  787.    Out of sequence DATA packets (any packet with a previously acknowledged
  788.    sequence number or a packet whose sequence number is greater than the
  789.    next expected sequence number) are discarded by the receiving MNCP.  As
  790.    part of the processing of out of sequence DATA packets, the receiving
  791.    MNCP returns an ACKNOWLEDGEMENT packet containing the sequence number
  792.    of the most recently acknowledged DATA packet.
  793.  
  794.    The receiver processes the incoming DATA packets as follows.  As part
  795.    of the process of determining whether a properly composed DATA packet
  796.    has arrived, the receiver checks to see if the correlation identifier
  797.    in the packet corresponds to a transfer in progress; if the packet is
  798.    incorrectly composed or the correlation identifier is unknown (not
  799.    associated with a transfer in progress), the packet is discarded.  If
  800.    the DATA packet is valid, the receiver uses the packet contents
  801.  
  802.  
  803. <draft-piscitello-mncp-00.txt>                                 Page 13
  804.  
  805.  
  806. INTERNET DRAFT                   MNCP                   August 28, 1997
  807.  
  808.  
  809.    (correlation identifier, data offset, sequence number, more/final
  810.    information, application data) and information relayed in the
  811.    NOTIFICATION request (message length, compressed and uncompressed,
  812.    compression method) to reassemble the application data.  The receiver
  813.    composes and returns an ACKNOWLDEGEMENT packet containing the
  814.    correlation identifier and sequence number from the DATA packet being
  815.    acknowledged. The ACKNOWLEDGEMENT packet is sent as a UDP packet to the
  816.    source port which sent the DATA packet being acknowledged.
  817.  
  818.    Reassembly of application data continues in this manner until a DATA
  819.    packet containing a "final data" indicator is processed.  The
  820.    reassembled data are uncompressed (if compression was used).
  821.    Application-specific information elements are forwarded to the
  822.    application, and a final ACKNOWLEDGEMENT packet is sent as a UDP packet
  823.    to the source port which sent the DATA packet being acknowledged.
  824.  
  825. 2.3 Session Control Service
  826.    MNCP session control packets are exchanged between an MCD and a
  827.    Mobility Server using MNCP reliable delivery packets.  The purpose of
  828.    session control is to provide user validation (authentication),
  829.    application access control, user registration (deregistration) for
  830.    application services, and application request/response correlation.
  831.  
  832. 2.3.1 Subscriber Validation
  833.    User validation (authentication) is based on a subscriber identifier
  834.    and subscriber password.  A subscriber identifier is assigned to the
  835.    user of a mobile computing device, and is intended to be independent
  836.    from any lower layer (e.g., IP) addressing or identification.  In
  837.    particular, access controls to applications and services may be based
  838.    on subscriber identification, allowing the subscriber to access these
  839.    applications irrespective of the IP or equivalent network address the
  840.    user of an MCD is (temporarily) using for communication with a Mobility
  841.    Server.
  842.  
  843.    Applications and specific functions of applications that may be
  844.    accessed by a user of a MCD (remotely invoked operations) are
  845.    identified by a service identifier, which is globally unique and IANA-
  846.    assigned, and a function identifier, which is service-specific.
  847.    Application registration and deregistration are functions performed for
  848.    all application services, and fall within session control, whereas
  849.    other functions, such as a "check mailbox status" function, are
  850.    specific to an application (mobile messaging), and are thus transparent
  851.    to the MNCP.
  852.  
  853. 2.3.2 Registration
  854.    Registration is a process whereby a client (MCD) notifies a Mobility
  855.    Server of its intent to make use of an application service.  An
  856.    explicit form of registration is accomplished as follows.  Session
  857.    control information (subscriber identification and authentication
  858.    information, application service and function identification) is
  859.    supplied by the client application to the MCD's MNCP and encoded as
  860.    information elements in a REGISTRATION request (see also section 2.1).
  861.    A registration request is sent by a client (MCD) MNCP using the single
  862.    packet reliable delivery mechanism.
  863.  
  864.  
  865. <draft-piscitello-mncp-00.txt>                                 Page 14
  866.  
  867.  
  868. INTERNET DRAFT                   MNCP                   August 28, 1997
  869.  
  870.  
  871.  
  872.    The receiving MNCP (here, the Mobility Server) uses the subscriber
  873.    identification and authentication information to validate the user and
  874.    to determine whether the user has access privileges to the application
  875.    service and function identified.  The receiving (MS) MNCP returns a
  876.    positive or negative ACKNOWLEDGMENT based on the success or failure of
  877.    authentication and access control processing.  If the authentication
  878.    succeeds, the (MS) MNCP updates the status of the subscriber to
  879.    "registered", records the IP address of the MCD from which the
  880.    subscriber's registration request was initiated, and returns a positive
  881.    ACKNOWLEDGEMENT.  The (MS) MNCP starts a timer that bounds the amount
  882.    of time the registered subscriber may be inactive before the subscriber
  883.    is declared unavailable (see sections 4.7 and section 6.4).
  884.  
  885.    [NOTE: Explicit registration may be used to enable "push" applications.
  886.    Once a client application at an MCD is registered, an application at a
  887.    Mobility Server may send unsolicited messages to the MCD.]
  888.  
  889.    A second, implicit form of registration occurs when an application at a
  890.    Mobility Server receives requests for a service from a MCD that has not
  891.    explicitly registered for that service.  If the subscriber
  892.    identification and authentication are valid, and access to this service
  893.    is permitted for this subscriber, the MS will register the client (MCD)
  894.    as previously described, and process the service request (see section
  895.    2.3.3 and section 3).
  896.  
  897.    Once a subscriber has registered, a Mobility Server will forward all
  898.    subsequent subscriber-bound messages to the MCD at the IP address
  899.    recorded, until the subscriber explicitly deregisters the service, or
  900.    registers the service from another MCD, or from a different IP address.
  901.  
  902. 2.3.3 Application Data Transfer
  903.    Once registration is completed, applications at either the MCD or MS
  904.    may begin sending requests. Session Control information (application
  905.    service and function identification, subscriber identification and
  906.    password, request/response message correlation information) accompany
  907.    application-specific control information and data in each request.
  908.    Each request (carried as a COMMAND packet or a NOTIFICATION packet
  909.    initiating a multi-packet sequence) is authenticated.  If
  910.    authentication succeeds and all the contents are reliably delivered, a
  911.    positive ACKNOWLEDGEMENT is returned to the MCD MNCP. Application-
  912.    specific IE's as well as data are forwarded to the application when the
  913.    entire request has been delivered.
  914.  
  915. 2.3.4 Deregistration
  916.    Deregistration may be initiated by the MCD application.  A request to
  917.    deregister from an application service results in the transmission of a
  918.    DEREGISTER function by session control to the Mobility Server's (MS)
  919.    MNCP.  Deregistration can also occur when an inactivity timer operating
  920.    at the Mobility Server expires.  When either of these events occurs,
  921.    the (MS) MNCP deregisters the subscriber (i.e., changes the
  922.    registration status to deregistered for the application service
  923.    indicated in the request).  The MNCP requesting deregistration (either
  924.  
  925.  
  926.  
  927. <draft-piscitello-mncp-00.txt>                                 Page 15
  928.  
  929.  
  930. INTERNET DRAFT                   MNCP                   August 28, 1997
  931.  
  932.  
  933.    the MCD or MS) composes and sends a Deregistration request and awaits
  934.    an indication from reliable transfer that
  935.  
  936.    (a) the MCD MNCP has responded with an ACKNOWLDGEMENT indicating it
  937.    wishes to continue communicating with the server.  In this case, the
  938.    (MS) MNCP updates the registration status of the client (to
  939.    registered).
  940.  
  941.    (b) the (MCD or MS) MNCP has responded with an ACKNOWLEDGEMENT
  942.    indicating it agrees to discontinue communication.  In this case, the
  943.    requesting MNCP remains in an unregistered (i.e., inactive) status.
  944.  
  945.    (c) retry timer expiration causes the reliable delivery MNCP to
  946.    indicate to session control that communication attempts have been
  947.    abandoned. In this case, the  requesting MNCP remains in an
  948.    unregistered (i.e., inactive) status.
  949.  
  950. 2.3.5 Correlation Identifiers
  951.    The correlation identifier is used by Session Control to associate
  952.    packets (or packet sequences) of a given exchange, and is relevant for
  953.    both directions of information flow (i.e., the acknowledgment for a
  954.    NOTIFICATION, COMMAND, and DATA packet must have the same correlation
  955.    identifier) for the duration of that exchange.  The correlation
  956.    identifier has local significance to the mobile computing device or
  957.    Mobility Server.
  958.  
  959.    Applications may use a Correlation Identifier value to link together or
  960.    "cross-correlate" packet sequences related to the same application-
  961.    specific message flow.  Consider an e-mail client application request
  962.    from a MCD to retrieve mailbox messages.  The request could be
  963.    satisfied using a single COMMAND-ACK sequence.  The corresponding
  964.    responses could be conveyed as a packet sequence involving the use of
  965.    the NOTIFICATION service initiated by a messaging application operating
  966.    on a Mobility Server.  The Cross-correlation Identifier value used by
  967.    the Mobility Server when delivering the contents of the mailbox to the
  968.    email client must be the same as the Correlation Identifier of the
  969.    original request to retrieve mailbox messages (see section 4.5.5).
  970.  
  971. 3. MNCP Reliable Delivery Packets
  972.    This section defines the packets which support MNCP reliable delivery
  973.    services.
  974.  
  975. 3.1 Packet Types
  976.    MNCP reliable delivery packets are exchanged between an MCD and a
  977.    Mobility Server.  There are four types of MNCP reliable delivery
  978.    packets, differentiated by the Packet Type field in the Packet Header.
  979.  
  980.    Command Packet (PT_CMD)
  981.      This packet is used when the entire length of the application data can
  982.      be carried in a single packet.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989. <draft-piscitello-mncp-00.txt>                                 Page 16
  990.  
  991.  
  992. INTERNET DRAFT                   MNCP                   August 28, 1997
  993.  
  994.  
  995.    Notification Packet (PT_NTFN)
  996.      This packet is used when the entire length of the user data can not
  997.      fit into a single packet.  It is followed by one or more PT_DATA
  998.      packets.
  999.  
  1000.    Data Packet (PT_DATA)
  1001.      This packet is used in conjunction with the Notification Packet to
  1002.      carry the actual application data.
  1003.  
  1004.    Acknowledge Packet (PT_ACK)
  1005.      This packet is used to confirm receipt of a PT_CMD, PT_NTFN, or
  1006.      PT_DATA packet by the peer MNCP.
  1007.  
  1008.    MNCP reliable delivery packets PT_CMD, PT_NTFN, and PT_DATA can
  1009.    originate from either the MCD or the Mobility Server.  Acknowledgments
  1010.    (PT_ACKs) are returned by the recipient of the other packets.
  1011.  
  1012.    Exactly one MNCP reliable delivery packet is encapsulated in each UDP
  1013.    Information field as an octet sequence, encoded in network-byte order.
  1014.  
  1015. 3.2 Packet Headers
  1016.    The following common header fields appear in every MNCP reliable
  1017.    delivery packet.  A summary of the packet header format is shown below.
  1018.    The bits are transmitted in network-byte order, from left to right.
  1019.  
  1020.    0                   1                   2
  1021.    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
  1022.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1023.    | Major Version | Minor Version |  Packet Type  | ..
  1024.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1025.    2           3                   4                   5
  1026.    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 2 3 4 5 6
  1027.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1028.    |      Correlation Id           |       Sequence Number         |
  1029.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1030.  
  1031.    Major and Minor Protocol Version
  1032.      Two one octet Protocol Version fields identify the Major and Minor
  1033.      Version level of the MNCP packet.  The values (1,1) MUST be used to
  1034.      indicate the MNCP protocol version specified by this memo.  When a
  1035.      packet is received with an unknown Protocol Version value, the packet
  1036.      SHOULD be silently discarded.
  1037.  
  1038.    Packet Type
  1039.      The Packet Type field is one octet, and identifies the type of MNCP
  1040.      reliable delivery packet as enumerated below.
  1041.  
  1042.             1       PT_CMD      Command
  1043.             2       PT_NTFN     Notification
  1044.             3       PT_DATA     Data
  1045.             4       PT_ACK      Acknowledge
  1046.  
  1047.      When a packet is received with an unknown Packet Type value, the
  1048.      packet SHOULD be silently discarded.
  1049.  
  1050.  
  1051. <draft-piscitello-mncp-00.txt>                                 Page 17
  1052.  
  1053.  
  1054. INTERNET DRAFT                   MNCP                   August 28, 1997
  1055.  
  1056.  
  1057.  
  1058.    Correlation Id
  1059.      The Correlation Id field is two octets, and is used to link together
  1060.      all the packets in a particular packet sequence.  When initiating a
  1061.      new packet sequence, applications at a Mobility Server MUST select
  1062.      values in the range h0001 - h7FFF (i.e., the most significant bit must
  1063.      be zero, 0).  When initiating a new packet sequence, applications at a
  1064.      MCD MUST select values in the range h8000-hFFFF (i.e., the most
  1065.      significant bit must be one, 1).  The value zero is reserved and MUST
  1066.      NOT be used.
  1067.  
  1068.      When a PT_DATA or PT_ACK packet is received with an unknown
  1069.      Correlation Identifier field, or any other type of packet is received
  1070.      with a missing Correlation Identifier field, the packet SHOULD be
  1071.      silently discarded.
  1072.  
  1073.      The MNCP that initiates a packet sequence (i.e., sends a PT_CMD or
  1074.      PT_NTFN packet) MUST ensure that the Correlation Identifier value
  1075.      uniquely identifies the packet sequence locally (i.e., no other packet
  1076.      sequence is in progress involving this MCD and the same Correlation
  1077.      Identifier value).  All other packets in this packet sequence
  1078.      (including PT_ACKs) MUST carry this same Correlation Identifier value.
  1079.  
  1080.      Applications may use the same Correlation Identifier value to link
  1081.      together packet sequences related to the same application-specific
  1082.      message flow.  For example, an e-mail client request might be conveyed
  1083.      by a PT-CMD packet sequence, with mail server responses conveyed as
  1084.      PT-NTFN packets sequences, all of which carry Cross Correlation
  1085.      Identifiers equal to the Correlation Identifier of the original
  1086.      request.
  1087.  
  1088.    Sequence Number
  1089.      The Sequence Number field is two octets, and is used to maintain
  1090.      sequencing of packets. When a packet is received with a missing or
  1091.      unknown Sequence Number field, the packet SHOULD be silently
  1092.      discarded.
  1093.  
  1094.      The sequence number MUST have the value zero (0) for the first packet
  1095.      of a packet sequence.  The sequence number contained in each
  1096.      subsequent PT_DATA packet within the same packet sequence MUST be
  1097.      incremented sequentially by one (1) until the maximum field value
  1098.      (65,536) has been reached, and then recycled back to zero(0).
  1099.  
  1100. 3.3 Packet Body
  1101.    The body an MNCP packet is used to carry MNCP reliable delivery control
  1102.    information, session control information, and application-specific
  1103.    data.  The MNCP packet body is transmitted immediately after the MNCP
  1104.    packet header, beginning at bit 56 of the entire MNCP reliable delivery
  1105.    packet.
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113. <draft-piscitello-mncp-00.txt>                                 Page 18
  1114.  
  1115.  
  1116. INTERNET DRAFT                   MNCP                   August 28, 1997
  1117.  
  1118.  
  1119.    5       6                   7                   8
  1120.    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 2 3 4 5 6 7 8
  1121.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1122.    |           MNCP Packet Body (1..N Information Elements)         ..
  1123.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1124.  
  1125.    The MNCP reliable delivery packet body consists of one or more
  1126.    Information Elements (IEs).  Each Information Element consists of an IE
  1127.    Type field, IE Length field, and a variable-length data field (content
  1128.    determined by the IE Type, length identified by the IE Length).  There
  1129.    are two Information Element formats: an extended length format used
  1130.    only for IE_DATA_MORE and IE_DATA_FINAL elements, and an abbreviated
  1131.    format used for all other currently-defined IE Types.
  1132.  
  1133.    A summary of the Information Element field format is shown below.  The
  1134.    fields are transmitted in network-byte order, from left to right,
  1135.    beginning with the first available bit after the MNCP packet header or
  1136.    preceding Information Element.
  1137.  
  1138.    0                   1                   2                   3
  1139.    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 2
  1140.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1141.    | IE Type=Other |  IE Length    | IE Data (1..N octets)          ..
  1142.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1143.                                  OR
  1144.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1145.    | IE Type=DATA  |          IE Length            |IE Data(1..N oct)..
  1146.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1147.  
  1148.    IE Type
  1149.      The IE Type field is one octet, and identifies the type of Information
  1150.      Element as enumerated below.
  1151.  
  1152.             5       IE_DATA_FINAL          Data (Final)
  1153.             6       IE_DATA_MORE           Data (More)
  1154.             8       IE_MSG_LENGTH          Message Length
  1155.             10      IE_ACK_CODE            Acknowledge Code
  1156.             16      IE_DATA_COMPRESSION    Data Compression
  1157.             18      IE_DATA_OFFSET         Data Offset
  1158.             20      IE_PKT_SIZE            Packet Size
  1159.  
  1160.      Additional IE Type values are defined by MNCP Session Control (see
  1161.      Section 4.5) and may also be defined for use by specific applications
  1162.      (to be assigned and recorded by IANA[2]).  When a packet is received
  1163.      with an unknown IE Type value, the Information Element SHOULD be
  1164.      forwarded to the application without further interpretation by the
  1165.      MNCP.
  1166.  
  1167.    IE Length
  1168.      If the IE Type equals IE_DATA_MORE or IE_DATA_FINAL, the IE Length
  1169.      field is two octets; otherwise, the IE Length field is one octet.  The
  1170.      IE Length field indicates the length of the information element data
  1171.      field, in octets.
  1172.  
  1173.  
  1174.  
  1175. <draft-piscitello-mncp-00.txt>                                 Page 19
  1176.  
  1177.  
  1178. INTERNET DRAFT                   MNCP                   August 28, 1997
  1179.  
  1180.  
  1181.      Octets beyond the range of the IE Length field are treated as a
  1182.      separate Information Element.  When a packet is received with an
  1183.      invalid Length field, the packet SHOULD be silently discarded.
  1184.  
  1185.    IE Data
  1186.      The format of the IE Data field varies according to IE Type.  The
  1187.      format associated with each IE Type is defined in Sections 3.5 and
  1188.      4.5.
  1189.  
  1190.    When encoding MNCP packets, the following general rules apply, in order
  1191.    of priority.
  1192.  
  1193.      - Required IEs MUST appear before optional IEs, and
  1194.      - Fixed-length IEs MUST appear before variable-length IEs.
  1195.  
  1196. 3.4 Packet Length
  1197.    The length of each MNCP reliable delivery packet is the sum of the
  1198.    following:
  1199.  
  1200.      MNCP Header Length       7 octets
  1201.      MNCP Body Length         sum of Information Element lengths
  1202.  
  1203.    When IE Type is IE_DATA_MORE or IE_DATA_FINAL, the length of the
  1204.    Information Element is three(3) octets plus the value specified by the
  1205.    IE Length field.  Otherwise, the length of the Information Element is
  1206.    two (2) octets plus the value specified by the IE Length field.  Since
  1207.    every MNCP reliable delivery packet contains at least one Information
  1208.    Element, the minimum length of a packet is 10 octets.
  1209.  
  1210.    The maximum length of an MNCP packet, MAX_PACKET_SIZE, is limited to
  1211.    2048 octets.  The default packet size, DEFAULT_PACKET_SIZE, is 470
  1212.    octets, chosen because it is the most efficient size that can be
  1213.    transported by UDP over wireless Mobitex networks.  In order to
  1214.    increase network efficiency, the sending MNCP may propose a packet
  1215.    length greater than DEFAULT_PACKET_SIZE, but less than or equal to
  1216.    MAX_PACKET_SIZE.  The receiving MNCP may accept the proposed value or
  1217.    request a smaller packet length.  The selection of an appropriate
  1218.    packet size is affected by factors such as the Maximum Transmission
  1219.    Unit (MTU) and Maximum Segment Size (MSS) of the underlying network.
  1220.  
  1221.    When an application message is longer than the negotiated packet size
  1222.    (less header and protocol control information overhead), it MUST be
  1223.    segmented into more than one MNCP reliable delivery packet.  In this
  1224.    case, the length of the complete application message is indicated by
  1225.    the IE_MSG_LENGTH Information Element included in the PT_NTFN packet
  1226.    (see Section 3.5.2).
  1227.  
  1228. 3.5 Information Elements
  1229.    Each Information Element includes IE Type and IE Length fields,
  1230.    formatted as described in Section 3.3.  Information Elements related to
  1231.    reliable transfer are defined below; additional elements related to
  1232.    session control are defined in Section 4.5.
  1233.  
  1234.  
  1235.  
  1236.  
  1237. <draft-piscitello-mncp-00.txt>                                 Page 20
  1238.  
  1239.  
  1240. INTERNET DRAFT                   MNCP                   August 28, 1997
  1241.  
  1242.  
  1243.    When a packet is received with a syntactically invalid Information
  1244.    Element, the packet MUST be acknowledged with the Ack Code
  1245.    ACK_ERR_INFO. When a packet is received without a required Information
  1246.    Element, the packet MUST be acknowledged with the Ack Code
  1247.    ACK_ERR_PROT.
  1248.  
  1249. 3.5.1 Data (Final and More)
  1250.    0                   1                   2                   3
  1251.    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 2
  1252.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1253.    |T=IE_DATA_FINAL| Length=1..N                 | Data (1..N) ..
  1254.    |or IE_DATA_MORE| where N = (MAX_PACKET_SIZE - header length)
  1255.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1256.  
  1257.    Data
  1258.      The Data field is variable length, ranging from one to
  1259.      (MAX_PACKET_SIZE - header) octets, and carries application-dependent
  1260.      content.
  1261.  
  1262.      The IE Type MUST equal IE_DATA_FINAL if the data field contains the
  1263.      only or final segment of an application message.  Otherwise, the IE
  1264.      Type MUST equal IE_DATA_MORE, indicating that the remainder of the
  1265.      application message will be sent in subsequent PT_DATA packets.
  1266.  
  1267.      In a PT_DATA packet, the content of the data field may be compressed
  1268.      (see Section 3.5.4).
  1269.  
  1270. 3.5.2 Message Length
  1271.    0                   1
  1272.    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
  1273.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1274.    |T=IE_MSG_LENGTH| Length=8      |..
  1275.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1276.    1       2                   3                   4
  1277.    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 2 3 4 5 6 7 8
  1278.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1279.    |                   Original Message Length                     |..
  1280.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1281.    4   5                   6                   7
  1282.    8 9 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
  1283.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1284.    |                  Compressed Message Length                    |
  1285.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1286.  
  1287.    Original Message Length
  1288.      The Original Message Length field is four octets, and identifies the
  1289.      length, in octets, of the original application message to be
  1290.      transferred during an MNCP reliable delivery packet sequence.
  1291.      Providing this value allows the receiving MNCP to allocate adequate
  1292.      buffer space in which to build the decompressed message.
  1293.  
  1294.    Compressed Message Length
  1295.      The Compressed Message Length field is four octets, and identifies the
  1296.      length, in octets, of the same application message after compression.
  1297.  
  1298.  
  1299. <draft-piscitello-mncp-00.txt>                                 Page 21
  1300.  
  1301.  
  1302. INTERNET DRAFT                   MNCP                   August 28, 1997
  1303.  
  1304.  
  1305.      This indicates the number of data octets to be carried by the sequence
  1306.      of PT_DATA packets which follow this PT_NTFN packet, and may equal
  1307.      Original Message Length if no compression algorithm has been
  1308.      negotiated.  Providing this value allows the receiving MNCP to
  1309.      allocate adequate buffer space in which to reassemble the compressed
  1310.      message.
  1311.  
  1312. 3.5.3 Acknowledge Code
  1313.    0                   1                   2                   3
  1314.    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 2
  1315.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1316.    |Typ=IE_ACK_CODE| Length=2      |           Ack Code            |
  1317.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1318.  
  1319.    Ack Code
  1320.      The Ack Code field is two octets, and indicates success or failure of
  1321.      MNCP packet processing.  Values associated with reliable transfer
  1322.      processing are enumerated below; additional session control-related
  1323.      values are enumerated in Section 4.5.6.
  1324.  
  1325.             ACK_OK            0  Success, no error
  1326.             ACK_ERR_MCD       1  Unrecognized MCD
  1327.             ACK_ERR_FILE_IO   9  Storage or File I/O error
  1328.             ACK_ERR_INFO     11  Invalid parameters/command syntax
  1329.             ACK_OOS_COMPRESS 12  Compression method not supported
  1330.             ACK_ERR_PROT     13  Protocol Error
  1331.             ACK_ERR_SYS   65535  Unrecoverable System Error
  1332.  
  1333.  
  1334. 3.5.4 Data Compression
  1335.    0                   1                   2
  1336.    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
  1337.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1338.    |T=IE_DATA_COMP | Length=1      |  Compression  |
  1339.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1340.  
  1341.    Compression
  1342.      The Compression field is one octet, and identifies the compression
  1343.      method to be used on the data contained within PT_DATA packet
  1344.      IE_DATA_MORE and IE_DATA_FINAL information elements, as enumerated
  1345.      below.
  1346.  
  1347.             COMPRESS_OFF      0  Data MUST NOT be compressed
  1348.             COMPRESS_DEFAULT  1  Data MUST be compressed using default
  1349.                                  method, LZS, as defined by RFC 1974[3]
  1350.  
  1351.      Additional values for this field may be assigned and recorded by
  1352.      IANA[2].  Section 5.8 describes how this field is used for negotiation
  1353.      in PT_NTFN and PT_ACK packets.
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361. <draft-piscitello-mncp-00.txt>                                 Page 22
  1362.  
  1363.  
  1364. INTERNET DRAFT                   MNCP                   August 28, 1997
  1365.  
  1366.  
  1367. 3.5.5 Data Offset
  1368.    0                   1
  1369.    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6
  1370.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1371.    |T=IE_DATA_OFF  | Length=8      |..
  1372.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1373.    1       2                   3                   4
  1374.    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 2 3 4 5 6 7 8
  1375.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1376.    |                        Data Offset                            |
  1377.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1378.  
  1379.    Data Offset
  1380.      The Data Offset field is four octets.  When uncompressed data are
  1381.      sent, Data Offset identifies the offset, in octets, of the first bit
  1382.      of the IE_DATA_MORE or IE_DATA_FINAL Data field from the beginning of
  1383.      the original uncompressed message.  When compression is used, Data
  1384.      Offset identifies the offset, in octets, of the first bit of the
  1385.      IE_DATA_MORE or IE_DATA_FINAL Data field from the beginning of the
  1386.      compressed message.
  1387.  
  1388. 3.5.6 Packet Size
  1389.    0                   1                   2                   3
  1390.    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 2
  1391.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1392.    |Typ=IE_PKT_SIZE| Length=2      |          Packet Size          |
  1393.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1394.  
  1395.    Packet Size
  1396.      The Packet Size field is two octets, and identifies the maximum size
  1397.      (in octets) for PT_DATA packets in this MNCP packet sequence.  Section
  1398.      5.7 describes how this field is used for negotiation in PT_NTFN and
  1399.      PT_ACK packets and how it affects segmentation of application data in
  1400.      PT_DATA packets.
  1401.  
  1402.      The default value for this field is DEFAULT_PACKET_SIZE (470 octets).
  1403.      The maximum value for this field is MAX_PACKET_SIZE (2048 octets).  If
  1404.      this field is absent from a PT_NTFN packet, the default value MUST be
  1405.      assumed.
  1406.  
  1407. 3.6 PT_CMD
  1408.    When an application wishes to send a message that is shorter than
  1409.    (DEFAULT_PACKET_SIZE - header) octets, uncompressed, the MNCP MUST
  1410.    embed it in the IE_DATA_FINAL field of a PT_CMD packet.
  1411.  
  1412.    Upon reception of a correctly-formed PT_CMD packet, a PT_ACK MUST be
  1413.    transmitted, containing a positive or negative Ack Code as described in
  1414.    Section 3.7.
  1415.  
  1416.    The following IEs are optional in a PT_CMD packet.
  1417.  
  1418.      IE_DATA_FINAL              As defined in Section 3.5.1
  1419.                                 MUST be present if application data
  1420.                                 has been supplied by the user.
  1421.  
  1422.  
  1423. <draft-piscitello-mncp-00.txt>                                 Page 23
  1424.  
  1425.  
  1426. INTERNET DRAFT                   MNCP                   August 28, 1997
  1427.  
  1428.  
  1429.  
  1430.    Additional session control or application-specific IEs may also be
  1431.    included in the PT-CMD packet.
  1432.  
  1433. 3.7 PT_ACK
  1434.    Upon reception of a correctly-formed PT_CMD, PT_NTFN, or PT_DATA
  1435.    packet, a PT_ACK MUST be transmitted to confirm delivery.  The PT_ACK
  1436.    includes the same Correlation ID and Sequence Number as the packet to
  1437.    be confirmed, and an Ack Code to indicate the success or failure of
  1438.    packet processing within the MNCP.
  1439.  
  1440.    The following IE is required in a PT_ACK packet.
  1441.  
  1442.            IE_ACK_CODE          As defined in Section 3.5.3
  1443.  
  1444.    Additional session control IEs and application-specific IEs may also be
  1445.    included in the PT_ACK packet.
  1446.  
  1447. 3.8 PT_NTFN
  1448.    When an application wishes to send a message that is longer than
  1449.    (DEFAULT_PACKET_SIZE - header) octets, uncompressed, the MNCP MUST
  1450.    generate a PT_NTFN packet to initiate a sequence of PT_DATA packets.
  1451.  
  1452.    Upon reception of a correctly-formed PT_NTFN packet, a PT_ACK MUST be
  1453.    transmitted, containing a positive or negative Ack Code as described in
  1454.    Section 3.7.
  1455.  
  1456.    The following IEs are required in a PT_NTFN packet.
  1457.  
  1458.            IE_MSG_LENGTH        As defined in Section 3.5.2
  1459.  
  1460.    The following IEs are optional in a PT_NTFN packet.
  1461.  
  1462.            IE_DATA_COMPRESSION  As defined in Section 3.5.4
  1463.                                 MUST be present if compression desired
  1464.                                 otherwise default value assumed
  1465.  
  1466.            IE_PKT_SIZE          As defined in Section 3.5.6
  1467.                                 MUST be present if long packets desired
  1468.                                 otherwise default value assumed
  1469.  
  1470.    Additional application-specific IEs may also be included in the PT-NTFN
  1471.    packet.
  1472.  
  1473. 3.9 PT_DATA
  1474.    When an application wishes to send a message that is longer than
  1475.    (DEFAULT_PACKET_SIZE - header) octets, uncompressed, the MNCP generates
  1476.    a sequence of PT_DATA packets to carry message segments.  The final
  1477.    PT_DATA packet carries the information element IE_DATA_FINAL; all
  1478.    others carry the information element IE_DATA_MORE.  These packets carry
  1479.    the same Correlation ID and sequentially-assigned Sequence Numbers.
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485. <draft-piscitello-mncp-00.txt>                                 Page 24
  1486.  
  1487.  
  1488. INTERNET DRAFT                   MNCP                   August 28, 1997
  1489.  
  1490.  
  1491.    Upon reception of each correctly-formed PT_DATA packet, a PT_ACK MUST
  1492.    be transmitted, containing a positive or negative Ack Code as described
  1493.    in Section 3.7.
  1494.  
  1495.    The following IEs are required in a PT_DATA packet.
  1496.  
  1497.            IE_DATA_OFFSET       As defined in Section 3.5.5
  1498.            IE_DATA_MORE or
  1499.            IE_DATA_FINAL        As defined in Section 3.5.1
  1500.  
  1501. 4. MNCP Session Control Packets
  1502.    This section defines the packets which support MNCP session control
  1503.    services.
  1504.  
  1505. 4.1 Packet Types
  1506.    MNCP session control packets are exchanged between an MCD and a
  1507.    Mobility Server using MNCP reliable delivery packets. There are three
  1508.    types of MNCP session control packets, differentiated by the Function
  1509.    ID field of the IE_APP_ID information element in the MNCP session
  1510.    control header.
  1511.  
  1512.    Registration Packet (PT_CMD, Function ID = FUN_REG_REQ)
  1513.      This packet is used to register a Subscriber to use the specified
  1514.      Service.
  1515.  
  1516.    Deregistration Packet (PT_CMD, Function ID = FUN_DEREG_REQ)
  1517.      This packet is used to deregister a Subscriber so that it can no
  1518.      longer use the specified Service.
  1519.  
  1520.    Application Request Packet (PT_CMD or PT_NTFN, Function ID = other)
  1521.      This packet is used to request an application-specific service,
  1522.      specified by Service ID and Function ID.
  1523.  
  1524.    Registration packets originate from the MCD, to be processed and
  1525.    acknowledged by the Mobility Server.  Deregistration and Application
  1526.    Request packets can be initiated by either the MCD or Mobility Server.
  1527.  
  1528.    Exactly one MNCP session control packet is conveyed by each PT_CMD or
  1529.    PT_NTFN packet, utilizing those fields previously defined for MNCP
  1530.    reliable delivery, and the additional Session Control fields defined in
  1531.    this section.
  1532.  
  1533. 4.2 Session Control Headers
  1534.    Information Element types defined specifically for use as MNCP Session
  1535.    Control header fields are enumerated below and defined in Section 4.5.
  1536.  
  1537.             1       IE_SUB_ID              Subscriber ID
  1538.             3       IE_APP_ID              Application ID
  1539.             9       IE_SUB_PWD             Subscriber Password
  1540.  
  1541.    These Information Elements are mandatory in every MNCP session control
  1542.    packet, regardless of Service ID or Function ID, and may appear
  1543.    anywhere within the list of Information Elements in an MNCP packet.
  1544.  
  1545.  
  1546.  
  1547. <draft-piscitello-mncp-00.txt>                                 Page 25
  1548.  
  1549.  
  1550. INTERNET DRAFT                   MNCP                   August 28, 1997
  1551.  
  1552.  
  1553. 4.3 Session Control Body
  1554.    Information Element types defined specifically for use as MNCP Session
  1555.    Control body fields are enumerated below and defined in Section 4.5.
  1556.  
  1557.            11      IE_REG_STATUS          Registration Status
  1558.            24      IE_CROSS_ID            Message Cross-correlation ID
  1559.  
  1560.    These Information Elements may be included in certain MNCP session
  1561.    control packets, as determined by Function ID, and may appear anywhere
  1562.    within the list of Information Elements in an MNCP packet.
  1563.  
  1564. 4.4 Packet Length
  1565.    The length of the MNCP session control packet can be computed as  the
  1566.    sum of the lengths of each session control Information Element.
  1567.  
  1568. 4.5 Information Elements
  1569.    Each Information Element includes IE Type and IE Length fields,
  1570.    formatted as described in Section 3.3.  Information Elements related to
  1571.    reliable transfer are defined in Section 3.5; additional elements
  1572.    related to session control are defined below.
  1573.  
  1574. 4.5.1 Subscriber ID
  1575.    0                   1                   2                   3
  1576.    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 2
  1577.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1578.    |Type=IE_SUB_ID | Length=1...N  |  Subscriber ID (1..N octets)  ...
  1579.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1580.  
  1581.    Subscriber ID
  1582.      The Subscriber ID field is variable length, and identifies the user of
  1583.      the MCD.  This value is used by MNCP Session Control to provide
  1584.      subscriber validation/authentication (see Section 7).
  1585.  
  1586.  
  1587. 4.5.2 Application ID
  1588.    0                   1                   2                   3
  1589.    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 2
  1590.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1591.    |Type=IE_APP_ID | Length=2      |  Service ID   |  Function ID  |
  1592.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1593.  
  1594.    Service ID
  1595.      The Service ID field is one octet, and identifies the Information
  1596.      Service (specific application) involved in this MNCP packet sequence.
  1597.      This field identifies both the application which originated the
  1598.      message and the destination application that is to receive the
  1599.      message.
  1600.  
  1601.      Service ID values are assigned and recorded by IANA[2] for use by
  1602.      specific applications.  Service ID is used by MNCP Session Control to
  1603.      provide service registration, deregistration, and filtering features.
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609. <draft-piscitello-mncp-00.txt>                                 Page 26
  1610.  
  1611.  
  1612. INTERNET DRAFT                   MNCP                   August 28, 1997
  1613.  
  1614.  
  1615.    Function ID
  1616.      The Function ID field is one octet, and identifies the function within
  1617.      the specified Service requested by this MNCP packet, as enumerated
  1618.      below.
  1619.  
  1620.             0         FUN_DEREG_REQ       Deregistration Request
  1621.             1         FUN_REG_REQ         Registration Request
  1622.             2..255    TBD                 Application-Dependent
  1623.  
  1624.      Function ID values zero (0) and one (1) are reserved for use by  MNCP
  1625.      Session Control.  Function ID values 2 through 255 are application-
  1626.      dependent, and are transparent to the MNCP.
  1627.  
  1628. 4.5.3 Subscriber Password
  1629.    0                   1                   2
  1630.    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 2
  1631.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1632.    |Type=IE_SUB_PWD| Length=4..N   |Subscriber Password(4..N octets)..
  1633.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1634.  
  1635.    Subscriber Password
  1636.      The Subscriber Password field is variable length, ranging from four to
  1637.      N octets, and carries a value used by MNCP Session Control for user
  1638.      validation/authentication (see Section 7).
  1639.  
  1640. 4.5.4 Registration Status
  1641.    0                   1                   2           9
  1642.    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 . . 0 1 2 3 4 5 6
  1643.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1644.    |T=IE_REG_STATUS| Length=1..N  |Registration Status(1..N octets)|
  1645.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1646.  
  1647.    Registration Status
  1648.      The Registration Status field is a variable length field, where each
  1649.      octet contains the ID of a Service for which this Subscriber is
  1650.      currently registered.
  1651.  
  1652. 4.5.5 Message Cross-Correlation ID
  1653.    0                   1                   2                   3
  1654.    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 2
  1655.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1656.    |Typ=IE_CROSS_ID| Length=2      |     Cross Correlation ID      |
  1657.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1658.  
  1659.    Message Cross-correlation ID
  1660.      The Message Cross-correlation ID is two octets, and carries a 16-bit
  1661.      unsigned integer number identifying the correlation ID of a previous
  1662.      message flow to which the current message flow is associated. Using a
  1663.      cross-correlation identifier, a receiving application correlates a
  1664.      response message with a previous request message.
  1665.  
  1666. 4.5.6 Acknowledge Code
  1667.    MNCP Session Control defines additional values for the Ack Code field
  1668.    specified in Section 3.5.3.
  1669.  
  1670.  
  1671. <draft-piscitello-mncp-00.txt>                                 Page 27
  1672.  
  1673.  
  1674. INTERNET DRAFT                   MNCP                   August 28, 1997
  1675.  
  1676.  
  1677.  
  1678.             ACK_ERR_SID       2  Unrecognized Subscriber ID
  1679.             ACK_ERR_PWD       3  Incorrect Password
  1680.             ACK_OOS_SID       5  Subscriber ID is suspended
  1681.             ACK_OOS_SVC      10  Application service unavailable
  1682.  
  1683. 4.6 FUN_REG_REQ
  1684.    When an application wishes to explicitly register for a specific
  1685.    Service ID (see section 2.3.2), it MUST first generate a Registration
  1686.    Request by issuing a PT_CMD packet with the desired Service ID and
  1687.    Function ID set to FUN_REG_REQ.
  1688.  
  1689.    Upon reception of a Registration Request, MNCP session control performs
  1690.    authentication based upon Service ID, Subscriber ID, and Password,
  1691.    marking the subscriber as "registered" and recording the IP address of
  1692.    the MCD from which the request was received if the subscriber is
  1693.    determined to be authentic and authorized to use the service.  A PT_ACK
  1694.    MUST be transmitted in response, containing a positive or negative Ack
  1695.    Code as described in Section 4.5.6.  In addition, as an implementation
  1696.    option, the PT_ACK MAY contain the IE_REG_STATUS Information Element
  1697.    described in Section 4.5.4.
  1698.  
  1699. 4.7 FUN_DEREG_REQ
  1700.    When an application wishes to stop using a specific Service ID, it may
  1701.    generate a Deregistration Request by issuing a PT_CMD packet with the
  1702.    desired Service ID and Function ID set to FUN_DEREG_REQ.
  1703.  
  1704.    The MCD MNCP MAY deregister from a service by generating a
  1705.    Deregistration Request, either implicitly on behalf of the application,
  1706.    explicitly upon application request, or both. Upon receiving an MCD-
  1707.    initiated Deregistration Request, the MS MNCP session control performs
  1708.    authentication based upon Service ID, Subscriber ID, and Password,
  1709.    marking the subscriber as "deregistered" if authorized to use the
  1710.    service.  A PT_ACK MUST be transmitted in response, containing an Ack
  1711.    Code as described in Section 4.5.6.
  1712.  
  1713.    An MS MNCP that has not detected activity on the part of a registered
  1714.    subscriber for a given period of time (INACTIVITY_TIMER) MAY attempt to
  1715.    deregister the subscriber implicitly by generating a Deregistration
  1716.    Request.  Upon receiving an MS-initiated Deregistration Request, the
  1717.    MCD MNCP determines whether the application identified by the service
  1718.    ID is still running. If so, the MCD MNCP MUST return a PT_ACK (ACK_OK)
  1719.    and the MS MNCP MUST re-register the subscriber.  Otherwise, the MCD
  1720.    MNCP returns a PT_ACK  (ACK_OOS_SVC) and the MS interprets this as a
  1721.    confirmation that the application service is no longer running on the
  1722.    subscriber's MCD.
  1723.  
  1724.    In addition, as an implementation option, these PT_ACKs MAY contain the
  1725.    IE_REG_STATUS Information Element described in Section 4.5.4.  As a
  1726.    security precaution, this field SHOULD NOT be included when
  1727.    acknowledging a Deregistration Request that has not passed
  1728.    authentication.
  1729.  
  1730.  
  1731.  
  1732.  
  1733. <draft-piscitello-mncp-00.txt>                                 Page 28
  1734.  
  1735.  
  1736. INTERNET DRAFT                   MNCP                   August 28, 1997
  1737.  
  1738.  
  1739. 4.8 FUN_<other>
  1740.    When an application wishes to send a request with a specific Service
  1741.    ID, it MUST generate an Application Request by issuing a PT_CMD or
  1742.    PT_NTFN packet with the desired Service ID and Function ID.
  1743.  
  1744.    Upon reception of an Application Request, and if the subscriber is
  1745.    currently registered to use the service, MNCP session control performs
  1746.    authentication based upon Service ID, Subscriber ID, and Password, and
  1747.    forwards the request to the destination application.
  1748.  
  1749.    If the subscriber is not currently registered to use the service, MNCP
  1750.    session control performs authentication based upon Service ID,
  1751.    Subscriber ID, and Password.  If the subscriber is determined to be
  1752.    authentic and permitted to access the service, MNCP session control
  1753.    marks the subscriber as "registered" and forwards the request to the
  1754.    destination application (implicit registration).    
  1755.  
  1756.    For either case, a PT_ACK MUST be transmitted in response, containing a
  1757.    positive or negative Ack Code as described in Section 4.5.6.  A
  1758.    positive Ack Code indicates that the request can be delivered to the
  1759.    destination application; a negative Ack Code indicates why the request
  1760.    cannot be delivered.
  1761.  
  1762. 5. MNCP Reliable Delivery Processing
  1763.  
  1764. 5.1 Phase Diagram
  1765.    MNCP reliable delivery goes through three distinct phases which are
  1766.    specified in the following simplified diagram.
  1767.  
  1768.       +------+                                   +---------------+
  1769.       |      | PT_CMD                            |               |
  1770.       |      |---------------------------------->|               |
  1771.       | Idle |           +-------------+         | Data Transfer |
  1772.       |      | PT_NTFN   |             | PT_DATA |               |
  1773.       |      |---------->| Negotiation |-------->|               |
  1774.       |      |        ^  |             |      ^  |               |
  1775.       +------+        |  +-------------+      |  +---------------+
  1776.          ^  PT_ACK(C) |    |        |         |    |          |
  1777.          |    or TMO  <----+        |    TMO  <----+          |
  1778.          <--------------------------+-------------------------+
  1779.            PT_ACK(OK), PT_ACK(ERR), or TMO & retries exhausted
  1780.  
  1781.          TMO        = timeout expires
  1782.          PT_ACK(C)  = PT_ACK (ACK_OOS_COMPRESS) received
  1783.          PT_ACK(OK) = PT_ACK (ACK_OK) sent/received for final packet
  1784.          PT_ACK(ERR)= PT_ACK (any other IE_ACK_CODE) sent/received
  1785.  
  1786.    Idle Phase
  1787.      The MNCP necessarily begins and ends with this phase.  When an
  1788.      application or session control request causes a PT_NTFN packet to be
  1789.      sent or received, the MNCP proceeds to the Negotiation phase.  When an
  1790.      application or session control request causes a PT_CMD packet to be
  1791.      sent or received, the MNCP proceeds to the Data Transfer phase.
  1792.  
  1793.  
  1794.  
  1795. <draft-piscitello-mncp-00.txt>                                 Page 29
  1796.  
  1797.  
  1798. INTERNET DRAFT                   MNCP                   August 28, 1997
  1799.  
  1800.  
  1801.      The MNCP returns to the Idle phase automatically if:
  1802.  
  1803.      - the ack timeout expires while waiting for any packet (i.e., packet
  1804.       lost or silent discard of badly-formed packet) and all retries have
  1805.       been exhausted;
  1806.  
  1807.      - a PT_ACK packet with IE_ACK_CODE equal to ACK_OK is sent or received
  1808.       confirming the final packet in a packet sequence (i.e., confirming a
  1809.       PT_DATA packet that contained an IE_DATA_FINAL element); or
  1810.  
  1811.      - a PT_ACK packet with IE_ACK_CODE not equal to ACK_OK is sent, or a
  1812.       PT_ACK packet with IE_ACK_CODE not equal to ACK_OK or
  1813.       ACK_OSS_COMPRESS is received.
  1814.  
  1815.    Negotiation Phase
  1816.      The MNCP enters this phase when sending or receiving a PT_NTFN packet.
  1817.  
  1818.      The receiving MNCP processes the incoming packet and returns a
  1819.      positive or negative PT_ACK as follows.
  1820.  
  1821.      - If the PT_ACK is negative, the receiver returns to the Idle phase.
  1822.  
  1823.      - If the PT_ACK is positive, the receiver enters the Data Transfer
  1824.       phase.
  1825.  
  1826.      The sending MNCP awaits and processes the PT_ACK.
  1827.  
  1828.      - If the PT_ACK is positive, the sender enters the Data Transfer
  1829.       phase.
  1830.  
  1831.      - If the PT_ACK indicates ACK_OSS_COMPRESS, the sender SHOULD retry
  1832.       sending the PT_NTFN with a different compression method and remain
  1833.       in the Negotiation phase.
  1834.  
  1835.      - Otherwise, the sender returns to the Idle phase.
  1836.  
  1837.      Any locally-initiated application request received during this phase
  1838.      MUST NOT be processed by this MNCP instance until the Idle Phase is
  1839.      re-entered.  Such requests MAY be rejected or buffered locally by the
  1840.      implementation.
  1841.  
  1842.    Data Transfer Phase
  1843.      The MNCP enters this phase when sending or receiving a PT_CMD or
  1844.      PT_DATA packet.
  1845.  
  1846.      The receiving MNCP processes the incoming packet and returns a
  1847.      positive or negative PT_ACK as follows.
  1848.  
  1849.      - If the PT_ACK is negative or confirms receipt of a packet containing
  1850.       an IE_DATA_FINAL element, the receiver returns to the Idle phase.
  1851.  
  1852.      - Otherwise (confirming PT_DATA packet with IE_DATA_MORE), the
  1853.       receiver remains in the Data Transfer phase.
  1854.  
  1855.  
  1856.  
  1857. <draft-piscitello-mncp-00.txt>                                 Page 30
  1858.  
  1859.  
  1860. INTERNET DRAFT                   MNCP                   August 28, 1997
  1861.  
  1862.  
  1863.      The sending MNCP awaits and processes the PT_ACK.
  1864.  
  1865.      - If PT_ACK is negative or the outgoing packet contained an
  1866.       IE_DATA_FINAL element, the sender returns to the Idle phase.
  1867.  
  1868.      - Otherwise (PT_ACK confirmed packet containing IE_DATA_MORE), the
  1869.       sender remains in the Data Transfer phase and sends the next PT_DATA
  1870.       packet.
  1871.  
  1872.      Any locally-initiated application request received during this phase
  1873.      MUST NOT be processed by this MNCP instance until the Idle Phase is
  1874.      re-entered.  Such requests MAY be rejected or buffered locally by the
  1875.      implementation.
  1876.  
  1877. 5.2 State Diagram
  1878.    The MNCP reliable delivery finite-state automaton is defined by events,
  1879.    actions and state transitions.  Events include reception of application
  1880.    requests, expiration of the Ack timer, and reception of packets from a
  1881.    peer.  Actions include the starting of the timers and transmission of
  1882.    packets to the peer.
  1883.  
  1884.    Events                                 Actions
  1885.  
  1886.    REQ = Receive Application Request      scm = send PT_CMD
  1887.    RCM = Receive PT_CMD                   snt = send PT_NTFN
  1888.    RNT = Receive PT_NTFN                  fsc = fwd to Session Control
  1889.    RSP = Receive Session Response         sak = send PT_ACK
  1890.    RAK = Receive PT_ACK                   sdt = send PT_DATA
  1891.    RDT = Receive PT_DATA                  sto = start timers
  1892.    TMO = Ack Timeout                      ind = send Appl Indication
  1893.                                           cnf = send Appl Confirm
  1894.  
  1895.    The complete state transition table follows.  States are indicated
  1896.    horizontally, and events are read vertically.  State transitions and
  1897.    actions are represented in the form action/new-state.  Multiple actions
  1898.    are separated by commas, and may continue on succeeding lines as space
  1899.    requires; multiple actions may be implemented in any convenient order.
  1900.    The state may be followed by a letter, which indicates an explanatory
  1901.    footnote.  The dash ('-') indicates an illegal transition.
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919. <draft-piscitello-mncp-00.txt>                                 Page 31
  1920.  
  1921.  
  1922. INTERNET DRAFT                   MNCP                   August 28, 1997
  1923.  
  1924.  
  1925.          | State
  1926.          |    0         1         2         3         4         5
  1927.    Events| Listen   Cmd-Sent  Ntfn-Sent  Data-Sent Await-Rsp Await-Data
  1928.    ------+-------------------------------------------------------------
  1929.     REQ  | scm/1 or     -         -         -         -         -
  1930.          | snt/2
  1931.     RCM  | sak/0 or     -         -         -         -         -
  1932.          | fsc/4
  1933.     RNT  | sak/0 or     -         -         -         -         -
  1934.          | fsc/4
  1935.     RSP  |   -          -         -         -      sak/0 or     -
  1936.          |                                         sak/5 or
  1937.          |                                         ind,sak/0
  1938.     RAK  |   -      cnf/0     cnf/0 or   cnf/0 or     -         -
  1939.          |                    snt/2      sdt/3
  1940.          |                    sdt/3
  1941.     RDT  |   -          -         -         -         -      sak/5 or
  1942.          |                                                   ind,sak/0
  1943.     TMO  |   -      cnf/0 or  cnf/0 or   cnf/0 or     -          0
  1944.          |          scm/1     snt/2      sdt/3
  1945.  
  1946.    Timers are started (sto action) when sending any packet and stopped
  1947.    when receiving any packet.  The sending MNCP runs an ACK_WAIT_TIMER;
  1948.    the receiving MNCP runs a DATA_WAIT_TIMER.  See section 5.6 for
  1949.    additional detail.
  1950.  
  1951. 5.3 States
  1952.    Following is a more detailed description of each automaton state.
  1953.  
  1954.    Listen
  1955.      The MNCP automaton begins and ends in this state, awaiting either a
  1956.      locally-initiated application or session control request, or receipt
  1957.      of a PT_CMD or PT_NTFN packet.
  1958.  
  1959.    Command-Sent
  1960.      The MNCP automaton transitions to this state when sending a PT_CMD
  1961.      packet.  Events expected to occur while in this state are expiration
  1962.      of the ACK_WAIT_TIMER or receipt of a PT_ACK packet.
  1963.  
  1964.    Notification-Sent
  1965.      The MNCP automaton transitions to this state when sending a PT_NTFN
  1966.      packet.  Events expected to occur while in this state are expiration
  1967.      of the ACK_WAIT_TIMER or receipt of a PT_ACK packet.
  1968.  
  1969.    Await-Data
  1970.      The MNCP automaton transitions to this state when sending a positive
  1971.      PT_ACK packet in response to an incoming PT_NTFN packet.  Events
  1972.      expected to occur while in this state are expiration of the
  1973.      DATA_WAIT_TIMER or receipt of a PT_ACK packet.
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. <draft-piscitello-mncp-00.txt>                                 Page 32
  1982.  
  1983.  
  1984. INTERNET DRAFT                   MNCP                   August 28, 1997
  1985.  
  1986.  
  1987.    Await-Session-Response
  1988.      The MNCP automaton transitions to this state when forwarding an
  1989.      incoming PT_CMD or PT_NTFN packet to MNCP session control.  The only
  1990.      event expected to occur while in this state is a response from session
  1991.      control.
  1992.  
  1993.    Data-Sent
  1994.      The MNCP automaton transitions to this state when sending a PT_DATA
  1995.      packet.  Events expected to occur while in this state are expiration
  1996.      of the ACK_WAIT_TIMER or receipt of a PT_ACK packet.
  1997.  
  1998. 5.4 Events
  1999.    Transitions and actions in the automaton are caused by events.
  2000.  
  2001.    Receive Application Request (REQ)
  2002.      This event occurs when a locally-initiated application or session
  2003.      control request is submitted to the MNCP for processing.  If the data
  2004.      contained in the request is shorter than (DEFAULT_PACKET_SIZE -
  2005.      header) octets, uncompressed, the MNCP automaton sends a PT_CMD (scm
  2006.      action). Otherwise, it sends a PT_NTFN (snt action).
  2007.  
  2008.    Receive PT_CMD (RCM)
  2009.      This event occurs when a remotely-initiated PT_CMD packet is received
  2010.      by the MNCP as an incoming UDP datagram.  If the packet is badly
  2011.      formed, contains an invalid version, a system error occurs, or
  2012.      resources are unavailable to further process the request, the MNCP
  2013.      automaton sends a PT_ACK (sak action) with a negative Ack Code.
  2014.      Otherwise, it forwards the PT_CMD packet to the MNCP session control
  2015.      automaton (fsc action).
  2016.  
  2017.    Receive PT_NTFN (RNT)
  2018.      This event occurs when a remotely-initiated PT_NTFN packet is received
  2019.      by the MNCP as an incoming UDP datagram.  If the packet is badly
  2020.      formed, contains an invalid version, a system error occurs, resources
  2021.      are unavailable to further process the request, or the proposed
  2022.      compression method is not supported, the MNCP automaton sends a PT_ACK
  2023.      (sak action) with a negative Ack Code, and an alternative compression
  2024.      method (if applicable).  Otherwise, it forwards the PT_NTFN packet to
  2025.      the MNCP session control automaton (fsc action).
  2026.  
  2027.    Receive Session Response (RSP)
  2028.      This event occurs when a response is returned from the local MNCP
  2029.      session control automaton, indicating the success or failure of
  2030.      authentication, registration, or deregistration.  If the response is
  2031.      negative, the MNCP automaton sends a PT_ACK (sak action) with the
  2032.      negative Ack Code supplied by session control.  If the response is
  2033.      positive, the MNCP automaton sends a PT_ACK (sak action) ACK_OK.  If
  2034.      the incoming request was a PT_CMD packet, the MNCP automaton supplies
  2035.      any application-specific information elements (including data) to the
  2036.      destination application (ind action).
  2037.  
  2038.    Receive PT_ACK (RAK)
  2039.      This event occurs when a remotely-initiated PT_ACK packet is received
  2040.      by the MNCP as an incoming UDP datagram.  If the Ack Code is
  2041.  
  2042.  
  2043. <draft-piscitello-mncp-00.txt>                                 Page 33
  2044.  
  2045.  
  2046. INTERNET DRAFT                   MNCP                   August 28, 1997
  2047.  
  2048.  
  2049.      ACK_OOS_COMPRESS, the MNCP automaton SHOULD resend the PT_NTFN with
  2050.      another compression method (snt action).  If the Ack Code is any other
  2051.      negative value, the MNCP automaton notifies the requesting application
  2052.      of the failure (cnf action).  If the Ack Code is ACK_OK and confirms a
  2053.      PT_NTFN or PT_DATA(more) packet, the MNCP automaton sends a PT_DATA
  2054.      packet (sdt action).  Otherwise (the Ack Code is ACK_OK and confirms
  2055.      the final packet in a sequence), the MNCP automaton notifies the
  2056.      requesting application that its request was delivered successfully
  2057.      (cnf action).
  2058.  
  2059.    Receive PT_DATA (RDT)
  2060.      This event occurs when a remotely-initiated PT_DATA packet is received
  2061.      by the MNCP as an incoming UDP datagram.  The MNCP automaton uses the
  2062.      packet contents to reassemble and decompress application data (see
  2063.      Sections 5.6 through 5.8) and send a PT_ACK (sak action).  If incoming
  2064.      packet contained an IE_DATA_FINAL element, the MNCP automaton supplies
  2065.      all application-specific information elements received during the
  2066.      packet sequence, including the reassembled/decompressed application
  2067.      data, to the destination application (ind action).
  2068.  
  2069.    Ack Timeout (TMO)
  2070.      This event occurs when the ACK_WAIT_TIMER or DATA_WAIT_TIMER started
  2071.      by this MNCP automaton expires.  The automaton applies its
  2072.      retransmission algorithm (see Section 5.6) to determine the
  2073.      appropriate action: resending a PT_CMD packet (scm action), PT_NTFN
  2074.      packet (snt action), PT_DATA packet (sdt action), or PT_ACK packet
  2075.      (sak action), or abandoning the packet sequence.  When abandoning the
  2076.      packet sequence, if this MNCP was the sequence initiator, it also
  2077.      notifies the requesting application of the failure (cnf action).
  2078.  
  2079. 5.5 Actions
  2080.    Actions in the automaton are caused by events and typically indicate
  2081.    the transmission of packets and/or the starting or stopping of the
  2082.    timers.
  2083.  
  2084.    send PT_CMD (scm)
  2085.      The MNCP automaton sends a PT_CMD packet as a result of a locally-
  2086.      initiated application or session control request, or as a retry
  2087.      (ACK_WAIT_TIMER expired with retry remaining).
  2088.  
  2089.      The MNCP builds a PT_CMD packet as follows.
  2090.      - Protocol Version is set to the value for this implementation.
  2091.      - Packet Type is set to PT_CMD.
  2092.      - Correlation Identifier is assigned by the MNCP (new request) or set
  2093.       to the previously-assigned value (retry).
  2094.      - Sequence Number is set to zero(0).
  2095.      - Session Control fields supplied in the request (Service ID, Function
  2096.       ID, Subscriber ID, Subscriber Password) are appended.
  2097.      - Any application-specific IEs supplied in the request are appended.
  2098.      - Any application-specific data supplied in the request is
  2099.       encapsulated in a Data(Final) information element.
  2100.  
  2101.      The PT_CMD packet is sent as a UDP packet to the "well-known" MNCP
  2102.      port, the PKT_RETRY count is incremented, and the ACK_WAIT_TIMER is
  2103.  
  2104.  
  2105. <draft-piscitello-mncp-00.txt>                                 Page 34
  2106.  
  2107.  
  2108. INTERNET DRAFT                   MNCP                   August 28, 1997
  2109.  
  2110.  
  2111.      started (see Section 5.6).  The MNCP automaton then transitions to the
  2112.      Command-Sent state.
  2113.  
  2114.    send PT_NTFN (snt)
  2115.      The MNCP automaton sends a PT_NTFN packet as a result of a locally-
  2116.      initiated application or session control request, or as a retry
  2117.      (ACK_WAIT_TIMER expired with retry remaining or PT_ACK
  2118.      ACK_OOS_COMPRESS received and alternative method available).
  2119.  
  2120.      The MNCP builds a PT_NTFN packet as follows.
  2121.      - Protocol Version is set to the value for this implementation.
  2122.      - Packet Type is set to PT_NTFN.
  2123.      - Correlation Identifier is assigned by the MNCP (new request) or set
  2124.       to the previously-assigned value (retry).
  2125.      - Sequence Number is set to zero(0).
  2126.      - Data Compression Method is chosen by the MNCP, influenced by values
  2127.       returned in earlier PT_ACKs (if any); see Section 5.8. If the
  2128.       default value (COMPRESS_OFF) is selected, this field SHOULD be
  2129.       omitted.
  2130.      - Uncompressed Message Length is set to the number of octets of
  2131.       application-specific data supplied in the request.
  2132.      - Compressed Message Length is set to the number of octets yielded
  2133.       when compressing this data using the proposed Compression Method.
  2134.      - As an implementation option, Packet Size may be set to a value
  2135.       larger than DEFAULT_PACKET_SIZE; see Section 5.7.  If the default
  2136.       value is desired, this field SHOULD be omitted.
  2137.      - Session Control fields supplied in the request (Service ID, Function
  2138.       ID, Subscriber ID, Subscriber Password) are appended.
  2139.      - Any application-specific IEs supplied in the request are appended.
  2140.  
  2141.      The PT_NTFN packet is sent as a UDP packet to the "well-known" MNCP
  2142.      port, the PKT_RETRY count is incremented, and the ACK_WAIT_TIMER is
  2143.      started (see Section 5.6).  The MNCP automaton then transitions to the
  2144.      Notification-Sent state.
  2145.  
  2146.    fwd to Session Control (fsc)
  2147.      The MNCP automaton forwards incoming PT_CMD and PT_NTFN packets to
  2148.      MNCP session control for registration, deregistration, and
  2149.      authentication.  The MNCP automaton then transitions to the Await-
  2150.      Session-Response state.
  2151.  
  2152.    send PT_ACK (sak)
  2153.      The MNCP automaton sends a PT_ACK packet in response to an incoming
  2154.      packet.
  2155.  
  2156.      The MNCP builds a PT_ACK packet as follows.
  2157.      - Protocol Version is set to the value for this implementation.
  2158.      - Packet Type is set to PT_ACK.
  2159.      - Correlation Identifier and Sequence Number are both set to the
  2160.       corresponding values in the packet being acknowledged.
  2161.      - Ack Code is chosen by the MNCP to reflect the result of processing.
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167. <draft-piscitello-mncp-00.txt>                                 Page 35
  2168.  
  2169.  
  2170. INTERNET DRAFT                   MNCP                   August 28, 1997
  2171.  
  2172.  
  2173.      When acknowledging a PT_NTFN only, the following fields MAY also be
  2174.      included in the PT_ACK packet.
  2175.      - If the Ack Code is ACK_OOS_COMPRESS, an alternative Data Compression
  2176.       Method MUST be chosen by the MNCP; see Section 5.8.  Otherwise, this
  2177.       field MUST be omitted.
  2178.      - As an implementation option, PACKET_SIZE MAY be set to a value
  2179.       larger than DEFAULT_PACKET_SIZE and less than the proposed size, see
  2180.       Section 5.7.  If the default value is desired, this field SHOULD be
  2181.       omitted.
  2182.  
  2183.      The PT_ACK packet is sent as a UDP packet to the source port which
  2184.      sent the packet being acknowledged.  When positively acknowledging a
  2185.      PT_NTFN or PT_DATA(more) packet, the MNCP automaton then transitions
  2186.      to the Await-Data state and the DATA_WAIT_TIMER is started (see
  2187.      section 5.6).  Otherwise, the MNCP automaton transitions to the Listen
  2188.      state, forwards incoming data to the receiving application (ind
  2189.      action), and the packet sequence is concluded.
  2190.  
  2191.    send PT_DATA (sdt)
  2192.      The MNCP automaton sends a PT_DATA packet when it receives a positive
  2193.      PT_ACK to a PT_NTFN or PT_DATA(more) packet, or as a retry
  2194.      (ACK_WAIT_TIMER expired with retry remaining).
  2195.  
  2196.      The MNCP builds a PT_DATA packet as follows.
  2197.      - Protocol Version is set to the value for this implementation.
  2198.      - Packet Type is set to PT_DATA.
  2199.      - Correlation Identifier is set to the value used in the PT_NTFN
  2200.       packet that started this packet sequence.
  2201.      - Sequence Number is set to the value used in the preceding packet
  2202.       (retry) or that value incremented by one (otherwise).
  2203.      - Data Offset is set to the starting octet position of the
  2204.       application-specific data to be included in this packet.
  2205.      - Compressed and segmented application data (see Sections 5.7 and 5.8)
  2206.       is encapsulated in IE_DATA_MORE or IE_DATA_FINAL information
  2207.       elements.  When building an IE_DATA_MORE element, the MNCP MUST fill
  2208.       the remainder of the PT_DATA packet with compressed data.  When
  2209.       building an IE_DATA_FINAL element, the MNCP MUST NOT pad the data.
  2210.  
  2211.      The PT_DATA packet is sent as a UDP packet to the source port which
  2212.      sent the last PT_ACK packet, the PKT_RETRY count is incremented, and
  2213.      the ACK_WAIT_TIMER is started (see Section 5.6).  The MNCP automaton
  2214.      then transitions to the Data-Sent state.
  2215.  
  2216.    start ACK_WAIT_TIMER or DATA_WAIT_TIMER (sto)
  2217.      The MNCP automaton starts the ACK_WAIT_TIMER or DATA_WAIT_TIMER
  2218.      whenever it sends a non ACK packet, as described in Section 5.6.
  2219.  
  2220.    send Appl Indication (ind)
  2221.      The MNCP automaton supplies incoming session control information
  2222.      elements, application-specific information elements, and
  2223.      reassembled/decompressed data (if any) to the destination application
  2224.      just before sending a PT_ACK to an incoming PT_CMD or PT_DATA(final)
  2225.      packet as described under the sak action above.
  2226.  
  2227.  
  2228.  
  2229. <draft-piscitello-mncp-00.txt>                                 Page 36
  2230.  
  2231.  
  2232. INTERNET DRAFT                   MNCP                   August 28, 1997
  2233.  
  2234.  
  2235.    send Appl Confirm (cnf)
  2236.      The MNCP automaton supplies a delivery confirmation to the requesting
  2237.      application when it receives the final PT_ACK in a packet sequence or
  2238.      abandons the request.  Negative confirmations include the reason why
  2239.      the request could not be delivered (e.g., the Ack Code value or
  2240.      timeout).  The MNCP automaton then transitions to the Listen state and
  2241.      the packet sequence is concluded.
  2242.  
  2243. 5.6 Timers, Acknowledgment, and Retransmission
  2244.    To help ensure a reliable delivery of data between a MCD and the
  2245.    Mobility Server, MNCP uses a stop-and-go with timeout retransmission
  2246.    mechanism.
  2247.  
  2248.    Each MNCP reliable delivery packet carries a 16-bit unsigned sequence
  2249.    number and MUST be individually acknowledged by the receiving MNCP.
  2250.    The sequence number MUST start at 0 for the first packet of each packet
  2251.    sequence and be incremented by one for each additional packet in the
  2252.    flow till 65,535 and then recycled through 0 if necessary.  An
  2253.    acknowledgment packet MUST use the same sequence number as the packet
  2254.    it is acknowledging.
  2255.  
  2256.    Out of sequence data packet MUST be discarded by the receiving MNCP.
  2257.    As part of the action associated with the processing a PT_DATA packet
  2258.    that arrives out of sequence, the MNCP MUST return a PT_ACK packet
  2259.    containing the Sequence Number of the most recently acknowledged
  2260.    PT_DATA packet.
  2261.  
  2262.    When sending a packet, the sending MNCP MUST start a retransmission
  2263.    timer (ACK_WAIT_TIMEOUT, default 15 seconds), during which the sending
  2264.    MNCP will wait for an acknowledgment from the receiving MNCP.  When
  2265.    sending a PT_ACK to any packet other than PT_DATA (final), the
  2266.    receiving MNCP MUST start a DATA_WAIT_TIMER (typically, three times the
  2267.    ACK_WAIT_TIMER value).  Expiration of this timer causes the transfer of
  2268.    the packet sequence to be abandoned.
  2269.  
  2270.    If the sending MNCP does not receive an acknowledgment from the
  2271.    receiving MNCP within the timeout period, which has the same sequence
  2272.    number as the packet been sent, it should retransmit the packet up to
  2273.    PKT_RETRY times (default 2 retries per packet).  If there is still no
  2274.    acknowledgment after all the retries (i.e., for an attempt of PKT_RETRY
  2275.    + 1 times), the sending MNCP should abort the packet sequence.
  2276.  
  2277.    Implementation Note: In the current implementations, timers are
  2278.    assigned predetermined values appropriate for the wireless environment
  2279.    over which the MNCP operates, from a configuration file.
  2280.    ACK_WAIT_TIMEOUT is the same for all Service ID/Function ID
  2281.    combinations.
  2282.  
  2283. 5.7 Packet Size Negotiation, Segmentation and Reassembly
  2284.    A sending MNCP may propose a packet size larger than the
  2285.    DEFAULT_PACKET_SIZE in a NOTIFICATION REQUEST.  Any value greater than
  2286.    DEFAULT_PACKET_SIZE but less than or equal to the maximum packet size
  2287.    of 2048 octets may be proposed by encoding the desired size in the
  2288.    IE_PKT_SIZE information element in the PT_NTFN.  A receiving MNCP may
  2289.  
  2290.  
  2291. <draft-piscitello-mncp-00.txt>                                 Page 37
  2292.  
  2293.  
  2294. INTERNET DRAFT                   MNCP                   August 28, 1997
  2295.  
  2296.  
  2297.    accept the proposed packet size, or it may proposed a reduced packet
  2298.    size.  The receiving MNCP specifies the acceptable packet size
  2299.    (proposed or reduced) in the IE_PKT_SIZE information element when
  2300.    composing a PT_ACK packet in response to a PT_NTFN packet.  In the
  2301.    absence of an explicit IE_PKT_SIZE field, the DEFAULT_PACKET_SIZE MUST
  2302.    be assumed.
  2303.  
  2304. 5.7.1 Computing the payload size for PT_DATA packets
  2305.    The sending MNCP subtracts the MNCP common header length (7), the
  2306.    length of IE_DATA_OFFSET information element (6) and the length of the
  2307.    IE Length and IE Type components of the IE_DATA_MORE information
  2308.    element (3) from the value of IE_PKT_SIZE and uses this as the
  2309.    PAYLOAD_SIZE.
  2310.  
  2311. 5.7.2 Segmentation and PT_DATA Packet Composition
  2312.    The sending MNCP segments application data into "n" PT_DATA packets.
  2313.    All but the final PT_DATA packet contain one IE_DATA_MORE information
  2314.    element that conveys PAYLOAD_SIZE octets, and a monotonically
  2315.    incremented sequence number, and a data offset.
  2316.  
  2317.    Data compression, if selected, is performed on the application data
  2318.    prior to segmentation.  This is required to determine the value of
  2319.    Compressed Message Length used in the PT_NTFN (see section 3.5.2).
  2320.  
  2321.    Initially, a local parameter, next-data-offset, is set to zero (0), and
  2322.    the next-sequence-number is set equal to the value of Sequence Number
  2323.    sent in the PT_NTFN (zero, 0).
  2324.  
  2325.    If no compression is used, then PAYLOAD_SIZE number of octets of
  2326.    uncompressed data are encoded in the Data field of the IE_DATA_MORE
  2327.    information element.  The value of next-data-offset is encoded in the
  2328.    IE_DATA_OFFSET field, and next-data-offset is incremented by
  2329.    PAYLOAD_SIZE.  If compression is used, then PAYLOAD_SIZE number of
  2330.    octets of compressed data are encoded in the Data field of the
  2331.    IE_DATA_MORE information element, the value of next-data-offset is
  2332.    encoded in the IE_DATA_OFFSET field, and next-data-offset is set to the
  2333.    octet location of the final octet of data that were encoded in the Data
  2334.    field. The Sequence number encoded in the common packet header is set
  2335.    to next-sequence number, and next-sequence-number is increased by one
  2336.    (1).
  2337.  
  2338.    The PT_DATA packet is then sent as an individual transmission in a UDP
  2339.    packet, and a timer is initiated.  If a PT_ACK is not received before
  2340.    the retransmission timer expires, the PT_DATA packet is retransmitted.
  2341.    Retransmission upon timer expiration is repeated until a maximum number
  2342.    of retries (PKT_RETRY +1) is exhausted, at which time the sending MNCP
  2343.    notifies session control of a communications failure.
  2344.  
  2345.    Upon reception of an PT_ACK, another PT_DATA packet may be sent.  If no
  2346.    compression is used and the value of IE_DATA_OFFSET subtracted from
  2347.    Original Message length is greater than PAYLOAD_SIZE, the process of
  2348.    composing and sending a PT_DATA packet containing an IE_DATA_MORE
  2349.    information element is repeated.  Similarly, a PT_DATA packet
  2350.    containing an IE_DATA_MORE information element is composed if
  2351.  
  2352.  
  2353. <draft-piscitello-mncp-00.txt>                                 Page 38
  2354.  
  2355.  
  2356. INTERNET DRAFT                   MNCP                   August 28, 1997
  2357.  
  2358.  
  2359.    compression is used and more than PAYLOAD_SIZE number of compressed
  2360.    octets remain to be sent.  Otherwise, a final PT_DATA packet is
  2361.    generated.
  2362.  
  2363.    The final PT_DATA packet contains an IE_DATA_FINAL information element,
  2364.    and conveys up to PAYLOAD_SIZE octets, compressed or uncompressed.  The
  2365.    value of the IE_DATA_FINAL information element must not be padded.
  2366.  
  2367. 5.7.3 Reassembly
  2368.    The receiving MNCP processes incoming PT_DATA packets as follows.
  2369.    Following transmission of a positive (PT_ACK) acknowledgment to a
  2370.    PT_NTFN packet, the receiving MNCP sets a local parameter for next-
  2371.    expected-sequence-number to one (1), and awaits the arrival of a
  2372.    PT_DATA packet containing the same Correlation ID as encoded in the
  2373.    PT_NTFN packet that initiated this packet sequence and a Sequence
  2374.    Number equal to the parameter next-expected-sequence-number, and an
  2375.    IE_DATA_MORE or IE_DATA_FINAL information element.
  2376.  
  2377.    The receiving MNCP composes and returns a PT_ACK with Sequence Number
  2378.    set to the value of Sequence Number from the PT_DATA packet being
  2379.    acknowledged, then increments next-expected-sequence-number by one (1),
  2380.    and awaits the arrival of the next packet in the sequence.  If the
  2381.    sequence number in the next PT_DATA packet that arrives does not equal
  2382.    next-expected-sequence-number, the receiving MNCP composes and returns
  2383.    a PT_ACK packet with the sequence number of the last acknowledged
  2384.    PT_DATA packet (next-expected-sequence-number minus 1) and immediately
  2385.    discards the PT_DATA packet.  Otherwise, the receiving MNCP processes
  2386.    each arriving PT_DATA packet containing an IE_DATA_MORE information
  2387.    element in exactly the same manner as the initial PT_DATA packet.  The
  2388.    process repeats until a PT_DATA packet containing an IE_DATA_FINAL
  2389.    information element is received.  The receiving MNCP composes and
  2390.    returns a PT_ACK as previously described.
  2391.  
  2392.    If compression is used, the user data extracted from the IE_DATA_MORE
  2393.    and IE_DATA_FINAL information elements received by the MNCP are
  2394.    reassembled and then uncompressed.  Reassembly uses the values of
  2395.    IE_DATA_OFFSET and PAYLOAD_SIZE to compose the original message from
  2396.    the message segments delivered, then the message in its entirety is
  2397.    passed to the application.
  2398.  
  2399.    Receive buffer strategies are implementation-dependent; for example, if
  2400.    compression is used during a transfer, the value of Compressed Message
  2401.    Length from the IE_MSG_LENGTH information element in the PT_NTFN may be
  2402.    used to allocate a buffer sufficient for the reassembly of the
  2403.    compressed data packet sequence, otherwise the value of Original
  2404.    Message Length may be used.  [Note: This memo imposes no restrictions
  2405.    on how receive buffers are allocated in implementations.]
  2406.  
  2407. 5.8 Data Compression
  2408.    When issuing a PT_NTFN packet, the sending MNCP uses the
  2409.    IE_DATA_COMPRESSION field to indicate the compression method that it
  2410.    wishes to apply to the application data that will follow in PT_DATA
  2411.    packets.  The IE_MSG_LENGTH Compressed Message Length field is computed
  2412.  
  2413.  
  2414.  
  2415. <draft-piscitello-mncp-00.txt>                                 Page 39
  2416.  
  2417.  
  2418. INTERNET DRAFT                   MNCP                   August 28, 1997
  2419.  
  2420.  
  2421.    by assuming this compression method.  The receiving MNCP responds to
  2422.    this bid in the PT_ACK packet that confirms the PT_NTFN, as follows.
  2423.  
  2424.    To accept the proposed compression method, the responding MNCP MUST
  2425.    return a PT_ACK packet with IE_DATA_COMPRESSION absent and IE_ACK_CODE
  2426.    equal to ACK_OK.
  2427.  
  2428.    To reject the proposed compression method, the responding MNCP MUST
  2429.    return a PT_ACK packet with IE_DATA_COMPRESSION set to indicate an
  2430.    alternative compression method (which may be NONE) and an IE_ACK_CODE
  2431.    equal to ACK_OOS_COMPRESS.
  2432.  
  2433.    If the sender's proposed compression method was rejected, the sending
  2434.    MNCP SHOULD issue another PT_NTFN packet with an alternative
  2435.    compression method, repeating the above negotiation until a mutually
  2436.    acceptable method is agreed upon (signaled by a PT_ACK with IE_ACK_CODE
  2437.    equal to ACK_OK and IE_DATA_COMPRESSION absent). Note that the
  2438.    IE_MSG_LENGTH Compressed Message Length field is recomputed by assuming
  2439.    the compression method, which can either be the alternative method
  2440.    proposed by the receiver, or a new method proposed by the sender.  If
  2441.    no compression method is specified, the Compressed Message Length field
  2442.    value MUST be the same as the value of Original Message Length.
  2443.  
  2444.    Once a compression method has been agreed, the sending MNCP applies the
  2445.    negotiated method to compress the data content of PT_DATA packet
  2446.    IE_DATA_MORE and IE_DATA_FINAL elements sent in this MNCP packet
  2447.    sequence.  The receiving MNCP applies the same negotiated method to
  2448.    decompress the data content upon arrival, ultimately yielding the
  2449.    number of octets indicated by the IE_MSG_LENGTH Original Message Length
  2450.    field.
  2451.  
  2452. 6. MNCP Session Control Processing
  2453.    The phase diagram and state machine described in this section operates
  2454.    on unique Subscriber ID/Service ID pairs.  When responding to any
  2455.    event, the session control automaton must first determine the current
  2456.    state associated with the Subscriber ID/Service ID pair, and then
  2457.    follow the course of action specified for that state.
  2458.  
  2459. 6.1 Phase Diagram
  2460.      Session control goes through two distinct phases which are specified
  2461.      in the following simplified diagram.
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477. <draft-piscitello-mncp-00.txt>                                 Page 40
  2478.  
  2479.  
  2480. INTERNET DRAFT                   MNCP                   August 28, 1997
  2481.  
  2482.  
  2483.  
  2484.       +------+           +------------+ DEREG(FAILED)
  2485.       |      |REG(ACK_OK)|            | and APPL REQs
  2486.       | Idle |---------->| Registered |---------+
  2487.       |      |           |            |<--------+
  2488.       +------+           +------------+
  2489.          ^                       |
  2490.          | DEREG(SUCCESS)OR LOS  |
  2491.          <-----------------------+
  2492.  
  2493.        REG(ACK_OK)   = Send or receive Ack Code ACK_OK to FUN_REG_REQ
  2494.                        or FUN_<other>
  2495.        DEREG(SUCCESS)= Send/receive positive Ack accepting FUN_DEREG_REQ
  2496.                        PT_ACK from MCD to MS containing ACK_OOS_SVC
  2497.                        PT_ACK from MS to MCD containing ACK_OK
  2498.        DEREG(FAILED) = Send/receive negative Ack rejecting FUN_DEREG_REQ
  2499.                        PT_ACK from MCD to MS containing ACK_OK
  2500.                        PT_ACK from MS to MCD containing any other value
  2501.        APPL REQs     = Send or receive FUN_<other> app-specific request
  2502.        LOS           = Loss of signal assumed when DEREG_REQ abandoned
  2503.  
  2504.    Idle Phase
  2505.      MNCP session control necessarily begins and ends with this phase.
  2506.      When a positive acknowledgment (Ack Code ACK_OK) is returned to a
  2507.      Registration Request (FUN_REG_REQ or FUN_<other> in the case of an
  2508.      implicit registration performed by the MS), session control
  2509.      transitions to the Registered phase.
  2510.  
  2511.      MNCP session control returns to the Idle phase automatically after
  2512.      receiving or sending a successful Deregistration Request, and after
  2513.      timeout of a Deregistration Request, as signaled by the MNCP reliable
  2514.      delivery automaton.
  2515.  
  2516.    Registered Phase
  2517.      MCD MNCP session control enters this phase when receiving a positive
  2518.      Registration Request acknowledgment.  MS MNCP session control enters
  2519.      this phase when it has received and processed a valid Registration
  2520.      request from an MCD and has responded to the request with a positive
  2521.      acknowledgment.  MS MNCP session control also enters this phase when
  2522.      it has received and processed a valid service request from an MCD that
  2523.      has not previously (explicitly) registered with the service and has
  2524.      responded to the request with a positive acknowledgment.
  2525.  
  2526.      In this phase, MNCP session control processes incoming Deregistration
  2527.      Requests and any other Application Request.  All requests are
  2528.      authenticated, and service access control is verified.  Application
  2529.      Requests are forwarded to the destination application service only if
  2530.      the subscriber is currently registered for that service.
  2531.  
  2532.      The Mobility Server runs an INACTIVITY_TIMER to reaffirm the
  2533.      registration status on a periodic basis.
  2534.  
  2535.      MCD MNCP session control remains in the Registered phase until it
  2536.      completes a successful Deregistration Request.  MS MNCP session
  2537.  
  2538.  
  2539. <draft-piscitello-mncp-00.txt>                                 Page 41
  2540.  
  2541.  
  2542. INTERNET DRAFT                   MNCP                   August 28, 1997
  2543.  
  2544.  
  2545.      control remains in the Registered phase until it either completes a
  2546.      successful Deregistration, or a Deregistration Request is abandoned
  2547.      due to timeout.  When Deregistration is completed, the MNCP returns to
  2548.      the Idle phase.
  2549.  
  2550. 6.2 State Diagram
  2551.    The session control finite-state automaton is defined by events,
  2552.    actions and state transitions.  Events include reception of application
  2553.    requests and expiration of the Inactivity timer.  Actions include the
  2554.    starting of the INACTIVITY_TIMER and transmission of requests and
  2555.    responses.
  2556.  
  2557.    Events                                 Actions
  2558.  
  2559.    ORR = Outgoing Registration Request    srr = send FUN_REG_REQ
  2560.    ODR = Outgoing Deregistration Request  sdr = send FUN_DEREG_REQ
  2561.    OAR = Outgoing Application Request     sar = send FUN_<other>
  2562.    IRR = Incoming FUN_REG_REQ             au  = authenticate subscriber
  2563.    IDR = Incoming FUN_DEREG_REQ           up  = update registr. status
  2564.    IAR = Incoming FUN_<other>             spk = send Positive Ack
  2565.    IAK = Incoming Ack                     snk = send Negative Ack
  2566.    TMO = Inactivity Timeout               it  = start INACTIVITY_TIMER
  2567.  
  2568.    The complete state transition table follows.  States are indicated
  2569.    horizontally, and events are read vertically.  State transitions and
  2570.    actions are represented in the form action/new-state.  Multiple actions
  2571.    are separated by commas, and may continue on succeeding lines as space
  2572.    requires; multiple actions may be implemented in any convenient order.
  2573.    The state may be followed by a letter, which indicates an explanatory
  2574.    footnote.  The dash ('-') indicates an illegal transition.
  2575.  
  2576.          | State
  2577.          |    0            1         2         3         4
  2578.    Events| Listen      Reg-Sent  Dereg-Sent App-Sent Registered
  2579.    ------+-----------------------------------------------------
  2580.     ORR  | srr/1           -         -         -     -
  2581.     ODR  |     -           -         -         -     up,sdr/2
  2582.     OAR  |     -           -         -         -     sar/3
  2583.     IRR  | au,snk/0 or     -         -         -     -
  2584.          | au,up,it,spk/4
  2585.     IDR  |     -       snk/1      snk/2      snk/3   au,snk/4 or
  2586.          |                                           au,up,spk/0
  2587.     IAR  |     -           -         -         -     au,it,up,spk/4 or
  2588.          |                                           au,it,spk/4 or
  2589.          |                                           au,it,snk/4
  2590.     IAK  |     -       up/4 or   up,it/4 or    4     -
  2591.          |                 0         0
  2592.     TMO  |     -           -         -         -     up,sdr/2
  2593.  
  2594.    The INACTIVITY_TIMER runs only at the Mobility Server.
  2595.  
  2596. 6.3 States
  2597.    Following is a more detailed description of each automaton state.
  2598.  
  2599.  
  2600.  
  2601. <draft-piscitello-mncp-00.txt>                                 Page 42
  2602.  
  2603.  
  2604. INTERNET DRAFT                   MNCP                   August 28, 1997
  2605.  
  2606.  
  2607.    Listen
  2608.      The session control automaton begins and ends in this state, awaiting
  2609.      either a locally-initiated (outgoing) Registration Request, or receipt
  2610.      of an incoming FUN_REG_REQ indication from MNCP reliable delivery.
  2611.  
  2612.    Registration-Request-Sent
  2613.      The session control automaton transitions to this state when sending a
  2614.      FUN_REG_REQ.  The events expected to occur while in this state are
  2615.      receipt of an Ack Code from MNCP reliable transfer, indicating the
  2616.      result of the request or timeout, or receipt of a Deregister request
  2617.      form the MS.
  2618.  
  2619.    Deregistration-Request-Sent
  2620.      The session control automaton transitions to this state when sending a
  2621.      FUN_DEREG_REQ.  Events expected to occur while in this state are
  2622.      receipt of an Ack Code from MNCP reliable transfer or receipt of an
  2623.      incoming FUN_DEREG_REQ.
  2624.  
  2625.    Application-Request-Sent
  2626.      The session control automaton transitions to this state when sending a
  2627.      FUN_REG_REQ.  Events expected to occur while in this state are receipt
  2628.      of an Ack Code from MNCP reliable transfer or receipt of an incoming
  2629.      FUN_DEREG_REQ, or receipt of a Deregister request form the MS.
  2630.  
  2631.    Registered
  2632.      The session control automaton transitions to this state when returning
  2633.      a positive Ack for an incoming FUN_REG_REQ (explicit registration),
  2634.      returning a positive Ack for an incoming FUN_<other> (implicit
  2635.      request), receiving a positive Ack for an outgoing FUN_REG_REQ,
  2636.      receiving a positive Ack for an outgoing FUN_<other>, or receiving a
  2637.      negative Ack for an outgoing FUN_DEREG_REQ.  Events expected to occur
  2638.      while in this state are outgoing Deregistration or Application
  2639.      Requests, incoming FUN_DEREG_REQ or FUN_<other> packets, or expiration
  2640.      of the INACTIVITY_TIMER.
  2641.  
  2642. 6.4 Events
  2643.    Transitions and actions in the automaton are caused by events.
  2644.  
  2645.    Outgoing Registration Request (ORR)
  2646.      This event occurs when a Registration Request is initiated by the MCD,
  2647.      causing the session control automaton to send a FUN_REG_REQ (srr
  2648.      action).  This event MAY also be initiated implicitly by the MCD
  2649.      session control implementation (e.g., when the first Application-
  2650.      specific Request for a give service is initiated).
  2651.  
  2652.    Outgoing Deregistration Request (ODR)
  2653.      This event occurs when a Deregistration Request is initiated by the
  2654.      MCD, causing the session control automaton to send a FUN_DEREG_REQ
  2655.      (sdr action).  This event MAY also be initiated by the MS session
  2656.      control implementation (as a consequence of the expiry of the
  2657.      INACTIVITY_TIMER).
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663. <draft-piscitello-mncp-00.txt>                                 Page 43
  2664.  
  2665.  
  2666. INTERNET DRAFT                   MNCP                   August 28, 1997
  2667.  
  2668.  
  2669.  
  2670.    Outgoing Application Request (OAR)
  2671.      This event occurs when an Application Request is initiated by the MCD,
  2672.      causing the session control automaton to send a FUN_<other> (sar
  2673.      action).
  2674.  
  2675.    Incoming FUN_REG_REQ (IRR)
  2676.      This event occurs when a remotely-initiated FUN_REG_REQ is received by
  2677.      the Mobility Server.  The session control automaton attempts to
  2678.      authenticate the subscriber and verify the subscriber is permitted
  2679.      access to the service indicated in the request (au action) and returns
  2680.      the result to MNCP reliable delivery as an Ack Code (snk or spk
  2681.      action).  When authentication is successful, the automaton also
  2682.      updates the subscriber's registration status (up action) and starts
  2683.      the INACTIVITY_TIMER (it action).
  2684.  
  2685.    Incoming FUN_DEREG_REQ (IDR)
  2686.      This event occurs when a remotely-initiated FUN_DEREG_REQ is received
  2687.      by either the MCD or Mobility Server.  The session control automaton
  2688.      attempts to authenticate the subscriber (au action) and returns the
  2689.      result to MNCP reliable delivery as an Ack Code (snk or spk action).
  2690.      When authentication is successful, the automaton also updates the
  2691.      subscriber's registration status (up action).
  2692.  
  2693.    Incoming FUN_<other> (IAR)
  2694.      This event occurs when any other remotely-initiated request
  2695.      (FUN_<other>) is received by either the Mobility Server.  The session
  2696.      control automaton attempts to authenticate the subscriber and verify
  2697.      the subscriber is permitted access to the service indicated in the
  2698.      request (au action), and returns the result to MNCP reliable delivery
  2699.      as an Ack Code (snk or spk action).
  2700.  
  2701.    Incoming Acknowledgment (IAK)
  2702.      This event occurs when a response is received from MNCP reliable
  2703.      delivery, indicating success or failure of an earlier request as an
  2704.      Ack Code.  When receiving a Registration or Deregistration Request
  2705.      acknowledgment, the automaton updates the subscriber's registration
  2706.      status (up action).  When the Mobility Server receives an ACK_OK in a
  2707.      Deregistration Request acknowledgment, indicating the subscriber
  2708.      should be (re)registered for the service, the MS (re)starts the
  2709.      INACTIVITY_TIMER (it action).
  2710.  
  2711.    Inactivity Timeout (TMO)
  2712.      This event occurs when the INACTIVITY_TIMER started by the Mobility
  2713.      Server's session control automaton expires.  Subsequent processing
  2714.      assumes that the MCD has become unavailable since last contact (e.g.,
  2715.      out of range, turned off, disabled).  The automaton updates the
  2716.      subscriber's registration status (up action) and sends a FUN_DEREG_REQ
  2717.      (sdr action).
  2718.  
  2719. 6.5 Actions
  2720.    Actions in the automaton are caused by events and typically indicate
  2721.    the transmission of packets and/or the (re)starting of the Inactivity
  2722.    timer.
  2723.  
  2724.  
  2725. <draft-piscitello-mncp-00.txt>                                 Page 44
  2726.  
  2727.  
  2728. INTERNET DRAFT                   MNCP                   August 28, 1997
  2729.  
  2730.  
  2731.  
  2732.    send FUN_REG_REQ (srr)
  2733.      The MCD sends a FUN_REG_REQ packet as a result of a locally-initiated
  2734.      Registration Request involving a Subscriber/Service combination that
  2735.      is not currently registered (i.e., the automaton is in the Listen
  2736.      state).  Session Control fields (Service ID, Function ID, Subscriber
  2737.      ID, Subscriber Password) are supplied to the MNCP reliable delivery
  2738.      automaton for inclusion in a PT_CMD packet.  Function ID is set to
  2739.      FUN_REG_REQ; all other values are obtained from the MCD
  2740.      subscriber/application.  The session control automaton then
  2741.      transitions to the Registration-Request-Sent state.
  2742.  
  2743.    send FUN_DEREG_REQ (sdr)
  2744.      The MCD sends a FUN_DEREG_REQ packet as a result of a locally-
  2745.      initiated Deregistration Request (implicit or explicit) involving a
  2746.      Subscriber/Service combination that is currently registered (i.e., the
  2747.      automaton is in the Registered state).  The Mobility Server also sends
  2748.      a FUN_DEREG_REQ packet when the INACTIVITY_TIMER expires.  Session
  2749.      Control fields (Service ID, Function ID, Subscriber ID, Subscriber
  2750.      Password) are supplied to the MNCP reliable delivery automaton for
  2751.      inclusion in a PT_CMD packet.  Function ID is set to FUN_DEREG_REQ;
  2752.      all other values are obtained from the subscriber/application or the
  2753.      registration status table.  The session control automaton marks the
  2754.      subscriber as deregistered for this service (up action) and then
  2755.      transitions to the Deregistration-Request-Sent state.
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787. <draft-piscitello-mncp-00.txt>                                 Page 45
  2788.  
  2789.  
  2790. INTERNET DRAFT                   MNCP                   August 28, 1997
  2791.  
  2792.  
  2793.    send FUN_<other> (sar)
  2794.      Either the Mobility Server or the MCD sends a FUN_<other> packet as a
  2795.      result of a locally-initiated Application Request involving a
  2796.      Subscriber/Service combination that is currently registered (i.e., the
  2797.      automaton is in the Registered state), or the MCD sends a FUN_<other>
  2798.      packet as a result of a locally-initiated Application Request
  2799.      involving a Subscriber/Service combination that has not been
  2800.      explicitly registered (i.e., the MS is expected to implicitly register
  2801.      the application at the MCD).  Session Control fields provided by the
  2802.      application (Service ID, Function ID, Subscriber ID, Subscriber
  2803.      Password) are supplied to the MNCP reliable delivery automaton for
  2804.      inclusion in a PT_CMD or PT_NTFN packet.  The session control
  2805.      automaton then transitions to the Application-Request-Sent state.
  2806.  
  2807.      An Application Request initiated when the automaton is in the Listen
  2808.      state MAY cause the MCD to attempt implicit registration before the
  2809.      request is further processed.  Otherwise, such a request MUST be
  2810.      rejected using the Ack Code value ACK_OOS_SVC and the automaton
  2811.      remains in the Listen state.
  2812.  
  2813.    authenticate subscriber (au)
  2814.      The automaton attempts to authenticate the Subscriber ID and Password
  2815.      and verifies the subscriber's current registration status and
  2816.      permission to access the specified Service ID and Function ID.
  2817.  
  2818.      - If Subscriber ID is not found, return the Ack Code ACK_ERR_SID.
  2819.      - Else if the Subscriber Password is invalid, return the Ack Code
  2820.       ACK_ERR_PWD.
  2821.      - Else if the Subscriber does not have permission to access this
  2822.       Service and Function, return the Ack Code ACK_OOS_SID.
  2823.      - Else if the Service is not currently available (e.g., the
  2824.       application process bound to this Service ID is not running), return
  2825.       ACK_OOS_SVC.
  2826.      - Else return ACK_OK.
  2827.  
  2828.      The method by which the MNCP determines whether a local application
  2829.      service is running is not specified by this memo.  Refer to Section 7
  2830.      for additional discussion of Security.  Refer to the spk and snk
  2831.      actions for Ack Code processing.
  2832.  
  2833.    update Registration Status (up)
  2834.      The automaton updates the subscriber's current registration status for
  2835.      each specified service as follows.
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849. <draft-piscitello-mncp-00.txt>                                 Page 46
  2850.  
  2851.  
  2852. INTERNET DRAFT                   MNCP                   August 28, 1997
  2853.  
  2854.  
  2855.      When the MNCP:                               Status is set to:
  2856.      ---------------------------------------      -----------------
  2857.      Sends positive FUN_REG_REQ Ack Code          Registered
  2858.      Receives positive FUN_REG_REQ Ack Code       Registered
  2859.      Receives positive FUN_<other> Ack Code       Registered (implicit)
  2860.      Sends FUN_DEREG_REQ                          Deregistered (implicit)
  2861.      Sends positive FUN_DEREG_REQ Ack Code        Deregistered
  2862.      (MCD sends ACK_OOS_SVC, MS sends ACK_OK)
  2863.      Receives positive FUN_DEREG_REQ Ack Code     Deregistered
  2864.      (MCD rcvs ACK_OK, MS rcvs ACK_OOS_SVC)
  2865.      Sends negative FUN_DEREG_REQ Ack Code        (Still)Registered
  2866.      (MCD sends ACK_OK, MS sends ACK_other)
  2867.      Receives negative FUN_DEREG_REQ Ack Code     (Re)Registered
  2868.      (MCD rcvs ACK_other, MS rcvs ACK_OK)
  2869.  
  2870.      Storage methods and internal representation of subscriber information
  2871.      and registration status are not specified by this memo.
  2872.  
  2873.    send Positive Ack Code (spk)
  2874.      Successful authentication of any incoming request forwarded to session
  2875.      control is indicated by returning a positive ACK code to the MNCP
  2876.      reliable delivery automaton for inclusion in a PT_ACK packet. A
  2877.      positive Ack Code is ACK_OK in all cases except when an MCD responds
  2878.      to a FUN_DEREG_REQ; in this case, it is ACK_OOS_SVC. The session
  2879.      control automaton changes state when acknowledging initial Application
  2880.      Requests (FUN_<other> packets) that cause implicit registration.  The
  2881.      automaton transitions to the logical next state: Registered after a
  2882.      FUN_REG_REQ, FUN_<other>, or Listen after a FUN_DEREG_REQ.
  2883.  
  2884.    send Negative Ack Code (snk)
  2885.      Failed authentication of any incoming request forwarded to session
  2886.      control is indicated by returning a negative ACK code to the MNCP
  2887.      reliable delivery automaton for inclusion in a PT_ACK packet.  A
  2888.      negative ACK code is one of {ACK_ERR_SID, ACK_ERR_PWD, ACK_OOS_SID, or
  2889.      ACK_OOS_SVC}, except in the case where an MCD rejects a FUN_DEREG_REQ,
  2890.      in which case the ACK code is ACK_OK. The session control automaton
  2891.      does not change state when acknowledging Application Requests
  2892.      (FUN_<other> packets) or failed Registration Requests, but transitions
  2893.      back to the Registered state after a failed Deregistration Request
  2894.      (i.e., MS requests deregistration after inactivity time expires, but
  2895.      MCD indicates the application is still active).
  2896.  
  2897.    start INACTIVITY_TIMER (it)
  2898.      The Mobility Server's session control automaton (re)starts an
  2899.      INACTIVITY_TIMER whenever it receives a FUN_REG_REQ, FUN_<other>, or
  2900.      failed FUN_DEREG_REQ Ack from the MCD.  This timer allows the Mobility
  2901.      Server to refresh the registration status associated with an MCD on a
  2902.      periodic basis in the absence of other traffic.  This timer does not
  2903.      apply to the MCD's session control automaton.
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911. <draft-piscitello-mncp-00.txt>                                 Page 47
  2912.  
  2913.  
  2914. INTERNET DRAFT                   MNCP                   August 28, 1997
  2915.  
  2916.  
  2917. 7. Security Considerations
  2918.    The only form of security provided in this protocol is a validation
  2919.    (weak authentication) scheme based on clear text subscriber
  2920.    identification and password, so it is vulnerable to several known forms
  2921.    of attacks on clear text, against which only limited defenses can be
  2922.    taken (password aging/expiration, use of one-time long, system-
  2923.    generated passwords, etc.).  Only subscriber validation is performed
  2924.    (the subscriber has no mechanism to determine the authenticity of a
  2925.    mobility server).
  2926.  
  2927.    [NOTE: A means of negotiating or selecting a strong authentication
  2928.    method and (additionally, optionally) a method for providing data
  2929.    integrity and confidentiality at the session control level of MNCP is
  2930.    under investigation.]
  2931.  
  2932.    Since MNCP operates over UDP/IP, it may be appropriate to make use of
  2933.    security services offered by other layers.  For example, an IP
  2934.    Authentication Header can be used to provide integrity and
  2935.    authentication without confidentiality to IP datagrams [6], whereas an
  2936.    IP Encapsulating Security Payload (ESP) can be used to provide
  2937.    integrity, authentication, and confidentiality to IP datagrams (see
  2938.    also [7]).
  2939.  
  2940.    For other applications, it may be appropriate to adopt/adapt
  2941.    application-specific security services.  For example,  Mobile Messaging
  2942.    application, having already adapted POP3 [8] and SMTP [9], could also
  2943.    adapt PGP [10] to provide non-repudiation of sender and data privacy
  2944.    through encryption.
  2945.  
  2946. 8. References
  2947.  
  2948.   [1]Postel, J., "User Datagram  Protocol," RFC 768, USC/Information
  2949.      Sciences Institute, 28 August 2880.
  2950.  
  2951.   [2] Reynolds, S. and Postel, J., "ASSIGNED NUMBERS", RFC 1700, 20
  2952.      October 1994.
  2953.  
  2954.   [3] Friend, R. and Simpson, W., "PPP Stac LZS Compression Protocol", RFC
  2955.      1974, USC/Information Sciences Institute, 13 August 2896.
  2956.  
  2957.   [4] Malkin, G., "Internet Users' Glossary", RFC 1983, USC/Information
  2958.      Sciences Institute, 16 August 2896.
  2959.  
  2960.   [5] Bradner, S., "Key words for use in RFCs to Indicate Requirement
  2961.       Levels", RFC 2119, USC/Information Sciences Institute, 26 March
  2962.      1997.
  2963.  
  2964.    [6] Atkinson, R., "IP Authentication Header", RFC 1826,
  2965.        USC/Information Sciences Institute, 9 August 2895.
  2966.  
  2967.    [7] Atkinson, R., "Security Architecture for the Internet Protocol",
  2968.        RFC 1825, USC/Information Sciences Institute, 9 August 2895.
  2969.  
  2970.    [8] Atkins, D.,  Stallings, W., Zimmermann, P., "PGP Message
  2971.  
  2972.  
  2973. <draft-piscitello-mncp-00.txt>                                 Page 48
  2974.  
  2975.  
  2976. INTERNET DRAFT                   MNCP                   August 28, 1997
  2977.  
  2978.  
  2979.        Exchange" Formats", RFC 1991, , USC/Information Sciences
  2980.        Institute, 16 August 2896
  2981.  
  2982.    [9] S Myers, J., M. Rose, "Post Office Protocol - Version 3", RFC
  2983.        1939, USC/Information Sciences Institute, 14 May 1996
  2984.  
  2985.    [10] Postel, J., "Simple Mail Transfer Protocol", RFC 821,
  2986.        USC/Information Sciences Institute, January 8 1982
  2987.  
  2988. 9. Authors' Addresses
  2989.  
  2990.    Dave Piscitello                 Lisa Phifer
  2991.    Core Competence                 Core Competence
  2992.    1620 Tuckerstown Road           1620 Tuckerstown Road
  2993.    Dresher, PA 19025               Dresher, PA 19025
  2994.    (215) 830-0692                  (215) 830-0692
  2995.    dave@corecom.com                lisa@corecom.com
  2996.  
  2997.  
  2998.    Richard Hovey                   Yangwei Wang
  2999.    Bellcore                        Bellcore
  3000.    445 South Street, MRE-2N264     331 Newman Springs Rd, NVC-3C221
  3001.    Morristown, NJ 07960-6438       Red Bank, NJ 07701
  3002.    (201)829-4176                   (908)758-5107
  3003.    hovey@bellcore.com              ywang@cc.bellcore.com
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035. <draft-piscitello-mncp-00.txt>                                 Page 49
  3036.  
  3037.  
  3038. INTERNET DRAFT                   MNCP                   August 28, 1997
  3039.  
  3040.  
  3041.  
  3042. Appendix A. HDML Transactions using MNCP
  3043.  
  3044.    The design of the Mobile Network Computing Protocol (MNCP) makes it
  3045.    possible to implement a wide range of services efficiently and reliably
  3046.    using low-bandwidth, high-latency wireless links.  In this Appendix, we
  3047.    describe the implementation of a Web browsing and information push
  3048.    service based on the Handheld Device Markup Language (HDML).
  3049.  
  3050.    HDML has been proposed as a means of bringing interactive browsing
  3051.    services to devices with limited processing, storage, display and input
  3052.    capabilities.  The language is based on the concept of decks (the basic
  3053.    unit transported) and cards (the basic unit displayed).  The language
  3054.    is a replacement for HTML for portable devices such as screen
  3055.    telephones and two-way pagers, and makes use of the infrastructure of
  3056.    HTTP connections and Web servers that has been created for HTML
  3057.    browsers. (See http://www.w3.org/pub/WWW/TR/NOTE-Submission-HDML.html
  3058.    for a copy of the HDML proposal)
  3059.  
  3060.    An HDML browser on an MNCP-capable client device begins by registering
  3061.    with the Mobility server. The client registers by submitting a request
  3062.    with the Function ID set to 1, and the Service ID set to the pre-
  3063.    defined HDML service (assume 85 is assigned to HDML).  During the
  3064.    registration process, the Mobility server validates the user, based on
  3065.    the submitted Subscriber ID and password, ensuring both that the
  3066.    subscriber is registered with the server and authorized to use the
  3067.    requested service.  Once registered, the client device can perform
  3068.    interactive browsing of HDML sites and receive unsolicited (pushed)
  3069.    messages encoded in HDML.
  3070.  
  3071.    Browsing of HDML sites is initiated by the subscriber, pointing the
  3072.    browser to the desired URL.  The HDML browser formulates a HTTP request
  3073.    (e.g., GET or POST) of the specified URL, and submits this to the MNCP
  3074.    agent code on the client device. The MNCP code then formulates a single
  3075.    packet or multi-packet request to a pre-defined Service ID (i.e., 85)
  3076.    on the Mobility server.  The MNC protocol handles reliable delivery of
  3077.    the request to the Mobility server, invisible to the HDML browser.
  3078.  
  3079.    The Mobility server routes incoming messages to code modules based on
  3080.    the Service ID.   Any message with a Service ID of 85 are routed to the
  3081.    HDML service module.  The HDML service module then extracts the HTTP
  3082.    request from the MNCP message.  The HTTP request could be implemented
  3083.    by using a Function ID to correspond to each HTTP function (i.e.,
  3084.    Function ID 2 maps to GET, Function ID 3 maps to PUT) or the HTTP
  3085.    request as formulated by the client could be included as the body of
  3086.    the message.  The HDML service module then forwards the HTTP request to
  3087.    the HDML information server.  When the Mobility server receives the
  3088.    response from the HDML information server, it encodes the response with
  3089.    the previously negotiated compression algorithm and delivers it to the
  3090.    client device.  The subscriber could then continue browsing in a
  3091.    similar fashion, based on the contents of the HDML deck that was
  3092.    returned.
  3093.  
  3094.  
  3095.  
  3096.  
  3097. <draft-piscitello-mncp-00.txt>                                 Page 50
  3098.  
  3099.  
  3100. INTERNET DRAFT                   MNCP                   August 28, 1997
  3101.  
  3102.  
  3103.    The process of `pushing' a message to the HDML browser is implemented
  3104.    from the server side.  An external server begins the process by
  3105.    formulating an HDML deck to be delivered to a particular HDML service
  3106.    subscriber.  Alternatively, a person may wish to send an email- or
  3107.    page-type notice to the subscriber.  The information server or the
  3108.    individual must deliver the message to the Mobility server, using the
  3109.    interface specified by the Mobility server.  (HTTP connections or e-
  3110.    mail messages are two possibilities.)  When the Mobility server
  3111.    receives such a message, it first determines if the subscriber to whom
  3112.    the message is addressed is registered.  If the subscriber is not
  3113.    registered for HDML service, the message might be returned or placed in
  3114.    a message store.  If the subscriber is currently registered, the
  3115.    Mobility server routes the message to the HDML service module.  The
  3116.    HDML service module takes the incoming message and formats it for
  3117.    delivery.  This formatting might include converting a plain-text
  3118.    message to HDML, as well as compression and segmentation for MNCP
  3119.    delivery.  The HDML service assigns the proper Service ID (85) and a
  3120.    pre-defined Function ID that corresponds to pushed messages.  In fact,
  3121.    multiple Function IDs could be assigned to pushed messages, with
  3122.    different values indicating different levels of priority, for example.
  3123.    Using single- or multiple-packet reliable delivery, the Mobility server
  3124.    then forwards the message to the HDML client.  The browser code
  3125.    receives the HDML deck, interprets the format for proper display and
  3126.    informs the user in an appropriate fashion.  The user can then interact
  3127.    with the delivered message in standard browsing mode.
  3128.  
  3129.    When the subscriber has completed browsing and/or no longer wishes to
  3130.    receive pushed messages, terminating the browser will perform a de-
  3131.    registration operation, separating the subscriber from the Mobility
  3132.    server.  The de-registration message again uses the HDML-assigned
  3133.    Service ID (85) and the Function ID of 0.
  3134.  
  3135.    A variety of services can be implemented using HDML.  Currently, public
  3136.    services such as phone-number searches, news reports and weather
  3137.    forecasts are available.  Users of such services would not generally
  3138.    benefit from the overhead of sophisticated security measures.  However,
  3139.    HDML could be used in intranet-like applications, such as salespeople
  3140.    querying market data, which would require encryption and
  3141.    authentication.  To properly protect the data transmitted in such
  3142.    applications, the security measures must protect the entire path from
  3143.    client to server, not just the wireless portion of the link.  End-to-
  3144.    end encryption and authentication protocols could be built into HDML
  3145.    browsers and HDML information servers to protect sensitive data.
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159. <draft-piscitello-mncp-00.txt>                                 Page 51
  3160.  
  3161.  
  3162. INTERNET DRAFT                   MNCP                   August 28, 1997
  3163.  
  3164.  
  3165.    Figure A-1 depicts the MNC architecture as used to support HDML
  3166.    transactions.  Figure A-2 illustrates the message flows.
  3167.  
  3168.         MCD               MS            HDML Server
  3169.    +-----------+      +----------+      +--------+
  3170.    |           | HDML |          | HDML |  Info  |
  3171.    |HDML Client| <--> |HDML Proxy| <--> | Server |
  3172.    +-----------+      +-----+----+      +--------+
  3173.    |    MNCP   |      |MNCP |HTTP|      |  HTTP  |
  3174.    +-----------+      +-----+----+      +--------+
  3175.    |    UDP    |      |UDP  |TCP |      |   TCP  |
  3176.    +-----------+------+-----+----+------+--------+
  3177.    |   Wireless Network     |   Wireline Network |
  3178.    +------------------------+--------------------+
  3179.  
  3180.                                Figure A-1.
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221. <draft-piscitello-mncp-00.txt>                                 Page 52
  3222.  
  3223.  
  3224. INTERNET DRAFT                   MNCP                   August 28, 1997
  3225.  
  3226.  
  3227.  
  3228.           MCD              MS         HDML Server
  3229.            |               |               |
  3230.    REG_REQ |PT_CMD(S85,F1) |               |
  3231.    ------->|-------------->|               |
  3232.    REG_CNF |PT_ACK(ACK_OK) | Register MCD  |
  3233.    <-------|<--------------|               |
  3234.            |               |               |
  3235.            |               |               |
  3236.    FUN_REQ |PT_CMD(S85,Fx) | Browser Pull  |
  3237.    ------->|-------------->| HDML GET:URL  |
  3238.    FUN_CNF |PT_ACK(ACK_OK) |-------------->|
  3239.    <-------|<--------------|               |Perform GET
  3240.            |               |               |Return PUT
  3241.            |               |   HDML PUT    |
  3242.            |PT_NTFN(S85,Fy)|<--------------|
  3243.            |<--------------|               |
  3244.            |PT_ACK(ACK_OK) |               |
  3245.            |-------------->|               |
  3246.            |PT_DATA(M,DECK)|               |
  3247.            |<--------------|               |
  3248.            |PT_ACK(ACK_OK) |               |
  3249.            |-------------->|               |
  3250.            |PT_DATA(F,DECK)|               |
  3251.    <-------|<--------------|               |
  3252.    FUN_IND |PT_ACK(ACK_OK) |               |
  3253.            |               |               |
  3254.            |               |               |
  3255.            |               |               |Server Push
  3256.            |               | HDML POST:URL |
  3257.            |PT_NTFN(S85,Fz)|<--------------|
  3258.            |<--------------|               |
  3259.            |PT_ACK(ACK_OK) |               |
  3260.            |-------------->|               |
  3261.            |PT_DATA(M,DECK)|               |
  3262.            |<--------------|               |
  3263.            |PT_ACK(ACK_OK) |               |
  3264.            |-------------->|               |
  3265.            |PT_DATA(F,DECK)|               |
  3266.    <-------|<--------------|               |
  3267.    FUN-IND |PT_ACK(ACK_OK) |               |
  3268.            |               |               |
  3269.            |               |               |
  3270.    DEREGREQ|PT_CMD(S85,F0) |               |
  3271.    ------->|-------------->|               |
  3272.    DEREGCNF|PT_ACK(ACK_OK) |Deregister MCD |
  3273.    <-------|<--------------|               |
  3274.            |               |               |
  3275.            |               |               |Server Push
  3276.            |               | HDML POST:URL |
  3277.            |               X<--------------|
  3278.            |               |               |
  3279.  
  3280.  
  3281.  
  3282.  
  3283. <draft-piscitello-mncp-00.txt>                                 Page 53
  3284.  
  3285.  
  3286. INTERNET DRAFT                   MNCP                   August 28, 1997
  3287.  
  3288.  
  3289.    Key:   S85 = Service ID of HDML-based service
  3290.           F1  = Function ID of FUN_REG_REQ
  3291.           F0  = Function ID of FUN_DEREG_REQ
  3292.           Fx,y,z = Function IDs of FUN_<other>_REQs
  3293.           M,DECK = IE_DATA_MORE containing segment of HDML deck
  3294.           F,DECK = IE_DATA_FINAL containing last segment of HDML deck
  3295.  
  3296.    Note:  This flow illustrates explicit registration. For implicit
  3297.           registration, omit first MNCP packet sequence; MS registers
  3298.           MCD upon receipt of FUN_<other>_REQ instead.
  3299.  
  3300.                                  Figure A-2.
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345. <draft-piscitello-mncp-00.txt>                                 Page 54
  3346.  
  3347.  
  3348. INTERNET DRAFT                   MNCP                   August 28, 1997
  3349.  
  3350.  
  3351.  
  3352. Appendix B. Future Protocol Extensions
  3353.  
  3354.    Several extensions are under consideration for the MNCP.
  3355.  
  3356.    A reliable delivery that uses a sliding window mechanism to improve
  3357.    performance.  The objective is to extend the current positive
  3358.    acknowledgment of packets with retransmission by allowing more than one
  3359.    packet to be transmitted before waiting for acknowledgment from the
  3360.    receiver.  Full or partial window credit indications would accompany
  3361.    cumulative acknowledgments returned by the receiver, and selective
  3362.    acknowledgments would be a desirable extension as well
  3363.  
  3364.    A means of providing data synchronization at the session control level
  3365.    that persists beyond the possibly abrupt termination or interruption of
  3366.    an underlying connection is desirable.  Such a mechanism would allow a
  3367.    mobile computing device to continue a transfer from a commonly agreed
  3368.    upon starting point in an octet stream rather than from the beginning
  3369.    of the stream.
  3370.  
  3371.    It would be desirable to be able to extend the existing "per reliable
  3372.    transfer" authentication model in MNCP to support strong authentication
  3373.    whether applications are explicitly or implicitly registered.  It would
  3374.    also be useful to allow the MCD to verify the authenticity of a
  3375.    Mobility Server.
  3376.  
  3377.    One method under consideration is to identify an authentication method
  3378.    and encode the authentication information appropriate for that method
  3379.    in the same registration request or data request packet. The initiator
  3380.    (MCD or MS) chooses a method, performs whatever computation is required
  3381.    to generate the strong authentication information for that method, and
  3382.    then sends the packet.  The initiator decides what security is
  3383.    appropriate. A new IE identifying authentication-method can be sent in
  3384.    the clear, with the remainder of the PT_NTFN (PT_CMD) (including
  3385.    authentication information) encrypted as per the indicated security
  3386.    method.
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407. <draft-piscitello-mncp-00.txt>                                 Page 55
  3408.