summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/header/header_state_autogen.go
blob: 7efd361fb56556853d1032b7c744c22009cb1ca3 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// automatically generated by stateify.

package header

import (
	"gvisor.dev/gvisor/pkg/state"
)

func (x *SACKBlock) StateTypeName() string {
	return "pkg/tcpip/header.SACKBlock"
}

func (x *SACKBlock) StateFields() []string {
	return []string{
		"Start",
		"End",
	}
}

func (x *SACKBlock) beforeSave() {}

func (x *SACKBlock) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.Start)
	m.Save(1, &x.End)
}

func (x *SACKBlock) afterLoad() {}

func (x *SACKBlock) StateLoad(m state.Source) {
	m.Load(0, &x.Start)
	m.Load(1, &x.End)
}

func (x *TCPOptions) StateTypeName() string {
	return "pkg/tcpip/header.TCPOptions"
}

func (x *TCPOptions) StateFields() []string {
	return []string{
		"TS",
		"TSVal",
		"TSEcr",
		"SACKBlocks",
	}
}

func (x *TCPOptions) beforeSave() {}

func (x *TCPOptions) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.TS)
	m.Save(1, &x.TSVal)
	m.Save(2, &x.TSEcr)
	m.Save(3, &x.SACKBlocks)
}

func (x *TCPOptions) afterLoad() {}

func (x *TCPOptions) StateLoad(m state.Source) {
	m.Load(0, &x.TS)
	m.Load(1, &x.TSVal)
	m.Load(2, &x.TSEcr)
	m.Load(3, &x.SACKBlocks)
}

func init() {
	state.Register((*SACKBlock)(nil))
	state.Register((*TCPOptions)(nil))
}