github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/socket/netlink/netlink_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package netlink 4 5 import ( 6 "github.com/nicocha30/gvisor-ligolo/pkg/state" 7 ) 8 9 func (s *Socket) StateTypeName() string { 10 return "pkg/sentry/socket/netlink.Socket" 11 } 12 13 func (s *Socket) StateFields() []string { 14 return []string{ 15 "vfsfd", 16 "FileDescriptionDefaultImpl", 17 "DentryMetadataFileDescriptionImpl", 18 "LockFD", 19 "SendReceiveTimeout", 20 "ports", 21 "protocol", 22 "skType", 23 "ep", 24 "connection", 25 "bound", 26 "portID", 27 "sendBufferSize", 28 "filter", 29 } 30 } 31 32 func (s *Socket) beforeSave() {} 33 34 // +checklocksignore 35 func (s *Socket) StateSave(stateSinkObject state.Sink) { 36 s.beforeSave() 37 stateSinkObject.Save(0, &s.vfsfd) 38 stateSinkObject.Save(1, &s.FileDescriptionDefaultImpl) 39 stateSinkObject.Save(2, &s.DentryMetadataFileDescriptionImpl) 40 stateSinkObject.Save(3, &s.LockFD) 41 stateSinkObject.Save(4, &s.SendReceiveTimeout) 42 stateSinkObject.Save(5, &s.ports) 43 stateSinkObject.Save(6, &s.protocol) 44 stateSinkObject.Save(7, &s.skType) 45 stateSinkObject.Save(8, &s.ep) 46 stateSinkObject.Save(9, &s.connection) 47 stateSinkObject.Save(10, &s.bound) 48 stateSinkObject.Save(11, &s.portID) 49 stateSinkObject.Save(12, &s.sendBufferSize) 50 stateSinkObject.Save(13, &s.filter) 51 } 52 53 func (s *Socket) afterLoad() {} 54 55 // +checklocksignore 56 func (s *Socket) StateLoad(stateSourceObject state.Source) { 57 stateSourceObject.Load(0, &s.vfsfd) 58 stateSourceObject.Load(1, &s.FileDescriptionDefaultImpl) 59 stateSourceObject.Load(2, &s.DentryMetadataFileDescriptionImpl) 60 stateSourceObject.Load(3, &s.LockFD) 61 stateSourceObject.Load(4, &s.SendReceiveTimeout) 62 stateSourceObject.Load(5, &s.ports) 63 stateSourceObject.Load(6, &s.protocol) 64 stateSourceObject.Load(7, &s.skType) 65 stateSourceObject.Load(8, &s.ep) 66 stateSourceObject.Load(9, &s.connection) 67 stateSourceObject.Load(10, &s.bound) 68 stateSourceObject.Load(11, &s.portID) 69 stateSourceObject.Load(12, &s.sendBufferSize) 70 stateSourceObject.Load(13, &s.filter) 71 } 72 73 func (k *kernelSCM) StateTypeName() string { 74 return "pkg/sentry/socket/netlink.kernelSCM" 75 } 76 77 func (k *kernelSCM) StateFields() []string { 78 return []string{} 79 } 80 81 func (k *kernelSCM) beforeSave() {} 82 83 // +checklocksignore 84 func (k *kernelSCM) StateSave(stateSinkObject state.Sink) { 85 k.beforeSave() 86 } 87 88 func (k *kernelSCM) afterLoad() {} 89 90 // +checklocksignore 91 func (k *kernelSCM) StateLoad(stateSourceObject state.Source) { 92 } 93 94 func init() { 95 state.Register((*Socket)(nil)) 96 state.Register((*kernelSCM)(nil)) 97 }