2016-12-24 06:43:53 +00:00
|
|
|
/*
|
|
|
|
* libcoap configure implementation for ESP32 platform.
|
|
|
|
*
|
|
|
|
* Uses libcoap software implementation for failover when concurrent
|
|
|
|
* configure operations are in use.
|
|
|
|
*
|
|
|
|
* coap.h -- main header file for CoAP stack of libcoap
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010-2012,2015-2016 Olaf Bergmann <bergmann@tzi.org>
|
|
|
|
* 2015 Carsten Schoenert <c.schoenert@t-online.de>
|
|
|
|
*
|
|
|
|
* Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
|
|
|
*
|
|
|
|
* This file is part of the CoAP library libcoap. Please see README for terms
|
|
|
|
* of use.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef COAP_CONFIG_POSIX_H_
|
|
|
|
#define COAP_CONFIG_POSIX_H_
|
|
|
|
|
|
|
|
#ifdef WITH_POSIX
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
2019-04-13 11:15:28 +00:00
|
|
|
#include <net/if.h>
|
2016-12-24 06:43:53 +00:00
|
|
|
|
|
|
|
#define HAVE_SYS_SOCKET_H
|
|
|
|
#define HAVE_MALLOC
|
|
|
|
#define HAVE_ARPA_INET_H
|
2019-03-08 20:22:17 +00:00
|
|
|
#define HAVE_TIME_H
|
2019-04-13 11:15:28 +00:00
|
|
|
#define HAVE_NETDB_H
|
|
|
|
#define HAVE_NETINET_IN_H
|
2019-08-28 09:03:17 +00:00
|
|
|
#define HAVE_STRUCT_CMSGHDR
|
2016-12-24 06:43:53 +00:00
|
|
|
|
2019-08-28 09:03:17 +00:00
|
|
|
#define ipi_spec_dst ipi_addr
|
|
|
|
struct in6_pktinfo {
|
|
|
|
struct in6_addr ipi6_addr; /* src/dst IPv6 address */
|
|
|
|
unsigned int ipi6_ifindex; /* send/recv interface index */
|
|
|
|
};
|
|
|
|
#define IN6_IS_ADDR_V4MAPPED(a) \
|
|
|
|
((((__const uint32_t *) (a))[0] == 0) \
|
|
|
|
&& (((__const uint32_t *) (a))[1] == 0) \
|
|
|
|
&& (((__const uint32_t *) (a))[2] == htonl (0xffff)))
|
|
|
|
|
|
|
|
/* As not defined, just need to define is as something innocuous */
|
|
|
|
#define IPV6_PKTINFO IPV6_CHECKSUM
|
2016-12-24 06:43:53 +00:00
|
|
|
|
|
|
|
#define PACKAGE_NAME "libcoap-posix"
|
|
|
|
#define PACKAGE_VERSION "?"
|
|
|
|
|
2019-08-28 09:03:17 +00:00
|
|
|
#ifdef CONFIG_MBEDTLS_TLS_ENABLED
|
2019-04-13 11:15:28 +00:00
|
|
|
#define HAVE_MBEDTLS
|
2019-08-28 09:03:17 +00:00
|
|
|
#endif /* CONFIG_MBEDTLS_TLS_ENABLED */
|
2019-04-13 11:15:28 +00:00
|
|
|
#define COAP_CONSTRAINED_STACK 1
|
|
|
|
#define ESPIDF_VERSION
|
|
|
|
|
|
|
|
#define _POSIX_TIMERS 1
|
|
|
|
|
|
|
|
#define gai_strerror(x) "gai_strerror() not supported"
|
2016-12-24 06:43:53 +00:00
|
|
|
|
2019-03-08 20:22:17 +00:00
|
|
|
#endif /* WITH_POSIX */
|
2016-12-24 06:43:53 +00:00
|
|
|
#endif /* COAP_CONFIG_POSIX_H_ */
|