Commit Graph
2986 Commits
Author SHA1 Message Date
chengshq 1456d9aa0d Fix inconsistent tokens received by other servers
When use `coap-client` with -T command, the other server received inconsistent.
```
coap-client send token "aaa", the other server received "aab"
coap-client send token "obstoken", the other server received "obstokeo"
```
2023-11-07 09:26:27 +00:00
Kamil Panek ecc55544d6 coap_debug.c: reset all globals in coap_debug_reset 2023-11-03 13:32:52 +00:00
kkrentz b2c3ca3b89 coap_net.c: Reuse coap_option_filter_clear in coap_dispatch 2023-11-03 11:29:51 +00:00
kkrentz ae4c5c7ad0 OSCORE: Account for pseudo-token to prevent coap_pdu_resize 2023-11-03 11:28:55 +00:00
Jon Shallow e602adeb3b pre-commit: Update revision of astyle_py 2023-10-27 11:42:24 +01:00
Jon Shallow 50b5f29133 coap_ws.c: Combine header and data in output from coap_ws_write() 2023-10-27 10:30:55 +01:00
Jon Shallow 17e44c73df memory: Support debug tracking of memory usage
New function coap_dump_memory_type_counts().

Requires COAP_MEMORY_TYPE_TRACK to be defined as 1.
2023-10-24 12:43:13 +01:00
Jon Shallow 7688258c39 coap_response_handler: Tidy up sent parameter
sent PDU passed to a response handler is now reset to initial sent PDU
(token restored, Block options removed), but some or all of original
data may be missing if Block operations were needed for the request or
the repsonse.

Updated documentation to reflect this.
2023-10-23 14:49:31 +01:00
Jon Shallow 203d228638 RIOT: library fixes for different build types
coap_debug.h: Support logging level set to _COAP_LOG_EMERG
coap_pdu.h: handle small ints
coap_pdu_internal.h: handle small ints
coap_session_internal.h: handle small ints
coap_uthash_internal.h: handle small ints
coap_block.c: Handle small ints
coap_debug.c: Fix use of vsnprintf() and vfprintf()
coap_pdu.c: Handle small ints
coap_tinydtls.c: Handle small ints
coap_uri.c: Fix alignment issue in coap_new_uri()

uncrustify run on RIOT examples to conform to RIOT's coding standards/
2023-10-23 14:38:57 +01:00
Jon Shallow 05d02be7a9 coap_net.c: Fix CSM timeouts in coap_client_delay_first()
Reduce timeout to 1 second and enter established state for servers that
only partially implement RFC8323 for TCP support, but do not send a CSM.

Add new coap_context_set_csm_timeout_ms() to control the value of the timeout.
2023-10-23 14:32:46 +01:00
Jon Shallow adcc8e8334 coap_address.c: Fix IPv4 broadcast checks 2023-10-19 16:05:28 +01:00
kkrentz 6addbef1b1 Suppress RST when the processing of a non-empty ACK fails 2023-10-19 15:00:24 +01:00
Jon Shallow bb1a635707 CMakeLists.txt: Correct typos 2023-10-19 11:58:34 +01:00
Jon Shallow 26302a076b coap-server.c: Add in support for output to syslog 2023-10-19 11:26:41 +01:00
Jon Shallow 95faeac5bb pdu: Make sure type is set to CON if Reliable 2023-10-19 11:02:13 +01:00
Jon Shallow cd1a7de0f2 coap_address.c: Broadcast address cannot be local IP address 2023-10-19 10:39:10 +01:00
Jon Shallow 48753b155b Stateless: Add in some stateless support
Client able to send data for every FETCH command to get next Block2 response.

