Olaf Bergmann
1a28b3b6d9
Fixed retransmission timeout calculation
...
The retransmission timeout is more accurate now by using floating point
arithmetic.
For better readability, the parameter names from RFC 7252 are used.
2015-02-19 14:18:10 +01:00
Olaf Bergmann
ebb00c4dfe
Merge remote-tracking branch 'coap-lwip/chrysn-lwip-fixes' into develop
...
Conflicts:
coap_io.h
mem.h
net.c
pdu.c
2015-02-14 20:45:48 +01:00
chrysn
2680f038b0
lwip port: remove context struct members that are now in endpoint
2015-01-16 08:45:10 +01:00
chrysn
0ca090fbb6
make the internals of coap_packet_t private
...
they are now only accessed using helper functions, for a package looks
different in lwip.
in addition, the local_interface is now passed to coap_handle_message
not as an argument (because that would mean mixing different arguments
in the population of the node's local interface), but as a part of the
incoming package (as assigned in coap_network_read).
2015-01-15 13:33:35 +01:00
Olaf Bergmann
c47d2fea3c
renamed config.h to coap_config.h to avoid name clashes
2014-09-15 17:31:54 +02:00
Olaf Bergmann
f5fed78e59
Merge branch 'master' of robinson.informatik.uni-bremen.de:src/libcoap
2014-09-15 14:29:36 +02:00
Olaf Bergmann
cb9e24c010
Use coap_network_read() and coap_network_send() in Contiki
2014-09-15 11:05:56 +02:00
Sebastian Sontberg
8ee0342809
Convert function declarations to strict-prototypes format
2014-08-05 01:31:05 +02:00
Constantine Grantcharov
bb15767f4d
#if instead of #ifdef used in definition of struct coap_context_t
...
- replaced #if with #ifdef; compilation error gone.
2014-07-24 03:40:21 -04:00
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
e6047eddb2
More code cleanup for Contiki.
...
coap_cancel() now uses the new resource_iterator.
2014-06-18 18:26:41 +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
9e25cd26cb
merged with branch relative-timestamps
2014-02-05 15:08:37 +01:00
Olaf Bergmann
2d57017540
removed comment
2013-12-30 01:05:18 +01:00
Dag Björklund
07065b3d1f
adding extern C to make libcoap c++ compilable
...
Signed-off-by: Olaf Bergmann <bergmann@tzi.org >
2013-12-30 01:02:58 +01:00
chrysn
706fe27690
use lwip timers for retransmission in lwIP
2013-11-17 16:53:09 +01:00
chrysn
e74a4c1690
further use of WITH_POSIX
...
some contiki specific defines were eliminated by defining ntohs as
uip_ntohs in the contiki confiuration header file
2013-11-17 16:40:55 +01:00
chrysn
75116fe2b3
lwip for net.c
2013-11-17 16:30:09 +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
Olaf Bergmann
e1152dfd7c
added coap_adjust_basetime() to advance sendqueue_basetime
2013-11-10 11:51:38 +01:00
Olaf Bergmann
1df1ef5483
use relative timers in retransmission queue
...
This change addresses bug #27 "_order_timestamp can't handle time wraps".
t in struct coap_queue_t now is the time (in ticks) relative to the
previous entry in the queue. The first entry is relative to sendqueue_basetime
in struct coap_context_t (TODO: possibly make the first entry in the
queue relative to 0, eliding the need for sendqueue_basetime).
As no other ordering of nodes except for timestamps is used, the function
parameter for coap_insert_node() has been removed.
2013-11-06 22:17:31 +01:00
Olaf Bergmann
accc094785
notifications and observer removal according to draft-ietf-core-observe-09
2013-07-23 17:33:03 +02:00
Thomas Pötsch
fb657380c0
fix increment compiler warning
2012-09-19 16:18:01 +02:00
Olaf Bergmann
28a6d45cde
fixed bug #3524612 (Double free error when coap_send returns COAP_INVALID_TID)
...
From jsucaet's error description (Credits to Marc Haesen for revealing this bug):
The intent of the current code of coap_send is to release the allocated
memory upon success and not to release when an error has occured. However
this is broken (returning from coap_send with an error and a deallocated
pdu ptr is possible).
In the patch, I propose to let the calling function (of coap_send) be
responsible for free'ing the allocated pointer.
2012-05-29 19:41:22 +02:00
Olaf Bergmann
582e59f107
handling of long option lists
2012-03-20 18:47:46 +01:00
Olaf Bergmann
7235e1effc
generate ordered message ids
2012-03-10 16:02:24 +01:00
Olaf Bergmann
29ce30fa32
store local address to check if message was received via multicast
2012-01-20 16:12:29 +01:00
Olaf Bergmann
68167b10d0
response handlers must acknowledge confirmable messages themselves
...
This way, the application can decide for a separate response whether it
should be acknowledged or reset.
2012-01-20 15:04:48 +01:00
Olaf Bergmann
5f4209e04b
observe
2012-01-13 18:43:38 +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
2746d0f814
Initial version for Contiki-Server (target minimal-net or mbxxx)
2011-12-07 15:49:43 +01:00
Olaf Bergmann
f9bb22fb2b
externalized time handling
2011-12-06 21:22:38 +01:00
Olaf Bergmann
235dfa7e14
externalized prng
2011-12-06 20:08:21 +01:00
Olaf Bergmann
aba1cb8461
structure cleanup
2011-12-06 19:47:09 +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
84909e125c
Store resources in hash table (using uthash, http://uthash.sourceforge.net )
2011-06-10 17:59:45 +02:00
Olaf Bergmann
3358f2901d
Fixed license info.
...
Options iterator.
Address abstraction to allow IPv4 addresses.
more changes for draft-ietf-core-coap-06.
2011-06-02 02:43:59 +02:00
Olaf Bergmann
38429f7541
API change: Pass local interface address to coap_new_context.
...
Changed library numbering to better reflect API changes.
2011-01-10 16:59:45 +01:00
Olaf Bergmann
758b7f775e
Applied patches from Markus Becker (thanks!)
...
* 0001-Trailing-whitespace-cleanup.patch
* 0001-Went-back-to-2.65-of-autoconf.patch
* 0002-Fix-compiler-warning-for-str.patch
* added several files to Makefile target .gitignore
2010-11-22 13:01:00 +01:00
Olaf Bergmann
94cc2c4f42
added license information and general project information
2010-10-18 14:53:04 +02:00
Olaf Bergmann
70322a312b
net.c: remove subscriptions when RST was received
...
use length/value encoded strings in coap_uri_t
2010-07-22 18:07:15 +02:00
Olaf Bergmann
779b860909
more resource handling
...
GET responses
2010-07-14 19:13:11 +02:00
Olaf Bergmann
4fe0a6459f
coap_can_exit(): check if all data is dispatched
...
small fixes in ordering operators
2010-07-12 23:51:50 +02:00
Olaf Bergmann
b42028a4ee
bind server to configurable port
...
pick arbitrary port if none specified
2010-07-08 22:52:34 +02:00
Olaf Bergmann
cd38e27298
even more code cleanup
2010-07-04 21:03:11 +02:00
Olaf Bergmann
ca5cb93abf
transaction handling
...
added handling of incoming messages on "user layer"
some code cleanup
2010-07-04 20:48:57 +02:00
Olaf Bergmann
841ede849d
Updated header bits according to draft-ietf-core-coap-01pre5.
...
Basic support for sending, retransmissions.
2010-07-04 03:25:45 +02:00