Commit Graph
566 Commits
Author SHA1 Message Date
Jon Shallow 9cde7cdee1 Update version to release 4.3.3 2023-09-14 09:55:47 +01:00
Jon Shallow 269216eb19 RIOT: Update PKG_VERSION to point to 4.3.2 code 2023-09-07 12:04:46 +01:00
Jon Shallow f67f44516a Update version to release 4.3.2 2023-09-07 11:51:24 +01:00
Jon Shallow a253cdb090 RIOT: Follow RIOT coding for RIOT examples
Update libcoap test build for RIOT.
2023-09-07 09:49:04 +01:00
Jon Shallow c6637bb049 RIOT: Follow RIOT coding for RIOT examples 2023-08-28 16:21:50 +01:00
Jon Shallow d295ccb638 Coverity: Fix CID 1469636, 1514378, 1520611 and 1566432 2023-08-19 14:07:21 +01:00
Jon Shallow 760dd4bc9b RIOT: Add in cplusplus wrappers to example header files 2023-08-19 11:56:30 +01:00
Jon Shallow 5a9a6cc2c2 RIOT: Update PKG_URL and PKG_VERSION to latest 4.3.2rc2 code 2023-08-14 10:43:28 +01:00
Jon Shallow f176bf3c53 release 4.3.2rc2: Release candidate for 4.3.2 2023-08-14 09:37:23 +01:00
Jon Shallow 91000861e1 tinydtls: Update to latest main branch 2023-08-14 09:35:36 +01:00
Jon Shallow 76e8b0f029 Coverity: Fix CID 1382587, 1566422-1566493 2023-08-12 14:07:08 +01:00
Jon Shallow ef943c93a8 contiki/Makefile: Add in Contiki version check
Set to release/v4.9
2023-08-07 14:01:28 +01:00
Jon Shallow 3f8bb33807 coap_resolve_address_info: Add in support for defining WebSocket ports 2023-07-26 13:01:42 +01:00
Jon Shallow 084c866c69 coap_startup: Make coap_startup() first function call in examples
This then makes sure that all things libcoap are properly initialized
before use, and coders realize they need to do this.

Note: coap_new_context() continues to make sure that coap_startup()
is invoked if not done previously, but this may be too late.
2023-07-25 13:50:18 +01:00
Jon Shallow 2f98643a09 lwip/Makefile: make sure correct hash is used for tinydtls with tarball build 2023-07-24 13:17:39 +01:00
Jon Shallow c35c0783e2 RIOT: Update PKG_URL and PKG_VERSION to latest 4.3.2rc1 code 2023-07-22 09:43:17 +01:00
Jon Shallow cb78d5fd85 release 4.3.2rc1: Release candidate for 4.3.2 2023-07-22 09:29:32 +01:00
Jon Shallow e60205e52a coap_session.c: Report COAP_NACK_ICMP_ISSUE for NON to NACK handler 2023-07-22 09:24:13 +01:00
Jon Shallow d17f47ab54 coap_address_t: Update functions documentation and add coap_is_af_unix() 2023-07-17 09:43:35 +01:00
Jon Shallow a71b7930b9 pre-commit: Include re-styled examples files to checks 2023-07-13 09:01:41 +01:00
Jon Shallow e2910a5bf1 naming: Rename remaining *.[ch] files that are not prefixed with coap_
include/coap3/block.h -> include/coap3/coap_block.h
include/coap3/pdu.h -> include/coap3/coap_pdu.h
include/coap3/resource.h -> include/coap3/coap_resource.h
src/block.c -> src/coap_block.c
src/net.c -> src/coap_net.c
src/pdu.c -> src/coap_pdu.c
src/resource.c -> src/coap_resource.c
2023-07-13 08:59:22 +01:00
Jon Shallow 57013f3377 RFC9177: Add in Q-Block support
examples/coap-client.c:
examples/coap-server.c:

Add in Q-Block intelligence.

include/coap3/block.h
include/coap3/coap_block_internal.h
include/coap3/coap_event.h

