Commit Graph
2692 Commits
Author SHA1 Message Date
Jon Shallow 8f068c0bbf pre-commit: Include re-styled include files to checks 2023-07-11 20:17:10 +01:00
Jon Shallow e55ecc9c9e configure.ac: Tidy up summary output following a merge 2023-07-11 12:21:57 +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 e8005c5c27 pre-commit: Include re-styled tests files to checks 2023-07-08 16:37:59 +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
Magdalena Szumny ed27226da8 Clear data offset for piggybacked response answering request with No_response 2023-07-06 11:45:28 +01:00
Jon Shallow 52dcc5201b Reliable PDUs: coap_show_pdu(): Do not show all the non-reliable headers 2023-07-05 10:53:00 +01:00
Jon Shallow ca1e4098b0 pre-commit: Include re-styled OSCORE files to checks 2023-07-05 10:50:25 +01:00
Jon Shallow fb4b5f33f2 New Issue: Update / clarify requirements when submitting an Issue 2023-07-03 12:12:19 +01:00
Jon Shallow a3591eca55 RIOT: Stop objdump analyzing the built examples 2023-07-03 12:00:14 +01:00
Jon Shallow 9920d3e295 pre-commit: Add in initial support
Add in github workflow.

Add in .pre-commit-config.yaml.

Updated man directory using pre-commit.

Others to follow.
2023-07-03 08:57:09 +01:00
Jon Shallow 64450b6ec8 coap_mbedtls.c: Add in Connection ID support (RFC9146)
Requires MbedTLS 3.2.0 or later and MBEDTLS_SSL_DTLS_CONNECTION_ID defined
(which is the default in later versions of MbedTLS).
2023-07-03 08:54:56 +01:00
Jon Shallow a9b179ab32 Coding: Remove blank lines at ends of files 2023-06-29 09:34:52 +01:00
Jon Shallow 5ac47de1a4 examples-code-check.c: Report on missing man pages
Set optional 2nd parameter to libcoap-3.sym to generate missing output.
2023-06-28 21:18:22 +01:00
Jon Shallow 31f692b8b2 man: Document WebSockets support 2023-06-28 21:16:11 +01:00
Jon Shallow 1dfae51f30 man: Fix coap_attribute() example 2023-06-28 10:25:51 +01:00
Jon Shallow 295afa9f95 man: Document deprecated functions
New: man/coap_deprecated.txt.in
2023-06-28 09:53:22 +01:00
Jon Shallow e8da2324af OSCORE: Log Initial B.2 response packet
Make configuation parameters checking more rigorous.
2023-06-20 09:22:19 +01:00
Jon Shallow 208cc87ff9 CMakeLists.txt: Description consistency tidy up. 2023-06-16 08:47:28 +01:00
Jon Shallow 2b81ffc2c0 configure.ac: Tidy up diagnostic output 2023-06-16 08:46:36 +01:00
Jon Shallow 71b84f550c OSCORE: Fix logging entries 2023-06-15 18:59:54 +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 b442140bb3 Oscore: Change HAVE_OSCORE define to COAP_OSCORE_SUPPORT for clarity
Prevents possibility of name clashes when integrating with other code.
2023-06-14 12:55:25 +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 63d5248d88 examples-code-check.c: Disable potential compile warning
Fixes snprintf() warning of writing into smaller buffer.
2023-06-12 13:16:21 +01:00
Jon Shallow e386160474 man: Correct man page errors
Update examples-code-check.c to cross-check NAME and SYNOPSIS entries.

Update examples-code-check.c to cross-check SYNOPSIS and RETURN VALUE entries.

Make the formating style of RETURN VALUES consistent.
2023-06-12 09:44:41 +01:00
Jon Shallow 711cf8208b configure.ac: Add consistency to how coap_config.h is documented
Clean up CMakeLists.txt and cmake_coap_config.h.in as well.
2023-06-12 09:07:30 +01:00
Jon Shallow b3ec5b83c3 Windows: Fix resolve issues / remove warnings
Handle Windows x68 size_t being only 32 bits.
2023-06-09 12:07:10 +01:00
Jon Shallow ed295ace42 coap_io.c: Handle windows version of SOL_IP definition
Windows uses IPPROTO_IP for IP_PKTINFO access.
2023-06-09 12:05:17 +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 d4b9a53eed coap_io.c: Handle windows generating ECONNRESET for udp sessions
Correct msg_namelen to be sizeof(sockaddr_in) if IF_INET.
2023-06-08 18:37:51 +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 9a196ce418 coap_string(3): Include missing return types 2023-06-08 17:44:06 +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 57eb0df962 doc/main.md: Update URI for coap.space to use HTTPS 2023-05-24 17:12:40 +01:00
Olaf Bergmann 9be2d60ecf README.md: Update URI for coap.space to use HTTPS
PR #1122 [1] has updated the reference to coap.space. As this site
provides a secure version but no redirect, the URI scheme is changed
to https.

[1] https://github.com/obgm/libcoap/pull/1121
2023-05-24 11:28:57 +02:00
Jon Shallow 82bf1f0f7a documentation: Fix bad url and hyperlink the RFCs 2023-05-24 08:49:26 +01:00
Jon Shallow 04f3a4a7e2 coap_oscore.c: Fix ASan detected global-buffer-overflow bug 2023-05-23 14:54:55 +01:00
Jon Shallow 08cbda80f1 block.c: Check that data received fits into specified block size 2023-05-23 14:53:33 +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 1cb29b6f5c net.c: Fix building without TCP enabled for EPOLL configured code
Report when using autotools or cmake that disabling TCP also disables
Websockets support.

Also, report for cmake when EPOLL support is not available.
2023-05-16 12:01:59 +01:00
Jon Shallow dbf78b526f block.h: Make COAP_OPT_BLOCK_* functions safe against NULL indirects
COAP_OPT_BLOCK_LAST(opt) may return NULL, so doing *COAP_OPT_BLOCK_LAST(opt)
is unsafe. Replace indirect with COAP_OPT_BLOCK_END_BYTE(opt).
2023-05-11 09:00:53 +01:00
Jon Shallow 4ef0705ccd block.c: Handle missing / incorrect SIZE1 and SIZE2 options 2023-05-11 08:59:59 +01:00
Jon Shallow 6cd7b7883c coap_io.c: Clean up coap_win_error_to_errno() usage 2023-05-11 08:59:04 +01:00
Jon Shallow a40ffc722c CMakeLists.txt: Set compiler options for both the library and examples
Fix some reported Windows errors now that "treat all warnings as errors" is
correctly set in the github workflows.
2023-05-11 08:57:48 +01:00
Jon Shallow 9d66e47241 coap_debug.c: Split out coap_print_ip_addr() from coap_print_addr()
Sometimes just the IP address is required, not the port as well.
2023-05-05 12:00:33 +01:00