mirror of
https://github.com/golang/go
synced 2024-11-20 04:54:44 -07:00
syscall: add type for struct tcp_info
R=mikioh.mikioh, rsc CC=golang-dev https://golang.org/cl/6900050
This commit is contained in:
parent
76de81da50
commit
bef036e3d1
@ -195,6 +195,8 @@ type Inet6Pktinfo C.struct_in6_pktinfo
|
||||
|
||||
type Ucred C.struct_ucred
|
||||
|
||||
type TCPInfo C.struct_tcp_info
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
|
||||
SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
|
||||
@ -211,6 +213,7 @@ const (
|
||||
SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
|
||||
SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
|
||||
SizeofUcred = C.sizeof_struct_ucred
|
||||
SizeofTCPInfo = C.sizeof_struct_tcp_info
|
||||
)
|
||||
|
||||
// Netlink routing and interface messages
|
||||
|
@ -253,6 +253,40 @@ type Ucred struct {
|
||||
Gid uint32
|
||||
}
|
||||
|
||||
type TCPInfo struct {
|
||||
State uint8
|
||||
Ca_state uint8
|
||||
Retransmits uint8
|
||||
Probes uint8
|
||||
Backoff uint8
|
||||
Options uint8
|
||||
Pad_cgo_0 [2]byte
|
||||
Rto uint32
|
||||
Ato uint32
|
||||
Snd_mss uint32
|
||||
Rcv_mss uint32
|
||||
Unacked uint32
|
||||
Sacked uint32
|
||||
Lost uint32
|
||||
Retrans uint32
|
||||
Fackets uint32
|
||||
Last_data_sent uint32
|
||||
Last_ack_sent uint32
|
||||
Last_data_recv uint32
|
||||
Last_ack_recv uint32
|
||||
Pmtu uint32
|
||||
Rcv_ssthresh uint32
|
||||
Rtt uint32
|
||||
Rttvar uint32
|
||||
Snd_ssthresh uint32
|
||||
Snd_cwnd uint32
|
||||
Advmss uint32
|
||||
Reordering uint32
|
||||
Rcv_rtt uint32
|
||||
Rcv_space uint32
|
||||
Total_retrans uint32
|
||||
}
|
||||
|
||||
const (
|
||||
SizeofSockaddrInet4 = 0x10
|
||||
SizeofSockaddrInet6 = 0x1c
|
||||
@ -269,6 +303,7 @@ const (
|
||||
SizeofInet4Pktinfo = 0xc
|
||||
SizeofInet6Pktinfo = 0x14
|
||||
SizeofUcred = 0xc
|
||||
SizeofTCPInfo = 0x68
|
||||
)
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user