Commit Graph
15 Commits
Author SHA1 Message Date
Jon Shallow c695dea7cd New coap_logging(3) and updated Doxygen comments for logging
Documentation changes/updates only - no code changes.

configure.ac
include/coap/coap_dtls.h
include/coap/coap_session.h
include/coap/debug.h
man/Makefile.am
man/coap.txt.in
man/coap_context.txt.in
man/coap_logging.txt.in (new)
2018-07-25 09:48:02 +01:00
Jon Shallow 0355821afe {coap_dtls|net}.h: New coap_context_set_pki_root_cas(), updated coap_dtls_pki_t
coap_context_set_pki_root_cas(): New
coap_dtls_context_set_psk(): remove unused parameters, add in server parameter
coap_dtls_context_set_pki(): add in server parameter

coap_dtls_pki_t: Additional configuration parameters
coap_dtls_security_setup_t: Updated
coap_dtls_cn_callback_t: New
coap_dtls_sni_callback_t: New
coap_pki_key_t: New
coap_pki_key_pem_t: New
coap_pki_key_asn1_t: New
coap_dtls_sni_t: New

Comments tidy up.

Better Doxygen comments for coap_dtls.h and net.h

Doxygen fix for debug.h (introduced by #219 merge)
Doxygen update coap_endpoint_new_dtls_session() for in coap_session.h
2018-07-23 11:14:22 +01:00
Jon Shallow fd421dd119 debug.c: Make coap_show_pdu() use coap_log() or fprintf()
coap_show_pdu()'s API is now coap_show_pdu(coap_log_t, coap_pdu_t*)
New function void coap_set_show_pdu_output(int use_fprintf)
Default is use fprintf() instead of coap_log()

The output buffer size can be configuring -DCOAP_DEBUG_BUF_SIZE

Output COAP_OPTION_SIZE2 option as well

For binary data, output ascii readable equivalent immediately under the
hex output for ease of debugging.

include/coap/debug.h
src/debug.c

Update coap_show_pdu() API
New function coap_set_show_pdu_output()
Update coap_show_pdu() code

include/coap/pdu.h

Define the coap debug output debug buffer size
COAP_DEBUG_BUF_SIZE

examples/client.c
examples/contiki/coap-observer.c
src/net.c
tests/test_wellknown.c
tests/test_pdu.c

Update coap_show_pdu() calls

libcoap-2.map
libcoap-2.sym

New function coap_set_show_pdu_output()
2018-07-20 18:58:55 +01:00
Jon Shallow ece443f107 include/coap/debug.h: Fix compiler optimizer warning 2018-05-17 18:45:26 +01:00
Jon Shallow 93c8471233 debug.h: Add in parameter format checking to coap_log_impl() for GNUC
For GNUC. make the function

void coap_log_impl(coap_log_t level,
               const char *format, ...) __attribute__ ((format(printf, 2, 3)));
2018-02-12 15:28:24 +00:00
jcmichelou d89159fdb4 debug.[hc]: Add a log handler callback. 2017-09-08 20:12:39 +02:00
jcmichelou 7fb4ace2b7 Fix for the signedness warning with gcc.
Compact coap_address_t.
Use coap_queue_t for all queues.
OpenSSL warning for close alert should be info level.
Fix OpenSSL log level not working.
Use the application defined MTU in OpenSSL.
coap_log() optimization to avoid generating the log message text before testing the log level.
coap_can_exit() should check the new retransmit queues.
Fix retransmit time sometimes not correctly computed relative to sendqueue_basetime.
Add coap_write() API call for applications with their own main loop.
2017-06-29 18:12:46 +02:00
jcmichelou 9490a0c8ab Fix bug in setting the OpenSSL log level make its use consistent with tinydtls
Rename session.c and session.h to coap_session.c and coap_session.h
Use length to PSK hint and identity
Improve packet loss testing
2017-06-22 16:02:03 +02:00
jcmichelou adf1238eae Add DTLS retransmit and recovery.
Add lossy networks debug option in examples.
2017-06-21 20:40:15 +02:00
jcmichelou ba68ba85c0 Do not make exported symbols different between release and debug builds, this breaks the ABI of the DLL.
Do not make reference to NDEBUG in public headers to modify the ABI. This macro is defined automatically in all windows projects and will create a lot of confusion.
2017-05-07 18:18:33 +02:00
Lucien Guimier edf42a6a53 Add missing LOG_ERR log level
The fallback used when <syslog.h> is not available was missing the error level.
2016-07-17 13:56:27 +02:00
Carsten Schoenert 0e59edc231 i/c/*.h: more public header cleanup
Resume the cleaning of the public header files, no functional changes.

Reformatting the infos in the head of the header files, restructure header
inclusion check to be more generic. Reorder some include directives in a
alphabetical order. Remove including instructions for C++ stuff, it's
already done in the coap.h header, and the user only has to include this
header file.

Dropping the prefixing of the include guarding of uthash.h because it would
cause trouble with the macro handling in TinyDLS.
Thanks Olaf for reminding this!
2016-01-10 17:49:07 +01:00
Carsten Schoenert ea9c1cbedb i/c/*.h: remove references to coap_config.h
The public header doesn't have to include a local dynamically created
header file from the autotools. This would break the usability of the
public header files.
2015-07-04 19:35:02 +02:00
Carsten Schoenert 62ddbd232c i/c/debug.h: whitespace cleanup, reformatting, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 16:01:34 +02:00
Carsten Schoenert fc9b47167a moving library related files to new folders
In preparation for changing the make buildsystem to a fully autotools
controlled system moving the core libcoap source files to a better logical
place.

All the library related header files moving to include/coap/ to get
all the public and local header files in a separate place. Also moving
the C source files of the libcoap library to the folder src/.
2015-03-03 19:21:43 +01:00