Commit Graph
28 Commits
Author SHA1 Message Date
Olaf Bergmann 82223d8a26 Merge branch 'master' of ssh://git.code.sf.net/p/libcoap/code 2014-06-19 15:24:00 +02:00
Olaf Bergmann 978577c686 Use a generalized iterator to walk through resources. 2014-06-18 18:28:57 +02:00
Olaf Bergmann d5dc48d97a Track local network interface for received packets.
Changed various functions to pass the local interface using the
new coap_endpoint_t abstraction. This change uses the functions
implemented earlier in commit 786ca6da (branch dcaf) but does not
use callback functions for network I/O.

This change closes bug #23 "server responds from wrong endpoint
(ipv6 address)" (POSIX only, CONTIKI and LWIP tbd).
2014-03-21 18:12:40 +01:00
Olaf Bergmann 909cccd05d Support for response code 7.31 to cancel observation relationships.
This new behavior is described in Section 4.6 of draft-ietf-core-observe-12.
The idea is to send a response with code 7.31 and the token to identify
the subscription.
2014-02-25 19:00:10 +01:00
Olaf Bergmann 660deefe73 Support for block-wise transfer of /.well-known/core. 2014-02-04 17:56:31 +01:00
Olaf Bergmann 591aa06783 Support for partial output of .well-known/core
This change provides basic support for block-wise transfer of resource
descriptions. print_wellknown() now takes an additional parameter that
specifies the offset in the resource description where output shall start.
coap_print_link() has been modified to truncate resource descriptions that
do not fit in the given buffer (instead of failing with an error code as
was the case before).
2014-01-07 17:33:49 +01:00
chrysn c23d681036 allocate the coap context in the lwip memory pools 2013-11-17 16:45:30 +01:00
chrysn c5f88316e1 allow having a resource list instead of a hash
this brings O(n) lookup time for resources, but allows removing dynamic
memory management
2013-11-17 16:28:27 +01:00
chrysn 42296f73f5 introduce partiallydirty resources and dirty subscriptions
this change spreads the concept of "dirty" from resources to
subscriptions. this allows queuing up notifications in case not all of
them can be transmitted at the same time (which can happen due to
constraints in pdu or node space).

when a dirty resource's notifications can not be sent, the resource is
marked as partiallydirty, and on the subscriptions that could not be
sent out, the dirty flag is set. they get cleared later when
coap_notify_observers gets run again, as it not only looks for dirty,
but also for partiallydirty resources.

note that there is currently no facility that prevents that all the
nodes get assigned to the send queue, leaving no room for receiving
packages (which happens in mass notifications, blocks all incoming
packages and is only resolved by the transmissions timing out). my
current test setup always leaves at least one node free for reception by
over-allocating and freeing a node on sending.
2013-11-17 16:05:35 +01:00
Olaf Bergmann accc094785 notifications and observer removal according to draft-ietf-core-observe-09 2013-07-23 17:33:03 +02:00
Olaf Bergmann 54ef9fd83c Klaus-encoding and option iterators 2013-01-18 16:44:19 +01:00
Thomas Pötsch f64a8390e7 fixed typo in coap_resource_t 2012-08-29 11:43:49 +02:00
Olaf Bergmann 799edd524c bugfix: Memory leaks in rd.c - ID: 3542467 (patch from John Sucaet) 2012-07-17 14:44:10 +02:00
Olaf Bergmann 44ea7c58ba attribute filters for /.well-known/core 2012-03-21 16:40:59 +01:00
Olaf Bergmann f9e733f65d missing definitions for non-contiki platforms 2012-03-07 20:15:48 +01:00
Olaf Bergmann 0b2713d4d4 subscriptions are identified by observers' transport addresses and tokens 2012-01-19 14:18:22 +01:00
Olaf Bergmann 5f4209e04b observe 2012-01-13 18:43:38 +01:00
Olaf Bergmann cc116c3b5f API change to allow for post-processing of responses in handle_request().
A pre-defined response is passed as parameter to registered method handlers.
This change was required specifically to use method handlers to generate
observer-notifications.
2012-01-06 16:55:49 +01:00
Olaf Bergmann d1e394bec8 functions required for coap-observe 2012-01-06 15:28:49 +01:00
Olaf Bergmann 1078486518 get rid of uthash and use Contiki's static memory blocks 2011-12-11 20:11:11 +01:00
Olaf Bergmann fae51d1cc9 cleaned debug stuff 2011-12-11 15:57:24 +01:00
Olaf Bergmann 76271e1cbf fixed type conversions (thanks to Philippe Valembois for pointing this out) 2011-11-02 17:20:50 +01:00
Olaf Bergmann 8dcaf0f917 More support for asynchronous transactions ('separate responses') 2011-06-23 18:49:09 +02:00
Olaf Bergmann 60d68d7d62 fixed data pointer in coap_read()
some minor bugfixes
example for separate responses (server side only)
2011-06-22 18:07:50 +02:00
Olaf Bergmann 29be26b536 Response handling 2011-06-16 18:23:09 +02:00
Olaf Bergmann 15fd4ec0de Started to replace subscribe by generic async support. 2011-06-13 19:01:52 +02:00
Olaf Bergmann 904aa3b2d0 Put definition of coap_key_t and helper functions in extra file. 2011-06-11 14:10:38 +02:00
Olaf Bergmann 6fd54aacf7 Changed resource definition to support hash tables.
Use byte-array as hash key.
Added method handlers for GET,PUT,POST,DELETE to resource definition.
2011-06-10 17:56:14 +02:00