Commit Graph
661 Commits
Author SHA1 Message Date
Carsten Schoenert e256844253 i/c/async.h: whitespace cleanup, reformating, no changes
Just some cleanup like whitespace, punctuation marking and indentation
issues.
2015-04-14 15:55:24 +02:00
Carsten Schoenert ed59118841 i/c/address.h: whitespace cleanup, reformating, no changes
Just some cleanup like whitespace, punctiation marking and indentation
issues.
2015-04-14 15:54:33 +02:00
Carsten Schoenert 531c5da5da Doxyfile.in: adding some excludes for lwip related files
Due changes to the *.c and *.h files (added for the lwip support) we have
to exclude files that are not related to the library.
2015-04-14 15:53:27 +02:00
Olaf Bergmann db28c5ac0c CONTRIBUTE: fixed minor nits
Removed word duplication, "is" vs. "are", adj vs. adv
2015-04-14 12:19:40 +02:00
Carsten Schoenert d3d78902db CONTRIBUTE: adding info file for contributers
The file CONTRIBUTE is primarily for user who wants to help to improve
the libcoap project. Please expand this file with helpful informations
for anybody who is interests in helping.

Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
2015-04-14 12:09:59 +02:00
Carsten Schoenert 3b87d7dc8f doxygen: include extra information about extra CFLAGS 2015-04-10 21:09:27 +02:00
Carsten Schoenert a3f3a75556 configure.ac: changing the platform related definitions
Simplifying the various definition for the currently supported
platforms. These are now Linux, Solaris and Darwin platforms. This will
hopefully grow up the next time but for now we only handle some extra
CFLAGS definitions and one extra define for Darwin. So there is not
really a need to handle this in two extra 'case switch' loops.

We have there some additional CFLAGS (right now only extra compiler
switches).  There is some "special" handling needed for getting this
info into the doxygen configuration. This switches are related on the
platform the build is running.
2015-04-10 21:09:27 +02:00
Carsten Schoenert 6d4e85d813 doxygen: switch to svg graphics
With this change doxygen will create SVG graphics (instead of png) which
are zoomable due these are vector graphics.

Suggested-by: Bill Bennet <william.bennett@netcommwireless.com>
2015-04-10 21:08:41 +02:00
Carsten Schoenert 236135f7e7 doxygen: change the behaviour for caller graphics
This commit is based on a suggestion from Bill Bennet.
With this change doxygen is also creating a call and caller dependency
graphic for global functions. This is helpful for understanding the mode
of action inside the libcoap.

Suggested-by: Bill Bennet <william.bennett@netcommwireless.com>
2015-04-10 21:08:33 +02:00
Carsten Schoenert 3f1a7610f5 configure.ac: small adjusting of indention 2015-04-09 20:50:35 +02:00
Carsten Schoenert 47e0c25c38 examples/Makefile.am: changing header includes
The build of the examples is complaining about a function that are not
inline'd. The compiler is mentioned this because we use the '-I'
directive for pointing to the header files. Just say the compiler also
that the header files are system headers so the false positive is going
away.
2015-03-22 14:38:36 +01:00
Carsten Schoenert 98e701dd06 configure.ac: create package.tar.bz2 by default
bzip2 creates archives that are better compressed than the default gzip
format. So running 'make dist' is creating a libcoap-VER.tar.bz2, you
can create a *.tar.gz by running 'make dist-gzip' if you prefer.

The created bzip2 archive is currently 27% smaller than the respective
gzip archive.

   $ ls -sh libcoap-4.1.2.tar.*
   372K libcoap-4.1.2.tar.bz2
   476K libcoap-4.1.2.tar.gz
2015-03-22 14:38:36 +01:00
Carsten Schoenert db77014cea fix missing header files for 'make dist'
The run of 'make dist' isn't pickup some also needed header files in
examples/ and tests/ adding the file to EXTRA_DIST.
2015-03-22 14:35:14 +01:00
Olaf Bergmann a5722b0ad1 Makefile.am: adding missing files to tarball.tar.bz2
The fixup for the broken 'make dist' doesn't catch up files in
$top_srcdir.
2015-03-22 14:35:13 +01:00
Carsten Schoenert b1ed21e458 doc/Makefile.am: fix up broken 'make dist'
The make target for creating the distribution tarball (make dist) was
broken some commits ago within the changes in the doc/ subdirectory. The
reason for this is that simple Doxygen has to be runs ones before the
automatism can pick up the files. automake uses dist_pkgdist_DATA as
trigger. So we have to use that variable.

