From 01123ec5946a3ebedf7eb08e482f0c7a9b8e86a1 Mon Sep 17 00:00:00 2001 From: vemax78 Date: Thu, 2 May 2013 18:37:36 +0200 Subject: [PATCH] add udplite check into configure --- configure.ac | 3 +++ src/common/capwap.h | 24 +++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index bd044fc..395678e 100644 --- a/configure.ac +++ b/configure.ac @@ -192,6 +192,9 @@ if test "${enable_dtls}" = "yes"; then AC_DEFINE([ENABLE_DTLS], [1], [Enable DTLS]) fi +# UDPLite check +AC_CHECK_HEADERS([netinet/udplite.h]) + # Memory check case "${with_mem_check}" in internal) diff --git a/src/common/capwap.h b/src/common/capwap.h index c162c0f..316ae38 100644 --- a/src/common/capwap.h +++ b/src/common/capwap.h @@ -16,15 +16,6 @@ #include #include -//TODO: -//#ifdef NATIVE_UDPLITE_HEADER -//#include -//#else -//#define IPPROTO_UDPLITE 136 -#define SOL_UDPLITE 136 -#define UDPLITE_SEND_CSCOV 10 -//#endif - /* Endian */ #ifdef WIN32 #define CAPWAP_LITTLE_ENDIAN @@ -50,6 +41,21 @@ #include "config.h" #endif +/* UDPLite */ +#ifdef HAVE_NETINET_UDPLITE_H +#include +#else +#ifndef IPPROTO_UDPLITE +#define IPPROTO_UDPLITE 136 +#endif +#ifndef SOL_UDPLITE +#define SOL_UDPLITE 136 +#endif +#ifndef UDPLITE_SEND_CSCOV +#define UDPLITE_SEND_CSCOV 10 +#endif +#endif + /* standard include */ #include "capwap_logging.h" #include "capwap_debug.h"