github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/abi/linux/linux_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package linux
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (i *IOEvent) StateTypeName() string {
    10  	return "pkg/abi/linux.IOEvent"
    11  }
    12  
    13  func (i *IOEvent) StateFields() []string {
    14  	return []string{
    15  		"Data",
    16  		"Obj",
    17  		"Result",
    18  		"Result2",
    19  	}
    20  }
    21  
    22  func (i *IOEvent) beforeSave() {}
    23  
    24  // +checklocksignore
    25  func (i *IOEvent) StateSave(stateSinkObject state.Sink) {
    26  	i.beforeSave()
    27  	stateSinkObject.Save(0, &i.Data)
    28  	stateSinkObject.Save(1, &i.Obj)
    29  	stateSinkObject.Save(2, &i.Result)
    30  	stateSinkObject.Save(3, &i.Result2)
    31  }
    32  
    33  func (i *IOEvent) afterLoad() {}
    34  
    35  // +checklocksignore
    36  func (i *IOEvent) StateLoad(stateSourceObject state.Source) {
    37  	stateSourceObject.Load(0, &i.Data)
    38  	stateSourceObject.Load(1, &i.Obj)
    39  	stateSourceObject.Load(2, &i.Result)
    40  	stateSourceObject.Load(3, &i.Result2)
    41  }
    42  
    43  func (b *BPFInstruction) StateTypeName() string {
    44  	return "pkg/abi/linux.BPFInstruction"
    45  }
    46  
    47  func (b *BPFInstruction) StateFields() []string {
    48  	return []string{
    49  		"OpCode",
    50  		"JumpIfTrue",
    51  		"JumpIfFalse",
    52  		"K",
    53  	}
    54  }
    55  
    56  func (b *BPFInstruction) beforeSave() {}
    57  
    58  // +checklocksignore
    59  func (b *BPFInstruction) StateSave(stateSinkObject state.Sink) {
    60  	b.beforeSave()
    61  	stateSinkObject.Save(0, &b.OpCode)
    62  	stateSinkObject.Save(1, &b.JumpIfTrue)
    63  	stateSinkObject.Save(2, &b.JumpIfFalse)
    64  	stateSinkObject.Save(3, &b.K)
    65  }
    66  
    67  func (b *BPFInstruction) afterLoad() {}
    68  
    69  // +checklocksignore
    70  func (b *BPFInstruction) StateLoad(stateSourceObject state.Source) {
    71  	stateSourceObject.Load(0, &b.OpCode)
    72  	stateSourceObject.Load(1, &b.JumpIfTrue)
    73  	stateSourceObject.Load(2, &b.JumpIfFalse)
    74  	stateSourceObject.Load(3, &b.K)
    75  }
    76  
    77  func (i *IOUringCqe) StateTypeName() string {
    78  	return "pkg/abi/linux.IOUringCqe"
    79  }
    80  
    81  func (i *IOUringCqe) StateFields() []string {
    82  	return []string{
    83  		"UserData",
    84  		"Res",
    85  		"Flags",
    86  	}
    87  }
    88  
    89  func (i *IOUringCqe) beforeSave() {}
    90  
    91  // +checklocksignore
    92  func (i *IOUringCqe) StateSave(stateSinkObject state.Sink) {
    93  	i.beforeSave()
    94  	stateSinkObject.Save(0, &i.UserData)
    95  	stateSinkObject.Save(1, &i.Res)
    96  	stateSinkObject.Save(2, &i.Flags)
    97  }
    98  
    99  func (i *IOUringCqe) afterLoad() {}
   100  
   101  // +checklocksignore
   102  func (i *IOUringCqe) StateLoad(stateSourceObject state.Source) {
   103  	stateSourceObject.Load(0, &i.UserData)
   104  	stateSourceObject.Load(1, &i.Res)
   105  	stateSourceObject.Load(2, &i.Flags)
   106  }
   107  
   108  func (i *IOUring) StateTypeName() string {
   109  	return "pkg/abi/linux.IOUring"
   110  }
   111  
   112  func (i *IOUring) StateFields() []string {
   113  	return []string{
   114  		"Head",
   115  		"Tail",
   116  	}
   117  }
   118  
   119  func (i *IOUring) beforeSave() {}
   120  
   121  // +checklocksignore
   122  func (i *IOUring) StateSave(stateSinkObject state.Sink) {
   123  	i.beforeSave()
   124  	stateSinkObject.Save(0, &i.Head)
   125  	stateSinkObject.Save(1, &i.Tail)
   126  }
   127  
   128  func (i *IOUring) afterLoad() {}
   129  
   130  // +checklocksignore
   131  func (i *IOUring) StateLoad(stateSourceObject state.Source) {
   132  	stateSourceObject.Load(0, &i.Head)
   133  	stateSourceObject.Load(1, &i.Tail)
   134  }
   135  
   136  func (i *IORings) StateTypeName() string {
   137  	return "pkg/abi/linux.IORings"
   138  }
   139  
   140  func (i *IORings) StateFields() []string {
   141  	return []string{
   142  		"Sq",
   143  		"Cq",
   144  		"SqRingMask",
   145  		"CqRingMask",
   146  		"SqRingEntries",
   147  		"CqRingEntries",
   148  		"sqDropped",
   149  		"sqFlags",
   150  		"cqFlags",
   151  		"CqOverflow",
   152  	}
   153  }
   154  
   155  func (i *IORings) beforeSave() {}
   156  
   157  // +checklocksignore
   158  func (i *IORings) StateSave(stateSinkObject state.Sink) {
   159  	i.beforeSave()
   160  	stateSinkObject.Save(0, &i.Sq)
   161  	stateSinkObject.Save(1, &i.Cq)
   162  	stateSinkObject.Save(2, &i.SqRingMask)
   163  	stateSinkObject.Save(3, &i.CqRingMask)
   164  	stateSinkObject.Save(4, &i.SqRingEntries)
   165  	stateSinkObject.Save(5, &i.CqRingEntries)
   166  	stateSinkObject.Save(6, &i.sqDropped)
   167  	stateSinkObject.Save(7, &i.sqFlags)
   168  	stateSinkObject.Save(8, &i.cqFlags)
   169  	stateSinkObject.Save(9, &i.CqOverflow)
   170  }
   171  
   172  func (i *IORings) afterLoad() {}
   173  
   174  // +checklocksignore
   175  func (i *IORings) StateLoad(stateSourceObject state.Source) {
   176  	stateSourceObject.Load(0, &i.Sq)
   177  	stateSourceObject.Load(1, &i.Cq)
   178  	stateSourceObject.Load(2, &i.SqRingMask)
   179  	stateSourceObject.Load(3, &i.CqRingMask)
   180  	stateSourceObject.Load(4, &i.SqRingEntries)
   181  	stateSourceObject.Load(5, &i.CqRingEntries)
   182  	stateSourceObject.Load(6, &i.sqDropped)
   183  	stateSourceObject.Load(7, &i.sqFlags)
   184  	stateSourceObject.Load(8, &i.cqFlags)
   185  	stateSourceObject.Load(9, &i.CqOverflow)
   186  }
   187  
   188  func (i *IOUringSqe) StateTypeName() string {
   189  	return "pkg/abi/linux.IOUringSqe"
   190  }
   191  
   192  func (i *IOUringSqe) StateFields() []string {
   193  	return []string{
   194  		"Opcode",
   195  		"Flags",
   196  		"IoPrio",
   197  		"Fd",
   198  		"OffOrAddrOrCmdOp",
   199  		"AddrOrSpliceOff",
   200  		"Len",
   201  		"specialFlags",
   202  		"UserData",
   203  		"BufIndexOrGroup",
   204  		"personality",
   205  		"spliceFDOrFileIndex",
   206  		"addr3",
   207  	}
   208  }
   209  
   210  func (i *IOUringSqe) beforeSave() {}
   211  
   212  // +checklocksignore
   213  func (i *IOUringSqe) StateSave(stateSinkObject state.Sink) {
   214  	i.beforeSave()
   215  	stateSinkObject.Save(0, &i.Opcode)
   216  	stateSinkObject.Save(1, &i.Flags)
   217  	stateSinkObject.Save(2, &i.IoPrio)
   218  	stateSinkObject.Save(3, &i.Fd)
   219  	stateSinkObject.Save(4, &i.OffOrAddrOrCmdOp)
   220  	stateSinkObject.Save(5, &i.AddrOrSpliceOff)
   221  	stateSinkObject.Save(6, &i.Len)
   222  	stateSinkObject.Save(7, &i.specialFlags)
   223  	stateSinkObject.Save(8, &i.UserData)
   224  	stateSinkObject.Save(9, &i.BufIndexOrGroup)
   225  	stateSinkObject.Save(10, &i.personality)
   226  	stateSinkObject.Save(11, &i.spliceFDOrFileIndex)
   227  	stateSinkObject.Save(12, &i.addr3)
   228  }
   229  
   230  func (i *IOUringSqe) afterLoad() {}
   231  
   232  // +checklocksignore
   233  func (i *IOUringSqe) StateLoad(stateSourceObject state.Source) {
   234  	stateSourceObject.Load(0, &i.Opcode)
   235  	stateSourceObject.Load(1, &i.Flags)
   236  	stateSourceObject.Load(2, &i.IoPrio)
   237  	stateSourceObject.Load(3, &i.Fd)
   238  	stateSourceObject.Load(4, &i.OffOrAddrOrCmdOp)
   239  	stateSourceObject.Load(5, &i.AddrOrSpliceOff)
   240  	stateSourceObject.Load(6, &i.Len)
   241  	stateSourceObject.Load(7, &i.specialFlags)
   242  	stateSourceObject.Load(8, &i.UserData)
   243  	stateSourceObject.Load(9, &i.BufIndexOrGroup)
   244  	stateSourceObject.Load(10, &i.personality)
   245  	stateSourceObject.Load(11, &i.spliceFDOrFileIndex)
   246  	stateSourceObject.Load(12, &i.addr3)
   247  }
   248  
   249  func (s *SigAction) StateTypeName() string {
   250  	return "pkg/abi/linux.SigAction"
   251  }
   252  
   253  func (s *SigAction) StateFields() []string {
   254  	return []string{
   255  		"Handler",
   256  		"Flags",
   257  		"Restorer",
   258  		"Mask",
   259  	}
   260  }
   261  
   262  func (s *SigAction) beforeSave() {}
   263  
   264  // +checklocksignore
   265  func (s *SigAction) StateSave(stateSinkObject state.Sink) {
   266  	s.beforeSave()
   267  	stateSinkObject.Save(0, &s.Handler)
   268  	stateSinkObject.Save(1, &s.Flags)
   269  	stateSinkObject.Save(2, &s.Restorer)
   270  	stateSinkObject.Save(3, &s.Mask)
   271  }
   272  
   273  func (s *SigAction) afterLoad() {}
   274  
   275  // +checklocksignore
   276  func (s *SigAction) StateLoad(stateSourceObject state.Source) {
   277  	stateSourceObject.Load(0, &s.Handler)
   278  	stateSourceObject.Load(1, &s.Flags)
   279  	stateSourceObject.Load(2, &s.Restorer)
   280  	stateSourceObject.Load(3, &s.Mask)
   281  }
   282  
   283  func (s *SignalStack) StateTypeName() string {
   284  	return "pkg/abi/linux.SignalStack"
   285  }
   286  
   287  func (s *SignalStack) StateFields() []string {
   288  	return []string{
   289  		"Addr",
   290  		"Flags",
   291  		"Size",
   292  	}
   293  }
   294  
   295  func (s *SignalStack) beforeSave() {}
   296  
   297  // +checklocksignore
   298  func (s *SignalStack) StateSave(stateSinkObject state.Sink) {
   299  	s.beforeSave()
   300  	stateSinkObject.Save(0, &s.Addr)
   301  	stateSinkObject.Save(1, &s.Flags)
   302  	stateSinkObject.Save(2, &s.Size)
   303  }
   304  
   305  func (s *SignalStack) afterLoad() {}
   306  
   307  // +checklocksignore
   308  func (s *SignalStack) StateLoad(stateSourceObject state.Source) {
   309  	stateSourceObject.Load(0, &s.Addr)
   310  	stateSourceObject.Load(1, &s.Flags)
   311  	stateSourceObject.Load(2, &s.Size)
   312  }
   313  
   314  func (s *SignalInfo) StateTypeName() string {
   315  	return "pkg/abi/linux.SignalInfo"
   316  }
   317  
   318  func (s *SignalInfo) StateFields() []string {
   319  	return []string{
   320  		"Signo",
   321  		"Errno",
   322  		"Code",
   323  		"Fields",
   324  	}
   325  }
   326  
   327  func (s *SignalInfo) beforeSave() {}
   328  
   329  // +checklocksignore
   330  func (s *SignalInfo) StateSave(stateSinkObject state.Sink) {
   331  	s.beforeSave()
   332  	stateSinkObject.Save(0, &s.Signo)
   333  	stateSinkObject.Save(1, &s.Errno)
   334  	stateSinkObject.Save(2, &s.Code)
   335  	stateSinkObject.Save(3, &s.Fields)
   336  }
   337  
   338  func (s *SignalInfo) afterLoad() {}
   339  
   340  // +checklocksignore
   341  func (s *SignalInfo) StateLoad(stateSourceObject state.Source) {
   342  	stateSourceObject.Load(0, &s.Signo)
   343  	stateSourceObject.Load(1, &s.Errno)
   344  	stateSourceObject.Load(2, &s.Code)
   345  	stateSourceObject.Load(3, &s.Fields)
   346  }
   347  
   348  func (c *ControlMessageIPPacketInfo) StateTypeName() string {
   349  	return "pkg/abi/linux.ControlMessageIPPacketInfo"
   350  }
   351  
   352  func (c *ControlMessageIPPacketInfo) StateFields() []string {
   353  	return []string{
   354  		"NIC",
   355  		"LocalAddr",
   356  		"DestinationAddr",
   357  	}
   358  }
   359  
   360  func (c *ControlMessageIPPacketInfo) beforeSave() {}
   361  
   362  // +checklocksignore
   363  func (c *ControlMessageIPPacketInfo) StateSave(stateSinkObject state.Sink) {
   364  	c.beforeSave()
   365  	stateSinkObject.Save(0, &c.NIC)
   366  	stateSinkObject.Save(1, &c.LocalAddr)
   367  	stateSinkObject.Save(2, &c.DestinationAddr)
   368  }
   369  
   370  func (c *ControlMessageIPPacketInfo) afterLoad() {}
   371  
   372  // +checklocksignore
   373  func (c *ControlMessageIPPacketInfo) StateLoad(stateSourceObject state.Source) {
   374  	stateSourceObject.Load(0, &c.NIC)
   375  	stateSourceObject.Load(1, &c.LocalAddr)
   376  	stateSourceObject.Load(2, &c.DestinationAddr)
   377  }
   378  
   379  func (c *ControlMessageIPv6PacketInfo) StateTypeName() string {
   380  	return "pkg/abi/linux.ControlMessageIPv6PacketInfo"
   381  }
   382  
   383  func (c *ControlMessageIPv6PacketInfo) StateFields() []string {
   384  	return []string{
   385  		"Addr",
   386  		"NIC",
   387  	}
   388  }
   389  
   390  func (c *ControlMessageIPv6PacketInfo) beforeSave() {}
   391  
   392  // +checklocksignore
   393  func (c *ControlMessageIPv6PacketInfo) StateSave(stateSinkObject state.Sink) {
   394  	c.beforeSave()
   395  	stateSinkObject.Save(0, &c.Addr)
   396  	stateSinkObject.Save(1, &c.NIC)
   397  }
   398  
   399  func (c *ControlMessageIPv6PacketInfo) afterLoad() {}
   400  
   401  // +checklocksignore
   402  func (c *ControlMessageIPv6PacketInfo) StateLoad(stateSourceObject state.Source) {
   403  	stateSourceObject.Load(0, &c.Addr)
   404  	stateSourceObject.Load(1, &c.NIC)
   405  }
   406  
   407  func (i *ICMP6Filter) StateTypeName() string {
   408  	return "pkg/abi/linux.ICMP6Filter"
   409  }
   410  
   411  func (i *ICMP6Filter) StateFields() []string {
   412  	return []string{
   413  		"Filter",
   414  	}
   415  }
   416  
   417  func (i *ICMP6Filter) beforeSave() {}
   418  
   419  // +checklocksignore
   420  func (i *ICMP6Filter) StateSave(stateSinkObject state.Sink) {
   421  	i.beforeSave()
   422  	stateSinkObject.Save(0, &i.Filter)
   423  }
   424  
   425  func (i *ICMP6Filter) afterLoad() {}
   426  
   427  // +checklocksignore
   428  func (i *ICMP6Filter) StateLoad(stateSourceObject state.Source) {
   429  	stateSourceObject.Load(0, &i.Filter)
   430  }
   431  
   432  func (t *KernelTermios) StateTypeName() string {
   433  	return "pkg/abi/linux.KernelTermios"
   434  }
   435  
   436  func (t *KernelTermios) StateFields() []string {
   437  	return []string{
   438  		"InputFlags",
   439  		"OutputFlags",
   440  		"ControlFlags",
   441  		"LocalFlags",
   442  		"LineDiscipline",
   443  		"ControlCharacters",
   444  		"InputSpeed",
   445  		"OutputSpeed",
   446  	}
   447  }
   448  
   449  func (t *KernelTermios) beforeSave() {}
   450  
   451  // +checklocksignore
   452  func (t *KernelTermios) StateSave(stateSinkObject state.Sink) {
   453  	t.beforeSave()
   454  	stateSinkObject.Save(0, &t.InputFlags)
   455  	stateSinkObject.Save(1, &t.OutputFlags)
   456  	stateSinkObject.Save(2, &t.ControlFlags)
   457  	stateSinkObject.Save(3, &t.LocalFlags)
   458  	stateSinkObject.Save(4, &t.LineDiscipline)
   459  	stateSinkObject.Save(5, &t.ControlCharacters)
   460  	stateSinkObject.Save(6, &t.InputSpeed)
   461  	stateSinkObject.Save(7, &t.OutputSpeed)
   462  }
   463  
   464  func (t *KernelTermios) afterLoad() {}
   465  
   466  // +checklocksignore
   467  func (t *KernelTermios) StateLoad(stateSourceObject state.Source) {
   468  	stateSourceObject.Load(0, &t.InputFlags)
   469  	stateSourceObject.Load(1, &t.OutputFlags)
   470  	stateSourceObject.Load(2, &t.ControlFlags)
   471  	stateSourceObject.Load(3, &t.LocalFlags)
   472  	stateSourceObject.Load(4, &t.LineDiscipline)
   473  	stateSourceObject.Load(5, &t.ControlCharacters)
   474  	stateSourceObject.Load(6, &t.InputSpeed)
   475  	stateSourceObject.Load(7, &t.OutputSpeed)
   476  }
   477  
   478  func (w *WindowSize) StateTypeName() string {
   479  	return "pkg/abi/linux.WindowSize"
   480  }
   481  
   482  func (w *WindowSize) StateFields() []string {
   483  	return []string{
   484  		"Rows",
   485  		"Cols",
   486  	}
   487  }
   488  
   489  func (w *WindowSize) beforeSave() {}
   490  
   491  // +checklocksignore
   492  func (w *WindowSize) StateSave(stateSinkObject state.Sink) {
   493  	w.beforeSave()
   494  	stateSinkObject.Save(0, &w.Rows)
   495  	stateSinkObject.Save(1, &w.Cols)
   496  }
   497  
   498  func (w *WindowSize) afterLoad() {}
   499  
   500  // +checklocksignore
   501  func (w *WindowSize) StateLoad(stateSourceObject state.Source) {
   502  	stateSourceObject.Load(0, &w.Rows)
   503  	stateSourceObject.Load(1, &w.Cols)
   504  }
   505  
   506  func init() {
   507  	state.Register((*IOEvent)(nil))
   508  	state.Register((*BPFInstruction)(nil))
   509  	state.Register((*IOUringCqe)(nil))
   510  	state.Register((*IOUring)(nil))
   511  	state.Register((*IORings)(nil))
   512  	state.Register((*IOUringSqe)(nil))
   513  	state.Register((*SigAction)(nil))
   514  	state.Register((*SignalStack)(nil))
   515  	state.Register((*SignalInfo)(nil))
   516  	state.Register((*ControlMessageIPPacketInfo)(nil))
   517  	state.Register((*ControlMessageIPv6PacketInfo)(nil))
   518  	state.Register((*ICMP6Filter)(nil))
   519  	state.Register((*KernelTermios)(nil))
   520  	state.Register((*WindowSize)(nil))
   521  }