chrysn c983c853d7 check for an error case
if the coap pdu struct is larger than the headers that are stripped off
a datagram by the time it arrives at coap, all the nice zero-copying
stops working. instead of working around by allocating bigger headers
(which would go untested), it was decided to lock up. given how
reproducible the header calculations are, this will let the developer
know what's up early, if this ever happens to be critical at all.

there are two plausible causes for this to happen:

* the pdu struct grows, eg. because of additional fields or becaus it is
  used on architecture with large alignment requirements
* packages "come in shallow", that is, are created from an interface
  that barely has headers. such an interface could be a network
  interfaces created from a hardware network stack.

this also changes the sizes of allocated pdus, in which previously, the
probelm was not considered and covered by overallocation.
2013-11-17 16:53:35 +01:00
2011-06-02 02:41:48 +02:00
2013-02-01 13:54:16 +01:00
2012-03-10 00:58:55 +01:00
2012-03-15 14:57:25 +01:00
2011-12-11 16:07:20 +01:00
2013-11-17 16:53:09 +01:00
2012-08-29 11:43:49 +02:00
2012-03-10 01:00:31 +01:00
2013-11-17 16:40:55 +01:00
2013-11-17 16:53:09 +01:00
2011-06-13 18:57:51 +02:00
2011-06-13 18:57:51 +02:00
2013-11-17 16:53:08 +01:00
2013-07-22 21:52:58 +02:00
2011-06-02 02:43:59 +02:00
2013-11-17 16:53:35 +01:00
2013-11-17 16:53:08 +01:00
2013-01-21 17:27:21 +01:00
2013-11-17 16:53:35 +01:00
2011-12-11 15:57:24 +01:00
2011-06-02 02:43:59 +02:00
2011-06-16 18:31:09 +02:00

libcoap: A C implementation of IETF Core Application protocol

Copyright (C) 2010--2013 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 developed in the IETF working group "Constrained
RESTful Environments (core)", see <http://6lowapp.net>.

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.

Languages
C 93.6%
M4 2.9%
CMake 1.8%
Shell 0.7%
Makefile 0.6%
Other 0.4%