github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/tcpip/stack/stack_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package stack
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/metacubex/gvisor/pkg/state"
     9  )
    10  
    11  func (r *addressStateRefs) StateTypeName() string {
    12  	return "pkg/tcpip/stack.addressStateRefs"
    13  }
    14  
    15  func (r *addressStateRefs) StateFields() []string {
    16  	return []string{
    17  		"refCount",
    18  	}
    19  }
    20  
    21  func (r *addressStateRefs) beforeSave() {}
    22  
    23  // +checklocksignore
    24  func (r *addressStateRefs) StateSave(stateSinkObject state.Sink) {
    25  	r.beforeSave()
    26  	stateSinkObject.Save(0, &r.refCount)
    27  }
    28  
    29  // +checklocksignore
    30  func (r *addressStateRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    31  	stateSourceObject.Load(0, &r.refCount)
    32  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
    33  }
    34  
    35  func (t *tuple) StateTypeName() string {
    36  	return "pkg/tcpip/stack.tuple"
    37  }
    38  
    39  func (t *tuple) StateFields() []string {
    40  	return []string{
    41  		"tupleEntry",
    42  		"conn",
    43  		"reply",
    44  		"tupleID",
    45  	}
    46  }
    47  
    48  func (t *tuple) beforeSave() {}
    49  
    50  // +checklocksignore
    51  func (t *tuple) StateSave(stateSinkObject state.Sink) {
    52  	t.beforeSave()
    53  	stateSinkObject.Save(0, &t.tupleEntry)
    54  	stateSinkObject.Save(1, &t.conn)
    55  	stateSinkObject.Save(2, &t.reply)
    56  	stateSinkObject.Save(3, &t.tupleID)
    57  }
    58  
    59  func (t *tuple) afterLoad(context.Context) {}
    60  
    61  // +checklocksignore
    62  func (t *tuple) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    63  	stateSourceObject.Load(0, &t.tupleEntry)
    64  	stateSourceObject.Load(1, &t.conn)
    65  	stateSourceObject.Load(2, &t.reply)
    66  	stateSourceObject.Load(3, &t.tupleID)
    67  }
    68  
    69  func (ti *tupleID) StateTypeName() string {
    70  	return "pkg/tcpip/stack.tupleID"
    71  }
    72  
    73  func (ti *tupleID) StateFields() []string {
    74  	return []string{
    75  		"srcAddr",
    76  		"srcPortOrEchoRequestIdent",
    77  		"dstAddr",
    78  		"dstPortOrEchoReplyIdent",
    79  		"transProto",
    80  		"netProto",
    81  	}
    82  }
    83  
    84  func (ti *tupleID) beforeSave() {}
    85  
    86  // +checklocksignore
    87  func (ti *tupleID) StateSave(stateSinkObject state.Sink) {
    88  	ti.beforeSave()
    89  	stateSinkObject.Save(0, &ti.srcAddr)
    90  	stateSinkObject.Save(1, &ti.srcPortOrEchoRequestIdent)
    91  	stateSinkObject.Save(2, &ti.dstAddr)
    92  	stateSinkObject.Save(3, &ti.dstPortOrEchoReplyIdent)
    93  	stateSinkObject.Save(4, &ti.transProto)
    94  	stateSinkObject.Save(5, &ti.netProto)
    95  }
    96  
    97  func (ti *tupleID) afterLoad(context.Context) {}
    98  
    99  // +checklocksignore
   100  func (ti *tupleID) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   101  	stateSourceObject.Load(0, &ti.srcAddr)
   102  	stateSourceObject.Load(1, &ti.srcPortOrEchoRequestIdent)
   103  	stateSourceObject.Load(2, &ti.dstAddr)
   104  	stateSourceObject.Load(3, &ti.dstPortOrEchoReplyIdent)
   105  	stateSourceObject.Load(4, &ti.transProto)
   106  	stateSourceObject.Load(5, &ti.netProto)
   107  }
   108  
   109  func (cn *conn) StateTypeName() string {
   110  	return "pkg/tcpip/stack.conn"
   111  }
   112  
   113  func (cn *conn) StateFields() []string {
   114  	return []string{
   115  		"ct",
   116  		"original",
   117  		"reply",
   118  		"finalizeOnce",
   119  		"finalizeResult",
   120  		"sourceManip",
   121  		"destinationManip",
   122  		"tcb",
   123  		"lastUsed",
   124  	}
   125  }
   126  
   127  func (cn *conn) beforeSave() {}
   128  
   129  // +checklocksignore
   130  func (cn *conn) StateSave(stateSinkObject state.Sink) {
   131  	cn.beforeSave()
   132  	stateSinkObject.Save(0, &cn.ct)
   133  	stateSinkObject.Save(1, &cn.original)
   134  	stateSinkObject.Save(2, &cn.reply)
   135  	stateSinkObject.Save(3, &cn.finalizeOnce)
   136  	stateSinkObject.Save(4, &cn.finalizeResult)
   137  	stateSinkObject.Save(5, &cn.sourceManip)
   138  	stateSinkObject.Save(6, &cn.destinationManip)
   139  	stateSinkObject.Save(7, &cn.tcb)
   140  	stateSinkObject.Save(8, &cn.lastUsed)
   141  }
   142  
   143  func (cn *conn) afterLoad(context.Context) {}
   144  
   145  // +checklocksignore
   146  func (cn *conn) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   147  	stateSourceObject.Load(0, &cn.ct)
   148  	stateSourceObject.Load(1, &cn.original)
   149  	stateSourceObject.Load(2, &cn.reply)
   150  	stateSourceObject.Load(3, &cn.finalizeOnce)
   151  	stateSourceObject.Load(4, &cn.finalizeResult)
   152  	stateSourceObject.Load(5, &cn.sourceManip)
   153  	stateSourceObject.Load(6, &cn.destinationManip)
   154  	stateSourceObject.Load(7, &cn.tcb)
   155  	stateSourceObject.Load(8, &cn.lastUsed)
   156  }
   157  
   158  func (ct *ConnTrack) StateTypeName() string {
   159  	return "pkg/tcpip/stack.ConnTrack"
   160  }
   161  
   162  func (ct *ConnTrack) StateFields() []string {
   163  	return []string{
   164  		"seed",
   165  		"clock",
   166  		"rand",
   167  		"buckets",
   168  	}
   169  }
   170  
   171  func (ct *ConnTrack) beforeSave() {}
   172  
   173  // +checklocksignore
   174  func (ct *ConnTrack) StateSave(stateSinkObject state.Sink) {
   175  	ct.beforeSave()
   176  	stateSinkObject.Save(0, &ct.seed)
   177  	stateSinkObject.Save(1, &ct.clock)
   178  	stateSinkObject.Save(2, &ct.rand)
   179  	stateSinkObject.Save(3, &ct.buckets)
   180  }
   181  
   182  func (ct *ConnTrack) afterLoad(context.Context) {}
   183  
   184  // +checklocksignore
   185  func (ct *ConnTrack) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   186  	stateSourceObject.Load(0, &ct.seed)
   187  	stateSourceObject.Load(1, &ct.clock)
   188  	stateSourceObject.Load(2, &ct.rand)
   189  	stateSourceObject.Load(3, &ct.buckets)
   190  }
   191  
   192  func (bkt *bucket) StateTypeName() string {
   193  	return "pkg/tcpip/stack.bucket"
   194  }
   195  
   196  func (bkt *bucket) StateFields() []string {
   197  	return []string{
   198  		"tuples",
   199  	}
   200  }
   201  
   202  func (bkt *bucket) beforeSave() {}
   203  
   204  // +checklocksignore
   205  func (bkt *bucket) StateSave(stateSinkObject state.Sink) {
   206  	bkt.beforeSave()
   207  	stateSinkObject.Save(0, &bkt.tuples)
   208  }
   209  
   210  func (bkt *bucket) afterLoad(context.Context) {}
   211  
   212  // +checklocksignore
   213  func (bkt *bucket) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   214  	stateSourceObject.Load(0, &bkt.tuples)
   215  }
   216  
   217  func (l *groPacketList) StateTypeName() string {
   218  	return "pkg/tcpip/stack.groPacketList"
   219  }
   220  
   221  func (l *groPacketList) StateFields() []string {
   222  	return []string{
   223  		"head",
   224  		"tail",
   225  	}
   226  }
   227  
   228  func (l *groPacketList) beforeSave() {}
   229  
   230  // +checklocksignore
   231  func (l *groPacketList) StateSave(stateSinkObject state.Sink) {
   232  	l.beforeSave()
   233  	stateSinkObject.Save(0, &l.head)
   234  	stateSinkObject.Save(1, &l.tail)
   235  }
   236  
   237  func (l *groPacketList) afterLoad(context.Context) {}
   238  
   239  // +checklocksignore
   240  func (l *groPacketList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   241  	stateSourceObject.Load(0, &l.head)
   242  	stateSourceObject.Load(1, &l.tail)
   243  }
   244  
   245  func (e *groPacketEntry) StateTypeName() string {
   246  	return "pkg/tcpip/stack.groPacketEntry"
   247  }
   248  
   249  func (e *groPacketEntry) StateFields() []string {
   250  	return []string{
   251  		"next",
   252  		"prev",
   253  	}
   254  }
   255  
   256  func (e *groPacketEntry) beforeSave() {}
   257  
   258  // +checklocksignore
   259  func (e *groPacketEntry) StateSave(stateSinkObject state.Sink) {
   260  	e.beforeSave()
   261  	stateSinkObject.Save(0, &e.next)
   262  	stateSinkObject.Save(1, &e.prev)
   263  }
   264  
   265  func (e *groPacketEntry) afterLoad(context.Context) {}
   266  
   267  // +checklocksignore
   268  func (e *groPacketEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   269  	stateSourceObject.Load(0, &e.next)
   270  	stateSourceObject.Load(1, &e.prev)
   271  }
   272  
   273  func (it *IPTables) StateTypeName() string {
   274  	return "pkg/tcpip/stack.IPTables"
   275  }
   276  
   277  func (it *IPTables) StateFields() []string {
   278  	return []string{
   279  		"connections",
   280  		"reaper",
   281  		"mu",
   282  		"v4Tables",
   283  		"v6Tables",
   284  		"modified",
   285  	}
   286  }
   287  
   288  // +checklocksignore
   289  func (it *IPTables) StateSave(stateSinkObject state.Sink) {
   290  	it.beforeSave()
   291  	stateSinkObject.Save(0, &it.connections)
   292  	stateSinkObject.Save(1, &it.reaper)
   293  	stateSinkObject.Save(2, &it.mu)
   294  	stateSinkObject.Save(3, &it.v4Tables)
   295  	stateSinkObject.Save(4, &it.v6Tables)
   296  	stateSinkObject.Save(5, &it.modified)
   297  }
   298  
   299  // +checklocksignore
   300  func (it *IPTables) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   301  	stateSourceObject.Load(0, &it.connections)
   302  	stateSourceObject.Load(1, &it.reaper)
   303  	stateSourceObject.Load(2, &it.mu)
   304  	stateSourceObject.Load(3, &it.v4Tables)
   305  	stateSourceObject.Load(4, &it.v6Tables)
   306  	stateSourceObject.Load(5, &it.modified)
   307  	stateSourceObject.AfterLoad(func() { it.afterLoad(ctx) })
   308  }
   309  
   310  func (table *Table) StateTypeName() string {
   311  	return "pkg/tcpip/stack.Table"
   312  }
   313  
   314  func (table *Table) StateFields() []string {
   315  	return []string{
   316  		"Rules",
   317  		"BuiltinChains",
   318  		"Underflows",
   319  	}
   320  }
   321  
   322  func (table *Table) beforeSave() {}
   323  
   324  // +checklocksignore
   325  func (table *Table) StateSave(stateSinkObject state.Sink) {
   326  	table.beforeSave()
   327  	stateSinkObject.Save(0, &table.Rules)
   328  	stateSinkObject.Save(1, &table.BuiltinChains)
   329  	stateSinkObject.Save(2, &table.Underflows)
   330  }
   331  
   332  func (table *Table) afterLoad(context.Context) {}
   333  
   334  // +checklocksignore
   335  func (table *Table) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   336  	stateSourceObject.Load(0, &table.Rules)
   337  	stateSourceObject.Load(1, &table.BuiltinChains)
   338  	stateSourceObject.Load(2, &table.Underflows)
   339  }
   340  
   341  func (r *Rule) StateTypeName() string {
   342  	return "pkg/tcpip/stack.Rule"
   343  }
   344  
   345  func (r *Rule) StateFields() []string {
   346  	return []string{
   347  		"Filter",
   348  		"Matchers",
   349  		"Target",
   350  	}
   351  }
   352  
   353  func (r *Rule) beforeSave() {}
   354  
   355  // +checklocksignore
   356  func (r *Rule) StateSave(stateSinkObject state.Sink) {
   357  	r.beforeSave()
   358  	stateSinkObject.Save(0, &r.Filter)
   359  	stateSinkObject.Save(1, &r.Matchers)
   360  	stateSinkObject.Save(2, &r.Target)
   361  }
   362  
   363  func (r *Rule) afterLoad(context.Context) {}
   364  
   365  // +checklocksignore
   366  func (r *Rule) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   367  	stateSourceObject.Load(0, &r.Filter)
   368  	stateSourceObject.Load(1, &r.Matchers)
   369  	stateSourceObject.Load(2, &r.Target)
   370  }
   371  
   372  func (fl *IPHeaderFilter) StateTypeName() string {
   373  	return "pkg/tcpip/stack.IPHeaderFilter"
   374  }
   375  
   376  func (fl *IPHeaderFilter) StateFields() []string {
   377  	return []string{
   378  		"Protocol",
   379  		"CheckProtocol",
   380  		"Dst",
   381  		"DstMask",
   382  		"DstInvert",
   383  		"Src",
   384  		"SrcMask",
   385  		"SrcInvert",
   386  		"InputInterface",
   387  		"InputInterfaceMask",
   388  		"InputInterfaceInvert",
   389  		"OutputInterface",
   390  		"OutputInterfaceMask",
   391  		"OutputInterfaceInvert",
   392  	}
   393  }
   394  
   395  func (fl *IPHeaderFilter) beforeSave() {}
   396  
   397  // +checklocksignore
   398  func (fl *IPHeaderFilter) StateSave(stateSinkObject state.Sink) {
   399  	fl.beforeSave()
   400  	stateSinkObject.Save(0, &fl.Protocol)
   401  	stateSinkObject.Save(1, &fl.CheckProtocol)
   402  	stateSinkObject.Save(2, &fl.Dst)
   403  	stateSinkObject.Save(3, &fl.DstMask)
   404  	stateSinkObject.Save(4, &fl.DstInvert)
   405  	stateSinkObject.Save(5, &fl.Src)
   406  	stateSinkObject.Save(6, &fl.SrcMask)
   407  	stateSinkObject.Save(7, &fl.SrcInvert)
   408  	stateSinkObject.Save(8, &fl.InputInterface)
   409  	stateSinkObject.Save(9, &fl.InputInterfaceMask)
   410  	stateSinkObject.Save(10, &fl.InputInterfaceInvert)
   411  	stateSinkObject.Save(11, &fl.OutputInterface)
   412  	stateSinkObject.Save(12, &fl.OutputInterfaceMask)
   413  	stateSinkObject.Save(13, &fl.OutputInterfaceInvert)
   414  }
   415  
   416  func (fl *IPHeaderFilter) afterLoad(context.Context) {}
   417  
   418  // +checklocksignore
   419  func (fl *IPHeaderFilter) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   420  	stateSourceObject.Load(0, &fl.Protocol)
   421  	stateSourceObject.Load(1, &fl.CheckProtocol)
   422  	stateSourceObject.Load(2, &fl.Dst)
   423  	stateSourceObject.Load(3, &fl.DstMask)
   424  	stateSourceObject.Load(4, &fl.DstInvert)
   425  	stateSourceObject.Load(5, &fl.Src)
   426  	stateSourceObject.Load(6, &fl.SrcMask)
   427  	stateSourceObject.Load(7, &fl.SrcInvert)
   428  	stateSourceObject.Load(8, &fl.InputInterface)
   429  	stateSourceObject.Load(9, &fl.InputInterfaceMask)
   430  	stateSourceObject.Load(10, &fl.InputInterfaceInvert)
   431  	stateSourceObject.Load(11, &fl.OutputInterface)
   432  	stateSourceObject.Load(12, &fl.OutputInterfaceMask)
   433  	stateSourceObject.Load(13, &fl.OutputInterfaceInvert)
   434  }
   435  
   436  func (l *neighborEntryList) StateTypeName() string {
   437  	return "pkg/tcpip/stack.neighborEntryList"
   438  }
   439  
   440  func (l *neighborEntryList) StateFields() []string {
   441  	return []string{
   442  		"head",
   443  		"tail",
   444  	}
   445  }
   446  
   447  func (l *neighborEntryList) beforeSave() {}
   448  
   449  // +checklocksignore
   450  func (l *neighborEntryList) StateSave(stateSinkObject state.Sink) {
   451  	l.beforeSave()
   452  	stateSinkObject.Save(0, &l.head)
   453  	stateSinkObject.Save(1, &l.tail)
   454  }
   455  
   456  func (l *neighborEntryList) afterLoad(context.Context) {}
   457  
   458  // +checklocksignore
   459  func (l *neighborEntryList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   460  	stateSourceObject.Load(0, &l.head)
   461  	stateSourceObject.Load(1, &l.tail)
   462  }
   463  
   464  func (e *neighborEntryEntry) StateTypeName() string {
   465  	return "pkg/tcpip/stack.neighborEntryEntry"
   466  }
   467  
   468  func (e *neighborEntryEntry) StateFields() []string {
   469  	return []string{
   470  		"next",
   471  		"prev",
   472  	}
   473  }
   474  
   475  func (e *neighborEntryEntry) beforeSave() {}
   476  
   477  // +checklocksignore
   478  func (e *neighborEntryEntry) StateSave(stateSinkObject state.Sink) {
   479  	e.beforeSave()
   480  	stateSinkObject.Save(0, &e.next)
   481  	stateSinkObject.Save(1, &e.prev)
   482  }
   483  
   484  func (e *neighborEntryEntry) afterLoad(context.Context) {}
   485  
   486  // +checklocksignore
   487  func (e *neighborEntryEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   488  	stateSourceObject.Load(0, &e.next)
   489  	stateSourceObject.Load(1, &e.prev)
   490  }
   491  
   492  func (pk *PacketBuffer) StateTypeName() string {
   493  	return "pkg/tcpip/stack.PacketBuffer"
   494  }
   495  
   496  func (pk *PacketBuffer) StateFields() []string {
   497  	return []string{
   498  		"packetBufferRefs",
   499  		"buf",
   500  		"reserved",
   501  		"pushed",
   502  		"consumed",
   503  		"headers",
   504  		"NetworkProtocolNumber",
   505  		"TransportProtocolNumber",
   506  		"Hash",
   507  		"Owner",
   508  		"EgressRoute",
   509  		"GSOOptions",
   510  		"snatDone",
   511  		"dnatDone",
   512  		"PktType",
   513  		"NICID",
   514  		"RXChecksumValidated",
   515  		"NetworkPacketInfo",
   516  		"tuple",
   517  	}
   518  }
   519  
   520  func (pk *PacketBuffer) beforeSave() {}
   521  
   522  // +checklocksignore
   523  func (pk *PacketBuffer) StateSave(stateSinkObject state.Sink) {
   524  	pk.beforeSave()
   525  	stateSinkObject.Save(0, &pk.packetBufferRefs)
   526  	stateSinkObject.Save(1, &pk.buf)
   527  	stateSinkObject.Save(2, &pk.reserved)
   528  	stateSinkObject.Save(3, &pk.pushed)
   529  	stateSinkObject.Save(4, &pk.consumed)
   530  	stateSinkObject.Save(5, &pk.headers)
   531  	stateSinkObject.Save(6, &pk.NetworkProtocolNumber)
   532  	stateSinkObject.Save(7, &pk.TransportProtocolNumber)
   533  	stateSinkObject.Save(8, &pk.Hash)
   534  	stateSinkObject.Save(9, &pk.Owner)
   535  	stateSinkObject.Save(10, &pk.EgressRoute)
   536  	stateSinkObject.Save(11, &pk.GSOOptions)
   537  	stateSinkObject.Save(12, &pk.snatDone)
   538  	stateSinkObject.Save(13, &pk.dnatDone)
   539  	stateSinkObject.Save(14, &pk.PktType)
   540  	stateSinkObject.Save(15, &pk.NICID)
   541  	stateSinkObject.Save(16, &pk.RXChecksumValidated)
   542  	stateSinkObject.Save(17, &pk.NetworkPacketInfo)
   543  	stateSinkObject.Save(18, &pk.tuple)
   544  }
   545  
   546  func (pk *PacketBuffer) afterLoad(context.Context) {}
   547  
   548  // +checklocksignore
   549  func (pk *PacketBuffer) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   550  	stateSourceObject.Load(0, &pk.packetBufferRefs)
   551  	stateSourceObject.Load(1, &pk.buf)
   552  	stateSourceObject.Load(2, &pk.reserved)
   553  	stateSourceObject.Load(3, &pk.pushed)
   554  	stateSourceObject.Load(4, &pk.consumed)
   555  	stateSourceObject.Load(5, &pk.headers)
   556  	stateSourceObject.Load(6, &pk.NetworkProtocolNumber)
   557  	stateSourceObject.Load(7, &pk.TransportProtocolNumber)
   558  	stateSourceObject.Load(8, &pk.Hash)
   559  	stateSourceObject.Load(9, &pk.Owner)
   560  	stateSourceObject.Load(10, &pk.EgressRoute)
   561  	stateSourceObject.Load(11, &pk.GSOOptions)
   562  	stateSourceObject.Load(12, &pk.snatDone)
   563  	stateSourceObject.Load(13, &pk.dnatDone)
   564  	stateSourceObject.Load(14, &pk.PktType)
   565  	stateSourceObject.Load(15, &pk.NICID)
   566  	stateSourceObject.Load(16, &pk.RXChecksumValidated)
   567  	stateSourceObject.Load(17, &pk.NetworkPacketInfo)
   568  	stateSourceObject.Load(18, &pk.tuple)
   569  }
   570  
   571  func (h *headerInfo) StateTypeName() string {
   572  	return "pkg/tcpip/stack.headerInfo"
   573  }
   574  
   575  func (h *headerInfo) StateFields() []string {
   576  	return []string{
   577  		"offset",
   578  		"length",
   579  	}
   580  }
   581  
   582  func (h *headerInfo) beforeSave() {}
   583  
   584  // +checklocksignore
   585  func (h *headerInfo) StateSave(stateSinkObject state.Sink) {
   586  	h.beforeSave()
   587  	stateSinkObject.Save(0, &h.offset)
   588  	stateSinkObject.Save(1, &h.length)
   589  }
   590  
   591  func (h *headerInfo) afterLoad(context.Context) {}
   592  
   593  // +checklocksignore
   594  func (h *headerInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   595  	stateSourceObject.Load(0, &h.offset)
   596  	stateSourceObject.Load(1, &h.length)
   597  }
   598  
   599  func (d *PacketData) StateTypeName() string {
   600  	return "pkg/tcpip/stack.PacketData"
   601  }
   602  
   603  func (d *PacketData) StateFields() []string {
   604  	return []string{
   605  		"pk",
   606  	}
   607  }
   608  
   609  func (d *PacketData) beforeSave() {}
   610  
   611  // +checklocksignore
   612  func (d *PacketData) StateSave(stateSinkObject state.Sink) {
   613  	d.beforeSave()
   614  	stateSinkObject.Save(0, &d.pk)
   615  }
   616  
   617  func (d *PacketData) afterLoad(context.Context) {}
   618  
   619  // +checklocksignore
   620  func (d *PacketData) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   621  	stateSourceObject.Load(0, &d.pk)
   622  }
   623  
   624  func (pl *PacketBufferList) StateTypeName() string {
   625  	return "pkg/tcpip/stack.PacketBufferList"
   626  }
   627  
   628  func (pl *PacketBufferList) StateFields() []string {
   629  	return []string{
   630  		"pbs",
   631  	}
   632  }
   633  
   634  func (pl *PacketBufferList) beforeSave() {}
   635  
   636  // +checklocksignore
   637  func (pl *PacketBufferList) StateSave(stateSinkObject state.Sink) {
   638  	pl.beforeSave()
   639  	stateSinkObject.Save(0, &pl.pbs)
   640  }
   641  
   642  func (pl *PacketBufferList) afterLoad(context.Context) {}
   643  
   644  // +checklocksignore
   645  func (pl *PacketBufferList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   646  	stateSourceObject.Load(0, &pl.pbs)
   647  }
   648  
   649  func (r *packetBufferRefs) StateTypeName() string {
   650  	return "pkg/tcpip/stack.packetBufferRefs"
   651  }
   652  
   653  func (r *packetBufferRefs) StateFields() []string {
   654  	return []string{
   655  		"refCount",
   656  	}
   657  }
   658  
   659  func (r *packetBufferRefs) beforeSave() {}
   660  
   661  // +checklocksignore
   662  func (r *packetBufferRefs) StateSave(stateSinkObject state.Sink) {
   663  	r.beforeSave()
   664  	stateSinkObject.Save(0, &r.refCount)
   665  }
   666  
   667  // +checklocksignore
   668  func (r *packetBufferRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   669  	stateSourceObject.Load(0, &r.refCount)
   670  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   671  }
   672  
   673  func (t *TransportEndpointID) StateTypeName() string {
   674  	return "pkg/tcpip/stack.TransportEndpointID"
   675  }
   676  
   677  func (t *TransportEndpointID) StateFields() []string {
   678  	return []string{
   679  		"LocalPort",
   680  		"LocalAddress",
   681  		"RemotePort",
   682  		"RemoteAddress",
   683  	}
   684  }
   685  
   686  func (t *TransportEndpointID) beforeSave() {}
   687  
   688  // +checklocksignore
   689  func (t *TransportEndpointID) StateSave(stateSinkObject state.Sink) {
   690  	t.beforeSave()
   691  	stateSinkObject.Save(0, &t.LocalPort)
   692  	stateSinkObject.Save(1, &t.LocalAddress)
   693  	stateSinkObject.Save(2, &t.RemotePort)
   694  	stateSinkObject.Save(3, &t.RemoteAddress)
   695  }
   696  
   697  func (t *TransportEndpointID) afterLoad(context.Context) {}
   698  
   699  // +checklocksignore
   700  func (t *TransportEndpointID) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   701  	stateSourceObject.Load(0, &t.LocalPort)
   702  	stateSourceObject.Load(1, &t.LocalAddress)
   703  	stateSourceObject.Load(2, &t.RemotePort)
   704  	stateSourceObject.Load(3, &t.RemoteAddress)
   705  }
   706  
   707  func (n *NetworkPacketInfo) StateTypeName() string {
   708  	return "pkg/tcpip/stack.NetworkPacketInfo"
   709  }
   710  
   711  func (n *NetworkPacketInfo) StateFields() []string {
   712  	return []string{
   713  		"LocalAddressBroadcast",
   714  		"IsForwardedPacket",
   715  	}
   716  }
   717  
   718  func (n *NetworkPacketInfo) beforeSave() {}
   719  
   720  // +checklocksignore
   721  func (n *NetworkPacketInfo) StateSave(stateSinkObject state.Sink) {
   722  	n.beforeSave()
   723  	stateSinkObject.Save(0, &n.LocalAddressBroadcast)
   724  	stateSinkObject.Save(1, &n.IsForwardedPacket)
   725  }
   726  
   727  func (n *NetworkPacketInfo) afterLoad(context.Context) {}
   728  
   729  // +checklocksignore
   730  func (n *NetworkPacketInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   731  	stateSourceObject.Load(0, &n.LocalAddressBroadcast)
   732  	stateSourceObject.Load(1, &n.IsForwardedPacket)
   733  }
   734  
   735  func (g *GSOType) StateTypeName() string {
   736  	return "pkg/tcpip/stack.GSOType"
   737  }
   738  
   739  func (g *GSOType) StateFields() []string {
   740  	return nil
   741  }
   742  
   743  func (g *GSO) StateTypeName() string {
   744  	return "pkg/tcpip/stack.GSO"
   745  }
   746  
   747  func (g *GSO) StateFields() []string {
   748  	return []string{
   749  		"Type",
   750  		"NeedsCsum",
   751  		"CsumOffset",
   752  		"MSS",
   753  		"L3HdrLen",
   754  		"MaxSize",
   755  	}
   756  }
   757  
   758  func (g *GSO) beforeSave() {}
   759  
   760  // +checklocksignore
   761  func (g *GSO) StateSave(stateSinkObject state.Sink) {
   762  	g.beforeSave()
   763  	stateSinkObject.Save(0, &g.Type)
   764  	stateSinkObject.Save(1, &g.NeedsCsum)
   765  	stateSinkObject.Save(2, &g.CsumOffset)
   766  	stateSinkObject.Save(3, &g.MSS)
   767  	stateSinkObject.Save(4, &g.L3HdrLen)
   768  	stateSinkObject.Save(5, &g.MaxSize)
   769  }
   770  
   771  func (g *GSO) afterLoad(context.Context) {}
   772  
   773  // +checklocksignore
   774  func (g *GSO) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   775  	stateSourceObject.Load(0, &g.Type)
   776  	stateSourceObject.Load(1, &g.NeedsCsum)
   777  	stateSourceObject.Load(2, &g.CsumOffset)
   778  	stateSourceObject.Load(3, &g.MSS)
   779  	stateSourceObject.Load(4, &g.L3HdrLen)
   780  	stateSourceObject.Load(5, &g.MaxSize)
   781  }
   782  
   783  func (r *routeInfo) StateTypeName() string {
   784  	return "pkg/tcpip/stack.routeInfo"
   785  }
   786  
   787  func (r *routeInfo) StateFields() []string {
   788  	return []string{
   789  		"RemoteAddress",
   790  		"LocalAddress",
   791  		"LocalLinkAddress",
   792  		"NextHop",
   793  		"NetProto",
   794  		"Loop",
   795  	}
   796  }
   797  
   798  func (r *routeInfo) beforeSave() {}
   799  
   800  // +checklocksignore
   801  func (r *routeInfo) StateSave(stateSinkObject state.Sink) {
   802  	r.beforeSave()
   803  	stateSinkObject.Save(0, &r.RemoteAddress)
   804  	stateSinkObject.Save(1, &r.LocalAddress)
   805  	stateSinkObject.Save(2, &r.LocalLinkAddress)
   806  	stateSinkObject.Save(3, &r.NextHop)
   807  	stateSinkObject.Save(4, &r.NetProto)
   808  	stateSinkObject.Save(5, &r.Loop)
   809  }
   810  
   811  func (r *routeInfo) afterLoad(context.Context) {}
   812  
   813  // +checklocksignore
   814  func (r *routeInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   815  	stateSourceObject.Load(0, &r.RemoteAddress)
   816  	stateSourceObject.Load(1, &r.LocalAddress)
   817  	stateSourceObject.Load(2, &r.LocalLinkAddress)
   818  	stateSourceObject.Load(3, &r.NextHop)
   819  	stateSourceObject.Load(4, &r.NetProto)
   820  	stateSourceObject.Load(5, &r.Loop)
   821  }
   822  
   823  func (r *RouteInfo) StateTypeName() string {
   824  	return "pkg/tcpip/stack.RouteInfo"
   825  }
   826  
   827  func (r *RouteInfo) StateFields() []string {
   828  	return []string{
   829  		"routeInfo",
   830  		"RemoteLinkAddress",
   831  	}
   832  }
   833  
   834  func (r *RouteInfo) beforeSave() {}
   835  
   836  // +checklocksignore
   837  func (r *RouteInfo) StateSave(stateSinkObject state.Sink) {
   838  	r.beforeSave()
   839  	stateSinkObject.Save(0, &r.routeInfo)
   840  	stateSinkObject.Save(1, &r.RemoteLinkAddress)
   841  }
   842  
   843  func (r *RouteInfo) afterLoad(context.Context) {}
   844  
   845  // +checklocksignore
   846  func (r *RouteInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   847  	stateSourceObject.Load(0, &r.routeInfo)
   848  	stateSourceObject.Load(1, &r.RemoteLinkAddress)
   849  }
   850  
   851  func (t *TransportEndpointInfo) StateTypeName() string {
   852  	return "pkg/tcpip/stack.TransportEndpointInfo"
   853  }
   854  
   855  func (t *TransportEndpointInfo) StateFields() []string {
   856  	return []string{
   857  		"NetProto",
   858  		"TransProto",
   859  		"ID",
   860  		"BindNICID",
   861  		"BindAddr",
   862  		"RegisterNICID",
   863  	}
   864  }
   865  
   866  func (t *TransportEndpointInfo) beforeSave() {}
   867  
   868  // +checklocksignore
   869  func (t *TransportEndpointInfo) StateSave(stateSinkObject state.Sink) {
   870  	t.beforeSave()
   871  	stateSinkObject.Save(0, &t.NetProto)
   872  	stateSinkObject.Save(1, &t.TransProto)
   873  	stateSinkObject.Save(2, &t.ID)
   874  	stateSinkObject.Save(3, &t.BindNICID)
   875  	stateSinkObject.Save(4, &t.BindAddr)
   876  	stateSinkObject.Save(5, &t.RegisterNICID)
   877  }
   878  
   879  func (t *TransportEndpointInfo) afterLoad(context.Context) {}
   880  
   881  // +checklocksignore
   882  func (t *TransportEndpointInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   883  	stateSourceObject.Load(0, &t.NetProto)
   884  	stateSourceObject.Load(1, &t.TransProto)
   885  	stateSourceObject.Load(2, &t.ID)
   886  	stateSourceObject.Load(3, &t.BindNICID)
   887  	stateSourceObject.Load(4, &t.BindAddr)
   888  	stateSourceObject.Load(5, &t.RegisterNICID)
   889  }
   890  
   891  func (t *TCPCubicState) StateTypeName() string {
   892  	return "pkg/tcpip/stack.TCPCubicState"
   893  }
   894  
   895  func (t *TCPCubicState) StateFields() []string {
   896  	return []string{
   897  		"WLastMax",
   898  		"WMax",
   899  		"T",
   900  		"TimeSinceLastCongestion",
   901  		"C",
   902  		"K",
   903  		"Beta",
   904  		"WC",
   905  		"WEst",
   906  	}
   907  }
   908  
   909  func (t *TCPCubicState) beforeSave() {}
   910  
   911  // +checklocksignore
   912  func (t *TCPCubicState) StateSave(stateSinkObject state.Sink) {
   913  	t.beforeSave()
   914  	stateSinkObject.Save(0, &t.WLastMax)
   915  	stateSinkObject.Save(1, &t.WMax)
   916  	stateSinkObject.Save(2, &t.T)
   917  	stateSinkObject.Save(3, &t.TimeSinceLastCongestion)
   918  	stateSinkObject.Save(4, &t.C)
   919  	stateSinkObject.Save(5, &t.K)
   920  	stateSinkObject.Save(6, &t.Beta)
   921  	stateSinkObject.Save(7, &t.WC)
   922  	stateSinkObject.Save(8, &t.WEst)
   923  }
   924  
   925  func (t *TCPCubicState) afterLoad(context.Context) {}
   926  
   927  // +checklocksignore
   928  func (t *TCPCubicState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   929  	stateSourceObject.Load(0, &t.WLastMax)
   930  	stateSourceObject.Load(1, &t.WMax)
   931  	stateSourceObject.Load(2, &t.T)
   932  	stateSourceObject.Load(3, &t.TimeSinceLastCongestion)
   933  	stateSourceObject.Load(4, &t.C)
   934  	stateSourceObject.Load(5, &t.K)
   935  	stateSourceObject.Load(6, &t.Beta)
   936  	stateSourceObject.Load(7, &t.WC)
   937  	stateSourceObject.Load(8, &t.WEst)
   938  }
   939  
   940  func (t *TCPRACKState) StateTypeName() string {
   941  	return "pkg/tcpip/stack.TCPRACKState"
   942  }
   943  
   944  func (t *TCPRACKState) StateFields() []string {
   945  	return []string{
   946  		"XmitTime",
   947  		"EndSequence",
   948  		"FACK",
   949  		"RTT",
   950  		"Reord",
   951  		"DSACKSeen",
   952  		"ReoWnd",
   953  		"ReoWndIncr",
   954  		"ReoWndPersist",
   955  		"RTTSeq",
   956  	}
   957  }
   958  
   959  func (t *TCPRACKState) beforeSave() {}
   960  
   961  // +checklocksignore
   962  func (t *TCPRACKState) StateSave(stateSinkObject state.Sink) {
   963  	t.beforeSave()
   964  	stateSinkObject.Save(0, &t.XmitTime)
   965  	stateSinkObject.Save(1, &t.EndSequence)
   966  	stateSinkObject.Save(2, &t.FACK)
   967  	stateSinkObject.Save(3, &t.RTT)
   968  	stateSinkObject.Save(4, &t.Reord)
   969  	stateSinkObject.Save(5, &t.DSACKSeen)
   970  	stateSinkObject.Save(6, &t.ReoWnd)
   971  	stateSinkObject.Save(7, &t.ReoWndIncr)
   972  	stateSinkObject.Save(8, &t.ReoWndPersist)
   973  	stateSinkObject.Save(9, &t.RTTSeq)
   974  }
   975  
   976  func (t *TCPRACKState) afterLoad(context.Context) {}
   977  
   978  // +checklocksignore
   979  func (t *TCPRACKState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   980  	stateSourceObject.Load(0, &t.XmitTime)
   981  	stateSourceObject.Load(1, &t.EndSequence)
   982  	stateSourceObject.Load(2, &t.FACK)
   983  	stateSourceObject.Load(3, &t.RTT)
   984  	stateSourceObject.Load(4, &t.Reord)
   985  	stateSourceObject.Load(5, &t.DSACKSeen)
   986  	stateSourceObject.Load(6, &t.ReoWnd)
   987  	stateSourceObject.Load(7, &t.ReoWndIncr)
   988  	stateSourceObject.Load(8, &t.ReoWndPersist)
   989  	stateSourceObject.Load(9, &t.RTTSeq)
   990  }
   991  
   992  func (t *TCPEndpointID) StateTypeName() string {
   993  	return "pkg/tcpip/stack.TCPEndpointID"
   994  }
   995  
   996  func (t *TCPEndpointID) StateFields() []string {
   997  	return []string{
   998  		"LocalPort",
   999  		"LocalAddress",
  1000  		"RemotePort",
  1001  		"RemoteAddress",
  1002  	}
  1003  }
  1004  
  1005  func (t *TCPEndpointID) beforeSave() {}
  1006  
  1007  // +checklocksignore
  1008  func (t *TCPEndpointID) StateSave(stateSinkObject state.Sink) {
  1009  	t.beforeSave()
  1010  	stateSinkObject.Save(0, &t.LocalPort)
  1011  	stateSinkObject.Save(1, &t.LocalAddress)
  1012  	stateSinkObject.Save(2, &t.RemotePort)
  1013  	stateSinkObject.Save(3, &t.RemoteAddress)
  1014  }
  1015  
  1016  func (t *TCPEndpointID) afterLoad(context.Context) {}
  1017  
  1018  // +checklocksignore
  1019  func (t *TCPEndpointID) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1020  	stateSourceObject.Load(0, &t.LocalPort)
  1021  	stateSourceObject.Load(1, &t.LocalAddress)
  1022  	stateSourceObject.Load(2, &t.RemotePort)
  1023  	stateSourceObject.Load(3, &t.RemoteAddress)
  1024  }
  1025  
  1026  func (t *TCPFastRecoveryState) StateTypeName() string {
  1027  	return "pkg/tcpip/stack.TCPFastRecoveryState"
  1028  }
  1029  
  1030  func (t *TCPFastRecoveryState) StateFields() []string {
  1031  	return []string{
  1032  		"Active",
  1033  		"First",
  1034  		"Last",
  1035  		"MaxCwnd",
  1036  		"HighRxt",
  1037  		"RescueRxt",
  1038  	}
  1039  }
  1040  
  1041  func (t *TCPFastRecoveryState) beforeSave() {}
  1042  
  1043  // +checklocksignore
  1044  func (t *TCPFastRecoveryState) StateSave(stateSinkObject state.Sink) {
  1045  	t.beforeSave()
  1046  	stateSinkObject.Save(0, &t.Active)
  1047  	stateSinkObject.Save(1, &t.First)
  1048  	stateSinkObject.Save(2, &t.Last)
  1049  	stateSinkObject.Save(3, &t.MaxCwnd)
  1050  	stateSinkObject.Save(4, &t.HighRxt)
  1051  	stateSinkObject.Save(5, &t.RescueRxt)
  1052  }
  1053  
  1054  func (t *TCPFastRecoveryState) afterLoad(context.Context) {}
  1055  
  1056  // +checklocksignore
  1057  func (t *TCPFastRecoveryState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1058  	stateSourceObject.Load(0, &t.Active)
  1059  	stateSourceObject.Load(1, &t.First)
  1060  	stateSourceObject.Load(2, &t.Last)
  1061  	stateSourceObject.Load(3, &t.MaxCwnd)
  1062  	stateSourceObject.Load(4, &t.HighRxt)
  1063  	stateSourceObject.Load(5, &t.RescueRxt)
  1064  }
  1065  
  1066  func (t *TCPReceiverState) StateTypeName() string {
  1067  	return "pkg/tcpip/stack.TCPReceiverState"
  1068  }
  1069  
  1070  func (t *TCPReceiverState) StateFields() []string {
  1071  	return []string{
  1072  		"RcvNxt",
  1073  		"RcvAcc",
  1074  		"RcvWndScale",
  1075  		"PendingBufUsed",
  1076  	}
  1077  }
  1078  
  1079  func (t *TCPReceiverState) beforeSave() {}
  1080  
  1081  // +checklocksignore
  1082  func (t *TCPReceiverState) StateSave(stateSinkObject state.Sink) {
  1083  	t.beforeSave()
  1084  	stateSinkObject.Save(0, &t.RcvNxt)
  1085  	stateSinkObject.Save(1, &t.RcvAcc)
  1086  	stateSinkObject.Save(2, &t.RcvWndScale)
  1087  	stateSinkObject.Save(3, &t.PendingBufUsed)
  1088  }
  1089  
  1090  func (t *TCPReceiverState) afterLoad(context.Context) {}
  1091  
  1092  // +checklocksignore
  1093  func (t *TCPReceiverState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1094  	stateSourceObject.Load(0, &t.RcvNxt)
  1095  	stateSourceObject.Load(1, &t.RcvAcc)
  1096  	stateSourceObject.Load(2, &t.RcvWndScale)
  1097  	stateSourceObject.Load(3, &t.PendingBufUsed)
  1098  }
  1099  
  1100  func (t *TCPRTTState) StateTypeName() string {
  1101  	return "pkg/tcpip/stack.TCPRTTState"
  1102  }
  1103  
  1104  func (t *TCPRTTState) StateFields() []string {
  1105  	return []string{
  1106  		"SRTT",
  1107  		"RTTVar",
  1108  		"SRTTInited",
  1109  	}
  1110  }
  1111  
  1112  func (t *TCPRTTState) beforeSave() {}
  1113  
  1114  // +checklocksignore
  1115  func (t *TCPRTTState) StateSave(stateSinkObject state.Sink) {
  1116  	t.beforeSave()
  1117  	stateSinkObject.Save(0, &t.SRTT)
  1118  	stateSinkObject.Save(1, &t.RTTVar)
  1119  	stateSinkObject.Save(2, &t.SRTTInited)
  1120  }
  1121  
  1122  func (t *TCPRTTState) afterLoad(context.Context) {}
  1123  
  1124  // +checklocksignore
  1125  func (t *TCPRTTState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1126  	stateSourceObject.Load(0, &t.SRTT)
  1127  	stateSourceObject.Load(1, &t.RTTVar)
  1128  	stateSourceObject.Load(2, &t.SRTTInited)
  1129  }
  1130  
  1131  func (t *TCPSenderState) StateTypeName() string {
  1132  	return "pkg/tcpip/stack.TCPSenderState"
  1133  }
  1134  
  1135  func (t *TCPSenderState) StateFields() []string {
  1136  	return []string{
  1137  		"LastSendTime",
  1138  		"DupAckCount",
  1139  		"SndCwnd",
  1140  		"Ssthresh",
  1141  		"SndCAAckCount",
  1142  		"Outstanding",
  1143  		"SackedOut",
  1144  		"SndWnd",
  1145  		"SndUna",
  1146  		"SndNxt",
  1147  		"RTTMeasureSeqNum",
  1148  		"RTTMeasureTime",
  1149  		"Closed",
  1150  		"RTO",
  1151  		"RTTState",
  1152  		"MaxPayloadSize",
  1153  		"SndWndScale",
  1154  		"MaxSentAck",
  1155  		"FastRecovery",
  1156  		"Cubic",
  1157  		"RACKState",
  1158  		"RetransmitTS",
  1159  		"SpuriousRecovery",
  1160  	}
  1161  }
  1162  
  1163  func (t *TCPSenderState) beforeSave() {}
  1164  
  1165  // +checklocksignore
  1166  func (t *TCPSenderState) StateSave(stateSinkObject state.Sink) {
  1167  	t.beforeSave()
  1168  	stateSinkObject.Save(0, &t.LastSendTime)
  1169  	stateSinkObject.Save(1, &t.DupAckCount)
  1170  	stateSinkObject.Save(2, &t.SndCwnd)
  1171  	stateSinkObject.Save(3, &t.Ssthresh)
  1172  	stateSinkObject.Save(4, &t.SndCAAckCount)
  1173  	stateSinkObject.Save(5, &t.Outstanding)
  1174  	stateSinkObject.Save(6, &t.SackedOut)
  1175  	stateSinkObject.Save(7, &t.SndWnd)
  1176  	stateSinkObject.Save(8, &t.SndUna)
  1177  	stateSinkObject.Save(9, &t.SndNxt)
  1178  	stateSinkObject.Save(10, &t.RTTMeasureSeqNum)
  1179  	stateSinkObject.Save(11, &t.RTTMeasureTime)
  1180  	stateSinkObject.Save(12, &t.Closed)
  1181  	stateSinkObject.Save(13, &t.RTO)
  1182  	stateSinkObject.Save(14, &t.RTTState)
  1183  	stateSinkObject.Save(15, &t.MaxPayloadSize)
  1184  	stateSinkObject.Save(16, &t.SndWndScale)
  1185  	stateSinkObject.Save(17, &t.MaxSentAck)
  1186  	stateSinkObject.Save(18, &t.FastRecovery)
  1187  	stateSinkObject.Save(19, &t.Cubic)
  1188  	stateSinkObject.Save(20, &t.RACKState)
  1189  	stateSinkObject.Save(21, &t.RetransmitTS)
  1190  	stateSinkObject.Save(22, &t.SpuriousRecovery)
  1191  }
  1192  
  1193  func (t *TCPSenderState) afterLoad(context.Context) {}
  1194  
  1195  // +checklocksignore
  1196  func (t *TCPSenderState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1197  	stateSourceObject.Load(0, &t.LastSendTime)
  1198  	stateSourceObject.Load(1, &t.DupAckCount)
  1199  	stateSourceObject.Load(2, &t.SndCwnd)
  1200  	stateSourceObject.Load(3, &t.Ssthresh)
  1201  	stateSourceObject.Load(4, &t.SndCAAckCount)
  1202  	stateSourceObject.Load(5, &t.Outstanding)
  1203  	stateSourceObject.Load(6, &t.SackedOut)
  1204  	stateSourceObject.Load(7, &t.SndWnd)
  1205  	stateSourceObject.Load(8, &t.SndUna)
  1206  	stateSourceObject.Load(9, &t.SndNxt)
  1207  	stateSourceObject.Load(10, &t.RTTMeasureSeqNum)
  1208  	stateSourceObject.Load(11, &t.RTTMeasureTime)
  1209  	stateSourceObject.Load(12, &t.Closed)
  1210  	stateSourceObject.Load(13, &t.RTO)
  1211  	stateSourceObject.Load(14, &t.RTTState)
  1212  	stateSourceObject.Load(15, &t.MaxPayloadSize)
  1213  	stateSourceObject.Load(16, &t.SndWndScale)
  1214  	stateSourceObject.Load(17, &t.MaxSentAck)
  1215  	stateSourceObject.Load(18, &t.FastRecovery)
  1216  	stateSourceObject.Load(19, &t.Cubic)
  1217  	stateSourceObject.Load(20, &t.RACKState)
  1218  	stateSourceObject.Load(21, &t.RetransmitTS)
  1219  	stateSourceObject.Load(22, &t.SpuriousRecovery)
  1220  }
  1221  
  1222  func (t *TCPSACKInfo) StateTypeName() string {
  1223  	return "pkg/tcpip/stack.TCPSACKInfo"
  1224  }
  1225  
  1226  func (t *TCPSACKInfo) StateFields() []string {
  1227  	return []string{
  1228  		"Blocks",
  1229  		"ReceivedBlocks",
  1230  		"MaxSACKED",
  1231  	}
  1232  }
  1233  
  1234  func (t *TCPSACKInfo) beforeSave() {}
  1235  
  1236  // +checklocksignore
  1237  func (t *TCPSACKInfo) StateSave(stateSinkObject state.Sink) {
  1238  	t.beforeSave()
  1239  	stateSinkObject.Save(0, &t.Blocks)
  1240  	stateSinkObject.Save(1, &t.ReceivedBlocks)
  1241  	stateSinkObject.Save(2, &t.MaxSACKED)
  1242  }
  1243  
  1244  func (t *TCPSACKInfo) afterLoad(context.Context) {}
  1245  
  1246  // +checklocksignore
  1247  func (t *TCPSACKInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1248  	stateSourceObject.Load(0, &t.Blocks)
  1249  	stateSourceObject.Load(1, &t.ReceivedBlocks)
  1250  	stateSourceObject.Load(2, &t.MaxSACKED)
  1251  }
  1252  
  1253  func (r *RcvBufAutoTuneParams) StateTypeName() string {
  1254  	return "pkg/tcpip/stack.RcvBufAutoTuneParams"
  1255  }
  1256  
  1257  func (r *RcvBufAutoTuneParams) StateFields() []string {
  1258  	return []string{
  1259  		"MeasureTime",
  1260  		"CopiedBytes",
  1261  		"PrevCopiedBytes",
  1262  		"RcvBufSize",
  1263  		"RTT",
  1264  		"RTTVar",
  1265  		"RTTMeasureSeqNumber",
  1266  		"RTTMeasureTime",
  1267  		"Disabled",
  1268  	}
  1269  }
  1270  
  1271  func (r *RcvBufAutoTuneParams) beforeSave() {}
  1272  
  1273  // +checklocksignore
  1274  func (r *RcvBufAutoTuneParams) StateSave(stateSinkObject state.Sink) {
  1275  	r.beforeSave()
  1276  	stateSinkObject.Save(0, &r.MeasureTime)
  1277  	stateSinkObject.Save(1, &r.CopiedBytes)
  1278  	stateSinkObject.Save(2, &r.PrevCopiedBytes)
  1279  	stateSinkObject.Save(3, &r.RcvBufSize)
  1280  	stateSinkObject.Save(4, &r.RTT)
  1281  	stateSinkObject.Save(5, &r.RTTVar)
  1282  	stateSinkObject.Save(6, &r.RTTMeasureSeqNumber)
  1283  	stateSinkObject.Save(7, &r.RTTMeasureTime)
  1284  	stateSinkObject.Save(8, &r.Disabled)
  1285  }
  1286  
  1287  func (r *RcvBufAutoTuneParams) afterLoad(context.Context) {}
  1288  
  1289  // +checklocksignore
  1290  func (r *RcvBufAutoTuneParams) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1291  	stateSourceObject.Load(0, &r.MeasureTime)
  1292  	stateSourceObject.Load(1, &r.CopiedBytes)
  1293  	stateSourceObject.Load(2, &r.PrevCopiedBytes)
  1294  	stateSourceObject.Load(3, &r.RcvBufSize)
  1295  	stateSourceObject.Load(4, &r.RTT)
  1296  	stateSourceObject.Load(5, &r.RTTVar)
  1297  	stateSourceObject.Load(6, &r.RTTMeasureSeqNumber)
  1298  	stateSourceObject.Load(7, &r.RTTMeasureTime)
  1299  	stateSourceObject.Load(8, &r.Disabled)
  1300  }
  1301  
  1302  func (t *TCPRcvBufState) StateTypeName() string {
  1303  	return "pkg/tcpip/stack.TCPRcvBufState"
  1304  }
  1305  
  1306  func (t *TCPRcvBufState) StateFields() []string {
  1307  	return []string{
  1308  		"RcvBufUsed",
  1309  		"RcvAutoParams",
  1310  		"RcvClosed",
  1311  	}
  1312  }
  1313  
  1314  func (t *TCPRcvBufState) beforeSave() {}
  1315  
  1316  // +checklocksignore
  1317  func (t *TCPRcvBufState) StateSave(stateSinkObject state.Sink) {
  1318  	t.beforeSave()
  1319  	stateSinkObject.Save(0, &t.RcvBufUsed)
  1320  	stateSinkObject.Save(1, &t.RcvAutoParams)
  1321  	stateSinkObject.Save(2, &t.RcvClosed)
  1322  }
  1323  
  1324  func (t *TCPRcvBufState) afterLoad(context.Context) {}
  1325  
  1326  // +checklocksignore
  1327  func (t *TCPRcvBufState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1328  	stateSourceObject.Load(0, &t.RcvBufUsed)
  1329  	stateSourceObject.Load(1, &t.RcvAutoParams)
  1330  	stateSourceObject.Load(2, &t.RcvClosed)
  1331  }
  1332  
  1333  func (t *TCPSndBufState) StateTypeName() string {
  1334  	return "pkg/tcpip/stack.TCPSndBufState"
  1335  }
  1336  
  1337  func (t *TCPSndBufState) StateFields() []string {
  1338  	return []string{
  1339  		"SndBufSize",
  1340  		"SndBufUsed",
  1341  		"SndClosed",
  1342  		"PacketTooBigCount",
  1343  		"SndMTU",
  1344  		"AutoTuneSndBufDisabled",
  1345  	}
  1346  }
  1347  
  1348  func (t *TCPSndBufState) beforeSave() {}
  1349  
  1350  // +checklocksignore
  1351  func (t *TCPSndBufState) StateSave(stateSinkObject state.Sink) {
  1352  	t.beforeSave()
  1353  	stateSinkObject.Save(0, &t.SndBufSize)
  1354  	stateSinkObject.Save(1, &t.SndBufUsed)
  1355  	stateSinkObject.Save(2, &t.SndClosed)
  1356  	stateSinkObject.Save(3, &t.PacketTooBigCount)
  1357  	stateSinkObject.Save(4, &t.SndMTU)
  1358  	stateSinkObject.Save(5, &t.AutoTuneSndBufDisabled)
  1359  }
  1360  
  1361  func (t *TCPSndBufState) afterLoad(context.Context) {}
  1362  
  1363  // +checklocksignore
  1364  func (t *TCPSndBufState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1365  	stateSourceObject.Load(0, &t.SndBufSize)
  1366  	stateSourceObject.Load(1, &t.SndBufUsed)
  1367  	stateSourceObject.Load(2, &t.SndClosed)
  1368  	stateSourceObject.Load(3, &t.PacketTooBigCount)
  1369  	stateSourceObject.Load(4, &t.SndMTU)
  1370  	stateSourceObject.Load(5, &t.AutoTuneSndBufDisabled)
  1371  }
  1372  
  1373  func (t *TCPEndpointStateInner) StateTypeName() string {
  1374  	return "pkg/tcpip/stack.TCPEndpointStateInner"
  1375  }
  1376  
  1377  func (t *TCPEndpointStateInner) StateFields() []string {
  1378  	return []string{
  1379  		"TSOffset",
  1380  		"SACKPermitted",
  1381  		"SendTSOk",
  1382  		"RecentTS",
  1383  	}
  1384  }
  1385  
  1386  func (t *TCPEndpointStateInner) beforeSave() {}
  1387  
  1388  // +checklocksignore
  1389  func (t *TCPEndpointStateInner) StateSave(stateSinkObject state.Sink) {
  1390  	t.beforeSave()
  1391  	stateSinkObject.Save(0, &t.TSOffset)
  1392  	stateSinkObject.Save(1, &t.SACKPermitted)
  1393  	stateSinkObject.Save(2, &t.SendTSOk)
  1394  	stateSinkObject.Save(3, &t.RecentTS)
  1395  }
  1396  
  1397  func (t *TCPEndpointStateInner) afterLoad(context.Context) {}
  1398  
  1399  // +checklocksignore
  1400  func (t *TCPEndpointStateInner) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1401  	stateSourceObject.Load(0, &t.TSOffset)
  1402  	stateSourceObject.Load(1, &t.SACKPermitted)
  1403  	stateSourceObject.Load(2, &t.SendTSOk)
  1404  	stateSourceObject.Load(3, &t.RecentTS)
  1405  }
  1406  
  1407  func (t *TCPEndpointState) StateTypeName() string {
  1408  	return "pkg/tcpip/stack.TCPEndpointState"
  1409  }
  1410  
  1411  func (t *TCPEndpointState) StateFields() []string {
  1412  	return []string{
  1413  		"TCPEndpointStateInner",
  1414  		"ID",
  1415  		"SegTime",
  1416  		"RcvBufState",
  1417  		"SndBufState",
  1418  		"SACK",
  1419  		"Receiver",
  1420  		"Sender",
  1421  	}
  1422  }
  1423  
  1424  func (t *TCPEndpointState) beforeSave() {}
  1425  
  1426  // +checklocksignore
  1427  func (t *TCPEndpointState) StateSave(stateSinkObject state.Sink) {
  1428  	t.beforeSave()
  1429  	stateSinkObject.Save(0, &t.TCPEndpointStateInner)
  1430  	stateSinkObject.Save(1, &t.ID)
  1431  	stateSinkObject.Save(2, &t.SegTime)
  1432  	stateSinkObject.Save(3, &t.RcvBufState)
  1433  	stateSinkObject.Save(4, &t.SndBufState)
  1434  	stateSinkObject.Save(5, &t.SACK)
  1435  	stateSinkObject.Save(6, &t.Receiver)
  1436  	stateSinkObject.Save(7, &t.Sender)
  1437  }
  1438  
  1439  func (t *TCPEndpointState) afterLoad(context.Context) {}
  1440  
  1441  // +checklocksignore
  1442  func (t *TCPEndpointState) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1443  	stateSourceObject.Load(0, &t.TCPEndpointStateInner)
  1444  	stateSourceObject.Load(1, &t.ID)
  1445  	stateSourceObject.Load(2, &t.SegTime)
  1446  	stateSourceObject.Load(3, &t.RcvBufState)
  1447  	stateSourceObject.Load(4, &t.SndBufState)
  1448  	stateSourceObject.Load(5, &t.SACK)
  1449  	stateSourceObject.Load(6, &t.Receiver)
  1450  	stateSourceObject.Load(7, &t.Sender)
  1451  }
  1452  
  1453  func (ep *multiPortEndpoint) StateTypeName() string {
  1454  	return "pkg/tcpip/stack.multiPortEndpoint"
  1455  }
  1456  
  1457  func (ep *multiPortEndpoint) StateFields() []string {
  1458  	return []string{
  1459  		"demux",
  1460  		"netProto",
  1461  		"transProto",
  1462  		"flags",
  1463  		"endpoints",
  1464  	}
  1465  }
  1466  
  1467  func (ep *multiPortEndpoint) beforeSave() {}
  1468  
  1469  // +checklocksignore
  1470  func (ep *multiPortEndpoint) StateSave(stateSinkObject state.Sink) {
  1471  	ep.beforeSave()
  1472  	stateSinkObject.Save(0, &ep.demux)
  1473  	stateSinkObject.Save(1, &ep.netProto)
  1474  	stateSinkObject.Save(2, &ep.transProto)
  1475  	stateSinkObject.Save(3, &ep.flags)
  1476  	stateSinkObject.Save(4, &ep.endpoints)
  1477  }
  1478  
  1479  func (ep *multiPortEndpoint) afterLoad(context.Context) {}
  1480  
  1481  // +checklocksignore
  1482  func (ep *multiPortEndpoint) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1483  	stateSourceObject.Load(0, &ep.demux)
  1484  	stateSourceObject.Load(1, &ep.netProto)
  1485  	stateSourceObject.Load(2, &ep.transProto)
  1486  	stateSourceObject.Load(3, &ep.flags)
  1487  	stateSourceObject.Load(4, &ep.endpoints)
  1488  }
  1489  
  1490  func (l *tupleList) StateTypeName() string {
  1491  	return "pkg/tcpip/stack.tupleList"
  1492  }
  1493  
  1494  func (l *tupleList) StateFields() []string {
  1495  	return []string{
  1496  		"head",
  1497  		"tail",
  1498  	}
  1499  }
  1500  
  1501  func (l *tupleList) beforeSave() {}
  1502  
  1503  // +checklocksignore
  1504  func (l *tupleList) StateSave(stateSinkObject state.Sink) {
  1505  	l.beforeSave()
  1506  	stateSinkObject.Save(0, &l.head)
  1507  	stateSinkObject.Save(1, &l.tail)
  1508  }
  1509  
  1510  func (l *tupleList) afterLoad(context.Context) {}
  1511  
  1512  // +checklocksignore
  1513  func (l *tupleList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1514  	stateSourceObject.Load(0, &l.head)
  1515  	stateSourceObject.Load(1, &l.tail)
  1516  }
  1517  
  1518  func (e *tupleEntry) StateTypeName() string {
  1519  	return "pkg/tcpip/stack.tupleEntry"
  1520  }
  1521  
  1522  func (e *tupleEntry) StateFields() []string {
  1523  	return []string{
  1524  		"next",
  1525  		"prev",
  1526  	}
  1527  }
  1528  
  1529  func (e *tupleEntry) beforeSave() {}
  1530  
  1531  // +checklocksignore
  1532  func (e *tupleEntry) StateSave(stateSinkObject state.Sink) {
  1533  	e.beforeSave()
  1534  	stateSinkObject.Save(0, &e.next)
  1535  	stateSinkObject.Save(1, &e.prev)
  1536  }
  1537  
  1538  func (e *tupleEntry) afterLoad(context.Context) {}
  1539  
  1540  // +checklocksignore
  1541  func (e *tupleEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1542  	stateSourceObject.Load(0, &e.next)
  1543  	stateSourceObject.Load(1, &e.prev)
  1544  }
  1545  
  1546  func init() {
  1547  	state.Register((*addressStateRefs)(nil))
  1548  	state.Register((*tuple)(nil))
  1549  	state.Register((*tupleID)(nil))
  1550  	state.Register((*conn)(nil))
  1551  	state.Register((*ConnTrack)(nil))
  1552  	state.Register((*bucket)(nil))
  1553  	state.Register((*groPacketList)(nil))
  1554  	state.Register((*groPacketEntry)(nil))
  1555  	state.Register((*IPTables)(nil))
  1556  	state.Register((*Table)(nil))
  1557  	state.Register((*Rule)(nil))
  1558  	state.Register((*IPHeaderFilter)(nil))
  1559  	state.Register((*neighborEntryList)(nil))
  1560  	state.Register((*neighborEntryEntry)(nil))
  1561  	state.Register((*PacketBuffer)(nil))
  1562  	state.Register((*headerInfo)(nil))
  1563  	state.Register((*PacketData)(nil))
  1564  	state.Register((*PacketBufferList)(nil))
  1565  	state.Register((*packetBufferRefs)(nil))
  1566  	state.Register((*TransportEndpointID)(nil))
  1567  	state.Register((*NetworkPacketInfo)(nil))
  1568  	state.Register((*GSOType)(nil))
  1569  	state.Register((*GSO)(nil))
  1570  	state.Register((*routeInfo)(nil))
  1571  	state.Register((*RouteInfo)(nil))
  1572  	state.Register((*TransportEndpointInfo)(nil))
  1573  	state.Register((*TCPCubicState)(nil))
  1574  	state.Register((*TCPRACKState)(nil))
  1575  	state.Register((*TCPEndpointID)(nil))
  1576  	state.Register((*TCPFastRecoveryState)(nil))
  1577  	state.Register((*TCPReceiverState)(nil))
  1578  	state.Register((*TCPRTTState)(nil))
  1579  	state.Register((*TCPSenderState)(nil))
  1580  	state.Register((*TCPSACKInfo)(nil))
  1581  	state.Register((*RcvBufAutoTuneParams)(nil))
  1582  	state.Register((*TCPRcvBufState)(nil))
  1583  	state.Register((*TCPSndBufState)(nil))
  1584  	state.Register((*TCPEndpointStateInner)(nil))
  1585  	state.Register((*TCPEndpointState)(nil))
  1586  	state.Register((*multiPortEndpoint)(nil))
  1587  	state.Register((*tupleList)(nil))
  1588  	state.Register((*tupleEntry)(nil))
  1589  }