authorgravatar for kenta@lithdew.netlithdew <kenta@lithdew.net> 2021-05-09 14:44:02+09:00
committergravatar for kenta@lithdew.netlithdew <kenta@lithdew.net> 2021-05-10 19:22:31+09:00
log3d946ef5eb15d2333a5e376ab95dad2e70e0dfb9
treeb240931bfca6b7f874758b51bc15e4816977c92b
parenta24101be5b8ca31d72005e984b1eff2958de7d2b

x/os, x/net, os:, fix typos/errors, add missing constants/docs

Add missing constants to ws2_32 such as SIO_BASE_HANDLE. Made all declared constants in ws2_32 comptime_int, and fixed a few broken constants (i.e. GUID's). Fixed a few syscalls not having callconv(WINAPI) in ws2_32. Fixed a typo in std.x.net.tcp.Client. Removed unnecessary @alignCast's for socket addresses in std.x.net.Socket. Added a warning on using timeout methods for std.x.net.Socket. Fixed compilation error spotted by CI in std.os that references std.os.windows.ws2_32.SD_RECEIVE. Renamed std.x.os.Socket.setOption()'s parameter `name: u32` to `code: u32`.

5 files changed, 856 insertions(+), 840 deletions(-)

lib/std/os.zig+3-3
......@@ -2758,9 +2758,9 @@ pub const ShutdownHow = enum { recv, send, both };
27582758pub fn shutdown(sock: socket_t, how: ShutdownHow) ShutdownError!void {
27592759 if (builtin.os.tag == .windows) {
27602760 const result = windows.ws2_32.shutdown(sock, switch (how) {
2761 .recv => windows.SD_RECEIVE,
2762 .send => windows.SD_SEND,
2763 .both => windows.SD_BOTH,
2761 .recv => windows.ws2_32.SD_RECEIVE,
2762 .send => windows.ws2_32.SD_SEND,
2763 .both => windows.ws2_32.SD_BOTH,
27642764 });
27652765 if (0 != result) switch (windows.ws2_32.WSAGetLastError()) {
27662766 .WSAECONNABORTED => return error.ConnectionAborted,
lib/std/os/windows/ws2_32.zig+829-825
......@@ -15,826 +15,830 @@ pub const WSAEVENT = HANDLE;
1515// Microsoft use the signed c_int for this, but it should never be negative
1616pub const socklen_t = u32;
1717
18pub const LM_HB_Extension = @as(i32, 128);
19pub const LM_HB1_PnP = @as(i32, 1);
20pub const LM_HB1_PDA_Palmtop = @as(i32, 2);
21pub const LM_HB1_Computer = @as(i32, 4);
22pub const LM_HB1_Printer = @as(i32, 8);
23pub const LM_HB1_Modem = @as(i32, 16);
24pub const LM_HB1_Fax = @as(i32, 32);
25pub const LM_HB1_LANAccess = @as(i32, 64);
26pub const LM_HB2_Telephony = @as(i32, 1);
27pub const LM_HB2_FileServer = @as(i32, 2);
28pub const ATMPROTO_AALUSER = @as(u32, 0);
29pub const ATMPROTO_AAL1 = @as(u32, 1);
30pub const ATMPROTO_AAL2 = @as(u32, 2);
31pub const ATMPROTO_AAL34 = @as(u32, 3);
32pub const ATMPROTO_AAL5 = @as(u32, 5);
33pub const SAP_FIELD_ABSENT = @as(u32, 4294967294);
34pub const SAP_FIELD_ANY = @as(u32, 4294967295);
35pub const SAP_FIELD_ANY_AESA_SEL = @as(u32, 4294967290);
36pub const SAP_FIELD_ANY_AESA_REST = @as(u32, 4294967291);
37pub const ATM_E164 = @as(u32, 1);
38pub const ATM_NSAP = @as(u32, 2);
39pub const ATM_AESA = @as(u32, 2);
40pub const ATM_ADDR_SIZE = @as(u32, 20);
41pub const BLLI_L2_ISO_1745 = @as(u32, 1);
42pub const BLLI_L2_Q921 = @as(u32, 2);
43pub const BLLI_L2_X25L = @as(u32, 6);
44pub const BLLI_L2_X25M = @as(u32, 7);
45pub const BLLI_L2_ELAPB = @as(u32, 8);
46pub const BLLI_L2_HDLC_ARM = @as(u32, 9);
47pub const BLLI_L2_HDLC_NRM = @as(u32, 10);
48pub const BLLI_L2_HDLC_ABM = @as(u32, 11);
49pub const BLLI_L2_LLC = @as(u32, 12);
50pub const BLLI_L2_X75 = @as(u32, 13);
51pub const BLLI_L2_Q922 = @as(u32, 14);
52pub const BLLI_L2_USER_SPECIFIED = @as(u32, 16);
53pub const BLLI_L2_ISO_7776 = @as(u32, 17);
54pub const BLLI_L3_X25 = @as(u32, 6);
55pub const BLLI_L3_ISO_8208 = @as(u32, 7);
56pub const BLLI_L3_X223 = @as(u32, 8);
57pub const BLLI_L3_SIO_8473 = @as(u32, 9);
58pub const BLLI_L3_T70 = @as(u32, 10);
59pub const BLLI_L3_ISO_TR9577 = @as(u32, 11);
60pub const BLLI_L3_USER_SPECIFIED = @as(u32, 16);
61pub const BLLI_L3_IPI_SNAP = @as(u32, 128);
62pub const BLLI_L3_IPI_IP = @as(u32, 204);
63pub const BHLI_ISO = @as(u32, 0);
64pub const BHLI_UserSpecific = @as(u32, 1);
65pub const BHLI_HighLayerProfile = @as(u32, 2);
66pub const BHLI_VendorSpecificAppId = @as(u32, 3);
67pub const AAL5_MODE_MESSAGE = @as(u32, 1);
68pub const AAL5_MODE_STREAMING = @as(u32, 2);
69pub const AAL5_SSCS_NULL = @as(u32, 0);
70pub const AAL5_SSCS_SSCOP_ASSURED = @as(u32, 1);
71pub const AAL5_SSCS_SSCOP_NON_ASSURED = @as(u32, 2);
72pub const AAL5_SSCS_FRAME_RELAY = @as(u32, 4);
73pub const BCOB_A = @as(u32, 1);
74pub const BCOB_C = @as(u32, 3);
75pub const BCOB_X = @as(u32, 16);
76pub const TT_NOIND = @as(u32, 0);
77pub const TT_CBR = @as(u32, 4);
78pub const TT_VBR = @as(u32, 8);
79pub const TR_NOIND = @as(u32, 0);
80pub const TR_END_TO_END = @as(u32, 1);
81pub const TR_NO_END_TO_END = @as(u32, 2);
82pub const CLIP_NOT = @as(u32, 0);
83pub const CLIP_SUS = @as(u32, 32);
84pub const UP_P2P = @as(u32, 0);
85pub const UP_P2MP = @as(u32, 1);
86pub const BLLI_L2_MODE_NORMAL = @as(u32, 64);
87pub const BLLI_L2_MODE_EXT = @as(u32, 128);
88pub const BLLI_L3_MODE_NORMAL = @as(u32, 64);
89pub const BLLI_L3_MODE_EXT = @as(u32, 128);
90pub const BLLI_L3_PACKET_16 = @as(u32, 4);
91pub const BLLI_L3_PACKET_32 = @as(u32, 5);
92pub const BLLI_L3_PACKET_64 = @as(u32, 6);
93pub const BLLI_L3_PACKET_128 = @as(u32, 7);
94pub const BLLI_L3_PACKET_256 = @as(u32, 8);
95pub const BLLI_L3_PACKET_512 = @as(u32, 9);
96pub const BLLI_L3_PACKET_1024 = @as(u32, 10);
97pub const BLLI_L3_PACKET_2048 = @as(u32, 11);
98pub const BLLI_L3_PACKET_4096 = @as(u32, 12);
99pub const PI_ALLOWED = @as(u32, 0);
100pub const PI_RESTRICTED = @as(u32, 64);
101pub const PI_NUMBER_NOT_AVAILABLE = @as(u32, 128);
102pub const SI_USER_NOT_SCREENED = @as(u32, 0);
103pub const SI_USER_PASSED = @as(u32, 1);
104pub const SI_USER_FAILED = @as(u32, 2);
105pub const SI_NETWORK = @as(u32, 3);
106pub const CAUSE_LOC_USER = @as(u32, 0);
107pub const CAUSE_LOC_PRIVATE_LOCAL = @as(u32, 1);
108pub const CAUSE_LOC_PUBLIC_LOCAL = @as(u32, 2);
109pub const CAUSE_LOC_TRANSIT_NETWORK = @as(u32, 3);
110pub const CAUSE_LOC_PUBLIC_REMOTE = @as(u32, 4);
111pub const CAUSE_LOC_PRIVATE_REMOTE = @as(u32, 5);
112pub const CAUSE_LOC_INTERNATIONAL_NETWORK = @as(u32, 7);
113pub const CAUSE_LOC_BEYOND_INTERWORKING = @as(u32, 10);
114pub const CAUSE_UNALLOCATED_NUMBER = @as(u32, 1);
115pub const CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK = @as(u32, 2);
116pub const CAUSE_NO_ROUTE_TO_DESTINATION = @as(u32, 3);
117pub const CAUSE_VPI_VCI_UNACCEPTABLE = @as(u32, 10);
118pub const CAUSE_NORMAL_CALL_CLEARING = @as(u32, 16);
119pub const CAUSE_USER_BUSY = @as(u32, 17);
120pub const CAUSE_NO_USER_RESPONDING = @as(u32, 18);
121pub const CAUSE_CALL_REJECTED = @as(u32, 21);
122pub const CAUSE_NUMBER_CHANGED = @as(u32, 22);
123pub const CAUSE_USER_REJECTS_CLIR = @as(u32, 23);
124pub const CAUSE_DESTINATION_OUT_OF_ORDER = @as(u32, 27);
125pub const CAUSE_INVALID_NUMBER_FORMAT = @as(u32, 28);
126pub const CAUSE_STATUS_ENQUIRY_RESPONSE = @as(u32, 30);
127pub const CAUSE_NORMAL_UNSPECIFIED = @as(u32, 31);
128pub const CAUSE_VPI_VCI_UNAVAILABLE = @as(u32, 35);
129pub const CAUSE_NETWORK_OUT_OF_ORDER = @as(u32, 38);
130pub const CAUSE_TEMPORARY_FAILURE = @as(u32, 41);
131pub const CAUSE_ACCESS_INFORMAION_DISCARDED = @as(u32, 43);
132pub const CAUSE_NO_VPI_VCI_AVAILABLE = @as(u32, 45);
133pub const CAUSE_RESOURCE_UNAVAILABLE = @as(u32, 47);
134pub const CAUSE_QOS_UNAVAILABLE = @as(u32, 49);
135pub const CAUSE_USER_CELL_RATE_UNAVAILABLE = @as(u32, 51);
136pub const CAUSE_BEARER_CAPABILITY_UNAUTHORIZED = @as(u32, 57);
137pub const CAUSE_BEARER_CAPABILITY_UNAVAILABLE = @as(u32, 58);
138pub const CAUSE_OPTION_UNAVAILABLE = @as(u32, 63);
139pub const CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED = @as(u32, 65);
140pub const CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS = @as(u32, 73);
141pub const CAUSE_INVALID_CALL_REFERENCE = @as(u32, 81);
142pub const CAUSE_CHANNEL_NONEXISTENT = @as(u32, 82);
143pub const CAUSE_INCOMPATIBLE_DESTINATION = @as(u32, 88);
144pub const CAUSE_INVALID_ENDPOINT_REFERENCE = @as(u32, 89);
145pub const CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = @as(u32, 91);
146pub const CAUSE_TOO_MANY_PENDING_ADD_PARTY = @as(u32, 92);
147pub const CAUSE_AAL_PARAMETERS_UNSUPPORTED = @as(u32, 93);
148pub const CAUSE_MANDATORY_IE_MISSING = @as(u32, 96);
149pub const CAUSE_UNIMPLEMENTED_MESSAGE_TYPE = @as(u32, 97);
150pub const CAUSE_UNIMPLEMENTED_IE = @as(u32, 99);
151pub const CAUSE_INVALID_IE_CONTENTS = @as(u32, 100);
152pub const CAUSE_INVALID_STATE_FOR_MESSAGE = @as(u32, 101);
153pub const CAUSE_RECOVERY_ON_TIMEOUT = @as(u32, 102);
154pub const CAUSE_INCORRECT_MESSAGE_LENGTH = @as(u32, 104);
155pub const CAUSE_PROTOCOL_ERROR = @as(u32, 111);
156pub const CAUSE_COND_UNKNOWN = @as(u32, 0);
157pub const CAUSE_COND_PERMANENT = @as(u32, 1);
158pub const CAUSE_COND_TRANSIENT = @as(u32, 2);
159pub const CAUSE_REASON_USER = @as(u32, 0);
160pub const CAUSE_REASON_IE_MISSING = @as(u32, 4);
161pub const CAUSE_REASON_IE_INSUFFICIENT = @as(u32, 8);
162pub const CAUSE_PU_PROVIDER = @as(u32, 0);
163pub const CAUSE_PU_USER = @as(u32, 8);
164pub const CAUSE_NA_NORMAL = @as(u32, 0);
165pub const CAUSE_NA_ABNORMAL = @as(u32, 4);
166pub const QOS_CLASS0 = @as(u32, 0);
167pub const QOS_CLASS1 = @as(u32, 1);
168pub const QOS_CLASS2 = @as(u32, 2);
169pub const QOS_CLASS3 = @as(u32, 3);
170pub const QOS_CLASS4 = @as(u32, 4);
171pub const TNS_TYPE_NATIONAL = @as(u32, 64);
172pub const TNS_PLAN_CARRIER_ID_CODE = @as(u32, 1);
173pub const SIO_GET_NUMBER_OF_ATM_DEVICES = @as(u32, 1343619073);
174pub const SIO_GET_ATM_ADDRESS = @as(u32, 3491102722);
175pub const SIO_ASSOCIATE_PVC = @as(u32, 2417360899);
176pub const SIO_GET_ATM_CONNECTION_ID = @as(u32, 1343619076);
177pub const RIO_MSG_DONT_NOTIFY = @as(u32, 1);
178pub const RIO_MSG_DEFER = @as(u32, 2);
179pub const RIO_MSG_WAITALL = @as(u32, 4);
180pub const RIO_MSG_COMMIT_ONLY = @as(u32, 8);
181pub const RIO_MAX_CQ_SIZE = @as(u32, 134217728);
182pub const RIO_CORRUPT_CQ = @as(u32, 4294967295);
183pub const WINDOWS_AF_IRDA = @as(u32, 26);
184pub const WCE_AF_IRDA = @as(u32, 22);
185pub const IRDA_PROTO_SOCK_STREAM = @as(u32, 1);
186pub const SOL_IRLMP = @as(u32, 255);
187pub const IRLMP_ENUMDEVICES = @as(u32, 16);
188pub const IRLMP_IAS_SET = @as(u32, 17);
189pub const IRLMP_IAS_QUERY = @as(u32, 18);
190pub const IRLMP_SEND_PDU_LEN = @as(u32, 19);
191pub const IRLMP_EXCLUSIVE_MODE = @as(u32, 20);
192pub const IRLMP_IRLPT_MODE = @as(u32, 21);
193pub const IRLMP_9WIRE_MODE = @as(u32, 22);
194pub const IRLMP_TINYTP_MODE = @as(u32, 23);
195pub const IRLMP_PARAMETERS = @as(u32, 24);
196pub const IRLMP_DISCOVERY_MODE = @as(u32, 25);
197pub const IRLMP_SHARP_MODE = @as(u32, 32);
198pub const IAS_ATTRIB_NO_CLASS = @as(u32, 16);
199pub const IAS_ATTRIB_NO_ATTRIB = @as(u32, 0);
200pub const IAS_ATTRIB_INT = @as(u32, 1);
201pub const IAS_ATTRIB_OCTETSEQ = @as(u32, 2);
202pub const IAS_ATTRIB_STR = @as(u32, 3);
203pub const IAS_MAX_USER_STRING = @as(u32, 256);
204pub const IAS_MAX_OCTET_STRING = @as(u32, 1024);
205pub const IAS_MAX_CLASSNAME = @as(u32, 64);
206pub const IAS_MAX_ATTRIBNAME = @as(u32, 256);
207pub const LmCharSetASCII = @as(u32, 0);
208pub const LmCharSetISO_8859_1 = @as(u32, 1);
209pub const LmCharSetISO_8859_2 = @as(u32, 2);
210pub const LmCharSetISO_8859_3 = @as(u32, 3);
211pub const LmCharSetISO_8859_4 = @as(u32, 4);
212pub const LmCharSetISO_8859_5 = @as(u32, 5);
213pub const LmCharSetISO_8859_6 = @as(u32, 6);
214pub const LmCharSetISO_8859_7 = @as(u32, 7);
215pub const LmCharSetISO_8859_8 = @as(u32, 8);
216pub const LmCharSetISO_8859_9 = @as(u32, 9);
217pub const LmCharSetUNICODE = @as(u32, 255);
218pub const LM_BAUD_1200 = @as(u32, 1200);
219pub const LM_BAUD_2400 = @as(u32, 2400);
220pub const LM_BAUD_9600 = @as(u32, 9600);
221pub const LM_BAUD_19200 = @as(u32, 19200);
222pub const LM_BAUD_38400 = @as(u32, 38400);
223pub const LM_BAUD_57600 = @as(u32, 57600);
224pub const LM_BAUD_115200 = @as(u32, 115200);
225pub const LM_BAUD_576K = @as(u32, 576000);
226pub const LM_BAUD_1152K = @as(u32, 1152000);
227pub const LM_BAUD_4M = @as(u32, 4000000);
228pub const LM_BAUD_16M = @as(u32, 16000000);
229pub const IPX_PTYPE = @as(u32, 16384);
230pub const IPX_FILTERPTYPE = @as(u32, 16385);
231pub const IPX_STOPFILTERPTYPE = @as(u32, 16387);
232pub const IPX_DSTYPE = @as(u32, 16386);
233pub const IPX_EXTENDED_ADDRESS = @as(u32, 16388);
234pub const IPX_RECVHDR = @as(u32, 16389);
235pub const IPX_MAXSIZE = @as(u32, 16390);
236pub const IPX_ADDRESS = @as(u32, 16391);
237pub const IPX_GETNETINFO = @as(u32, 16392);
238pub const IPX_GETNETINFO_NORIP = @as(u32, 16393);
239pub const IPX_SPXGETCONNECTIONSTATUS = @as(u32, 16395);
240pub const IPX_ADDRESS_NOTIFY = @as(u32, 16396);
241pub const IPX_MAX_ADAPTER_NUM = @as(u32, 16397);
242pub const IPX_RERIPNETNUMBER = @as(u32, 16398);
243pub const IPX_RECEIVE_BROADCAST = @as(u32, 16399);
244pub const IPX_IMMEDIATESPXACK = @as(u32, 16400);
245pub const IPPROTO_RM = @as(u32, 113);
246pub const MAX_MCAST_TTL = @as(u32, 255);
247pub const RM_OPTIONSBASE = @as(u32, 1000);
248pub const RM_RATE_WINDOW_SIZE = @as(u32, 1001);
249pub const RM_SET_MESSAGE_BOUNDARY = @as(u32, 1002);
250pub const RM_FLUSHCACHE = @as(u32, 1003);
251pub const RM_SENDER_WINDOW_ADVANCE_METHOD = @as(u32, 1004);
252pub const RM_SENDER_STATISTICS = @as(u32, 1005);
253pub const RM_LATEJOIN = @as(u32, 1006);
254pub const RM_SET_SEND_IF = @as(u32, 1007);
255pub const RM_ADD_RECEIVE_IF = @as(u32, 1008);
256pub const RM_DEL_RECEIVE_IF = @as(u32, 1009);
257pub const RM_SEND_WINDOW_ADV_RATE = @as(u32, 1010);
258pub const RM_USE_FEC = @as(u32, 1011);
259pub const RM_SET_MCAST_TTL = @as(u32, 1012);
260pub const RM_RECEIVER_STATISTICS = @as(u32, 1013);
261pub const RM_HIGH_SPEED_INTRANET_OPT = @as(u32, 1014);
262pub const SENDER_DEFAULT_RATE_KBITS_PER_SEC = @as(u32, 56);
263pub const SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE = @as(u32, 15);
264pub const MAX_WINDOW_INCREMENT_PERCENTAGE = @as(u32, 25);
265pub const SENDER_DEFAULT_LATE_JOINER_PERCENTAGE = @as(u32, 0);
266pub const SENDER_MAX_LATE_JOINER_PERCENTAGE = @as(u32, 75);
267pub const BITS_PER_BYTE = @as(u32, 8);
268pub const LOG2_BITS_PER_BYTE = @as(u32, 3);
269pub const SOCKET_DEFAULT2_QM_POLICY = Guid.initString("aec2ef9c-3a4d-4d3e-8842-239942e39a47");
270pub const REAL_TIME_NOTIFICATION_CAPABILITY = Guid.initString("6b59819a-5cae-492d-a901-2a3c2c50164f");
271pub const REAL_TIME_NOTIFICATION_CAPABILITY_EX = Guid.initString("6843da03-154a-4616-a508-44371295f96b");
272pub const ASSOCIATE_NAMERES_CONTEXT = Guid.initString("59a38b67-d4fe-46e1-ba3c-87ea74ca3049");
273pub const TCP_INITIAL_RTO_DEFAULT_RTT = @as(u32, 0);
274pub const TCP_INITIAL_RTO_DEFAULT_MAX_SYN_RETRANSMISSIONS = @as(u32, 0);
275pub const SOCKET_SETTINGS_GUARANTEE_ENCRYPTION = @as(u32, 1);
276pub const SOCKET_SETTINGS_ALLOW_INSECURE = @as(u32, 2);
277pub const SOCKET_SETTINGS_IPSEC_SKIP_FILTER_INSTANTIATION = @as(u32, 1);
278pub const SOCKET_SETTINGS_IPSEC_OPTIONAL_PEER_NAME_VERIFICATION = @as(u32, 2);
279pub const SOCKET_SETTINGS_IPSEC_ALLOW_FIRST_INBOUND_PKT_UNENCRYPTED = @as(u32, 4);
280pub const SOCKET_SETTINGS_IPSEC_PEER_NAME_IS_RAW_FORMAT = @as(u32, 8);
281pub const SOCKET_QUERY_IPSEC2_ABORT_CONNECTION_ON_FIELD_CHANGE = @as(u32, 1);
282pub const SOCKET_QUERY_IPSEC2_FIELD_MASK_MM_SA_ID = @as(u32, 1);
283pub const SOCKET_QUERY_IPSEC2_FIELD_MASK_QM_SA_ID = @as(u32, 2);
284pub const SOCKET_INFO_CONNECTION_SECURED = @as(u32, 1);
285pub const SOCKET_INFO_CONNECTION_ENCRYPTED = @as(u32, 2);
286pub const SOCKET_INFO_CONNECTION_IMPERSONATED = @as(u32, 4);
287pub const IN4ADDR_LOOPBACK = @as(u32, 16777343);
288pub const IN4ADDR_LOOPBACKPREFIX_LENGTH = @as(u32, 8);
289pub const IN4ADDR_LINKLOCALPREFIX_LENGTH = @as(u32, 16);
290pub const IN4ADDR_MULTICASTPREFIX_LENGTH = @as(u32, 4);
291pub const IFF_UP = @as(u32, 1);
292pub const IFF_BROADCAST = @as(u32, 2);
293pub const IFF_LOOPBACK = @as(u32, 4);
294pub const IFF_POINTTOPOINT = @as(u32, 8);
295pub const IFF_MULTICAST = @as(u32, 16);
296pub const IP_OPTIONS = @as(u32, 1);
297pub const IP_HDRINCL = @as(u32, 2);
298pub const IP_TOS = @as(u32, 3);
299pub const IP_TTL = @as(u32, 4);
300pub const IP_MULTICAST_IF = @as(u32, 9);
301pub const IP_MULTICAST_TTL = @as(u32, 10);
302pub const IP_MULTICAST_LOOP = @as(u32, 11);
303pub const IP_ADD_MEMBERSHIP = @as(u32, 12);
304pub const IP_DROP_MEMBERSHIP = @as(u32, 13);
305pub const IP_DONTFRAGMENT = @as(u32, 14);
306pub const IP_ADD_SOURCE_MEMBERSHIP = @as(u32, 15);
307pub const IP_DROP_SOURCE_MEMBERSHIP = @as(u32, 16);
308pub const IP_BLOCK_SOURCE = @as(u32, 17);
309pub const IP_UNBLOCK_SOURCE = @as(u32, 18);
310pub const IP_PKTINFO = @as(u32, 19);
311pub const IP_HOPLIMIT = @as(u32, 21);
312pub const IP_RECVTTL = @as(u32, 21);
313pub const IP_RECEIVE_BROADCAST = @as(u32, 22);
314pub const IP_RECVIF = @as(u32, 24);
315pub const IP_RECVDSTADDR = @as(u32, 25);
316pub const IP_IFLIST = @as(u32, 28);
317pub const IP_ADD_IFLIST = @as(u32, 29);
318pub const IP_DEL_IFLIST = @as(u32, 30);
319pub const IP_UNICAST_IF = @as(u32, 31);
320pub const IP_RTHDR = @as(u32, 32);
321pub const IP_GET_IFLIST = @as(u32, 33);
322pub const IP_RECVRTHDR = @as(u32, 38);
323pub const IP_TCLASS = @as(u32, 39);
324pub const IP_RECVTCLASS = @as(u32, 40);
325pub const IP_RECVTOS = @as(u32, 40);
326pub const IP_ORIGINAL_ARRIVAL_IF = @as(u32, 47);
327pub const IP_ECN = @as(u32, 50);
328pub const IP_PKTINFO_EX = @as(u32, 51);
329pub const IP_WFP_REDIRECT_RECORDS = @as(u32, 60);
330pub const IP_WFP_REDIRECT_CONTEXT = @as(u32, 70);
331pub const IP_MTU_DISCOVER = @as(u32, 71);
332pub const IP_MTU = @as(u32, 73);
333pub const IP_NRT_INTERFACE = @as(u32, 74);
334pub const IP_RECVERR = @as(u32, 75);
335pub const IP_USER_MTU = @as(u32, 76);
336pub const IP_UNSPECIFIED_TYPE_OF_SERVICE = @as(i32, -1);
337pub const IN6ADDR_LINKLOCALPREFIX_LENGTH = @as(u32, 64);
338pub const IN6ADDR_MULTICASTPREFIX_LENGTH = @as(u32, 8);
339pub const IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_LENGTH = @as(u32, 104);
340pub const IN6ADDR_V4MAPPEDPREFIX_LENGTH = @as(u32, 96);
341pub const IN6ADDR_6TO4PREFIX_LENGTH = @as(u32, 16);
342pub const IN6ADDR_TEREDOPREFIX_LENGTH = @as(u32, 32);
343pub const MCAST_JOIN_GROUP = @as(u32, 41);
344pub const MCAST_LEAVE_GROUP = @as(u32, 42);
345pub const MCAST_BLOCK_SOURCE = @as(u32, 43);
346pub const MCAST_UNBLOCK_SOURCE = @as(u32, 44);
347pub const MCAST_JOIN_SOURCE_GROUP = @as(u32, 45);
348pub const MCAST_LEAVE_SOURCE_GROUP = @as(u32, 46);
349pub const IPV6_HOPOPTS = @as(u32, 1);
350pub const IPV6_HDRINCL = @as(u32, 2);
351pub const IPV6_UNICAST_HOPS = @as(u32, 4);
352pub const IPV6_MULTICAST_IF = @as(u32, 9);
353pub const IPV6_MULTICAST_HOPS = @as(u32, 10);
354pub const IPV6_MULTICAST_LOOP = @as(u32, 11);
355pub const IPV6_ADD_MEMBERSHIP = @as(u32, 12);
356pub const IPV6_DROP_MEMBERSHIP = @as(u32, 13);
357pub const IPV6_DONTFRAG = @as(u32, 14);
358pub const IPV6_PKTINFO = @as(u32, 19);
359pub const IPV6_HOPLIMIT = @as(u32, 21);
360pub const IPV6_PROTECTION_LEVEL = @as(u32, 23);
361pub const IPV6_RECVIF = @as(u32, 24);
362pub const IPV6_RECVDSTADDR = @as(u32, 25);
363pub const IPV6_CHECKSUM = @as(u32, 26);
364pub const IPV6_V6ONLY = @as(u32, 27);
365pub const IPV6_IFLIST = @as(u32, 28);
366pub const IPV6_ADD_IFLIST = @as(u32, 29);
367pub const IPV6_DEL_IFLIST = @as(u32, 30);
368pub const IPV6_UNICAST_IF = @as(u32, 31);
369pub const IPV6_RTHDR = @as(u32, 32);
370pub const IPV6_GET_IFLIST = @as(u32, 33);
371pub const IPV6_RECVRTHDR = @as(u32, 38);
372pub const IPV6_TCLASS = @as(u32, 39);
373pub const IPV6_RECVTCLASS = @as(u32, 40);
374pub const IPV6_ECN = @as(u32, 50);
375pub const IPV6_PKTINFO_EX = @as(u32, 51);
376pub const IPV6_WFP_REDIRECT_RECORDS = @as(u32, 60);
377pub const IPV6_WFP_REDIRECT_CONTEXT = @as(u32, 70);
378pub const IPV6_MTU_DISCOVER = @as(u32, 71);
379pub const IPV6_MTU = @as(u32, 72);
380pub const IPV6_NRT_INTERFACE = @as(u32, 74);
381pub const IPV6_RECVERR = @as(u32, 75);
382pub const IPV6_USER_MTU = @as(u32, 76);
383pub const IP_UNSPECIFIED_HOP_LIMIT = @as(i32, -1);
384pub const PROTECTION_LEVEL_UNRESTRICTED = @as(u32, 10);
385pub const PROTECTION_LEVEL_EDGERESTRICTED = @as(u32, 20);
386pub const PROTECTION_LEVEL_RESTRICTED = @as(u32, 30);
387pub const INET_ADDRSTRLEN = @as(u32, 22);
388pub const INET6_ADDRSTRLEN = @as(u32, 65);
389pub const TCP_OFFLOAD_NO_PREFERENCE = @as(u32, 0);
390pub const TCP_OFFLOAD_NOT_PREFERRED = @as(u32, 1);
391pub const TCP_OFFLOAD_PREFERRED = @as(u32, 2);
392pub const TCP_EXPEDITED_1122 = @as(u32, 2);
393pub const TCP_KEEPALIVE = @as(u32, 3);
394pub const TCP_MAXSEG = @as(u32, 4);
395pub const TCP_MAXRT = @as(u32, 5);
396pub const TCP_STDURG = @as(u32, 6);
397pub const TCP_NOURG = @as(u32, 7);
398pub const TCP_ATMARK = @as(u32, 8);
399pub const TCP_NOSYNRETRIES = @as(u32, 9);
400pub const TCP_TIMESTAMPS = @as(u32, 10);
401pub const TCP_OFFLOAD_PREFERENCE = @as(u32, 11);
402pub const TCP_CONGESTION_ALGORITHM = @as(u32, 12);
403pub const TCP_DELAY_FIN_ACK = @as(u32, 13);
404pub const TCP_MAXRTMS = @as(u32, 14);
405pub const TCP_FASTOPEN = @as(u32, 15);
406pub const TCP_KEEPCNT = @as(u32, 16);
407pub const TCP_KEEPINTVL = @as(u32, 17);
408pub const TCP_FAIL_CONNECT_ON_ICMP_ERROR = @as(u32, 18);
409pub const TCP_ICMP_ERROR_INFO = @as(u32, 19);
410pub const UDP_SEND_MSG_SIZE = @as(u32, 2);
411pub const UDP_RECV_MAX_COALESCED_SIZE = @as(u32, 3);
412pub const UDP_COALESCED_INFO = @as(u32, 3);
413pub const AF_UNSPEC = @as(u32, 0);
414pub const AF_UNIX = @as(u32, 1);
415pub const AF_INET = @as(u32, 2);
416pub const AF_IMPLINK = @as(u32, 3);
417pub const AF_PUP = @as(u32, 4);
418pub const AF_CHAOS = @as(u32, 5);
419pub const AF_NS = @as(u32, 6);
420pub const AF_ISO = @as(u32, 7);
421pub const AF_ECMA = @as(u32, 8);
422pub const AF_DATAKIT = @as(u32, 9);
423pub const AF_CCITT = @as(u32, 10);
424pub const AF_SNA = @as(u32, 11);
425pub const AF_DECnet = @as(u32, 12);
426pub const AF_DLI = @as(u32, 13);
427pub const AF_LAT = @as(u32, 14);
428pub const AF_HYLINK = @as(u32, 15);
429pub const AF_APPLETALK = @as(u32, 16);
430pub const AF_NETBIOS = @as(u32, 17);
431pub const AF_VOICEVIEW = @as(u32, 18);
432pub const AF_FIREFOX = @as(u32, 19);
433pub const AF_UNKNOWN1 = @as(u32, 20);
434pub const AF_BAN = @as(u32, 21);
435pub const AF_ATM = @as(u32, 22);
436pub const AF_INET6 = @as(u32, 23);
437pub const AF_CLUSTER = @as(u32, 24);
438pub const AF_12844 = @as(u32, 25);
439pub const AF_IRDA = @as(u32, 26);
440pub const AF_NETDES = @as(u32, 28);
441pub const AF_MAX = @as(u32, 29);
442pub const AF_TCNPROCESS = @as(u32, 29);
443pub const AF_TCNMESSAGE = @as(u32, 30);
444pub const AF_ICLFXBM = @as(u32, 31);
445pub const AF_LINK = @as(u32, 33);
446pub const AF_HYPERV = @as(u32, 34);
447pub const SOCK_STREAM = @as(u32, 1);
448pub const SOCK_DGRAM = @as(u32, 2);
449pub const SOCK_RAW = @as(u32, 3);
450pub const SOCK_RDM = @as(u32, 4);
451pub const SOCK_SEQPACKET = @as(u32, 5);
452pub const SOL_SOCKET = @as(u32, 65535);
453pub const SO_DEBUG = @as(u32, 1);
454pub const SO_ACCEPTCONN = @as(u32, 2);
455pub const SO_REUSEADDR = @as(u32, 4);
456pub const SO_KEEPALIVE = @as(u32, 8);
457pub const SO_DONTROUTE = @as(u32, 16);
458pub const SO_BROADCAST = @as(u32, 32);
459pub const SO_USELOOPBACK = @as(u32, 64);
460pub const SO_LINGER = @as(u32, 128);
461pub const SO_OOBINLINE = @as(u32, 256);
462pub const SO_SNDBUF = @as(u32, 4097);
463pub const SO_RCVBUF = @as(u32, 4098);
464pub const SO_SNDLOWAT = @as(u32, 4099);
465pub const SO_RCVLOWAT = @as(u32, 4100);
466pub const SO_SNDTIMEO = @as(u32, 4101);
467pub const SO_RCVTIMEO = @as(u32, 4102);
468pub const SO_ERROR = @as(u32, 4103);
469pub const SO_TYPE = @as(u32, 4104);
470pub const SO_BSP_STATE = @as(u32, 4105);
471pub const SO_GROUP_ID = @as(u32, 8193);
472pub const SO_GROUP_PRIORITY = @as(u32, 8194);
473pub const SO_MAX_MSG_SIZE = @as(u32, 8195);
474pub const SO_CONDITIONAL_ACCEPT = @as(u32, 12290);
475pub const SO_PAUSE_ACCEPT = @as(u32, 12291);
476pub const SO_COMPARTMENT_ID = @as(u32, 12292);
477pub const SO_RANDOMIZE_PORT = @as(u32, 12293);
478pub const SO_PORT_SCALABILITY = @as(u32, 12294);
479pub const SO_REUSE_UNICASTPORT = @as(u32, 12295);
480pub const SO_REUSE_MULTICASTPORT = @as(u32, 12296);
481pub const SO_ORIGINAL_DST = @as(u32, 12303);
482pub const WSK_SO_BASE = @as(u32, 16384);
483pub const TCP_NODELAY = @as(u32, 1);
484pub const IOC_UNIX = @as(u32, 0);
485pub const IOC_WS2 = @as(u32, 134217728);
486pub const IOC_PROTOCOL = @as(u32, 268435456);
487pub const IOC_VENDOR = @as(u32, 402653184);
488pub const IPPROTO_IP = @as(u32, 0);
489pub const IPPORT_TCPMUX = @as(u32, 1);
490pub const IPPORT_ECHO = @as(u32, 7);
491pub const IPPORT_DISCARD = @as(u32, 9);
492pub const IPPORT_SYSTAT = @as(u32, 11);
493pub const IPPORT_DAYTIME = @as(u32, 13);
494pub const IPPORT_NETSTAT = @as(u32, 15);
495pub const IPPORT_QOTD = @as(u32, 17);
496pub const IPPORT_MSP = @as(u32, 18);
497pub const IPPORT_CHARGEN = @as(u32, 19);
498pub const IPPORT_FTP_DATA = @as(u32, 20);
499pub const IPPORT_FTP = @as(u32, 21);
500pub const IPPORT_TELNET = @as(u32, 23);
501pub const IPPORT_SMTP = @as(u32, 25);
502pub const IPPORT_TIMESERVER = @as(u32, 37);
503pub const IPPORT_NAMESERVER = @as(u32, 42);
504pub const IPPORT_WHOIS = @as(u32, 43);
505pub const IPPORT_MTP = @as(u32, 57);
506pub const IPPORT_TFTP = @as(u32, 69);
507pub const IPPORT_RJE = @as(u32, 77);
508pub const IPPORT_FINGER = @as(u32, 79);
509pub const IPPORT_TTYLINK = @as(u32, 87);
510pub const IPPORT_SUPDUP = @as(u32, 95);
511pub const IPPORT_POP3 = @as(u32, 110);
512pub const IPPORT_NTP = @as(u32, 123);
513pub const IPPORT_EPMAP = @as(u32, 135);
514pub const IPPORT_NETBIOS_NS = @as(u32, 137);
515pub const IPPORT_NETBIOS_DGM = @as(u32, 138);
516pub const IPPORT_NETBIOS_SSN = @as(u32, 139);
517pub const IPPORT_IMAP = @as(u32, 143);
518pub const IPPORT_SNMP = @as(u32, 161);
519pub const IPPORT_SNMP_TRAP = @as(u32, 162);
520pub const IPPORT_IMAP3 = @as(u32, 220);
521pub const IPPORT_LDAP = @as(u32, 389);
522pub const IPPORT_HTTPS = @as(u32, 443);
523pub const IPPORT_MICROSOFT_DS = @as(u32, 445);
524pub const IPPORT_EXECSERVER = @as(u32, 512);
525pub const IPPORT_LOGINSERVER = @as(u32, 513);
526pub const IPPORT_CMDSERVER = @as(u32, 514);
527pub const IPPORT_EFSSERVER = @as(u32, 520);
528pub const IPPORT_BIFFUDP = @as(u32, 512);
529pub const IPPORT_WHOSERVER = @as(u32, 513);
530pub const IPPORT_ROUTESERVER = @as(u32, 520);
531pub const IPPORT_RESERVED = @as(u32, 1024);
532pub const IPPORT_REGISTERED_MAX = @as(u32, 49151);
533pub const IPPORT_DYNAMIC_MIN = @as(u32, 49152);
534pub const IPPORT_DYNAMIC_MAX = @as(u32, 65535);
535pub const IN_CLASSA_NET = @as(u32, 4278190080);
536pub const IN_CLASSA_NSHIFT = @as(u32, 24);
537pub const IN_CLASSA_HOST = @as(u32, 16777215);
538pub const IN_CLASSA_MAX = @as(u32, 128);
539pub const IN_CLASSB_NET = @as(u32, 4294901760);
540pub const IN_CLASSB_NSHIFT = @as(u32, 16);
541pub const IN_CLASSB_HOST = @as(u32, 65535);
542pub const IN_CLASSB_MAX = @as(u32, 65536);
543pub const IN_CLASSC_NET = @as(u32, 4294967040);
544pub const IN_CLASSC_NSHIFT = @as(u32, 8);
545pub const IN_CLASSC_HOST = @as(u32, 255);
546pub const IN_CLASSD_NET = @as(u32, 4026531840);
547pub const IN_CLASSD_NSHIFT = @as(u32, 28);
548pub const IN_CLASSD_HOST = @as(u32, 268435455);
549pub const INADDR_LOOPBACK = @as(u32, 2130706433);
550pub const INADDR_NONE = @as(u32, 4294967295);
551pub const IOCPARM_MASK = @as(u32, 127);
552pub const IOC_VOID = @as(u32, 536870912);
553pub const IOC_OUT = @as(u32, 1073741824);
554pub const IOC_IN = @as(u32, 2147483648);
555pub const MSG_TRUNC = @as(u32, 256);
556pub const MSG_CTRUNC = @as(u32, 512);
557pub const MSG_BCAST = @as(u32, 1024);
558pub const MSG_MCAST = @as(u32, 2048);
559pub const MSG_ERRQUEUE = @as(u32, 4096);
560pub const AI_PASSIVE = @as(u32, 1);
561pub const AI_CANONNAME = @as(u32, 2);
562pub const AI_NUMERICHOST = @as(u32, 4);
563pub const AI_NUMERICSERV = @as(u32, 8);
564pub const AI_DNS_ONLY = @as(u32, 16);
565pub const AI_ALL = @as(u32, 256);
566pub const AI_ADDRCONFIG = @as(u32, 1024);
567pub const AI_V4MAPPED = @as(u32, 2048);
568pub const AI_NON_AUTHORITATIVE = @as(u32, 16384);
569pub const AI_SECURE = @as(u32, 32768);
570pub const AI_RETURN_PREFERRED_NAMES = @as(u32, 65536);
571pub const AI_FQDN = @as(u32, 131072);
572pub const AI_FILESERVER = @as(u32, 262144);
573pub const AI_DISABLE_IDN_ENCODING = @as(u32, 524288);
574pub const AI_EXTENDED = @as(u32, 2147483648);
575pub const AI_RESOLUTION_HANDLE = @as(u32, 1073741824);
576pub const ADDRINFOEX_VERSION_2 = @as(u32, 2);
577pub const ADDRINFOEX_VERSION_3 = @as(u32, 3);
578pub const ADDRINFOEX_VERSION_4 = @as(u32, 4);
579pub const NS_ALL = @as(u32, 0);
580pub const NS_SAP = @as(u32, 1);
581pub const NS_NDS = @as(u32, 2);
582pub const NS_PEER_BROWSE = @as(u32, 3);
583pub const NS_SLP = @as(u32, 5);
584pub const NS_DHCP = @as(u32, 6);
585pub const NS_TCPIP_LOCAL = @as(u32, 10);
586pub const NS_TCPIP_HOSTS = @as(u32, 11);
587pub const NS_DNS = @as(u32, 12);
588pub const NS_NETBT = @as(u32, 13);
589pub const NS_WINS = @as(u32, 14);
590pub const NS_NLA = @as(u32, 15);
591pub const NS_NBP = @as(u32, 20);
592pub const NS_MS = @as(u32, 30);
593pub const NS_STDA = @as(u32, 31);
594pub const NS_NTDS = @as(u32, 32);
595pub const NS_EMAIL = @as(u32, 37);
596pub const NS_X500 = @as(u32, 40);
597pub const NS_NIS = @as(u32, 41);
598pub const NS_NISPLUS = @as(u32, 42);
599pub const NS_WRQ = @as(u32, 50);
600pub const NS_NETDES = @as(u32, 60);
601pub const NI_NOFQDN = @as(u32, 1);
602pub const NI_NUMERICHOST = @as(u32, 2);
603pub const NI_NAMEREQD = @as(u32, 4);
604pub const NI_NUMERICSERV = @as(u32, 8);
605pub const NI_DGRAM = @as(u32, 16);
606pub const NI_MAXHOST = @as(u32, 1025);
607pub const NI_MAXSERV = @as(u32, 32);
608pub const INCL_WINSOCK_API_PROTOTYPES = @as(u32, 1);
609pub const INCL_WINSOCK_API_TYPEDEFS = @as(u32, 0);
610pub const FD_SETSIZE = @as(u32, 64);
611pub const IMPLINK_IP = @as(u32, 155);
612pub const IMPLINK_LOWEXPER = @as(u32, 156);
613pub const IMPLINK_HIGHEXPER = @as(u32, 158);
614pub const WSADESCRIPTION_LEN = @as(u32, 256);
615pub const WSASYS_STATUS_LEN = @as(u32, 128);
616pub const SOCKET_ERROR = @as(i32, -1);
617pub const FROM_PROTOCOL_INFO = @as(i32, -1);
618pub const SO_PROTOCOL_INFOA = @as(u32, 8196);
619pub const SO_PROTOCOL_INFOW = @as(u32, 8197);
620pub const PVD_CONFIG = @as(u32, 12289);
621pub const SOMAXCONN = @as(u32, 2147483647);
622pub const MSG_PEEK = @as(u32, 2);
623pub const MSG_WAITALL = @as(u32, 8);
624pub const MSG_PUSH_IMMEDIATE = @as(u32, 32);
625pub const MSG_PARTIAL = @as(u32, 32768);
626pub const MSG_INTERRUPT = @as(u32, 16);
627pub const MSG_MAXIOVLEN = @as(u32, 16);
628pub const MAXGETHOSTSTRUCT = @as(u32, 1024);
629pub const FD_READ_BIT = @as(u32, 0);
630pub const FD_WRITE_BIT = @as(u32, 1);
631pub const FD_OOB_BIT = @as(u32, 2);
632pub const FD_ACCEPT_BIT = @as(u32, 3);
633pub const FD_CONNECT_BIT = @as(u32, 4);
634pub const FD_CLOSE_BIT = @as(u32, 5);
635pub const FD_QOS_BIT = @as(u32, 6);
636pub const FD_GROUP_QOS_BIT = @as(u32, 7);
637pub const FD_ROUTING_INTERFACE_CHANGE_BIT = @as(u32, 8);
638pub const FD_ADDRESS_LIST_CHANGE_BIT = @as(u32, 9);
639pub const FD_MAX_EVENTS = @as(u32, 10);
640pub const CF_ACCEPT = @as(u32, 0);
641pub const CF_REJECT = @as(u32, 1);
642pub const CF_DEFER = @as(u32, 2);
643pub const SD_RECEIVE = @as(u32, 0);
644pub const SD_SEND = @as(u32, 1);
645pub const SD_BOTH = @as(u32, 2);
646pub const SG_UNCONSTRAINED_GROUP = @as(u32, 1);
647pub const SG_CONSTRAINED_GROUP = @as(u32, 2);
648pub const MAX_PROTOCOL_CHAIN = @as(u32, 7);
649pub const BASE_PROTOCOL = @as(u32, 1);
650pub const LAYERED_PROTOCOL = @as(u32, 0);
651pub const WSAPROTOCOL_LEN = @as(u32, 255);
652pub const PFL_MULTIPLE_PROTO_ENTRIES = @as(u32, 1);
653pub const PFL_RECOMMENDED_PROTO_ENTRY = @as(u32, 2);
654pub const PFL_HIDDEN = @as(u32, 4);
655pub const PFL_MATCHES_PROTOCOL_ZERO = @as(u32, 8);
656pub const PFL_NETWORKDIRECT_PROVIDER = @as(u32, 16);
657pub const XP1_CONNECTIONLESS = @as(u32, 1);
658pub const XP1_GUARANTEED_DELIVERY = @as(u32, 2);
659pub const XP1_GUARANTEED_ORDER = @as(u32, 4);
660pub const XP1_MESSAGE_ORIENTED = @as(u32, 8);
661pub const XP1_PSEUDO_STREAM = @as(u32, 16);
662pub const XP1_GRACEFUL_CLOSE = @as(u32, 32);
663pub const XP1_EXPEDITED_DATA = @as(u32, 64);
664pub const XP1_CONNECT_DATA = @as(u32, 128);
665pub const XP1_DISCONNECT_DATA = @as(u32, 256);
666pub const XP1_SUPPORT_BROADCAST = @as(u32, 512);
667pub const XP1_SUPPORT_MULTIPOINT = @as(u32, 1024);
668pub const XP1_MULTIPOINT_CONTROL_PLANE = @as(u32, 2048);
669pub const XP1_MULTIPOINT_DATA_PLANE = @as(u32, 4096);
670pub const XP1_QOS_SUPPORTED = @as(u32, 8192);
671pub const XP1_INTERRUPT = @as(u32, 16384);
672pub const XP1_UNI_SEND = @as(u32, 32768);
673pub const XP1_UNI_RECV = @as(u32, 65536);
674pub const XP1_IFS_HANDLES = @as(u32, 131072);
675pub const XP1_PARTIAL_MESSAGE = @as(u32, 262144);
676pub const XP1_SAN_SUPPORT_SDP = @as(u32, 524288);
677pub const BIGENDIAN = @as(u32, 0);
678pub const LITTLEENDIAN = @as(u32, 1);
679pub const SECURITY_PROTOCOL_NONE = @as(u32, 0);
680pub const JL_SENDER_ONLY = @as(u32, 1);
681pub const JL_RECEIVER_ONLY = @as(u32, 2);
682pub const JL_BOTH = @as(u32, 4);
683pub const WSA_FLAG_OVERLAPPED = @as(u32, 1);
684pub const WSA_FLAG_MULTIPOINT_C_ROOT = @as(u32, 2);
685pub const WSA_FLAG_MULTIPOINT_C_LEAF = @as(u32, 4);
686pub const WSA_FLAG_MULTIPOINT_D_ROOT = @as(u32, 8);
687pub const WSA_FLAG_MULTIPOINT_D_LEAF = @as(u32, 16);
688pub const WSA_FLAG_ACCESS_SYSTEM_SECURITY = @as(u32, 64);
689pub const WSA_FLAG_NO_HANDLE_INHERIT = @as(u32, 128);
690pub const WSA_FLAG_REGISTERED_IO = @as(u32, 256);
691pub const TH_NETDEV = @as(u32, 1);
692pub const TH_TAPI = @as(u32, 2);
693pub const SERVICE_MULTIPLE = @as(u32, 1);
694pub const NS_LOCALNAME = @as(u32, 19);
695pub const RES_UNUSED_1 = @as(u32, 1);
696pub const RES_FLUSH_CACHE = @as(u32, 2);
697pub const RES_SERVICE = @as(u32, 4);
698pub const LUP_DEEP = @as(u32, 1);
699pub const LUP_CONTAINERS = @as(u32, 2);
700pub const LUP_NOCONTAINERS = @as(u32, 4);
701pub const LUP_NEAREST = @as(u32, 8);
702pub const LUP_RETURN_NAME = @as(u32, 16);
703pub const LUP_RETURN_TYPE = @as(u32, 32);
704pub const LUP_RETURN_VERSION = @as(u32, 64);
705pub const LUP_RETURN_COMMENT = @as(u32, 128);
706pub const LUP_RETURN_ADDR = @as(u32, 256);
707pub const LUP_RETURN_BLOB = @as(u32, 512);
708pub const LUP_RETURN_ALIASES = @as(u32, 1024);
709pub const LUP_RETURN_QUERY_STRING = @as(u32, 2048);
710pub const LUP_RETURN_ALL = @as(u32, 4080);
711pub const LUP_RES_SERVICE = @as(u32, 32768);
712pub const LUP_FLUSHCACHE = @as(u32, 4096);
713pub const LUP_FLUSHPREVIOUS = @as(u32, 8192);
714pub const LUP_NON_AUTHORITATIVE = @as(u32, 16384);
715pub const LUP_SECURE = @as(u32, 32768);
716pub const LUP_RETURN_PREFERRED_NAMES = @as(u32, 65536);
717pub const LUP_DNS_ONLY = @as(u32, 131072);
718pub const LUP_ADDRCONFIG = @as(u32, 1048576);
719pub const LUP_DUAL_ADDR = @as(u32, 2097152);
720pub const LUP_FILESERVER = @as(u32, 4194304);
721pub const LUP_DISABLE_IDN_ENCODING = @as(u32, 8388608);
722pub const LUP_API_ANSI = @as(u32, 16777216);
723pub const LUP_RESOLUTION_HANDLE = @as(u32, 2147483648);
724pub const RESULT_IS_ALIAS = @as(u32, 1);
725pub const RESULT_IS_ADDED = @as(u32, 16);
726pub const RESULT_IS_CHANGED = @as(u32, 32);
727pub const RESULT_IS_DELETED = @as(u32, 64);
728pub const POLLRDNORM = @as(u32, 256);
729pub const POLLRDBAND = @as(u32, 512);
730pub const POLLPRI = @as(u32, 1024);
731pub const POLLWRNORM = @as(u32, 16);
732pub const POLLWRBAND = @as(u32, 32);
733pub const POLLERR = @as(u32, 1);
734pub const POLLHUP = @as(u32, 2);
735pub const POLLNVAL = @as(u32, 4);
736pub const SO_CONNDATA = @as(u32, 28672);
737pub const SO_CONNOPT = @as(u32, 28673);
738pub const SO_DISCDATA = @as(u32, 28674);
739pub const SO_DISCOPT = @as(u32, 28675);
740pub const SO_CONNDATALEN = @as(u32, 28676);
741pub const SO_CONNOPTLEN = @as(u32, 28677);
742pub const SO_DISCDATALEN = @as(u32, 28678);
743pub const SO_DISCOPTLEN = @as(u32, 28679);
744pub const SO_OPENTYPE = @as(u32, 28680);
745pub const SO_SYNCHRONOUS_ALERT = @as(u32, 16);
746pub const SO_SYNCHRONOUS_NONALERT = @as(u32, 32);
747pub const SO_MAXDG = @as(u32, 28681);
748pub const SO_MAXPATHDG = @as(u32, 28682);
749pub const SO_UPDATE_ACCEPT_CONTEXT = @as(u32, 28683);
750pub const SO_CONNECT_TIME = @as(u32, 28684);
751pub const SO_UPDATE_CONNECT_CONTEXT = @as(u32, 28688);
752pub const TCP_BSDURGENT = @as(u32, 28672);
753pub const TF_DISCONNECT = @as(u32, 1);
754pub const TF_REUSE_SOCKET = @as(u32, 2);
755pub const TF_WRITE_BEHIND = @as(u32, 4);
756pub const TF_USE_DEFAULT_WORKER = @as(u32, 0);
757pub const TF_USE_SYSTEM_THREAD = @as(u32, 16);
758pub const TF_USE_KERNEL_APC = @as(u32, 32);
759pub const TP_ELEMENT_MEMORY = @as(u32, 1);
760pub const TP_ELEMENT_FILE = @as(u32, 2);
761pub const TP_ELEMENT_EOP = @as(u32, 4);
762pub const NLA_ALLUSERS_NETWORK = @as(u32, 1);
763pub const NLA_FRIENDLY_NAME = @as(u32, 2);
764pub const WSPDESCRIPTION_LEN = @as(u32, 255);
765pub const WSS_OPERATION_IN_PROGRESS = @as(i32, 259);
766pub const LSP_SYSTEM = @as(u32, 2147483648);
767pub const LSP_INSPECTOR = @as(u32, 1);
768pub const LSP_REDIRECTOR = @as(u32, 2);
769pub const LSP_PROXY = @as(u32, 4);
770pub const LSP_FIREWALL = @as(u32, 8);
771pub const LSP_INBOUND_MODIFY = @as(u32, 16);
772pub const LSP_OUTBOUND_MODIFY = @as(u32, 32);
773pub const LSP_CRYPTO_COMPRESS = @as(u32, 64);
774pub const LSP_LOCAL_CACHE = @as(u32, 128);
775pub const IPPROTO_ICMP = @as(u32, 1);
776pub const IPPROTO_IGMP = @as(u32, 2);
777pub const IPPROTO_GGP = @as(u32, 3);
778pub const IPPROTO_TCP = @as(u32, 6);
779pub const IPPROTO_PUP = @as(u32, 12);
780pub const IPPROTO_UDP = @as(u32, 17);
781pub const IPPROTO_IDP = @as(u32, 22);
782pub const IPPROTO_ND = @as(u32, 77);
783pub const IPPROTO_RAW = @as(u32, 255);
784pub const IPPROTO_MAX = @as(u32, 256);
785pub const IP_DEFAULT_MULTICAST_TTL = @as(u32, 1);
786pub const IP_DEFAULT_MULTICAST_LOOP = @as(u32, 1);
787pub const IP_MAX_MEMBERSHIPS = @as(u32, 20);
788pub const AF_IPX = @as(u32, 6);
789pub const FD_READ = @as(u32, 1);
790pub const FD_WRITE = @as(u32, 2);
791pub const FD_OOB = @as(u32, 4);
792pub const FD_ACCEPT = @as(u32, 8);
793pub const FD_CONNECT = @as(u32, 16);
794pub const FD_CLOSE = @as(u32, 32);
795pub const SERVICE_RESOURCE = @as(u32, 1);
796pub const SERVICE_SERVICE = @as(u32, 2);
797pub const SERVICE_LOCAL = @as(u32, 4);
798pub const SERVICE_FLAG_DEFER = @as(u32, 1);
799pub const SERVICE_FLAG_HARD = @as(u32, 2);
800pub const PROP_COMMENT = @as(u32, 1);
801pub const PROP_LOCALE = @as(u32, 2);
802pub const PROP_DISPLAY_HINT = @as(u32, 4);
803pub const PROP_VERSION = @as(u32, 8);
804pub const PROP_START_TIME = @as(u32, 16);
805pub const PROP_MACHINE = @as(u32, 32);
806pub const PROP_ADDRESSES = @as(u32, 256);
807pub const PROP_SD = @as(u32, 512);
808pub const PROP_ALL = @as(u32, 2147483648);
809pub const SERVICE_ADDRESS_FLAG_RPC_CN = @as(u32, 1);
810pub const SERVICE_ADDRESS_FLAG_RPC_DG = @as(u32, 2);
811pub const SERVICE_ADDRESS_FLAG_RPC_NB = @as(u32, 4);
812pub const NS_DEFAULT = @as(u32, 0);
813pub const NS_VNS = @as(u32, 50);
814pub const NSTYPE_HIERARCHICAL = @as(u32, 1);
815pub const NSTYPE_DYNAMIC = @as(u32, 2);
816pub const NSTYPE_ENUMERABLE = @as(u32, 4);
817pub const NSTYPE_WORKGROUP = @as(u32, 8);
818pub const XP_CONNECTIONLESS = @as(u32, 1);
819pub const XP_GUARANTEED_DELIVERY = @as(u32, 2);
820pub const XP_GUARANTEED_ORDER = @as(u32, 4);
821pub const XP_MESSAGE_ORIENTED = @as(u32, 8);
822pub const XP_PSEUDO_STREAM = @as(u32, 16);
823pub const XP_GRACEFUL_CLOSE = @as(u32, 32);
824pub const XP_EXPEDITED_DATA = @as(u32, 64);
825pub const XP_CONNECT_DATA = @as(u32, 128);
826pub const XP_DISCONNECT_DATA = @as(u32, 256);
827pub const XP_SUPPORTS_BROADCAST = @as(u32, 512);
828pub const XP_SUPPORTS_MULTICAST = @as(u32, 1024);
829pub const XP_BANDWIDTH_ALLOCATION = @as(u32, 2048);
830pub const XP_FRAGMENTATION = @as(u32, 4096);
831pub const XP_ENCRYPTS = @as(u32, 8192);
832pub const RES_SOFT_SEARCH = @as(u32, 1);
833pub const RES_FIND_MULTIPLE = @as(u32, 2);
834pub const SET_SERVICE_PARTIAL_SUCCESS = @as(u32, 1);
835pub const UDP_NOCHECKSUM = @as(u32, 1);
836pub const UDP_CHECKSUM_COVERAGE = @as(u32, 20);
837pub const GAI_STRERROR_BUFFER_SIZE = @as(u32, 1024);
18pub const LM_HB_Extension = 128;
19pub const LM_HB1_PnP = 1;
20pub const LM_HB1_PDA_Palmtop = 2;
21pub const LM_HB1_Computer = 4;
22pub const LM_HB1_Printer = 8;
23pub const LM_HB1_Modem = 16;
24pub const LM_HB1_Fax = 32;
25pub const LM_HB1_LANAccess = 64;
26pub const LM_HB2_Telephony = 1;
27pub const LM_HB2_FileServer = 2;
28pub const ATMPROTO_AALUSER = 0;
29pub const ATMPROTO_AAL1 = 1;
30pub const ATMPROTO_AAL2 = 2;
31pub const ATMPROTO_AAL34 = 3;
32pub const ATMPROTO_AAL5 = 5;
33pub const SAP_FIELD_ABSENT = 4294967294;
34pub const SAP_FIELD_ANY = 4294967295;
35pub const SAP_FIELD_ANY_AESA_SEL = 4294967290;
36pub const SAP_FIELD_ANY_AESA_REST = 4294967291;
37pub const ATM_E164 = 1;
38pub const ATM_NSAP = 2;
39pub const ATM_AESA = 2;
40pub const ATM_ADDR_SIZE = 20;
41pub const BLLI_L2_ISO_1745 = 1;
42pub const BLLI_L2_Q921 = 2;
43pub const BLLI_L2_X25L = 6;
44pub const BLLI_L2_X25M = 7;
45pub const BLLI_L2_ELAPB = 8;
46pub const BLLI_L2_HDLC_ARM = 9;
47pub const BLLI_L2_HDLC_NRM = 10;
48pub const BLLI_L2_HDLC_ABM = 11;
49pub const BLLI_L2_LLC = 12;
50pub const BLLI_L2_X75 = 13;
51pub const BLLI_L2_Q922 = 14;
52pub const BLLI_L2_USER_SPECIFIED = 16;
53pub const BLLI_L2_ISO_7776 = 17;
54pub const BLLI_L3_X25 = 6;
55pub const BLLI_L3_ISO_8208 = 7;
56pub const BLLI_L3_X223 = 8;
57pub const BLLI_L3_SIO_8473 = 9;
58pub const BLLI_L3_T70 = 10;
59pub const BLLI_L3_ISO_TR9577 = 11;
60pub const BLLI_L3_USER_SPECIFIED = 16;
61pub const BLLI_L3_IPI_SNAP = 128;
62pub const BLLI_L3_IPI_IP = 204;
63pub const BHLI_ISO = 0;
64pub const BHLI_UserSpecific = 1;
65pub const BHLI_HighLayerProfile = 2;
66pub const BHLI_VendorSpecificAppId = 3;
67pub const AAL5_MODE_MESSAGE = 1;
68pub const AAL5_MODE_STREAMING = 2;
69pub const AAL5_SSCS_NULL = 0;
70pub const AAL5_SSCS_SSCOP_ASSURED = 1;
71pub const AAL5_SSCS_SSCOP_NON_ASSURED = 2;
72pub const AAL5_SSCS_FRAME_RELAY = 4;
73pub const BCOB_A = 1;
74pub const BCOB_C = 3;
75pub const BCOB_X = 16;
76pub const TT_NOIND = 0;
77pub const TT_CBR = 4;
78pub const TT_VBR = 8;
79pub const TR_NOIND = 0;
80pub const TR_END_TO_END = 1;
81pub const TR_NO_END_TO_END = 2;
82pub const CLIP_NOT = 0;
83pub const CLIP_SUS = 32;
84pub const UP_P2P = 0;
85pub const UP_P2MP = 1;
86pub const BLLI_L2_MODE_NORMAL = 64;
87pub const BLLI_L2_MODE_EXT = 128;
88pub const BLLI_L3_MODE_NORMAL = 64;
89pub const BLLI_L3_MODE_EXT = 128;
90pub const BLLI_L3_PACKET_16 = 4;
91pub const BLLI_L3_PACKET_32 = 5;
92pub const BLLI_L3_PACKET_64 = 6;
93pub const BLLI_L3_PACKET_128 = 7;
94pub const BLLI_L3_PACKET_256 = 8;
95pub const BLLI_L3_PACKET_512 = 9;
96pub const BLLI_L3_PACKET_1024 = 10;
97pub const BLLI_L3_PACKET_2048 = 11;
98pub const BLLI_L3_PACKET_4096 = 12;
99pub const PI_ALLOWED = 0;
100pub const PI_RESTRICTED = 64;
101pub const PI_NUMBER_NOT_AVAILABLE = 128;
102pub const SI_USER_NOT_SCREENED = 0;
103pub const SI_USER_PASSED = 1;
104pub const SI_USER_FAILED = 2;
105pub const SI_NETWORK = 3;
106pub const CAUSE_LOC_USER = 0;
107pub const CAUSE_LOC_PRIVATE_LOCAL = 1;
108pub const CAUSE_LOC_PUBLIC_LOCAL = 2;
109pub const CAUSE_LOC_TRANSIT_NETWORK = 3;
110pub const CAUSE_LOC_PUBLIC_REMOTE = 4;
111pub const CAUSE_LOC_PRIVATE_REMOTE = 5;
112pub const CAUSE_LOC_INTERNATIONAL_NETWORK = 7;
113pub const CAUSE_LOC_BEYOND_INTERWORKING = 10;
114pub const CAUSE_UNALLOCATED_NUMBER = 1;
115pub const CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK = 2;
116pub const CAUSE_NO_ROUTE_TO_DESTINATION = 3;
117pub const CAUSE_VPI_VCI_UNACCEPTABLE = 10;
118pub const CAUSE_NORMAL_CALL_CLEARING = 16;
119pub const CAUSE_USER_BUSY = 17;
120pub const CAUSE_NO_USER_RESPONDING = 18;
121pub const CAUSE_CALL_REJECTED = 21;
122pub const CAUSE_NUMBER_CHANGED = 22;
123pub const CAUSE_USER_REJECTS_CLIR = 23;
124pub const CAUSE_DESTINATION_OUT_OF_ORDER = 27;
125pub const CAUSE_INVALID_NUMBER_FORMAT = 28;
126pub const CAUSE_STATUS_ENQUIRY_RESPONSE = 30;
127pub const CAUSE_NORMAL_UNSPECIFIED = 31;
128pub const CAUSE_VPI_VCI_UNAVAILABLE = 35;
129pub const CAUSE_NETWORK_OUT_OF_ORDER = 38;
130pub const CAUSE_TEMPORARY_FAILURE = 41;
131pub const CAUSE_ACCESS_INFORMAION_DISCARDED = 43;
132pub const CAUSE_NO_VPI_VCI_AVAILABLE = 45;
133pub const CAUSE_RESOURCE_UNAVAILABLE = 47;
134pub const CAUSE_QOS_UNAVAILABLE = 49;
135pub const CAUSE_USER_CELL_RATE_UNAVAILABLE = 51;
136pub const CAUSE_BEARER_CAPABILITY_UNAUTHORIZED = 57;
137pub const CAUSE_BEARER_CAPABILITY_UNAVAILABLE = 58;
138pub const CAUSE_OPTION_UNAVAILABLE = 63;
139pub const CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED = 65;
140pub const CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS = 73;
141pub const CAUSE_INVALID_CALL_REFERENCE = 81;
142pub const CAUSE_CHANNEL_NONEXISTENT = 82;
143pub const CAUSE_INCOMPATIBLE_DESTINATION = 88;
144pub const CAUSE_INVALID_ENDPOINT_REFERENCE = 89;
145pub const CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = 91;
146pub const CAUSE_TOO_MANY_PENDING_ADD_PARTY = 92;
147pub const CAUSE_AAL_PARAMETERS_UNSUPPORTED = 93;
148pub const CAUSE_MANDATORY_IE_MISSING = 96;
149pub const CAUSE_UNIMPLEMENTED_MESSAGE_TYPE = 97;
150pub const CAUSE_UNIMPLEMENTED_IE = 99;
151pub const CAUSE_INVALID_IE_CONTENTS = 100;
152pub const CAUSE_INVALID_STATE_FOR_MESSAGE = 101;
153pub const CAUSE_RECOVERY_ON_TIMEOUT = 102;
154pub const CAUSE_INCORRECT_MESSAGE_LENGTH = 104;
155pub const CAUSE_PROTOCOL_ERROR = 111;
156pub const CAUSE_COND_UNKNOWN = 0;
157pub const CAUSE_COND_PERMANENT = 1;
158pub const CAUSE_COND_TRANSIENT = 2;
159pub const CAUSE_REASON_USER = 0;
160pub const CAUSE_REASON_IE_MISSING = 4;
161pub const CAUSE_REASON_IE_INSUFFICIENT = 8;
162pub const CAUSE_PU_PROVIDER = 0;
163pub const CAUSE_PU_USER = 8;
164pub const CAUSE_NA_NORMAL = 0;
165pub const CAUSE_NA_ABNORMAL = 4;
166pub const QOS_CLASS0 = 0;
167pub const QOS_CLASS1 = 1;
168pub const QOS_CLASS2 = 2;
169pub const QOS_CLASS3 = 3;
170pub const QOS_CLASS4 = 4;
171pub const TNS_TYPE_NATIONAL = 64;
172pub const TNS_PLAN_CARRIER_ID_CODE = 1;
173pub const SIO_GET_NUMBER_OF_ATM_DEVICES = 1343619073;
174pub const SIO_GET_ATM_ADDRESS = 3491102722;
175pub const SIO_ASSOCIATE_PVC = 2417360899;
176pub const SIO_GET_ATM_CONNECTION_ID = 1343619076;
177pub const RIO_MSG_DONT_NOTIFY = 1;
178pub const RIO_MSG_DEFER = 2;
179pub const RIO_MSG_WAITALL = 4;
180pub const RIO_MSG_COMMIT_ONLY = 8;
181pub const RIO_MAX_CQ_SIZE = 134217728;
182pub const RIO_CORRUPT_CQ = 4294967295;
183pub const WINDOWS_AF_IRDA = 26;
184pub const WCE_AF_IRDA = 22;
185pub const IRDA_PROTO_SOCK_STREAM = 1;
186pub const SOL_IRLMP = 255;
187pub const IRLMP_ENUMDEVICES = 16;
188pub const IRLMP_IAS_SET = 17;
189pub const IRLMP_IAS_QUERY = 18;
190pub const IRLMP_SEND_PDU_LEN = 19;
191pub const IRLMP_EXCLUSIVE_MODE = 20;
192pub const IRLMP_IRLPT_MODE = 21;
193pub const IRLMP_9WIRE_MODE = 22;
194pub const IRLMP_TINYTP_MODE = 23;
195pub const IRLMP_PARAMETERS = 24;
196pub const IRLMP_DISCOVERY_MODE = 25;
197pub const IRLMP_SHARP_MODE = 32;
198pub const IAS_ATTRIB_NO_CLASS = 16;
199pub const IAS_ATTRIB_NO_ATTRIB = 0;
200pub const IAS_ATTRIB_INT = 1;
201pub const IAS_ATTRIB_OCTETSEQ = 2;
202pub const IAS_ATTRIB_STR = 3;
203pub const IAS_MAX_USER_STRING = 256;
204pub const IAS_MAX_OCTET_STRING = 1024;
205pub const IAS_MAX_CLASSNAME = 64;
206pub const IAS_MAX_ATTRIBNAME = 256;
207pub const LmCharSetASCII = 0;
208pub const LmCharSetISO_8859_1 = 1;
209pub const LmCharSetISO_8859_2 = 2;
210pub const LmCharSetISO_8859_3 = 3;
211pub const LmCharSetISO_8859_4 = 4;
212pub const LmCharSetISO_8859_5 = 5;
213pub const LmCharSetISO_8859_6 = 6;
214pub const LmCharSetISO_8859_7 = 7;
215pub const LmCharSetISO_8859_8 = 8;
216pub const LmCharSetISO_8859_9 = 9;
217pub const LmCharSetUNICODE = 255;
218pub const LM_BAUD_1200 = 1200;
219pub const LM_BAUD_2400 = 2400;
220pub const LM_BAUD_9600 = 9600;
221pub const LM_BAUD_19200 = 19200;
222pub const LM_BAUD_38400 = 38400;
223pub const LM_BAUD_57600 = 57600;
224pub const LM_BAUD_115200 = 115200;
225pub const LM_BAUD_576K = 576000;
226pub const LM_BAUD_1152K = 1152000;
227pub const LM_BAUD_4M = 4000000;
228pub const LM_BAUD_16M = 16000000;
229pub const IPX_PTYPE = 16384;
230pub const IPX_FILTERPTYPE = 16385;
231pub const IPX_STOPFILTERPTYPE = 16387;
232pub const IPX_DSTYPE = 16386;
233pub const IPX_EXTENDED_ADDRESS = 16388;
234pub const IPX_RECVHDR = 16389;
235pub const IPX_MAXSIZE = 16390;
236pub const IPX_ADDRESS = 16391;
237pub const IPX_GETNETINFO = 16392;
238pub const IPX_GETNETINFO_NORIP = 16393;
239pub const IPX_SPXGETCONNECTIONSTATUS = 16395;
240pub const IPX_ADDRESS_NOTIFY = 16396;
241pub const IPX_MAX_ADAPTER_NUM = 16397;
242pub const IPX_RERIPNETNUMBER = 16398;
243pub const IPX_RECEIVE_BROADCAST = 16399;
244pub const IPX_IMMEDIATESPXACK = 16400;
245pub const IPPROTO_RM = 113;
246pub const MAX_MCAST_TTL = 255;
247pub const RM_OPTIONSBASE = 1000;
248pub const RM_RATE_WINDOW_SIZE = 1001;
249pub const RM_SET_MESSAGE_BOUNDARY = 1002;
250pub const RM_FLUSHCACHE = 1003;
251pub const RM_SENDER_WINDOW_ADVANCE_METHOD = 1004;
252pub const RM_SENDER_STATISTICS = 1005;
253pub const RM_LATEJOIN = 1006;
254pub const RM_SET_SEND_IF = 1007;
255pub const RM_ADD_RECEIVE_IF = 1008;
256pub const RM_DEL_RECEIVE_IF = 1009;
257pub const RM_SEND_WINDOW_ADV_RATE = 1010;
258pub const RM_USE_FEC = 1011;
259pub const RM_SET_MCAST_TTL = 1012;
260pub const RM_RECEIVER_STATISTICS = 1013;
261pub const RM_HIGH_SPEED_INTRANET_OPT = 1014;
262pub const SENDER_DEFAULT_RATE_KBITS_PER_SEC = 56;
263pub const SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE = 15;
264pub const MAX_WINDOW_INCREMENT_PERCENTAGE = 25;
265pub const SENDER_DEFAULT_LATE_JOINER_PERCENTAGE = 0;
266pub const SENDER_MAX_LATE_JOINER_PERCENTAGE = 75;
267pub const BITS_PER_BYTE = 8;
268pub const LOG2_BITS_PER_BYTE = 3;
269pub const SOCKET_DEFAULT2_QM_POLICY = GUID.parse("{aec2ef9c-3a4d-4d3e-8842-239942e39a47}");
270pub const REAL_TIME_NOTIFICATION_CAPABILITY = GUID.parse("{6b59819a-5cae-492d-a901-2a3c2c50164f}");
271pub const REAL_TIME_NOTIFICATION_CAPABILITY_EX = GUID.parse("{6843da03-154a-4616-a508-44371295f96b}");
272pub const ASSOCIATE_NAMERES_CONTEXT = GUID.parse("{59a38b67-d4fe-46e1-ba3c-87ea74ca3049}");
273pub const TCP_INITIAL_RTO_DEFAULT_RTT = 0;
274pub const TCP_INITIAL_RTO_DEFAULT_MAX_SYN_RETRANSMISSIONS = 0;
275pub const SOCKET_SETTINGS_GUARANTEE_ENCRYPTION = 1;
276pub const SOCKET_SETTINGS_ALLOW_INSECURE = 2;
277pub const SOCKET_SETTINGS_IPSEC_SKIP_FILTER_INSTANTIATION = 1;
278pub const SOCKET_SETTINGS_IPSEC_OPTIONAL_PEER_NAME_VERIFICATION = 2;
279pub const SOCKET_SETTINGS_IPSEC_ALLOW_FIRST_INBOUND_PKT_UNENCRYPTED = 4;
280pub const SOCKET_SETTINGS_IPSEC_PEER_NAME_IS_RAW_FORMAT = 8;
281pub const SOCKET_QUERY_IPSEC2_ABORT_CONNECTION_ON_FIELD_CHANGE = 1;
282pub const SOCKET_QUERY_IPSEC2_FIELD_MASK_MM_SA_ID = 1;
283pub const SOCKET_QUERY_IPSEC2_FIELD_MASK_QM_SA_ID = 2;
284pub const SOCKET_INFO_CONNECTION_SECURED = 1;
285pub const SOCKET_INFO_CONNECTION_ENCRYPTED = 2;
286pub const SOCKET_INFO_CONNECTION_IMPERSONATED = 4;
287pub const IN4ADDR_LOOPBACK = 16777343;
288pub const IN4ADDR_LOOPBACKPREFIX_LENGTH = 8;
289pub const IN4ADDR_LINKLOCALPREFIX_LENGTH = 16;
290pub const IN4ADDR_MULTICASTPREFIX_LENGTH = 4;
291pub const IFF_UP = 1;
292pub const IFF_BROADCAST = 2;
293pub const IFF_LOOPBACK = 4;
294pub const IFF_POINTTOPOINT = 8;
295pub const IFF_MULTICAST = 16;
296pub const IP_OPTIONS = 1;
297pub const IP_HDRINCL = 2;
298pub const IP_TOS = 3;
299pub const IP_TTL = 4;
300pub const IP_MULTICAST_IF = 9;
301pub const IP_MULTICAST_TTL = 10;
302pub const IP_MULTICAST_LOOP = 11;
303pub const IP_ADD_MEMBERSHIP = 12;
304pub const IP_DROP_MEMBERSHIP = 13;
305pub const IP_DONTFRAGMENT = 14;
306pub const IP_ADD_SOURCE_MEMBERSHIP = 15;
307pub const IP_DROP_SOURCE_MEMBERSHIP = 16;
308pub const IP_BLOCK_SOURCE = 17;
309pub const IP_UNBLOCK_SOURCE = 18;
310pub const IP_PKTINFO = 19;
311pub const IP_HOPLIMIT = 21;
312pub const IP_RECVTTL = 21;
313pub const IP_RECEIVE_BROADCAST = 22;
314pub const IP_RECVIF = 24;
315pub const IP_RECVDSTADDR = 25;
316pub const IP_IFLIST = 28;
317pub const IP_ADD_IFLIST = 29;
318pub const IP_DEL_IFLIST = 30;
319pub const IP_UNICAST_IF = 31;
320pub const IP_RTHDR = 32;
321pub const IP_GET_IFLIST = 33;
322pub const IP_RECVRTHDR = 38;
323pub const IP_TCLASS = 39;
324pub const IP_RECVTCLASS = 40;
325pub const IP_RECVTOS = 40;
326pub const IP_ORIGINAL_ARRIVAL_IF = 47;
327pub const IP_ECN = 50;
328pub const IP_PKTINFO_EX = 51;
329pub const IP_WFP_REDIRECT_RECORDS = 60;
330pub const IP_WFP_REDIRECT_CONTEXT = 70;
331pub const IP_MTU_DISCOVER = 71;
332pub const IP_MTU = 73;
333pub const IP_NRT_INTERFACE = 74;
334pub const IP_RECVERR = 75;
335pub const IP_USER_MTU = 76;
336pub const IP_UNSPECIFIED_TYPE_OF_SERVICE = -1;
337pub const IN6ADDR_LINKLOCALPREFIX_LENGTH = 64;
338pub const IN6ADDR_MULTICASTPREFIX_LENGTH = 8;
339pub const IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_LENGTH = 104;
340pub const IN6ADDR_V4MAPPEDPREFIX_LENGTH = 96;
341pub const IN6ADDR_6TO4PREFIX_LENGTH = 16;
342pub const IN6ADDR_TEREDOPREFIX_LENGTH = 32;
343pub const MCAST_JOIN_GROUP = 41;
344pub const MCAST_LEAVE_GROUP = 42;
345pub const MCAST_BLOCK_SOURCE = 43;
346pub const MCAST_UNBLOCK_SOURCE = 44;
347pub const MCAST_JOIN_SOURCE_GROUP = 45;
348pub const MCAST_LEAVE_SOURCE_GROUP = 46;
349pub const IPV6_HOPOPTS = 1;
350pub const IPV6_HDRINCL = 2;
351pub const IPV6_UNICAST_HOPS = 4;
352pub const IPV6_MULTICAST_IF = 9;
353pub const IPV6_MULTICAST_HOPS = 10;
354pub const IPV6_MULTICAST_LOOP = 11;
355pub const IPV6_ADD_MEMBERSHIP = 12;
356pub const IPV6_DROP_MEMBERSHIP = 13;
357pub const IPV6_DONTFRAG = 14;
358pub const IPV6_PKTINFO = 19;
359pub const IPV6_HOPLIMIT = 21;
360pub const IPV6_PROTECTION_LEVEL = 23;
361pub const IPV6_RECVIF = 24;
362pub const IPV6_RECVDSTADDR = 25;
363pub const IPV6_CHECKSUM = 26;
364pub const IPV6_V6ONLY = 27;
365pub const IPV6_IFLIST = 28;
366pub const IPV6_ADD_IFLIST = 29;
367pub const IPV6_DEL_IFLIST = 30;
368pub const IPV6_UNICAST_IF = 31;
369pub const IPV6_RTHDR = 32;
370pub const IPV6_GET_IFLIST = 33;
371pub const IPV6_RECVRTHDR = 38;
372pub const IPV6_TCLASS = 39;
373pub const IPV6_RECVTCLASS = 40;
374pub const IPV6_ECN = 50;
375pub const IPV6_PKTINFO_EX = 51;
376pub const IPV6_WFP_REDIRECT_RECORDS = 60;
377pub const IPV6_WFP_REDIRECT_CONTEXT = 70;
378pub const IPV6_MTU_DISCOVER = 71;
379pub const IPV6_MTU = 72;
380pub const IPV6_NRT_INTERFACE = 74;
381pub const IPV6_RECVERR = 75;
382pub const IPV6_USER_MTU = 76;
383pub const IP_UNSPECIFIED_HOP_LIMIT = -1;
384pub const PROTECTION_LEVEL_UNRESTRICTED = 10;
385pub const PROTECTION_LEVEL_EDGERESTRICTED = 20;
386pub const PROTECTION_LEVEL_RESTRICTED = 30;
387pub const INET_ADDRSTRLEN = 22;
388pub const INET6_ADDRSTRLEN = 65;
389pub const TCP_OFFLOAD_NO_PREFERENCE = 0;
390pub const TCP_OFFLOAD_NOT_PREFERRED = 1;
391pub const TCP_OFFLOAD_PREFERRED = 2;
392pub const TCP_EXPEDITED_1122 = 2;
393pub const TCP_KEEPALIVE = 3;
394pub const TCP_MAXSEG = 4;
395pub const TCP_MAXRT = 5;
396pub const TCP_STDURG = 6;
397pub const TCP_NOURG = 7;
398pub const TCP_ATMARK = 8;
399pub const TCP_NOSYNRETRIES = 9;
400pub const TCP_TIMESTAMPS = 10;
401pub const TCP_OFFLOAD_PREFERENCE = 11;
402pub const TCP_CONGESTION_ALGORITHM = 12;
403pub const TCP_DELAY_FIN_ACK = 13;
404pub const TCP_MAXRTMS = 14;
405pub const TCP_FASTOPEN = 15;
406pub const TCP_KEEPCNT = 16;
407pub const TCP_KEEPINTVL = 17;
408pub const TCP_FAIL_CONNECT_ON_ICMP_ERROR = 18;
409pub const TCP_ICMP_ERROR_INFO = 19;
410pub const UDP_SEND_MSG_SIZE = 2;
411pub const UDP_RECV_MAX_COALESCED_SIZE = 3;
412pub const UDP_COALESCED_INFO = 3;
413pub const AF_UNSPEC = 0;
414pub const AF_UNIX = 1;
415pub const AF_INET = 2;
416pub const AF_IMPLINK = 3;
417pub const AF_PUP = 4;
418pub const AF_CHAOS = 5;
419pub const AF_NS = 6;
420pub const AF_ISO = 7;
421pub const AF_ECMA = 8;
422pub const AF_DATAKIT = 9;
423pub const AF_CCITT = 10;
424pub const AF_SNA = 11;
425pub const AF_DECnet = 12;
426pub const AF_DLI = 13;
427pub const AF_LAT = 14;
428pub const AF_HYLINK = 15;
429pub const AF_APPLETALK = 16;
430pub const AF_NETBIOS = 17;
431pub const AF_VOICEVIEW = 18;
432pub const AF_FIREFOX = 19;
433pub const AF_UNKNOWN1 = 20;
434pub const AF_BAN = 21;
435pub const AF_ATM = 22;
436pub const AF_INET6 = 23;
437pub const AF_CLUSTER = 24;
438pub const AF_12844 = 25;
439pub const AF_IRDA = 26;
440pub const AF_NETDES = 28;
441pub const AF_MAX = 29;
442pub const AF_TCNPROCESS = 29;
443pub const AF_TCNMESSAGE = 30;
444pub const AF_ICLFXBM = 31;
445pub const AF_LINK = 33;
446pub const AF_HYPERV = 34;
447pub const SOCK_STREAM = 1;
448pub const SOCK_DGRAM = 2;
449pub const SOCK_RAW = 3;
450pub const SOCK_RDM = 4;
451pub const SOCK_SEQPACKET = 5;
452pub const SOL_SOCKET = 65535;
453pub const SO_DEBUG = 1;
454pub const SO_ACCEPTCONN = 2;
455pub const SO_REUSEADDR = 4;
456pub const SO_KEEPALIVE = 8;
457pub const SO_DONTROUTE = 16;
458pub const SO_BROADCAST = 32;
459pub const SO_USELOOPBACK = 64;
460pub const SO_LINGER = 128;
461pub const SO_OOBINLINE = 256;
462pub const SO_SNDBUF = 4097;
463pub const SO_RCVBUF = 4098;
464pub const SO_SNDLOWAT = 4099;
465pub const SO_RCVLOWAT = 4100;
466pub const SO_SNDTIMEO = 4101;
467pub const SO_RCVTIMEO = 4102;
468pub const SO_ERROR = 4103;
469pub const SO_TYPE = 4104;
470pub const SO_BSP_STATE = 4105;
471pub const SO_GROUP_ID = 8193;
472pub const SO_GROUP_PRIORITY = 8194;
473pub const SO_MAX_MSG_SIZE = 8195;
474pub const SO_CONDITIONAL_ACCEPT = 12290;
475pub const SO_PAUSE_ACCEPT = 12291;
476pub const SO_COMPARTMENT_ID = 12292;
477pub const SO_RANDOMIZE_PORT = 12293;
478pub const SO_PORT_SCALABILITY = 12294;
479pub const SO_REUSE_UNICASTPORT = 12295;
480pub const SO_REUSE_MULTICASTPORT = 12296;
481pub const SO_ORIGINAL_DST = 12303;
482pub const WSK_SO_BASE = 16384;
483pub const TCP_NODELAY = 1;
484pub const IOC_UNIX = 0;
485pub const IOC_WS2 = 134217728;
486pub const IOC_PROTOCOL = 268435456;
487pub const IOC_VENDOR = 402653184;
488pub const SIO_BSP_HANDLE = IOC_OUT | IOC_WS2 | 27;
489pub const SIO_BSP_HANDLE_SELECT = IOC_OUT | IOC_WS2 | 28;
490pub const SIO_BSP_HANDLE_POLL = IOC_OUT | IOC_WS2 | 29;
491pub const SIO_BASE_HANDLE = IOC_OUT | IOC_WS2 | 34;
492pub const IPPROTO_IP = 0;
493pub const IPPORT_TCPMUX = 1;
494pub const IPPORT_ECHO = 7;
495pub const IPPORT_DISCARD = 9;
496pub const IPPORT_SYSTAT = 11;
497pub const IPPORT_DAYTIME = 13;
498pub const IPPORT_NETSTAT = 15;
499pub const IPPORT_QOTD = 17;
500pub const IPPORT_MSP = 18;
501pub const IPPORT_CHARGEN = 19;
502pub const IPPORT_FTP_DATA = 20;
503pub const IPPORT_FTP = 21;
504pub const IPPORT_TELNET = 23;
505pub const IPPORT_SMTP = 25;
506pub const IPPORT_TIMESERVER = 37;
507pub const IPPORT_NAMESERVER = 42;
508pub const IPPORT_WHOIS = 43;
509pub const IPPORT_MTP = 57;
510pub const IPPORT_TFTP = 69;
511pub const IPPORT_RJE = 77;
512pub const IPPORT_FINGER = 79;
513pub const IPPORT_TTYLINK = 87;
514pub const IPPORT_SUPDUP = 95;
515pub const IPPORT_POP3 = 110;
516pub const IPPORT_NTP = 123;
517pub const IPPORT_EPMAP = 135;
518pub const IPPORT_NETBIOS_NS = 137;
519pub const IPPORT_NETBIOS_DGM = 138;
520pub const IPPORT_NETBIOS_SSN = 139;
521pub const IPPORT_IMAP = 143;
522pub const IPPORT_SNMP = 161;
523pub const IPPORT_SNMP_TRAP = 162;
524pub const IPPORT_IMAP3 = 220;
525pub const IPPORT_LDAP = 389;
526pub const IPPORT_HTTPS = 443;
527pub const IPPORT_MICROSOFT_DS = 445;
528pub const IPPORT_EXECSERVER = 512;
529pub const IPPORT_LOGINSERVER = 513;
530pub const IPPORT_CMDSERVER = 514;
531pub const IPPORT_EFSSERVER = 520;
532pub const IPPORT_BIFFUDP = 512;
533pub const IPPORT_WHOSERVER = 513;
534pub const IPPORT_ROUTESERVER = 520;
535pub const IPPORT_RESERVED = 1024;
536pub const IPPORT_REGISTERED_MAX = 49151;
537pub const IPPORT_DYNAMIC_MIN = 49152;
538pub const IPPORT_DYNAMIC_MAX = 65535;
539pub const IN_CLASSA_NET = 4278190080;
540pub const IN_CLASSA_NSHIFT = 24;
541pub const IN_CLASSA_HOST = 16777215;
542pub const IN_CLASSA_MAX = 128;
543pub const IN_CLASSB_NET = 4294901760;
544pub const IN_CLASSB_NSHIFT = 16;
545pub const IN_CLASSB_HOST = 65535;
546pub const IN_CLASSB_MAX = 65536;
547pub const IN_CLASSC_NET = 4294967040;
548pub const IN_CLASSC_NSHIFT = 8;
549pub const IN_CLASSC_HOST = 255;
550pub const IN_CLASSD_NET = 4026531840;
551pub const IN_CLASSD_NSHIFT = 28;
552pub const IN_CLASSD_HOST = 268435455;
553pub const INADDR_LOOPBACK = 2130706433;
554pub const INADDR_NONE = 4294967295;
555pub const IOCPARM_MASK = 127;
556pub const IOC_VOID = 536870912;
557pub const IOC_OUT = 1073741824;
558pub const IOC_IN = 2147483648;
559pub const MSG_TRUNC = 256;
560pub const MSG_CTRUNC = 512;
561pub const MSG_BCAST = 1024;
562pub const MSG_MCAST = 2048;
563pub const MSG_ERRQUEUE = 4096;
564pub const AI_PASSIVE = 1;
565pub const AI_CANONNAME = 2;
566pub const AI_NUMERICHOST = 4;
567pub const AI_NUMERICSERV = 8;
568pub const AI_DNS_ONLY = 16;
569pub const AI_ALL = 256;
570pub const AI_ADDRCONFIG = 1024;
571pub const AI_V4MAPPED = 2048;
572pub const AI_NON_AUTHORITATIVE = 16384;
573pub const AI_SECURE = 32768;
574pub const AI_RETURN_PREFERRED_NAMES = 65536;
575pub const AI_FQDN = 131072;
576pub const AI_FILESERVER = 262144;
577pub const AI_DISABLE_IDN_ENCODING = 524288;
578pub const AI_EXTENDED = 2147483648;
579pub const AI_RESOLUTION_HANDLE = 1073741824;
580pub const ADDRINFOEX_VERSION_2 = 2;
581pub const ADDRINFOEX_VERSION_3 = 3;
582pub const ADDRINFOEX_VERSION_4 = 4;
583pub const NS_ALL = 0;
584pub const NS_SAP = 1;
585pub const NS_NDS = 2;
586pub const NS_PEER_BROWSE = 3;
587pub const NS_SLP = 5;
588pub const NS_DHCP = 6;
589pub const NS_TCPIP_LOCAL = 10;
590pub const NS_TCPIP_HOSTS = 11;
591pub const NS_DNS = 12;
592pub const NS_NETBT = 13;
593pub const NS_WINS = 14;
594pub const NS_NLA = 15;
595pub const NS_NBP = 20;
596pub const NS_MS = 30;
597pub const NS_STDA = 31;
598pub const NS_NTDS = 32;
599pub const NS_EMAIL = 37;
600pub const NS_X500 = 40;
601pub const NS_NIS = 41;
602pub const NS_NISPLUS = 42;
603pub const NS_WRQ = 50;
604pub const NS_NETDES = 60;
605pub const NI_NOFQDN = 1;
606pub const NI_NUMERICHOST = 2;
607pub const NI_NAMEREQD = 4;
608pub const NI_NUMERICSERV = 8;
609pub const NI_DGRAM = 16;
610pub const NI_MAXHOST = 1025;
611pub const NI_MAXSERV = 32;
612pub const INCL_WINSOCK_API_PROTOTYPES = 1;
613pub const INCL_WINSOCK_API_TYPEDEFS = 0;
614pub const FD_SETSIZE = 64;
615pub const IMPLINK_IP = 155;
616pub const IMPLINK_LOWEXPER = 156;
617pub const IMPLINK_HIGHEXPER = 158;
618pub const WSADESCRIPTION_LEN = 256;
619pub const WSASYS_STATUS_LEN = 128;
620pub const SOCKET_ERROR = -1;
621pub const FROM_PROTOCOL_INFO = -1;
622pub const SO_PROTOCOL_INFOA = 8196;
623pub const SO_PROTOCOL_INFOW = 8197;
624pub const PVD_CONFIG = 12289;
625pub const SOMAXCONN = 2147483647;
626pub const MSG_PEEK = 2;
627pub const MSG_WAITALL = 8;
628pub const MSG_PUSH_IMMEDIATE = 32;
629pub const MSG_PARTIAL = 32768;
630pub const MSG_INTERRUPT = 16;
631pub const MSG_MAXIOVLEN = 16;
632pub const MAXGETHOSTSTRUCT = 1024;
633pub const FD_READ_BIT = 0;
634pub const FD_WRITE_BIT = 1;
635pub const FD_OOB_BIT = 2;
636pub const FD_ACCEPT_BIT = 3;
637pub const FD_CONNECT_BIT = 4;
638pub const FD_CLOSE_BIT = 5;
639pub const FD_QOS_BIT = 6;
640pub const FD_GROUP_QOS_BIT = 7;
641pub const FD_ROUTING_INTERFACE_CHANGE_BIT = 8;
642pub const FD_ADDRESS_LIST_CHANGE_BIT = 9;
643pub const FD_MAX_EVENTS = 10;
644pub const CF_ACCEPT = 0;
645pub const CF_REJECT = 1;
646pub const CF_DEFER = 2;
647pub const SD_RECEIVE = 0;
648pub const SD_SEND = 1;
649pub const SD_BOTH = 2;
650pub const SG_UNCONSTRAINED_GROUP = 1;
651pub const SG_CONSTRAINED_GROUP = 2;
652pub const MAX_PROTOCOL_CHAIN = 7;
653pub const BASE_PROTOCOL = 1;
654pub const LAYERED_PROTOCOL = 0;
655pub const WSAPROTOCOL_LEN = 255;
656pub const PFL_MULTIPLE_PROTO_ENTRIES = 1;
657pub const PFL_RECOMMENDED_PROTO_ENTRY = 2;
658pub const PFL_HIDDEN = 4;
659pub const PFL_MATCHES_PROTOCOL_ZERO = 8;
660pub const PFL_NETWORKDIRECT_PROVIDER = 16;
661pub const XP1_CONNECTIONLESS = 1;
662pub const XP1_GUARANTEED_DELIVERY = 2;
663pub const XP1_GUARANTEED_ORDER = 4;
664pub const XP1_MESSAGE_ORIENTED = 8;
665pub const XP1_PSEUDO_STREAM = 16;
666pub const XP1_GRACEFUL_CLOSE = 32;
667pub const XP1_EXPEDITED_DATA = 64;
668pub const XP1_CONNECT_DATA = 128;
669pub const XP1_DISCONNECT_DATA = 256;
670pub const XP1_SUPPORT_BROADCAST = 512;
671pub const XP1_SUPPORT_MULTIPOINT = 1024;
672pub const XP1_MULTIPOINT_CONTROL_PLANE = 2048;
673pub const XP1_MULTIPOINT_DATA_PLANE = 4096;
674pub const XP1_QOS_SUPPORTED = 8192;
675pub const XP1_INTERRUPT = 16384;
676pub const XP1_UNI_SEND = 32768;
677pub const XP1_UNI_RECV = 65536;
678pub const XP1_IFS_HANDLES = 131072;
679pub const XP1_PARTIAL_MESSAGE = 262144;
680pub const XP1_SAN_SUPPORT_SDP = 524288;
681pub const BIGENDIAN = 0;
682pub const LITTLEENDIAN = 1;
683pub const SECURITY_PROTOCOL_NONE = 0;
684pub const JL_SENDER_ONLY = 1;
685pub const JL_RECEIVER_ONLY = 2;
686pub const JL_BOTH = 4;
687pub const WSA_FLAG_OVERLAPPED = 1;
688pub const WSA_FLAG_MULTIPOINT_C_ROOT = 2;
689pub const WSA_FLAG_MULTIPOINT_C_LEAF = 4;
690pub const WSA_FLAG_MULTIPOINT_D_ROOT = 8;
691pub const WSA_FLAG_MULTIPOINT_D_LEAF = 16;
692pub const WSA_FLAG_ACCESS_SYSTEM_SECURITY = 64;
693pub const WSA_FLAG_NO_HANDLE_INHERIT = 128;
694pub const WSA_FLAG_REGISTERED_IO = 256;
695pub const TH_NETDEV = 1;
696pub const TH_TAPI = 2;
697pub const SERVICE_MULTIPLE = 1;
698pub const NS_LOCALNAME = 19;
699pub const RES_UNUSED_1 = 1;
700pub const RES_FLUSH_CACHE = 2;
701pub const RES_SERVICE = 4;
702pub const LUP_DEEP = 1;
703pub const LUP_CONTAINERS = 2;
704pub const LUP_NOCONTAINERS = 4;
705pub const LUP_NEAREST = 8;
706pub const LUP_RETURN_NAME = 16;
707pub const LUP_RETURN_TYPE = 32;
708pub const LUP_RETURN_VERSION = 64;
709pub const LUP_RETURN_COMMENT = 128;
710pub const LUP_RETURN_ADDR = 256;
711pub const LUP_RETURN_BLOB = 512;
712pub const LUP_RETURN_ALIASES = 1024;
713pub const LUP_RETURN_QUERY_STRING = 2048;
714pub const LUP_RETURN_ALL = 4080;
715pub const LUP_RES_SERVICE = 32768;
716pub const LUP_FLUSHCACHE = 4096;
717pub const LUP_FLUSHPREVIOUS = 8192;
718pub const LUP_NON_AUTHORITATIVE = 16384;
719pub const LUP_SECURE = 32768;
720pub const LUP_RETURN_PREFERRED_NAMES = 65536;
721pub const LUP_DNS_ONLY = 131072;
722pub const LUP_ADDRCONFIG = 1048576;
723pub const LUP_DUAL_ADDR = 2097152;
724pub const LUP_FILESERVER = 4194304;
725pub const LUP_DISABLE_IDN_ENCODING = 8388608;
726pub const LUP_API_ANSI = 16777216;
727pub const LUP_RESOLUTION_HANDLE = 2147483648;
728pub const RESULT_IS_ALIAS = 1;
729pub const RESULT_IS_ADDED = 16;
730pub const RESULT_IS_CHANGED = 32;
731pub const RESULT_IS_DELETED = 64;
732pub const POLLRDNORM = 256;
733pub const POLLRDBAND = 512;
734pub const POLLPRI = 1024;
735pub const POLLWRNORM = 16;
736pub const POLLWRBAND = 32;
737pub const POLLERR = 1;
738pub const POLLHUP = 2;
739pub const POLLNVAL = 4;
740pub const SO_CONNDATA = 28672;
741pub const SO_CONNOPT = 28673;
742pub const SO_DISCDATA = 28674;
743pub const SO_DISCOPT = 28675;
744pub const SO_CONNDATALEN = 28676;
745pub const SO_CONNOPTLEN = 28677;
746pub const SO_DISCDATALEN = 28678;
747pub const SO_DISCOPTLEN = 28679;
748pub const SO_OPENTYPE = 28680;
749pub const SO_SYNCHRONOUS_ALERT = 16;
750pub const SO_SYNCHRONOUS_NONALERT = 32;
751pub const SO_MAXDG = 28681;
752pub const SO_MAXPATHDG = 28682;
753pub const SO_UPDATE_ACCEPT_CONTEXT = 28683;
754pub const SO_CONNECT_TIME = 28684;
755pub const SO_UPDATE_CONNECT_CONTEXT = 28688;
756pub const TCP_BSDURGENT = 28672;
757pub const TF_DISCONNECT = 1;
758pub const TF_REUSE_SOCKET = 2;
759pub const TF_WRITE_BEHIND = 4;
760pub const TF_USE_DEFAULT_WORKER = 0;
761pub const TF_USE_SYSTEM_THREAD = 16;
762pub const TF_USE_KERNEL_APC = 32;
763pub const TP_ELEMENT_MEMORY = 1;
764pub const TP_ELEMENT_FILE = 2;
765pub const TP_ELEMENT_EOP = 4;
766pub const NLA_ALLUSERS_NETWORK = 1;
767pub const NLA_FRIENDLY_NAME = 2;
768pub const WSPDESCRIPTION_LEN = 255;
769pub const WSS_OPERATION_IN_PROGRESS = 259;
770pub const LSP_SYSTEM = 2147483648;
771pub const LSP_INSPECTOR = 1;
772pub const LSP_REDIRECTOR = 2;
773pub const LSP_PROXY = 4;
774pub const LSP_FIREWALL = 8;
775pub const LSP_INBOUND_MODIFY = 16;
776pub const LSP_OUTBOUND_MODIFY = 32;
777pub const LSP_CRYPTO_COMPRESS = 64;
778pub const LSP_LOCAL_CACHE = 128;
779pub const IPPROTO_ICMP = 1;
780pub const IPPROTO_IGMP = 2;
781pub const IPPROTO_GGP = 3;
782pub const IPPROTO_TCP = 6;
783pub const IPPROTO_PUP = 12;
784pub const IPPROTO_UDP = 17;
785pub const IPPROTO_IDP = 22;
786pub const IPPROTO_ND = 77;
787pub const IPPROTO_RAW = 255;
788pub const IPPROTO_MAX = 256;
789pub const IP_DEFAULT_MULTICAST_TTL = 1;
790pub const IP_DEFAULT_MULTICAST_LOOP = 1;
791pub const IP_MAX_MEMBERSHIPS = 20;
792pub const AF_IPX = 6;
793pub const FD_READ = 1;
794pub const FD_WRITE = 2;
795pub const FD_OOB = 4;
796pub const FD_ACCEPT = 8;
797pub const FD_CONNECT = 16;
798pub const FD_CLOSE = 32;
799pub const SERVICE_RESOURCE = 1;
800pub const SERVICE_SERVICE = 2;
801pub const SERVICE_LOCAL = 4;
802pub const SERVICE_FLAG_DEFER = 1;
803pub const SERVICE_FLAG_HARD = 2;
804pub const PROP_COMMENT = 1;
805pub const PROP_LOCALE = 2;
806pub const PROP_DISPLAY_HINT = 4;
807pub const PROP_VERSION = 8;
808pub const PROP_START_TIME = 16;
809pub const PROP_MACHINE = 32;
810pub const PROP_ADDRESSES = 256;
811pub const PROP_SD = 512;
812pub const PROP_ALL = 2147483648;
813pub const SERVICE_ADDRESS_FLAG_RPC_CN = 1;
814pub const SERVICE_ADDRESS_FLAG_RPC_DG = 2;
815pub const SERVICE_ADDRESS_FLAG_RPC_NB = 4;
816pub const NS_DEFAULT = 0;
817pub const NS_VNS = 50;
818pub const NSTYPE_HIERARCHICAL = 1;
819pub const NSTYPE_DYNAMIC = 2;
820pub const NSTYPE_ENUMERABLE = 4;
821pub const NSTYPE_WORKGROUP = 8;
822pub const XP_CONNECTIONLESS = 1;
823pub const XP_GUARANTEED_DELIVERY = 2;
824pub const XP_GUARANTEED_ORDER = 4;
825pub const XP_MESSAGE_ORIENTED = 8;
826pub const XP_PSEUDO_STREAM = 16;
827pub const XP_GRACEFUL_CLOSE = 32;
828pub const XP_EXPEDITED_DATA = 64;
829pub const XP_CONNECT_DATA = 128;
830pub const XP_DISCONNECT_DATA = 256;
831pub const XP_SUPPORTS_BROADCAST = 512;
832pub const XP_SUPPORTS_MULTICAST = 1024;
833pub const XP_BANDWIDTH_ALLOCATION = 2048;
834pub const XP_FRAGMENTATION = 4096;
835pub const XP_ENCRYPTS = 8192;
836pub const RES_SOFT_SEARCH = 1;
837pub const RES_FIND_MULTIPLE = 2;
838pub const SET_SERVICE_PARTIAL_SUCCESS = 1;
839pub const UDP_NOCHECKSUM = 1;
840pub const UDP_CHECKSUM_COVERAGE = 20;
841pub const GAI_STRERROR_BUFFER_SIZE = 1024;
838842
839843pub const LPCONDITIONPROC = fn (
840844 lpCallerId: *WSABUF,
......@@ -999,7 +1003,7 @@ pub const addrinfoexA = extern struct {
9991003 ai_addr: *sockaddr,
10001004 ai_blob: *c_void,
10011005 ai_bloblen: usize,
1002 ai_provider: *Guid,
1006 ai_provider: *GUID,
10031007 ai_next: *addrinfoexA,
10041008};
10051009
......@@ -1664,7 +1668,7 @@ pub extern "ws2_32" fn htons(
16641668) callconv(WINAPI) u16;
16651669
16661670pub extern "ws2_32" fn inet_addr(
1667 cp: [*]const u8,
1671 cp: ?[*]const u8,
16681672) callconv(WINAPI) u32;
16691673
16701674pub extern "ws2_32" fn listen(
......@@ -1705,7 +1709,7 @@ pub extern "ws2_32" fn select(
17051709) callconv(WINAPI) i32;
17061710
17071711pub extern "ws2_32" fn send(
1708 s: SOCKEt,
1712 s: SOCKET,
17091713 buf: [*]const u8,
17101714 len: i32,
17111715 flags: u32,
......@@ -1750,11 +1754,11 @@ pub extern "ws2_32" fn WSASetLastError(iError: i32) callconv(WINAPI) void;
17501754
17511755pub extern "ws2_32" fn WSAGetLastError() callconv(WINAPI) WinsockError;
17521756
1753pub extern "ws2_32" fn WSAIsBlocking(WINAPI) BOOL;
1757pub extern "ws2_32" fn WSAIsBlocking() callconv(WINAPI) BOOL;
17541758
17551759pub extern "ws2_32" fn WSAUnhookBlockingHook() callconv(WINAPI) i32;
17561760
1757pub extern "ws2_32" fn WSASetBlockingHook(lpBlockFunc: FARPROC) FARPROC;
1761pub extern "ws2_32" fn WSASetBlockingHook(lpBlockFunc: FARPROC) callconv(WINAPI) FARPROC;
17581762
17591763pub extern "ws2_32" fn WSACancelBlockingCall() callconv(WINAPI) i32;
17601764
lib/std/x/net/tcp.zig+1-1
......@@ -150,7 +150,7 @@ pub const Client = struct {
150150 /// Read multiple I/O vectors with a prepended message header from the socket
151151 /// with a set of flags specified. It returns the number of bytes that were
152152 /// read into the buffer provided.
153 pub fn readVectorized(self: cLIENT, msg: *os.msghdr, flags: u32) !usize {
153 pub fn readVectorized(self: Client, msg: *os.msghdr, flags: u32) !usize {
154154 return self.socket.readVectorized(msg, flags);
155155 }
156156
lib/std/x/os/socket_posix.zig+11-5
......@@ -59,7 +59,7 @@ pub const Socket = struct {
5959 var address_len: u32 = @sizeOf(os.sockaddr_storage);
6060
6161 const socket = Socket{ .fd = try os.accept(self.fd, @ptrCast(*os.sockaddr, &address), &address_len, flags) };
62 const socket_address = Socket.Address.fromNative(@alignCast(4, @ptrCast(*os.sockaddr, &address)));
62 const socket_address = Socket.Address.fromNative(@ptrCast(*os.sockaddr, &address));
6363
6464 return Socket.Connection.from(socket, socket_address);
6565 }
......@@ -95,7 +95,7 @@ pub const Socket = struct {
9595 var address: os.sockaddr_storage = undefined;
9696 var address_len: u32 = @sizeOf(os.sockaddr_storage);
9797 try os.getsockname(self.fd, @ptrCast(*os.sockaddr, &address), &address_len);
98 return Socket.Address.fromNative(@alignCast(4, @ptrCast(*os.sockaddr, &address)));
98 return Socket.Address.fromNative(@ptrCast(*os.sockaddr, &address));
9999 }
100100
101101 /// Query the address that the socket is connected to.
......@@ -103,7 +103,7 @@ pub const Socket = struct {
103103 var address: os.sockaddr_storage = undefined;
104104 var address_len: u32 = @sizeOf(os.sockaddr_storage);
105105 try os.getpeername(self.fd, @ptrCast(*os.sockaddr, &address), &address_len);
106 return Socket.Address.fromNative(@alignCast(4, @ptrCast(*os.sockaddr, &address)));
106 return Socket.Address.fromNative(@ptrCast(*os.sockaddr, &address));
107107 }
108108
109109 /// Query and return the latest cached error on the socket.
......@@ -146,8 +146,8 @@ pub const Socket = struct {
146146 }
147147
148148 /// Set a socket option.
149 pub fn setOption(self: Socket, level: u32, name: u32, value: []const u8) !void {
150 return os.setsockopt(self.fd, level, name, value);
149 pub fn setOption(self: Socket, level: u32, code: u32, value: []const u8) !void {
150 return os.setsockopt(self.fd, level, code, value);
151151 }
152152
153153 /// Have close() or shutdown() syscalls block until all queued messages in the socket have been successfully
......@@ -208,6 +208,9 @@ pub const Socket = struct {
208208 return self.setOption(os.SOL_SOCKET, os.SO_RCVBUF, mem.asBytes(&size));
209209 }
210210
211 /// WARNING: Timeouts only affect blocking sockets. It is undefined behavior if a timeout is
212 /// set on a non-blocking socket.
213 ///
211214 /// Set a timeout on the socket that is to occur if no messages are successfully written
212215 /// to its bound destination after a specified number of milliseconds. A subsequent write
213216 /// to the socket will thereafter return `error.WouldBlock` should the timeout be exceeded.
......@@ -220,6 +223,9 @@ pub const Socket = struct {
220223 return self.setOption(os.SOL_SOCKET, os.SO_SNDTIMEO, mem.asBytes(&timeout));
221224 }
222225
226 /// WARNING: Timeouts only affect blocking sockets. It is undefined behavior if a timeout is
227 /// set on a non-blocking socket.
228 ///
223229 /// Set a timeout on the socket that is to occur if no messages are successfully read
224230 /// from its bound destination after a specified number of milliseconds. A subsequent
225231 /// read from the socket will thereafter return `error.WouldBlock` should the timeout be
lib/std/x/os/socket_windows.zig+12-6
......@@ -24,7 +24,7 @@ pub const Socket = struct {
2424 pub fn init(domain: u32, socket_type: u32, protocol: u32) !Socket {
2525 var filtered_socket_type = socket_type & ~@as(u32, os.SOCK_CLOEXEC);
2626
27 var filtered_flags = ws2_32.WSA_FLAG_OVERLAPPED;
27 var filtered_flags: u32 = ws2_32.WSA_FLAG_OVERLAPPED;
2828 if (socket_type & os.SOCK_CLOEXEC != 0) {
2929 filtered_flags |= ws2_32.WSA_FLAG_NO_HANDLE_INHERIT;
3030 }
......@@ -169,7 +169,7 @@ pub const Socket = struct {
169169 }
170170
171171 const socket = Socket.from(rc);
172 const socket_address = Socket.Address.fromNative(@alignCast(4, @ptrCast(*ws2_32.sockaddr, &address)));
172 const socket_address = Socket.Address.fromNative(@ptrCast(*ws2_32.sockaddr, &address));
173173
174174 return Socket.Connection.from(socket, socket_address);
175175 }
......@@ -275,7 +275,7 @@ pub const Socket = struct {
275275 };
276276 }
277277
278 return Socket.Address.fromNative(@alignCast(4, @ptrCast(*os.sockaddr, &address)));
278 return Socket.Address.fromNative(@ptrCast(*os.sockaddr, &address));
279279 }
280280
281281 /// Query the address that the socket is connected to.
......@@ -295,7 +295,7 @@ pub const Socket = struct {
295295 };
296296 }
297297
298 return Socket.Address.fromNative(@alignCast(4, @ptrCast(*os.sockaddr, &address)));
298 return Socket.Address.fromNative(@ptrCast(*os.sockaddr, &address));
299299 }
300300
301301 /// Query and return the latest cached error on the socket.
......@@ -314,8 +314,8 @@ pub const Socket = struct {
314314 }
315315
316316 /// Set a socket option.
317 pub fn setOption(self: Socket, level: u32, name: u32, value: []const u8) !void {
318 const rc = ws2_32.setsockopt(self.fd, @intCast(i32, level), @intCast(i32, name), value.ptr, @intCast(i32, value.len));
317 pub fn setOption(self: Socket, level: u32, code: u32, value: []const u8) !void {
318 const rc = ws2_32.setsockopt(self.fd, @intCast(i32, level), @intCast(i32, code), value.ptr, @intCast(i32, value.len));
319319 if (rc == ws2_32.SOCKET_ERROR) {
320320 return switch (ws2_32.WSAGetLastError()) {
321321 .WSANOTINITIALISED => unreachable,
......@@ -375,6 +375,9 @@ pub const Socket = struct {
375375 return self.setOption(ws2_32.SOL_SOCKET, ws2_32.SO_RCVBUF, mem.asBytes(&size));
376376 }
377377
378 /// WARNING: Timeouts only affect blocking sockets. It is undefined behavior if a timeout is
379 /// set on a non-blocking socket.
380 ///
378381 /// Set a timeout on the socket that is to occur if no messages are successfully written
379382 /// to its bound destination after a specified number of milliseconds. A subsequent write
380383 /// to the socket will thereafter return `error.WouldBlock` should the timeout be exceeded.
......@@ -382,6 +385,9 @@ pub const Socket = struct {
382385 return self.setOption(ws2_32.SOL_SOCKET, ws2_32.SO_SNDTIMEO, mem.asBytes(&milliseconds));
383386 }
384387
388 /// WARNING: Timeouts only affect blocking sockets. It is undefined behavior if a timeout is
389 /// set on a non-blocking socket.
390 ///
385391 /// Set a timeout on the socket that is to occur if no messages are successfully read
386392 /// from its bound destination after a specified number of milliseconds. A subsequent
387393 /// read from the socket will thereafter return `error.WouldBlock` should the timeout be