Skip to content

Commit

Permalink
Update links from draft-18 to rfc7252
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotterleben committed Feb 25, 2015
1 parent 9cb1dcd commit a27412a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@ microcoap
=========

A tiny CoAP server for microcontrollers.
See http://tools.ietf.org/html/draft-ietf-core-coap-18
See http://tools.ietf.org/html/rfc7252

Endpoint handlers are defined in endpoints.c

Expand Down
4 changes: 2 additions & 2 deletions coap.c
Expand Up @@ -150,7 +150,7 @@ int coap_parseOption(coap_option_t *option, uint16_t *running_delta, const uint8
return 0;
}

// http://tools.ietf.org/html/draft-ietf-core-coap-18#section-3.1
// http://tools.ietf.org/html/rfc7252#section-3.1
int coap_parseOptionsAndPayload(coap_option_t *options, uint8_t *numOptions, coap_buffer_t *payload, const coap_header_t *hdr, const uint8_t *buf, size_t buflen)
{
size_t optionIndex = 0;
Expand Down Expand Up @@ -288,7 +288,7 @@ int coap_build(uint8_t *buf, size_t *buflen, const coap_packet_t *pkt)
if (pkt->hdr.tkl > 0)
memcpy(p, pkt->tok.p, pkt->hdr.tkl);

// http://tools.ietf.org/html/draft-ietf-core-coap-18#section-3.1
// // http://tools.ietf.org/html/rfc7252#section-3.1
// inject options
p += pkt->hdr.tkl;

Expand Down
14 changes: 7 additions & 7 deletions coap.h
Expand Up @@ -11,7 +11,7 @@ extern "C" {

#define MAXOPT 16

// http://tools.ietf.org/html/draft-ietf-core-coap-18#section-3
//http://tools.ietf.org/html/rfc7252#section-3
typedef struct
{
uint8_t ver;
Expand Down Expand Up @@ -50,7 +50,7 @@ typedef struct

/////////////////////////////////////////

//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.2
//http://tools.ietf.org/html/rfc7252#section-12.2
typedef enum
{
COAP_OPTION_IF_MATCH = 1,
Expand All @@ -70,7 +70,7 @@ typedef enum
COAP_OPTION_PROXY_SCHEME = 39
} coap_option_num_t;

//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.1.1
//http://tools.ietf.org/html/rfc7252#section-12.1.1
typedef enum
{
COAP_METHOD_GET = 1,
Expand All @@ -79,7 +79,7 @@ typedef enum
COAP_METHOD_DELETE = 4
} coap_method_t;

//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.1.1
//http://tools.ietf.org/html/rfc7252#section-12.1.1
typedef enum
{
COAP_TYPE_CON = 0,
Expand All @@ -88,8 +88,8 @@ typedef enum
COAP_TYPE_RESET = 3
} coap_msgtype_t;

//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-5.2
//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.1.2
//http://tools.ietf.org/html/rfc7252#section-5.2
//http://tools.ietf.org/html/rfc7252#section-12.1.2
#define MAKE_RSPCODE(clas, det) ((clas << 5) | (det))
typedef enum
{
Expand All @@ -99,7 +99,7 @@ typedef enum
COAP_RSPCODE_CHANGED = MAKE_RSPCODE(2, 4)
} coap_responsecode_t;

//http://tools.ietf.org/html/draft-ietf-core-coap-18#section-12.3
//http://tools.ietf.org/html/rfc7252#section-12.3
typedef enum
{
COAP_CONTENTTYPE_NONE = -1, // bodge to allow us not to send option block
Expand Down

0 comments on commit a27412a

Please sign in to comment.