net_windows.mx raw
1 // Copyright 2021 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package windows
6
7 import (
8 "syscall"
9 _ "unsafe"
10 )
11
12 //go:linkname WSASendtoInet4 syscall.wsaSendtoInet4
13 //go:noescape
14 func WSASendtoInet4(s syscall.Handle, bufs *syscall.WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *syscall.SockaddrInet4, overlapped *syscall.Overlapped, croutine *byte) (err error)
15
16 //go:linkname WSASendtoInet6 syscall.wsaSendtoInet6
17 //go:noescape
18 func WSASendtoInet6(s syscall.Handle, bufs *syscall.WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *syscall.SockaddrInet6, overlapped *syscall.Overlapped, croutine *byte) (err error)
19
20 const (
21 SO_TYPE = 0x1008
22 SIO_TCP_INITIAL_RTO = syscall.IOC_IN | syscall.IOC_VENDOR | 17
23 TCP_INITIAL_RTO_UNSPECIFIED_RTT = ^uint16(0)
24 TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS = ^uint8(1)
25 )
26
27 type TCP_INITIAL_RTO_PARAMETERS struct {
28 Rtt uint16
29 MaxSynRetransmissions uint8
30 }
31