mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-20 22:39:05 +03:00
RIOT: Update to use SOCK i/f, not Posix
Remove all references to Posix functions, using Sock functions as appropriate. Update coap_address_t to be RIOT specific when doing RIOT builds.
This commit is contained in:
1 parent
11d8e7cd72
commit
e25cf94d2a
28 files changed
+994
-250
No files matched your search
@@ -39,8 +39,9 @@ USEMODULE += prng_sha1prng
|
||||
|
||||
# libcoap support
|
||||
USEPKG += libcoap
|
||||
# Uncomment to enable libcoap OSCORE support
|
||||
# USEMODULE += libcoap_oscore
|
||||
|
||||
USEMODULE += sock_udp
|
||||
# Configure if DNS is required
|
||||
USEMODULE += sock_dns
|
||||
|
||||
|
||||
@@ -145,9 +145,9 @@ init_coap_context_endpoints(const char *use_psk)
|
||||
}
|
||||
|
||||
coap_address_init(&listenaddress);
|
||||
listenaddress.addr.sin6.sin6_family = AF_INET6;
|
||||
memcpy(&listenaddress.addr.sin6.sin6_addr, &addr,
|
||||
sizeof(listenaddress.addr.sin6.sin6_addr));
|
||||
listenaddress.riot.family = AF_INET6;
|
||||
memcpy(&listenaddress.riot.addr.ipv6, &addr,
|
||||
sizeof(listenaddress.riot.addr.ipv6));
|
||||
coap_print_ip_addr(&listenaddress, addr_str, sizeof(addr_str));
|
||||
coap_log_info("Server IP [%s]\n", addr_str);
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "coap_config.h"
|
||||
#include <coap3/coap.h>
|
||||
|
||||
/* Start up the CoAP Server */
|
||||
void server_coap_init(int argc, char **argv);
|
||||
|
||||
|
||||
Reference in new issue
Block a user