.\" Man page generated from reStructuredText. . .TH "TSHOSTLOOKUP" "3ts" "Jan 04, 2023" "8.1" "Apache Traffic Server" .SH NAME TSHostLookup \- TSHostLookup API function . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B TSAction TSHostLookup(TSCont \fIcontp\fP, const char *\fIhostname\fP, size_t \fInamelen\fP) .UNINDENT .SH DESCRIPTION .sp Attempts host name resolution for the given \fIhostname\fP with length \fInamelen\fP\&. When a result is ready the handler of \fIcontp\fP is called with the \fBTS_EVENT_HOST_LOOKUP\fP event and a \fBTSHostLookupResult\fP\&. Use \fBTSHostLookupResultAddrGet()\fP to retrieve the resulting address from the \fBTSHostLookupResult\fP\&. .sp A call to \fI\%TSHostLookup()\fP may be synchronous—in which case the handler for \fIcontp\fP will be called with the answer before the call to \fI\%TSHostLookup()\fP returns—or the call to \fI\%TSHostLookup()\fP may be asynchronous—in which case it returns immediately with a \fBTSAction\fP, and the handler \fIcontp\fP will be called in the future. See \&../../plugins/actions/index.en for guidance. .sp In particular, \fIcontp\fP must have been created with a \fBTSMutex\fP; see \fBTSContCreate()\fP .SH COPYRIGHT 2023, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .