Files
Jon Shallow 9f9a197e95 Fix -Winline compiler warnings about inlining failed
This is compiler version dependent when doing static inline expansions.

examples/client.c:

Make hex2char() just static.

examples/etsi_iot_01.c:

Make coap_add_payload() just static.

include/coap2/address.h:
src/address.c:

Make coap_address_init() an actual function.

libcoap-2.map:
libcoap-2.sym:

Expose coap_address_init() as a function.

Makefile.libcoap:

Include address.c as one of the libcoap files for Contiki.

examples/lwip/Makefile:

Include address.o as one of the libcoap files for LwIP.
2019-09-05 13:54:05 +01:00
..
2016-06-22 12:37:27 +02:00

Example of libcoap running on lwIP
==================================

To run the example, do

    $ make
    $ sudo ./server

(and in a second terminal)

    $ sudo ip a a dev tap0 192.168.113.1/24

and query `coap://192.168.113.2/time?ticks` with any coap tool,
or query `coap://[aaaa::1000]/.well-known/core`

This will

* download lwip and lwip-contrib from the upstream git sources
* build the server application
* run the server application, creating a virtual network device tap0 (unless
  that exists)
* configure your network interface to make the server accessible.

* return the appropriate response from the server to the client.

The server creates a resource for 'time' with a query 'ticks'.  This is
reported for `.well-known/core`. The work flow for adding more resources does
not differ from regular libcoap usage. If you seem to run out of memory
creating the resources, tweak the number of pre-allocated resources
in `include/coap/lwippools.h`.