Commit Graph
507 Commits
Author SHA1 Message Date
Olaf Bergmann 5695e73cbe added client option -a
This option allows to bind the client's listen interface.
2015-02-14 20:32:54 +01:00
Olaf Bergmann 99108e82d9 fixed alignment bug in PDU memory 2014-11-05 23:47:18 +01:00
Olaf Bergmann 3807f9baaf re-define coap_log() for nice printf output 2014-11-05 23:46:33 +01:00
Olaf Bergmann 698ac9b95d apply MC1322X defines when CONTIKI_TARGET_ECONOTAG is set 2014-09-23 20:25:23 +02:00
Olaf Bergmann 8ac499548a fixed handling of COAP_PACKET in get_container() 2014-09-17 18:01:43 +02: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 a1ec0371ff Implemented new network-I/O functions for Contiki 2014-09-15 14:30:05 +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
Olaf Bergmann a763d73331 Merge commit 'bb9b01224212aa8e72032e397bfec762fcef8eea'
This merge fixes the bug in coap_str_hash() macro.
2014-09-03 12:37:26 +02:00
Olaf Bergmann ea270b0e60 bugfix: Block1 handling broken
This change contains a quick and dirty workaround for the following
bug that has been reported by Andrea Azzarà:

  "When sending a file with a POST to a CoAP server, such as

  ./coap-client -m post coap://vs0.inf.ethz.ch:5683/large-create/ -b 64
  -t 0 -f test

  the M bit is not correctly set to 1."
