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