|
@@ -206,4 +206,12 @@ foreign ws2_32 {
|
|
optval: ^c_char,
|
|
optval: ^c_char,
|
|
optlen: ^c_int,
|
|
optlen: ^c_int,
|
|
) -> c_int ---
|
|
) -> c_int ---
|
|
|
|
+ // https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohl
|
|
|
|
+ ntohl :: proc(netlong: c_ulong) -> c_ulong ---
|
|
|
|
+ // https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ntohs
|
|
|
|
+ ntohs :: proc(netshort: c_ushort) -> c_ushort ---
|
|
|
|
+ // https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htonl
|
|
|
|
+ htonl :: proc(hostlong: c_ulong) -> c_ulong ---
|
|
|
|
+ // https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-htons
|
|
|
|
+ htons :: proc(hostshort: c_ushort) -> c_ushort ---
|
|
}
|
|
}
|