getdns_display_ip_address(3)
getdns_display_ip_address π
okay bestie, welcome to the getdns manual, section 3 π this one's about turning a squishy blob of bytes into an actual human-readable IP address string, and honestly? it's giving glow-up β¨
NAME πΈ
getdns_display_ip_address β convert an getdns ip address to string π
LIBRARY π¦
DNS Resolver library (libgetdns, -lgetdns) π
SYNOPSIS β¨
#include <getdns.h>
char *
getdns_display_ip_address (const getdns_bindata *ipv4_or_ipv6_addr)
like, look at her. so simple. so elegant. main character energy fr fr π
DESCRIPTION π
okay so this helper function hands you back a nicely formatted string representation of the IPv4 or IPv6 address. that's the whole job, and she does it flawlessly, no cap π―
and how does she know which one it is? the length of the bindata is what determines whether the address is IPv4 or IPv6. she's literally just vibing off the size, and she's always right π§
ipv4_or_ipv6_addrβ bindata of the address to print π¨οΈ
RETURN VALUES π
she returns a string representation of the IP address (allocated using the system allocator β malloc), and the caller is responsible for freeing the storage using free(). so likeβ¦ do not forget, bestie. that memory is yours now. she handed you the keys, you gotta park the car ππ¨
not you leaking memory because you forgot the free()β¦ couldn't be you. right? RIGHT? π
EXAMPLES π
TBD π (yes really, that's what it says. the examples are still in their flop era. we'll get there.)
SEE ALSO β
libgetdns(3)π«Ά
k that's the whole page, you ate that π go forth and format your IP addresses, icon β¨
this has been getdns_display_ip_address(3) from getdns 1.7.3, dated December 2015 β mwah, love u, byeeee πππ
π¦ where this page comes from
- alpine 3.24: getdns-doc 1.7.3-r0 Β· BSD-3-Clause
- arch rolling: getdns 1.7.3-2 Β· BSD
- epel 10: getdns-devel 1.7.3-9.el10_2 Β· BSD-3-Clause
- epel 9: getdns-devel 1.7.3-1.el9 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 43: getdns-devel 1.7.3-9.fc43 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- fedora 44: getdns-devel 1.7.3-10.fc44 Β· BSD-3-Clause
- nixpkgs unstable: getdns 1.7.3
- ubuntu resolute: libgetdns-dev 1.7.3-3 Β· BSD-3-Clause
- ubuntu stonking: libgetdns-dev 1.7.3-5build1 Β· BSD-3-Clause
- Copyright (c) 2013, NLnet Labs, Verisign, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms