You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Coap is a transport layer protocol. It should be fully functional without assumptions of underlying security and network layer.
Libcoap has options to compile without TLS libraries; however it always includes networking layer code, i.e. coap_io.c and address.c, etc.
Describe the solution you'd like
Libcoap will improve its reusability and modulization if there are compiler options which can enable/disable the network layer code.
E.g. a project whose TLS and networking layer are handled by some other libraries, can integrate libcoap without including coap_io.c, address.c and the system networking libraries: socket, tcp, etc.
The text was updated successfully, but these errors were encountered:
@jqiaobln There is a defined interface for the underlying read/write operations on the network. Ports for non-POSIX platforms show how to replace them. Data structures such as coap_address_t can be replaced to serve special needs as well. DTLS and TLS can be switched off (there is no point in abstracting these away because the supported DTLS and TLS libraries address very specific transport layer characteristics).
Therefore, it is fairly easy to port the networking code to different transport layer abstractions by replacing certain. c files as done for the existing ports.
@jqiaobln libcoap is now broken down into protocol layers, making it much easier to intercept at the level appropriate for your application.
So, in your cited case, the coap_netif_*() functions (in src/coap_netif.c) can call whatever is appropriate. You may also want to adjust the indexing table coap_layers_coap[] in src/coap_io.c (or its equivalent in one of your files) to point into your equivalent functions.
Each layer function calls the next function in the protocol stack (when it has finished processing) with its level as an index - e.g. session->sock.lfunc[COAP_LAYER_WS].write(session, (uint8_t*)buf, strlen(buf)); for invoking the next layer down when doing a write having completed the COAP_LAYER_WS write logic.
Is your feature request related to a problem? Please describe.
Coap is a transport layer protocol. It should be fully functional without assumptions of underlying security and network layer.
Libcoap has options to compile without TLS libraries; however it always includes networking layer code, i.e. coap_io.c and address.c, etc.
Describe the solution you'd like
Libcoap will improve its reusability and modulization if there are compiler options which can enable/disable the network layer code.
E.g. a project whose TLS and networking layer are handled by some other libraries, can integrate libcoap without including coap_io.c, address.c and the system networking libraries: socket, tcp, etc.
The text was updated successfully, but these errors were encountered: