github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/tcpip/transport/tcp/tcp_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package tcp
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (a *acceptQueue) StateTypeName() string {
    10  	return "pkg/tcpip/transport/tcp.acceptQueue"
    11  }
    12  
    13  func (a *acceptQueue) StateFields() []string {
    14  	return []string{
    15  		"endpoints",
    16  		"pendingEndpoints",
    17  		"capacity",
    18  	}
    19  }
    20  
    21  func (a *acceptQueue) beforeSave() {}
    22  
    23  // +checklocksignore
    24  func (a *acceptQueue) StateSave(stateSinkObject state.Sink) {
    25  	a.beforeSave()
    26  	var endpointsValue []*endpoint
    27  	endpointsValue = a.saveEndpoints()
    28  	stateSinkObject.SaveValue(0, endpointsValue)
    29  	stateSinkObject.Save(1, &a.pendingEndpoints)
    30  	stateSinkObject.Save(2, &a.capacity)
    31  }
    32  
    33  func (a *acceptQueue) afterLoad() {}
    34  
    35  // +checklocksignore
    36  func (a *acceptQueue) StateLoad(stateSourceObject state.Source) {
    37  	stateSourceObject.Load(1, &a.pendingEndpoints)
    38  	stateSourceObject.Load(2, &a.capacity)
    39  	stateSourceObject.LoadValue(0, new([]*endpoint), func(y any) { a.loadEndpoints(y.([]*endpoint)) })
    40  }
    41  
    42  func (h *handshake) StateTypeName() string {
    43  	return "pkg/tcpip/transport/tcp.handshake"
    44  }
    45  
    46  func (h *handshake) StateFields() []string {
    47  	return []string{
    48  		"ep",
    49  		"listenEP",
    50  		"state",
    51  		"active",
    52  		"flags",
    53  		"ackNum",
    54  		"iss",
    55  		"rcvWnd",
    56  		"sndWnd",
    57  		"mss",
    58  		"sndWndScale",
    59  		"rcvWndScale",
    60  		"startTime",
    61  		"deferAccept",
    62  		"acked",
    63  		"sendSYNOpts",
    64  		"sampleRTTWithTSOnly",
    65  	}
    66  }
    67  
    68  func (h *handshake) beforeSave() {}
    69  
    70  // +checklocksignore
    71  func (h *handshake) StateSave(stateSinkObject state.Sink) {
    72  	h.beforeSave()
    73  	stateSinkObject.Save(0, &h.ep)
    74  	stateSinkObject.Save(1, &h.listenEP)
    75  	stateSinkObject.Save(2, &h.state)
    76  	stateSinkObject.Save(3, &h.active)
    77  	stateSinkObject.Save(4, &h.flags)
    78  	stateSinkObject.Save(5, &h.ackNum)
    79  	stateSinkObject.Save(6, &h.iss)
    80  	stateSinkObject.Save(7, &h.rcvWnd)
    81  	stateSinkObject.Save(8, &h.sndWnd)
    82  	stateSinkObject.Save(9, &h.mss)
    83  	stateSinkObject.Save(10, &h.sndWndScale)
    84  	stateSinkObject.Save(11, &h.rcvWndScale)
    85  	stateSinkObject.Save(12, &h.startTime)
    86  	stateSinkObject.Save(13, &h.deferAccept)
    87  	stateSinkObject.Save(14, &h.acked)
    88  	stateSinkObject.Save(15, &h.sendSYNOpts)
    89  	stateSinkObject.Save(16, &h.sampleRTTWithTSOnly)
    90  }
    91  
    92  func (h *handshake) afterLoad() {}
    93  
    94  // +checklocksignore
    95  func (h *handshake) StateLoad(stateSourceObject state.Source) {
    96  	stateSourceObject.Load(0, &h.ep)
    97  	stateSourceObject.Load(1, &h.listenEP)
    98  	stateSourceObject.Load(2, &h.state)
    99  	stateSourceObject.Load(3, &h.active)
   100  	stateSourceObject.Load(4, &h.flags)
   101  	stateSourceObject.Load(5, &h.ackNum)
   102  	stateSourceObject.Load(6, &h.iss)
   103  	stateSourceObject.Load(7, &h.rcvWnd)
   104  	stateSourceObject.Load(8, &h.sndWnd)
   105  	stateSourceObject.Load(9, &h.mss)
   106  	stateSourceObject.Load(10, &h.sndWndScale)
   107  	stateSourceObject.Load(11, &h.rcvWndScale)
   108  	stateSourceObject.Load(12, &h.startTime)
   109  	stateSourceObject.Load(13, &h.deferAccept)
   110  	stateSourceObject.Load(14, &h.acked)
   111  	stateSourceObject.Load(15, &h.sendSYNOpts)
   112  	stateSourceObject.Load(16, &h.sampleRTTWithTSOnly)
   113  }
   114  
   115  func (c *cubicState) StateTypeName() string {
   116  	return "pkg/tcpip/transport/tcp.cubicState"
   117  }
   118  
   119  func (c *cubicState) StateFields() []string {
   120  	return []string{
   121  		"TCPCubicState",
   122  		"numCongestionEvents",
   123  		"s",
   124  	}
   125  }
   126  
   127  func (c *cubicState) beforeSave() {}
   128  
   129  // +checklocksignore
   130  func (c *cubicState) StateSave(stateSinkObject state.Sink) {
   131  	c.beforeSave()
   132  	stateSinkObject.Save(0, &c.TCPCubicState)
   133  	stateSinkObject.Save(1, &c.numCongestionEvents)
   134  	stateSinkObject.Save(2, &c.s)
   135  }
   136  
   137  func (c *cubicState) afterLoad() {}
   138  
   139  // +checklocksignore
   140  func (c *cubicState) StateLoad(stateSourceObject state.Source) {
   141  	stateSourceObject.Load(0, &c.TCPCubicState)
   142  	stateSourceObject.Load(1, &c.numCongestionEvents)
   143  	stateSourceObject.Load(2, &c.s)
   144  }
   145  
   146  func (s *SACKInfo) StateTypeName() string {
   147  	return "pkg/tcpip/transport/tcp.SACKInfo"
   148  }
   149  
   150  func (s *SACKInfo) StateFields() []string {
   151  	return []string{
   152  		"Blocks",
   153  		"NumBlocks",
   154  	}
   155  }
   156  
   157  func (s *SACKInfo) beforeSave() {}
   158  
   159  // +checklocksignore
   160  func (s *SACKInfo) StateSave(stateSinkObject state.Sink) {
   161  	s.beforeSave()
   162  	stateSinkObject.Save(0, &s.Blocks)
   163  	stateSinkObject.Save(1, &s.NumBlocks)
   164  }
   165  
   166  func (s *SACKInfo) afterLoad() {}
   167  
   168  // +checklocksignore
   169  func (s *SACKInfo) StateLoad(stateSourceObject state.Source) {
   170  	stateSourceObject.Load(0, &s.Blocks)
   171  	stateSourceObject.Load(1, &s.NumBlocks)
   172  }
   173  
   174  func (r *ReceiveErrors) StateTypeName() string {
   175  	return "pkg/tcpip/transport/tcp.ReceiveErrors"
   176  }
   177  
   178  func (r *ReceiveErrors) StateFields() []string {
   179  	return []string{
   180  		"ReceiveErrors",
   181  		"SegmentQueueDropped",
   182  		"ChecksumErrors",
   183  		"ListenOverflowSynDrop",
   184  		"ListenOverflowAckDrop",
   185  		"ZeroRcvWindowState",
   186  		"WantZeroRcvWindow",
   187  	}
   188  }
   189  
   190  func (r *ReceiveErrors) beforeSave() {}
   191  
   192  // +checklocksignore
   193  func (r *ReceiveErrors) StateSave(stateSinkObject state.Sink) {
   194  	r.beforeSave()
   195  	stateSinkObject.Save(0, &r.ReceiveErrors)
   196  	stateSinkObject.Save(1, &r.SegmentQueueDropped)
   197  	stateSinkObject.Save(2, &r.ChecksumErrors)
   198  	stateSinkObject.Save(3, &r.ListenOverflowSynDrop)
   199  	stateSinkObject.Save(4, &r.ListenOverflowAckDrop)
   200  	stateSinkObject.Save(5, &r.ZeroRcvWindowState)
   201  	stateSinkObject.Save(6, &r.WantZeroRcvWindow)
   202  }
   203  
   204  func (r *ReceiveErrors) afterLoad() {}
   205  
   206  // +checklocksignore
   207  func (r *ReceiveErrors) StateLoad(stateSourceObject state.Source) {
   208  	stateSourceObject.Load(0, &r.ReceiveErrors)
   209  	stateSourceObject.Load(1, &r.SegmentQueueDropped)
   210  	stateSourceObject.Load(2, &r.ChecksumErrors)
   211  	stateSourceObject.Load(3, &r.ListenOverflowSynDrop)
   212  	stateSourceObject.Load(4, &r.ListenOverflowAckDrop)
   213  	stateSourceObject.Load(5, &r.ZeroRcvWindowState)
   214  	stateSourceObject.Load(6, &r.WantZeroRcvWindow)
   215  }
   216  
   217  func (s *SendErrors) StateTypeName() string {
   218  	return "pkg/tcpip/transport/tcp.SendErrors"
   219  }
   220  
   221  func (s *SendErrors) StateFields() []string {
   222  	return []string{
   223  		"SendErrors",
   224  		"SegmentSendToNetworkFailed",
   225  		"SynSendToNetworkFailed",
   226  		"Retransmits",
   227  		"FastRetransmit",
   228  		"Timeouts",
   229  	}
   230  }
   231  
   232  func (s *SendErrors) beforeSave() {}
   233  
   234  // +checklocksignore
   235  func (s *SendErrors) StateSave(stateSinkObject state.Sink) {
   236  	s.beforeSave()
   237  	stateSinkObject.Save(0, &s.SendErrors)
   238  	stateSinkObject.Save(1, &s.SegmentSendToNetworkFailed)
   239  	stateSinkObject.Save(2, &s.SynSendToNetworkFailed)
   240  	stateSinkObject.Save(3, &s.Retransmits)
   241  	stateSinkObject.Save(4, &s.FastRetransmit)
   242  	stateSinkObject.Save(5, &s.Timeouts)
   243  }
   244  
   245  func (s *SendErrors) afterLoad() {}
   246  
   247  // +checklocksignore
   248  func (s *SendErrors) StateLoad(stateSourceObject state.Source) {
   249  	stateSourceObject.Load(0, &s.SendErrors)
   250  	stateSourceObject.Load(1, &s.SegmentSendToNetworkFailed)
   251  	stateSourceObject.Load(2, &s.SynSendToNetworkFailed)
   252  	stateSourceObject.Load(3, &s.Retransmits)
   253  	stateSourceObject.Load(4, &s.FastRetransmit)
   254  	stateSourceObject.Load(5, &s.Timeouts)
   255  }
   256  
   257  func (s *Stats) StateTypeName() string {
   258  	return "pkg/tcpip/transport/tcp.Stats"
   259  }
   260  
   261  func (s *Stats) StateFields() []string {
   262  	return []string{
   263  		"SegmentsReceived",
   264  		"SegmentsSent",
   265  		"FailedConnectionAttempts",
   266  		"ReceiveErrors",
   267  		"ReadErrors",
   268  		"SendErrors",
   269  		"WriteErrors",
   270  	}
   271  }
   272  
   273  func (s *Stats) beforeSave() {}
   274  
   275  // +checklocksignore
   276  func (s *Stats) StateSave(stateSinkObject state.Sink) {
   277  	s.beforeSave()
   278  	stateSinkObject.Save(0, &s.SegmentsReceived)
   279  	stateSinkObject.Save(1, &s.SegmentsSent)
   280  	stateSinkObject.Save(2, &s.FailedConnectionAttempts)
   281  	stateSinkObject.Save(3, &s.ReceiveErrors)
   282  	stateSinkObject.Save(4, &s.ReadErrors)
   283  	stateSinkObject.Save(5, &s.SendErrors)
   284  	stateSinkObject.Save(6, &s.WriteErrors)
   285  }
   286  
   287  func (s *Stats) afterLoad() {}
   288  
   289  // +checklocksignore
   290  func (s *Stats) StateLoad(stateSourceObject state.Source) {
   291  	stateSourceObject.Load(0, &s.SegmentsReceived)
   292  	stateSourceObject.Load(1, &s.SegmentsSent)
   293  	stateSourceObject.Load(2, &s.FailedConnectionAttempts)
   294  	stateSourceObject.Load(3, &s.ReceiveErrors)
   295  	stateSourceObject.Load(4, &s.ReadErrors)
   296  	stateSourceObject.Load(5, &s.SendErrors)
   297  	stateSourceObject.Load(6, &s.WriteErrors)
   298  }
   299  
   300  func (sq *sndQueueInfo) StateTypeName() string {
   301  	return "pkg/tcpip/transport/tcp.sndQueueInfo"
   302  }
   303  
   304  func (sq *sndQueueInfo) StateFields() []string {
   305  	return []string{
   306  		"TCPSndBufState",
   307  	}
   308  }
   309  
   310  func (sq *sndQueueInfo) beforeSave() {}
   311  
   312  // +checklocksignore
   313  func (sq *sndQueueInfo) StateSave(stateSinkObject state.Sink) {
   314  	sq.beforeSave()
   315  	stateSinkObject.Save(0, &sq.TCPSndBufState)
   316  }
   317  
   318  func (sq *sndQueueInfo) afterLoad() {}
   319  
   320  // +checklocksignore
   321  func (sq *sndQueueInfo) StateLoad(stateSourceObject state.Source) {
   322  	stateSourceObject.Load(0, &sq.TCPSndBufState)
   323  }
   324  
   325  func (e *endpoint) StateTypeName() string {
   326  	return "pkg/tcpip/transport/tcp.endpoint"
   327  }
   328  
   329  func (e *endpoint) StateFields() []string {
   330  	return []string{
   331  		"TCPEndpointStateInner",
   332  		"TransportEndpointInfo",
   333  		"DefaultSocketOptionsHandler",
   334  		"waiterQueue",
   335  		"uniqueID",
   336  		"hardError",
   337  		"lastError",
   338  		"TCPRcvBufState",
   339  		"rcvMemUsed",
   340  		"ownedByUser",
   341  		"rcvQueue",
   342  		"state",
   343  		"connectionDirectionState",
   344  		"boundNICID",
   345  		"ipv4TTL",
   346  		"ipv6HopLimit",
   347  		"isConnectNotified",
   348  		"h",
   349  		"portFlags",
   350  		"boundBindToDevice",
   351  		"boundPortFlags",
   352  		"boundDest",
   353  		"effectiveNetProtos",
   354  		"recentTSTime",
   355  		"shutdownFlags",
   356  		"tcpRecovery",
   357  		"sack",
   358  		"delay",
   359  		"scoreboard",
   360  		"segmentQueue",
   361  		"userMSS",
   362  		"maxSynRetries",
   363  		"windowClamp",
   364  		"sndQueueInfo",
   365  		"cc",
   366  		"keepalive",
   367  		"userTimeout",
   368  		"deferAccept",
   369  		"acceptQueue",
   370  		"rcv",
   371  		"snd",
   372  		"connectingAddress",
   373  		"amss",
   374  		"sendTOS",
   375  		"gso",
   376  		"stats",
   377  		"tcpLingerTimeout",
   378  		"closed",
   379  		"txHash",
   380  		"owner",
   381  		"ops",
   382  		"lastOutOfWindowAckTime",
   383  	}
   384  }
   385  
   386  // +checklocksignore
   387  func (e *endpoint) StateSave(stateSinkObject state.Sink) {
   388  	e.beforeSave()
   389  	var stateValue EndpointState
   390  	stateValue = e.saveState()
   391  	stateSinkObject.SaveValue(11, stateValue)
   392  	stateSinkObject.Save(0, &e.TCPEndpointStateInner)
   393  	stateSinkObject.Save(1, &e.TransportEndpointInfo)
   394  	stateSinkObject.Save(2, &e.DefaultSocketOptionsHandler)
   395  	stateSinkObject.Save(3, &e.waiterQueue)
   396  	stateSinkObject.Save(4, &e.uniqueID)
   397  	stateSinkObject.Save(5, &e.hardError)
   398  	stateSinkObject.Save(6, &e.lastError)
   399  	stateSinkObject.Save(7, &e.TCPRcvBufState)
   400  	stateSinkObject.Save(8, &e.rcvMemUsed)
   401  	stateSinkObject.Save(9, &e.ownedByUser)
   402  	stateSinkObject.Save(10, &e.rcvQueue)
   403  	stateSinkObject.Save(12, &e.connectionDirectionState)
   404  	stateSinkObject.Save(13, &e.boundNICID)
   405  	stateSinkObject.Save(14, &e.ipv4TTL)
   406  	stateSinkObject.Save(15, &e.ipv6HopLimit)
   407  	stateSinkObject.Save(16, &e.isConnectNotified)
   408  	stateSinkObject.Save(17, &e.h)
   409  	stateSinkObject.Save(18, &e.portFlags)
   410  	stateSinkObject.Save(19, &e.boundBindToDevice)
   411  	stateSinkObject.Save(20, &e.boundPortFlags)
   412  	stateSinkObject.Save(21, &e.boundDest)
   413  	stateSinkObject.Save(22, &e.effectiveNetProtos)
   414  	stateSinkObject.Save(23, &e.recentTSTime)
   415  	stateSinkObject.Save(24, &e.shutdownFlags)
   416  	stateSinkObject.Save(25, &e.tcpRecovery)
   417  	stateSinkObject.Save(26, &e.sack)
   418  	stateSinkObject.Save(27, &e.delay)
   419  	stateSinkObject.Save(28, &e.scoreboard)
   420  	stateSinkObject.Save(29, &e.segmentQueue)
   421  	stateSinkObject.Save(30, &e.userMSS)
   422  	stateSinkObject.Save(31, &e.maxSynRetries)
   423  	stateSinkObject.Save(32, &e.windowClamp)
   424  	stateSinkObject.Save(33, &e.sndQueueInfo)
   425  	stateSinkObject.Save(34, &e.cc)
   426  	stateSinkObject.Save(35, &e.keepalive)
   427  	stateSinkObject.Save(36, &e.userTimeout)
   428  	stateSinkObject.Save(37, &e.deferAccept)
   429  	stateSinkObject.Save(38, &e.acceptQueue)
   430  	stateSinkObject.Save(39, &e.rcv)
   431  	stateSinkObject.Save(40, &e.snd)
   432  	stateSinkObject.Save(41, &e.connectingAddress)
   433  	stateSinkObject.Save(42, &e.amss)
   434  	stateSinkObject.Save(43, &e.sendTOS)
   435  	stateSinkObject.Save(44, &e.gso)
   436  	stateSinkObject.Save(45, &e.stats)
   437  	stateSinkObject.Save(46, &e.tcpLingerTimeout)
   438  	stateSinkObject.Save(47, &e.closed)
   439  	stateSinkObject.Save(48, &e.txHash)
   440  	stateSinkObject.Save(49, &e.owner)
   441  	stateSinkObject.Save(50, &e.ops)
   442  	stateSinkObject.Save(51, &e.lastOutOfWindowAckTime)
   443  }
   444  
   445  // +checklocksignore
   446  func (e *endpoint) StateLoad(stateSourceObject state.Source) {
   447  	stateSourceObject.Load(0, &e.TCPEndpointStateInner)
   448  	stateSourceObject.Load(1, &e.TransportEndpointInfo)
   449  	stateSourceObject.Load(2, &e.DefaultSocketOptionsHandler)
   450  	stateSourceObject.LoadWait(3, &e.waiterQueue)
   451  	stateSourceObject.Load(4, &e.uniqueID)
   452  	stateSourceObject.Load(5, &e.hardError)
   453  	stateSourceObject.Load(6, &e.lastError)
   454  	stateSourceObject.Load(7, &e.TCPRcvBufState)
   455  	stateSourceObject.Load(8, &e.rcvMemUsed)
   456  	stateSourceObject.Load(9, &e.ownedByUser)
   457  	stateSourceObject.LoadWait(10, &e.rcvQueue)
   458  	stateSourceObject.Load(12, &e.connectionDirectionState)
   459  	stateSourceObject.Load(13, &e.boundNICID)
   460  	stateSourceObject.Load(14, &e.ipv4TTL)
   461  	stateSourceObject.Load(15, &e.ipv6HopLimit)
   462  	stateSourceObject.Load(16, &e.isConnectNotified)
   463  	stateSourceObject.Load(17, &e.h)
   464  	stateSourceObject.Load(18, &e.portFlags)
   465  	stateSourceObject.Load(19, &e.boundBindToDevice)
   466  	stateSourceObject.Load(20, &e.boundPortFlags)
   467  	stateSourceObject.Load(21, &e.boundDest)
   468  	stateSourceObject.Load(22, &e.effectiveNetProtos)
   469  	stateSourceObject.Load(23, &e.recentTSTime)
   470  	stateSourceObject.Load(24, &e.shutdownFlags)
   471  	stateSourceObject.Load(25, &e.tcpRecovery)
   472  	stateSourceObject.Load(26, &e.sack)
   473  	stateSourceObject.Load(27, &e.delay)
   474  	stateSourceObject.Load(28, &e.scoreboard)
   475  	stateSourceObject.LoadWait(29, &e.segmentQueue)
   476  	stateSourceObject.Load(30, &e.userMSS)
   477  	stateSourceObject.Load(31, &e.maxSynRetries)
   478  	stateSourceObject.Load(32, &e.windowClamp)
   479  	stateSourceObject.Load(33, &e.sndQueueInfo)
   480  	stateSourceObject.Load(34, &e.cc)
   481  	stateSourceObject.Load(35, &e.keepalive)
   482  	stateSourceObject.Load(36, &e.userTimeout)
   483  	stateSourceObject.Load(37, &e.deferAccept)
   484  	stateSourceObject.Load(38, &e.acceptQueue)
   485  	stateSourceObject.LoadWait(39, &e.rcv)
   486  	stateSourceObject.LoadWait(40, &e.snd)
   487  	stateSourceObject.Load(41, &e.connectingAddress)
   488  	stateSourceObject.Load(42, &e.amss)
   489  	stateSourceObject.Load(43, &e.sendTOS)
   490  	stateSourceObject.Load(44, &e.gso)
   491  	stateSourceObject.Load(45, &e.stats)
   492  	stateSourceObject.Load(46, &e.tcpLingerTimeout)
   493  	stateSourceObject.Load(47, &e.closed)
   494  	stateSourceObject.Load(48, &e.txHash)
   495  	stateSourceObject.Load(49, &e.owner)
   496  	stateSourceObject.Load(50, &e.ops)
   497  	stateSourceObject.Load(51, &e.lastOutOfWindowAckTime)
   498  	stateSourceObject.LoadValue(11, new(EndpointState), func(y any) { e.loadState(y.(EndpointState)) })
   499  	stateSourceObject.AfterLoad(e.afterLoad)
   500  }
   501  
   502  func (k *keepalive) StateTypeName() string {
   503  	return "pkg/tcpip/transport/tcp.keepalive"
   504  }
   505  
   506  func (k *keepalive) StateFields() []string {
   507  	return []string{
   508  		"idle",
   509  		"interval",
   510  		"count",
   511  		"unacked",
   512  	}
   513  }
   514  
   515  func (k *keepalive) beforeSave() {}
   516  
   517  // +checklocksignore
   518  func (k *keepalive) StateSave(stateSinkObject state.Sink) {
   519  	k.beforeSave()
   520  	stateSinkObject.Save(0, &k.idle)
   521  	stateSinkObject.Save(1, &k.interval)
   522  	stateSinkObject.Save(2, &k.count)
   523  	stateSinkObject.Save(3, &k.unacked)
   524  }
   525  
   526  func (k *keepalive) afterLoad() {}
   527  
   528  // +checklocksignore
   529  func (k *keepalive) StateLoad(stateSourceObject state.Source) {
   530  	stateSourceObject.Load(0, &k.idle)
   531  	stateSourceObject.Load(1, &k.interval)
   532  	stateSourceObject.Load(2, &k.count)
   533  	stateSourceObject.Load(3, &k.unacked)
   534  }
   535  
   536  func (rc *rackControl) StateTypeName() string {
   537  	return "pkg/tcpip/transport/tcp.rackControl"
   538  }
   539  
   540  func (rc *rackControl) StateFields() []string {
   541  	return []string{
   542  		"TCPRACKState",
   543  		"exitedRecovery",
   544  		"minRTT",
   545  		"tlpRxtOut",
   546  		"tlpHighRxt",
   547  		"snd",
   548  	}
   549  }
   550  
   551  func (rc *rackControl) beforeSave() {}
   552  
   553  // +checklocksignore
   554  func (rc *rackControl) StateSave(stateSinkObject state.Sink) {
   555  	rc.beforeSave()
   556  	stateSinkObject.Save(0, &rc.TCPRACKState)
   557  	stateSinkObject.Save(1, &rc.exitedRecovery)
   558  	stateSinkObject.Save(2, &rc.minRTT)
   559  	stateSinkObject.Save(3, &rc.tlpRxtOut)
   560  	stateSinkObject.Save(4, &rc.tlpHighRxt)
   561  	stateSinkObject.Save(5, &rc.snd)
   562  }
   563  
   564  func (rc *rackControl) afterLoad() {}
   565  
   566  // +checklocksignore
   567  func (rc *rackControl) StateLoad(stateSourceObject state.Source) {
   568  	stateSourceObject.Load(0, &rc.TCPRACKState)
   569  	stateSourceObject.Load(1, &rc.exitedRecovery)
   570  	stateSourceObject.Load(2, &rc.minRTT)
   571  	stateSourceObject.Load(3, &rc.tlpRxtOut)
   572  	stateSourceObject.Load(4, &rc.tlpHighRxt)
   573  	stateSourceObject.Load(5, &rc.snd)
   574  }
   575  
   576  func (r *receiver) StateTypeName() string {
   577  	return "pkg/tcpip/transport/tcp.receiver"
   578  }
   579  
   580  func (r *receiver) StateFields() []string {
   581  	return []string{
   582  		"TCPReceiverState",
   583  		"ep",
   584  		"rcvWnd",
   585  		"rcvWUP",
   586  		"prevBufUsed",
   587  		"closed",
   588  		"pendingRcvdSegments",
   589  		"lastRcvdAckTime",
   590  	}
   591  }
   592  
   593  func (r *receiver) beforeSave() {}
   594  
   595  // +checklocksignore
   596  func (r *receiver) StateSave(stateSinkObject state.Sink) {
   597  	r.beforeSave()
   598  	stateSinkObject.Save(0, &r.TCPReceiverState)
   599  	stateSinkObject.Save(1, &r.ep)
   600  	stateSinkObject.Save(2, &r.rcvWnd)
   601  	stateSinkObject.Save(3, &r.rcvWUP)
   602  	stateSinkObject.Save(4, &r.prevBufUsed)
   603  	stateSinkObject.Save(5, &r.closed)
   604  	stateSinkObject.Save(6, &r.pendingRcvdSegments)
   605  	stateSinkObject.Save(7, &r.lastRcvdAckTime)
   606  }
   607  
   608  func (r *receiver) afterLoad() {}
   609  
   610  // +checklocksignore
   611  func (r *receiver) StateLoad(stateSourceObject state.Source) {
   612  	stateSourceObject.Load(0, &r.TCPReceiverState)
   613  	stateSourceObject.Load(1, &r.ep)
   614  	stateSourceObject.Load(2, &r.rcvWnd)
   615  	stateSourceObject.Load(3, &r.rcvWUP)
   616  	stateSourceObject.Load(4, &r.prevBufUsed)
   617  	stateSourceObject.Load(5, &r.closed)
   618  	stateSourceObject.Load(6, &r.pendingRcvdSegments)
   619  	stateSourceObject.Load(7, &r.lastRcvdAckTime)
   620  }
   621  
   622  func (r *renoState) StateTypeName() string {
   623  	return "pkg/tcpip/transport/tcp.renoState"
   624  }
   625  
   626  func (r *renoState) StateFields() []string {
   627  	return []string{
   628  		"s",
   629  	}
   630  }
   631  
   632  func (r *renoState) beforeSave() {}
   633  
   634  // +checklocksignore
   635  func (r *renoState) StateSave(stateSinkObject state.Sink) {
   636  	r.beforeSave()
   637  	stateSinkObject.Save(0, &r.s)
   638  }
   639  
   640  func (r *renoState) afterLoad() {}
   641  
   642  // +checklocksignore
   643  func (r *renoState) StateLoad(stateSourceObject state.Source) {
   644  	stateSourceObject.Load(0, &r.s)
   645  }
   646  
   647  func (rr *renoRecovery) StateTypeName() string {
   648  	return "pkg/tcpip/transport/tcp.renoRecovery"
   649  }
   650  
   651  func (rr *renoRecovery) StateFields() []string {
   652  	return []string{
   653  		"s",
   654  	}
   655  }
   656  
   657  func (rr *renoRecovery) beforeSave() {}
   658  
   659  // +checklocksignore
   660  func (rr *renoRecovery) StateSave(stateSinkObject state.Sink) {
   661  	rr.beforeSave()
   662  	stateSinkObject.Save(0, &rr.s)
   663  }
   664  
   665  func (rr *renoRecovery) afterLoad() {}
   666  
   667  // +checklocksignore
   668  func (rr *renoRecovery) StateLoad(stateSourceObject state.Source) {
   669  	stateSourceObject.Load(0, &rr.s)
   670  }
   671  
   672  func (sr *sackRecovery) StateTypeName() string {
   673  	return "pkg/tcpip/transport/tcp.sackRecovery"
   674  }
   675  
   676  func (sr *sackRecovery) StateFields() []string {
   677  	return []string{
   678  		"s",
   679  	}
   680  }
   681  
   682  func (sr *sackRecovery) beforeSave() {}
   683  
   684  // +checklocksignore
   685  func (sr *sackRecovery) StateSave(stateSinkObject state.Sink) {
   686  	sr.beforeSave()
   687  	stateSinkObject.Save(0, &sr.s)
   688  }
   689  
   690  func (sr *sackRecovery) afterLoad() {}
   691  
   692  // +checklocksignore
   693  func (sr *sackRecovery) StateLoad(stateSourceObject state.Source) {
   694  	stateSourceObject.Load(0, &sr.s)
   695  }
   696  
   697  func (s *SACKScoreboard) StateTypeName() string {
   698  	return "pkg/tcpip/transport/tcp.SACKScoreboard"
   699  }
   700  
   701  func (s *SACKScoreboard) StateFields() []string {
   702  	return []string{
   703  		"smss",
   704  		"maxSACKED",
   705  	}
   706  }
   707  
   708  func (s *SACKScoreboard) beforeSave() {}
   709  
   710  // +checklocksignore
   711  func (s *SACKScoreboard) StateSave(stateSinkObject state.Sink) {
   712  	s.beforeSave()
   713  	stateSinkObject.Save(0, &s.smss)
   714  	stateSinkObject.Save(1, &s.maxSACKED)
   715  }
   716  
   717  func (s *SACKScoreboard) afterLoad() {}
   718  
   719  // +checklocksignore
   720  func (s *SACKScoreboard) StateLoad(stateSourceObject state.Source) {
   721  	stateSourceObject.Load(0, &s.smss)
   722  	stateSourceObject.Load(1, &s.maxSACKED)
   723  }
   724  
   725  func (s *segment) StateTypeName() string {
   726  	return "pkg/tcpip/transport/tcp.segment"
   727  }
   728  
   729  func (s *segment) StateFields() []string {
   730  	return []string{
   731  		"segmentEntry",
   732  		"segmentRefs",
   733  		"ep",
   734  		"qFlags",
   735  		"pkt",
   736  		"sequenceNumber",
   737  		"ackNumber",
   738  		"flags",
   739  		"window",
   740  		"csum",
   741  		"csumValid",
   742  		"parsedOptions",
   743  		"options",
   744  		"hasNewSACKInfo",
   745  		"rcvdTime",
   746  		"xmitTime",
   747  		"xmitCount",
   748  		"acked",
   749  		"dataMemSize",
   750  		"lost",
   751  	}
   752  }
   753  
   754  func (s *segment) beforeSave() {}
   755  
   756  // +checklocksignore
   757  func (s *segment) StateSave(stateSinkObject state.Sink) {
   758  	s.beforeSave()
   759  	var optionsValue []byte
   760  	optionsValue = s.saveOptions()
   761  	stateSinkObject.SaveValue(12, optionsValue)
   762  	stateSinkObject.Save(0, &s.segmentEntry)
   763  	stateSinkObject.Save(1, &s.segmentRefs)
   764  	stateSinkObject.Save(2, &s.ep)
   765  	stateSinkObject.Save(3, &s.qFlags)
   766  	stateSinkObject.Save(4, &s.pkt)
   767  	stateSinkObject.Save(5, &s.sequenceNumber)
   768  	stateSinkObject.Save(6, &s.ackNumber)
   769  	stateSinkObject.Save(7, &s.flags)
   770  	stateSinkObject.Save(8, &s.window)
   771  	stateSinkObject.Save(9, &s.csum)
   772  	stateSinkObject.Save(10, &s.csumValid)
   773  	stateSinkObject.Save(11, &s.parsedOptions)
   774  	stateSinkObject.Save(13, &s.hasNewSACKInfo)
   775  	stateSinkObject.Save(14, &s.rcvdTime)
   776  	stateSinkObject.Save(15, &s.xmitTime)
   777  	stateSinkObject.Save(16, &s.xmitCount)
   778  	stateSinkObject.Save(17, &s.acked)
   779  	stateSinkObject.Save(18, &s.dataMemSize)
   780  	stateSinkObject.Save(19, &s.lost)
   781  }
   782  
   783  func (s *segment) afterLoad() {}
   784  
   785  // +checklocksignore
   786  func (s *segment) StateLoad(stateSourceObject state.Source) {
   787  	stateSourceObject.Load(0, &s.segmentEntry)
   788  	stateSourceObject.Load(1, &s.segmentRefs)
   789  	stateSourceObject.Load(2, &s.ep)
   790  	stateSourceObject.Load(3, &s.qFlags)
   791  	stateSourceObject.Load(4, &s.pkt)
   792  	stateSourceObject.Load(5, &s.sequenceNumber)
   793  	stateSourceObject.Load(6, &s.ackNumber)
   794  	stateSourceObject.Load(7, &s.flags)
   795  	stateSourceObject.Load(8, &s.window)
   796  	stateSourceObject.Load(9, &s.csum)
   797  	stateSourceObject.Load(10, &s.csumValid)
   798  	stateSourceObject.Load(11, &s.parsedOptions)
   799  	stateSourceObject.Load(13, &s.hasNewSACKInfo)
   800  	stateSourceObject.Load(14, &s.rcvdTime)
   801  	stateSourceObject.Load(15, &s.xmitTime)
   802  	stateSourceObject.Load(16, &s.xmitCount)
   803  	stateSourceObject.Load(17, &s.acked)
   804  	stateSourceObject.Load(18, &s.dataMemSize)
   805  	stateSourceObject.Load(19, &s.lost)
   806  	stateSourceObject.LoadValue(12, new([]byte), func(y any) { s.loadOptions(y.([]byte)) })
   807  }
   808  
   809  func (q *segmentQueue) StateTypeName() string {
   810  	return "pkg/tcpip/transport/tcp.segmentQueue"
   811  }
   812  
   813  func (q *segmentQueue) StateFields() []string {
   814  	return []string{
   815  		"list",
   816  		"ep",
   817  		"frozen",
   818  	}
   819  }
   820  
   821  func (q *segmentQueue) beforeSave() {}
   822  
   823  // +checklocksignore
   824  func (q *segmentQueue) StateSave(stateSinkObject state.Sink) {
   825  	q.beforeSave()
   826  	stateSinkObject.Save(0, &q.list)
   827  	stateSinkObject.Save(1, &q.ep)
   828  	stateSinkObject.Save(2, &q.frozen)
   829  }
   830  
   831  func (q *segmentQueue) afterLoad() {}
   832  
   833  // +checklocksignore
   834  func (q *segmentQueue) StateLoad(stateSourceObject state.Source) {
   835  	stateSourceObject.LoadWait(0, &q.list)
   836  	stateSourceObject.Load(1, &q.ep)
   837  	stateSourceObject.Load(2, &q.frozen)
   838  }
   839  
   840  func (s *sender) StateTypeName() string {
   841  	return "pkg/tcpip/transport/tcp.sender"
   842  }
   843  
   844  func (s *sender) StateFields() []string {
   845  	return []string{
   846  		"TCPSenderState",
   847  		"ep",
   848  		"lr",
   849  		"firstRetransmittedSegXmitTime",
   850  		"writeNext",
   851  		"writeList",
   852  		"rtt",
   853  		"minRTO",
   854  		"maxRTO",
   855  		"maxRetries",
   856  		"gso",
   857  		"state",
   858  		"cc",
   859  		"rc",
   860  		"spuriousRecovery",
   861  		"retransmitTS",
   862  	}
   863  }
   864  
   865  func (s *sender) beforeSave() {}
   866  
   867  // +checklocksignore
   868  func (s *sender) StateSave(stateSinkObject state.Sink) {
   869  	s.beforeSave()
   870  	stateSinkObject.Save(0, &s.TCPSenderState)
   871  	stateSinkObject.Save(1, &s.ep)
   872  	stateSinkObject.Save(2, &s.lr)
   873  	stateSinkObject.Save(3, &s.firstRetransmittedSegXmitTime)
   874  	stateSinkObject.Save(4, &s.writeNext)
   875  	stateSinkObject.Save(5, &s.writeList)
   876  	stateSinkObject.Save(6, &s.rtt)
   877  	stateSinkObject.Save(7, &s.minRTO)
   878  	stateSinkObject.Save(8, &s.maxRTO)
   879  	stateSinkObject.Save(9, &s.maxRetries)
   880  	stateSinkObject.Save(10, &s.gso)
   881  	stateSinkObject.Save(11, &s.state)
   882  	stateSinkObject.Save(12, &s.cc)
   883  	stateSinkObject.Save(13, &s.rc)
   884  	stateSinkObject.Save(14, &s.spuriousRecovery)
   885  	stateSinkObject.Save(15, &s.retransmitTS)
   886  }
   887  
   888  func (s *sender) afterLoad() {}
   889  
   890  // +checklocksignore
   891  func (s *sender) StateLoad(stateSourceObject state.Source) {
   892  	stateSourceObject.Load(0, &s.TCPSenderState)
   893  	stateSourceObject.Load(1, &s.ep)
   894  	stateSourceObject.Load(2, &s.lr)
   895  	stateSourceObject.Load(3, &s.firstRetransmittedSegXmitTime)
   896  	stateSourceObject.Load(4, &s.writeNext)
   897  	stateSourceObject.Load(5, &s.writeList)
   898  	stateSourceObject.Load(6, &s.rtt)
   899  	stateSourceObject.Load(7, &s.minRTO)
   900  	stateSourceObject.Load(8, &s.maxRTO)
   901  	stateSourceObject.Load(9, &s.maxRetries)
   902  	stateSourceObject.Load(10, &s.gso)
   903  	stateSourceObject.Load(11, &s.state)
   904  	stateSourceObject.Load(12, &s.cc)
   905  	stateSourceObject.Load(13, &s.rc)
   906  	stateSourceObject.Load(14, &s.spuriousRecovery)
   907  	stateSourceObject.Load(15, &s.retransmitTS)
   908  }
   909  
   910  func (r *rtt) StateTypeName() string {
   911  	return "pkg/tcpip/transport/tcp.rtt"
   912  }
   913  
   914  func (r *rtt) StateFields() []string {
   915  	return []string{
   916  		"TCPRTTState",
   917  	}
   918  }
   919  
   920  func (r *rtt) beforeSave() {}
   921  
   922  // +checklocksignore
   923  func (r *rtt) StateSave(stateSinkObject state.Sink) {
   924  	r.beforeSave()
   925  	stateSinkObject.Save(0, &r.TCPRTTState)
   926  }
   927  
   928  func (r *rtt) afterLoad() {}
   929  
   930  // +checklocksignore
   931  func (r *rtt) StateLoad(stateSourceObject state.Source) {
   932  	stateSourceObject.Load(0, &r.TCPRTTState)
   933  }
   934  
   935  func (l *endpointList) StateTypeName() string {
   936  	return "pkg/tcpip/transport/tcp.endpointList"
   937  }
   938  
   939  func (l *endpointList) StateFields() []string {
   940  	return []string{
   941  		"head",
   942  		"tail",
   943  	}
   944  }
   945  
   946  func (l *endpointList) beforeSave() {}
   947  
   948  // +checklocksignore
   949  func (l *endpointList) StateSave(stateSinkObject state.Sink) {
   950  	l.beforeSave()
   951  	stateSinkObject.Save(0, &l.head)
   952  	stateSinkObject.Save(1, &l.tail)
   953  }
   954  
   955  func (l *endpointList) afterLoad() {}
   956  
   957  // +checklocksignore
   958  func (l *endpointList) StateLoad(stateSourceObject state.Source) {
   959  	stateSourceObject.Load(0, &l.head)
   960  	stateSourceObject.Load(1, &l.tail)
   961  }
   962  
   963  func (e *endpointEntry) StateTypeName() string {
   964  	return "pkg/tcpip/transport/tcp.endpointEntry"
   965  }
   966  
   967  func (e *endpointEntry) StateFields() []string {
   968  	return []string{
   969  		"next",
   970  		"prev",
   971  	}
   972  }
   973  
   974  func (e *endpointEntry) beforeSave() {}
   975  
   976  // +checklocksignore
   977  func (e *endpointEntry) StateSave(stateSinkObject state.Sink) {
   978  	e.beforeSave()
   979  	stateSinkObject.Save(0, &e.next)
   980  	stateSinkObject.Save(1, &e.prev)
   981  }
   982  
   983  func (e *endpointEntry) afterLoad() {}
   984  
   985  // +checklocksignore
   986  func (e *endpointEntry) StateLoad(stateSourceObject state.Source) {
   987  	stateSourceObject.Load(0, &e.next)
   988  	stateSourceObject.Load(1, &e.prev)
   989  }
   990  
   991  func (l *segmentList) StateTypeName() string {
   992  	return "pkg/tcpip/transport/tcp.segmentList"
   993  }
   994  
   995  func (l *segmentList) StateFields() []string {
   996  	return []string{
   997  		"head",
   998  		"tail",
   999  	}
  1000  }
  1001  
  1002  func (l *segmentList) beforeSave() {}
  1003  
  1004  // +checklocksignore
  1005  func (l *segmentList) StateSave(stateSinkObject state.Sink) {
  1006  	l.beforeSave()
  1007  	stateSinkObject.Save(0, &l.head)
  1008  	stateSinkObject.Save(1, &l.tail)
  1009  }
  1010  
  1011  func (l *segmentList) afterLoad() {}
  1012  
  1013  // +checklocksignore
  1014  func (l *segmentList) StateLoad(stateSourceObject state.Source) {
  1015  	stateSourceObject.Load(0, &l.head)
  1016  	stateSourceObject.Load(1, &l.tail)
  1017  }
  1018  
  1019  func (e *segmentEntry) StateTypeName() string {
  1020  	return "pkg/tcpip/transport/tcp.segmentEntry"
  1021  }
  1022  
  1023  func (e *segmentEntry) StateFields() []string {
  1024  	return []string{
  1025  		"next",
  1026  		"prev",
  1027  	}
  1028  }
  1029  
  1030  func (e *segmentEntry) beforeSave() {}
  1031  
  1032  // +checklocksignore
  1033  func (e *segmentEntry) StateSave(stateSinkObject state.Sink) {
  1034  	e.beforeSave()
  1035  	stateSinkObject.Save(0, &e.next)
  1036  	stateSinkObject.Save(1, &e.prev)
  1037  }
  1038  
  1039  func (e *segmentEntry) afterLoad() {}
  1040  
  1041  // +checklocksignore
  1042  func (e *segmentEntry) StateLoad(stateSourceObject state.Source) {
  1043  	stateSourceObject.Load(0, &e.next)
  1044  	stateSourceObject.Load(1, &e.prev)
  1045  }
  1046  
  1047  func (r *segmentRefs) StateTypeName() string {
  1048  	return "pkg/tcpip/transport/tcp.segmentRefs"
  1049  }
  1050  
  1051  func (r *segmentRefs) StateFields() []string {
  1052  	return []string{
  1053  		"refCount",
  1054  	}
  1055  }
  1056  
  1057  func (r *segmentRefs) beforeSave() {}
  1058  
  1059  // +checklocksignore
  1060  func (r *segmentRefs) StateSave(stateSinkObject state.Sink) {
  1061  	r.beforeSave()
  1062  	stateSinkObject.Save(0, &r.refCount)
  1063  }
  1064  
  1065  // +checklocksignore
  1066  func (r *segmentRefs) StateLoad(stateSourceObject state.Source) {
  1067  	stateSourceObject.Load(0, &r.refCount)
  1068  	stateSourceObject.AfterLoad(r.afterLoad)
  1069  }
  1070  
  1071  func init() {
  1072  	state.Register((*acceptQueue)(nil))
  1073  	state.Register((*handshake)(nil))
  1074  	state.Register((*cubicState)(nil))
  1075  	state.Register((*SACKInfo)(nil))
  1076  	state.Register((*ReceiveErrors)(nil))
  1077  	state.Register((*SendErrors)(nil))
  1078  	state.Register((*Stats)(nil))
  1079  	state.Register((*sndQueueInfo)(nil))
  1080  	state.Register((*endpoint)(nil))
  1081  	state.Register((*keepalive)(nil))
  1082  	state.Register((*rackControl)(nil))
  1083  	state.Register((*receiver)(nil))
  1084  	state.Register((*renoState)(nil))
  1085  	state.Register((*renoRecovery)(nil))
  1086  	state.Register((*sackRecovery)(nil))
  1087  	state.Register((*SACKScoreboard)(nil))
  1088  	state.Register((*segment)(nil))
  1089  	state.Register((*segmentQueue)(nil))
  1090  	state.Register((*sender)(nil))
  1091  	state.Register((*rtt)(nil))
  1092  	state.Register((*endpointList)(nil))
  1093  	state.Register((*endpointEntry)(nil))
  1094  	state.Register((*segmentList)(nil))
  1095  	state.Register((*segmentEntry)(nil))
  1096  	state.Register((*segmentRefs)(nil))
  1097  }