1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * Authors: Stewart Gordon 7 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 8 * Source: $(DRUNTIMESRC core/sys/windows/_iptypes.d) 9 */ 10 module core.sys.windows.iptypes; 11 version (Windows): 12 13 import core.sys.windows.windef; 14 import core.stdc.time; 15 //#include <sys/types.h> 16 17 enum size_t 18 DEFAULT_MINIMUM_ENTITIES = 32, 19 MAX_ADAPTER_ADDRESS_LENGTH = 8, 20 MAX_ADAPTER_DESCRIPTION_LENGTH = 128, 21 MAX_ADAPTER_NAME_LENGTH = 256, 22 MAX_DOMAIN_NAME_LEN = 128, 23 MAX_HOSTNAME_LEN = 128, 24 MAX_SCOPE_ID_LEN = 256; 25 26 enum UINT 27 BROADCAST_NODETYPE = 1, 28 PEER_TO_PEER_NODETYPE = 2, 29 MIXED_NODETYPE = 4, 30 HYBRID_NODETYPE = 8; 31 32 enum : UINT { 33 IF_OTHER_ADAPTERTYPE, 34 IF_ETHERNET_ADAPTERTYPE, 35 IF_TOKEN_RING_ADAPTERTYPE, 36 IF_FDDI_ADAPTERTYPE, 37 IF_PPP_ADAPTERTYPE, 38 IF_LOOPBACK_ADAPTERTYPE // = 5 39 } 40 41 struct IP_ADDRESS_STRING { 42 char[16] String = 0; 43 } 44 alias IP_ADDRESS_STRING IP_MASK_STRING; 45 alias IP_ADDRESS_STRING* PIP_ADDRESS_STRING, PIP_MASK_STRING; 46 47 struct IP_ADDR_STRING { 48 IP_ADDR_STRING* Next; 49 IP_ADDRESS_STRING IpAddress; 50 IP_MASK_STRING IpMask; 51 DWORD Context; 52 } 53 alias IP_ADDR_STRING* PIP_ADDR_STRING; 54 55 struct IP_ADAPTER_INFO { 56 IP_ADAPTER_INFO* Next; 57 DWORD ComboIndex; 58 char[MAX_ADAPTER_NAME_LENGTH+4] AdapterName = 0; 59 char[MAX_ADAPTER_DESCRIPTION_LENGTH+4] Description = 0; 60 UINT AddressLength; 61 BYTE[MAX_ADAPTER_ADDRESS_LENGTH] Address = 0; 62 DWORD Index; 63 UINT Type; 64 UINT DhcpEnabled; 65 PIP_ADDR_STRING CurrentIpAddress; 66 IP_ADDR_STRING IpAddressList; 67 IP_ADDR_STRING GatewayList; 68 IP_ADDR_STRING DhcpServer; 69 BOOL HaveWins; 70 IP_ADDR_STRING PrimaryWinsServer; 71 IP_ADDR_STRING SecondaryWinsServer; 72 time_t LeaseObtained; 73 time_t LeaseExpires; 74 } 75 alias IP_ADAPTER_INFO* PIP_ADAPTER_INFO; 76 77 struct IP_PER_ADAPTER_INFO { 78 UINT AutoconfigEnabled; 79 UINT AutoconfigActive; 80 PIP_ADDR_STRING CurrentDnsServer; 81 IP_ADDR_STRING DnsServerList; 82 } 83 alias IP_PER_ADAPTER_INFO* PIP_PER_ADAPTER_INFO; 84 85 struct FIXED_INFO { 86 char[MAX_HOSTNAME_LEN+4] HostName = 0; 87 char[MAX_DOMAIN_NAME_LEN+4] DomainName = 0; 88 PIP_ADDR_STRING CurrentDnsServer; 89 IP_ADDR_STRING DnsServerList; 90 UINT NodeType; 91 char[MAX_SCOPE_ID_LEN+4] ScopeId = 0; 92 UINT EnableRouting; 93 UINT EnableProxy; 94 UINT EnableDns; 95 } 96 alias FIXED_INFO* PFIXED_INFO;