TSHOSTLOO...ULTADDRGET(3ts)
β¨ TSHostLookupResultAddrGet β¨
okay bestie, so this is the manual page for TSHostLookupResultAddrGet in the Apache Traffic Server gang, section 3ts π it's the glow-up moment where you finally get your hands on that address pointer. no cap.
πΈ NAME πΈ
TSHostLookupResultAddrGet β the TSHostLookupResultAddrGet API function, and yes she said her own name twice because she's that girl π
π¦ SYNOPSIS π¦
#include <ts/ts.h>
sockaddr const *TSHostLookupResultAddrGet(TSHostLookupResult
lookup_result)
like, that's the whole vibe. include the header, call the function, get a sockaddr const * back. periodt.
π DESCRIPTION π
so what she does is she grabs you the pointer to a sockaddr for the lookup_result you're holding β and that lookup_result came from a previous call to TSHostLookup(). it's giving "you already did the lookup, now lemme hand you the address" π«Ά
for example, look at this iconic little handler:
int
handler(TSCont contp, TSEvent event, void *edata) {
if (event == TS_EVENT_HOST_LOOKUP) {
const sockaddr *addr = TSHostLookupResultAddrGet(static_cast<TSHostLookupResult>(edata));
// TODO Add logic here.
}
}
see how she waits for TS_EVENT_HOST_LOOKUP, then pulls the addr out of the edata by casting it to TSHostLookupResult? that's the move. and then the // TODO Add logic here. is literally just sitting there waiting for you to do the most, bestie πβ¨
π COPYRIGHT π
2026, dev@trafficserver.apache.org β the whole squad over at trafficserver dot apache dot org keeping it real π
and that's the tea, fr fr π this was Apache Traffic Server, version 9.2, dated Feb 12, 2026 β mwah, slay, go call TSHostLookup() and get your pointer, bestie ππ¦π
π¦ where this page comes from
- ubuntu noble: trafficserver-dev 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms