// 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))
}