Files
libcoap/man
Jon Shallow fda991f541 Fix mcast registrations when using TCP
As coap-server now sets up 2 (or 4) endpoints, UDP and TCP based, all
subsequent endpoints are pre-pended to the ctx->endpoint list. Thus
ctx->endpoint will always be TCP based.  Setting IPV6_JOIN_GROUP on a TCP
socket is a no-no.

As join() is complex function, it should be within libcoap so as to not require
detailed knowledge of how internal structures work (which really should be
opaque to the application writer).

include/coap2/net.h:
src/net.c:
libcoap-2.map:
libcoap-2.sym:
Create coap_join_mcast_group() in src/net.c (as it is a network layer
function using the (fixed) join() code. (Iterate through the ctx->endpoint list
looking for UDP based endpoints and only do the IPV6_JOIN_GROUP on them.)
There is no support for WITH_CONTIKI or WITH_LWIP at this point (returns -1).

examples/coap-server.c:
Remove join() code and replace call to join() with coap_join_mcast_group()

examples/coap-rd.c:
Remove join() code and replace call to join() with coap_join_mcast_group()

man/coap-rd.txt.in:
Correct a typo in the coap-ed man page
2019-04-12 13:54:50 +01:00
..