.\" Man page generated from reStructuredText. . .TH "TSURLHOSTGET" "3ts" "Mar 08, 2019" "7.1" "Apache Traffic Server" .SH NAME TSUrlHostGet \- traffic Server URL component retrieval API . .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 const char * TSUrlHostGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlSchemeGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlUserGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlPasswordGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int*\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B int TSUrlPortGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlPathGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlHttpQueryGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlHttpParamsGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .INDENT 0.0 .TP .B const char * TSUrlHttpFragmentGet(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, int *\fI\ length\fP) .UNINDENT .SH DESCRIPTION .sp The URL data structure is a parsed version of a standard internet URL. The Traffic Server URL API provides access to URL data stored in marshal buffers. The URL functions can create, copy, retrieve or delete entire URLs, and retrieve or modify parts of URLs, such as their host, port or scheme information. .sp \fI\%TSUrlSchemeGet()\fP, \fI\%TSUrlUserGet()\fP, \fI\%TSUrlPasswordGet()\fP, \fI\%TSUrlHostGet()\fP, \fI\%TSUrlHttpParamsGet()\fP, \fI\%TSUrlHttpQueryGet()\fP and \fI\%TSUrlHttpFragmentGet()\fP each retrieve an internal pointer to the specified portion of the URL from the marshall buffer \fIbufp\fP\&. The length of the returned string is placed in \fIlength\fP and a pointer to the URL portion is returned. .sp \fI\%TSUrlPortGet()\fP retrieves the port number portion of the URL located at \fIoffset\fP within the marshal buffer \fIbufp\fP\&. If there is no explicit port number in the URL, a canonicalized valued is returned based on the URL scheme. .SH RETURN VALUES .sp All APIs except \fI\%TSUrlPortGet()\fP returns a string, which is not guaranteed to be NULL terminated. You must therefore always use the \fIlength\fP value to determine the actual length of the returned string. .sp \fI\%TSUrlPortGet()\fP simply returns the port number as an integer, possibly canonicalized with \fB80\fP for HTTP and \fB443\fP for HTTPS schemes. If there is neither port nor scheme information available in the URL, \fB0\fP is returned. .SH SEE ALSO .sp \fBTSAPI(3ts)\fP, \fBTSUrlCreate(3ts)\fP, \fBTSUrlHostSet(3ts)\fP, \fBTSUrlStringGet(3ts)\fP, \fBTSUrlPercentEncode(3ts)\fP .SH COPYRIGHT 2019, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .