summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/socket_state_autogen.go
blob: 9b391d8cacf3b5cb7f87d08edd5431ee9c751034 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// automatically generated by stateify.

package socket

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

func (i *IPControlMessages) StateTypeName() string {
	return "pkg/sentry/socket.IPControlMessages"
}

func (i *IPControlMessages) StateFields() []string {
	return []string{
		"HasTimestamp",
		"Timestamp",
		"HasInq",
		"Inq",
		"HasTOS",
		"TOS",
		"HasTClass",
		"TClass",
		"HasIPPacketInfo",
		"PacketInfo",
		"HasIPv6PacketInfo",
		"IPv6PacketInfo",
		"OriginalDstAddress",
		"SockErr",
	}
}

func (i *IPControlMessages) beforeSave() {}

// +checklocksignore
func (i *IPControlMessages) StateSave(stateSinkObject state.Sink) {
	i.beforeSave()
	stateSinkObject.Save(0, &i.HasTimestamp)
	stateSinkObject.Save(1, &i.Timestamp)
	stateSinkObject.Save(2, &i.HasInq)
	stateSinkObject.Save(3, &i.Inq)
	stateSinkObject.Save(4, &i.HasTOS)
	stateSinkObject.Save(5, &i.TOS)
	stateSinkObject.Save(6, &i.HasTClass)
	stateSinkObject.Save(7, &i.TClass)
	stateSinkObject.Save(8, &i.HasIPPacketInfo)
	stateSinkObject.Save(9, &i.PacketInfo)
	stateSinkObject.Save(10, &i.HasIPv6PacketInfo)
	stateSinkObject.Save(11, &i.IPv6PacketInfo)
	stateSinkObject.Save(12, &i.OriginalDstAddress)
	stateSinkObject.Save(13, &i.SockErr)
}

func (i *IPControlMessages) afterLoad() {}

// +checklocksignore
func (i *IPControlMessages) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &i.HasTimestamp)
	stateSourceObject.Load(1, &i.Timestamp)
	stateSourceObject.Load(2, &i.HasInq)
	stateSourceObject.Load(3, &i.Inq)
	stateSourceObject.Load(4, &i.HasTOS)
	stateSourceObject.Load(5, &i.TOS)
	stateSourceObject.Load(6, &i.HasTClass)
	stateSourceObject.Load(7, &i.TClass)
	stateSourceObject.Load(8, &i.HasIPPacketInfo)
	stateSourceObject.Load(9, &i.PacketInfo)
	stateSourceObject.Load(10, &i.HasIPv6PacketInfo)
	stateSourceObject.Load(11, &i.IPv6PacketInfo)
	stateSourceObject.Load(12, &i.OriginalDstAddress)
	stateSourceObject.Load(13, &i.SockErr)
}

func (to *SendReceiveTimeout) StateTypeName() string {
	return "pkg/sentry/socket.SendReceiveTimeout"
}

func (to *SendReceiveTimeout) StateFields() []string {
	return []string{
		"send",
		"recv",
	}
}

func (to *SendReceiveTimeout) beforeSave() {}

// +checklocksignore
func (to *SendReceiveTimeout) StateSave(stateSinkObject state.Sink) {
	to.beforeSave()
	stateSinkObject.Save(0, &to.send)
	stateSinkObject.Save(1, &to.recv)
}

func (to *SendReceiveTimeout) afterLoad() {}

// +checklocksignore
func (to *SendReceiveTimeout) StateLoad(stateSourceObject state.Source) {
	stateSourceObject.Load(0, &to.send)
	stateSourceObject.Load(1, &to.recv)
}

func init() {
	state.Register((*IPControlMessages)(nil))
	state.Register((*SendReceiveTimeout)(nil))
}