From: Mikio Hara Date: Mon, 4 Feb 2013 21:53:58 +0000 (+0900) Subject: syscall: regenerate ztype files for linux X-Git-Tag: go1.1rc2~1144 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5ae6a237310e4c8d02fc3257f8be61df44bc9e47;p=gostls13.git syscall: regenerate ztype files for linux This CL adds TCPInfo struct to linux/386,arm. It's already added to linux/amd64. Note that not sure the reason but cgo godefs w/ latest gcc translates a flexible array member in structures correctly, handles it as a non-incomplete, non-opaque type, on Go 1. This CL reverts such changes by hand for the Go 1 contract. R=minux.ma, bradfitz, rsc CC=golang-dev https://golang.org/cl/7197046 --- diff --git a/src/pkg/syscall/ztypes_linux_386.go b/src/pkg/syscall/ztypes_linux_386.go index 76d7b19484..701ab658ad 100644 --- a/src/pkg/syscall/ztypes_linux_386.go +++ b/src/pkg/syscall/ztypes_linux_386.go @@ -231,7 +231,7 @@ type Cmsghdr struct { Len uint32 Level int32 Type int32 - X__cmsg_data [0]byte + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -251,6 +251,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 @@ -267,6 +301,7 @@ const ( SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofUcred = 0xc + SizeofTCPInfo = 0x68 ) const ( @@ -299,7 +334,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1c + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -433,7 +468,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 - Name [0]byte + Name [0]uint8 } const SizeofInotifyEvent = 0x10 diff --git a/src/pkg/syscall/ztypes_linux_amd64.go b/src/pkg/syscall/ztypes_linux_amd64.go index 0cb615d9c7..03bbe70d0d 100644 --- a/src/pkg/syscall/ztypes_linux_amd64.go +++ b/src/pkg/syscall/ztypes_linux_amd64.go @@ -233,7 +233,7 @@ type Cmsghdr struct { Len uint64 Level int32 Type int32 - X__cmsg_data [0]byte + X__cmsg_data [0]uint8 } type Inet4Pktinfo struct { @@ -336,7 +336,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1c + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd @@ -470,7 +470,7 @@ type InotifyEvent struct { Mask uint32 Cookie uint32 Len uint32 - Name [0]byte + Name [0]uint8 } const SizeofInotifyEvent = 0x10 diff --git a/src/pkg/syscall/ztypes_linux_arm.go b/src/pkg/syscall/ztypes_linux_arm.go index 6b653b9bec..8fc23cb6a2 100644 --- a/src/pkg/syscall/ztypes_linux_arm.go +++ b/src/pkg/syscall/ztypes_linux_arm.go @@ -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 ( @@ -301,7 +336,7 @@ const ( IFLA_LINKINFO = 0x12 IFLA_NET_NS_PID = 0x13 IFLA_IFALIAS = 0x14 - IFLA_MAX = 0x1c + IFLA_MAX = 0x1d RT_SCOPE_UNIVERSE = 0x0 RT_SCOPE_SITE = 0xc8 RT_SCOPE_LINK = 0xfd