Lines 91-97
host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen)
Link Here
|
91 |
* Returns address info structure, or NULL if an error occurs. Caller |
91 |
* Returns address info structure, or NULL if an error occurs. Caller |
92 |
* must free the returned structure with freeaddrinfo(3). |
92 |
* must free the returned structure with freeaddrinfo(3). |
93 |
*/ |
93 |
*/ |
94 |
__attribute_malloc__ |
94 |
__attribute__((__malloc__)) |
95 |
struct addrinfo * |
95 |
struct addrinfo * |
96 |
host_pton(const char *paddr) |
96 |
host_pton(const char *paddr) |
97 |
{ |
97 |
{ |
Lines 153-159
host_pton(const char *paddr)
Link Here
|
153 |
* if no information is available for @hostname. Caller must free the |
153 |
* if no information is available for @hostname. Caller must free the |
154 |
* returned structure with freeaddrinfo(3). |
154 |
* returned structure with freeaddrinfo(3). |
155 |
*/ |
155 |
*/ |
156 |
__attribute_malloc__ |
156 |
__attribute__((__malloc__)) |
157 |
struct addrinfo * |
157 |
struct addrinfo * |
158 |
host_addrinfo(const char *hostname) |
158 |
host_addrinfo(const char *hostname) |
159 |
{ |
159 |
{ |
Lines 199-205
host_addrinfo(const char *hostname)
Link Here
|
199 |
* the string. |
199 |
* the string. |
200 |
*/ |
200 |
*/ |
201 |
#ifdef HAVE_GETNAMEINFO |
201 |
#ifdef HAVE_GETNAMEINFO |
202 |
__attribute_malloc__ |
202 |
__attribute__((__malloc__)) |
203 |
char * |
203 |
char * |
204 |
host_canonname(const struct sockaddr *sap) |
204 |
host_canonname(const struct sockaddr *sap) |
205 |
{ |
205 |
{ |
Lines 234-240
host_canonname(const struct sockaddr *sap)
Link Here
|
234 |
return strdup(buf); |
234 |
return strdup(buf); |
235 |
} |
235 |
} |
236 |
#else /* !HAVE_GETNAMEINFO */ |
236 |
#else /* !HAVE_GETNAMEINFO */ |
237 |
__attribute_malloc__ |
237 |
__attribute__((__malloc__)) |
238 |
char * |
238 |
char * |
239 |
host_canonname(const struct sockaddr *sap) |
239 |
host_canonname(const struct sockaddr *sap) |
240 |
{ |
240 |
{ |
Lines 266-272
host_canonname(const struct sockaddr *sap)
Link Here
|
266 |
* |
266 |
* |
267 |
* Caller must free the returned structure with freeaddrinfo(3). |
267 |
* Caller must free the returned structure with freeaddrinfo(3). |
268 |
*/ |
268 |
*/ |
269 |
__attribute_malloc__ |
269 |
__attribute__((__malloc__)) |
270 |
struct addrinfo * |
270 |
struct addrinfo * |
271 |
host_reliable_addrinfo(const struct sockaddr *sap) |
271 |
host_reliable_addrinfo(const struct sockaddr *sap) |
272 |
{ |
272 |
{ |
Lines 313-319
out_free_hostname:
Link Here
|
313 |
* Caller must free the returned structure with freeaddrinfo(3). |
313 |
* Caller must free the returned structure with freeaddrinfo(3). |
314 |
*/ |
314 |
*/ |
315 |
#ifdef HAVE_GETNAMEINFO |
315 |
#ifdef HAVE_GETNAMEINFO |
316 |
__attribute_malloc__ |
316 |
__attribute__((__malloc__)) |
317 |
struct addrinfo * |
317 |
struct addrinfo * |
318 |
host_numeric_addrinfo(const struct sockaddr *sap) |
318 |
host_numeric_addrinfo(const struct sockaddr *sap) |
319 |
{ |
319 |
{ |
Lines 361-367
host_numeric_addrinfo(const struct sockaddr *sap)
Link Here
|
361 |
return ai; |
361 |
return ai; |
362 |
} |
362 |
} |
363 |
#else /* !HAVE_GETNAMEINFO */ |
363 |
#else /* !HAVE_GETNAMEINFO */ |
364 |
__attribute_malloc__ |
364 |
__attribute__((__malloc__)) |
365 |
struct addrinfo * |
365 |
struct addrinfo * |
366 |
host_numeric_addrinfo(const struct sockaddr *sap) |
366 |
host_numeric_addrinfo(const struct sockaddr *sap) |
367 |
{ |
367 |
{ |