Commit Graph
999 Commits
Author SHA1 Message Date
jcmichelou b2fe4a64de Make MTU configurable.
Use static or stack storage for coap_packet_t.
2017-06-26 17:34:01 +02:00
jcmichelou 6e97dbafcf Add facility for the removal of all queued messages and observations of a session. Apply it to client-side destination unreachable notification. 2017-06-24 17:10:50 +02:00
jcmichelou 596b9a15a8 Use correct errno code for ICMP destination unreachable 2017-06-24 16:26:14 +02:00
jcmichelou ca597b6986 Fix typo in coap_tindydtls 2017-06-24 16:21:28 +02:00
jcmichelou b159565774 Add check for ioctl header file. 2017-06-24 16:20:18 +02:00
jcmichelou 07abf8643b Add support for catching destination unreachable messages. 2017-06-24 15:43:34 +02:00
jcmichelou 5156e2b9a2 Handle all alert messages in OpenSSL. 2017-06-23 17:07:43 +02:00
jcmichelou d0974cacd5 A TLS fatal alert shall always disconnect the session. 2017-06-23 16:06:04 +02:00
jcmichelou 4d45219fe5 Add session expiration based on inactivity period and maximum number of idle sessions per endpoint.
Server sessions for which a close notify has been received are garbage collected immediately.
2017-06-22 19:13:20 +02:00
jcmichelou f6047c8e77 Fix gcc warning messages. 2017-06-22 16:13:38 +02:00
jcmichelou 0a0cd1fb4e Make retransmit timeout relative in tinydtls. 2017-06-22 16:06:11 +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 99925a1a97 Add init function for DTLS library.
Match dummy functions in coap_notls.c with their prototypes.
2017-06-21 20:57:12 +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 2197585f66 Add missing coap_openssl.c file in Makefile.am 2017-06-21 16:21:59 +02:00
jcmichelou 2f24ee8cdd Call dtls_close when session is closed to send a notify alert to the remote peer. 2017-06-21 15:45:02 +02:00
jcmichelou ae13e5127b Compile with tinydtls and remove warning message with gcc. 2017-06-19 20:37:11 +02:00
jcmichelou b389a5f6aa Add skeleton support for tinydtls with new API. 2017-06-19 16:58:12 +02:00
jcmichelou 8353417afb Added session management with simpler DTLS lib API.
Added DTLS support with OpenSSL.
2017-06-18 20:09:47 +02:00
jcmichelou 5b1a8f67bf Implement coap_session_t concept for POSIX. 2017-06-15 18:42:42 +02:00
jcmichelou b2ab881ad4 Fix the result of dtls branch merge so that all the examples work (DTLS support not enabled yet) 2017-06-13 14:38:30 +02:00
jcmichelou 1c79a4b977 Merge remote-tracking branch 'remotes/obgm/dtls' into dtls-dev with tinydtls support
# Conflicts:
#	Makefile.am
#	configure.ac
#	examples/client.c
#	examples/coap-rd.c
#	examples/coap-server.c
#	include/coap/address.h
#	include/coap/coap_io.h
#	include/coap/net.h
#	include/coap/prng.h
#	libcoap-1.map
#	libcoap-1.sym
#	src/net.c
#	src/platform/posix/coap_io.c
2017-06-12 17:26:25 +02:00
jcmichelou fdf3dabb0c Activate dual-stacked BSD socket logic on linux after validation. 2017-06-10 16:46:37 +02:00
jcmichelou 8d0223f21f Merge branch 'win32' of https://github.com/spinetix/libcoap into win32 2017-06-10 16:22:12 +02:00
jcmichelou 60dced7dfc Modify include path in visual studio project files to match changes in develop. 2017-06-10 16:20:13 +02:00
jcmichelou 78148d0c20 Merge develop into win32 2017-06-10 16:19:12 +02:00
Carsten Schoenert aafb87e50d configure.ac: fix broken ctags detection
While adding the freebsd platform into the supported build environments
the check for the needed ctags binary was modified
(aa7256a812), unfortunately the changes
made aren't correct and due this the target check_ctags in the toplevel
makefile was always assuming the correct ctags binary is around.

This was resulting in broken libcoap-1.{map,sym} files if 'make dist'
was called in case the user hasn't installed exuberant-ctags like ctags.
2017-06-06 15:38:36 +02:00
jcmichelou ae04e001aa Remove CUnit headers and prebuilt shared libraries. The testdriver project is no longer by default as part of the solution. 2017-06-03 16:07:29 +02:00
obgm cc49fbdc11 Merge pull request #88 from chanijjani/typo_fix
coap_io_lwip.c: fix typos in comments
2017-06-01 13:34:52 +02:00
Chanhee 69197feb15 coap_io_lwip.c: fix typos in comments
Few typos are fixed.
2017-06-01 19:58:35 +09:00
Olaf Bergmann bfca87cfb7 LICENSE: drop GPL as licensing options
From now on, the only licensing option for libcoap is BSD 2-Clause.
bsd-licensed
2017-06-01 12:51:20 +02:00
Olaf Bergmann 6d7ba61ae0 libcoap-1.pc: fix pkg-config include path
This change excludes the coap subdirectory from the include path
reported by pkg-config --cflags to avoid name conflicts with other
installed packages. Applications now must add the prefix 'coap/'
to include directives for libcoap header files, e.g.

  #include <coap/coap.h>