2014-08-27 18:44:52 +02:00
Sebastian Sontberg bb9b012242 Fix coap_str_hash macro
coap_str_hash called coap_hash() with wrong parameter ordering.
2014-08-15 17:41:16 +02:00
Sebastian Sontberg c3e27870ac Fix old-style-definition warnings 2014-08-10 07:10:03 +02:00
Olaf Bergmann 3552419496 even more strict-prototypes 2014-08-07 23:32:13 +02:00
Sebastian Sontberg 8ee0342809 Convert function declarations to strict-prototypes format 2014-08-05 01:31:05 +02:00
Olaf Bergmann 604ab76a1f Merge commit 'bb15767f4' 2014-07-24 23:45:13 +02:00
Olaf Bergmann 6b2ea692f1 enclose single debug() in block to avoid warning when build w/o debug code 2014-07-24 21:01:35 +02:00
Olaf Bergmann 8e55284de1 added media type 60 for application/cbor 2014-07-24 21:00:38 +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 690a3a552d updated README and license file
* renamed README to README.md
* reference RFC 7252 and coap.technology web site
* updated copyright date LICENSE.BSD
2014-07-06 19:23:37 +02:00
Olaf Bergmann 91a20eb67f fix request handler signature
Since the local_interface was added to the request handler callback,
the examples rd.c and etsi_iot_01.c were broken. This change fixes
rd.c and abandons etsi_iot_01.c (as it is very outdated).
2014-07-05 22:11:51 +02:00
Olaf Bergmann f769519ace fix transaction id generation
Incoming messages are matched to nodes in the retransmission
queue by comparing a hash value over (message id, port, ip addr).
For IPv4, the entire sockaddr_in structure was compared which
is potentially wrong (see merge request #7 from Dag Björklund).
Hopefully, this fixes the encountered issue.
2014-07-05 22:07:05 +02: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 f2e132df23 resolved conflict 2014-06-19 15:22:07 +02:00
Olaf Bergmann 1a0e4c7880 Merge branch 'master', commit '234cf4e07472433cd7748a7d3a35519ca15fba20' of git://git.code.sf.net/u/dbjorklu/libcoap_bugfix 2014-06-19 14:43:12 +02:00
Olaf Bergmann 143597a71d Improved logging function for Contiki.
Use vprintf() for log output when HAVE_VPRINTF is defined. Otherwise,
PRINTF will be used which does not work together with va_args.
2014-06-19 00:11:16 +02:00
Olaf Bergmann 77183cdc48 Use type tag in coap_free_type(). 2014-06-18 23:35:19 +02:00
Olaf Bergmann 6dcf3c7128 added header include for size_t 2014-06-18 18:52:25 +02:00
Olaf Bergmann 0f0169ee24 suppress gnu compiler warning on unused parameter 2014-06-18 18:51:59 +02:00
Olaf Bergmann c77c3cda32 fixed coap_iterator_next() to work on utlist structure. 2014-06-18 18:50:44 +02:00
Olaf Bergmann e90be63294 changed type of m and szx in coap_block_t back to unsigned int.
This is a partial revert of commit 4f6a7f5db to avoid compiler-specific
code.
2014-06-18 18:48:37 +02:00
Olaf Bergmann 4146735548 bugfix: use header format from coap-17 in hnd_get_time() 2014-06-18 18:31:50 +02:00
Olaf Bergmann 3d3e2a11d6 definitions for Contiki platform minimal-net 2014-06-18 18:30:13 +02:00
Olaf Bergmann 978577c686 Use a generalized iterator to walk through resources. 2014-06-18 18:28:57 +02:00
Olaf Bergmann 4882cc1caf added missing includes for debug.h and assert.h 2014-06-18 18:28:13 +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 68947e5e36 code cleanup for Contiki 2014-06-18 16:50:31 +02:00
Olaf Bergmann 4f6a7f5dbf Replaced bit field for data from block header by unsigned int.
Usually, the block number can grow to 20 bits which is not
guaranteed to fit in a single unsigned int. To avoid compilers
(especially msp430-gcc) complaining about the width of the used
bit field, the type for num has been changed to unsigned int
hence restricting the number of acceptable blocks to 65536 on
those platforms. (No bounds check is done yet.)

m and szx now share a uint8_t.
2014-06-18 16:43:32 +02:00
Olaf Bergmann ebc4eaccee quick fixes for Contiki platforms sky and wismote 2014-06-18 16:43:06 +02:00
Olaf Bergmann 302944cb76 bugfix: call coap_free() instead of free() 2014-06-18 16:41:49 +02:00
Olaf Bergmann 89186909da updated Changelog and Makefiles for new mem.c 2014-06-18 16:41:17 +02:00
Olaf Bergmann 0d78eab2e1 Some small additions for combined memory management.
Two new functions coap_malloc_type() and coap_free_type() have been
added to centralize the typed memory allocation for Contiki and LWIP.
Currently, calls to memb_alloc(), memp_malloc() and coap_malloc() are
distributed across several modules. The idea of the new functions is
to centralize memory management in one place (mem.c). coap_malloc()
and coap_free() are still available as wrappers for the new functions.
2014-06-18 16:30:07 +02:00
Maciej Wasilak 3d66bbb8e3 Fix message handler for client example
Fix 2 bugs in message handler:
- problem with sending confirmable next block requests
- problem with deleting pdu after sending
2014-06-17 18:33:05 +02:00
Olaf Bergmann 0dcbf38a20 drop received packet if it is not received on the correct interface 2014-06-12 01:19:58 +02:00
Olaf Bergmann 235bf72e90 added coap_address_isany() that checks if its argument denotes the ANY address 2014-06-12 01:19:45 +02:00
Olaf Bergmann 0bef51b86f Merge branch 'master' of git://git.code.sf.net/u/dbjorklu/libcoap_bugfix 2014-05-07 18:06:00 +02:00
Dag Björklund 234cf4e074 #ifdef POSIX changed to #ifdef WITH_POSIX (allows attribs to be freed) 2014-04-04 10:40:08 +03: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 fef3409508 Added coap_io.[hc] to Makefile 2014-03-20 13:01:20 +01:00
Olaf Bergmann d14de4703c Merged changes from commit 10eb1db6
This change enables the use of endpoints with specific properties such
as secure transmission.
2014-03-20 12:59:43 +01:00