Add in Q-Block references.
Add in new functions
coap_block_check_q_block1_xmit()
coap_block_check_q_block2_xmit()
coap_send_q_blocks()
coap_send_q_block1()
coap_send_q_block2()
coap_block_drop_resp_q_block_xmit()
coap_block_drop_resp_q_block2_crcv()
coap_q_block_is_supported()

include/coap3/coap_session.h:

Add in new Congestion Control defaults and ability to configure them.

include/coap3/pdu.h:

Add in the new options.

libcoap-3.map:
libcoap-3.sym:

Expose external Congestion Control functions.

man/coap-client.txt.in:
man/coap-server.txt.in:
man/coap_block.txt.in:
man/coap_handler.txt.in:
man/coap_recovery.txt.in:
man/coap.txt.in:

Add in Q-Block information.

src/block.c:

Add in the new functions to support Q-Block.

src/coap_debug.c:

Output the new options as appropriate.

src/coap_io.c:

Check for Q-Block transmission timeouts.

src/coap_session.c:

Add in the Congestion Control support.

src/net.c:
src/resource.c:

Add in Q-Block support.

configure.ac
CMakeLists.txt

Add in support for enabling/disabling Q-Block support (enabled by default).
2023-07-11 11:04:04 +01:00
Jon Shallow f2a03df9a0 pre-commit: Include re-styled RIOT example files to checks 2023-07-06 12:11:38 +01:00
Jon Shallow 3755358b7d pre-commit: Include re-styled LwIP and Contiki example files to checks 2023-07-06 11:45:47 +01:00
Jon Shallow a3591eca55 RIOT: Stop objdump analyzing the built examples 2023-07-03 12:00:14 +01:00
Jon Shallow a9b179ab32 Coding: Remove blank lines at ends of files 2023-06-29 09:34:52 +01:00
Jon Shallow 2f4b8843cd DTLS Libraries: Replace HAVE_<dtlslib> defines with COAP_WITH_<dtls_lib>
Prevents possibility of name clashes when integrating with other code / OS.
2023-06-15 18:54:29 +01:00
Jon Shallow 5c1e7cae34 Async: Invert WITHOUT_ASYNC define to COAP_ASYNC_SUPPORTED for clarity
Prevents possibility of name clashes when integrating with other code / OS.
2023-06-15 11:01:22 +01:00
Jon Shallow 1d81256fc1 ipv[46]: Add in configurable support for IPv4, IPv6 and AF_UNIX
Move some existing header inline code into source files.

Update coap_resolve_address_info() to remove need for client based app
code to have to understand IPv4/IPv6 code.

Remove IPv4/IPv6 specific code from examples code.
2023-06-12 14:55:09 +01:00
Jon Shallow 21bd1df95b examples: Remove references to sockaddr* structures
This means that apps need to have no knowledge of what IP support is available.

Updates coap_uri_into_options() and coap_resolve_address_info()
which have only been recently added to develop branch and are not in any
previous release.
2023-06-09 12:04:09 +01:00
Jon Shallow 6c05d34fc6 bcast: Support IPv4 broadcast as multicast
See https://datatracker.ietf.org/doc/html/draft-ietf-core-groupcomm-bis-08#section-3.9.5
2023-06-08 17:47:56 +01:00
Jon Shallow f4666c2ea9 LwIP: Support disabling LwIP's IPv6 support 2023-06-08 17:40:08 +01:00
Jon Shallow c4cfe9380c RIOT: Update PKG_URL and PKG_VERSION to latest develop 2023-06-05 12:58:54 +01:00
Jon Shallow 8d869fff04 RIOT: Update to support latest libcoap code
Add in examples and pkg/build information
2023-06-05 12:47:15 +01:00
Jon Shallow 6f79db0a37 coap-client.c: Fix Uri-Host option setting
If the host name includes %iface, remove this from the host comparisons.
2023-05-16 12:03:19 +01:00
Jon Shallow b9d53ed3d4 keepalive: Fix timeouts when network issues
If keepalive is enabled, make sure that they continue when a server
stops / starts.  Limit the retry timeouts to the number of seconds
defined by coap_context_set_keepalive() so that interim NAT devices
are always kept "warm".

