Commit Graph
13 Commits
Author SHA1 Message Date
Olaf Bergmann 5a8c59e5aa Makefile.libcoap: rename debug.c to coap_debug.c for Contiki 2019-01-07 10:05:44 +01:00
Olaf Bergmann 7e9a7f8409 Makefile.libcoap: fix include path for Contiki example 2018-10-04 14:24:48 +02:00
Jon Shallow 469357b824 BLOCK option support in coap-server
hashkey.[ch] files restored (now prefixed with coap_)
LWIP and Contiki builds now include these files

block.[ch]:
New function coap_add_data_blocked_response() to simplify GET
responses and handle adding in BLOCK2 options as appropriate.
Needs coap_hash() to generate ETag option.

net.c:
Determine if Block2 is in use, and add to coap_add_observer().

resource.[ch]:
Include Block2 request in coap_add_observer().

subscribe.h:
Include Block2 definition in coap_subscriber_t for using during
observe responses.

pdu.h:
Update comment.

coap-client.c:
No longer causes duplicate calls to coap_show_pdu()
(one in library, one in coap-client for the same PDU).

If a block'ed response received and observing, now observing continues.
(Fixes #166).

Send Observe Cancel with Block2 option if -b defined

coap-server.c:
Replaced all option setting, data addition etc. with new
coap_add_data_blocked_response() function in the GET handlers.
(Fixes #246 Issue 2).

Support PUT with BLOCK1.
(Fixes #246 Issue 1).

Add in -N option to send observe responses as non-confirmable.

Handle small wait_ms values correctly (after being decremented) for testing
whether observe should be triggered or not.

Refresh time every second by making COAP_RESOURCE_CHECK_TIME 1

Manuals:
Add in new function coap_add_data_blocked_response()
Update coap_observe with coap_delete_observer(s) functions

Correct example typo and use new function in hnd_get_time().

Add in -N option to coap-server(5)

Be more specific about COAP_RESOURCE_FLAGS_NOTIFY_NON and
COAP_RESOURCE_FLAGS_NOTIFY_CON usage for observe.

Files:
Makefile.am
Makefile.libcoap
examples/client.c
examples/coap-server.c
examples/lwip/Makefile
include/coap/block.h
include/coap/coap_hashkey.h
include/coap/pdu.h
include/coap/resource.h
include/coap/subscribe.h
libcoap-2.map
libcoap-2.sym
man/Makefile.am
man/coap-server.txt.in
man/coap_handler.txt.in
man/coap_observe.txt.in
man/coap_pdu_setup.txt.in
man/coap_resource.txt.in
src/block.c
src/coap_hashkey.c
src/net.c
src/resource.c
2018-09-24 20:49:57 +01:00
Jon Shallow d766f9d8ee Update code to build LwIP and Contiki from the examples directory
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
2018-07-27 15:30:37 +01:00
Jon Shallow 60e07c4eed Makefile.libcoap: Remove -DCOAP_RESOURCES_NOHASH as no longer supported 2018-04-04 16:19:37 +01:00
jcmichelou 8353417afb Added session management with simpler DTLS lib API.
Added DTLS support with OpenSSL.
2017-06-18 20:09:47 +02:00
Olaf Bergmann f1b36046f2 Contiki: Make sure that COAP_RESOURCES_NOHASH is defined 2015-03-11 14:34:06 +01:00
Olaf Bergmann f1b8a48bfc Fix source path and include flag for Contiki build
As the libcoap sources have been moved to the sub-directory src it
must be added to the vpath. The header files now reside in include/coap,
so we need an additional -I compiler flag for this.

The root path for libcoap is derived from the variable APPDS which is
set by $(CONTIKI)/Makefile.include. This is a bit fragile but the best
we have...
2015-03-04 13:22:05 +01:00
Olaf Bergmann 4b249f3739 coap_list.c was moved to examples 2015-03-04 13:19:56 +01:00
Olaf Bergmann a1ec0371ff Implemented new network-I/O functions for Contiki 2014-09-15 14:30:05 +02:00
Olaf Bergmann 89186909da updated Changelog and Makefiles for new mem.c 2014-06-18 16:41:17 +02:00
Olaf Bergmann d1e394bec8 functions required for coap-observe 2012-01-06 15:28:49 +01:00
Olaf Bergmann dd04939e08 split Makefile
exclude debug output to save space
2011-12-11 15:46:27 +01:00