Commit Graph
1092 Commits
Author SHA1 Message Date
jcmichelou d89c99f5f8 uri: Add coap+tcp:// and coaps+tcp:// schemes. 2017-10-21 16:52:02 +02:00
jcmichelou 8923d4de50 openssl: TLS session can be connected both on read and write. 2017-10-21 16:34:18 +02:00
jcmichelou 75d89ab295 openssl, io: Fix linux compatibility 2017-10-21 16:11:16 +02:00
jcmichelou e901714c74 net.c: Call nack handler for all transports. 2017-10-21 16:11:16 +02:00
jcmichelou fa52273f59 coap_session.c: Remove observers and delete TLS object on disconnect. 2017-10-21 16:11:15 +02:00
jcmichelou cd804ba3bf client.c: Make observation timeout work with TCP. 2017-10-21 16:11:15 +02:00
jcmichelou e713e77f54 notls, tinydtls: Add stubs for unused TLS functions. 2017-10-21 16:11:15 +02:00
jcmichelou 854cc3147f openssl, session: Add TLS encryption. 2017-10-21 16:11:14 +02:00
jcmichelou 9bb8396b23 coap_session, net.c: Add debug messages on TCP RX/TX. 2017-10-21 16:11:14 +02:00
jcmichelou 6bf4856e4c net.c: buffer socket I/O for performance. 2017-10-21 16:11:14 +02:00
jcmichelou 58766a137e coap_dtls.h, openssl: Add function prototypes for TLS support. 2017-10-21 16:11:13 +02:00
jcmichelou 140580f0df session, pdu, option: Use exact message size calculation for TCP PDU. 2017-10-21 16:11:13 +02:00
jcmichelou f81cb43fd3 session, pdu: Enforce maximum message size. 2017-10-21 16:11:12 +02:00
jcmichelou c592c9d11f session, net, debug: Add TCP signaling messages. 2017-10-21 16:11:12 +02:00
jcmichelou dfff930805 io, net: Add TCP accept/connect/read/write 2017-10-21 16:11:12 +02:00
jcmichelou bcfd7a0753 pdu: add support for TCP-style headers
Make coap_pdu-t independent of the header style.
Use C99 sized types when applicable.
Use transaction ids in host byte order in the library.
Make coap_pdu_t payload storage grow on demand.
Add parsing and encoding of PDUs with UDP or TCP style headers.
Adapt examples and unit tests to the new PDU format.
2017-10-21 16:11:11 +02:00
Olaf Bergmann 95a97c349e Dockerfile: use pre-built image and cleanup unused packets 2017-10-16 18:02:01 +02:00
Olaf Bergmann bea82fef30 build.sh: disable documentation to speedup continuous integration 2017-10-16 17:53:00 +02:00
Olaf Bergmann ca3a88c5e4 Dockerfile: added packages for documentation, exuberant-ctags 2017-10-16 14:44:24 +02:00
Olaf Bergmann 2d987aee39 Dockerfile: added missing packages for documentation build process 2017-10-16 14:19:44 +02:00
Olaf Bergmann f9d7507431 .travis.yml: invoke docker with build script 2017-10-16 14:13:31 +02:00
Olaf Bergmann 9db50812d2 .travis.yml: changed travis configuration to use docker 2017-10-16 13:49:07 +02:00
Olaf Bergmann dcfef0a615 Dockerfile: added Dockerfile for travis continuous integration 2017-10-16 13:48:32 +02:00
Olaf Bergmann ff84892817 .gitignore: added TAGS file to ignored files 2017-10-06 09:50:45 +02:00
Olaf Bergmann 073016ebea coap_io.c: fix time propagation when removing node from sendqueue
PR #100 has fixed the propagation of elapsed time in coap_pop_next()
which affects the next node in the respective send queue. This fix
is also required for platform POSIX.
2017-10-06 09:46:56 +02:00
obgm 6ee35e4a37 Merge pull request #100 from Trilliant/Trilliant/feature/fixLwipRelativeTimeOnExpiration
Set relative time 't' to zero when it actually expire
2017-10-05 17:21:47 +02:00
obgm c1254c1be8 Merge pull request #111 from spinetix/build-fixes
Assorted build fixes
2017-09-21 12:48:10 +02:00
Olaf Bergmann 89c617ad46 .travis.yml: temporarily switch off contiki and lwip
As the current develop head does not support the recent API
changes, the platforms Contiki and LwIP cannot be built properly
by Travis (see https://travis-ci.org/obgm/libcoap/). Until this
has been fixed, these platforms are disabled.
2017-09-20 11:18:49 +02:00
Diego Santa Cruz cfb9575e01 libcoap-1.pc.in: do not unnecessarily expose DTLS libs to users
The SSL lib used to implement DTLS is only used internally
by libcoap, so it is not necessary and sometimes harmful to
expose it via the pkg-config file. Only when doing static
linking is it necessary to link the SSL lib, this is done
via the "Libs.private: pkg-config directive.
2017-09-20 10:57:46 +02:00
Diego Santa Cruz fde93fca90 configure.ac: fix linker version script detection
The detection of linker's support for version scripts fails
when building outside the source tree due to missing source
path to the linker script.
2017-09-20 10:54:02 +02:00
Diego Santa Cruz 9b12571804 Makefile.am: fix building outside of source tree
When building outside the source tree compilation fails on
examples, because the libcoap headers expect to be all in the
same directory but coap.h is generated under the build
directory, so it is necessary to add an extra include path
for it.

Also, build directories should always appear before source
directories in the include path, so that any leftover
generated files in the source tree are ignored.
2017-09-20 10:48:54 +02:00
obgm 91663e9510 Merge pull request #110 from cladmi/pr/unused_parameter_warning
Unused parameter warning
2017-09-12 17:23:37 +02:00
cladmi 57a3b59060 coap-server: fix unused 'request' parameter 2017-09-12 15:48:58 +02:00
cladmi 5bfea5fdd2 coap_session: fix unused 'reason' parameter 2017-09-12 15:48:46 +02:00
Olaf Bergmann 9e7c520a93 libcoap-1.{sym,map}: updated map files to include new functions
PR #106, #107, and #108 have introduced new functions. This change
updates the .map and .sym files to include the additional symbols.
2017-09-09 01:24:45 +02:00
obgm 8a30adefa5 Merge pull request #108 from spinetix/log-handler
Add a log handler callback.
2017-09-09 01:22:13 +02:00
obgm abddc07559 Merge pull request #107 from spinetix/handler-lost-con
Add handler for lost CON messages.
2017-09-09 01:21:32 +02:00
obgm 746cd397a6 Merge pull request #106 from spinetix/observe-with-query-string
Query string dependent observe.
2017-09-09 01:20:51 +02:00
jcmichelou d89159fdb4 debug.[hc]: Add a log handler callback. 2017-09-08 20:12:39 +02:00
jcmichelou 25732fc8e6 coap_session.[ch], net.c: Add handler for lost CON messages.
Add a slot for storing application-specifc data in session object.
Make the library resilient against client session released in a callback.
2017-09-08 20:02:22 +02:00
jcmichelou 30619691e2 resource.[ch], uri.c[ch]: Query string dependent observe.
Remember the query string used during the observe request and pass it to the resource handler.
Support partial notification of observers based on the query string.
2017-09-08 19:50:34 +02:00
Olaf Bergmann 1d5ecb3690 .travis.yml: use default dist (= trusty)
As described in [1], trusty now is the default distribution for
travis-ci, so the explicit "dist: trusty" can be removed.

[1] https://blog.travis-ci.com/2017-08-31-trusty-as-default-status
2017-09-07 12:43:25 +02:00
Olaf Bergmann 4dd5e0c19d .travis.yml: add branch travis-test to build list 2017-09-07 12:43:12 +02:00
Olaf Bergmann 00338ff502 async.c: fixed signature of dummy functions
The signature of several dummy functions that are defined to make
compilers happy that complain on empty modules was not standards
compliant. To avoid related compiler warnings, the formal argument
list of this function now is explicitly declared as void.
2017-09-05 17:18:29 +02:00
Olaf Bergmann 8ad4abb6d8 coap_notls.c: fix compiler warning regarding unused parameter 2017-08-31 15:41:43 +02:00
Olaf Bergmann ced706e66d .travis.yml: added flag for TLS library selection
The environment variable TLS now controls the DTLS-specific configuration
options. The following values are defined:

  no       turn off DTLS support
  openssl  use OpenSSL library
  gnutls   use GnuTLS library
  tinydtls use tinydtls library

Any other value will be mapped to gnutls which is the default.
2017-08-31 14:01:26 +02:00
Olaf Bergmann d4bb044afa Merge commit 'ea58f259d' into develop 2017-08-31 13:32:20 +02:00
Olaf Bergmann 0145710670 option.c: split comment to fall through to quiet compiler warning
Shut up warning from -Wimplicit-fallthrough by placing "fall through"
in comment on its one line.
2017-08-31 13:21:29 +02:00
Olaf Bergmann 3feee38045 uthash.h: fix compiler warning for missing default case in switch statement
Added a no-op default case to switch statement in macro HASH_JEN in order
to fix compiler warning.
2017-08-31 13:14:01 +02:00
Olaf Bergmann 318eec25b5 async.c: included macro SEARCH_PAIR from commit 5b1a8f67
Commit 5b1a8f67 added two macros LL_SEARCH_PAIR and LL_SEARCH_PAIR2
to utlist.h which is maintained at [1]. To simplify updates of this
file, the macros have been moved into async.c as this is the only
place where they are used. To avoid confusion with linked list macros
from utlist.h, the prefix "LL_" has been removed from the custom
macros.

[1] https://github.com/troydhanson/uthash
2017-08-31 13:06:17 +02:00