Addded in a new event COAP_EVENT_KEEPALIVE_FAILURE and updated docs
accordingly.
2023-05-05 10:35:39 +01:00
Jon Shallow ca609d221c Persist: Support tracking observe information over server restarts
Add in optional callbacks for when dynamic resources are setup and deleted.

Add in optional callbacks for when observe subscriptions start and stop.

Add in optional callbacks for when the observe counter is updated (can be
ratelimited) for a resource as well as track when a resource is deleted.

Add is support for new functions

Main functions with libcoap tracking support are
 coap_persist_startup()
 coap_persist_stop()

coap-server has -t option to track observe information.

UDP sessions supported, as well as OSCORE over UDP.

Documentation updated

libcoap tracking support (as opposed to application tracking) is configurable.
2023-04-22 11:07:21 +01:00
Jon Shallow e533b980fa coap_resolve_address_info: Move logic into function, simplifying server apps
Add in new function coap_get_available_scheme_hint_bits() to help as well.
2023-04-22 10:45:17 +01:00
Jon Shallow 191cd5cf40 Layers: Move layer index table into coap_layers.c 2023-04-15 19:33:18 +01:00
Jon Shallow e82523c4d9 oscore_testcases.sh: Add in delay after starting up interop servers 2023-04-13 10:14:57 +01:00
Jon Shallow 5c11bc5f00 coap_ws.c: Fix coap_ws_is_supported() check for GnuTLS 2023-04-13 10:13:54 +01:00
Jon Shallow 964bd69481 MinGW: Initial compile environment support 2023-04-12 10:06:46 +01:00
Jon Shallow 391803aebf WebSockets: Add in support for WebSockets layer
Follows RFC6455, as specified in RFC8323.

Make support configurable.

Add in example support.

Update other code to be aware of WebSockets as a CoAP protocol.
2023-04-10 14:38:56 +01:00
Jon Shallow 6599297edb syslog.h: Remove all references to syslog.h
syslog.h is no longer required for libcoap as all LOG_ usage has been replaced
with COAP_LOG_.

Added #include <stdio.h> to example code for code-client and coap-server as
a hint should application code be using LOG_.
2023-04-10 14:03:13 +01:00
Jon Shallow 546f4203b1 examples: Clean up memory usage on error close down
Makes valgrind testing easier.

Note that it is unsafe to call coap_free_context() from with an atexit()
handler.
2023-04-08 18:02:16 +01:00
Jon Shallow da6459416f coap-server.c: Fix scheme hint type tracking
Missing part of a Websockets merge.
2023-03-26 18:53:37 +01:00
Jon Shallow 305c400d6f LwIP: Fix git clone url 2023-03-24 12:53:59 +00:00
Jon Shallow c041af0b2b WebSockets: Add in libcoap infrastructure
Add in stub Websockets files.

Add in coap_crypto_hash(0 function.

Actual WebSocket support for applications will follow.
2023-03-24 09:49:00 +00:00
Jon Shallow adb8a3f5e2 layers: Add in protocol layers support
Current stack:-

Application
CoAP
CoAP-Session
DTLS
Netif
Sockets
Network Stack

Depending on the CoAP protocol, indexing functions through coap_layers_coap[]
(in src/coap_io.c) will invoke the correct layer function when used at the
CoAP and DTLS layers.

It is then easy to add in another protocol layer by updating coap_layers_coap[].
2023-03-20 10:49:02 +00:00
Jon Shallow ecf07b53b5 tls_layer: Separate out (D)TLS layer functionality
Add in new file src/coap_dtls.c.

Add in coap_(d)tls_establish() functions which are called when netif
accept / connect take place.

Add in coap_session_establish() function which is called when (D)TLS
has established as well as at the session layer if there is no (D)TLS
in preparation for properly supporting protocol layers.

Add in coap_(d)tls_close() functions which are called prior to
coap_netif_close().
2023-03-13 20:42:22 +00:00