GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COAP_LWIP(3) libcoap Manual COAP_LWIP(3)

coap_lwip, coap_lwip_dump_memory_pools, coap_lwip_set_input_wait_handler - Work with CoAP lwip specific API handler

#include <coap3/coap.h>

void coap_lwip_set_input_wait_handler(coap_context_t *context, coap_lwip_input_wait_handler_t handler, void *input_arg);

void coap_lwip_dump_memory_pools(coap_log_t log_level);

This man page describes the additional libcoap functions that are available for working with LwIP implementations.

NOTE: If the following line is defined in lwipopts.h, then libcoap will reserve space for one response PDU when allocating coap_pdu_t structures.

#define MEMP_STATS 1

Callback Type: coap_lwip_input_wait_handler_t

/**

* LwIP callback handler that can be used to wait / timeout for the
* next input packet.
*
* @param arg The argument passed to the coap_lwip_set_input_wait_handler()
* function.
* @param milli_secs Suggested number of milli secs to wait before returning
* if no input.
*
* @return @c 1 if packet received, @c 0 for timeout, else @c -1 on error.
*/ typedef int (*coap_lwip_input_wait_handler_t)(void* arg, uint32_t milli_secs);

Function: coap_lwip_set_input_wait_handler()

The coap_lwip_set_input_wait_handler() function is used to define a callback handler that is invoked by coap_io_process(3) which passes in the input_arg parameter along with a suggested milli-sec wait time parameter in case there is no input. This callback handler is used to wait for (and probably times out) the next input packet. This allows the application to define whatever mechanism it wants use for this process.

Function: coap_lwip_dump_memory_pools()

The coap_lwip_dump_memory_pools() function is used to dump out the current state of the LwIP memory pools at logging level log_level.

This function is always invoked by coap_free_context(3) with a log_level of COAP_LOG_DEBUG.

NOTE: For information to be printed out, you need the following two lines in lwipopts.h

#define MEMP_STATS         1
#define LWIP_STATS_DISPLAY 1

coap_context(3) and coap_io(3)

See

"RFC7252: The Constrained Application Protocol (CoAP)"

for further information.

Please raise an issue on GitHub at https://github.com/obgm/libcoap/issues to report any bugs.

Please raise a Pull Request at https://github.com/obgm/libcoap/pulls for any fixes.

The libcoap project <libcoap-developers@lists.sourceforge.net>

07/04/2025 coap_lwip 4.3.5

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.