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 (t *TCPBufferSize) StateTypeName() string {
return "pkg/sentry/inet.TCPBufferSize"
}
func (t *TCPBufferSize) StateFields() []string {
return []string{
"Min",
"Default",
"Max",
}
}
func (t *TCPBufferSize) beforeSave() {}
func (t *TCPBufferSize) StateSave(stateSinkObject state.Sink) {
t.beforeSave()
stateSinkObject.Save(0, &t.Min)
stateSinkObject.Save(1, &t.Default)
stateSinkObject.Save(2, &t.Max)
}
func (t *TCPBufferSize) afterLoad() {}
func (t *TCPBufferSize) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &t.Min)
stateSourceObject.Load(1, &t.Default)
stateSourceObject.Load(2, &t.Max)
}
func (n *Namespace) StateTypeName() string {
return "pkg/sentry/inet.Namespace"
}
func (n *Namespace) StateFields() []string {
return []string{
"creator",
"isRoot",
}
}
func (n *Namespace) beforeSave() {}
func (n *Namespace) StateSave(stateSinkObject state.Sink) {
n.beforeSave()
stateSinkObject.Save(0, &n.creator)
stateSinkObject.Save(1, &n.isRoot)
}
func (n *Namespace) StateLoad(stateSourceObject state.Source) {
stateSourceObject.LoadWait(0, &n.creator)
stateSourceObject.Load(1, &n.isRoot)
stateSourceObject.AfterLoad(n.afterLoad)
}
func init() {
state.Register((*TCPBufferSize)(nil))
state.Register((*Namespace)(nil))
}
|