Commit a16b59a9 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

const: add maximum textual dname length

parent bac4eec7
......@@ -33,6 +33,17 @@
#define KNOT_DNAME_MAXLABELS 127 /*!< 1-char labels. */
#define KNOT_DNAME_MAXLABELLEN 63 /*!< 2^6 - 1 */
/*!
* \brief The longest textual dname representation.
*
* 3 x maximum_label + 1 x rest_label + 1 x zero_label
* Each dname label byte takes 4 characters (\DDD).
* Each label takes 1 more byte for '.' character.
*
* KNOT_DNAME_TXT_MAXLEN = 3x(1 + 63x4) + 1x(1 + 61x4) + 1x(1 + 0)
*/
#define KNOT_DNAME_TXT_MAXLEN 1005
/*!
* \brief Address family numbers.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment