2016-05-12 04:36:12 +08:00
|
|
|
---
|
|
|
|
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);
|
|
|
|
---
|
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
Uncompresses a DNS compressed name.
|
2016-05-12 04:36:12 +08:00
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
The containing DNS message is required because of the compressed encoding
|
2016-05-12 04:36:12 +08:00
|
|
|
and reference suffixes present elsewhere in the packet.
|
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
If the name is less than `dst_len` characters long, the remainder
|
|
|
|
of `dst` is terminated with `\0` characters. Otherwise, `dst` is not
|
|
|
|
terminated.
|
2016-05-12 04:36:12 +08:00
|
|
|
|
|
|
|
If `dst_len` is 0 `dst` can be NULL.
|
2016-07-26 22:53:33 +08:00
|
|
|
Returns the uncompressed name length.
|
2016-05-12 04:36:12 +08:00
|
|
|
|