Commit Graph
898 Commits
Author SHA1 Message Date
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
jcmichelou 9b3cf894fc Use crypto secure version of rand to generate the message ids on windows. 2017-05-05 20:46:29 +02:00
jcmichelou 3ee4552dcf Merge fix to coap_config.h.contiki from PR #47. 2017-05-05 20:33:48 +02:00
jcmichelou f25f962427 Add win32 binaries for the CUnit library (as a DLL because of LGPL) so the regression tests can be run on windows. 2017-05-05 20:31:57 +02:00
jcmichelou 9b647d5d05 Add visual studio 2015 solution and project files for building libcoap on windows.
Merge changes from PR #47 related to windows platform support.
Add full windows platform support including correct error checking and working regression tests and examples.
Remove need to build applications using libcoap with -DWITH_POSIX and to include coap_config.h. This applies to the examples as well.
2017-05-05 20:29:10 +02:00
Olaf Bergmann 771f013b6e coap-server.c: fixed resource check time calculation
This change is a fix for issue #72 [1].

[1] https://github.com/obgm/libcoap/issues/72
2017-04-12 22:40:34 +02:00
Olaf Bergmann ac94964b45 pdu.h: new methods FETCH, PATCH, iPATCH from RFC 8132 2017-04-07 10:14:22 +02:00
obgm f446afdf1e Merge pull request #74 from PawelWMS/transaction_id_fix
Reverting coap_transaction_id() to work the way it did.
2017-04-04 12:10:33 +02:00
Pawel Winogrodzki 6112604569 Makingcoap_transaction_id() always use the peer for ID generation. 2017-04-04 02:32:45 -07:00
obgm bcd4019d3a Merge pull request #70 from PawelWMS/W4_fix_upstream_develop
Fixing /W4 warnings for Windows builds.
2017-03-29 13:18:03 +02:00
Pawel Winogrodzki b130109c04 Applying agreed changes. 2017-03-29 02:51:21 -07:00
Pawel Winogrodzki 4b112431ff Changing u_short to uint16_t inside pdu.c. 2017-03-28 17:15:37 -07:00
Pawel Winogrodzki d6d7df8bfe Fixing comments inside coap_time.c and net.c. 2017-03-28 17:04:46 -07:00
Pawel Winogrodzki 48fb2443df Fixing coap_io.c comments. 2017-03-28 16:54:23 -07:00
Pawel Winogrodzki 8090dc7ba8 Fixing other sources needing <limits.h>. 2017-03-20 17:07:29 -07:00
Pawel Winogrodzki 45805772ca Adding <limits.h> to pdu.c.
It seems that POSIX builds didn't understand what
"USHRT_MAX" means and that macro is defined inside limits.h.
2017-03-20 16:59:06 -07:00
Pawel Winogrodzki a42894b053 Removing unnecessary line in coap_time.c. 2017-03-20 16:54:37 -07:00
Pawel Winogrodzki fc3e33b011 Fixing invalid coap_io.c line. 2017-03-20 16:41:27 -07:00
Pawel Winogrodzki 9adc4eb6a7 Fixing /W4 warnings for Windows builds.
Removing all of the /W4 level warnings from the code.
No functional changes.

Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
2017-03-20 15:48:33 -07:00
obgm b425b150c2 Merge pull request #67 from PawelWMS/remove_failed_observers_loop_fix
Fixing coap_remove_failed_observers() loop.
2017-03-11 11:28:16 +01:00
Pawel Winogrodzki 445383a0b5 Fixing coap_remove_failed_observers() loop.
The loop was always exiting after analysing the first observer,
so in case there were more and the first one on the list of
observers didn't match the one we wanted to remove, the
observer never got removed.

Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
2017-03-10 17:55:34 -08:00
Pawel Winogrodzki eb1fae94ed Fixing Option Delta and Option Length encoding.
Option Delta and Option Length were being encoded incorrectly
the value 269 and ended up being encoded the same way as 13.

For details please see RFC-7252 "Option Format"
( https://tools.ietf.org/html/rfc7252#page-17 ).

Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
2017-03-08 11:09:27 +01:00
Olaf Bergmann d7763a295a test_options.c: unit test for extended delta
PR #65 reports wrong encoding of option value 269. The new
unit test t_encode_option9() tests for correct encoding
according to [RFC 7252, Section 3.1](https://tools.ietf.org/html/rfc7252#section-3.1).
2017-03-08 11:05:31 +01:00
Olaf Bergmann fa52486030 README.md: added tool badges v4.1.2 2017-01-13 16:02:58 +01:00