
D front-end changes: - Import dmd v2.101.0-beta.1. - Add predefined version `D_Optimized' when compiling with `-O'. - Shortened method syntax (DIP1043) is now enabled by default. - Array literals assigned to `scope' array variables are now allocated on the stack. - Implement `@system' variables (DIP1035), available behind the preview feature flag `-fpreview=systemvariables'. D runtime changes: - Import druntime v2.101.0-beta.1. Phobos changes: - Import phobos v2.101.0-beta.1. - Added `std.typecons.SafeRefCounted', that can be used in `@safe' code with `-fpreview=dip1000'. gcc/d/ChangeLog: * d-attribs.cc (apply_user_attributes): Update for new front-end interface. * d-builtins.cc (d_init_versions): Predefine `D_Optimized' with compiling with optimizations enabled. * d-lang.cc (d_handle_option): Update for new front-end interface. Handle new option `-fpreview=systemvariables'. * dmd/MERGE: Merge upstream dmd e4f8919591. * dmd/VERSION: Bump version to v2.101.0-beta.1. * expr.cc (ExprVisitor::visit (AssignExp *)): Treat construction of static arrays from a call expression as a simple assignment. (ExprVisitor::visit (ArrayLiteralExp *)): Handle array literals with `scope' storage. * gdc.texi: Update documentation of `-fpreview=' options. * lang.opt (fpreview=shortenedmethods): Remove. (fpreview=systemvariables): New option. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e4f8919591. * src/MERGE: Merge upstream phobos 3ad507b51. gcc/testsuite/ChangeLog: * gdc.dg/simd19630.d: Move tests with errors to ... * gdc.dg/simd19630b.d: ... here. New test. * gdc.dg/simd19630c.d: New test. * gdc.dg/simd_ctfe.d: Removed. * gdc.dg/simd18867.d: New test. * gdc.dg/simd19788.d: New test. * gdc.dg/simd21469.d: New test. * gdc.dg/simd21672.d: New test. * gdc.dg/simd23077.d: New test. * gdc.dg/simd23084.d: New test. * gdc.dg/simd23085.d: New test. * gdc.dg/torture/simd19632.d: New test. * gdc.dg/torture/simd20041.d: New test. * gdc.dg/torture/simd21673.d: New test. * gdc.dg/torture/simd21676.d: New test. * gdc.dg/torture/simd22438.d: New test. * gdc.dg/torture/simd23009.d: New test. * gdc.dg/torture/simd23077.d: New test. * gdc.dg/torture/simd8.d: New test. * gdc.dg/torture/simd9.d: New test. * gdc.dg/torture/simd_prefetch.d: New test.
267 lines
5.7 KiB
D
267 lines
5.7 KiB
D
/**
|
|
* Windows API header module
|
|
*
|
|
* Translated from MinGW Windows headers
|
|
*
|
|
* Authors: Stewart Gordon
|
|
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
|
|
* Source: $(DRUNTIMESRC core/sys/windows/_iprtrmib.d)
|
|
*/
|
|
module core.sys.windows.iprtrmib;
|
|
version (Windows):
|
|
|
|
import core.sys.windows.ipifcons;
|
|
import core.sys.windows.windef;
|
|
|
|
// FIXME: check types of constants
|
|
|
|
enum size_t
|
|
MAXLEN_PHYSADDR = 8,
|
|
MAXLEN_IFDESCR = 256,
|
|
MAX_INTERFACE_NAME_LEN = 256;
|
|
|
|
enum {
|
|
MIB_IPNET_TYPE_OTHER = 1,
|
|
MIB_IPNET_TYPE_INVALID,
|
|
MIB_IPNET_TYPE_DYNAMIC,
|
|
MIB_IPNET_TYPE_STATIC
|
|
}
|
|
|
|
enum {
|
|
MIB_TCP_RTO_OTHER = 1,
|
|
MIB_TCP_RTO_CONSTANT,
|
|
MIB_TCP_RTO_RSRE,
|
|
MIB_TCP_RTO_VANJ
|
|
}
|
|
|
|
enum {
|
|
MIB_TCP_STATE_CLOSED = 1,
|
|
MIB_TCP_STATE_LISTEN,
|
|
MIB_TCP_STATE_SYN_SENT,
|
|
MIB_TCP_STATE_SYN_RCVD,
|
|
MIB_TCP_STATE_ESTAB,
|
|
MIB_TCP_STATE_FIN_WAIT1,
|
|
MIB_TCP_STATE_FIN_WAIT2,
|
|
MIB_TCP_STATE_CLOSE_WAIT,
|
|
MIB_TCP_STATE_CLOSING,
|
|
MIB_TCP_STATE_LAST_ACK,
|
|
MIB_TCP_STATE_TIME_WAIT,
|
|
MIB_TCP_STATE_DELETE_TCB // = 12
|
|
}
|
|
|
|
enum DWORD
|
|
MIB_USE_CURRENT_TTL = -1,
|
|
MIB_USE_CURRENT_FORWARDING = -1,
|
|
MIB_TCP_MAXCONN_DYNAMIC = -1;
|
|
|
|
struct MIB_IPADDRROW {
|
|
DWORD dwAddr;
|
|
DWORD dwIndex;
|
|
DWORD dwMask;
|
|
DWORD dwBCastAddr;
|
|
DWORD dwReasmSize;
|
|
ushort unused1;
|
|
ushort unused2;
|
|
}
|
|
alias MIB_IPADDRROW* PMIB_IPADDRROW;
|
|
|
|
struct MIB_IPADDRTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_IPADDRROW[1] _table;
|
|
|
|
MIB_IPADDRROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_IPADDRTABLE* PMIB_IPADDRTABLE;
|
|
|
|
struct MIB_IPFORWARDROW {
|
|
DWORD dwForwardDest;
|
|
DWORD dwForwardMask;
|
|
DWORD dwForwardPolicy;
|
|
DWORD dwForwardNextHop;
|
|
DWORD dwForwardIfIndex;
|
|
DWORD dwForwardType;
|
|
DWORD dwForwardProto;
|
|
DWORD dwForwardAge;
|
|
DWORD dwForwardNextHopAS;
|
|
DWORD dwForwardMetric1;
|
|
DWORD dwForwardMetric2;
|
|
DWORD dwForwardMetric3;
|
|
DWORD dwForwardMetric4;
|
|
DWORD dwForwardMetric5;
|
|
}
|
|
alias MIB_IPFORWARDROW* PMIB_IPFORWARDROW;
|
|
|
|
struct MIB_IPFORWARDTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_IPFORWARDROW[1] _table;
|
|
|
|
MIB_IPFORWARDROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_IPFORWARDTABLE* PMIB_IPFORWARDTABLE;
|
|
|
|
struct MIB_IPNETROW {
|
|
DWORD dwIndex;
|
|
DWORD dwPhysAddrLen;
|
|
BYTE[MAXLEN_PHYSADDR] bPhysAddr;
|
|
DWORD dwAddr;
|
|
DWORD dwType;
|
|
}
|
|
alias MIB_IPNETROW* PMIB_IPNETROW;
|
|
|
|
struct MIB_IPNETTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_IPNETROW[1] _table;
|
|
|
|
MIB_IPNETROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_IPNETTABLE* PMIB_IPNETTABLE;
|
|
|
|
struct MIBICMPSTATS {
|
|
DWORD dwMsgs;
|
|
DWORD dwErrors;
|
|
DWORD dwDestUnreachs;
|
|
DWORD dwTimeExcds;
|
|
DWORD dwParmProbs;
|
|
DWORD dwSrcQuenchs;
|
|
DWORD dwRedirects;
|
|
DWORD dwEchos;
|
|
DWORD dwEchoReps;
|
|
DWORD dwTimestamps;
|
|
DWORD dwTimestampReps;
|
|
DWORD dwAddrMasks;
|
|
DWORD dwAddrMaskReps;
|
|
}
|
|
alias MIBICMPSTATS* PMIBICMPSTATS;
|
|
|
|
struct MIBICMPINFO {
|
|
MIBICMPSTATS icmpInStats;
|
|
MIBICMPSTATS icmpOutStats;
|
|
}
|
|
alias MIBICMPINFO* PMIBICMPINFO;
|
|
|
|
struct MIB_ICMP {
|
|
MIBICMPINFO stats;
|
|
}
|
|
alias MIB_ICMP* PMIB_ICMP;
|
|
|
|
struct MIB_IFROW {
|
|
WCHAR[MAX_INTERFACE_NAME_LEN] wszName = 0;
|
|
DWORD dwIndex;
|
|
DWORD dwType;
|
|
DWORD dwMtu;
|
|
DWORD dwSpeed;
|
|
DWORD dwPhysAddrLen;
|
|
BYTE[MAXLEN_PHYSADDR] bPhysAddr;
|
|
DWORD dwAdminStatus;
|
|
DWORD dwOperStatus;
|
|
DWORD dwLastChange;
|
|
DWORD dwInOctets;
|
|
DWORD dwInUcastPkts;
|
|
DWORD dwInNUcastPkts;
|
|
DWORD dwInDiscards;
|
|
DWORD dwInErrors;
|
|
DWORD dwInUnknownProtos;
|
|
DWORD dwOutOctets;
|
|
DWORD dwOutUcastPkts;
|
|
DWORD dwOutNUcastPkts;
|
|
DWORD dwOutDiscards;
|
|
DWORD dwOutErrors;
|
|
DWORD dwOutQLen;
|
|
DWORD dwDescrLen;
|
|
BYTE[MAXLEN_IFDESCR] bDescr;
|
|
}
|
|
alias MIB_IFROW* PMIB_IFROW;
|
|
|
|
struct MIB_IFTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_IFROW[1] _table;
|
|
|
|
MIB_IFROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_IFTABLE* PMIB_IFTABLE;
|
|
|
|
struct MIB_IPSTATS {
|
|
DWORD dwForwarding;
|
|
DWORD dwDefaultTTL;
|
|
DWORD dwInReceives;
|
|
DWORD dwInHdrErrors;
|
|
DWORD dwInAddrErrors;
|
|
DWORD dwForwDatagrams;
|
|
DWORD dwInUnknownProtos;
|
|
DWORD dwInDiscards;
|
|
DWORD dwInDelivers;
|
|
DWORD dwOutRequests;
|
|
DWORD dwRoutingDiscards;
|
|
DWORD dwOutDiscards;
|
|
DWORD dwOutNoRoutes;
|
|
DWORD dwReasmTimeout;
|
|
DWORD dwReasmReqds;
|
|
DWORD dwReasmOks;
|
|
DWORD dwReasmFails;
|
|
DWORD dwFragOks;
|
|
DWORD dwFragFails;
|
|
DWORD dwFragCreates;
|
|
DWORD dwNumIf;
|
|
DWORD dwNumAddr;
|
|
DWORD dwNumRoutes;
|
|
}
|
|
alias MIB_IPSTATS* PMIB_IPSTATS;
|
|
|
|
struct MIB_TCPSTATS {
|
|
DWORD dwRtoAlgorithm;
|
|
DWORD dwRtoMin;
|
|
DWORD dwRtoMax;
|
|
DWORD dwMaxConn;
|
|
DWORD dwActiveOpens;
|
|
DWORD dwPassiveOpens;
|
|
DWORD dwAttemptFails;
|
|
DWORD dwEstabResets;
|
|
DWORD dwCurrEstab;
|
|
DWORD dwInSegs;
|
|
DWORD dwOutSegs;
|
|
DWORD dwRetransSegs;
|
|
DWORD dwInErrs;
|
|
DWORD dwOutRsts;
|
|
DWORD dwNumConns;
|
|
}
|
|
alias MIB_TCPSTATS* PMIB_TCPSTATS;
|
|
|
|
struct MIB_TCPROW {
|
|
DWORD dwState;
|
|
DWORD dwLocalAddr;
|
|
DWORD dwLocalPort;
|
|
DWORD dwRemoteAddr;
|
|
DWORD dwRemotePort;
|
|
}
|
|
alias MIB_TCPROW* PMIB_TCPROW;
|
|
|
|
struct MIB_TCPTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_TCPROW[1] _table;
|
|
|
|
MIB_TCPROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_TCPTABLE* PMIB_TCPTABLE;
|
|
|
|
struct MIB_UDPSTATS {
|
|
DWORD dwInDatagrams;
|
|
DWORD dwNoPorts;
|
|
DWORD dwInErrors;
|
|
DWORD dwOutDatagrams;
|
|
DWORD dwNumAddrs;
|
|
}
|
|
alias MIB_UDPSTATS* PMIB_UDPSTATS;
|
|
|
|
struct MIB_UDPROW {
|
|
DWORD dwLocalAddr;
|
|
DWORD dwLocalPort;
|
|
}
|
|
alias MIB_UDPROW* PMIB_UDPROW;
|
|
|
|
struct MIB_UDPTABLE {
|
|
DWORD dwNumEntries;
|
|
MIB_UDPROW[1] _table;
|
|
|
|
MIB_UDPROW* table() return { return _table.ptr; }
|
|
}
|
|
alias MIB_UDPTABLE* PMIB_UDPTABLE;
|