From 9e8e05cf393c096300d8fb202ef7d938bbfdb4a1 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 22 Jun 2005 17:58:19 +0000 Subject: [PATCH] Fix one more bug in NDK, and fix w32api headers to use FLOWSPEC structure inside NDIS.h, and use qos.h instead of winsock2, and implement FLOWSPEC in qos.h, moving it outside from winsock2. svn path=/trunk/; revision=16217 --- reactos/include/ndk/umtypes.h | 1 - reactos/include/ndk/zwfuncs.h | 1 + reactos/w32api/include/ddk/ndis.h | 17 ++---------- reactos/w32api/include/qos.h | 46 +++++++++++++++++++++++++++++++ reactos/w32api/include/winsock2.h | 23 ---------------- 5 files changed, 50 insertions(+), 38 deletions(-) create mode 100644 reactos/w32api/include/qos.h diff --git a/reactos/include/ndk/umtypes.h b/reactos/include/ndk/umtypes.h index b32de8805e9..10ea029a24f 100644 --- a/reactos/include/ndk/umtypes.h +++ b/reactos/include/ndk/umtypes.h @@ -734,7 +734,6 @@ typedef ULONG KPROCESSOR_MODE; typedef struct _OBJECT_TYPE *POBJECT_TYPE; struct _ETHREAD; struct _CSR_API_MESSAGE; -struct _EVENT_TRACE_HEADER; /* <--- We might want to declare this one */ typedef ULONG EXECUTION_STATE; /* Basic NT Types */ diff --git a/reactos/include/ndk/zwfuncs.h b/reactos/include/ndk/zwfuncs.h index 5d5f2726607..806ac86f971 100644 --- a/reactos/include/ndk/zwfuncs.h +++ b/reactos/include/ndk/zwfuncs.h @@ -13,6 +13,7 @@ #include "lpctypes.h" #include "zwtypes.h" #include "kdtypes.h" +#include /* FUNCTION TYPES ************************************************************/ diff --git a/reactos/w32api/include/ddk/ndis.h b/reactos/w32api/include/ddk/ndis.h index fb9c516f90d..b1509034aec 100644 --- a/reactos/w32api/include/ddk/ndis.h +++ b/reactos/w32api/include/ddk/ndis.h @@ -40,7 +40,7 @@ #include "ntddndis.h" #include "netpnp.h" #include "netevent.h" -#include +#include #ifdef __cplusplus extern "C" { @@ -729,17 +729,6 @@ typedef struct { ULONG MinorVersion; } CO_ADDRESS_FAMILY, *PCO_ADDRESS_FAMILY; -typedef struct _CO_FLOW_PARAMETERS { - ULONG TokenRate; - ULONG TokenBucketSize; - ULONG PeakBandwidth; - ULONG Latency; - ULONG DelayVariation; - SERVICETYPE ServiceType; - ULONG MaxSduSize; - ULONG MinimumPolicedSize; -} CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS; - typedef struct _CO_SPECIFIC_PARAMETERS { ULONG ParamType; ULONG Length; @@ -747,8 +736,8 @@ typedef struct _CO_SPECIFIC_PARAMETERS { } CO_SPECIFIC_PARAMETERS, *PCO_SPECIFIC_PARAMETERS; typedef struct _CO_CALL_MANAGER_PARAMETERS { - CO_FLOW_PARAMETERS Transmit; - CO_FLOW_PARAMETERS Receive; + FLOWSPEC Transmit; + FLOWSPEC Receive; CO_SPECIFIC_PARAMETERS CallMgrSpecific; } CO_CALL_MANAGER_PARAMETERS, *PCO_CALL_MANAGER_PARAMETERS; diff --git a/reactos/w32api/include/qos.h b/reactos/w32api/include/qos.h new file mode 100644 index 00000000000..db54e84846f --- /dev/null +++ b/reactos/w32api/include/qos.h @@ -0,0 +1,46 @@ +/* + * qos.h + * + * Structures and definitions for QoS data types. + * + * This file is part of the w32api package. + * + * Contributors: + * Created by Alex Ionescu + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __QOS_H +#define __QOS_H +#if __GNUC__ >=3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ULONG SERVICETYPE; + +typedef struct _flowspec +{ + ULONG TokenRate; + ULONG TokenBucketSize; + ULONG PeakBandwidth; + ULONG Latency; + ULONG DelayVariation; + SERVICETYPE ServiceType; + ULONG MaxSduSize; + ULONG MinimumPolicedSize; +} FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC; + +#endif diff --git a/reactos/w32api/include/winsock2.h b/reactos/w32api/include/winsock2.h index 30980ee7ff0..c2b9a42b046 100644 --- a/reactos/w32api/include/winsock2.h +++ b/reactos/w32api/include/winsock2.h @@ -670,29 +670,6 @@ typedef enum GuaranteedService } GUARANTEE; -/* TODO: FLOWSPEC and related definitions belong in qos.h */ - -/* - Windows Sockets 2 Application Programming Interface, - revision 2.2.2 (1997) uses the type uint32 for SERVICETYPE - and the elements of _flowspec, but the type uint32 is not defined - or used anywhere else in the w32api. For now, just use - unsigned int, which is 32 bits on _WIN32 and _WIN64. -*/ - -typedef unsigned int SERVICETYPE; -typedef struct _flowspec -{ - unsigned int TokenRate; - unsigned int TokenBucketSize; - unsigned int PeakBandwidth; - unsigned int Latency; - unsigned int DelayVariation; - SERVICETYPE ServiceType; - unsigned int MaxSduSize; - unsigned int MinimumPolicedSize; - } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC; - typedef struct _QualityOfService { FLOWSPEC SendingFlowspec; -- 2.17.1