Server able to not keep state while sending Block2 responses back.
2023-10-19 10:33:17 +01:00
kkrentz 38a726de37 Contiki-NG: Remove call to clock_init as Contiki-NG already does it 2023-10-19 10:19:32 +01:00
Jon Shallow c7186168ff PKI: report on insecure certificates 2023-10-13 14:20:51 +01:00
Jon Shallow 0b8005155a OSCORE interop: Make external interop testing easier 2023-10-13 14:19:12 +01:00
Jon Shallow ccf17f5914 coap.h: Tidy up coap.h.* files to make them consistent 2023-10-13 14:17:34 +01:00
Jon Shallow 1b639d1ce6 examples-code-check.c: Make troubleshooting easier 2023-10-13 14:15:30 +01:00
Jon Shallow c01f29f23a workflows/main.yml: Run the pre-commit checks first 2023-10-13 14:12:33 +01:00
kkrentz d61713d35d Contiki-NG: Renamings to avoid confusion 2023-10-13 14:12:06 +01:00
kkrentz 9bb8860b71 Contiki-NG: Adhere to function description in coap_io_process 2023-10-13 14:12:06 +01:00
kkrentz 2a77fb206d Contiki-NG: Declare max_sockets as static const 2023-10-13 14:12:06 +01:00
kkrentz 44cf0940c9 Contiki-NG: Re-schedule prepare timer in same occasions as the epoll timer 2023-10-13 14:12:06 +01:00
kkrentz 62790584be Contiki-NG: Synchronously stop libcoap_process upon coap_cleanup() 2023-10-13 14:12:06 +01:00
Olaf Bergmann 95e1310ddc Dockerfile.develop: Add package adduser
Installs the package adduser where /sbin/adduser apparently has
been moved.
2023-10-10 17:19:39 +01:00
Jon Shallow 5fd2f89ef0 pdu.c: Fix issue with 269 delta in internal coap_remove_option()
Update unit tests to check for a delta of 13 / 269.
v4.3.4
2023-10-04 22:04:19 +01:00
Jon Shallow 69e1784561 Update version to release 4.3.4
Update ABI to 3.1.1
2023-10-04 22:04:05 +01:00
Jon Shallow 9fbce393d9 Windows: Fix workflows OpenSSL install 2023-10-04 22:03:49 +01:00
Jon Shallow 342a2d0893 coap.h.windows: Correct sort order of includes 2023-10-04 22:03:36 +01:00
Jon Shallow f1f539485b workflows: Revert #1073 to add OpenSSL dev environment
OpenSSL dev environment is no longer included in windows-latest builds.

Disable Windows build OpenSSL 3 deprecation warnings
2023-10-04 22:03:22 +01:00
Jon Shallow fe463276d7 CMakeLists.txt: Create .so files using the ABI
configure.ac: Report the ABI version.
2023-10-04 22:03:06 +01:00
Jon Shallow da0f065af2 coap_handler.txt.in: Update documentation for request handler 2023-10-04 22:02:47 +01:00
Jon Shallow 8683a3177c coap_cleanup: Allow coap_startup() to be called after coap_cleanup() 2023-10-04 22:02:31 +01:00
kkrentz 836ceec436 Contiki-NG: Fix two compilation errors on macOS
One compilation error was a redefinition of ntohs in coap_config.h.contiki.
Another compilation error was due to an unused function in coap_time.c.
2023-10-04 22:01:41 +01:00
Jon Shallow ae2cc9ffef coap_address.c: Check for NULL ptr in is_bcast() 2023-10-04 22:01:22 +01:00
Jon Shallow d9bdf4b284 coap_address.c: Make coap_is_bcast() more generic for different builds 2023-10-04 22:00:27 +01:00
Jon Shallow 9cde7cdee1 Update version to release 4.3.3 v4.3.3 2023-09-14 09:55:47 +01:00
Jon Shallow e68f745ae9 configure.ac: Correct ABI version number for .so files 2023-09-12 11:16:32 +01:00
Jon Shallow 269216eb19 RIOT: Update PKG_VERSION to point to 4.3.2 code v4.3.2 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 4abe0ea7aa doc: Add hyperlinks for different TLS libraries 2023-09-05 12:19:25 +01:00
Daniel Mangum 9e24d22ce9 coap_address.c: do not enable IPV4 broadcast as multicast with Zephyr
Adds a check to ensure IPV4 broadcast as multicast is not enabled when
using Zephyr as it will break builds with Zephyr's minimal libc, which
is missing ifaddr.h.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-09-04 10:39:36 +01:00
Daniel Mangum a9808ade42 Define coap_mutex_t as sys_mutex on Zephyr
Changes definition of coap_mutex_t as k_mutex to sys_mutex to build
properly with Zephyr.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2023-09-04 10:35:57 +01:00
osobiehl 2ca498822c fix memory leak in coap_async
async requests were being lost because the order of these 2 lines
should be changed
2023-08-30 21:26:58 +01:00
Jon Shallow c6637bb049 RIOT: Follow RIOT coding for RIOT examples 2023-08-28 16:21:50 +01:00