Edited includes for new tcp ioctl needed by iphlpapi.

tcpioctl.h: new
I resolved a conflict between iptypes, structs and nspapi regarding some
core structures.
afd.h: removed definitions needed by both user land and kernel land.
tdiinfo.h: added needed definitions.

svn path=/trunk/; revision=8173
This commit is contained in:
Art Yerkes 2004-02-14 21:27:35 +00:00
parent 6817aa33e1
commit 8c9fd64030
7 changed files with 148 additions and 81 deletions

View file

@ -137,10 +137,6 @@ typedef struct IPADDR_ENTRY {
#define TL_INSTANCE 0
#define IP_MIB_STATS_ID 0x1
#define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
/* IPv4 header format */
typedef struct IPv4_HEADER {
UCHAR VerIHL; /* 4-bit version, 4-bit Internet Header Length */

View file

@ -19,6 +19,7 @@
#ifndef WINE_IPTYPES_H_
#define WINE_IPTYPES_H_
#include <nspapi.h>
#include <time.h>
#define MAX_ADAPTER_DESCRIPTION_LENGTH 128

View file

@ -150,6 +150,7 @@ typedef struct _TA_ADDRESS {
#define TdiConnectionContext "ConnectionContext"
#define TDI_TRANSPORT_ADDRESS_LENGTH (sizeof(TdiTransportAddress) - 1)
#define TDI_CONNECTION_CONTEXT_LENGTH (sizeof(TdiConnectionContext) - 1)
#define TDI_ADDRESS_HEADER_LEN (2 * sizeof(USHORT))
typedef struct _TRANSPORT_ADDRESS {
LONG TAAddressCount;

View file

@ -35,10 +35,13 @@ extern "C" {
#include "ntddk.h"
#ifndef TDI_SUCCESS
#define TDI_SUCCESS 0
#endif/*TDI_SUCCESS*/
typedef struct TDIEntityID {
ULONG tei_entity;
ULONG tei_instance;
ULONG tei_instance;
} TDIEntityID;
#define MAX_TDI_ENTITIES 512
@ -69,6 +72,16 @@ typedef struct TDIEntityID {
#define IF_GENERIC 0x200
#define IF_MIB 0x202
/* ID to use for requesting an IFEntry for an interface */
#define IF_MIB_STATS_ID 1
/* ID to use for requesting an IPSNMPInfo for an interface */
#define IP_MIB_STATS_ID 1 /* Hmm. I'm not sure I like this */
/* ID to use for requesting the route table */
#define IP_MIB_ROUTETABLE_ENTRY_ID 0x101
#define IP_MIB_ADDRTABLE_ENTRY_ID 102
/* TDIObjectID.toi_class constants */
#define INFO_CLASS_GENERIC 0x100
#define INFO_CLASS_PROTOCOL 0x200
@ -86,7 +99,132 @@ typedef struct _TDIObjectID {
ULONG toi_id;
} TDIObjectID;
#define CONTEXT_SIZE 16
#define MAX_PHYSADDR_SIZE 010
/* Basic interface information like from SIOCGIF* */
/* 0x5c bytes without description tail */
typedef struct _IFEntry {
ULONG if_index;
ULONG if_type;
ULONG if_mtu;
ULONG if_speed;
ULONG if_physaddrlen;
UCHAR if_physaddr[MAX_PHYSADDR_SIZE];
ULONG if_adminstatus;
ULONG if_operstatus;
ULONG if_lastchange;
ULONG if_inoctets;
ULONG if_inucastpkts;
ULONG if_innucastpkts;
ULONG if_indiscards;
ULONG if_inerrors;
ULONG if_inunknownprotos;
ULONG if_outoctets;
ULONG if_outucastpkts;
ULONG if_outnucastpkts;
ULONG if_outdiscards;
ULONG if_outerrors;
ULONG if_outqlen;
ULONG if_descrlen;
UCHAR if_descr[1];
} IFEntry;
/* Control information like from /proc/sys/net/ipv4/... */
/* 0x58 bytes */
#if 1
typedef struct _IPSNMPInfo {
ULONG ipsi_index;
ULONG ipsi_forwarding;
ULONG ipsi_defaultttl;
ULONG ipsi_inreceives;
ULONG ipsi_inhdrerrors;
ULONG ipsi_inaddrerrors;
ULONG ipsi_inunknownprotos;
ULONG ipsi_indiscards;
ULONG ipsi_indelivers;
ULONG ipsi_outrequests;
ULONG ipsi_routingdiscards;
ULONG ipsi_outdiscards;
ULONG ipsi_outnoroutes;
ULONG ipsi_reasmtimeout;
ULONG ipsi_reasmreqds;
ULONG ipsi_reasmoks;
ULONG ipsi_reasmfails;
ULONG ipsi_fragoks;
ULONG ipsi_fragfails;
ULONG ipsi_fragcreates;
ULONG ipsi_numif;
ULONG ipsi_numaddr;
ULONG ipsi_numroutes;
} IPSNMPInfo;
#else
typedef struct _IPSNMPInfo {
ULONG ipsi_forwarding;
ULONG ipsi_defaultttl;
ULONG ipsi_inreceives;
ULONG ipsi_inhdrerrors;
ULONG ipsi_inaddrerrors;
ULONG ipsi_inunknownprotos;
ULONG ipsi_indiscards;
ULONG ipsi_indelivers;
ULONG ipsi_outrequests;
ULONG ipsi_routingdiscards;
ULONG ipsi_outdiscards;
ULONG ipsi_outnoroutes;
ULONG ipsi_reasmtimeout;
ULONG ipsi_reasmreqds;
ULONG ipsi_reasmoks;
ULONG ipsi_reasmfails;
ULONG ipsi_fragoks;
ULONG ipsi_fragfails;
ULONG ipsi_fragcreates;
ULONG ipsi_numif;
ULONG ipsi_numaddr;
ULONG ipsi_numroutes;
} IPSNMPInfo;
#endif
// BEGIN ORIGINAL SOURCE INFORMATION --
// Gets ip info for the current interface list.
// Tom Sanfilippo
// tsanfilippo@earthlink.net
// December 12, 1999
// Thanks are due to Thomas F. Divine <tdivine@pcausa.com>
// for pointing out the updated wshsmple in the NT4DDK.
// The headers in that sample allowed the input parameters
// to finally be discovered.
// END ORIGINAL SOURCE INFORMATION --
typedef struct _IPRouteEntry {
ULONG ire_addr;
ULONG ire_index; //matches if_index in IFEntry and iae_index in IPAddrEntry
ULONG ire_metric;
ULONG ire_dest; //??
ULONG ire_unk2; //??
ULONG ire_unk3; //??
ULONG ire_gw;
ULONG ire_unk4; //??
ULONG ire_unk5; //??
ULONG ire_unk6; //??
ULONG ire_mask;
ULONG ire_unk7; //??
ULONG ire_unk8; //??
} IPRouteEntry;
typedef struct _IPAddrEntry {
ULONG iae_addr;
ULONG iae_index;
ULONG iae_mask;
ULONG iae_bcastaddr;
ULONG iae_reasmsize;
ULONG iae_context;
ULONG iae_pad;
} IPAddrEntry;
#define CONTEXT_SIZE 16
#define MAX_ADAPTER_DESCRIPTION_LENGTH 64 /* guess */
typedef struct _TCP_REQUEST_QUERY_INFORMATION_EX {
TDIObjectID ID;

View file

@ -63,42 +63,7 @@ typedef struct _BLOB {
} BLOB,*PBLOB,*LPBLOB;
#endif
typedef struct _SERVICE_ADDRESS {
DWORD dwAddressType;
DWORD dwAddressFlags;
DWORD dwAddressLength;
DWORD dwPrincipalLength;
BYTE *lpAddress;
BYTE *lpPrincipal;
} SERVICE_ADDRESS;
typedef struct _SERVICE_ADDRESSES {
DWORD dwAddressCount;
SERVICE_ADDRESS Addresses[1];
} SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
typedef struct _SERVICE_INFOA {
LPGUID lpServiceType;
LPSTR lpServiceName;
LPSTR lpComment;
LPSTR lpLocale;
DWORD dwDisplayHint;
DWORD dwVersion;
DWORD dwTime;
LPSTR lpMachineName;
LPSERVICE_ADDRESSES lpServiceAddress;
BLOB ServiceSpecificInfo;
} SERVICE_INFOA, *LPSERVICE_INFOA;
typedef struct _SERVICE_INFOW {
LPGUID lpServiceType;
LPWSTR lpServiceName;
LPWSTR lpComment;
LPWSTR lpLocale;
DWORD dwDisplayHint;
DWORD dwVersion;
DWORD dwTime;
LPWSTR lpMachineName;
LPSERVICE_ADDRESSES lpServiceAddress;
BLOB ServiceSpecificInfo;
} SERVICE_INFOW, *LPSERVICE_INFOW;
#include <serviceinfo.h>
typedef void *LPSERVICE_ASYNC_INFO;
INT WINAPI SetServiceA(DWORD,DWORD,DWORD,LPSERVICE_INFOA,LPSERVICE_ASYNC_INFO,LPDWORD);

View file

@ -3746,22 +3746,11 @@ typedef struct tagNONCLIENTMETRICSW {
typedef_tident(NONCLIENTMETRICS)
typedef_tident(LPNONCLIENTMETRICS)
typedef struct _SERVICE_ADDRESS {
DWORD dwAddressType;
DWORD dwAddressFlags;
DWORD dwAddressLength;
DWORD dwPrincipalLength;
BYTE *lpAddress;
BYTE *lpPrincipal;
} SERVICE_ADDRESS;
typedef struct _SERVICE_ADDRESSES {
DWORD dwAddressCount;
SERVICE_ADDRESS Addresses[1];
} SERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
#include <serviceinfo.h>
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID
{
unsigned long Data1;
@ -3770,33 +3759,8 @@ typedef struct _GUID
unsigned char Data4[8];
} GUID, *LPGUID;
typedef GUID CLSID, *LPCLSID;
#endif
typedef struct _SERVICE_INFOA {
LPGUID lpServiceType;
LPSTR lpServiceName;
LPSTR lpComment;
LPSTR lpLocale;
DWORD dwDisplayHint;
DWORD dwVersion;
DWORD dwTime;
LPSTR lpMachineName;
LPSERVICE_ADDRESSES lpServiceAddress;
BLOB ServiceSpecificInfo;
} SERVICE_INFOA, *LPSERVICE_INFOA;
typedef struct _SERVICE_INFOW {
LPGUID lpServiceType;
LPWSTR lpServiceName;
LPWSTR lpComment;
LPWSTR lpLocale;
DWORD dwDisplayHint;
DWORD dwVersion;
DWORD dwTime;
LPWSTR lpMachineName;
LPSERVICE_ADDRESSES lpServiceAddress;
BLOB ServiceSpecificInfo;
} SERVICE_INFOW, *LPSERVICE_INFOW;
#endif/*GUID_DEFINED*/
typedef_tident(SERVICE_INFO);
typedef_tident(LPSERVICE_INFO);

View file

@ -22,6 +22,8 @@
#ifndef _TCPIOCTL_H
#define _TCPIOCTL_H
#define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
/* TCP/UDP/RawIP IOCTL code definitions */
#define FSCTL_TCP_BASE FILE_DEVICE_NETWORK