TSHOSTLOO...ULTADDRGET(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

✨ 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 😭✨


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