gcc/libphobos/libdruntime/core/sys/linux/ifaddrs.d
Iain Buclaw 92dd3e71f9 libphobos: Synchronize libdruntime bindings with upstream druntime
Reviewed-on: https://github.com/dlang/druntime/pull/3348

gcc/d/ChangeLog:

	* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
	layout m_arg1 and m_arg2 fields.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* libdruntime/MERGE: Merge upstream druntime e4aae28e.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Refresh module list.
	(DRUNTIME_DSOURCES_BIONIC): Add core/sys/bionic/err.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/err.d,
	core/sys/darwin/ifaddrs.d, core/sys/darwin/mach/nlist.d,
	core/sys/darwin/mach/stab.d, and core/sys/darwin/sys/attr.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/err.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/err.d.
	(DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/err.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/err.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/err.d.
	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/locale.d,
	core/sys/posix/stdc/time.d, core/sys/posix/string.d, and
	core/sys/posix/strings.d.
	(DRUNTIME_DSOURCES_SOLARIS): Add core/sys/solaris/err.d.
	(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/sdkddkver.d,
	and core/sys/windows/stdc/time.d
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/sections/elf_shared.d (sizeofTLS): New function.
	* testsuite/libphobos.thread/fiber_guard_page.d: Use
	__traits(getMember) to get internal fields.
2021-01-30 16:50:57 +01:00

56 lines
1.4 KiB
D

/*******************************************************************************
D binding for the interface addresses querying
Defines functions getifaddrs/freeifaddrs and the structure
they operate on.
getifaddrs(3) get interface addresses
freeifaddrs(3) deallocates the structure returned from getifaddrs
Copyright: Copyright (c) 2016 Sociomantic Labs. All rights reserved.
License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
Authors: Nemanja Boric
*******************************************************************************/
module core.sys.linux.ifaddrs;
import core.sys.posix.sys.socket;
version (linux):
extern (C):
nothrow:
@nogc:
@system:
struct ifaddrs
{
/// Next item in the list
ifaddrs* ifa_next;
/// Name of the interface
char* ifa_name;
/// Flags from SIOCGIFFLAGS
uint ifa_flags;
/// Address of interface
sockaddr* ifa_addr;
/// Netmask of interface
sockaddr* ifa_netmask;
union
{
/// Broadcast address of the interface
sockaddr* ifu_broadaddr;
/// Point-to-point destination addresss
sockaddr* if_dstaddr;
}
/// Address specific data
void* ifa_data;
}
/// Returns: linked list of ifaddrs structures describing interfaces
int getifaddrs(ifaddrs** );
/// Frees the linked list returned by getifaddrs
void freeifaddrs(ifaddrs* );