diff options
Diffstat (limited to 'lib/dns/include/dns/rdata.h')
-rw-r--r-- | lib/dns/include/dns/rdata.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/dns/include/dns/rdata.h b/lib/dns/include/dns/rdata.h index e3183c0..c3e7db6 100644 --- a/lib/dns/include/dns/rdata.h +++ b/lib/dns/include/dns/rdata.h @@ -147,6 +147,17 @@ struct dns_rdata { (((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0) /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH 65512U + +/* * Flags affecting rdata formatting style. Flags 0xFFFF0000 * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). |