Cleanup #include structure of altcp_tls a bit

(as discussed with Simon today)
This commit is contained in:
Dirk Ziegelmeier 2017-03-28 20:31:25 +02:00
parent b09b3fa4e6
commit 38651b8069
7 changed files with 13 additions and 15 deletions

View File

@ -57,12 +57,12 @@
#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */
#include "lwip/apps/altcp_tls_opts.h" #include "lwip/apps/altcp_tls_mbedtls_opts.h"
#if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS #if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS
#include "lwip/altcp.h" #include "lwip/altcp.h"
#include "lwip/apps/altcp_tls.h" #include "lwip/altcp_tls.h"
#include "lwip/priv/altcp_priv.h" #include "lwip/priv/altcp_priv.h"
#include "altcp_tls_mbedtls_structs.h" #include "altcp_tls_mbedtls_structs.h"

View File

@ -99,7 +99,7 @@
#include "lwip/altcp.h" #include "lwip/altcp.h"
#include "lwip/altcp_tcp.h" #include "lwip/altcp_tcp.h"
#if HTTPD_ENABLE_HTTPS #if HTTPD_ENABLE_HTTPS
#include "lwip/apps/altcp_tls.h" #include "lwip/altcp_tls.h"
#endif #endif
#include <string.h> /* memset */ #include <string.h> /* memset */

View File

@ -55,7 +55,7 @@
#include "lwip/pbuf.h" #include "lwip/pbuf.h"
#include "lwip/altcp.h" #include "lwip/altcp.h"
#include "lwip/altcp_tcp.h" #include "lwip/altcp_tcp.h"
#include "lwip/apps/altcp_tls.h" #include "lwip/altcp_tls.h"
#include <string.h> #include <string.h>
#if LWIP_TCP && LWIP_CALLBACK_API #if LWIP_TCP && LWIP_CALLBACK_API

View File

@ -43,8 +43,6 @@
#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */
#include "altcp_tls_opts.h"
#if LWIP_ALTCP_TLS #if LWIP_ALTCP_TLS
#include "lwip/altcp.h" #include "lwip/altcp.h"

View File

@ -2,7 +2,7 @@
* @file * @file
* Application layered TCP/TLS connection API (to be used from TCPIP thread) * Application layered TCP/TLS connection API (to be used from TCPIP thread)
* *
* This file contains options for a TLS layer. * This file contains options for an mbedtls port of the TLS layer.
*/ */
/* /*
@ -43,21 +43,16 @@
#if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */
/** LWIP_ALTCP_TLS==1: enable TLS support for altcp API */
#ifndef LWIP_ALTCP_TLS
#define LWIP_ALTCP_TLS 0
#endif
/** LWIP_ALTCP_TLS_MBEDTLS==1: use mbedTLS for TLS support for altcp API /** LWIP_ALTCP_TLS_MBEDTLS==1: use mbedTLS for TLS support for altcp API
* mbedtls include directory must be reachable via include search path * mbedtls include directory must be reachable via include search path
*/ */
#ifndef LWIP_ALTCP_TLS_MBEDTLS #ifndef LWIP_ALTCP_TLS_MBEDTLS
#define LWIP_ALTCP_TLS_MBEDTLS 0 #define LWIP_ALTCP_TLS_MBEDTLS 0
#endif #endif
/** Configure debug level of this file */ /** Configure debug level of this file */
#ifndef ALTCP_MBEDTLS_DEBUG #ifndef ALTCP_MBEDTLS_DEBUG
#define ALTCP_MBEDTLS_DEBUG LWIP_DBG_OFF #define ALTCP_MBEDTLS_DEBUG LWIP_DBG_OFF
#endif #endif
/** Set a session timeout in seconds for the basic session cache /** Set a session timeout in seconds for the basic session cache

View File

@ -40,7 +40,6 @@
#include "lwip/apps/mqtt_opts.h" #include "lwip/apps/mqtt_opts.h"
#include "lwip/err.h" #include "lwip/err.h"
#include "lwip/ip_addr.h" #include "lwip/ip_addr.h"
#include "lwip/apps/altcp_tls.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -1355,6 +1355,12 @@
#ifndef LWIP_ALTCP #ifndef LWIP_ALTCP
#define LWIP_ALTCP 0 #define LWIP_ALTCP 0
#endif #endif
/** LWIP_ALTCP_TLS==1: enable TLS support for altcp API */
#ifndef LWIP_ALTCP_TLS
#define LWIP_ALTCP_TLS 0
#endif
/** /**
* @} * @}
*/ */