Changing up the makefile template so the call for 'dist_pkgdist_DATA'
*and* 'all-local' is calling 'doxfile.stamp' so fist Doxygen is running.

By doing this also clean up a little bit and prepare the build for be
able to run out of the tree.
2015-03-22 14:35:13 +01:00
Carsten Schoenert da3570cb41 examples/Makefile.am: fix not needed target
The target 'install-exec-am' is obviosly wrong and not really needed.
2015-03-22 13:37:28 +01:00
Bergmann ab8f4a9e45 coap_time.c: Apple does not support clock_gettime()
Although _POSIX_TIMERS is defined on MacOSX no clock_gettime() is
provided, so we have to fall back to gettimeofday().
2015-03-13 14:03:12 +01:00
Olaf Bergmann ce0bc70e0a Rebuilt libcoap-1.0.{map,sym} without lwip-specific symbols 2015-03-13 13:35:57 +01:00
Olaf Bergmann 41fac9248b Makefile.am: make ctags ignore lwip-specific identifiers
The Makefile uses ctags to build a list of global identifiers
that should be exported in a dynamic library. As ctags has a
very simplistic way of handling preprocessor conditionals, it
cannot detect symbols that are not present on platform POSIX.
In particular, the Solaris ld chokes on the following:

Undefined                       first referenced
 symbol                             in file
coap_pdu_from_pbuf                  ../.libs/libcoap-1.0.so
coap_packet_extract_pbuf            ../.libs/libcoap-1.0.so

The easiest way to fix this is to tell ctags that is should
ignore these identifiers with option -I.
2015-03-13 13:27:31 +01:00
Olaf Bergmann c5028c5013 Makefile.am: make new target check_ctags phony 2015-03-13 13:21:35 +01:00
Olaf Bergmann 03625bab33 Check if linking against -lsocket -lnsl is required
On platform Solaris, network functions are located in the
libraries socket and nsl.
2015-03-13 13:13:03 +01:00
Olaf Bergmann ffeea0292a Check if clock_gettime() needs librt
According to the manuals, clock_gettime() requires linking with -lrt
for glibc versions before 2.17.
2015-03-13 13:05:41 +01:00
Carsten Schoenert 435f5df7b4 autogen.sh: adding files from the examples/ folder
Also fixing up some stupid missspelled words.
2015-03-12 20:52:45 +01:00
Carsten Schoenert 1f286c4cac .gitignore: adding the examples/ folder 2015-03-12 17:04:36 +01:00
Carsten Schoenert d01ea0afd9 .gitignore: sorting entrys in more alphabetical order 2015-03-12 17:04:02 +01:00
Olaf Bergmann ff3cbbb490 updated map file 2015-03-12 13:12:01 +01:00
Olaf Bergmann d9d20d906b rd.c: Fixed type-specifier warning
For POSIX, coap_tick_t is defined as unsigned long to support
timestamps in wallclock time. The rd uses ticks to make node
identifiers locally unique. As this is just one part of the
generated identifier, the timestamp's lower 32 bits are
sufficient.
2015-03-12 13:05:56 +01:00
Olaf Bergmann 41e3247c9b rd.c: Fixed a bunch of compiler warnings 2015-03-12 12:30:57 +01:00
Carsten Schoenert 60030d0fb4 examples: adding the examples folder to the build
After including the doc/ and the tests/ folder under the hood of the
autotools now adding the examples/ foolder too.
The user is now able to add the build of the example binarys if
configure is called with '--enable-examples' as option. The example
binarys will not be build by default!

Currently only 'coap-client', 'coap-server' and 'rd' is build.
2015-03-12 11:25:26 +01:00
Carsten Schoenert 1c348f9ed0 libcoap-1.0.map: update because new symbols
The last changes to include/coap/{net,resource}.h and src/{net,resource}.c
create new symbols that exported via the libcoap library. By this a
update for the map file is needed.

