aboutsummaryrefslogtreecommitdiff
path: root/wsk.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-09-01 14:47:43 +0200
committerToni Uhlig <matzeton@googlemail.com>2022-09-01 15:33:20 +0200
commit9a623bfc32a56aa4142fdeacede57b98991edc4f (patch)
treec580618c0fbd63bfa58ee759fb4ce15d0b54356e /wsk.h
parent7b42d7f3415149005b05b7b5ea14fca6cb01a261 (diff)
initial commit
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'wsk.h')
-rw-r--r--wsk.h54
1 files changed, 29 insertions, 25 deletions
diff --git a/wsk.h b/wsk.h
index f7e5fb6..ccea103 100644
--- a/wsk.h
+++ b/wsk.h
@@ -1,8 +1,11 @@
#ifndef WSK_H
#define WSK_H 1
+#include <ntddk.h>
+
#if !defined(__MINGW64__)
-#error "This was designed to work **only** with Mingw-w64! For MSVC, please check https://github.com/wbenny/KSOCKET out"
+#error \
+ "This was designed to work **only** with Mingw-w64! For MSVC, please check https://github.com/wbenny/KSOCKET out"
#endif
#if (NTDDI_VERSION < NTDDI_WIN10)
@@ -11,7 +14,8 @@
#endif
#if !defined(__BYTE_ORDER__) || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
-#error "This project requires a little endian system. Does Windows support any other?"
+#error \
+ "This project requires a little endian system. Does Windows support any other?"
#endif
// ---------------------------------------------------------------
@@ -110,38 +114,38 @@ typedef enum {
// ---------------------------------------------------------------
typedef struct addrinfo {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char *ai_canonname;
+ 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 addrinfoexA {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- char *ai_canonname;
- struct sockaddr *ai_addr;
- void *ai_blob;
- size_t ai_bloblen;
- LPGUID ai_provider;
+ int ai_flags;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ size_t ai_addrlen;
+ char *ai_canonname;
+ struct sockaddr *ai_addr;
+ void *ai_blob;
+ size_t ai_bloblen;
+ LPGUID ai_provider;
struct addrinfoexA *ai_next;
} ADDRINFOEXA, *PADDRINFOEXA, *LPADDRINFOEXA;
typedef struct addrinfoW {
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- PWSTR ai_canonname;
- struct sockaddr *ai_addr;
+ 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;