ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
896 discussions
Start a n
N
ew thread
[sir_richard] 46610: [HALACPI]: Add HAL ACPI header.
by sir_richard@svn.reactos.org
Author: sir_richard Date: Wed Mar 31 06:26:04 2010 New Revision: 46610 URL:
http://svn.reactos.org/svn/reactos?rev=46610&view=rev
Log: [HALACPI]: Add HAL ACPI header. Added: trunk/reactos/hal/halx86/include/halacpi.h (with props) Modified: trunk/reactos/hal/halx86/include/hal.h Modified: trunk/reactos/hal/halx86/include/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/hal.h?r…
============================================================================== --- trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] Wed Mar 31 06:26:04 2010 @@ -48,5 +48,6 @@ #include "halp.h" #include "mps.h" #include "ioapic.h" +#include "halacpi.h" /* EOF */ Added: trunk/reactos/hal/halx86/include/halacpi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halacpi…
============================================================================== --- trunk/reactos/hal/halx86/include/halacpi.h (added) +++ trunk/reactos/hal/halx86/include/halacpi.h [iso-8859-1] Wed Mar 31 06:26:04 2010 @@ -1,0 +1,227 @@ +#pragma once + +// +// Should be shared with FreeLDR +// +typedef struct _ACPI_E820_ENTRY +{ + PHYSICAL_ADDRESS Base; + LARGE_INTEGER Length; + ULONGLONG Type; +} ACPI_E820_ENTRY, *PACPI_E820_ENTRY; + +typedef struct _ACPI_BIOS_MULTI_NODE +{ + PHYSICAL_ADDRESS RsdtAddress; + ULONGLONG Count; + ACPI_E820_ENTRY E820Entry[1]; +} ACPI_BIOS_MULTI_NODE, *PACPI_BIOS_MULTI_NODE; + +// +// ACPI Signatures +// +#define RSDP_SIGNATURE 0x2052545020445352 // "RSD PTR " +#define FACS_SIGNATURE 0x53434146 // "FACS" +#define FADT_SIGNATURE 0x50434146 // "FACP" +#define RSDT_SIGNATURE 0x54445352 // "RSDT" +#define APIC_SIGNATURE 0x43495041 // "APIC" +#define DSDT_SIGNATURE 0x54445344 // "DSDT" +#define SSDT_SIGNATURE 0x54445353 // "SSDT" +#define PSDT_SIGNATURE 0x54445350 // "PSDT" +#define SBST_SIGNATURE 0x54534253 // "SBST" +#define DBGP_SIGNATURE 0x50474244 // "DBGP" + +// +// FADT Flags +// +#define ACPI_TMR_VAL_EXT 0x100 + +// +// ACPI Generic Register Address +// +typedef struct _GEN_ADDR +{ + UCHAR AddressSpaceID; + UCHAR BitWidth; + UCHAR BitOffset; + UCHAR Reserved; + PHYSICAL_ADDRESS Address; +} GEN_ADDR, *PGEN_ADDR; + +// +// ACPI BIOS Structures (packed) +// +#include <pshpack1.h> +typedef struct _RSDP +{ + ULONGLONG Signature; + UCHAR Checksum; + UCHAR OEMID[6]; + UCHAR Reserved[1]; + ULONG RsdtAddress; +} RSDP; +typedef RSDP *PRSDP; + +typedef struct _DESCRIPTION_HEADER +{ + ULONG Signature; + ULONG Length; + UCHAR Revision; + UCHAR Checksum; + UCHAR OEMID[6]; + UCHAR OEMTableID[8]; + ULONG OEMRevision; + UCHAR CreatorID[4]; + ULONG CreatorRev; +} DESCRIPTION_HEADER; +typedef DESCRIPTION_HEADER *PDESCRIPTION_HEADER; + +typedef struct _FACS +{ + ULONG Signature; + ULONG Length; + ULONG HardwareSignature; + ULONG pFirmwareWakingVector; + ULONG GlobalLock; + ULONG Flags; + PHYSICAL_ADDRESS x_FirmwareWakingVector; + UCHAR version; + UCHAR Reserved[32]; +} FACS; +typedef FACS *PFACS; + +typedef struct _FADT +{ + DESCRIPTION_HEADER Header; + ULONG facs; + ULONG dsdt; + UCHAR int_model; + UCHAR pm_profile; + USHORT sci_int_vector; + ULONG smi_cmd_io_port; + UCHAR acpi_on_value; + UCHAR acpi_off_value; + UCHAR s4bios_req; + UCHAR pstate_control; + ULONG pm1a_evt_blk_io_port; + ULONG pm1b_evt_blk_io_port; + ULONG pm1a_ctrl_blk_io_port; + ULONG pm1b_ctrl_blk_io_port; + ULONG pm2_ctrl_blk_io_port; + ULONG pm_tmr_blk_io_port; + ULONG gp0_blk_io_port; + ULONG gp1_blk_io_port; + UCHAR pm1_evt_len; + UCHAR pm1_ctrl_len; + UCHAR pm2_ctrl_len; + UCHAR pm_tmr_len; + UCHAR gp0_blk_len; + UCHAR gp1_blk_len; + UCHAR gp1_base; + UCHAR cstate_control; + USHORT lvl2_latency; + USHORT lvl3_latency; + USHORT flush_size; + USHORT flush_stride; + UCHAR duty_offset; + UCHAR duty_width; + UCHAR day_alarm_index; + UCHAR month_alarm_index; + UCHAR century_alarm_index; + USHORT boot_arch; + UCHAR reserved3[1]; + ULONG flags; + GEN_ADDR reset_reg; + UCHAR reset_val; + UCHAR reserved4[3]; + PHYSICAL_ADDRESS x_firmware_ctrl; + PHYSICAL_ADDRESS x_dsdt; + GEN_ADDR x_pm1a_evt_blk; + GEN_ADDR x_pm1b_evt_blk; + GEN_ADDR x_pm1a_ctrl_blk; + GEN_ADDR x_pm1b_ctrl_blk; + GEN_ADDR x_pm2_ctrl_blk; + GEN_ADDR x_pm_tmr_blk; + GEN_ADDR x_gp0_blk; + GEN_ADDR x_gp1_blk; +} FADT; +typedef FADT *PFADT; + +typedef struct _DSDT +{ + DESCRIPTION_HEADER Header; + UCHAR DiffDefBlock[ANYSIZE_ARRAY]; +} DSDT; +typedef DSDT *PDSDT; + +typedef struct _RSDT +{ + DESCRIPTION_HEADER Header; + ULONG Tables[ANYSIZE_ARRAY]; +} RSDT; +typedef RSDT *PRSDT; + +typedef struct _XSDT +{ + DESCRIPTION_HEADER Header; + PHYSICAL_ADDRESS Tables[ANYSIZE_ARRAY]; +} XSDT; +typedef XSDT *PXSDT; +#include <poppack.h> + +// +// Microsoft-specific (pretty much) ACPI Tables, normal MS ABI packing +// +typedef struct _DEBUG_PORT_TABLE +{ + DESCRIPTION_HEADER Header; + UCHAR InterfaceType; + UCHAR Reserved[3]; + GEN_ADDR BaseAddress; +} DEBUG_PORT_TABLE, *PDEBUG_PORT_TABLE; + +typedef struct _BOOT_TABLE +{ + DESCRIPTION_HEADER Header; + UCHAR CMOSIndex; + UCHAR Reserved[3]; +} BOOT_TABLE, *PBOOT_TABLE; + +typedef struct _ACPI_SRAT +{ + DESCRIPTION_HEADER Header; + UCHAR TableRevision; + ULONG Reserved[2]; +} ACPI_SRAT, *PACPI_SRAT; + +// +// Internal HAL structure +// +typedef struct _ACPI_CACHED_TABLE +{ + LIST_ENTRY Links; + DESCRIPTION_HEADER Header; + // table follows + // ... +} ACPI_CACHED_TABLE, *PACPI_CACHED_TABLE; + +NTSTATUS +NTAPI +HalpAcpiTableCacheInit( + IN PLOADER_PARAMETER_BLOCK LoaderBlock +); + +PVOID +NTAPI +HalpAcpiGetTable( + IN PLOADER_PARAMETER_BLOCK LoaderBlock, + IN ULONG Signature +); + +NTSTATUS +NTAPI +HalpSetupAcpiPhase0( + IN PLOADER_PARAMETER_BLOCK LoaderBlock +); + +/* EOF */ Propchange: trunk/reactos/hal/halx86/include/halacpi.h ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 8 months
1
0
0
0
[janderwald] 46609: [SETUPAPI] - Implement SetupDiOpenDeviceInterfaceW
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Mar 31 04:43:57 2010 New Revision: 46609 URL:
http://svn.reactos.org/svn/reactos?rev=46609&view=rev
Log: [SETUPAPI] - Implement SetupDiOpenDeviceInterfaceW Modified: trunk/reactos/dll/win32/setupapi/devinst.c Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Wed Mar 31 04:43:57 2010 @@ -3699,8 +3699,209 @@ DWORD OpenFlags, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData) { - FIXME("%p %s %08x %p\n", + struct DeviceInfoSet * list; + PCWSTR pEnd; + DWORD dwLength, dwError, dwIndex, dwKeyName, dwSubIndex; + CLSID ClassId; + WCHAR Buffer[MAX_PATH + 1]; + WCHAR SymBuffer[MAX_PATH + 1]; + WCHAR InstancePath[MAX_PATH + 1]; + HKEY hKey, hDevKey, hSymKey; + struct DeviceInfo * deviceInfo; + struct DeviceInterface *deviceInterface; + BOOL Ret; + PLIST_ENTRY ItemList; + PLIST_ENTRY InterfaceListEntry; + + TRACE("%p %s %08x %p\n", DeviceInfoSet, debugstr_w(DevicePath), OpenFlags, DeviceInterfaceData); + + + if (DeviceInterfaceData && DeviceInterfaceData->cbSize != sizeof(SP_DEVICE_INTERFACE_DATA)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (((struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEVICE_INFO_SET_MAGIC) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + list = (struct DeviceInfoSet * )DeviceInfoSet; + + dwLength = wcslen(DevicePath); + if (dwLength < 39) + { + /* path must be at least a guid length + L'\0' */ + SetLastError(ERROR_BAD_PATHNAME); + return FALSE; + } + + if (DevicePath[0] != L'\\' || + DevicePath[1] != L'\\' || + (DevicePath[2] != L'?' && DevicePath[2] != L'.') || + DevicePath[3] != L'\\') + { + /* invalid formatted path */ + SetLastError(ERROR_BAD_PATHNAME); + return FALSE; + } + + /* check for reference strings */ + pEnd = wcschr(&DevicePath[4], L'\\'); + if (!pEnd) + { + /* no reference string */ + pEnd = DevicePath + dwLength; + } + + /* copy guid */ + wcscpy(Buffer, pEnd - 37); + Buffer[36] = L'\0'; + + dwError = UuidFromStringW(Buffer, &ClassId); + if (dwError != NOERROR) + { + /* invalid formatted path */ + SetLastError(ERROR_BAD_PATHNAME); + return FALSE; + } + + hKey = SetupDiOpenClassRegKeyExW(&ClassId, KEY_READ, DIOCR_INTERFACE, list->MachineName, NULL); + + if (hKey == INVALID_HANDLE_VALUE) + { + /* invalid device class */ + return FALSE; + } + + ItemList = list->ListHead.Flink; + while (ItemList != &list->ListHead) + { + deviceInfo = CONTAINING_RECORD(ItemList, struct DeviceInfo, ListEntry); + InterfaceListEntry = deviceInfo->InterfaceListHead.Flink; + while (InterfaceListEntry != &deviceInfo->InterfaceListHead) + { + deviceInterface = CONTAINING_RECORD(InterfaceListEntry, struct DeviceInterface, ListEntry); + if (!IsEqualIID(&deviceInterface->InterfaceClassGuid, &ClassId)) + { + InterfaceListEntry = InterfaceListEntry->Flink; + continue; + } + + if (!wcsicmp(deviceInterface->SymbolicLink, DevicePath)) + { + if (DeviceInterfaceData) + { + DeviceInterfaceData->Reserved = (ULONG_PTR)deviceInterface; + DeviceInterfaceData->Flags = deviceInterface->Flags; + CopyMemory(&DeviceInterfaceData->InterfaceClassGuid, &ClassId, sizeof(GUID)); + } + + return TRUE; + } + + } + } + + + dwIndex = 0; + do + { + Buffer[0] = 0; + dwKeyName = sizeof(Buffer) / sizeof(WCHAR); + dwError = RegEnumKeyExW(hKey, dwIndex, Buffer, &dwKeyName, NULL, NULL, NULL, NULL); + + if (dwError != ERROR_SUCCESS) + break; + + if (RegOpenKeyExW(hKey, Buffer, 0, KEY_READ, &hDevKey) != ERROR_SUCCESS) + break; + + dwSubIndex = 0; + InstancePath[0] = 0; + dwKeyName = sizeof(InstancePath); + + dwError = RegQueryValueExW(hDevKey, L"DeviceInstance", NULL, NULL, (LPBYTE)InstancePath, &dwKeyName); + + while(TRUE) + { + Buffer[0] = 0; + dwKeyName = sizeof(Buffer) / sizeof(WCHAR); + dwError = RegEnumKeyExW(hDevKey, dwSubIndex, Buffer, &dwKeyName, NULL, NULL, NULL, NULL); + + if (dwError != ERROR_SUCCESS) + break; + + dwError = RegOpenKeyExW(hDevKey, Buffer, 0, KEY_READ, &hSymKey); + if (dwError != ERROR_SUCCESS) + break; + + /* query for symbolic link */ + dwKeyName = sizeof(SymBuffer); + SymBuffer[0] = L'\0'; + dwError = RegQueryValueExW(hSymKey, L"SymbolicLink", NULL, NULL, (LPBYTE)SymBuffer, &dwKeyName); + + if (dwError != ERROR_SUCCESS) + { + RegCloseKey(hSymKey); + break; + } + + if (!wcsicmp(SymBuffer, DevicePath)) + { + Ret = CreateDeviceInfo(list, InstancePath, &ClassId, &deviceInfo); + RegCloseKey(hSymKey); + RegCloseKey(hDevKey); + RegCloseKey(hKey); + + if (Ret) + { + deviceInterface = HeapAlloc(GetProcessHeap(), 0, sizeof(struct DeviceInterface) + (wcslen(SymBuffer) + 1) * sizeof(WCHAR)); + if (deviceInterface) + { + + CopyMemory(&deviceInterface->InterfaceClassGuid, &ClassId, sizeof(GUID)); + deviceInterface->DeviceInfo = deviceInfo; + deviceInterface->Flags = SPINT_ACTIVE; //FIXME + + wcscpy(deviceInterface->SymbolicLink, SymBuffer); + + InsertTailList(&deviceInfo->InterfaceListHead, &deviceInterface->ListEntry); + InsertTailList(&list->ListHead, &deviceInfo->ListEntry); + + + if (DeviceInterfaceData) + { + DeviceInterfaceData->Reserved = (ULONG_PTR)deviceInterface; + DeviceInterfaceData->Flags = deviceInterface->Flags; + CopyMemory(&DeviceInterfaceData->InterfaceClassGuid, &ClassId, sizeof(GUID)); + } + else + { + Ret = FALSE; + SetLastError(ERROR_INVALID_USER_BUFFER); + } + } + } + else + { + HeapFree(GetProcessHeap(), 0, deviceInfo); + Ret = FALSE; + } + return Ret; + } + RegCloseKey(hSymKey); + dwSubIndex++; + } + + RegCloseKey(hDevKey); + dwIndex++; + }while(TRUE); + + RegCloseKey(hKey); return FALSE; }
14 years, 8 months
1
0
0
0
[akhaldi] 46608: [BATTC] - Correct the inclusion of wmilib [PSDK] - ws2tcpip.h improvements, some formatting fixes, remove some duplicate definitions between winsock2.h and ws2def.h [XDK] - Move some definitions from ntifs.template.h to more appropriate places. [NTIFS] - Reflect XDK changes.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 30 23:50:05 2010 New Revision: 46608 URL:
http://svn.reactos.org/svn/reactos?rev=46608&view=rev
Log: [BATTC] - Correct the inclusion of wmilib [PSDK] - ws2tcpip.h improvements, some formatting fixes, remove some duplicate definitions between winsock2.h and ws2def.h [XDK] - Move some definitions from ntifs.template.h to more appropriate places. [NTIFS] - Reflect XDK changes. Modified: branches/header-work/drivers/battery/battc/battc.h branches/header-work/include/ddk/ntifs.h branches/header-work/include/psdk/in6addr.h branches/header-work/include/psdk/winsock.h branches/header-work/include/psdk/winsock2.h branches/header-work/include/psdk/ws2tcpip.h branches/header-work/include/xdk/extypes.h branches/header-work/include/xdk/fsrtltypes.h branches/header-work/include/xdk/ntifs.template.h Modified: branches/header-work/drivers/battery/battc/battc.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/drivers/battery/bat…
============================================================================== --- branches/header-work/drivers/battery/battc/battc.h [iso-8859-1] (original) +++ branches/header-work/drivers/battery/battc/battc.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -9,7 +9,7 @@ #pragma once #include <ntddk.h> -#include <wmlib.h> +#include <wmilib.h> #include <initguid.h> #include <batclass.h> Modified: branches/header-work/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/ntifs.h…
============================================================================== --- branches/header-work/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/ntifs.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -4957,6 +4957,10 @@ +#define INVALID_PROCESSOR_INDEX 0xffffffff + +#define EX_PUSH_LOCK ULONG_PTR +#define PEX_PUSH_LOCK PULONG_PTR /****************************************************************************** * Executive Functions * ******************************************************************************/ @@ -6178,6 +6182,12 @@ #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ /* FSRTL Types */ + +typedef ULONG LBN; +typedef LBN *PLBN; + +typedef ULONG VBN; +typedef VBN *PVBN; typedef struct _FSRTL_COMMON_FCB_HEADER { CSHORT NodeTypeCode; @@ -6347,6 +6357,121 @@ #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_HARD_ERROR 0x1 #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_LOG_ENTRY 0x2 + +typedef NTSTATUS +(NTAPI *PCOMPLETE_LOCK_IRP_ROUTINE) ( + IN PVOID Context, + IN PIRP Irp); + +typedef struct _FILE_LOCK_INFO { + LARGE_INTEGER StartingByte; + LARGE_INTEGER Length; + BOOLEAN ExclusiveLock; + ULONG Key; + PFILE_OBJECT FileObject; + PVOID ProcessId; + LARGE_INTEGER EndingByte; +} FILE_LOCK_INFO, *PFILE_LOCK_INFO; + +typedef VOID +(NTAPI *PUNLOCK_ROUTINE) ( + IN PVOID Context, + IN PFILE_LOCK_INFO FileLockInfo); + +typedef struct _FILE_LOCK { + PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine; + PUNLOCK_ROUTINE UnlockRoutine; + BOOLEAN FastIoIsQuestionable; + BOOLEAN SpareC[3]; + PVOID LockInformation; + FILE_LOCK_INFO LastReturnedLockInfo; + PVOID LastReturnedLock; + LONG volatile LockRequestsInProgress; +} FILE_LOCK, *PFILE_LOCK; + +typedef struct _TUNNEL { + FAST_MUTEX Mutex; + PRTL_SPLAY_LINKS Cache; + LIST_ENTRY TimerQueue; + USHORT NumEntries; +} TUNNEL, *PTUNNEL; + +typedef struct _BASE_MCB { + ULONG MaximumPairCount; + ULONG PairCount; + USHORT PoolType; + USHORT Flags; + PVOID Mapping; +} BASE_MCB, *PBASE_MCB; + +typedef struct _LARGE_MCB { + PKGUARDED_MUTEX GuardedMutex; + BASE_MCB BaseMcb; +} LARGE_MCB, *PLARGE_MCB; + +#define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1 + +typedef struct _MCB { + LARGE_MCB DummyFieldThatSizesThisStructureCorrectly; +} MCB, *PMCB; + +typedef enum _FAST_IO_POSSIBLE { + FastIoIsNotPossible = 0, + FastIoIsPossible, + FastIoIsQuestionable +} FAST_IO_POSSIBLE; + +typedef struct _EOF_WAIT_BLOCK { + LIST_ENTRY EofWaitLinks; + KEVENT Event; +} EOF_WAIT_BLOCK, *PEOF_WAIT_BLOCK; + +typedef PVOID OPLOCK, *POPLOCK; + +typedef VOID +(NTAPI *POPLOCK_WAIT_COMPLETE_ROUTINE) ( + IN PVOID Context, + IN PIRP Irp); + +typedef VOID +(NTAPI *POPLOCK_FS_PREPOST_IRP) ( + IN PVOID Context, + IN PIRP Irp); + +#if (NTDDI_VERSION >= NTDDI_VISTASP1) +#define OPLOCK_FLAG_COMPLETE_IF_OPLOCKED 0x00000001 +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) +#define OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY 0x00000002 +#define OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK 0x00000004 +#define OPLOCK_FLAG_IGNORE_OPLOCK_KEYS 0x00000008 +#define OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH 0x00000001 +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +typedef struct _OPLOCK_KEY_ECP_CONTEXT { + GUID OplockKey; + ULONG Reserved; +} OPLOCK_KEY_ECP_CONTEXT, *POPLOCK_KEY_ECP_CONTEXT; + +DEFINE_GUID( GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f ); + +#endif + +typedef PVOID PNOTIFY_SYNC; + +typedef BOOLEAN +(NTAPI *PCHECK_FOR_TRAVERSE_ACCESS) ( + IN PVOID NotifyContext, + IN PVOID TargetContext OPTIONAL, + IN PSECURITY_SUBJECT_CONTEXT SubjectContext); + +typedef BOOLEAN +(NTAPI *PFILTER_REPORT_CHANGE) ( + IN PVOID NotifyContext, + IN PVOID FilterContext); /* FSRTL Functions */ #define FsRtlEnterFileSystem KeEnterCriticalRegion @@ -8655,11 +8780,6 @@ #endif /* (NTDDI_VERSION >= NTDDI_WIN7) */ -#define INVALID_PROCESSOR_INDEX 0xffffffff - -#define EX_PUSH_LOCK ULONG_PTR -#define PEX_PUSH_LOCK PULONG_PTR - /* #if !defined(_X86AMD64_) FIXME : WHAT ?! */ #if defined(_WIN64) @@ -8690,127 +8810,6 @@ #if defined(_M_IX86) || defined(_M_AMD64) #define HalGetDmaAlignmentRequirement() 1L #endif - -typedef ULONG LBN; -typedef LBN *PLBN; - -typedef ULONG VBN; -typedef VBN *PVBN; - -typedef enum _FAST_IO_POSSIBLE { - FastIoIsNotPossible = 0, - FastIoIsPossible, - FastIoIsQuestionable -} FAST_IO_POSSIBLE; - -typedef struct _EOF_WAIT_BLOCK { - LIST_ENTRY EofWaitLinks; - KEVENT Event; -} EOF_WAIT_BLOCK, *PEOF_WAIT_BLOCK; - -typedef struct _FILE_LOCK_INFO { - LARGE_INTEGER StartingByte; - LARGE_INTEGER Length; - BOOLEAN ExclusiveLock; - ULONG Key; - PFILE_OBJECT FileObject; - PVOID ProcessId; - LARGE_INTEGER EndingByte; -} FILE_LOCK_INFO, *PFILE_LOCK_INFO; - -typedef NTSTATUS -(NTAPI *PCOMPLETE_LOCK_IRP_ROUTINE) ( - IN PVOID Context, - IN PIRP Irp); - -typedef VOID -(NTAPI *PUNLOCK_ROUTINE) ( - IN PVOID Context, - IN PFILE_LOCK_INFO FileLockInfo); - -typedef struct _FILE_LOCK { - PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine; - PUNLOCK_ROUTINE UnlockRoutine; - BOOLEAN FastIoIsQuestionable; - BOOLEAN SpareC[3]; - PVOID LockInformation; - FILE_LOCK_INFO LastReturnedLockInfo; - PVOID LastReturnedLock; - LONG volatile LockRequestsInProgress; -} FILE_LOCK, *PFILE_LOCK; - -typedef struct _TUNNEL { - FAST_MUTEX Mutex; - PRTL_SPLAY_LINKS Cache; - LIST_ENTRY TimerQueue; - USHORT NumEntries; -} TUNNEL, *PTUNNEL; - -typedef struct _BASE_MCB { - ULONG MaximumPairCount; - ULONG PairCount; - USHORT PoolType; - USHORT Flags; - PVOID Mapping; -} BASE_MCB, *PBASE_MCB; - -typedef struct _LARGE_MCB { - PKGUARDED_MUTEX GuardedMutex; - BASE_MCB BaseMcb; -} LARGE_MCB, *PLARGE_MCB; - -#define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1 - -typedef struct _MCB { - LARGE_MCB DummyFieldThatSizesThisStructureCorrectly; -} MCB, *PMCB; - -typedef PVOID OPLOCK, *POPLOCK; - -typedef VOID -(NTAPI *POPLOCK_WAIT_COMPLETE_ROUTINE) ( - IN PVOID Context, - IN PIRP Irp); - -typedef VOID -(NTAPI *POPLOCK_FS_PREPOST_IRP) ( - IN PVOID Context, - IN PIRP Irp); - -#if (NTDDI_VERSION >= NTDDI_VISTASP1) -#define OPLOCK_FLAG_COMPLETE_IF_OPLOCKED 0x00000001 -#endif - -#if (NTDDI_VERSION >= NTDDI_WIN7) -#define OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY 0x00000002 -#define OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK 0x00000004 -#define OPLOCK_FLAG_IGNORE_OPLOCK_KEYS 0x00000008 -#define OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH 0x00000001 -#endif - -#if (NTDDI_VERSION >= NTDDI_WIN7) - -typedef struct _OPLOCK_KEY_ECP_CONTEXT { - GUID OplockKey; - ULONG Reserved; -} OPLOCK_KEY_ECP_CONTEXT, *POPLOCK_KEY_ECP_CONTEXT; - -DEFINE_GUID( GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f ); - -#endif - -typedef PVOID PNOTIFY_SYNC; - -typedef BOOLEAN -(NTAPI *PCHECK_FOR_TRAVERSE_ACCESS) ( - IN PVOID NotifyContext, - IN PVOID TargetContext OPTIONAL, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext); - -typedef BOOLEAN -(NTAPI *PFILTER_REPORT_CHANGE) ( - IN PVOID NotifyContext, - IN PVOID FilterContext); extern NTKERNELAPI PUSHORT NlsOemLeadByteInfo; #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo Modified: branches/header-work/include/psdk/in6addr.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/in6add…
============================================================================== --- branches/header-work/include/psdk/in6addr.h [iso-8859-1] (original) +++ branches/header-work/include/psdk/in6addr.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -1,12 +1,10 @@ #ifndef s6_addr -typedef struct in6_addr -{ - union - { - UCHAR Byte[16]; - USHORT Word[8]; - } u; +typedef struct in6_addr { + union { + UCHAR Byte[16]; + USHORT Word[8]; + } u; } IN6_ADDR, *PIN6_ADDR, FAR *LPIN6_ADDR; #define in_addr6 in6_addr Modified: branches/header-work/include/psdk/winsock.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winsoc…
============================================================================== --- branches/header-work/include/psdk/winsock.h [iso-8859-1] (original) +++ branches/header-work/include/psdk/winsock.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -652,7 +652,7 @@ IN int len, IN int flags, OUT struct sockaddr FAR *from OPTIONAL, - IN OUY int FAR * fromlen OPTIONAL); + IN OUT int FAR * fromlen OPTIONAL); int PASCAL FAR Modified: branches/header-work/include/psdk/winsock2.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winsoc…
============================================================================== --- branches/header-work/include/psdk/winsock2.h [iso-8859-1] (original) +++ branches/header-work/include/psdk/winsock2.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -1,6 +1,6 @@ #pragma once -#if !(defined _WINSOCK2API_ || defined _WINSOCK_H) +#if !(defined _WINSOCK2API_ || defined _WINSOCKAPI_) #define _WINSOCK2API_ #define _WINSOCKAPI_ /* to prevent later inclusion of winsock.h */ @@ -179,9 +179,6 @@ u_short l_linger; }; -#define _IO(x,y) (IOC_VOID|((x)<<8)|(y)) -#define _IOR(x,y,t) (IOC_OUT|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) -#define _IOW(x,y,t) (IOC_IN|(((LONG)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y)) #define FIONBIO _IOW('f', 126, u_long) struct netent { @@ -192,14 +189,15 @@ }; struct servent { - char *s_name; - char **s_aliases; + char FAR *s_name; + char FAR **s_aliases; #ifdef _WIN64 - char *s_proto; + char FAR *s_proto; short s_port; #else short s_port; - char *s_proto; + char FAR *s_proto; +#endif }; struct protoent { @@ -208,9 +206,8 @@ short p_proto; }; -#define SO_CONDITIONAL_ACCEPT 0x3002 - #define SOMAXCONN 0x7fffffff + #define MSG_OOB 1 #define MSG_PEEK 2 #define MSG_DONTROUTE 4 @@ -225,13 +222,7 @@ #define NO_DATA WSANO_DATA #define NO_ADDRESS WSANO_ADDRESS -#endif /* ! (__INSIDE_CYGWIN__ || __INSIDE_MSYS__) */ - -#define IOCPARM_MASK 0x7f -#define IOC_VOID 0x20000000 -#define IOC_OUT 0x40000000 -#define IOC_IN 0x80000000 -#define IOC_INOUT (IOC_IN|IOC_OUT) +#endif /* !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__)) */ #define FIONREAD _IOR('f', 127, u_long) #define FIOASYNC _IOW('f', 125, u_long) @@ -241,31 +232,6 @@ #define SIOCGLOWAT _IOR('s', 3, u_long) #define SIOCATMARK _IOR('s', 7, u_long) -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 -#define IPPORT_RESERVED 1024 #define IMPLINK_IP 155 #define IMPLINK_LOWEXPER 156 #define IMPLINK_HIGHEXPER 158 @@ -281,36 +247,6 @@ #define FROM_PROTOCOL_INFO (-1) -#define SOCK_STREAM 1 -#define SOCK_DGRAM 2 -#define SOCK_RAW 3 -#define SOCK_RDM 4 -#define SOCK_SEQPACKET 5 - -#define SO_DEBUG 1 -#define SO_ACCEPTCONN 2 -#define SO_REUSEADDR 4 -#define SO_KEEPALIVE 8 -#define SO_DONTROUTE 16 -#define SO_BROADCAST 32 -#define SO_USELOOPBACK 64 -#define SO_LINGER 128 -#define SO_OOBINLINE 256 -#define SO_DONTLINGER (int)(~SO_LINGER) -#define SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR)) - -#define SO_SNDBUF 0x1001 -#define SO_RCVBUF 0x1002 -#define SO_SNDLOWAT 0x1003 -#define SO_RCVLOWAT 0x1004 -#define SO_SNDTIMEO 0x1005 -#define SO_RCVTIMEO 0x1006 -#define SO_ERROR 0x1007 -#define SO_TYPE 0x1008 - -#define SO_GROUP_ID 0x2001 -#define SO_GROUP_PRIORITY 0x2002 -#define SO_MAX_MSG_SIZE 0x2003 #define SO_PROTOCOL_INFOA 0x2004 #define SO_PROTOCOL_INFOW 0x2005 #ifdef UNICODE @@ -349,8 +285,6 @@ #define PF_BTH AF_BTH #endif #define PF_MAX AF_MAX - -#define SOL_SOCKET 0xffff #define MSG_PARTIAL 0x8000 #define MSG_INTERRUPT 0x10 @@ -541,38 +475,6 @@ #define SERVICE_MULTIPLE 0x00000001 -#define NS_ALL 0 -#define NS_SAP 1 -#define NS_NDS 2 -#define NS_PEER_BROWSE 3 -#define NS_SLP 5 -#define NS_DHCP 6 -#define NS_TCPIP_LOCAL 10 -#define NS_TCPIP_HOSTS 11 -#define NS_DNS 12 -#define NS_NETBT 13 -#define NS_WINS 14 -#if(_WIN32_WINNT >= 0x0501) -#define NS_NLA 15 -#endif -#if(_WIN32_WINNT >= 0x0600) -#define NS_BTH 16 -#endif -#define NS_NBP 20 -#define NS_MS 30 -#define NS_STDA 31 -#define NS_NTDS 32 -#if(_WIN32_WINNT >= 0x0600) -#define NS_EMAIL 37 -#define NS_PNRPNAME 38 -#define NS_PNRPCLOUD 39 -#endif -#define NS_X500 40 -#define NS_NIS 41 -#define NS_NISPLUS 42 -#define NS_WRQ 50 -#define NS_NETDES 60 - #define RES_UNUSED_1 0x00000001 #define RES_FLUSH_CACHE 0x00000002 #ifndef RES_SERVICE @@ -635,11 +537,6 @@ #define RESULT_IS_DELETED 0x0040 #endif - - - - - #ifndef s_addr #define s_addr S_un.S_addr @@ -665,7 +562,7 @@ #ifdef _WIN64 unsigned short iMaxSockets; unsigned short iMaxUdpDg; - char *lpVendorInfo; + char FAR *lpVendorInfo; char szDescription[WSADESCRIPTION_LEN+1]; char szSystemStatus[WSASYS_STATUS_LEN+1]; #else @@ -673,7 +570,8 @@ char szSystemStatus[WSASYS_STATUS_LEN+1]; unsigned short iMaxSockets; unsigned short iMaxUdpDg; - char *lpVendorInfo; + char FAR *lpVendorInfo; +#endif } WSADATA, FAR *LPWSADATA; struct sockproto { @@ -1204,7 +1102,7 @@ IN int len, IN int flags, OUT struct sockaddr FAR *from OPTIONAL, - IN OUY int FAR * fromlen OPTIONAL); + IN OUT int FAR * fromlen OPTIONAL); typedef int (WSAAPI *LPFN_SELECT)( @@ -1820,7 +1718,6 @@ #if INCL_WINSOCK_API_PROTOTYPES - WINSOCK_API_LINKAGE SOCKET WSAAPI @@ -1946,7 +1843,7 @@ IN int len, IN int flags, OUT struct sockaddr FAR *from OPTIONAL, - IN OUY int FAR *fromlen OPTIONAL); + IN OUT int FAR *fromlen OPTIONAL); WINSOCK_API_LINKAGE int @@ -2828,3 +2725,5 @@ #include <wsipv6ok.h> #endif #endif */ + +#endif /* !(defined _WINSOCK2API_ || defined _WINSOCK_H) */ Modified: branches/header-work/include/psdk/ws2tcpip.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ws2tcp…
============================================================================== --- branches/header-work/include/psdk/ws2tcpip.h [iso-8859-1] (original) +++ branches/header-work/include/psdk/ws2tcpip.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -6,412 +6,846 @@ * */ -#ifndef _WS2TCPIP_H +#pragma once + #define _WS2TCPIP_H - -#if (defined _WINSOCK_H && !defined _WINSOCK2_H) -#error "ws2tcpip.h is not compatable with winsock.h. Include winsock2.h instead." -#endif #include <winsock2.h> #include <ws2ipdef.h> -#ifdef __cplusplus +#include <limits.h> + +#ifdef __cplusplus extern "C" { #endif -/* - * The IP_* macros are also defined in winsock.h, but some values are different there. - * The values defined in winsock.h for 1.1 and used in wsock32.dll are consistent - * with the original values Steve Deering defined in his document "IP Multicast Extensions - * for 4.3BSD UNIX related systems (MULTICAST 1.2 Release)." However, these conflicted with - * the definitions for some IPPROTO_IP level socket options already assigned by BSD, - * so Berkeley changed all the values by adding 7. WinSock2 (ws2_32.dll) uses - * the BSD 4.4 compatible values defined here. - * - * See also: msdn kb article Q257460 - *
http://support.microsoft.com/support/kb/articles/Q257/4/60.asp
- */ - -/* This is also defined in winsock.h; value hasn't changed */ -#define IP_OPTIONS 1 - -#define IP_HDRINCL 2 -/* - * These are also be defined in winsock.h, - * but values have changed for WinSock2 interface - */ -#define IP_TOS 3 /* old (winsock 1.1) value 8 */ -#define IP_TTL 4 /* old value 7 */ -#define IP_MULTICAST_IF 9 /* old value 2 */ -#define IP_MULTICAST_TTL 10 /* old value 3 */ -#define IP_MULTICAST_LOOP 11 /* old value 4 */ -#define IP_ADD_MEMBERSHIP 12 /* old value 5 */ -#define IP_DROP_MEMBERSHIP 13 /* old value 6 */ -#define IP_DONTFRAGMENT 14 /* old value 9 */ -#define IP_ADD_SOURCE_MEMBERSHIP 15 -#define IP_DROP_SOURCE_MEMBERSHIP 16 -#define IP_BLOCK_SOURCE 17 -#define IP_UNBLOCK_SOURCE 18 -#define IP_PKTINFO 19 - -/* - * As with BSD implementation, IPPROTO_IPV6 level socket options have - * same values as IPv4 counterparts. - */ -#define IPV6_UNICAST_HOPS 4 -#define IPV6_MULTICAST_IF 9 -#define IPV6_MULTICAST_HOPS 10 -#define IPV6_MULTICAST_LOOP 11 -#define IPV6_ADD_MEMBERSHIP 12 -#define IPV6_DROP_MEMBERSHIP 13 -#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP -#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP -#define IPV6_PKTINFO 19 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -#define TCP_EXPEDITED_1122 2 - #define UDP_NOCHECKSUM 1 - -/* INTERFACE_INFO iiFlags */ -#define IFF_UP 1 -#define IFF_BROADCAST 2 -#define IFF_LOOPBACK 4 -#define IFF_POINTTOPOINT 8 -#define IFF_MULTICAST 16 - -#define SIO_GET_INTERFACE_LIST _IOR('t', 127, u_long) - -#define INET_ADDRSTRLEN 16 -#define INET6_ADDRSTRLEN 46 - -/* getnameinfo constants */ -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 - -#define NI_NOFQDN 0x01 -#define NI_NUMERICHOST 0x02 -#define NI_NAMEREQD 0x04 -#define NI_NUMERICSERV 0x08 -#define NI_DGRAM 0x10 - -/* getaddrinfo constants */ -#define AI_PASSIVE 1 -#define AI_CANONNAME 2 -#define AI_NUMERICHOST 4 +#define UDP_CHECKSUM_COVERAGE 20 + +#ifdef _MSC_VER +#define WS2TCPIP_INLINE __inline +#else +#define WS2TCPIP_INLINE extern inline +#endif /* getaddrinfo error codes */ -#define EAI_AGAIN WSATRY_AGAIN -#define EAI_BADFLAGS WSAEINVAL -#define EAI_FAIL WSANO_RECOVERY -#define EAI_FAMILY WSAEAFNOSUPPORT -#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY -#define EAI_NODATA WSANO_DATA -#define EAI_NONAME WSAHOST_NOT_FOUND -#define EAI_SERVICE WSATYPE_NOT_FOUND -#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT - -/* - * ip_mreq also in winsock.h for WinSock1.1, - * but online msdn docs say it is defined here for WinSock2. - */ - -struct ip_mreq { - struct in_addr imr_multiaddr; - struct in_addr imr_interface; -}; - -struct ip_mreq_source { - struct in_addr imr_multiaddr; - struct in_addr imr_sourceaddr; - struct in_addr imr_interface; -}; - -struct ip_msfilter { - struct in_addr imsf_multiaddr; - struct in_addr imsf_interface; - u_long imsf_fmode; - u_long imsf_numsrc; - struct in_addr imsf_slist[1]; -}; - -#define IP_MSFILTER_SIZE(numsrc) \ - (sizeof(struct ip_msfilter) - sizeof(struct in_addr) \ - + (numsrc) * sizeof(struct in_addr)) - - -/* ipv6 */ -/* These require XP or .NET Server or use of add-on IPv6 stacks on NT 4 - or higher */ - -/* This is based on the example given in RFC 2553 with stdint types - changed to BSD types. For now, use these field names until there - is some consistency in MS docs. In this file, we only use the - in6_addr structure start address, with casts to get the right offsets - when testing addresses */ - -struct in6_addr { - union { - u_char Byte[16]; - u_short Word[8]; - u_long _S6_u32[4]; - } u; -}; - -/* s6_addr is the standard name */ -#define s6_addr u.Byte - -/* These are GLIBC names */ -#define s6_addr16 u.Word -#define s6_addr32 u.Word - -/* These are used in some MS code */ -#define in_addr6 in6_addr -#define _s6_bytes u.Byte -#define _s6_words u.Word - -typedef struct in6_addr IN6_ADDR, *PIN6_ADDR, *LPIN6_ADDR; - -struct sockaddr_in6 { - short sin6_family; /* AF_INET6 */ - u_short sin6_port; /* transport layer port # */ - u_long sin6_flowinfo; /* IPv6 traffic class & flow info */ - struct in6_addr sin6_addr; /* IPv6 address */ - u_long sin6_scope_id; /* set of interfaces for a scope */ -}; -typedef struct sockaddr_in6 SOCKADDR_IN6, *PSOCKADDR_IN6, *LPSOCKADDR_IN6; - -extern const struct in6_addr in6addr_any; -extern const struct in6_addr in6addr_loopback; -/* the above can get initialised using: */ -#define IN6ADDR_ANY_INIT { 0 } -#define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } - -/* Described in RFC 2292, but not in 2553 */ -/* int IN6_ARE_ADDR_EQUAL(const struct in6_addr * a, const struct in6_addr * b) */ -#define IN6_ARE_ADDR_EQUAL(a, b) \ - (memcmp ((void*)(a), (void*)(b), sizeof (struct in6_addr)) == 0) - - -/* Address Testing Macros - - These macro functions all take const struct in6_addr* as arg. - Static inlines would allow type checking, but RFC 2553 says they - macros. - NB: These are written specifically for little endian host */ - -#define IN6_IS_ADDR_UNSPECIFIED(_addr) \ - ( (((const u_long *)(_addr))[0] == 0) \ - && (((const u_long *)(_addr))[1] == 0) \ - && (((const u_long *)(_addr))[2] == 0) \ - && (((const u_long *)(_addr))[3] == 0)) - -#define IN6_IS_ADDR_LOOPBACK(_addr) \ - ( (((const u_long *)(_addr))[0] == 0) \ - && (((const u_long *)(_addr))[1] == 0) \ - && (((const u_long *)(_addr))[2] == 0) \ - && (((const u_long *)(_addr))[3] == 0x01000000)) /* Note byte order reversed */ -/* (((const u_long *)(_addr))[3] == ntohl(1)) */ - -#define IN6_IS_ADDR_MULTICAST(_addr) (((const u_char *) (_addr))[0] == 0xff) - -#define IN6_IS_ADDR_LINKLOCAL(_addr) \ - ( (((const u_char *)(_addr))[0] == 0xfe) \ - && ((((const u_char *)(_addr))[1] & 0xc0) == 0x80)) - -#define IN6_IS_ADDR_SITELOCAL(_addr) \ - ( (((const u_char *)(_addr))[0] == 0xfe) \ - && ((((const u_char *)(_addr))[1] & 0xc0) == 0xc0)) - -#define IN6_IS_ADDR_V4MAPPED(_addr) \ - ( (((const u_long *)(_addr))[0] == 0) \ - && (((const u_long *)(_addr))[1] == 0) \ - && (((const u_long *)(_addr))[2] == 0xffff0000)) /* Note byte order reversed */ -/* (((const u_long *)(_addr))[2] == ntohl(0x0000ffff))) */ - -#define IN6_IS_ADDR_V4COMPAT(_addr) \ - ( (((const u_long *)(_addr))[0] == 0) \ - && (((const u_long *)(_addr))[1] == 0) \ - && (((const u_long *)(_addr))[2] == 0) \ - && (((const u_long *)(_addr))[3] != 0) \ - && (((const u_long *)(_addr))[3] != 0x01000000)) /* Note byte order reversed */ -/* (ntohl (((const u_long *)(_addr))[3]) > 1 ) */ - - -#define IN6_IS_ADDR_MC_NODELOCAL(_addr) \ - ( IN6_IS_ADDR_MULTICAST(_addr) \ - && ((((const u_char *)(_addr))[1] & 0xf) == 0x1)) - -#define IN6_IS_ADDR_MC_LINKLOCAL(_addr) \ - ( IN6_IS_ADDR_MULTICAST (_addr) \ - && ((((const u_char *)(_addr))[1] & 0xf) == 0x2)) - -#define IN6_IS_ADDR_MC_SITELOCAL(_addr) \ - ( IN6_IS_ADDR_MULTICAST(_addr) \ - && ((((const u_char *)(_addr))[1] & 0xf) == 0x5)) - -#define IN6_IS_ADDR_MC_ORGLOCAL(_addr) \ - ( IN6_IS_ADDR_MULTICAST(_addr) \ - && ((((const u_char *)(_addr))[1] & 0xf) == 0x8)) - -#define IN6_IS_ADDR_MC_GLOBAL(_addr) \ - ( IN6_IS_ADDR_MULTICAST(_addr) \ - && ((((const u_char *)(_addr))[1] & 0xf) == 0xe)) - +#define EAI_AGAIN WSATRY_AGAIN +#define EAI_BADFLAGS WSAEINVAL +#define EAI_FAIL WSANO_RECOVERY +#define EAI_FAMILY WSAEAFNOSUPPORT +#define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY +#define EAI_NODATA EAI_NONAME +#define EAI_NOSECURENAME WSA_SECURE_HOST_NOT_FOUND +#define EAI_NONAME WSAHOST_NOT_FOUND +#define EAI_SERVICE WSATYPE_NOT_FOUND +#define EAI_SOCKTYPE WSAESOCKTNOSUPPORT +#define EAI_IPSECPOLICY WSA_IPSEC_NAME_POLICY_ERROR + +#ifdef UNICODE +typedef ADDRINFOW ADDRINFOT,*PADDRINFOT; +#else +typedef ADDRINFOA ADDRINFOT,*PADDRINFOT; +#endif + +typedef ADDRINFOA ADDRINFO, FAR *LPADDRINFO; + +#if (_WIN32_WINNT >= 0x0600) + +#ifdef UNICODE +typedef ADDRINFOEXW ADDRINFOEX, *PADDRINFOEX; +#else +typedef ADDRINFOEXA ADDRINFOEX, *PADDRINFOEX; +#endif + +#endif /* (_WIN32_WINNT >= 0x0600) */ + +WINSOCK_API_LINKAGE +INT +WSAAPI +getaddrinfo( + IN PCSTR pNodeName OPTIONAL, + IN PCSTR pServiceName OPTIONAL, + IN const ADDRINFOA *pHints OPTIONAL, + OUT PADDRINFOA *ppResult); + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502) + +WINSOCK_API_LINKAGE +INT +WSAAPI +GetAddrInfoW( + IN PCWSTR pNodeName OPTIONAL, + IN PCWSTR pServiceName OPTIONAL, + IN const ADDRINFOW *pHints OPTIONAL, + OUT PADDRINFOW *ppResult); + +#define GetAddrInfoA getaddrinfo + +#ifdef UNICODE +#define GetAddrInfo GetAddrInfoW +#else +#define GetAddrInfo GetAddrInfoA +#endif + +#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502) */ + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef INT +(WSAAPI *LPFN_GETADDRINFO)( + IN PCSTR pNodeName OPTIONAL, + IN PCSTR pServiceName OPTIONAL, + IN const ADDRINFOA *pHints OPTIONAL, + OUT PADDRINFOA *ppResult); + +typedef INT +(WSAAPI *LPFN_GETADDRINFOW)( + IN PCWSTR pNodeName OPTIONAL, + IN PCWSTR pServiceName OPTIONAL, + IN const ADDRINFOW *pHints OPTIONAL, + OUT PADDRINFOW *ppResult); + +#define LPFN_GETADDRINFOA LPFN_GETADDRINFO + +#ifdef UNICODE +#define LPFN_GETADDRINFOT LPFN_GETADDRINFOW +#else +#define LPFN_GETADDRINFOT LPFN_GETADDRINFOA +#endif + +#endif /* INCL_WINSOCK_API_TYPEDEFS */ + +#if (_WIN32_WINNT >= 0x0600) + +typedef void +(CALLBACK *LPLOOKUPSERVICE_COMPLETION_ROUTINE)( + IN DWORD dwError, + IN DWORD dwBytes, + IN LPWSAOVERLAPPED lpOverlapped); + +WINSOCK_API_LINKAGE +INT +WSAAPI +GetAddrInfoExA( + IN PCSTR pName OPTIONAL, + IN PCSTR pServiceName OPTIONAL, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN const ADDRINFOEXA *hints, + OUT PADDRINFOEXA *ppResult, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +GetAddrInfoExW( + IN PCWSTR pName OPTIONAL, + IN PCWSTR pServiceName OPTIONAL, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN const ADDRINFOEXW *hints OPTIONAL, + OUT PADDRINFOEXW *ppResult, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpHandle OPTIONAL); + +#ifdef UNICODE +#define GetAddrInfoEx GetAddrInfoExW +#else +#define GetAddrInfoEx GetAddrInfoExA +#endif + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef INT +(WSAAPI *LPFN_GETADDRINFOEXA)( + IN PCSTR pName, + IN PCSTR pServiceName OPTIONAL, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN const ADDRINFOEXA *hints OPTIONAL, + OUT PADDRINFOEXA *ppResult, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +typedef INT +(WSAAPI *LPFN_GETADDRINFOEXW)( + IN PCWSTR pName, + IN PCWSTR pServiceName OPTIONAL, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN const ADDRINFOEXW *hints OPTIONAL, + OUT PADDRINFOEXW *ppResult, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpHandle OPTIONAL); + +#ifdef UNICODE +#define LPFN_GETADDRINFOEX LPFN_GETADDRINFOEXW +#else +#define LPFN_GETADDRINFOEX LPFN_GETADDRINFOEXA +#endif +#endif + +#endif + +#if (_WIN32_WINNT >= 0x0600) + +WINSOCK_API_LINKAGE +INT +WSAAPI +SetAddrInfoExA( + IN PCSTR pName, + IN PCSTR pServiceName OPTIONAL, + IN SOCKET_ADDRESS *pAddresses OPTIONAL, + IN DWORD dwAddressCount, + IN LPBLOB lpBlob OPTIONAL, + IN DWORD dwFlags, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +SetAddrInfoExW( + IN PCWSTR pName, + IN PCWSTR pServiceName OPTIONAL, + IN SOCKET_ADDRESS *pAddresses OPTIONAL, + IN DWORD dwAddressCount, + IN LPBLOB lpBlob OPTIONAL, + IN DWORD dwFlags, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +#ifdef UNICODE +#define SetAddrInfoEx SetAddrInfoExW +#else +#define SetAddrInfoEx SetAddrInfoExA +#endif + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef INT +(WSAAPI *LPFN_SETADDRINFOEXA)( + IN PCSTR pName, + IN PCSTR pServiceName OPTIONAL, + IN SOCKET_ADDRESS *pAddresses OPTIONAL, + IN DWORD dwAddressCount, + IN LPBLOB lpBlob OPTIONAL, + IN DWORD dwFlags, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +typedef INT +(WSAAPI *LPFN_SETADDRINFOEXW)( + IN PCWSTR pName, + IN PCWSTR pServiceName OPTIONAL, + IN SOCKET_ADDRESS *pAddresses OPTIONAL, + IN DWORD dwAddressCount, + IN LPBLOB lpBlob OPTIONAL, + IN DWORD dwFlags, + IN DWORD dwNameSpace, + IN LPGUID lpNspId OPTIONAL, + IN struct timeval *timeout OPTIONAL, + IN LPOVERLAPPED lpOverlapped OPTIONAL, + IN LPLOOKUPSERVICE_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL, + OUT LPHANDLE lpNameHandle OPTIONAL); + +#ifdef UNICODE +#define LPFN_SETADDRINFOEX LPFN_SETADDRINFOEXW +#else +#define LPFN_SETADDRINFOEX LPFN_SETADDRINFOEXA +#endif +#endif + +#endif + +WINSOCK_API_LINKAGE +VOID +WSAAPI +freeaddrinfo( + IN PADDRINFOA pAddrInfo OPTIONAL); + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502) + +WINSOCK_API_LINKAGE +VOID +WSAAPI +FreeAddrInfoW( + IN PADDRINFOW pAddrInfo OPTIONAL); + +#define FreeAddrInfoA freeaddrinfo + +#ifdef UNICODE +#define FreeAddrInfo FreeAddrInfoW +#else +#define FreeAddrInfo FreeAddrInfoA +#endif +#endif + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef VOID +(WSAAPI *LPFN_FREEADDRINFO)( + IN PADDRINFOA pAddrInfo OPTIONAL); + +typedef VOID +(WSAAPI *LPFN_FREEADDRINFOW)( + IN PADDRINFOW pAddrInfo OPTIONAL); + +#define LPFN_FREEADDRINFOA LPFN_FREEADDRINFO + +#ifdef UNICODE +#define LPFN_FREEADDRINFOT LPFN_FREEADDRINFOW +#else +#define LPFN_FREEADDRINFOT LPFN_FREEADDRINFOA +#endif + +#endif + +#if (_WIN32_WINNT >= 0x0600) + +WINSOCK_API_LINKAGE +void +WSAAPI +FreeAddrInfoEx( + IN PADDRINFOEXA pAddrInfoEx OPTIONAL); + +WINSOCK_API_LINKAGE +void +WSAAPI +FreeAddrInfoExW( + IN PADDRINFOEXW pAddrInfoEx OPTIONAL); + +#define FreeAddrInfoExA FreeAddrInfoEx + +#ifdef UNICODE +#define FreeAddrInfoEx FreeAddrInfoExW +#endif + +#ifdef INCL_WINSOCK_API_TYPEDEFS + +typedef void +(WSAAPI *LPFN_FREEADDRINFOEXA)( + IN PADDRINFOEXA pAddrInfoEx); + +typedef void +(WSAAPI *LPFN_FREEADDRINFOEXW)( + IN PADDRINFOEXW pAddrInfoEx); + + +#ifdef UNICODE +#define LPFN_FREEADDRINFOEX LPFN_FREEADDRINFOEXW +#else +#define LPFN_FREEADDRINFOEX LPFN_FREEADDRINFOEXA +#endif + +#endif +#endif typedef int socklen_t; -struct ipv6_mreq { - struct in6_addr ipv6mr_multiaddr; - unsigned int ipv6mr_interface; -}; -typedef struct ipv6_mreq IPV6_MREG; - -struct in6_pktinfo { - IN6_ADDR ipi6_addr; - UINT ipi6_ifindex; -}; -typedef struct in6_pktinfo IN6_PKTINFO; - -typedef struct addrinfo +WINSOCK_API_LINKAGE +INT +WSAAPI +getnameinfo( + IN const SOCKADDR *pSockaddr, + IN socklen_t SockaddrLength, + OUT PCHAR pNodeBuffer OPTIONAL, + IN DWORD NodeBufferSize, + OUT PCHAR pServiceBuffer, + IN DWORD ServiceBufferSize, + IN INT Flags); + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) || (_WIN32_WINNT >= 0x0502) + +WINSOCK_API_LINKAGE +INT +WSAAPI +GetNameInfoW( + IN const SOCKADDR *pSockaddr, + IN socklen_t SockaddrLength, + OUT PWCHAR pNodeBuffer, + IN DWORD NodeBufferSize, + OUT PWCHAR pServiceBuffer OPTIONAL, + IN DWORD ServiceBufferSize, + IN INT Flags); + +#define GetNameInfoA getnameinfo + +#ifdef UNICODE +#define GetNameInfo GetNameInfoW +#else +#define GetNameInfo GetNameInfoA +#endif + +#endif + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef int +(WSAAPI *LPFN_GETNAMEINFO)( + IN const SOCKADDR *pSockaddr, + IN socklen_t SockaddrLength, + OUT PCHAR pNodeBuffer, + IN DWORD NodeBufferSize, + OUT PCHAR pServiceBuffer OPTIONAL, + IN DWORD ServiceBufferSize, + IN INT Flags); + +typedef INT +(WSAAPI *LPFN_GETNAMEINFOW)( + IN const SOCKADDR *pSockaddr, + IN socklen_t SockaddrLength, + OUT PWCHAR pNodeBuffer, + IN DWORD NodeBufferSize, + OUT PWCHAR pServiceBuffer OPTIONAL, + IN DWORD ServiceBufferSize, + IN INT Flags); + +#define LPFN_GETNAMEINFOA LPFN_GETNAMEINFO + +#ifdef UNICODE +#define LPFN_GETNAMEINFOT LPFN_GETNAMEINFOW +#else +#define LPFN_GETNAMEINFOT LPFN_GETNAMEINFOA +#endif +#endif + +#if (NTDDI_VERSION >= NTDDI_VISTA) + +WINSOCK_API_LINKAGE +INT +WSAAPI +inet_pton( + IN INT Family, + IN PCSTR pszAddrString, + OUT PVOID pAddrBuf); + +INT +WSAAPI +InetPtonW( + IN INT Family, + IN PCWSTR pszAddrString, + OUT PVOID pAddrBuf); + +PCSTR +WSAAPI +inet_ntop( + IN INT Family, + IN PVOID pAddr, + OUT PSTR pStringBuf, + IN size_t StringBufSize); + +PCWSTR +WSAAPI +InetNtopW( + IN INT Family, + IN PVOID pAddr, + OUT PWSTR pStringBuf, + IN size_t StringBufSize); + +#define InetPtonA inet_pton +#define InetNtopA inet_ntop + +#ifdef UNICODE +#define InetPton InetPtonW +#define InetNtop InetNtopW +#else +#define InetPton InetPtonA +#define InetNtop InetNtopA +#endif + +#if INCL_WINSOCK_API_TYPEDEFS + +typedef INT +(WSAAPI *LPFN_INET_PTONA)( + IN INT Family, + IN PCSTR pszAddrString, + OUT PVOID pAddrBuf); + +typedef INT +(WSAAPI *LPFN_INET_PTONW)( + IN INT Family, + IN PCWSTR pszAddrString, + OUT PVOID pAddrBuf); + +typedef PCSTR +(WSAAPI *LPFN_INET_NTOPA)( + IN INT Family, + IN PVOID pAddr, + OUT PSTR pStringBuf, + IN size_t StringBufSize); + +typedef PCWSTR +(WSAAPI *LPFN_INET_NTOPW)( + IN INT Family, + IN PVOID pAddr, + OUT PWSTR pStringBuf, + IN size_t StringBufSize); + +#ifdef UNICODE +#define LPFN_INET_PTON LPFN_INET_PTONW +#define LPFN_INET_NTOP LPFN_INET_NTOPW +#else +#define LPFN_INET_PTON LPFN_INET_PTONA +#define LPFN_INET_NTOP LPFN_INET_NTOPA +#endif + +#endif /* TYPEDEFS */ +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + +#if INCL_WINSOCK_API_PROTOTYPES + +#ifdef UNICODE +#define gai_strerror gai_strerrorW +#else +#define gai_strerror gai_strerrorA +#endif + +#define GAI_STRERROR_BUFFER_SIZE 1024 + +static __inline +char * +gai_strerrorA( + IN int ecode) { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - char *ai_canonname; - struct sockaddr *ai_addr; - struct addrinfo *ai_next; -} ADDRINFOA, *PADDRINFOA; - -typedef struct addrinfoW + DWORD dwMsgLen; + static char buff[GAI_STRERROR_BUFFER_SIZE + 1]; + + dwMsgLen = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM + |FORMAT_MESSAGE_IGNORE_INSERTS + |FORMAT_MESSAGE_MAX_WIDTH_MASK, + NULL, + ecode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)buff, + GAI_STRERROR_BUFFER_SIZE, + NULL); + + return buff; +} + +static __inline +WCHAR * +gai_strerrorW( + IN int ecode) { - int ai_flags; - int ai_family; - int ai_socktype; - int ai_protocol; - size_t ai_addrlen; - PWSTR ai_canonname; - struct sockaddr *ai_addr; - struct addrinfoW *ai_next; -} ADDRINFOW, *PADDRINFOW; - -#ifdef UNICODE -typedef ADDRINFOW ADDRINFOT,*PADDRINFOT; -#else -typedef ADDRINFOA ADDRINFOT,*PADDRINFOT; -#endif - -typedef ADDRINFOA ADDRINFO, FAR *LPADDRINFO; - -void WSAAPI freeaddrinfo (struct addrinfo*); -int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*, - struct addrinfo**); - -#define GAI_STRERROR_BUFFER_SIZE 1024 - -static __inline char* -gai_strerrorA(int ecode) + DWORD dwMsgLen; + static WCHAR buff[GAI_STRERROR_BUFFER_SIZE + 1]; + + dwMsgLen = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM + |FORMAT_MESSAGE_IGNORE_INSERTS + |FORMAT_MESSAGE_MAX_WIDTH_MASK, + NULL, + ecode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPWSTR)buff, + GAI_STRERROR_BUFFER_SIZE, + NULL); + + return buff; +} + +#endif /* INCL_WINSOCK_API_PROTOTYPES */ + +WS2TCPIP_INLINE +int +setipv4sourcefilter( + IN SOCKET Socket, + IN IN_ADDR Interface, + IN IN_ADDR Group, + IN MULTICAST_MODE_TYPE FilterMode, + IN ULONG SourceCount, + IN CONST IN_ADDR *SourceList) { - static char buff[GAI_STRERROR_BUFFER_SIZE + 1]; - - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, - NULL, - ecode, - MAKELANGID(LANG_NEUTRAL, - SUBLANG_DEFAULT), - (LPSTR)buff, - GAI_STRERROR_BUFFER_SIZE, - NULL); - - return buff; + int Error; + DWORD Size, Returned; + PIP_MSFILTER Filter; + + if (SourceCount > + (((ULONG) (ULONG_MAX - sizeof(*Filter))) / sizeof(*SourceList))) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Size = IP_MSFILTER_SIZE(SourceCount); + Filter = (PIP_MSFILTER) HeapAlloc(GetProcessHeap(), 0, Size); + if (Filter == NULL) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Filter->imsf_multiaddr = Group; + Filter->imsf_interface = Interface; + Filter->imsf_fmode = FilterMode; + Filter->imsf_numsrc = SourceCount; + if (SourceCount > 0) { + CopyMemory(Filter->imsf_slist, SourceList, + SourceCount * sizeof(*SourceList)); + } + + Error = WSAIoctl(Socket, SIOCSIPMSFILTER, Filter, Size, NULL, 0, + &Returned, NULL, NULL); + + HeapFree(GetProcessHeap(), 0, Filter); + + return Error; } -static __inline WCHAR* -gai_strerrorW(int ecode) +WS2TCPIP_INLINE +int +getipv4sourcefilter( + IN SOCKET Socket, + IN IN_ADDR Interface, + IN IN_ADDR Group, + OUT MULTICAST_MODE_TYPE *FilterMode, + IN OUT ULONG *SourceCount, + OUT IN_ADDR *SourceList) { - static WCHAR buff[GAI_STRERROR_BUFFER_SIZE + 1]; - - FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, - NULL, - ecode, - MAKELANGID(LANG_NEUTRAL, - SUBLANG_DEFAULT), - (LPWSTR)buff, - GAI_STRERROR_BUFFER_SIZE, - NULL); - - return buff; + int Error; + DWORD Size, Returned; + PIP_MSFILTER Filter; + + if (*SourceCount > + (((ULONG) (ULONG_MAX - sizeof(*Filter))) / sizeof(*SourceList))) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Size = IP_MSFILTER_SIZE(*SourceCount); + Filter = (PIP_MSFILTER) HeapAlloc(GetProcessHeap(), 0, Size); + if (Filter == NULL) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Filter->imsf_multiaddr = Group; + Filter->imsf_interface = Interface; + Filter->imsf_numsrc = *SourceCount; + + Error = WSAIoctl(Socket, SIOCGIPMSFILTER, Filter, Size, Filter, Size, + &Returned, NULL, NULL); + + if (Error == 0) { + if (*SourceCount > 0) { + CopyMemory(SourceList, Filter->imsf_slist, + *SourceCount * sizeof(*SourceList)); + *SourceCount = Filter->imsf_numsrc; + } + *FilterMode = Filter->imsf_fmode; + } + + HeapFree(GetProcessHeap(), 0, Filter); + + return Error; } -#ifdef UNICODE -#define gai_strerror gai_strerrorW -#else -#define gai_strerror gai_strerrorA -#endif /* UNICODE */ - -int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD, - char*,DWORD,int); - -#if (_WIN32_WINNT >= 0x0502) -INT WSAAPI GetNameInfoW(const SOCKADDR*,socklen_t,PWCHAR,DWORD,PWCHAR,DWORD,INT); -#define GetNameInfoA getnameinfo - -#ifdef UNICODE -#define GetNameInfo GetNameInfoW -#else -#define GetNameInfo GetNameInfoA -#endif /* UNICODE */ - -#endif /* (_WIN32_WINNT >= 0x0502) */ - -/* Some older IPv4/IPv6 compatability stuff */ - -/* This struct lacks sin6_scope_id; retained for use in sockaddr_gen */ -struct sockaddr_in6_old { - short sin6_family; - u_short sin6_port; - u_long sin6_flowinfo; - struct in6_addr sin6_addr; -}; - -typedef union sockaddr_gen{ - struct sockaddr Address; - struct sockaddr_in AddressIn; - struct sockaddr_in6_old AddressIn6; -} sockaddr_gen; - - -typedef struct _INTERFACE_INFO { - u_long iiFlags; - sockaddr_gen iiAddress; - sockaddr_gen iiBroadcastAddress; - sockaddr_gen iiNetmask; -} INTERFACE_INFO, *LPINTERFACE_INFO; - -/* - The definition above can cause problems on NT4,prior to sp4. - To workaround, include the following struct and typedef and - #define INTERFACE_INFO OLD_INTERFACE_INFO - See: FIX: WSAIoctl SIO_GET_INTERFACE_LIST Option Problem - (Q181520) in MSDN KB. - - The old definition causes problems on newer NT and on XP. - -typedef struct _OLD_INTERFACE_INFO { - u_long iiFlags; - struct sockaddr iiAddress; - struct sockaddr iiBroadcastAddress; - struct sockaddr iiNetmask; -} OLD_INTERFACE_INFO; -*/ - -#ifdef __cplusplus +#if (NTDDI_VERSION >= NTDDI_WINXP) + +WS2TCPIP_INLINE +int +setsourcefilter( + IN SOCKET Socket, + IN ULONG Interface, + IN CONST SOCKADDR *Group, + IN int GroupLength, + IN MULTICAST_MODE_TYPE FilterMode, + IN ULONG SourceCount, + IN CONST SOCKADDR_STORAGE *SourceList) +{ + int Error; + DWORD Size, Returned; + PGROUP_FILTER Filter; + + if (SourceCount >= (((ULONG) (ULONG_MAX - sizeof(*Filter))) / sizeof(*SourceList))) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Size = GROUP_FILTER_SIZE(SourceCount); + Filter = (PGROUP_FILTER) HeapAlloc(GetProcessHeap(), 0, Size); + if (Filter == NULL) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Filter->gf_interface = Interface; + ZeroMemory(&Filter->gf_group, sizeof(Filter->gf_group)); + CopyMemory(&Filter->gf_group, Group, GroupLength); + Filter->gf_fmode = FilterMode; + Filter->gf_numsrc = SourceCount; + if (SourceCount > 0) { + CopyMemory(Filter->gf_slist, SourceList, SourceCount * sizeof(*SourceList)); + } + + Error = WSAIoctl(Socket, SIOCSMSFILTER, Filter, Size, NULL, 0, &Returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, Filter); + + return Error; } -#endif - -#endif /* _WS2TCPIP_H */ + +WS2TCPIP_INLINE +int +getsourcefilter( + IN SOCKET Socket, + IN ULONG Interface, + IN CONST SOCKADDR *Group, + IN int GroupLength, + OUT MULTICAST_MODE_TYPE *FilterMode, + IN OUT ULONG *SourceCount, + OUT SOCKADDR_STORAGE *SourceList) +{ + int Error; + DWORD Size, Returned; + PGROUP_FILTER Filter; + + if (*SourceCount > (((ULONG) (ULONG_MAX - sizeof(*Filter))) / sizeof(*SourceList))) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Size = GROUP_FILTER_SIZE(*SourceCount); + Filter = (PGROUP_FILTER) HeapAlloc(GetProcessHeap(), 0, Size); + if (Filter == NULL) { + WSASetLastError(WSAENOBUFS); + return SOCKET_ERROR; + } + + Filter->gf_interface = Interface; + ZeroMemory(&Filter->gf_group, sizeof(Filter->gf_group)); + CopyMemory(&Filter->gf_group, Group, GroupLength); + Filter->gf_numsrc = *SourceCount; + + Error = WSAIoctl(Socket, SIOCGMSFILTER, Filter, Size, Filter, Size, &Returned, NULL, NULL); + if (Error == 0) { + if (*SourceCount > 0) { + CopyMemory(SourceList, Filter->gf_slist, *SourceCount * sizeof(*SourceList)); + *SourceCount = Filter->gf_numsrc; + } + *FilterMode = Filter->gf_fmode; + } + + HeapFree(GetProcessHeap(), 0, Filter); + + return Error; +} +#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ + +#ifdef IDEAL_SEND_BACKLOG_IOCTLS + +WS2TCPIP_INLINE +int +idealsendbacklogquery( + IN SOCKET s, + OUT ULONG *pISB) +{ + DWORD bytes; + + return WSAIoctl(s, SIO_IDEAL_SEND_BACKLOG_QUERY, + NULL, 0, pISB, sizeof(*pISB), &bytes, NULL, NULL); +} + +WS2TCPIP_INLINE +int +idealsendbacklognotify( + IN SOCKET s, + IN LPWSAOVERLAPPED lpOverlapped OPTIONAL, + IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine OPTIONAL) +{ + DWORD bytes; + + return WSAIoctl(s, SIO_IDEAL_SEND_BACKLOG_CHANGE, + NULL, 0, NULL, 0, &bytes, + lpOverlapped, lpCompletionRoutine); +} + +#endif /* IDEAL_SEND_BACKLOG_IOCTLS */ + +#if (_WIN32_WINNT >= 0x0600) + +#ifdef _SECURE_SOCKET_TYPES_DEFINED_ + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSASetSocketSecurity( + IN SOCKET Socket, + IN const SOCKET_SECURITY_SETTINGS *SecuritySettings OPTIONAL, + IN ULONG SecuritySettingsLen, + IN LPWSAOVERLAPPED Overlapped OPTIONAL, + IN LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSAQuerySocketSecurity( + IN SOCKET Socket, + IN const SOCKET_SECURITY_QUERY_TEMPLATE *SecurityQueryTemplate OPTIONAL, + IN ULONG SecurityQueryTemplateLen, + OUT SOCKET_SECURITY_QUERY_INFO* SecurityQueryInfo OPTIONAL, + IN OUT ULONG *SecurityQueryInfoLen, + IN LPWSAOVERLAPPED Overlapped OPTIONAL, + IN LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSASetSocketPeerTargetName( + IN SOCKET Socket, + IN const SOCKET_PEER_TARGET_NAME *PeerTargetName, + IN ULONG PeerTargetNameLen, + IN LPWSAOVERLAPPED Overlapped OPTIONAL, + IN LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSADeleteSocketPeerTargetName( + IN SOCKET Socket, + IN const struct sockaddr *PeerAddr, + IN ULONG PeerAddrLen, + IN LPWSAOVERLAPPED Overlapped OPTIONAL, + IN LPWSAOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine OPTIONAL); + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSAImpersonateSocketPeer( + IN SOCKET Socket, + IN const struct sockaddr *PeerAddr OPTIONAL, + IN ULONG PeerAddrLen); + +WINSOCK_API_LINKAGE +INT +WSAAPI +WSARevertImpersonation(); + +#endif /* _SECURE_SOCKET_TYPES_DEFINED_ */ +#endif /* (_WIN32_WINNT >= 0x0600) */ + +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT <= 0x0500) +#include <wspiapi.h> +#endif + +#ifdef __cplusplus +} +#endif Modified: branches/header-work/include/xdk/extypes.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/extypes…
============================================================================== --- branches/header-work/include/xdk/extypes.h [iso-8859-1] (original) +++ branches/header-work/include/xdk/extypes.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -1,7 +1,8 @@ +$if (_WDMDDK_ || _NTDDK_) /****************************************************************************** * Executive Types * ******************************************************************************/ - +$endif $if (_WDMDDK_) #define EX_RUNDOWN_ACTIVE 0x1 #define EX_RUNDOWN_COUNT_SHIFT 0x1 @@ -285,3 +286,9 @@ #define PROTECTED_POOL 0x80000000 $endif (_NTDDK_) +$if (_NTIFS_) +#define INVALID_PROCESSOR_INDEX 0xffffffff + +#define EX_PUSH_LOCK ULONG_PTR +#define PEX_PUSH_LOCK PULONG_PTR +$endif (_NTIFS_) Modified: branches/header-work/include/xdk/fsrtltypes.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/fsrtlty…
============================================================================== --- branches/header-work/include/xdk/fsrtltypes.h [iso-8859-1] (original) +++ branches/header-work/include/xdk/fsrtltypes.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -1,5 +1,11 @@ $if (_NTIFS_) /* FSRTL Types */ + +typedef ULONG LBN; +typedef LBN *PLBN; + +typedef ULONG VBN; +typedef VBN *PVBN; typedef struct _FSRTL_COMMON_FCB_HEADER { CSHORT NodeTypeCode; @@ -169,4 +175,119 @@ #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_HARD_ERROR 0x1 #define FSRTL_CC_FLUSH_ERROR_FLAG_NO_LOG_ENTRY 0x2 + +typedef NTSTATUS +(NTAPI *PCOMPLETE_LOCK_IRP_ROUTINE) ( + IN PVOID Context, + IN PIRP Irp); + +typedef struct _FILE_LOCK_INFO { + LARGE_INTEGER StartingByte; + LARGE_INTEGER Length; + BOOLEAN ExclusiveLock; + ULONG Key; + PFILE_OBJECT FileObject; + PVOID ProcessId; + LARGE_INTEGER EndingByte; +} FILE_LOCK_INFO, *PFILE_LOCK_INFO; + +typedef VOID +(NTAPI *PUNLOCK_ROUTINE) ( + IN PVOID Context, + IN PFILE_LOCK_INFO FileLockInfo); + +typedef struct _FILE_LOCK { + PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine; + PUNLOCK_ROUTINE UnlockRoutine; + BOOLEAN FastIoIsQuestionable; + BOOLEAN SpareC[3]; + PVOID LockInformation; + FILE_LOCK_INFO LastReturnedLockInfo; + PVOID LastReturnedLock; + LONG volatile LockRequestsInProgress; +} FILE_LOCK, *PFILE_LOCK; + +typedef struct _TUNNEL { + FAST_MUTEX Mutex; + PRTL_SPLAY_LINKS Cache; + LIST_ENTRY TimerQueue; + USHORT NumEntries; +} TUNNEL, *PTUNNEL; + +typedef struct _BASE_MCB { + ULONG MaximumPairCount; + ULONG PairCount; + USHORT PoolType; + USHORT Flags; + PVOID Mapping; +} BASE_MCB, *PBASE_MCB; + +typedef struct _LARGE_MCB { + PKGUARDED_MUTEX GuardedMutex; + BASE_MCB BaseMcb; +} LARGE_MCB, *PLARGE_MCB; + +#define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1 + +typedef struct _MCB { + LARGE_MCB DummyFieldThatSizesThisStructureCorrectly; +} MCB, *PMCB; + +typedef enum _FAST_IO_POSSIBLE { + FastIoIsNotPossible = 0, + FastIoIsPossible, + FastIoIsQuestionable +} FAST_IO_POSSIBLE; + +typedef struct _EOF_WAIT_BLOCK { + LIST_ENTRY EofWaitLinks; + KEVENT Event; +} EOF_WAIT_BLOCK, *PEOF_WAIT_BLOCK; + +typedef PVOID OPLOCK, *POPLOCK; + +typedef VOID +(NTAPI *POPLOCK_WAIT_COMPLETE_ROUTINE) ( + IN PVOID Context, + IN PIRP Irp); + +typedef VOID +(NTAPI *POPLOCK_FS_PREPOST_IRP) ( + IN PVOID Context, + IN PIRP Irp); + +#if (NTDDI_VERSION >= NTDDI_VISTASP1) +#define OPLOCK_FLAG_COMPLETE_IF_OPLOCKED 0x00000001 +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) +#define OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY 0x00000002 +#define OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK 0x00000004 +#define OPLOCK_FLAG_IGNORE_OPLOCK_KEYS 0x00000008 +#define OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH 0x00000001 +#endif + +#if (NTDDI_VERSION >= NTDDI_WIN7) + +typedef struct _OPLOCK_KEY_ECP_CONTEXT { + GUID OplockKey; + ULONG Reserved; +} OPLOCK_KEY_ECP_CONTEXT, *POPLOCK_KEY_ECP_CONTEXT; + +DEFINE_GUID( GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f ); + +#endif + +typedef PVOID PNOTIFY_SYNC; + +typedef BOOLEAN +(NTAPI *PCHECK_FOR_TRAVERSE_ACCESS) ( + IN PVOID NotifyContext, + IN PVOID TargetContext OPTIONAL, + IN PSECURITY_SUBJECT_CONTEXT SubjectContext); + +typedef BOOLEAN +(NTAPI *PFILTER_REPORT_CHANGE) ( + IN PVOID NotifyContext, + IN PVOID FilterContext); $endif (_NTIFS_) Modified: branches/header-work/include/xdk/ntifs.template.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/xdk/ntifs.t…
============================================================================== --- branches/header-work/include/xdk/ntifs.template.h [iso-8859-1] (original) +++ branches/header-work/include/xdk/ntifs.template.h [iso-8859-1] Tue Mar 30 23:50:05 2010 @@ -1064,6 +1064,7 @@ } KQUEUE, *PKQUEUE, *RESTRICTED_POINTER PRKQUEUE; $include (kefuncs.h) +$include (extypes.h) $include (exfuncs.h) $include (sefuncs.h) $include (psfuncs.h) @@ -1079,11 +1080,6 @@ $include (ccfuncs.h) $include (zwfuncs.h) -#define INVALID_PROCESSOR_INDEX 0xffffffff - -#define EX_PUSH_LOCK ULONG_PTR -#define PEX_PUSH_LOCK PULONG_PTR - /* #if !defined(_X86AMD64_) FIXME : WHAT ?! */ #if defined(_WIN64) @@ -1114,127 +1110,6 @@ #if defined(_M_IX86) || defined(_M_AMD64) #define HalGetDmaAlignmentRequirement() 1L #endif - -typedef ULONG LBN; -typedef LBN *PLBN; - -typedef ULONG VBN; -typedef VBN *PVBN; - -typedef enum _FAST_IO_POSSIBLE { - FastIoIsNotPossible = 0, - FastIoIsPossible, - FastIoIsQuestionable -} FAST_IO_POSSIBLE; - -typedef struct _EOF_WAIT_BLOCK { - LIST_ENTRY EofWaitLinks; - KEVENT Event; -} EOF_WAIT_BLOCK, *PEOF_WAIT_BLOCK; - -typedef struct _FILE_LOCK_INFO { - LARGE_INTEGER StartingByte; - LARGE_INTEGER Length; - BOOLEAN ExclusiveLock; - ULONG Key; - PFILE_OBJECT FileObject; - PVOID ProcessId; - LARGE_INTEGER EndingByte; -} FILE_LOCK_INFO, *PFILE_LOCK_INFO; - -typedef NTSTATUS -(NTAPI *PCOMPLETE_LOCK_IRP_ROUTINE) ( - IN PVOID Context, - IN PIRP Irp); - -typedef VOID -(NTAPI *PUNLOCK_ROUTINE) ( - IN PVOID Context, - IN PFILE_LOCK_INFO FileLockInfo); - -typedef struct _FILE_LOCK { - PCOMPLETE_LOCK_IRP_ROUTINE CompleteLockIrpRoutine; - PUNLOCK_ROUTINE UnlockRoutine; - BOOLEAN FastIoIsQuestionable; - BOOLEAN SpareC[3]; - PVOID LockInformation; - FILE_LOCK_INFO LastReturnedLockInfo; - PVOID LastReturnedLock; - LONG volatile LockRequestsInProgress; -} FILE_LOCK, *PFILE_LOCK; - -typedef struct _TUNNEL { - FAST_MUTEX Mutex; - PRTL_SPLAY_LINKS Cache; - LIST_ENTRY TimerQueue; - USHORT NumEntries; -} TUNNEL, *PTUNNEL; - -typedef struct _BASE_MCB { - ULONG MaximumPairCount; - ULONG PairCount; - USHORT PoolType; - USHORT Flags; - PVOID Mapping; -} BASE_MCB, *PBASE_MCB; - -typedef struct _LARGE_MCB { - PKGUARDED_MUTEX GuardedMutex; - BASE_MCB BaseMcb; -} LARGE_MCB, *PLARGE_MCB; - -#define MCB_FLAG_RAISE_ON_ALLOCATION_FAILURE 1 - -typedef struct _MCB { - LARGE_MCB DummyFieldThatSizesThisStructureCorrectly; -} MCB, *PMCB; - -typedef PVOID OPLOCK, *POPLOCK; - -typedef VOID -(NTAPI *POPLOCK_WAIT_COMPLETE_ROUTINE) ( - IN PVOID Context, - IN PIRP Irp); - -typedef VOID -(NTAPI *POPLOCK_FS_PREPOST_IRP) ( - IN PVOID Context, - IN PIRP Irp); - -#if (NTDDI_VERSION >= NTDDI_VISTASP1) -#define OPLOCK_FLAG_COMPLETE_IF_OPLOCKED 0x00000001 -#endif - -#if (NTDDI_VERSION >= NTDDI_WIN7) -#define OPLOCK_FLAG_OPLOCK_KEY_CHECK_ONLY 0x00000002 -#define OPLOCK_FLAG_BACK_OUT_ATOMIC_OPLOCK 0x00000004 -#define OPLOCK_FLAG_IGNORE_OPLOCK_KEYS 0x00000008 -#define OPLOCK_FSCTRL_FLAG_ALL_KEYS_MATCH 0x00000001 -#endif - -#if (NTDDI_VERSION >= NTDDI_WIN7) - -typedef struct _OPLOCK_KEY_ECP_CONTEXT { - GUID OplockKey; - ULONG Reserved; -} OPLOCK_KEY_ECP_CONTEXT, *POPLOCK_KEY_ECP_CONTEXT; - -DEFINE_GUID( GUID_ECP_OPLOCK_KEY, 0x48850596, 0x3050, 0x4be7, 0x98, 0x63, 0xfe, 0xc3, 0x50, 0xce, 0x8d, 0x7f ); - -#endif - -typedef PVOID PNOTIFY_SYNC; - -typedef BOOLEAN -(NTAPI *PCHECK_FOR_TRAVERSE_ACCESS) ( - IN PVOID NotifyContext, - IN PVOID TargetContext OPTIONAL, - IN PSECURITY_SUBJECT_CONTEXT SubjectContext); - -typedef BOOLEAN -(NTAPI *PFILTER_REPORT_CHANGE) ( - IN PVOID NotifyContext, - IN PVOID FilterContext); extern NTKERNELAPI PUSHORT NlsOemLeadByteInfo; #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
14 years, 8 months
1
0
0
0
[tkreuzer] 46607: fix a typo
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 30 23:35:52 2010 New Revision: 46607 URL:
http://svn.reactos.org/svn/reactos?rev=46607&view=rev
Log: fix a typo Modified: trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c Modified: trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/cxa_pur…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c [iso-8859-1] Tue Mar 30 23:35:52 2010 @@ -1,5 +1,5 @@ -void assert(int); +void _assert(int); void __cxa_pure_virtual() {
14 years, 8 months
1
0
0
0
[tkreuzer] 46606: [MINGW] - add back getopt.c (needed by rosapps) - add ofmt_stub.c and cx_pure_virtual.c
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 30 23:28:38 2010 New Revision: 46606 URL:
http://svn.reactos.org/svn/reactos?rev=46606&view=rev
Log: [MINGW] - add back getopt.c (needed by rosapps) - add ofmt_stub.c and cx_pure_virtual.c Added: trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c (with props) trunk/reactos/lib/3rdparty/mingw/getopt.c (props changed) - copied unchanged from r46596, trunk/reactos/lib/3rdparty/mingw/getopt.c trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c (with props) Modified: trunk/reactos/lib/3rdparty/mingw/mingw.rbuild Added: trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/cxa_pur…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c (added) +++ trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c [iso-8859-1] Tue Mar 30 23:28:38 2010 @@ -1,0 +1,7 @@ + +void assert(int); + +void __cxa_pure_virtual() +{ + _assert(0); +} Propchange: trunk/reactos/lib/3rdparty/mingw/cxa_pure_virtual.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/lib/3rdparty/mingw/getopt.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/lib/3rdparty/mingw/getopt.c ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Tue Mar 30 23:28:38 2010 @@ -1,0 +1,3 @@ +/branches/header-work/lib/3rdparty/mingw/getopt.c:45691-46463 +/branches/ros-amd64-bringup/lib/3rdparty/mingw/getopt.c:36852 +/branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/getopt.c:34711-34712,34741,34743,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36397,36445,36502-36503,36505,36570,36614,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40927-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43857-43858,43860,43905-43907,43969,44002,44036-44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338-44339,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44772,45124,45126-45127,46394,46524,46526,46589 Modified: trunk/reactos/lib/3rdparty/mingw/mingw.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/mingw.r…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/mingw/mingw.rbuild [iso-8859-1] Tue Mar 30 23:28:38 2010 @@ -20,6 +20,7 @@ <file>crt_handler.c</file> <file>dllentry.c</file> <file>gccmain.c</file> + <file>getopt.c</file> <file>gs_support.c</file> <file>merr.c</file> <file>mingw_helpers.c</file> @@ -35,6 +36,8 @@ <file>xncommod.c</file> <file>xthdloc.c</file> <file>xtxtmode.c</file> + <file>ofmt_stub.c</file> + <file>cxa_pure_virtual.c</file> </module> <module name="mingw_main" type="staticlibrary" isstartuplib="true" crt="dll"> <define name="_CRTBLD" /> Added: trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/mingw/ofmt_st…
============================================================================== --- trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c (added) +++ trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c [iso-8859-1] Tue Mar 30 23:28:38 2010 @@ -1,0 +1,6 @@ + +int _get_output_format(void) +{ + return 0; +} + Propchange: trunk/reactos/lib/3rdparty/mingw/ofmt_stub.c ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 8 months
1
0
0
0
[ekohl] 46605: [NTOSKRNL] - Capture the security descriptor before passing it to SepAccessCheck. - Move the security descriptor check and the impersonation level check from SepAccessCheck to SeAccessCheck.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Mar 30 22:16:26 2010 New Revision: 46605 URL:
http://svn.reactos.org/svn/reactos?rev=46605&view=rev
Log: [NTOSKRNL] - Capture the security descriptor before passing it to SepAccessCheck. - Move the security descriptor check and the impersonation level check from SepAccessCheck to SeAccessCheck. Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=46…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Tue Mar 30 22:16:26 2010 @@ -362,8 +362,7 @@ IN PGENERIC_MAPPING GenericMapping, IN KPROCESSOR_MODE AccessMode, OUT PACCESS_MASK GrantedAccess, - OUT PNTSTATUS AccessStatus, - SECURITY_IMPERSONATION_LEVEL LowestImpersonationLevel) + OUT PNTSTATUS AccessStatus) { LUID_AND_ATTRIBUTES Privilege; ACCESS_MASK CurrentAccess, AccessMask; @@ -376,22 +375,6 @@ PSID Sid; NTSTATUS Status; PAGED_CODE(); - - /* Check if we didn't get an SD */ - if (!SecurityDescriptor) - { - /* Automatic failure */ - *AccessStatus = STATUS_ACCESS_DENIED; - return FALSE; - } - - /* Check for invalid impersonation */ - if ((SubjectSecurityContext->ClientToken) && - (SubjectSecurityContext->ImpersonationLevel < LowestImpersonationLevel)) - { - *AccessStatus = STATUS_BAD_IMPERSONATION_LEVEL; - return FALSE; - } /* Check for no access desired */ if (!DesiredAccess) @@ -680,6 +663,22 @@ return TRUE; } + /* Check if we didn't get an SD */ + if (!SecurityDescriptor) + { + /* Automatic failure */ + *AccessStatus = STATUS_ACCESS_DENIED; + return FALSE; + } + + /* Check for invalid impersonation */ + if ((SubjectSecurityContext->ClientToken) && + (SubjectSecurityContext->ImpersonationLevel < SecurityImpersonation)) + { + *AccessStatus = STATUS_BAD_IMPERSONATION_LEVEL; + return FALSE; + } + /* Call the internal function */ return SepAccessCheck(SecurityDescriptor, SubjectSecurityContext, @@ -690,8 +689,7 @@ GenericMapping, AccessMode, GrantedAccess, - AccessStatus, - SecurityImpersonation); + AccessStatus); } /* SYSTEM CALLS ***************************************************************/ @@ -710,6 +708,7 @@ OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus) { + PSECURITY_DESCRIPTOR CapturedSecurityDescriptor = NULL; SECURITY_SUBJECT_CONTEXT SubjectSecurityContext; KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); PTOKEN Token; @@ -787,11 +786,35 @@ return STATUS_BAD_IMPERSONATION_LEVEL; } + /* Capture the security descriptor */ + Status = SeCaptureSecurityDescriptor(SecurityDescriptor, + PreviousMode, + PagedPool, + FALSE, + &CapturedSecurityDescriptor); + if (!NT_SUCCESS(Status)) + { + DPRINT("Failed to capture the Security Descriptor\n"); + ObDereferenceObject(Token); + return Status; + } + + /* Check the captured security descriptor */ + if (CapturedSecurityDescriptor == NULL) + { + DPRINT("Security Descriptor is NULL\n"); + ObDereferenceObject(Token); + return STATUS_INVALID_SECURITY_DESCR; + } + /* Check security descriptor for valid owner and group */ if (SepGetSDOwner(SecurityDescriptor)== NULL || SepGetSDGroup(SecurityDescriptor) == NULL) { DPRINT("Security Descriptor does not have a valid group or owner\n"); + SeReleaseSecurityDescriptor(CapturedSecurityDescriptor, + PreviousMode, + FALSE); ObDereferenceObject(Token); return STATUS_INVALID_SECURITY_DESCR; } @@ -804,7 +827,7 @@ SeLockSubjectContext(&SubjectSecurityContext); /* Now perform the access check */ - SepAccessCheck(SecurityDescriptor, + SepAccessCheck(CapturedSecurityDescriptor, &SubjectSecurityContext, TRUE, DesiredAccess, @@ -813,11 +836,15 @@ GenericMapping, PreviousMode, GrantedAccess, - AccessStatus, - SecurityIdentification); + AccessStatus); /* Unlock subject context */ SeUnlockSubjectContext(&SubjectSecurityContext); + + /* Release the captured security descriptor */ + SeReleaseSecurityDescriptor(CapturedSecurityDescriptor, + PreviousMode, + FALSE); /* Dereference the token */ ObDereferenceObject(Token);
14 years, 8 months
1
0
0
0
[tkreuzer] 46604: [WINE] define interlocked_xchg_add to InterlockedExchangeAdd
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 30 21:59:29 2010 New Revision: 46604 URL:
http://svn.reactos.org/svn/reactos?rev=46604&view=rev
Log: [WINE] define interlocked_xchg_add to InterlockedExchangeAdd Modified: trunk/reactos/lib/3rdparty/libwine/debug_ros.c Modified: trunk/reactos/lib/3rdparty/libwine/debug_ros.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwine/debug…
============================================================================== --- trunk/reactos/lib/3rdparty/libwine/debug_ros.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwine/debug_ros.c [iso-8859-1] Tue Mar 30 21:59:29 2010 @@ -5,6 +5,7 @@ #define free libwine_free #define realloc libwine_realloc #define _strdup libwine__strdup +#define interlocked_xchg_add InterlockedExchangeAdd #include "debug.c"
14 years, 8 months
1
0
0
0
[janderwald] 46603: [SETUPAPI] - Open Device Class with desired access
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Mar 30 21:43:09 2010 New Revision: 46603 URL:
http://svn.reactos.org/svn/reactos?rev=46603&view=rev
Log: [SETUPAPI] - Open Device Class with desired access Modified: trunk/reactos/dll/win32/setupapi/devinst.c Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Tue Mar 30 21:43:09 2010 @@ -3662,7 +3662,7 @@ if (!(l = RegOpenKeyExW(HKLM, lpKeyName, 0, - 0, + samDesired, &hClassesKey))) { if (MachineName != NULL)
14 years, 8 months
1
0
0
0
[ekohl] 46602: [NTOSKRNL] - Move kernel-mode check around, so we won't run it twice when calling NtAccessCheck. - Fix a wrong check for security descriptors with a NULL-DACL.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Mar 30 19:01:23 2010 New Revision: 46602 URL:
http://svn.reactos.org/svn/reactos?rev=46602&view=rev
Log: [NTOSKRNL] - Move kernel-mode check around, so we won't run it twice when calling NtAccessCheck. - Fix a wrong check for security descriptors with a NULL-DACL. Modified: trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=46…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/semgr.c [iso-8859-1] Tue Mar 30 19:01:23 2010 @@ -377,28 +377,6 @@ NTSTATUS Status; PAGED_CODE(); - /* Check if this is kernel mode */ - if (AccessMode == KernelMode) - { - /* Check if kernel wants everything */ - if (DesiredAccess & MAXIMUM_ALLOWED) - { - /* Give it */ - *GrantedAccess = GenericMapping->GenericAll; - *GrantedAccess |= (DesiredAccess &~ MAXIMUM_ALLOWED); - *GrantedAccess |= PreviouslyGrantedAccess; - } - else - { - /* Give the desired and previous access */ - *GrantedAccess = DesiredAccess | PreviouslyGrantedAccess; - } - - /* Success */ - *AccessStatus = STATUS_SUCCESS; - return TRUE; - } - /* Check if we didn't get an SD */ if (!SecurityDescriptor) { @@ -467,7 +445,7 @@ } /* RULE 1: Grant desired access if the object is unprotected */ - if (Present == TRUE && Dacl == NULL) + if (Present == FALSE || Dacl == NULL) { if (SubjectContextLocked == FALSE) { @@ -678,6 +656,30 @@ OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus) { + PAGED_CODE(); + + /* Check if this is kernel mode */ + if (AccessMode == KernelMode) + { + /* Check if kernel wants everything */ + if (DesiredAccess & MAXIMUM_ALLOWED) + { + /* Give it */ + *GrantedAccess = GenericMapping->GenericAll; + *GrantedAccess |= (DesiredAccess &~ MAXIMUM_ALLOWED); + *GrantedAccess |= PreviouslyGrantedAccess; + } + else + { + /* Give the desired and previous access */ + *GrantedAccess = DesiredAccess | PreviouslyGrantedAccess; + } + + /* Success */ + *AccessStatus = STATUS_SUCCESS; + return TRUE; + } + /* Call the internal function */ return SepAccessCheck(SecurityDescriptor, SubjectSecurityContext,
14 years, 8 months
1
0
0
0
[tkreuzer] 46601: [NTOS] Update pspec file with amd64 exports, use -arch= where appropriate
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Mar 30 18:59:52 2010 New Revision: 46601 URL:
http://svn.reactos.org/svn/reactos?rev=46601&view=rev
Log: [NTOS] Update pspec file with amd64 exports, use -arch= where appropriate Modified: trunk/reactos/ntoskrnl/ntoskrnl.pspec Modified: trunk/reactos/ntoskrnl/ntoskrnl.pspec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.pspec?re…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] Tue Mar 30 18:59:52 2010 @@ -1,4 +1,5 @@ #include <msvctarget.h> +#undef i386 @ stdcall CcCanIWrite(ptr long long long) @ stdcall CcCopyRead(ptr ptr long long ptr ptr) @@ -55,6 +56,7 @@ @ stdcall DbgPrompt(str ptr long) @ stdcall DbgQueryDebugFilterState(long long) @ stdcall DbgSetDebugFilterState(long long long) +@ stdcall -arch=x86_64 ExAcquireFastMutex(ptr) @ fastcall ExAcquireFastMutexUnsafe(ptr) @ stdcall ExAcquireResourceExclusiveLite(ptr long) @ stdcall ExAcquireResourceSharedLite(ptr long) @@ -101,26 +103,37 @@ @ stdcall ExInitializeRundownProtectionCacheAware(ptr long) @ stdcall ExInitializeZone(ptr long ptr long) @ stdcall ExInterlockedAddLargeInteger(ptr long long ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedAddLargeStatistic(ptr long) +#endif @ stdcall ExInterlockedAddUlong(ptr long ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedCompareExchange64(ptr ptr ptr ptr) @ stdcall ExInterlockedDecrementLong(ptr ptr) @ stdcall ExInterlockedExchangeUlong(ptr long ptr) +#endif @ stdcall ExInterlockedExtendZone(ptr ptr long ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedFlushSList(ptr) @ stdcall ExInterlockedIncrementLong(ptr ptr) +#endif @ stdcall ExInterlockedInsertHeadList(ptr ptr ptr) @ stdcall ExInterlockedInsertTailList(ptr ptr ptr) @ stdcall ExInterlockedPopEntryList(ptr ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedPopEntrySList(ptr ptr) +#endif @ stdcall ExInterlockedPushEntryList(ptr ptr ptr) +#ifndef __x86_64__ @ fastcall ExInterlockedPushEntrySList(ptr ptr ptr) +#endif @ stdcall ExInterlockedRemoveHeadList(ptr ptr) @ stdcall ExIsProcessorFeaturePresent(long) @ stdcall ExIsResourceAcquiredExclusiveLite(ptr) @ stdcall ExIsResourceAcquiredSharedLite(ptr) @ stdcall ExLocalTimeToSystemTime(ptr ptr) @ stdcall ExNotifyCallback(ptr ptr ptr) +@ stdcall -arch=x86_64 ExQueryDepthSList(ptr) @ stdcall ExQueryPoolBlockSize(ptr ptr) @ stdcall ExQueueWorkItem(ptr long) @ stdcall ExRaiseAccessViolation() @@ -132,6 +145,7 @@ @ fastcall ExReInitializeRundownProtectionCacheAware(ptr) ExfReInitializeRundownProtectionCacheAware @ stdcall ExRegisterCallback(ptr ptr ptr) @ stdcall ExReinitializeResourceLite(ptr) +@ stdcall -arch=x86_64 ExReleaseFastMutex(ptr) @ fastcall ExReleaseFastMutexUnsafe(ptr) @ fastcall ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(ptr) @ fastcall ExReleaseResourceAndLeaveCriticalRegion(ptr) @@ -149,6 +163,7 @@ @ stdcall ExSizeOfRundownProtectionCacheAware() @ stdcall ExSystemExceptionFilter() @ stdcall ExSystemTimeToLocalTime(ptr ptr) +@ stdcall -arch=x86_64 ExTryToAcquireFastMutex(ptr) @ stdcall ExUnregisterCallback(ptr) @ stdcall ExUuidCreate(ptr) @ stdcall ExVerifySuite(long) @@ -157,6 +172,7 @@ @ extern ExWindowStationObjectType @ fastcall ExfAcquirePushLockExclusive(ptr) @ fastcall ExfAcquirePushLockShared(ptr) +#ifndef __x86_64__ @ fastcall ExfInterlockedAddUlong(ptr long ptr) @ fastcall ExfInterlockedCompareExchange64(ptr ptr ptr) @ fastcall ExfInterlockedInsertHeadList(ptr ptr ptr) @@ -164,22 +180,24 @@ @ fastcall ExfInterlockedPopEntryList(ptr ptr) @ fastcall ExfInterlockedPushEntryList(ptr ptr ptr) @ fastcall ExfInterlockedRemoveHeadList(ptr ptr) +#endif @ fastcall ExfReleasePushLock(ptr) @ fastcall ExfReleasePushLockExclusive(ptr) @ fastcall ExfReleasePushLockShared(ptr) @ fastcall ExfTryToWakePushLock(ptr) @ fastcall ExfUnblockPushLock(ptr ptr) -#ifdef _M_IX86 -@ fastcall Exfi386InterlockedDecrementLong(ptr) -@ fastcall Exfi386InterlockedExchangeUlong(ptr long) -@ fastcall Exfi386InterlockedIncrementLong(ptr) -@ stdcall Exi386InterlockedDecrementLong(ptr) -@ stdcall Exi386InterlockedExchangeUlong(ptr long long) -@ stdcall Exi386InterlockedIncrementLong(ptr) -#endif -@ fastcall ExiAcquireFastMutex(ptr) ExAcquireFastMutex -@ fastcall ExiReleaseFastMutex(ptr) ExReleaseFastMutex -@ fastcall ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex +@ stdcall -arch=x86_64 ExpInterlockedFlushSList(ptr) +@ stdcall -arch=x86_64 ExpInterlockedPopEntrySList(ptr ptr) +@ stdcall -arch=x86_64 ExpInterlockedPushEntrySList(ptr ptr) +@ fastcall -arch=i386 Exfi386InterlockedDecrementLong(ptr) +@ fastcall -arch=i386 Exfi386InterlockedExchangeUlong(ptr long) +@ fastcall -arch=i386 Exfi386InterlockedIncrementLong(ptr) +@ stdcall -arch=i386 Exi386InterlockedDecrementLong(ptr) +@ stdcall -arch=i386 Exi386InterlockedExchangeUlong(ptr long long) +@ stdcall -arch=i386 Exi386InterlockedIncrementLong(ptr) +@ fastcall -arch=i386 ExiAcquireFastMutex(ptr) ExAcquireFastMutex +@ fastcall -arch=i386 ExiReleaseFastMutex(ptr) ExReleaseFastMutex +@ fastcall -arch=i386 ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex @ stdcall FsRtlAcquireFileExclusive(ptr) ;FsRtlAddBaseMcbEntry @ stdcall FsRtlAddLargeMcbEntry(ptr long long long long long long) @@ -316,6 +334,7 @@ @ stdcall InbvSetTextColor(long) @ stdcall InbvSolidColorFill(long long long long long) @ extern InitSafeBootMode +#ifndef __x86_64__ @ fastcall InterlockedCompareExchange(ptr long long) @ fastcall InterlockedDecrement(ptr) @ fastcall InterlockedExchange(ptr long) @@ -323,6 +342,9 @@ @ fastcall InterlockedIncrement(ptr) @ fastcall InterlockedPopEntrySList(ptr) @ fastcall InterlockedPushEntrySList(ptr ptr) +#else +@ stdcall InitializeSListHead(ptr) RtlInitializeSListHead +#endif @ stdcall IoAcquireCancelSpinLock(ptr) @ stdcall IoAcquireRemoveLockEx(ptr ptr str long long) @ stdcall IoAcquireVpbSpinLock(ptr) @@ -536,12 +558,10 @@ @ stdcall KdPowerTransition(long) @ stdcall KdRefreshDebuggerNotPresent() @ stdcall KdSystemDebugControl(long ptr long ptr long ptr long) -#ifdef _M_IX86 -@ stdcall Ke386CallBios(long ptr) -@ stdcall Ke386IoSetAccessProcess(ptr long) -@ stdcall Ke386QueryIoAccessMap(long ptr) -@ stdcall Ke386SetIoAccessMap(long ptr) -#endif +@ stdcall -arch=i386 Ke386CallBios(long ptr) +@ stdcall -arch=i386 Ke386IoSetAccessProcess(ptr long) +@ stdcall -arch=i386 Ke386QueryIoAccessMap(long ptr) +@ stdcall -arch=i386 Ke386SetIoAccessMap(long ptr) @ fastcall KeAcquireGuardedMutex(ptr) @ fastcall KeAcquireGuardedMutexUnsafe(ptr) @ fastcall KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr) @@ -549,6 +569,7 @@ @ stdcall KeAcquireInterruptSpinLock(ptr) @ stdcall KeAcquireSpinLockAtDpcLevel(ptr) @ fastcall KeAcquireSpinLockForDpc(ptr) +@ stdcall -arch=x86_64 KeAcquireSpinLockRaiseToDpc(ptr) @ stdcall KeAddSystemServiceTable(ptr ptr long ptr long) @ stdcall KeAreAllApcsDisabled() @ stdcall KeAreApcsDisabled() @@ -576,18 +597,16 @@ @ stdcall KeGetCurrentThread() @ stdcall KeGetPreviousMode() @ stdcall KeGetRecommendedSharedDataAlignment() -#ifdef _M_IX86 ;KeI386AbiosCall -@ stdcall KeI386AllocateGdtSelectors(ptr long) -;KeI386Call16BitCStyleFunction -;KeI386Call16BitFunction -@ stdcall KeI386FlatToGdtSelector(long long long) -;KeI386GetLid -@ extern KeI386MachineType -@ stdcall KeI386ReleaseGdtSelectors(ptr long) -;KeI386ReleaseLid -;KeI386SetGdtSelector -#endif +@ stdcall -arch=i386 KeI386AllocateGdtSelectors(ptr long) +; -arch=i386 KeI386Call16BitCStyleFunction +; -arch=i386 KeI386Call16BitFunction +@ stdcall -arch=i386 KeI386FlatToGdtSelector(long long long) +; -arch=i386 KeI386GetLid +@ extern -arch=i386 KeI386MachineType +@ stdcall -arch=i386 KeI386ReleaseGdtSelectors(ptr long) +; -arch=i386 KeI386ReleaseLid +; -arch=i386 KeI386SetGdtSelector @ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr) @ stdcall KeInitializeCrashDumpHeader(long long ptr long ptr) @ stdcall KeInitializeDeviceQueue(ptr) @@ -599,7 +618,9 @@ @ stdcall KeInitializeMutex(ptr long) @ stdcall KeInitializeQueue(ptr long) @ stdcall KeInitializeSemaphore(ptr long long) +#ifndef __x86_64__ @ stdcall KeInitializeSpinLock(ptr) _KeInitializeSpinLock +#endif @ stdcall KeInitializeThreadedDpc(ptr ptr ptr) @ stdcall KeInitializeTimer(ptr) @ stdcall KeInitializeTimerEx(ptr long) @@ -622,10 +643,14 @@ @ stdcall KeProfileInterruptWithSource(ptr long) @ stdcall KePulseEvent(ptr long long) @ stdcall KeQueryActiveProcessors() +#ifndef __x86_64__ @ stdcall KeQueryInterruptTime() +#endif @ stdcall KeQueryPriorityThread(ptr) @ stdcall KeQueryRuntimeThread(ptr ptr) +#ifndef __x86_64__ @ stdcall KeQuerySystemTime(ptr) +#endif @ stdcall KeQueryTickCount(ptr) @ stdcall KeQueryTimeIncrement() @ stdcall KeRaiseUserException(long) @@ -646,6 +671,9 @@ @ stdcall KeReleaseMutant(ptr long long long) @ stdcall KeReleaseMutex(ptr long) @ stdcall KeReleaseSemaphore(ptr long long long) +#ifdef __x86_64__ +@ stdcall KeReleaseSpinLock(ptr long) +#endif @ fastcall KeReleaseSpinLockForDpc(ptr long) @ stdcall KeReleaseSpinLockFromDpcLevel(ptr) @ stdcall KeRemoveByKeyDeviceQueue(ptr long) @@ -695,21 +723,15 @@ @ stdcall KeWaitForSingleObject(ptr long long long ptr) @ fastcall KefAcquireSpinLockAtDpcLevel(ptr) @ fastcall KefReleaseSpinLockFromDpcLevel(ptr) -#ifdef _M_IX86 -@ stdcall Kei386EoiHelper() -@ fastcall KiEoiHelper(ptr) /* FIXME: Evaluate decision */ -#endif +@ stdcall -arch=i386 Kei386EoiHelper() +@ fastcall -arch=i386 KiEoiHelper(ptr) /* FIXME: Evaluate decision */ @ fastcall KiAcquireSpinLock(ptr) @ extern KiBugCheckData @ stdcall KiCheckForKernelApcDelivery() ;KiCheckForSListAddress -#ifdef _M_IX86 -@ stdcall KiCoprocessorError() -#endif +@ stdcall -arch=i386 KiCoprocessorError() @ stdcall KiDeliverApc(long ptr ptr) -#ifdef _M_IX86 -@ stdcall KiDispatchInterrupt() -#endif +@ stdcall -arch=i386 KiDispatchInterrupt() @ extern KiEnableTimerWatchdog @ stdcall KiIpiServiceRoutine(ptr ptr) @ fastcall KiReleaseSpinLock(ptr) @@ -1021,12 +1043,14 @@ @ stdcall PsTerminateSystemThread(long) @ extern PsThreadType _PsThreadType ;PsWrapApcWow64Thread +#ifndef __x86_64__ @ stdcall READ_REGISTER_BUFFER_UCHAR(ptr ptr long) @ stdcall READ_REGISTER_BUFFER_ULONG(ptr ptr long) @ stdcall READ_REGISTER_BUFFER_USHORT(ptr ptr long) @ stdcall READ_REGISTER_UCHAR(ptr) @ stdcall READ_REGISTER_ULONG(ptr) @ stdcall READ_REGISTER_USHORT(ptr) +#endif @ stdcall RtlAbsoluteToSelfRelativeSD(ptr ptr ptr) @ stdcall RtlAddAccessAllowedAce(ptr long long ptr) @ stdcall RtlAddAccessAllowedAceEx(ptr long long long ptr) @@ -1273,8 +1297,10 @@ ;RtlTraceDatabaseLock ;RtlTraceDatabaseUnlock ;RtlTraceDatabaseValidate +#ifndef __x86_64__ @ fastcall RtlUlongByteSwap(long) @ fastcall RtlUlonglongByteSwap(long long) +#endif @ stdcall RtlUnicodeStringToAnsiSize(ptr) RtlxUnicodeStringToAnsiSize @ stdcall RtlUnicodeStringToAnsiString(ptr ptr long) @ stdcall RtlUnicodeStringToCountedOemString(ptr ptr long) @@ -1297,7 +1323,9 @@ @ stdcall RtlUpcaseUnicodeToOemN(ptr long ptr wstr long) @ stdcall RtlUpperChar(long) @ stdcall RtlUpperString(ptr ptr) +#ifndef __x86_64__ @ fastcall RtlUshortByteSwap(long) +#endif @ stdcall RtlValidRelativeSecurityDescriptor(ptr long long) @ stdcall RtlValidSecurityDescriptor(ptr) @ stdcall RtlValidSid(ptr) @@ -1368,12 +1396,14 @@ ;VfFailDriver ;VfFailSystemBIOS ;VfIsVerificationEnabled +#ifndef __x86_64__ @ stdcall WRITE_REGISTER_BUFFER_UCHAR(ptr ptr long) @ stdcall WRITE_REGISTER_BUFFER_ULONG(ptr ptr long) @ stdcall WRITE_REGISTER_BUFFER_USHORT(ptr ptr long) @ stdcall WRITE_REGISTER_UCHAR(ptr long) @ stdcall WRITE_REGISTER_ULONG(ptr long) @ stdcall WRITE_REGISTER_USHORT(ptr long) +#endif ;WmiFlushTrace ;WmiGetClock ;WmiQueryTrace @@ -1512,26 +1542,30 @@ ;_CIcos ;_CIsin ;_CIsqrt +#ifndef __x86_64 @ cdecl _abnormal_termination() -#ifdef _M_IX86 -@ cdecl _alldiv() -@ cdecl _alldvrm() -@ cdecl _allmul() -@ cdecl _alloca_probe() -@ cdecl _allrem() -@ cdecl _allshl() -@ cdecl _allshr() -@ cdecl _aulldiv() -@ cdecl _aulldvrm() -@ cdecl _aullrem() -@ cdecl _aullshr() -#endif +#endif +@ cdecl -arch=i386 _alldiv() +@ cdecl -arch=i386 _alldvrm() +@ cdecl -arch=i386 _allmul() +@ cdecl -arch=i386 _alloca_probe() +@ cdecl -arch=i386 _allrem() +@ cdecl -arch=i386 _allshl() +@ cdecl -arch=i386 _allshr() +@ cdecl -arch=i386 _aulldiv() +@ cdecl -arch=i386 _aulldvrm() +@ cdecl -arch=i386 _aullrem() +@ cdecl -arch=i386 _aullshr() +#ifndef __x86_64 @ cdecl _except_handler2() @ cdecl _except_handler3() @ cdecl _global_unwind2() +#endif @ cdecl _itoa() @ cdecl _itow() +#ifndef __x86_64 @ cdecl _local_unwind2() +#endif @ cdecl _purecall() @ cdecl _snprintf() @ cdecl _snwprintf()
14 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200