// automatically generated by stateify.

package tcpip

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

func (x *FullAddress) StateTypeName() string {
	return "pkg/tcpip.FullAddress"
}

func (x *FullAddress) StateFields() []string {
	return []string{
		"NIC",
		"Addr",
		"Port",
	}
}

func (x *FullAddress) beforeSave() {}

func (x *FullAddress) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.NIC)
	m.Save(1, &x.Addr)
	m.Save(2, &x.Port)
}

func (x *FullAddress) afterLoad() {}

func (x *FullAddress) StateLoad(m state.Source) {
	m.Load(0, &x.NIC)
	m.Load(1, &x.Addr)
	m.Load(2, &x.Port)
}

func (x *ControlMessages) StateTypeName() string {
	return "pkg/tcpip.ControlMessages"
}

func (x *ControlMessages) StateFields() []string {
	return []string{
		"HasTimestamp",
		"Timestamp",
		"HasInq",
		"Inq",
		"HasTOS",
		"TOS",
		"HasTClass",
		"TClass",
		"HasIPPacketInfo",
		"PacketInfo",
	}
}

func (x *ControlMessages) beforeSave() {}

func (x *ControlMessages) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.HasTimestamp)
	m.Save(1, &x.Timestamp)
	m.Save(2, &x.HasInq)
	m.Save(3, &x.Inq)
	m.Save(4, &x.HasTOS)
	m.Save(5, &x.TOS)
	m.Save(6, &x.HasTClass)
	m.Save(7, &x.TClass)
	m.Save(8, &x.HasIPPacketInfo)
	m.Save(9, &x.PacketInfo)
}

func (x *ControlMessages) afterLoad() {}

func (x *ControlMessages) StateLoad(m state.Source) {
	m.Load(0, &x.HasTimestamp)
	m.Load(1, &x.Timestamp)
	m.Load(2, &x.HasInq)
	m.Load(3, &x.Inq)
	m.Load(4, &x.HasTOS)
	m.Load(5, &x.TOS)
	m.Load(6, &x.HasTClass)
	m.Load(7, &x.TClass)
	m.Load(8, &x.HasIPPacketInfo)
	m.Load(9, &x.PacketInfo)
}

func (x *IPPacketInfo) StateTypeName() string {
	return "pkg/tcpip.IPPacketInfo"
}

func (x *IPPacketInfo) StateFields() []string {
	return []string{
		"NIC",
		"LocalAddr",
		"DestinationAddr",
	}
}

func (x *IPPacketInfo) beforeSave() {}

func (x *IPPacketInfo) StateSave(m state.Sink) {
	x.beforeSave()
	m.Save(0, &x.NIC)
	m.Save(1, &x.LocalAddr)
	m.Save(2, &x.DestinationAddr)
}

func (x *IPPacketInfo) afterLoad() {}

func (x *IPPacketInfo) StateLoad(m state.Source) {
	m.Load(0, &x.NIC)
	m.Load(1, &x.LocalAddr)
	m.Load(2, &x.DestinationAddr)
}

func init() {
	state.Register((*FullAddress)(nil))
	state.Register((*ControlMessages)(nil))
	state.Register((*IPPacketInfo)(nil))
}