aboutsummaryrefslogtreecommitdiff
path: root/contrib/unbound/util/data/dname.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/unbound/util/data/dname.h')
-rw-r--r--contrib/unbound/util/data/dname.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/unbound/util/data/dname.h b/contrib/unbound/util/data/dname.h
index 6e4cf7ea3be7..f68c64a03f0d 100644
--- a/contrib/unbound/util/data/dname.h
+++ b/contrib/unbound/util/data/dname.h
@@ -262,11 +262,24 @@ int dname_is_root(uint8_t* dname);
* Snip off first label from a dname, returning the parent zone.
* @param dname: from what to strip off. uncompressed wireformat.
* @param len: length, adjusted to become less.
- * return stripped off, or "." if input was ".".
+ * return dname stripped off, or "." if input was ".".
*/
void dname_remove_label(uint8_t** dname, size_t* len);
/**
+ * Same as dname_remove_label but fails if removal would surpass lenlimit.
+ * If no failure,
+ * snip off first label from a dname, returning the parent zone.
+ * @param dname: from what to strip off. uncompressed wireformat.
+ * @param len: length, adjusted to become less.
+ * @param lenlimit: length limit that we can't surpass (usually the zone apex).
+ * @return
+ * o 1, and dname stripped off, or "." if input was ".", else
+ * o 0, if going up would surpass lenlimit.
+ */
+int dname_remove_label_limit_len(uint8_t** dname, size_t* len, size_t lenlimit);
+
+/**
* Snip off first N labels from a dname, returning the parent zone.
* @param dname: from what to strip off. uncompressed wireformat.
* @param len: length, adjusted to become less.