Move coap_session_t and coap_addr_hash_t to coap_session_internal.h.
Move internal session based function definitions to coap_session_internal.h.
Replace most references to "struct coap_session_t" with "coap_session_t".
Provide new functions to allow applications to access parts of coap_session_t
as appropriate and document these functions.
Update examples to use these new access functions where appropriate.
For the man documentation, move the client session setup functions to (new)
coap_endpoint_client(3) and update coap_session(3) with all the session access
functions as these are common to both the client and server.
[coap_endpoint_server(3) will be created when coap_context_t is obfuscated.]
Make the old installed libcoap-2.{so,la,a,pc} libcoap-2-notls.{so,la,a,pc}, and
make the installed libcoap-2.{so,la,a,pc} be a set of soft links to installed
libcoap-2.{tlstype}.{so,la,a,pc}.
Thus installed libcoap-2.{so,la,a,pc} will be based on the latest (D)TLS
library build.
Update the linking documentation.
src/coap_tinydtls.c:
Replace UNUSED with COAP_UNUSED that got missed from a merge.
man/examples-code-check.c:
src/pdu.c:
tests/oss-fuzz/pdu_parse_target.c:
Fix trailing white space.
win32/libcoap.vcxproj:
win32/testdriver/testdriver.vcxproj:
Correct include/coap2 paths.
CoAP transaction id was formerly defined as a hash of the remote address and
message id of the CoAP PDU. It now only refers to, and is used as, the
message id.
Replace occurences of 'transaction id' with 'message id' to reflect naming in
RFC7252.
Correct the definition of coap_tid_t to what it actually represents.
Replace occurrences of coap_tid_t with coap_mid_t.
Replace uses of tid with mid
Remove unused function coap_find_transaction().
.github/workflows/main.yml:
Build all the cmake TLS variants.
CMakeLists.txt:
Add in missing file.
examples/tiny.c:
include/coap2/encode.h:
Move COAP_PSEUDOFP_ENCODE_8_4 functions from encode.h to tiny.c.
Fix COAP_PSEUDOFP_ENCODE_8_4_DOWN 'ls' ordering complaint.
man/examples-code-check.c:
Fix compile warning, allow 'Unused but set variables' in examples and set
-Werror when compling the examples.
examples/lwip/Makefile:
Remove compilation option -fpack-struct
See https://sourceforge.net/p/libcoap/mailman/message/37039434/
Works for
Computer: Windows 10 64 bit & CYGWIN_NT-10.0 x86_64
Cygwin: 3.1.5-1
OpenSSL: 1.1.1g
gcc:9.3.0
and gcc-10.2.0 + openssl1.1.1f
configure.ac:
Support cygwin build environment. If so, set -D_CYGWIN_ENV in CFLAGS.
libtool: warning: undefined symbols not allowed in x86_64-pc-cygwin shared libraries; building static only
still to be fixed.
.gitignore:
Ignore *.exe filenames
src/coap_io.c:
define ipi_spec_dst as ipi_addr if _CYGWIN_ENV
examples/client.c:
examples/coap-rd.c:
examples/coap-server.c:
examples/etsi_iot_01.c
man/examples-code-check.c:
src/coap_io.c:
src/coap_tcp.c:
Fix compiler warnings.
sizeof(socklen_t) != sizeof(size_t) [-Wsign-compare]
isdigit() etc. complain about byte size array subscripts [-Wchar-subscripts]
snprintf size checks [-Wformat-truncation=]
Update
There needs to be an easy way to validate that the examples provided in the
man pages compile without errors.
This PR provides a new executable examples-code-check that can be run against
the .txt.in files that are in the man directory. It abstracts the code for
each example and then runs the compiler against that stub code reporting errors
and warnings as appropriate for subsequent fixing in the man page.
.gitignore:
Ignore the new executable and the files it generates.
Makefile.am:
configure.ac:
Remove MAN_DIR and hard code in the man directory so that examples-code-check
is always built.
autogen.sh:
Make sure that all the temporary stub code files are cleaned up.
man/Makefile.am:
Support building and clean-up of the new examples-code-check.
man/examples-code-check.c: (new)
The code that parses the man pages, looking for examples and the gets
the examples compiled, testing for errors.
The function definitions in the SYNOPSIS section are also included in the
compilation of the examples.
scripts/build.sh:
If WITH_TESTS is set, check that the man page examples compile.
man/coap_encryption.txt.in:
man/coap_io.txt.in:
man/coap_observe.txt.in:
man/coap_pdu_setup.txt.in:
man/coap_resource.txt.in:
man/coap_session.txt.in:
Correct the SYNOPSIS function definitions.