In addition to e297a0ca76
               71de08ac5f
2015-03-12 11:25:26 +01:00
Carsten Schoenert 6d2edc7cfa Makefile.am: moving check_ctags to a target
Calling a shellscript within a Makefile is not POSIX compliant, it's
possible that it would not work on all platforms. But using the check
for ctags as a seperate target within the main Makefile is no problem
and easy to change.

This commit is a addition to 101efbfe69
2015-03-12 11:25:26 +01:00
Olaf Bergmann 83b19e6f16 resource.c: always include utlist.h and mem.h for all platforms 2015-03-11 16:12:55 +01:00
Olaf Bergmann 4c1af1b2e2 Makefile.am: Added missing src/address.c 2015-03-11 16:12:24 +01:00
Olaf Bergmann 2250db4c95 address.[hc]: make coap_address_equals() not inline on POSIX
gcc-4.8 -Winline keeps complaining about the function's size, so
it is now placed into address.c.
2015-03-11 16:08:58 +01:00
Olaf Bergmann 3a78280982 mem.c: Added missing include for coap_resource_t and coap_attr_t 2015-03-11 15:28:10 +01:00
Olaf Bergmann ecda1426ac resource.c: Increase use of coap_malloc_type() and coap_free_type()
coap_malloc_type() and coap_free_type() provide an abstract API for
dynamic memory management on different platforms. resource.c still
is in transition and needs more cleanup.
2015-03-11 14:59:40 +01:00
Olaf Bergmann d55bd85e14 examples/contiki/server.c: Define clock_offset locally
The global variable clock_offset has been removed from libcoap, so
we have to define our own.
2015-03-11 14:37:18 +01:00
Olaf Bergmann f1b36046f2 Contiki: Make sure that COAP_RESOURCES_NOHASH is defined 2015-03-11 14:34:06 +01:00
Olaf Bergmann 65620fde3e resource.[hc]: Replaced custom list structures by utlist macros.
The CoAP resource management is based on uthash and utlist for
platform POSIX but used a custom list implementation for Contiki.
This modification replaces the list handling by utlist macros
entirely. A set of convenience macros has been defined to access
the resources stored in a CoAP context with respect to the
preprocessor symbol COAP_RESOURCES_NOHASH.
2015-03-11 14:28:24 +01:00
Olaf Bergmann b9adebec93 client.c: Fixed signed/unsigned in comparisons 2015-03-10 13:47:38 +01:00
Olaf Bergmann 005d00bf5b client.c: Declare unused parameters to make -Wunused quiet 2015-03-10 13:42:40 +01:00
Olaf Bergmann 445849d5ba client.c: Made private functions static to quiet compiler warnings 2015-03-10 13:41:02 +01:00
Olaf Bergmann c38a6d9ca4 Made private functions static to quiet compiler warnings 2015-03-10 13:25:08 +01:00
Olaf Bergmann 9b1ab5eef3 server.c: Declare unused parameters to make -Wunused quiet 2015-03-10 13:06:03 +01:00
Olaf Bergmann eb2251f06f Update boilerplate text in testdriver
The errors in the URI parser test suite have been fixed,
making the description in testdriver.c obsolete.
2015-03-09 18:30:20 +01:00
Olaf Bergmann 55c6efeca8 coap_split_uri: Check if port number is in valid range
This change is made to resolve the failed URI parser test
t_parse_uri5()
2015-03-09 18:01:34 +01:00
Olaf Bergmann 3e99d6634e Fixed documentation of coap_split_path_impl() 2015-03-09 17:56:08 +01:00
Olaf Bergmann 0c53e63a3d Fixed URI parser bug and removed broken parser iterator
The parser iterator did not break up URIs correctly. As this
cannot be fixed easily, the parser iterator has been removed.
coap_split_path_impl() now operates directly on the message
buffer instead of the iterator abstraction.

This bug also caused t_parse_uri12() in the URI test suite
to fail.
2015-03-09 17:49:21 +01:00
Olaf Bergmann 04e1d8e7de Make test data unsigned to shut up compiler warnings. 2015-03-09 14:59:22 +01:00
Olaf Bergmann 8894f2ffec Fixed a couple of warnings from doxygen. 2015-03-09 14:53:01 +01:00