./autogen.sh and ./configure no longer need to be run prior to running
make for Contiki, LwIP or RIOT from the appropriate examples sub-directory.
scripts/fix_version.sh now handles updating coap.h for the different
LIBCOAP_ and PACKAGE_ definitions.
'make distclean' removes header files built from the .in files, which
means that they are not available for different OS builds.
The same is true for CMakeLists.txt.
Remove the need for the .in files and update for libcoap revisions
by using a new script scripts/fix_version.sh created from
scripts/fix_version.sh.in.
CI has been updated to check revisions have been updated in the
appropriate places.
Do not remove libcoap-3.sym and libcoap-3.map when doing 'make distclean'
as they are git tracked files.
The dtls versions of the server and client are built as
server-dtls and client-dtls.
Add in flexible option support for server and client. These are
a subset of the coap-server and coap-client options.
New demo client app.
Update some of the memory sizes.
New coap_lwip_dump_memory_pools() to dump LwIP memory pool usage.
Add in logic to handle new client sessions.
New coap_io_process() to handle LwIP which can invoke a callback handler
to wait / timeout for the next input handler.
New coap_lwip_set_input_wait_handler() to define this handler.
Update coap_io_prepare_io() to handle LwIP.
Support re-use of pbuf for PDU re-transmissions.
Make sure that NSTART is correctly obeyed.
Build the client with client only libcoap code.
Build the server with server only libcoap code.
Update LwIP source to latest stable release.
Reserve memory for a response PDU.
New coap_lwip(3) man page.
Update directory structures for config files.
Update files contained in "make dist" and check lwip rebuilds
in the github workflows.
The provided host for windows-latest is migrating across from
windows-2019 to windows-2022 on github. This allows things to be built on
a windows-2022 system.
Fix API version in files generated from man/examples-code-check.c.
Call autoreconf after updating configure.ac to ensure configure is
re-run the next time make is executed.
This script is called from the package's top directory to adjust
all places where the current API version is hard-coded. The
current version is detected from the LIBCOAP_API_VERSION in
configure.ac. The target version is LIBCOAP_API_VERSION + 1 if no
parameter is provided on the command line. Otherwise, the given
value is used as target version.
Note that calling this script also results in 'git mv' operations.
git commit must be called manually after running this script.
.github/workflows/main.yml:
Do a 'make check' for matrix builds.
Move documentation into separate job to reduce matrix build times
Add in CMake job.
Add in distribution job.
Add in tinydtls job.
Add in contiki/lwip job.
scripts/github_dist.sh:
Do the distribution checks using a script.
examples/etsi_iot_01.c:
examples/tiny.c:
Fix include coap.h directory in old examples.
README.md:
Update status badges to get only the branch actions and remove CMake
status badge.
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.
* Passing EPOLL=no disables the epoll interface usage. Other values
default to yes, i.e. epoll is used if available.
* Passing SMALL_STACK=yes enables some values stored in static
variables instead pushing on the stack. This usually requires
mutex support in the operating system.
Issue introduced by OpenSSL 1.1.1c causes valgrind errors to be reported. See
https://www.mail-archive.com/openssl-commits@openssl.org/msg21701.html and
https://github.com/openssl/openssl/pull/8606 which did not make 1.1.1c
scripts/build.sh:
tests/valgrind_suppression:
Temporarily suppress valgrind errors when SSL_CTS_new() is called when running
the tests.
Note: This suppression will also need to be applied when running valgrind
against other CoAP executables using OpenSSL 1.1.1c to prevent the valgrind
errors getting reported.
src/coap_openssl.c:
memset cookie_secret to 0 to stop valgrind warning.
When building tinydtls version, Travis fails with the following error
tests/testdriver: error while loading shared libraries: libtinydtls.so:
cannot open shared object file: No such file or directory
The new version of TinyDTLS now builds a libtinydtls.so file which is
linked against in preference to libtinydtls.a when using -ltinydtls,
but Travis does not have an installed version libtinydtls.so to load
during execution of tests/testbriver - hence failure.
scripts/build.sh:
Add in LD_LIBRARY_PATH=ext/tinydtls if building tinydtls.
BUILDING:
configure.ac:
With libtinydtls.so being available, there is no need to enforce
--disable-shared for tinydtls. Remove this requirement.
If --disable-shared is set, link in with libtinydtls.a.
.travis.yml
Add in the gnutls build.
build-env/Dockerfile.build-env
build-env/Dockerfile.develop
Add in libgnutls28-dev to the apt-get list.
scripts/build.sh
scripts/dist.sh
Support TLS set to gnutls for building.
This script creates a libcoap archive, unpacks it and does an
out-of-tree build and installation afterwards. The environment
variables PLATFORM, TESTS, TLS and DOCS control the build
configuration. Suggested invocation from travis CI is:
PLATFORM=posix TESTS=yes TLS=no DOCS=yes scripts/dist.sh
If the environment variable DOCS is set to yes, --enable-documentation
will be set during configure, --disable-documentation otherwise (the
previous default).
Update code to use new APIs
[Some code changes modelled on PR #202, some code being moved between files]
Remove #ifdef WITH_LWIP from coap_io.c as file is not used
Add in resource time to lwip
Update for Travis build
Report on Contiki memory allocate failures to ease debugging
Make the different memory type counts configurable by using the -D option
included in a CFLAGS definition to the ./configure command line
.travis.yml
BUILDING
Makefile.libcoap
examples/contiki/Makefile
examples/contiki/README new
examples/contiki/server.c
examples/contiki/.gitignore (new)
examples/lwip/Makefile
examples/lwip/README
examples/lwip/lwipopts.h
examples/lwip/server-coap.c
examples/lwip/server.c
include/coap/address.h
include/coap/coap_io.h
include/coap/lwippools.h
include/coap/pdu.h
scripts/build.sh
src/address.c
src/coap_io.c
src/coap_io_lwip.c
src/coap_session.c
src/mem.c
src/net.c
src/pdu.c
build-env/Dockerfile.build-env
scripts/build.sh
Add in valgrind testing of the tests
src/option.c
Issue #199 Better fix of ADVANCE_OPT_CHECK()
src/pdu.c
Issue #214 Validate token length in coap_pdu_parse_header()
src/uri.c
Issue #212 Check not reading off end of buffer in dots()
tests/test_pdu.c
tests/test_uri.c
Tests updated to include tests for #212 & #214
The environment variable TLS now controls the DTLS-specific configuration
options. The following values are defined:
no turn off DTLS support
openssl use OpenSSL library
gnutls use GnuTLS library
tinydtls use tinydtls library
Any other value will be mapped to gnutls which is the default.
The Trusty build environment comes with a pkg-config file for CUnit
which lacks a version number and has a syntax error. The build script
now calls scripts/fix-cunit.sh to create a fixed version of the
existing cunit.pc file and point the configure script to this file.
The pkgconfig specification for libcunit1-dev version 2.1-2 is
horribly broken. build.sh (invoked by the travis CI system,
see .travis.yml) now runs a new script fix-cunit.sh when TESTS is
set to 'yes'.
The link step for the native lwip build fails on platforms that
use a glibc version prior 2.17. The reason is that librt is needed
for clock_gettime() in that environment. configure detects this
correctly but the lwip example comes with a simple hand-craftet
Makefile that does not use the configure results.
This quick hack checks for the output of the check for clock_gettime()
and includes the required libraries in order to fix the travis build.