summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/inet/inet_state_autogen.go
blob: dc382a6577d283814a420a09e1b70c728cc76591 (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
// automatically generated by stateify.

package inet

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

func (x *TCPBufferSize) StateTypeName() string {
	return "pkg/sentry/inet.TCPBufferSize"
}

func (x *TCPBufferSize) StateFields() []string {
	return []string{
		"Min",
		"Default",
		"Max",
	}
}

func (x *TCPBufferSize) beforeSave() {}

func (x *TCPBufferSize) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.Min)
	m.Save(1, &x.Default)
	m.Save(2, &x.Max)
}

func (x *TCPBufferSize) afterLoad() {}

func (x *TCPBufferSize) StateLoad(m state.Source) {
	m.Load(0, &x.Min)
	m.Load(1, &x.Default)
	m.Load(2, &x.Max)
}

func (x *Namespace) StateTypeName() string {
	return "pkg/sentry/inet.Namespace"
}

func (x *Namespace) StateFields() []string {
	return []string{
		"creator",
		"isRoot",
	}
}

func (x *Namespace) beforeSave() {}

func (x *Namespace) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.creator)
	m.Save(1, &x.isRoot)
}

func (x *Namespace) StateLoad(m state.Source) {
	m.LoadWait(0, &x.creator)
	m.Load(1, &x.isRoot)
	m.AfterLoad(x.afterLoad)
}

func init() {
	state.Register((*TCPBufferSize)(nil))
	state.Register((*Namespace)(nil))
}