// automatically generated by stateify.

package netfilter

import (
	"context"

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

func (at *acceptTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.acceptTarget"
}

func (at *acceptTarget) StateFields() []string {
	return []string{
		"AcceptTarget",
	}
}

func (at *acceptTarget) beforeSave() {}

// +checklocksignore
func (at *acceptTarget) StateSave(stateSinkObject state.Sink) {
	at.beforeSave()
	stateSinkObject.Save(0, &at.AcceptTarget)
}

func (at *acceptTarget) afterLoad(context.Context) {}

// +checklocksignore
func (at *acceptTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &at.AcceptTarget)
}

func (dt *dropTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.dropTarget"
}

func (dt *dropTarget) StateFields() []string {
	return []string{
		"DropTarget",
	}
}

func (dt *dropTarget) beforeSave() {}

// +checklocksignore
func (dt *dropTarget) StateSave(stateSinkObject state.Sink) {
	dt.beforeSave()
	stateSinkObject.Save(0, &dt.DropTarget)
}

func (dt *dropTarget) afterLoad(context.Context) {}

// +checklocksignore
func (dt *dropTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &dt.DropTarget)
}

func (et *errorTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.errorTarget"
}

func (et *errorTarget) StateFields() []string {
	return []string{
		"ErrorTarget",
	}
}

func (et *errorTarget) beforeSave() {}

// +checklocksignore
func (et *errorTarget) StateSave(stateSinkObject state.Sink) {
	et.beforeSave()
	stateSinkObject.Save(0, &et.ErrorTarget)
}

func (et *errorTarget) afterLoad(context.Context) {}

// +checklocksignore
func (et *errorTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &et.ErrorTarget)
}

func (uc *userChainTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.userChainTarget"
}

func (uc *userChainTarget) StateFields() []string {
	return []string{
		"UserChainTarget",
	}
}

func (uc *userChainTarget) beforeSave() {}

// +checklocksignore
func (uc *userChainTarget) StateSave(stateSinkObject state.Sink) {
	uc.beforeSave()
	stateSinkObject.Save(0, &uc.UserChainTarget)
}

func (uc *userChainTarget) afterLoad(context.Context) {}

// +checklocksignore
func (uc *userChainTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &uc.UserChainTarget)
}

func (rt *returnTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.returnTarget"
}

func (rt *returnTarget) StateFields() []string {
	return []string{
		"ReturnTarget",
	}
}

func (rt *returnTarget) beforeSave() {}

// +checklocksignore
func (rt *returnTarget) StateSave(stateSinkObject state.Sink) {
	rt.beforeSave()
	stateSinkObject.Save(0, &rt.ReturnTarget)
}

func (rt *returnTarget) afterLoad(context.Context) {}

// +checklocksignore
func (rt *returnTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &rt.ReturnTarget)
}

func (rt *redirectTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.redirectTarget"
}

func (rt *redirectTarget) StateFields() []string {
	return []string{
		"RedirectTarget",
		"addr",
	}
}

func (rt *redirectTarget) beforeSave() {}

// +checklocksignore
func (rt *redirectTarget) StateSave(stateSinkObject state.Sink) {
	rt.beforeSave()
	stateSinkObject.Save(0, &rt.RedirectTarget)
	stateSinkObject.Save(1, &rt.addr)
}

func (rt *redirectTarget) afterLoad(context.Context) {}

// +checklocksignore
func (rt *redirectTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &rt.RedirectTarget)
	stateSourceObject.Load(1, &rt.addr)
}

func (sm *standardTargetMaker) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.standardTargetMaker"
}

func (sm *standardTargetMaker) StateFields() []string {
	return []string{
		"NetworkProtocol",
	}
}

func (sm *standardTargetMaker) beforeSave() {}

// +checklocksignore
func (sm *standardTargetMaker) StateSave(stateSinkObject state.Sink) {
	sm.beforeSave()
	stateSinkObject.Save(0, &sm.NetworkProtocol)
}

func (sm *standardTargetMaker) afterLoad(context.Context) {}

// +checklocksignore
func (sm *standardTargetMaker) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &sm.NetworkProtocol)
}

func (em *errorTargetMaker) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.errorTargetMaker"
}

func (em *errorTargetMaker) StateFields() []string {
	return []string{
		"NetworkProtocol",
	}
}

func (em *errorTargetMaker) beforeSave() {}

// +checklocksignore
func (em *errorTargetMaker) StateSave(stateSinkObject state.Sink) {
	em.beforeSave()
	stateSinkObject.Save(0, &em.NetworkProtocol)
}

func (em *errorTargetMaker) afterLoad(context.Context) {}

// +checklocksignore
func (em *errorTargetMaker) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &em.NetworkProtocol)
}

func (rm *redirectTargetMaker) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.redirectTargetMaker"
}

func (rm *redirectTargetMaker) StateFields() []string {
	return []string{
		"NetworkProtocol",
	}
}

func (rm *redirectTargetMaker) beforeSave() {}

// +checklocksignore
func (rm *redirectTargetMaker) StateSave(stateSinkObject state.Sink) {
	rm.beforeSave()
	stateSinkObject.Save(0, &rm.NetworkProtocol)
}

func (rm *redirectTargetMaker) afterLoad(context.Context) {}

// +checklocksignore
func (rm *redirectTargetMaker) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &rm.NetworkProtocol)
}

func (rm *nfNATTargetMaker) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.nfNATTargetMaker"
}

func (rm *nfNATTargetMaker) StateFields() []string {
	return []string{
		"NetworkProtocol",
	}
}

func (rm *nfNATTargetMaker) beforeSave() {}

// +checklocksignore
func (rm *nfNATTargetMaker) StateSave(stateSinkObject state.Sink) {
	rm.beforeSave()
	stateSinkObject.Save(0, &rm.NetworkProtocol)
}

func (rm *nfNATTargetMaker) afterLoad(context.Context) {}

// +checklocksignore
func (rm *nfNATTargetMaker) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &rm.NetworkProtocol)
}

func (jt *JumpTarget) StateTypeName() string {
	return "pkg/sentry/socket/netfilter.JumpTarget"
}

func (jt *JumpTarget) StateFields() []string {
	return []string{
		"Offset",
		"RuleNum",
		"NetworkProtocol",
	}
}

func (jt *JumpTarget) beforeSave() {}

// +checklocksignore
func (jt *JumpTarget) StateSave(stateSinkObject state.Sink) {
	jt.beforeSave()
	stateSinkObject.Save(0, &jt.Offset)
	stateSinkObject.Save(1, &jt.RuleNum)
	stateSinkObject.Save(2, &jt.NetworkProtocol)
}

func (jt *JumpTarget) afterLoad(context.Context) {}

// +checklocksignore
func (jt *JumpTarget) StateLoad(ctx context.Context, stateSourceObject state.Source) {
	stateSourceObject.Load(0, &jt.Offset)
	stateSourceObject.Load(1, &jt.RuleNum)
	stateSourceObject.Load(2, &jt.NetworkProtocol)
}

func init() {
	state.Register((*acceptTarget)(nil))
	state.Register((*dropTarget)(nil))
	state.Register((*errorTarget)(nil))
	state.Register((*userChainTarget)(nil))
	state.Register((*returnTarget)(nil))
	state.Register((*redirectTarget)(nil))
	state.Register((*standardTargetMaker)(nil))
	state.Register((*errorTargetMaker)(nil))
	state.Register((*redirectTargetMaker)(nil))
	state.Register((*nfNATTargetMaker)(nil))
	state.Register((*JumpTarget)(nil))
}
