From c0df506b83c287cc2b4fb43ec6fad67c914fa300 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 6 Mar 2018 18:24:13 +0100 Subject: [PATCH] Cygwin: ntdll.h: Add some missing pipe-related definitions Signed-off-by: Corinna Vinschen --- winsup/cygwin/ntdll.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h index b322d4b9e..b251055f6 100644 --- a/winsup/cygwin/ntdll.h +++ b/winsup/cygwin/ntdll.h @@ -157,8 +157,14 @@ extern GUID __cygwin_socket_guid; #define FILE_VC_VALID_MASK 0x000003ff /* IOCTL code to impersonate client of named pipe. */ -#define FSCTL_PIPE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, \ - METHOD_BUFFERED, FILE_ANY_ACCESS) +#define FSCTL_PIPE_DISCONNECT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 1, \ + METHOD_BUFFERED, FILE_ANY_ACCESS) +#define FSCTL_PIPE_LISTEN CTL_CODE(FILE_DEVICE_NAMED_PIPE, 2, \ + METHOD_BUFFERED, FILE_ANY_ACCESS) +#define FSCTL_PIPE_WAIT CTL_CODE(FILE_DEVICE_NAMED_PIPE, 6, \ + METHOD_BUFFERED, FILE_ANY_ACCESS) +#define FSCTL_PIPE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, \ + METHOD_BUFFERED, FILE_ANY_ACCESS) typedef enum _FILE_INFORMATION_CLASS { @@ -1002,6 +1008,23 @@ typedef struct _FILE_PIPE_LOCAL_INFORMATION ULONG NamedPipeEnd; } FILE_PIPE_LOCAL_INFORMATION, *PFILE_PIPE_LOCAL_INFORMATION; +/* Checked on 64 bit. */ +typedef struct _FILE_PIPE_PEEK_BUFFER { + ULONG NamedPipeState; + ULONG ReadDataAvailable; + ULONG NumberOfMessages; + ULONG MessageLength; + CHAR Data[1]; +} FILE_PIPE_PEEK_BUFFER, *PFILE_PIPE_PEEK_BUFFER; + +/* Checked on 64 bit. */ +typedef struct _FILE_PIPE_WAIT_FOR_BUFFER { + LARGE_INTEGER Timeout; + ULONG NameLength; + BOOLEAN TimeoutSpecified; + WCHAR Name[1]; +} FILE_PIPE_WAIT_FOR_BUFFER, *PFILE_PIPE_WAIT_FOR_BUFFER; + /* Checked on 64 bit. */ typedef struct _FILE_COMPRESSION_INFORMATION {