apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damir Dezeljin <program...@mbss.org>
Subject Question about apr_sockaddr_ip_get()
Date Mon, 17 Feb 2003 14:32:48 GMT
Hi.

I want to retrive an IP addr string from the apr_sockaddr_t so I used
apr_sockaddr_ip_get(). The first argument of this function is char ** .
Because I have to add a pointer to a pointer I think that the function
allocate automaticaly the memory for the destination char * . On the other
hand the function hasn't any apr_pool input parameter. However one
apr_pool is stored inside apr_sockaddr_t variable.

So the question is ... do I have to first alocate the memory for the
destination string?
If yes ... how much memory do I have to alocate (16 * sizeof(char) like in
samples or more so that IPv6 addresses can also fit inside the buffer)?

Regards,
Dezo


Mime
View raw message