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