github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/bpf/bpf_state_autogen.go (about)

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