Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

IPTypes.h

Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 1995-1999  Microsoft Corporation
00004 
00005 Module Name:
00006 
00007     iptypes.h
00008 
00009 */
00010 
00011 #ifndef IP_TYPES_INCLUDED
00012 #define IP_TYPES_INCLUDED
00013 
00014 #if _MSC_VER > 1000
00015 #pragma once
00016 #endif
00017 
00018 #include <time.h>
00019 
00020 // Definitions and structures used by getnetworkparams and getadaptersinfo apis
00021 
00022 #define MAX_ADAPTER_DESCRIPTION_LENGTH  128 // arb.
00023 #define MAX_ADAPTER_NAME_LENGTH         256 // arb.
00024 #define MAX_ADAPTER_ADDRESS_LENGTH      8   // arb.
00025 #define DEFAULT_MINIMUM_ENTITIES        32  // arb.
00026 #define MAX_HOSTNAME_LEN                128 // arb.
00027 #define MAX_DOMAIN_NAME_LEN             128 // arb.
00028 #define MAX_SCOPE_ID_LEN                256 // arb.
00029 
00030 //
00031 // types
00032 //
00033 
00034 // Node Type
00035 
00036 #define BROADCAST_NODETYPE              1
00037 #define PEER_TO_PEER_NODETYPE           2
00038 #define MIXED_NODETYPE                  4
00039 #define HYBRID_NODETYPE                 8
00040 
00041 // Adapter Type
00042 
00043 #define IF_OTHER_ADAPTERTYPE            0
00044 #define IF_ETHERNET_ADAPTERTYPE         1
00045 #define IF_TOKEN_RING_ADAPTERTYPE       2
00046 #define IF_FDDI_ADAPTERTYPE             3
00047 #define IF_PPP_ADAPTERTYPE              4
00048 #define IF_LOOPBACK_ADAPTERTYPE         5
00049 #define IF_SLIP_ADAPTERTYPE             6
00050 
00051 //
00052 // IP_ADDRESS_STRING - store an IP address as a dotted decimal string
00053 //
00054 
00055 typedef struct {
00056     char String[4 * 4];
00057 } IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING;
00058 
00059 //
00060 // IP_ADDR_STRING - store an IP address with its corresponding subnet mask,
00061 // both as dotted decimal strings
00062 //
00063 
00064 typedef struct _IP_ADDR_STRING {
00065     struct _IP_ADDR_STRING* Next;
00066     IP_ADDRESS_STRING IpAddress;
00067     IP_MASK_STRING IpMask;
00068     DWORD Context;
00069 } IP_ADDR_STRING, *PIP_ADDR_STRING;
00070 
00071 //
00072 // ADAPTER_INFO - per-adapter information. All IP addresses are stored as
00073 // strings
00074 //
00075 
00076 typedef struct _IP_ADAPTER_INFO {
00077     struct _IP_ADAPTER_INFO* Next;
00078     DWORD ComboIndex;
00079     char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
00080     char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
00081     UINT AddressLength;
00082     BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
00083     DWORD Index;
00084     UINT Type;
00085     UINT DhcpEnabled;
00086     PIP_ADDR_STRING CurrentIpAddress;
00087     IP_ADDR_STRING IpAddressList;
00088     IP_ADDR_STRING GatewayList;
00089     IP_ADDR_STRING DhcpServer;
00090     BOOL HaveWins;
00091     IP_ADDR_STRING PrimaryWinsServer;
00092     IP_ADDR_STRING SecondaryWinsServer;
00093     time_t LeaseObtained;
00094     time_t LeaseExpires;
00095 } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
00096 
00097 //
00098 // IP_PER_ADAPTER_INFO - per-adapter IP information such as DNS server list.
00099 //
00100 
00101 typedef struct _IP_PER_ADAPTER_INFO {
00102     UINT AutoconfigEnabled;
00103     UINT AutoconfigActive;
00104     PIP_ADDR_STRING CurrentDnsServer;
00105     IP_ADDR_STRING DnsServerList;
00106 } IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO;
00107 
00108 //
00109 // FIXED_INFO - the set of IP-related information which does not depend on DHCP
00110 //
00111 
00112 typedef struct {
00113     char HostName[MAX_HOSTNAME_LEN + 4] ;
00114     char DomainName[MAX_DOMAIN_NAME_LEN + 4];
00115     PIP_ADDR_STRING CurrentDnsServer;
00116     IP_ADDR_STRING DnsServerList;
00117     UINT NodeType;
00118     char ScopeId[MAX_SCOPE_ID_LEN + 4];
00119     UINT EnableRouting;
00120     UINT EnableProxy;
00121     UINT EnableDns;
00122 } FIXED_INFO, *PFIXED_INFO;
00123 
00124 #endif

Generated on Sun May 14 14:51:19 2006 by  doxygen 1.4.2