github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/socket/netlink/port/port_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package port
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (m *Manager) StateTypeName() string {
    10  	return "pkg/sentry/socket/netlink/port.Manager"
    11  }
    12  
    13  func (m *Manager) StateFields() []string {
    14  	return []string{
    15  		"ports",
    16  	}
    17  }
    18  
    19  func (m *Manager) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (m *Manager) StateSave(stateSinkObject state.Sink) {
    23  	m.beforeSave()
    24  	stateSinkObject.Save(0, &m.ports)
    25  }
    26  
    27  func (m *Manager) afterLoad() {}
    28  
    29  // +checklocksignore
    30  func (m *Manager) StateLoad(stateSourceObject state.Source) {
    31  	stateSourceObject.Load(0, &m.ports)
    32  }
    33  
    34  func init() {
    35  	state.Register((*Manager)(nil))
    36  }