// automatically generated by stateify. package netlink import ( "gvisor.dev/gvisor/pkg/state" ) func (s *Socket) StateTypeName() string { return "pkg/sentry/socket/netlink.Socket" } func (s *Socket) StateFields() []string { return []string{ "socketOpsCommon", } } func (s *Socket) beforeSave() {} func (s *Socket) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.socketOpsCommon) } func (s *Socket) afterLoad() {} func (s *Socket) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.socketOpsCommon) } func (s *socketOpsCommon) StateTypeName() string { return "pkg/sentry/socket/netlink.socketOpsCommon" } func (s *socketOpsCommon) StateFields() []string { return []string{ "SendReceiveTimeout", "ports", "protocol", "skType", "ep", "connection", "bound", "portID", "sendBufferSize", "filter", } } func (s *socketOpsCommon) beforeSave() {} func (s *socketOpsCommon) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.SendReceiveTimeout) stateSinkObject.Save(1, &s.ports) stateSinkObject.Save(2, &s.protocol) stateSinkObject.Save(3, &s.skType) stateSinkObject.Save(4, &s.ep) stateSinkObject.Save(5, &s.connection) stateSinkObject.Save(6, &s.bound) stateSinkObject.Save(7, &s.portID) stateSinkObject.Save(8, &s.sendBufferSize) stateSinkObject.Save(9, &s.filter) } func (s *socketOpsCommon) afterLoad() {} func (s *socketOpsCommon) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.SendReceiveTimeout) stateSourceObject.Load(1, &s.ports) stateSourceObject.Load(2, &s.protocol) stateSourceObject.Load(3, &s.skType) stateSourceObject.Load(4, &s.ep) stateSourceObject.Load(5, &s.connection) stateSourceObject.Load(6, &s.bound) stateSourceObject.Load(7, &s.portID) stateSourceObject.Load(8, &s.sendBufferSize) stateSourceObject.Load(9, &s.filter) } func (k *kernelSCM) StateTypeName() string { return "pkg/sentry/socket/netlink.kernelSCM" } func (k *kernelSCM) StateFields() []string { return []string{} } func (k *kernelSCM) beforeSave() {} func (k *kernelSCM) StateSave(stateSinkObject state.Sink) { k.beforeSave() } func (k *kernelSCM) afterLoad() {} func (k *kernelSCM) StateLoad(stateSourceObject state.Source) { } func (s *SocketVFS2) StateTypeName() string { return "pkg/sentry/socket/netlink.SocketVFS2" } func (s *SocketVFS2) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", "DentryMetadataFileDescriptionImpl", "LockFD", "socketOpsCommon", } } func (s *SocketVFS2) beforeSave() {} func (s *SocketVFS2) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.vfsfd) stateSinkObject.Save(1, &s.FileDescriptionDefaultImpl) stateSinkObject.Save(2, &s.DentryMetadataFileDescriptionImpl) stateSinkObject.Save(3, &s.LockFD) stateSinkObject.Save(4, &s.socketOpsCommon) } func (s *SocketVFS2) afterLoad() {} func (s *SocketVFS2) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.vfsfd) stateSourceObject.Load(1, &s.FileDescriptionDefaultImpl) stateSourceObject.Load(2, &s.DentryMetadataFileDescriptionImpl) stateSourceObject.Load(3, &s.LockFD) stateSourceObject.Load(4, &s.socketOpsCommon) } func init() { state.Register((*Socket)(nil)) state.Register((*socketOpsCommon)(nil)) state.Register((*kernelSCM)(nil)) state.Register((*SocketVFS2)(nil)) }