The header coap.h should be the only header file a user has to include to get functions from the libcoap available. Bu we have to provide not only the header interface to the user, the user needs also some extra information like the libcoap version or upstream related infos. To get these automated in to a shipped coap.h header file we simple can use some autotool magic and expand some macros while configure is running and pasing i/c/coap.h.in. By this we can currently add the following macro variables: LIBCOAP_PACKAGE_BUGREPORT -> upstream email contact LIBCOAP_PACKAGE_NAME -> the used package name (libcoap) LIBCOAP_PACKAGE_STRING -> package name + version LIBCOAP_PACKAGE_URL -> upstream homepage LIBCOAP_PACKAGE_VERSION -> the current used version All these macros variables are expanded from the respective macro names from the configure run. The variables are prefixed because this with LIBCOAP_ to not get name clashing on the user side while running the autotools of the users project. There are probably more predefined macros needed, but they can be easily added later into include/coap/coap.h.in.
libcoap: A C implementation of IETF Constrained Application Protocol (RFC 7252)
Copyright (C) 2010--2015 by Olaf Bergmann bergmann@tzi.org
ABOUT LIBCOAP
libcoap is a C implementation of a lightweight application-protocol for devices that are constrained their resources such as computing power, RF range, memory, bandwith, or network packet sizes. This protocol, CoAP, is standardized by the IETF as RFC 7252. For further information related to CoAP, see http://coap.technology.
PACKAGE CONTENTS
This directory contains a protocol parser and basic networking functions for platform with support for malloc() and BSD-style sockets. The examples directory contains a client and a server to demonstrate the use of this library.
LICENSE INFORMATION
This library is published as open-source software without any warranty of any kind. Use is permitted under the terms of the GNU General Public License (GPL), Version 2 or higher, OR the revised BSD license. Please refer to LICENSE.GPL oder LICENSE.BSD for further details.