Expand description
CoAP message parsing, encoding, and EST-coaps URI routing.
This module implements the CoAP message format (RFC 7252 §3) and maps CoAP URI paths to EST operations per RFC 9483 §5.1.
§CoAP Message Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver| T | TKL | Code | Message ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Token (if any, TKL bytes) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options (if any) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 1 1 1 1 1 1| Payload (if any) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+§EST-coaps URI Mapping
RFC 9483 §5.1 defines abbreviated URI paths for EST operations:
| CoAP Path | EST Operation | HTTP Method |
|---|---|---|
/sen | simpleenroll | POST |
/sren | simplereenroll | POST |
/skg | serverkeygen | POST |
/att | csrattrs | GET |
/cacerts | cacerts | GET |
/crts | cacerts | GET (alias) |
Structs§
- Coap
Code - CoAP response/request code (RFC 7252 §3, §5.9).
- Coap
EstRequest - CoAP request representing an EST-coaps operation.
- Coap
EstRouter - Routes CoAP URI paths to EST operations.
- Coap
Message - A parsed CoAP message (RFC 7252 §3).
- Coap
Option - A single CoAP option (RFC 7252 §3.1).
Enums§
- Coap
Message Type - CoAP message type (RFC 7252 §3).
- Coap
Method - CoAP request/response method codes (RFC 7252 §5.8, §12.1).
- EstOperation
- EST operations per RFC 7030, reused from the
kipuka-estcrate.
Constants§
- COAP_
VERSION - CoAP protocol version (RFC 7252 §3).
- OPTION_
BLOC K1 - Block1 option (RFC 7959 §2.1).
- OPTION_
BLOC K2 - Block2 option (RFC 7959 §2.1).
- OPTION_
CONTENT_ FORMAT - Content-Format option (RFC 7252 §5.10.3).
- OPTION_
SIZE1 - Size1 option (RFC 7959 §4).
- OPTION_
SIZE2 - Size2 option (RFC 7959 §4).
- OPTION_
URI_ HOST - Uri-Host option (RFC 7252 §5.10.1).
- OPTION_
URI_ PATH - Uri-Path option (RFC 7252 §5.10.1).
- OPTION_
URI_ PORT - Uri-Port option (RFC 7252 §5.10.1).
- OPTION_
URI_ QUERY - Uri-Query option (RFC 7252 §5.10.1).