Skip to content

Commit ca41d38

Browse files
committed
tcp: fix IOCTL constants on Linux
1 parent 15d2c47 commit ca41d38

13 files changed

+100
-6
lines changed

defs_linux.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ package tcp
2323
import "C"
2424

2525
const (
26-
sysSIOCINQ = C.SIOCINQ
27-
sysSIOCOUTQ = C.SIOCOUTQ
28-
2926
sysSO_ORIGINAL_DST = C.SO_ORIGINAL_DST
3027
sysIP6T_SO_ORIGINAL_DST = C.IP6T_SO_ORIGINAL_DST
3128
)

sys_linux_386.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import (
99
"unsafe"
1010
)
1111

12+
const (
13+
sysSIOCINQ = 0x541b
14+
sysSIOCOUTQ = 0x5411
15+
)
16+
1217
func ioctl(s uintptr, ioc int, b []byte) error {
1318
if _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, s, uintptr(ioc), uintptr(unsafe.Pointer(&b[0]))); errno != 0 {
1419
return error(errno)

sys_linux_amd64.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x541b
9+
sysSIOCOUTQ = 0x5411
10+
)

sys_linux_arm.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x541b
9+
sysSIOCOUTQ = 0x5411
10+
)

sys_linux_arm64.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
ysSIOCINQ = 0x541b
9+
sysSIOCOUTQ = 0x5411
10+
)

sys_linux_mips.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x467f
9+
sysSIOCOUTQ = 0x7472
10+
)

sys_linux_mips64.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x467f
9+
sysSIOCOUTQ = 0x7472
10+
)

sys_linux_mips64le.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x467f
9+
sysSIOCOUTQ = 0x7472
10+
)

sys_linux_mipsle.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x467f
9+
sysSIOCOUTQ = 0x7472
10+
)

sys_linux_ppc64.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2017 Mikio Hara. 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 tcp
6+
7+
const (
8+
sysSIOCINQ = 0x4004667f
9+
sysSIOCOUTQ = 0x40047473
10+
)

0 commit comments

Comments
 (0)