-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsys.go
More file actions
34 lines (28 loc) · 656 Bytes
/
sys.go
File metadata and controls
34 lines (28 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2016 Mikio Hara. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tcpinfo
import "github.com/mikioh/tcpopt"
func init() {
for _, o := range options {
if o.name == 0 || o.parseFn == nil {
continue
}
tcpopt.Register(o.level, o.name, o.parseFn)
}
}
const (
ianaProtocolTCP = 0x6
)
const (
soInfo = iota
soCCInfo
soCCAlgo
soMax
)
// An option represents a binding for socket option.
type option struct {
level int // option level
name int // option name, must be equal or greater than 1
parseFn func([]byte) (tcpopt.Option, error)
}