mg_dns_uncompress_name.md 643 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
---
title: "mg_dns_uncompress_name()"
decl_name: "mg_dns_uncompress_name"
symbol_kind: "func"
signature: |
  size_t mg_dns_uncompress_name(struct mg_dns_message *msg, struct mg_str *name,
                                char *dst, int dst_len);
---

10
Uncompresses a DNS compressed name.
11

12
The containing DNS message is required because of the compressed encoding
13 14
and reference suffixes present elsewhere in the packet.

15 16 17
If the name is less than `dst_len` characters long, the remainder
of `dst` is terminated with `\0` characters. Otherwise, `dst` is not
terminated.
18 19

If `dst_len` is 0 `dst` can be NULL.
20
Returns the uncompressed name length. 
21