MCPcopy Create free account
hub / github.com/apache/trafficserver / ats_is_ip_loopback

Function ats_is_ip_loopback

include/tscore/ink_inet.h:704–709  ·  view source on GitHub ↗

Check for loopback. @return @c true if this is an IP loopback address, @c false otherwise.

Source from the content-addressed store, hash-verified

702/// Check for loopback.
703/// @return @c true if this is an IP loopback address, @c false otherwise.
704inline bool
705ats_is_ip_loopback(sockaddr const *ip)
706{
707 return ip && ((AF_INET == ip->sa_family && 0x7F == ats_ip_addr8_cast(ip)[0]) ||
708 (AF_INET6 == ip->sa_family && IN6_IS_ADDR_LOOPBACK(&ats_ip6_addr_cast(ip))));
709}
710
711/// Check for loopback.
712/// @return @c true if this is an IP loopback address, @c false otherwise.

Callers 3

MachineMethod · 0.85
ats_ip_getbestaddrinfoFunction · 0.85
client_handlerFunction · 0.85

Calls 1

ats_ip_addr8_castFunction · 0.85

Tested by 1

client_handlerFunction · 0.68