core.sys.darwin.ifaddrs
Binding for Mac OSX's <ifaddr.h>, expose network interface addresses
The following functions are present as of Mac OSX 10.15:
- getifaddrs(3): get interface addresses
- freeifaddrs(3): deallocates the return value of
getifaddrs - getifmaddrs(3): get multicast group membership
- freeifmaddrs(3): deallocates the return value of
getifmaddrsCopyright
Copyright © 2020, The D Language Foundation
Types 2
structifaddrs
Fields
ifaddrs * ifa_nextNext item in the listchar * ifa_nameName of the interfaceuint ifa_flagsFlags from SIOCGIFFLAGSsockaddr * ifa_addrAddress of interfacesockaddr * ifa_netmaskNetmask of interfacesockaddr * if_dstaddrPoint-to-point destination addresssvoid * ifa_dataAddress specific datastructifmaddrs
Fields
ifmaddrs * ifma_nextPointer to next structsockaddr * ifma_nameInterface name (AF_LINK)sockaddr * ifma_addrMulticast addresssockaddr * ifma_lladdrLink-layer translation, if anyFunctions 4
fn
int getifaddrs(ifaddrs * *) extern(C) nothrow @nogcReturns: linked list of ifaddrs structures describing interfacesfn
int getifmaddrs(ifmaddrs * *) extern(C) nothrow @nogcStores a reference to a linked list of the multicast memberships on the local machine in the memory referenced by ifmaddrs