1ARES_EXPAND_NAME(3)        Library Functions Manual        ARES_EXPAND_NAME(3)
2
3
4

NAME

6       ares_expand_string - Expand a length encoded string
7

SYNOPSIS

9       #include <ares.h>
10
11       int ares_expand_string(const unsigned char *encoded,
12       const unsigned char *abuf, int alen, unsigned char **s,
13            long *enclen)
14

DESCRIPTION

16       The  ares_expand_string  function converts a length encoded string to a
17       NUL-terminated C string.  The argument encoded gives the  beginning  of
18       the encoded string, and the arguments abuf and alen give the containing
19       message buffer (necessary for the processing  of  indirection  pointers
20       within  the encoded domain name).  The result is placed in a NUL-termiā€
21       nated allocated buffer, a pointer to which is stored  in  the  variable
22       pointed  to  by  s.   The length of the encoded string is stored in the
23       variable pointed to by enclen so that the caller can advance  past  the
24       encoded string to read further data in the message.
25

RETURN VALUES

27       ares_expand_string can return any of the following values:
28
29       ARES_SUCCESS   Expansion of the encoded string succeeded.
30
31       ARES_EBADSTR   The  encoded  string  was  malformed  and  could  not be
32                      expanded.
33
34       ARES_ENOMEM    Memory was exhausted.
35

SEE ALSO

37       ares_free_string(3)
38

AUTHOR

40       Dominick Meglio
41
42
43
44                                  20 Nov 2009              ARES_EXPAND_NAME(3)
Impressum