From 4653974c2a8ca87c18ec9a33dde6b6b4212057b9 Mon Sep 17 00:00:00 2001 From: fbernon Date: Wed, 12 Dec 2007 19:22:20 +0000 Subject: [PATCH] Minor change: move DNS_MSG_SIZE in opt.h, add comments. --- src/core/dns.c | 3 --- src/include/lwip/opt.h | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/dns.c b/src/core/dns.c index 03bbe658..908f3878 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -102,9 +102,6 @@ #define DNS_MAX_TTL 604800 #endif -/** DNS message max. size */ -#define DNS_MSG_SIZE 512 - /* DNS protocol flags */ #define DNS_FLAG1_RESPONSE 0x80 #define DNS_FLAG1_OPCODE_STATUS 0x10 diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 3f49b3b0..539358ba 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -580,11 +580,17 @@ #endif /** DNS use a local buffer if DNS_USES_STATIC_BUF=0, a static one if - DNS_USES_STATIC_BUF=1, or a dynamic one if DNS_USES_STATIC_BUF=2. */ + DNS_USES_STATIC_BUF=1, or a dynamic one if DNS_USES_STATIC_BUF=2. + The buffer will be of size DNS_MSG_SIZE */ #ifndef DNS_USES_STATIC_BUF #define DNS_USES_STATIC_BUF 1 #endif +/** DNS message max. size. Default value is RFC compliant. */ +#ifndef DNS_MSG_SIZE +#define DNS_MSG_SIZE 512 +#endif + /* --------------------------------- ---------- UDP options ----------