summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/stack_state_autogen.go
blob: 5cc49d64839b83fa270b38a5ec8ec6caa28a57b5 (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
// automatically generated by stateify.

package stack

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

func (x *linkAddrEntryList) beforeSave() {}
func (x *linkAddrEntryList) save(m state.Map) {
	x.beforeSave()
	m.Save("head", &x.head)
	m.Save("tail", &x.tail)
}

func (x *linkAddrEntryList) afterLoad() {}
func (x *linkAddrEntryList) load(m state.Map) {
	m.Load("head", &x.head)
	m.Load("tail", &x.tail)
}

func (x *linkAddrEntryEntry) beforeSave() {}
func (x *linkAddrEntryEntry) save(m state.Map) {
	x.beforeSave()
	m.Save("next", &x.next)
	m.Save("prev", &x.prev)
}

func (x *linkAddrEntryEntry) afterLoad() {}
func (x *linkAddrEntryEntry) load(m state.Map) {
	m.Load("next", &x.next)
	m.Load("prev", &x.prev)
}

func (x *TransportEndpointID) beforeSave() {}
func (x *TransportEndpointID) save(m state.Map) {
	x.beforeSave()
	m.Save("LocalPort", &x.LocalPort)
	m.Save("LocalAddress", &x.LocalAddress)
	m.Save("RemotePort", &x.RemotePort)
	m.Save("RemoteAddress", &x.RemoteAddress)
}

func (x *TransportEndpointID) afterLoad() {}
func (x *TransportEndpointID) load(m state.Map) {
	m.Load("LocalPort", &x.LocalPort)
	m.Load("LocalAddress", &x.LocalAddress)
	m.Load("RemotePort", &x.RemotePort)
	m.Load("RemoteAddress", &x.RemoteAddress)
}

func (x *GSOType) save(m state.Map) {
	m.SaveValue("", (int)(*x))
}

func (x *GSOType) load(m state.Map) {
	m.LoadValue("", new(int), func(y interface{}) { *x = (GSOType)(y.(int)) })
}

func (x *GSO) beforeSave() {}
func (x *GSO) save(m state.Map) {
	x.beforeSave()
	m.Save("Type", &x.Type)
	m.Save("NeedsCsum", &x.NeedsCsum)
	m.Save("CsumOffset", &x.CsumOffset)
	m.Save("MSS", &x.MSS)
	m.Save("L3HdrLen", &x.L3HdrLen)
	m.Save("MaxSize", &x.MaxSize)
}

func (x *GSO) afterLoad() {}
func (x *GSO) load(m state.Map) {
	m.Load("Type", &x.Type)
	m.Load("NeedsCsum", &x.NeedsCsum)
	m.Load("CsumOffset", &x.CsumOffset)
	m.Load("MSS", &x.MSS)
	m.Load("L3HdrLen", &x.L3HdrLen)
	m.Load("MaxSize", &x.MaxSize)
}

func init() {
	state.Register("stack.linkAddrEntryList", (*linkAddrEntryList)(nil), state.Fns{Save: (*linkAddrEntryList).save, Load: (*linkAddrEntryList).load})
	state.Register("stack.linkAddrEntryEntry", (*linkAddrEntryEntry)(nil), state.Fns{Save: (*linkAddrEntryEntry).save, Load: (*linkAddrEntryEntry).load})
	state.Register("stack.TransportEndpointID", (*TransportEndpointID)(nil), state.Fns{Save: (*TransportEndpointID).save, Load: (*TransportEndpointID).load})
	state.Register("stack.GSOType", (*GSOType)(nil), state.Fns{Save: (*GSOType).save, Load: (*GSOType).load})
	state.Register("stack.GSO", (*GSO)(nil), state.Fns{Save: (*GSO).save, Load: (*GSO).load})
}