Jean-Claude Michelou has reported this problem in Bug #82 [1].

[1] https://github.com/obgm/libcoap/issues/82

A minimal Makefile now could look be written as:

  PKG_LIBCOAP=libcoap-1
  CPPFLAGS=$(shell pkg-config --cflags-only-I $(PKG_LIBCOAP)) -DWITH_POSIX
  LDFLAGS=$(shell pkg-config --libs-only-L $(PKG_LIBCOAP))
  LDLIBS=$(shell pkg-config --libs-only-l $(PKG_LIBCOAP))
2017-06-01 12:33:04 +02:00
Olaf Bergmann 0b3f31a1bb libcoap-1.{map,sym}: updated symbol map
This change adds the new symbol coap_flsll() introduced by
commit 9adc4eb6 to the shared symbol map.
2017-06-01 12:29:52 +02:00
Carsten Schoenert 0dafde8564 configure.ac: adjust the library vision +1
We are going into a new release cycle which will provide new so we need
new symbols and interfaces. Because of the new added symbols we need to
increase LT_LIBCOAP_CURRENT to '1'.
And we will be backward compatible and existing binaries linked against
the previous version will also working with that new planned library
release. To show this setting tune LT_LIBCOAP_AGE also to '1' as we are
now one version backward compatible.
2017-05-30 10:33:05 +02:00
Carsten Schoenert 90270db356 configure.ac: be more helpful on the libtool versioning
The versioning by libtool is sometimes a bit confusing and seems
complex. But it's really important to do a proper versioning of the
library.
Rephrase the part about how to check the needed versioning to be a bit
more informative how to do that.

Some more in deep explanation about the meaning of the libtool version
number can be found on:

* https://autotools.io/libtool/version.html
* http://www.informit.com/articles/article.aspx?p=19553
* https://developer.gnome.org/programming-guidelines/stable/versioning.html.en
2017-05-30 10:32:29 +02:00
Carsten Schoenert b432fa5f26 configure.ac: adding a release-state string
To do a more finely graduated versioning a extra new field for the
release-state is added. The purpose is mainly to add some extra
information about the development state of libcoap like a alpha state
right after a final release or marking the state as a release candidate
before a planned release.

Starting with a string 'alpha' as we are in a really early development
state for the upcoming release.
2017-05-30 10:31:25 +02:00
Carsten Schoenert 9aa7ee9d3a configure.ac: bumping version to 4.2.0
The next version will be 4.2.0 with some more new features and a license
change as well. More to come later.
2017-05-30 10:26:44 +02:00
jcmichelou 85ca4aab36 Fix size_t downcast to unsigned long warning. 2017-05-17 19:42:15 +02:00
jcmichelou fb2145094f Added x64 build of CUnit. 2017-05-17 19:31:56 +02:00
jcmichelou ab958ca586 Activate dual-stacked code first only on windows since on linux it is dependent on the version of the kernel. 2017-05-12 20:02:32 +02:00
jcmichelou 31026462cf Rename project files for coap-rd to coap-rd instead of coap-rp. 2017-05-12 19:54:22 +02:00
jcmichelou df86b746d6 Add configurations for x64 platform. Note that testdriver won't build unless you also have an x64 version of the CUnit library. 2017-05-12 19:50:08 +02:00
jcmichelou 78ed10b758 Add explicit platform-independent support for dual-stacked sockets (ipv6 sockets are implicitly dual-stacked on Linux by default, but not on Windows).
Correctly map / unmap ipv4 addresses into ipv6 addresses so that ipv4 queries to an ipv6 dual-stacked server actually do work.
2017-05-08 19:32:28 +02:00
jcmichelou 53eb5640e0 Change name of debug dll to -1d suffix under windows. 2017-05-07 18:36:57 +02:00
jcmichelou 68c0dba2da Add Debug DLL and Release DLL configurations in visual studio solution to build the library as a dll for windows. 2017-05-07 18:19:46 +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
jcmichelou 95d8e2c8e0 Use C-style prototypes for coap_statup and coap_cleanup 2017-05-06 18:25:10 +02:00
jcmichelou e2c2dc5326 Make LIBCOAP_PACKAGE_XXX macros usables in code 2017-05-06 18:24:59 +02:00
jcmichelou 3042a287bc Fix a problem with the use of control structures in sendmsg / recvmsg. These are not struct sockaddr, they are ip_pktinfo or ipv6_pktinfo, so local_interface->addr.size is irrelevant, even causing an overflow with writing zero bytes outside of the control structure on the stack, even though it happens to work because the buffer is large enough.
Prevent invalid addresses from being used as source address with sendmsg. On linux, they are just ignored, so it is the same as not specifying one, but on windows they cause an error. In both case it is simpler not to include any control info if the intent is to let the interface be chosen by the network stack.
2017-05-06 16:56:32 +02:00
jcmichelou 9e8a693ffd Fix typo on ipv6 notation for the multicast group address for coap. 2017-05-05 20:48:18 +02:00