| < draft-li-core-coap-size-option-00.txt | draft-li-core-coap-size-option-01.txt > | |||
|---|---|---|---|---|
| core K. Li | core K. Li | |||
| Internet-Draft L. Tian | Internet-Draft L. Tian | |||
| Intended status: Standards Track B. Leiba | Intended status: Standards Track B. Leiba | |||
| Expires: September 27, 2011 Huawei Technologies | Expires: November 17, 2011 Huawei Technologies | |||
| March 26, 2011 | May 16, 2011 | |||
| CoAP Option Extension : Size | CoAP Option Extension : Size | |||
| draft-li-core-coap-size-option-00 | draft-li-core-coap-size-option-01 | |||
| Abstract | Abstract | |||
| This document defines an extension to the Constrained Application | This document defines an extension to the Constrained Application | |||
| Protocol (CoAP) to add a new option Size, which is used to indicate | Protocol (CoAP) to add a new option Size, which is used to indicate | |||
| the resource size in a Put/Post request or in a Get response. | the resource size in a Put/Post request or in a Get response. | |||
| Note | Note | |||
| Discussion and suggestions for improvement are requested, and should | Discussion and suggestions for improvement are requested, and should | |||
| skipping to change at page 1, line 37 ¶ | skipping to change at page 1, line 38 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on September 27, 2011. | This Internet-Draft will expire on November 17, 2011. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2011 IETF Trust and the persons identified as the | Copyright (c) 2011 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 4, line 29 ¶ | skipping to change at page 4, line 29 ¶ | |||
| +------+-----+-------+-----------+--------+---------------+ | +------+-----+-------+-----------+--------+---------------+ | |||
| 2.2. Using the Size Option | 2.2. Using the Size Option | |||
| The Size Option is used to indicate the size of the resource data | The Size Option is used to indicate the size of the resource data | |||
| measured in bytes. | measured in bytes. | |||
| It can be used in a Get response to give indication about the | It can be used in a Get response to give indication about the | |||
| resource data size. | resource data size. | |||
| The Get request including Size=0 is treated as a request to get the | ||||
| size of the resource representation (but not the resource payload). | ||||
| Also it can be used in a Post/Put request in the first Block Option | Also it can be used in a Post/Put request in the first Block Option | |||
| message. | message. | |||
| The Size option is not expected to be included for small resources | The Size option is not expected to be included for small resources | |||
| that can easily be carried in a single MTU, but SHOULD be included | that can easily be carried in a single MTU, but SHOULD be included | |||
| for resources larger than that. | for resources larger than that, if the Size information is available. | |||
| In the absence of the option, the size of the resource data is | In the absence of the option, the size of the resource data is | |||
| calculated after the data transmitted to the recipient, either from | calculated after the data transmitted to the recipient, either from | |||
| the CoAP payload length or based on number of blocks and block size. | the CoAP payload length or based on number of blocks and block size. | |||
| If the Size option is specified it MUST be accurate at that time, and | If the Size option is specified it SHOULD be accurate at that time, | |||
| MUST NOT be an estimate. | and SHOULD NOT be an estimate. | |||
| But due to the dynamic change of the resource data, the Size may not | But due to the dynamic change of the resource data, the Size may not | |||
| be accurate. If the value of Size option is not the same as the | be accurate. If the value of Size option is not the same as the | |||
| actual transmitted data, the recipient MUST take the size of the | actual transmitted data, the recipient MUST take the size of the | |||
| actual transmitted data as accurate, and ignore the Size option. In | actual transmitted data as accurate, and ignore the Size option. In | |||
| case that the recipient gets all the data but it is still smaller | case that the recipient gets all the data but it is still smaller | |||
| than the Size, the recipient SHOULD stop the transmission. If the | than the Size, the recipient SHOULD stop the transmission. If the | |||
| recipient finds out the transmitted data reaches the Size limit, and | recipient finds out the transmitted data reaches the Size limit, and | |||
| there's more data left, the recipient SHOULD continue to transmit the | there's more data left, the recipient SHOULD continue to transmit the | |||
| remaining data. | remaining data. | |||
| skipping to change at page 7, line 14 ¶ | skipping to change at page 7, line 14 ¶ | |||
| +--------+---------------+----------------+ | +--------+---------------+----------------+ | |||
| | Number | Name | Reference | | | Number | Name | Reference | | |||
| +--------+---------------+----------------+ | +--------+---------------+----------------+ | |||
| | 12 | Size | Section 2 | | | 12 | Size | Section 2 | | |||
| +--------+---------------+----------------+ | +--------+---------------+----------------+ | |||
| 7. Acknowledgements | 7. Acknowledgements | |||
| The authors of this draft would like to thank the participants of the | The authors of this draft would like to thank the participants of the | |||
| email discussion on this issue. Thanks to Bert Greevenbosch for the | email discussion on this issue. Thanks to Bert Greevenbosch, Charles | |||
| detailed reviews and discussions. | Palmer and Carsten Bormann for the detailed reviews and suggestions. | |||
| 8. Normative References | 8. Normative References | |||
| [I-D.ietf-core-block] | [I-D.ietf-core-block] | |||
| Shelby, Z. and C. Bormann, "Blockwise transfers in CoAP", | Bormann, C. and Z. Shelby, "Blockwise transfers in CoAP", | |||
| draft-ietf-core-block-02 (work in progress), March 2011. | draft-ietf-core-block-03 (work in progress), May 2011. | |||
| [I-D.ietf-core-coap] | [I-D.ietf-core-coap] | |||
| Shelby, Z., Hartke, K., Bormann, C., and B. Frank, | Shelby, Z., Hartke, K., Bormann, C., and B. Frank, | |||
| "Constrained Application Protocol (CoAP)", | "Constrained Application Protocol (CoAP)", | |||
| draft-ietf-core-coap-05 (work in progress), March 2011. | draft-ietf-core-coap-06 (work in progress), May 2011. | |||
| [I-D.ietf-core-link-format] | [I-D.ietf-core-link-format] | |||
| Shelby, Z., "CoRE Link Format", | Shelby, Z., "CoRE Link Format", | |||
| draft-ietf-core-link-format-03 (work in progress), | draft-ietf-core-link-format-04 (work in progress), | |||
| March 2011. | May 2011. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
| Authors' Addresses | Authors' Addresses | |||
| Kepeng Li | Kepeng Li | |||
| Huawei Technologies | Huawei Technologies | |||
| Huawei Base, Bantian, Longgang District | Huawei Base, Bantian, Longgang District | |||
| Shenzhen, Guangdong 518129 | Shenzhen, Guangdong 518129 | |||
| End of changes. 11 change blocks. | ||||
| 14 lines changed or deleted | 18 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||