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