cyg_mdns_strlen_vector — Calculate uncompressed length of string vector


#include <mdns.h>

cyg_uint16 cyg_mdns_strlen_vector(const cyg_uint8 * const *iname, cyg_bool raw);


This function is used to calculate the space needed to hold an uncompressed copy of an encoded string described by the iname vector. The last entry of the iname vector must be NULL.


This function is not available if the system is not configured with CYGIMP_NET_MDNS_DNSSD enabled.

When raw=true the function counts the space needed to hold a copy of all the vector entries in an uncompressed form (for supporting “compressed->uncompressed” copying in the original “string-table” format, i.e. length byte followed by UTF-8 character data). The returned value is the space for the referenced encoded strings, and is not the size of the vector describing the name.

When raw=false we are counting the space needed to hold the “final” string representation with '.' inserted to separate fields.

Return value

Number of bytes needed to hold the uncompressed string in the selected boolean parameter raw style.