Commit Graph
35 Commits
Author SHA1 Message Date
Olaf Bergmann 961b5e0719 fix compiler warning for strnlen()
strnlen() is used for formatting messages in debug.c. As strnlen() is
unknown in C99, the compiler emits a warning even if configure has
detected the presence of strnlen() in glibc and has set HAVE_STRNLEN
accordingly. To overcome this, the symbol _GNU_SOURCE now is set when
HAVE_STRNLEN and __GNUC__ are defined but not _GNU_SOURCE. This works
not only for glibc prior 2.10 but also for newer versions that conform
to POSIX.1-2008 (see strnlen(1)).
2015-02-18 13:18:18 +01:00
Olaf Bergmann c47d2fea3c renamed config.h to coap_config.h to avoid name clashes 2014-09-15 17:31:54 +02:00
Sebastian Sontberg c3e27870ac Fix old-style-definition warnings 2014-08-10 07:10:03 +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 68947e5e36 code cleanup for Contiki 2014-06-18 16:50:31 +02:00
Olaf Bergmann 122200d3fd Defined two functions that return the library name and version string. 2014-02-18 13:38:34 +01:00
Olaf Bergmann 3f69cd1e9b Use log levels from syslog.h when available.
Thanks to Dag Björklund for pointing this out.
2013-12-30 01:15:11 +01:00
chrysn 8fac6ed0fa introduce WITH_POSIX (as compared to WITH_COAP etc)
this will make reading the ifdefed sections easier.

as the typedef struct __coap_address_t {...}; /
define coap_address_t __coap_address_t trick is not needed any more to
detect whether a WITH defined coap_address_t or not, it was removed.
2013-11-17 16:32:09 +01:00
chrysn 6d28c3154e use htonl/ntohl/ntohs/htons from lwip
on bigger systems, you don't simply write endian.h
2013-11-17 16:30:10 +01:00
chrysn 00d73408dc porting required to get a minimal example to build with lwip stack 2013-11-17 16:30:09 +01:00
Olaf Bergmann 89acaa6775 bugfix: off-by-one error in coap_print_addr()
The closing ']' was misplaced, and the pointer not updated correctly. Thanks
to Andreas Bender for pointing this out.
2013-09-09 13:01:05 +02:00
Olaf Bergmann 14a5473396 Fixed output of IPv6 addresses with Contiki in coap_print_addr()
Addresses have been truncated and possibly had the wrong byte order. Thanks
to Andreas Bender for pointing this out.
2013-09-06 14:35:16 +02:00
Markus Becker 75acc0d03f Add token length to output of coap_show_pdu(). 2013-02-05 14:56:39 +01:00
Olaf Bergmann 8d8ad5c98a bugfix: iterate through options, pdu->data
Must use result of coap_option_next() instead of iterator members
to iterate through options.

pdu->data is empty when no payload is present.
2013-01-18 15:02:57 +01:00
Olaf Bergmann 3362f90b41 code cleanup 2013-01-15 16:49:31 +01:00
Olaf Bergmann c6412f2038 Rework of option parser to support "Klaus encoding" (coap-13), unit tests
The subdirectory "tests" now contains a growing set of unit tests for the
libcoap API. To use this, you will need CUnit (see http://cunit.sourceforge.net)
and must configure with the option --with-tests.
2013-01-07 17:37:49 +01:00
Markus Becker 6464da5f72 Also output the value for 0 length values. Improved output of option values. 2012-09-27 16:12:37 +02:00
Olaf Bergmann 2a749707e3 weaker search for strnlen() as it is not standard-C99 2012-03-08 13:23:37 +01:00
Olaf Bergmann 7503262aa9 some fixes for platform minimal-net 2012-01-06 15:27:48 +01:00
Olaf Bergmann 87dfe421d6 more Contiki handling 2011-12-23 17:19:11 +01:00
Olaf Bergmann d35be46e2d more special treatment for Contiki 2011-12-11 20:10:21 +01:00
Olaf Bergmann fae51d1cc9 cleaned debug stuff 2011-12-11 15:57:24 +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 76271e1cbf fixed type conversions (thanks to Philippe Valembois for pointing this out) 2011-11-02 17:20:50 +01:00
Olaf Bergmann a6fe6a30d3 fixed building for --without-debug
make coap_log re-definable
2011-06-23 18:47:58 +02:00
Olaf Bergmann e643c3256e Improved logging with various log levels 2011-06-22 11:05:46 +02:00
Olaf Bergmann 43dd1fce00 Added empty declaration to make ISO C compiler happy when building with -DNDEBUG 2011-06-17 11:24:42 +02:00
Olaf Bergmann 588d53c909 added coap_print_addr() for IPv4/IPv6 address output
minor changes to PDU output
2011-06-13 18:56:55 +02:00
Olaf Bergmann 134d0fd865 Better debug handling. 2011-06-13 02:26:44 +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 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 28df8ea36e flush stdout after debug output generation 2010-07-26 17:10:29 +02:00
Olaf Bergmann 05d9ebcc4e flush stdout after debug output generation 2010-07-26 16:18:40 +02:00
Olaf Bergmann 4ce4ae7fc6 added timestamp to debug output 2010-07-14 15:31:40 +02:00