github.com/sagernet/gvisor@v0.0.0-20240428053021-e691de28565f/pkg/tcpip/tcpip_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package tcpip 4 5 import ( 6 "context" 7 8 "github.com/sagernet/gvisor/pkg/state" 9 ) 10 11 func (e *ErrAborted) StateTypeName() string { 12 return "pkg/tcpip.ErrAborted" 13 } 14 15 func (e *ErrAborted) StateFields() []string { 16 return []string{} 17 } 18 19 func (e *ErrAborted) beforeSave() {} 20 21 // +checklocksignore 22 func (e *ErrAborted) StateSave(stateSinkObject state.Sink) { 23 e.beforeSave() 24 } 25 26 func (e *ErrAborted) afterLoad(context.Context) {} 27 28 // +checklocksignore 29 func (e *ErrAborted) StateLoad(ctx context.Context, stateSourceObject state.Source) { 30 } 31 32 func (e *ErrAddressFamilyNotSupported) StateTypeName() string { 33 return "pkg/tcpip.ErrAddressFamilyNotSupported" 34 } 35 36 func (e *ErrAddressFamilyNotSupported) StateFields() []string { 37 return []string{} 38 } 39 40 func (e *ErrAddressFamilyNotSupported) beforeSave() {} 41 42 // +checklocksignore 43 func (e *ErrAddressFamilyNotSupported) StateSave(stateSinkObject state.Sink) { 44 e.beforeSave() 45 } 46 47 func (e *ErrAddressFamilyNotSupported) afterLoad(context.Context) {} 48 49 // +checklocksignore 50 func (e *ErrAddressFamilyNotSupported) StateLoad(ctx context.Context, stateSourceObject state.Source) { 51 } 52 53 func (e *ErrAlreadyBound) StateTypeName() string { 54 return "pkg/tcpip.ErrAlreadyBound" 55 } 56 57 func (e *ErrAlreadyBound) StateFields() []string { 58 return []string{} 59 } 60 61 func (e *ErrAlreadyBound) beforeSave() {} 62 63 // +checklocksignore 64 func (e *ErrAlreadyBound) StateSave(stateSinkObject state.Sink) { 65 e.beforeSave() 66 } 67 68 func (e *ErrAlreadyBound) afterLoad(context.Context) {} 69 70 // +checklocksignore 71 func (e *ErrAlreadyBound) StateLoad(ctx context.Context, stateSourceObject state.Source) { 72 } 73 74 func (e *ErrAlreadyConnected) StateTypeName() string { 75 return "pkg/tcpip.ErrAlreadyConnected" 76 } 77 78 func (e *ErrAlreadyConnected) StateFields() []string { 79 return []string{} 80 } 81 82 func (e *ErrAlreadyConnected) beforeSave() {} 83 84 // +checklocksignore 85 func (e *ErrAlreadyConnected) StateSave(stateSinkObject state.Sink) { 86 e.beforeSave() 87 } 88 89 func (e *ErrAlreadyConnected) afterLoad(context.Context) {} 90 91 // +checklocksignore 92 func (e *ErrAlreadyConnected) StateLoad(ctx context.Context, stateSourceObject state.Source) { 93 } 94 95 func (e *ErrAlreadyConnecting) StateTypeName() string { 96 return "pkg/tcpip.ErrAlreadyConnecting" 97 } 98 99 func (e *ErrAlreadyConnecting) StateFields() []string { 100 return []string{} 101 } 102 103 func (e *ErrAlreadyConnecting) beforeSave() {} 104 105 // +checklocksignore 106 func (e *ErrAlreadyConnecting) StateSave(stateSinkObject state.Sink) { 107 e.beforeSave() 108 } 109 110 func (e *ErrAlreadyConnecting) afterLoad(context.Context) {} 111 112 // +checklocksignore 113 func (e *ErrAlreadyConnecting) StateLoad(ctx context.Context, stateSourceObject state.Source) { 114 } 115 116 func (e *ErrBadAddress) StateTypeName() string { 117 return "pkg/tcpip.ErrBadAddress" 118 } 119 120 func (e *ErrBadAddress) StateFields() []string { 121 return []string{} 122 } 123 124 func (e *ErrBadAddress) beforeSave() {} 125 126 // +checklocksignore 127 func (e *ErrBadAddress) StateSave(stateSinkObject state.Sink) { 128 e.beforeSave() 129 } 130 131 func (e *ErrBadAddress) afterLoad(context.Context) {} 132 133 // +checklocksignore 134 func (e *ErrBadAddress) StateLoad(ctx context.Context, stateSourceObject state.Source) { 135 } 136 137 func (e *ErrBadBuffer) StateTypeName() string { 138 return "pkg/tcpip.ErrBadBuffer" 139 } 140 141 func (e *ErrBadBuffer) StateFields() []string { 142 return []string{} 143 } 144 145 func (e *ErrBadBuffer) beforeSave() {} 146 147 // +checklocksignore 148 func (e *ErrBadBuffer) StateSave(stateSinkObject state.Sink) { 149 e.beforeSave() 150 } 151 152 func (e *ErrBadBuffer) afterLoad(context.Context) {} 153 154 // +checklocksignore 155 func (e *ErrBadBuffer) StateLoad(ctx context.Context, stateSourceObject state.Source) { 156 } 157 158 func (e *ErrBadLocalAddress) StateTypeName() string { 159 return "pkg/tcpip.ErrBadLocalAddress" 160 } 161 162 func (e *ErrBadLocalAddress) StateFields() []string { 163 return []string{} 164 } 165 166 func (e *ErrBadLocalAddress) beforeSave() {} 167 168 // +checklocksignore 169 func (e *ErrBadLocalAddress) StateSave(stateSinkObject state.Sink) { 170 e.beforeSave() 171 } 172 173 func (e *ErrBadLocalAddress) afterLoad(context.Context) {} 174 175 // +checklocksignore 176 func (e *ErrBadLocalAddress) StateLoad(ctx context.Context, stateSourceObject state.Source) { 177 } 178 179 func (e *ErrBroadcastDisabled) StateTypeName() string { 180 return "pkg/tcpip.ErrBroadcastDisabled" 181 } 182 183 func (e *ErrBroadcastDisabled) StateFields() []string { 184 return []string{} 185 } 186 187 func (e *ErrBroadcastDisabled) beforeSave() {} 188 189 // +checklocksignore 190 func (e *ErrBroadcastDisabled) StateSave(stateSinkObject state.Sink) { 191 e.beforeSave() 192 } 193 194 func (e *ErrBroadcastDisabled) afterLoad(context.Context) {} 195 196 // +checklocksignore 197 func (e *ErrBroadcastDisabled) StateLoad(ctx context.Context, stateSourceObject state.Source) { 198 } 199 200 func (e *ErrClosedForReceive) StateTypeName() string { 201 return "pkg/tcpip.ErrClosedForReceive" 202 } 203 204 func (e *ErrClosedForReceive) StateFields() []string { 205 return []string{} 206 } 207 208 func (e *ErrClosedForReceive) beforeSave() {} 209 210 // +checklocksignore 211 func (e *ErrClosedForReceive) StateSave(stateSinkObject state.Sink) { 212 e.beforeSave() 213 } 214 215 func (e *ErrClosedForReceive) afterLoad(context.Context) {} 216 217 // +checklocksignore 218 func (e *ErrClosedForReceive) StateLoad(ctx context.Context, stateSourceObject state.Source) { 219 } 220 221 func (e *ErrClosedForSend) StateTypeName() string { 222 return "pkg/tcpip.ErrClosedForSend" 223 } 224 225 func (e *ErrClosedForSend) StateFields() []string { 226 return []string{} 227 } 228 229 func (e *ErrClosedForSend) beforeSave() {} 230 231 // +checklocksignore 232 func (e *ErrClosedForSend) StateSave(stateSinkObject state.Sink) { 233 e.beforeSave() 234 } 235 236 func (e *ErrClosedForSend) afterLoad(context.Context) {} 237 238 // +checklocksignore 239 func (e *ErrClosedForSend) StateLoad(ctx context.Context, stateSourceObject state.Source) { 240 } 241 242 func (e *ErrConnectStarted) StateTypeName() string { 243 return "pkg/tcpip.ErrConnectStarted" 244 } 245 246 func (e *ErrConnectStarted) StateFields() []string { 247 return []string{} 248 } 249 250 func (e *ErrConnectStarted) beforeSave() {} 251 252 // +checklocksignore 253 func (e *ErrConnectStarted) StateSave(stateSinkObject state.Sink) { 254 e.beforeSave() 255 } 256 257 func (e *ErrConnectStarted) afterLoad(context.Context) {} 258 259 // +checklocksignore 260 func (e *ErrConnectStarted) StateLoad(ctx context.Context, stateSourceObject state.Source) { 261 } 262 263 func (e *ErrConnectionAborted) StateTypeName() string { 264 return "pkg/tcpip.ErrConnectionAborted" 265 } 266 267 func (e *ErrConnectionAborted) StateFields() []string { 268 return []string{} 269 } 270 271 func (e *ErrConnectionAborted) beforeSave() {} 272 273 // +checklocksignore 274 func (e *ErrConnectionAborted) StateSave(stateSinkObject state.Sink) { 275 e.beforeSave() 276 } 277 278 func (e *ErrConnectionAborted) afterLoad(context.Context) {} 279 280 // +checklocksignore 281 func (e *ErrConnectionAborted) StateLoad(ctx context.Context, stateSourceObject state.Source) { 282 } 283 284 func (e *ErrConnectionRefused) StateTypeName() string { 285 return "pkg/tcpip.ErrConnectionRefused" 286 } 287 288 func (e *ErrConnectionRefused) StateFields() []string { 289 return []string{} 290 } 291 292 func (e *ErrConnectionRefused) beforeSave() {} 293 294 // +checklocksignore 295 func (e *ErrConnectionRefused) StateSave(stateSinkObject state.Sink) { 296 e.beforeSave() 297 } 298 299 func (e *ErrConnectionRefused) afterLoad(context.Context) {} 300 301 // +checklocksignore 302 func (e *ErrConnectionRefused) StateLoad(ctx context.Context, stateSourceObject state.Source) { 303 } 304 305 func (e *ErrConnectionReset) StateTypeName() string { 306 return "pkg/tcpip.ErrConnectionReset" 307 } 308 309 func (e *ErrConnectionReset) StateFields() []string { 310 return []string{} 311 } 312 313 func (e *ErrConnectionReset) beforeSave() {} 314 315 // +checklocksignore 316 func (e *ErrConnectionReset) StateSave(stateSinkObject state.Sink) { 317 e.beforeSave() 318 } 319 320 func (e *ErrConnectionReset) afterLoad(context.Context) {} 321 322 // +checklocksignore 323 func (e *ErrConnectionReset) StateLoad(ctx context.Context, stateSourceObject state.Source) { 324 } 325 326 func (e *ErrDestinationRequired) StateTypeName() string { 327 return "pkg/tcpip.ErrDestinationRequired" 328 } 329 330 func (e *ErrDestinationRequired) StateFields() []string { 331 return []string{} 332 } 333 334 func (e *ErrDestinationRequired) beforeSave() {} 335 336 // +checklocksignore 337 func (e *ErrDestinationRequired) StateSave(stateSinkObject state.Sink) { 338 e.beforeSave() 339 } 340 341 func (e *ErrDestinationRequired) afterLoad(context.Context) {} 342 343 // +checklocksignore 344 func (e *ErrDestinationRequired) StateLoad(ctx context.Context, stateSourceObject state.Source) { 345 } 346 347 func (e *ErrDuplicateAddress) StateTypeName() string { 348 return "pkg/tcpip.ErrDuplicateAddress" 349 } 350 351 func (e *ErrDuplicateAddress) StateFields() []string { 352 return []string{} 353 } 354 355 func (e *ErrDuplicateAddress) beforeSave() {} 356 357 // +checklocksignore 358 func (e *ErrDuplicateAddress) StateSave(stateSinkObject state.Sink) { 359 e.beforeSave() 360 } 361 362 func (e *ErrDuplicateAddress) afterLoad(context.Context) {} 363 364 // +checklocksignore 365 func (e *ErrDuplicateAddress) StateLoad(ctx context.Context, stateSourceObject state.Source) { 366 } 367 368 func (e *ErrDuplicateNICID) StateTypeName() string { 369 return "pkg/tcpip.ErrDuplicateNICID" 370 } 371 372 func (e *ErrDuplicateNICID) StateFields() []string { 373 return []string{} 374 } 375 376 func (e *ErrDuplicateNICID) beforeSave() {} 377 378 // +checklocksignore 379 func (e *ErrDuplicateNICID) StateSave(stateSinkObject state.Sink) { 380 e.beforeSave() 381 } 382 383 func (e *ErrDuplicateNICID) afterLoad(context.Context) {} 384 385 // +checklocksignore 386 func (e *ErrDuplicateNICID) StateLoad(ctx context.Context, stateSourceObject state.Source) { 387 } 388 389 func (e *ErrInvalidEndpointState) StateTypeName() string { 390 return "pkg/tcpip.ErrInvalidEndpointState" 391 } 392 393 func (e *ErrInvalidEndpointState) StateFields() []string { 394 return []string{} 395 } 396 397 func (e *ErrInvalidEndpointState) beforeSave() {} 398 399 // +checklocksignore 400 func (e *ErrInvalidEndpointState) StateSave(stateSinkObject state.Sink) { 401 e.beforeSave() 402 } 403 404 func (e *ErrInvalidEndpointState) afterLoad(context.Context) {} 405 406 // +checklocksignore 407 func (e *ErrInvalidEndpointState) StateLoad(ctx context.Context, stateSourceObject state.Source) { 408 } 409 410 func (e *ErrInvalidOptionValue) StateTypeName() string { 411 return "pkg/tcpip.ErrInvalidOptionValue" 412 } 413 414 func (e *ErrInvalidOptionValue) StateFields() []string { 415 return []string{} 416 } 417 418 func (e *ErrInvalidOptionValue) beforeSave() {} 419 420 // +checklocksignore 421 func (e *ErrInvalidOptionValue) StateSave(stateSinkObject state.Sink) { 422 e.beforeSave() 423 } 424 425 func (e *ErrInvalidOptionValue) afterLoad(context.Context) {} 426 427 // +checklocksignore 428 func (e *ErrInvalidOptionValue) StateLoad(ctx context.Context, stateSourceObject state.Source) { 429 } 430 431 func (e *ErrInvalidPortRange) StateTypeName() string { 432 return "pkg/tcpip.ErrInvalidPortRange" 433 } 434 435 func (e *ErrInvalidPortRange) StateFields() []string { 436 return []string{} 437 } 438 439 func (e *ErrInvalidPortRange) beforeSave() {} 440 441 // +checklocksignore 442 func (e *ErrInvalidPortRange) StateSave(stateSinkObject state.Sink) { 443 e.beforeSave() 444 } 445 446 func (e *ErrInvalidPortRange) afterLoad(context.Context) {} 447 448 // +checklocksignore 449 func (e *ErrInvalidPortRange) StateLoad(ctx context.Context, stateSourceObject state.Source) { 450 } 451 452 func (e *ErrMalformedHeader) StateTypeName() string { 453 return "pkg/tcpip.ErrMalformedHeader" 454 } 455 456 func (e *ErrMalformedHeader) StateFields() []string { 457 return []string{} 458 } 459 460 func (e *ErrMalformedHeader) beforeSave() {} 461 462 // +checklocksignore 463 func (e *ErrMalformedHeader) StateSave(stateSinkObject state.Sink) { 464 e.beforeSave() 465 } 466 467 func (e *ErrMalformedHeader) afterLoad(context.Context) {} 468 469 // +checklocksignore 470 func (e *ErrMalformedHeader) StateLoad(ctx context.Context, stateSourceObject state.Source) { 471 } 472 473 func (e *ErrMessageTooLong) StateTypeName() string { 474 return "pkg/tcpip.ErrMessageTooLong" 475 } 476 477 func (e *ErrMessageTooLong) StateFields() []string { 478 return []string{} 479 } 480 481 func (e *ErrMessageTooLong) beforeSave() {} 482 483 // +checklocksignore 484 func (e *ErrMessageTooLong) StateSave(stateSinkObject state.Sink) { 485 e.beforeSave() 486 } 487 488 func (e *ErrMessageTooLong) afterLoad(context.Context) {} 489 490 // +checklocksignore 491 func (e *ErrMessageTooLong) StateLoad(ctx context.Context, stateSourceObject state.Source) { 492 } 493 494 func (e *ErrNetworkUnreachable) StateTypeName() string { 495 return "pkg/tcpip.ErrNetworkUnreachable" 496 } 497 498 func (e *ErrNetworkUnreachable) StateFields() []string { 499 return []string{} 500 } 501 502 func (e *ErrNetworkUnreachable) beforeSave() {} 503 504 // +checklocksignore 505 func (e *ErrNetworkUnreachable) StateSave(stateSinkObject state.Sink) { 506 e.beforeSave() 507 } 508 509 func (e *ErrNetworkUnreachable) afterLoad(context.Context) {} 510 511 // +checklocksignore 512 func (e *ErrNetworkUnreachable) StateLoad(ctx context.Context, stateSourceObject state.Source) { 513 } 514 515 func (e *ErrNoBufferSpace) StateTypeName() string { 516 return "pkg/tcpip.ErrNoBufferSpace" 517 } 518 519 func (e *ErrNoBufferSpace) StateFields() []string { 520 return []string{} 521 } 522 523 func (e *ErrNoBufferSpace) beforeSave() {} 524 525 // +checklocksignore 526 func (e *ErrNoBufferSpace) StateSave(stateSinkObject state.Sink) { 527 e.beforeSave() 528 } 529 530 func (e *ErrNoBufferSpace) afterLoad(context.Context) {} 531 532 // +checklocksignore 533 func (e *ErrNoBufferSpace) StateLoad(ctx context.Context, stateSourceObject state.Source) { 534 } 535 536 func (e *ErrNoPortAvailable) StateTypeName() string { 537 return "pkg/tcpip.ErrNoPortAvailable" 538 } 539 540 func (e *ErrNoPortAvailable) StateFields() []string { 541 return []string{} 542 } 543 544 func (e *ErrNoPortAvailable) beforeSave() {} 545 546 // +checklocksignore 547 func (e *ErrNoPortAvailable) StateSave(stateSinkObject state.Sink) { 548 e.beforeSave() 549 } 550 551 func (e *ErrNoPortAvailable) afterLoad(context.Context) {} 552 553 // +checklocksignore 554 func (e *ErrNoPortAvailable) StateLoad(ctx context.Context, stateSourceObject state.Source) { 555 } 556 557 func (e *ErrHostUnreachable) StateTypeName() string { 558 return "pkg/tcpip.ErrHostUnreachable" 559 } 560 561 func (e *ErrHostUnreachable) StateFields() []string { 562 return []string{} 563 } 564 565 func (e *ErrHostUnreachable) beforeSave() {} 566 567 // +checklocksignore 568 func (e *ErrHostUnreachable) StateSave(stateSinkObject state.Sink) { 569 e.beforeSave() 570 } 571 572 func (e *ErrHostUnreachable) afterLoad(context.Context) {} 573 574 // +checklocksignore 575 func (e *ErrHostUnreachable) StateLoad(ctx context.Context, stateSourceObject state.Source) { 576 } 577 578 func (e *ErrHostDown) StateTypeName() string { 579 return "pkg/tcpip.ErrHostDown" 580 } 581 582 func (e *ErrHostDown) StateFields() []string { 583 return []string{} 584 } 585 586 func (e *ErrHostDown) beforeSave() {} 587 588 // +checklocksignore 589 func (e *ErrHostDown) StateSave(stateSinkObject state.Sink) { 590 e.beforeSave() 591 } 592 593 func (e *ErrHostDown) afterLoad(context.Context) {} 594 595 // +checklocksignore 596 func (e *ErrHostDown) StateLoad(ctx context.Context, stateSourceObject state.Source) { 597 } 598 599 func (e *ErrNoNet) StateTypeName() string { 600 return "pkg/tcpip.ErrNoNet" 601 } 602 603 func (e *ErrNoNet) StateFields() []string { 604 return []string{} 605 } 606 607 func (e *ErrNoNet) beforeSave() {} 608 609 // +checklocksignore 610 func (e *ErrNoNet) StateSave(stateSinkObject state.Sink) { 611 e.beforeSave() 612 } 613 614 func (e *ErrNoNet) afterLoad(context.Context) {} 615 616 // +checklocksignore 617 func (e *ErrNoNet) StateLoad(ctx context.Context, stateSourceObject state.Source) { 618 } 619 620 func (e *ErrNoSuchFile) StateTypeName() string { 621 return "pkg/tcpip.ErrNoSuchFile" 622 } 623 624 func (e *ErrNoSuchFile) StateFields() []string { 625 return []string{} 626 } 627 628 func (e *ErrNoSuchFile) beforeSave() {} 629 630 // +checklocksignore 631 func (e *ErrNoSuchFile) StateSave(stateSinkObject state.Sink) { 632 e.beforeSave() 633 } 634 635 func (e *ErrNoSuchFile) afterLoad(context.Context) {} 636 637 // +checklocksignore 638 func (e *ErrNoSuchFile) StateLoad(ctx context.Context, stateSourceObject state.Source) { 639 } 640 641 func (e *ErrNotConnected) StateTypeName() string { 642 return "pkg/tcpip.ErrNotConnected" 643 } 644 645 func (e *ErrNotConnected) StateFields() []string { 646 return []string{} 647 } 648 649 func (e *ErrNotConnected) beforeSave() {} 650 651 // +checklocksignore 652 func (e *ErrNotConnected) StateSave(stateSinkObject state.Sink) { 653 e.beforeSave() 654 } 655 656 func (e *ErrNotConnected) afterLoad(context.Context) {} 657 658 // +checklocksignore 659 func (e *ErrNotConnected) StateLoad(ctx context.Context, stateSourceObject state.Source) { 660 } 661 662 func (e *ErrNotPermitted) StateTypeName() string { 663 return "pkg/tcpip.ErrNotPermitted" 664 } 665 666 func (e *ErrNotPermitted) StateFields() []string { 667 return []string{} 668 } 669 670 func (e *ErrNotPermitted) beforeSave() {} 671 672 // +checklocksignore 673 func (e *ErrNotPermitted) StateSave(stateSinkObject state.Sink) { 674 e.beforeSave() 675 } 676 677 func (e *ErrNotPermitted) afterLoad(context.Context) {} 678 679 // +checklocksignore 680 func (e *ErrNotPermitted) StateLoad(ctx context.Context, stateSourceObject state.Source) { 681 } 682 683 func (e *ErrNotSupported) StateTypeName() string { 684 return "pkg/tcpip.ErrNotSupported" 685 } 686 687 func (e *ErrNotSupported) StateFields() []string { 688 return []string{} 689 } 690 691 func (e *ErrNotSupported) beforeSave() {} 692 693 // +checklocksignore 694 func (e *ErrNotSupported) StateSave(stateSinkObject state.Sink) { 695 e.beforeSave() 696 } 697 698 func (e *ErrNotSupported) afterLoad(context.Context) {} 699 700 // +checklocksignore 701 func (e *ErrNotSupported) StateLoad(ctx context.Context, stateSourceObject state.Source) { 702 } 703 704 func (e *ErrPortInUse) StateTypeName() string { 705 return "pkg/tcpip.ErrPortInUse" 706 } 707 708 func (e *ErrPortInUse) StateFields() []string { 709 return []string{} 710 } 711 712 func (e *ErrPortInUse) beforeSave() {} 713 714 // +checklocksignore 715 func (e *ErrPortInUse) StateSave(stateSinkObject state.Sink) { 716 e.beforeSave() 717 } 718 719 func (e *ErrPortInUse) afterLoad(context.Context) {} 720 721 // +checklocksignore 722 func (e *ErrPortInUse) StateLoad(ctx context.Context, stateSourceObject state.Source) { 723 } 724 725 func (e *ErrQueueSizeNotSupported) StateTypeName() string { 726 return "pkg/tcpip.ErrQueueSizeNotSupported" 727 } 728 729 func (e *ErrQueueSizeNotSupported) StateFields() []string { 730 return []string{} 731 } 732 733 func (e *ErrQueueSizeNotSupported) beforeSave() {} 734 735 // +checklocksignore 736 func (e *ErrQueueSizeNotSupported) StateSave(stateSinkObject state.Sink) { 737 e.beforeSave() 738 } 739 740 func (e *ErrQueueSizeNotSupported) afterLoad(context.Context) {} 741 742 // +checklocksignore 743 func (e *ErrQueueSizeNotSupported) StateLoad(ctx context.Context, stateSourceObject state.Source) { 744 } 745 746 func (e *ErrTimeout) StateTypeName() string { 747 return "pkg/tcpip.ErrTimeout" 748 } 749 750 func (e *ErrTimeout) StateFields() []string { 751 return []string{} 752 } 753 754 func (e *ErrTimeout) beforeSave() {} 755 756 // +checklocksignore 757 func (e *ErrTimeout) StateSave(stateSinkObject state.Sink) { 758 e.beforeSave() 759 } 760 761 func (e *ErrTimeout) afterLoad(context.Context) {} 762 763 // +checklocksignore 764 func (e *ErrTimeout) StateLoad(ctx context.Context, stateSourceObject state.Source) { 765 } 766 767 func (e *ErrUnknownDevice) StateTypeName() string { 768 return "pkg/tcpip.ErrUnknownDevice" 769 } 770 771 func (e *ErrUnknownDevice) StateFields() []string { 772 return []string{} 773 } 774 775 func (e *ErrUnknownDevice) beforeSave() {} 776 777 // +checklocksignore 778 func (e *ErrUnknownDevice) StateSave(stateSinkObject state.Sink) { 779 e.beforeSave() 780 } 781 782 func (e *ErrUnknownDevice) afterLoad(context.Context) {} 783 784 // +checklocksignore 785 func (e *ErrUnknownDevice) StateLoad(ctx context.Context, stateSourceObject state.Source) { 786 } 787 788 func (e *ErrUnknownNICID) StateTypeName() string { 789 return "pkg/tcpip.ErrUnknownNICID" 790 } 791 792 func (e *ErrUnknownNICID) StateFields() []string { 793 return []string{} 794 } 795 796 func (e *ErrUnknownNICID) beforeSave() {} 797 798 // +checklocksignore 799 func (e *ErrUnknownNICID) StateSave(stateSinkObject state.Sink) { 800 e.beforeSave() 801 } 802 803 func (e *ErrUnknownNICID) afterLoad(context.Context) {} 804 805 // +checklocksignore 806 func (e *ErrUnknownNICID) StateLoad(ctx context.Context, stateSourceObject state.Source) { 807 } 808 809 func (e *ErrUnknownProtocol) StateTypeName() string { 810 return "pkg/tcpip.ErrUnknownProtocol" 811 } 812 813 func (e *ErrUnknownProtocol) StateFields() []string { 814 return []string{} 815 } 816 817 func (e *ErrUnknownProtocol) beforeSave() {} 818 819 // +checklocksignore 820 func (e *ErrUnknownProtocol) StateSave(stateSinkObject state.Sink) { 821 e.beforeSave() 822 } 823 824 func (e *ErrUnknownProtocol) afterLoad(context.Context) {} 825 826 // +checklocksignore 827 func (e *ErrUnknownProtocol) StateLoad(ctx context.Context, stateSourceObject state.Source) { 828 } 829 830 func (e *ErrUnknownProtocolOption) StateTypeName() string { 831 return "pkg/tcpip.ErrUnknownProtocolOption" 832 } 833 834 func (e *ErrUnknownProtocolOption) StateFields() []string { 835 return []string{} 836 } 837 838 func (e *ErrUnknownProtocolOption) beforeSave() {} 839 840 // +checklocksignore 841 func (e *ErrUnknownProtocolOption) StateSave(stateSinkObject state.Sink) { 842 e.beforeSave() 843 } 844 845 func (e *ErrUnknownProtocolOption) afterLoad(context.Context) {} 846 847 // +checklocksignore 848 func (e *ErrUnknownProtocolOption) StateLoad(ctx context.Context, stateSourceObject state.Source) { 849 } 850 851 func (e *ErrWouldBlock) StateTypeName() string { 852 return "pkg/tcpip.ErrWouldBlock" 853 } 854 855 func (e *ErrWouldBlock) StateFields() []string { 856 return []string{} 857 } 858 859 func (e *ErrWouldBlock) beforeSave() {} 860 861 // +checklocksignore 862 func (e *ErrWouldBlock) StateSave(stateSinkObject state.Sink) { 863 e.beforeSave() 864 } 865 866 func (e *ErrWouldBlock) afterLoad(context.Context) {} 867 868 // +checklocksignore 869 func (e *ErrWouldBlock) StateLoad(ctx context.Context, stateSourceObject state.Source) { 870 } 871 872 func (e *ErrMissingRequiredFields) StateTypeName() string { 873 return "pkg/tcpip.ErrMissingRequiredFields" 874 } 875 876 func (e *ErrMissingRequiredFields) StateFields() []string { 877 return []string{} 878 } 879 880 func (e *ErrMissingRequiredFields) beforeSave() {} 881 882 // +checklocksignore 883 func (e *ErrMissingRequiredFields) StateSave(stateSinkObject state.Sink) { 884 e.beforeSave() 885 } 886 887 func (e *ErrMissingRequiredFields) afterLoad(context.Context) {} 888 889 // +checklocksignore 890 func (e *ErrMissingRequiredFields) StateLoad(ctx context.Context, stateSourceObject state.Source) { 891 } 892 893 func (e *ErrMulticastInputCannotBeOutput) StateTypeName() string { 894 return "pkg/tcpip.ErrMulticastInputCannotBeOutput" 895 } 896 897 func (e *ErrMulticastInputCannotBeOutput) StateFields() []string { 898 return []string{} 899 } 900 901 func (e *ErrMulticastInputCannotBeOutput) beforeSave() {} 902 903 // +checklocksignore 904 func (e *ErrMulticastInputCannotBeOutput) StateSave(stateSinkObject state.Sink) { 905 e.beforeSave() 906 } 907 908 func (e *ErrMulticastInputCannotBeOutput) afterLoad(context.Context) {} 909 910 // +checklocksignore 911 func (e *ErrMulticastInputCannotBeOutput) StateLoad(ctx context.Context, stateSourceObject state.Source) { 912 } 913 914 func (l *sockErrorList) StateTypeName() string { 915 return "pkg/tcpip.sockErrorList" 916 } 917 918 func (l *sockErrorList) StateFields() []string { 919 return []string{ 920 "head", 921 "tail", 922 } 923 } 924 925 func (l *sockErrorList) beforeSave() {} 926 927 // +checklocksignore 928 func (l *sockErrorList) StateSave(stateSinkObject state.Sink) { 929 l.beforeSave() 930 stateSinkObject.Save(0, &l.head) 931 stateSinkObject.Save(1, &l.tail) 932 } 933 934 func (l *sockErrorList) afterLoad(context.Context) {} 935 936 // +checklocksignore 937 func (l *sockErrorList) StateLoad(ctx context.Context, stateSourceObject state.Source) { 938 stateSourceObject.Load(0, &l.head) 939 stateSourceObject.Load(1, &l.tail) 940 } 941 942 func (e *sockErrorEntry) StateTypeName() string { 943 return "pkg/tcpip.sockErrorEntry" 944 } 945 946 func (e *sockErrorEntry) StateFields() []string { 947 return []string{ 948 "next", 949 "prev", 950 } 951 } 952 953 func (e *sockErrorEntry) beforeSave() {} 954 955 // +checklocksignore 956 func (e *sockErrorEntry) StateSave(stateSinkObject state.Sink) { 957 e.beforeSave() 958 stateSinkObject.Save(0, &e.next) 959 stateSinkObject.Save(1, &e.prev) 960 } 961 962 func (e *sockErrorEntry) afterLoad(context.Context) {} 963 964 // +checklocksignore 965 func (e *sockErrorEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) { 966 stateSourceObject.Load(0, &e.next) 967 stateSourceObject.Load(1, &e.prev) 968 } 969 970 func (so *SocketOptions) StateTypeName() string { 971 return "pkg/tcpip.SocketOptions" 972 } 973 974 func (so *SocketOptions) StateFields() []string { 975 return []string{ 976 "handler", 977 "broadcastEnabled", 978 "passCredEnabled", 979 "noChecksumEnabled", 980 "reuseAddressEnabled", 981 "reusePortEnabled", 982 "keepAliveEnabled", 983 "multicastLoopEnabled", 984 "receiveTOSEnabled", 985 "receiveTTLEnabled", 986 "receiveHopLimitEnabled", 987 "receiveTClassEnabled", 988 "receivePacketInfoEnabled", 989 "receiveIPv6PacketInfoEnabled", 990 "hdrIncludedEnabled", 991 "v6OnlyEnabled", 992 "quickAckEnabled", 993 "delayOptionEnabled", 994 "corkOptionEnabled", 995 "receiveOriginalDstAddress", 996 "ipv4RecvErrEnabled", 997 "ipv6RecvErrEnabled", 998 "errQueue", 999 "bindToDevice", 1000 "sendBufferSize", 1001 "receiveBufferSize", 1002 "linger", 1003 "rcvlowat", 1004 } 1005 } 1006 1007 func (so *SocketOptions) beforeSave() {} 1008 1009 // +checklocksignore 1010 func (so *SocketOptions) StateSave(stateSinkObject state.Sink) { 1011 so.beforeSave() 1012 stateSinkObject.Save(0, &so.handler) 1013 stateSinkObject.Save(1, &so.broadcastEnabled) 1014 stateSinkObject.Save(2, &so.passCredEnabled) 1015 stateSinkObject.Save(3, &so.noChecksumEnabled) 1016 stateSinkObject.Save(4, &so.reuseAddressEnabled) 1017 stateSinkObject.Save(5, &so.reusePortEnabled) 1018 stateSinkObject.Save(6, &so.keepAliveEnabled) 1019 stateSinkObject.Save(7, &so.multicastLoopEnabled) 1020 stateSinkObject.Save(8, &so.receiveTOSEnabled) 1021 stateSinkObject.Save(9, &so.receiveTTLEnabled) 1022 stateSinkObject.Save(10, &so.receiveHopLimitEnabled) 1023 stateSinkObject.Save(11, &so.receiveTClassEnabled) 1024 stateSinkObject.Save(12, &so.receivePacketInfoEnabled) 1025 stateSinkObject.Save(13, &so.receiveIPv6PacketInfoEnabled) 1026 stateSinkObject.Save(14, &so.hdrIncludedEnabled) 1027 stateSinkObject.Save(15, &so.v6OnlyEnabled) 1028 stateSinkObject.Save(16, &so.quickAckEnabled) 1029 stateSinkObject.Save(17, &so.delayOptionEnabled) 1030 stateSinkObject.Save(18, &so.corkOptionEnabled) 1031 stateSinkObject.Save(19, &so.receiveOriginalDstAddress) 1032 stateSinkObject.Save(20, &so.ipv4RecvErrEnabled) 1033 stateSinkObject.Save(21, &so.ipv6RecvErrEnabled) 1034 stateSinkObject.Save(22, &so.errQueue) 1035 stateSinkObject.Save(23, &so.bindToDevice) 1036 stateSinkObject.Save(24, &so.sendBufferSize) 1037 stateSinkObject.Save(25, &so.receiveBufferSize) 1038 stateSinkObject.Save(26, &so.linger) 1039 stateSinkObject.Save(27, &so.rcvlowat) 1040 } 1041 1042 func (so *SocketOptions) afterLoad(context.Context) {} 1043 1044 // +checklocksignore 1045 func (so *SocketOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1046 stateSourceObject.Load(0, &so.handler) 1047 stateSourceObject.Load(1, &so.broadcastEnabled) 1048 stateSourceObject.Load(2, &so.passCredEnabled) 1049 stateSourceObject.Load(3, &so.noChecksumEnabled) 1050 stateSourceObject.Load(4, &so.reuseAddressEnabled) 1051 stateSourceObject.Load(5, &so.reusePortEnabled) 1052 stateSourceObject.Load(6, &so.keepAliveEnabled) 1053 stateSourceObject.Load(7, &so.multicastLoopEnabled) 1054 stateSourceObject.Load(8, &so.receiveTOSEnabled) 1055 stateSourceObject.Load(9, &so.receiveTTLEnabled) 1056 stateSourceObject.Load(10, &so.receiveHopLimitEnabled) 1057 stateSourceObject.Load(11, &so.receiveTClassEnabled) 1058 stateSourceObject.Load(12, &so.receivePacketInfoEnabled) 1059 stateSourceObject.Load(13, &so.receiveIPv6PacketInfoEnabled) 1060 stateSourceObject.Load(14, &so.hdrIncludedEnabled) 1061 stateSourceObject.Load(15, &so.v6OnlyEnabled) 1062 stateSourceObject.Load(16, &so.quickAckEnabled) 1063 stateSourceObject.Load(17, &so.delayOptionEnabled) 1064 stateSourceObject.Load(18, &so.corkOptionEnabled) 1065 stateSourceObject.Load(19, &so.receiveOriginalDstAddress) 1066 stateSourceObject.Load(20, &so.ipv4RecvErrEnabled) 1067 stateSourceObject.Load(21, &so.ipv6RecvErrEnabled) 1068 stateSourceObject.Load(22, &so.errQueue) 1069 stateSourceObject.Load(23, &so.bindToDevice) 1070 stateSourceObject.Load(24, &so.sendBufferSize) 1071 stateSourceObject.Load(25, &so.receiveBufferSize) 1072 stateSourceObject.Load(26, &so.linger) 1073 stateSourceObject.Load(27, &so.rcvlowat) 1074 } 1075 1076 func (l *LocalSockError) StateTypeName() string { 1077 return "pkg/tcpip.LocalSockError" 1078 } 1079 1080 func (l *LocalSockError) StateFields() []string { 1081 return []string{ 1082 "info", 1083 } 1084 } 1085 1086 func (l *LocalSockError) beforeSave() {} 1087 1088 // +checklocksignore 1089 func (l *LocalSockError) StateSave(stateSinkObject state.Sink) { 1090 l.beforeSave() 1091 stateSinkObject.Save(0, &l.info) 1092 } 1093 1094 func (l *LocalSockError) afterLoad(context.Context) {} 1095 1096 // +checklocksignore 1097 func (l *LocalSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1098 stateSourceObject.Load(0, &l.info) 1099 } 1100 1101 func (s *SockError) StateTypeName() string { 1102 return "pkg/tcpip.SockError" 1103 } 1104 1105 func (s *SockError) StateFields() []string { 1106 return []string{ 1107 "sockErrorEntry", 1108 "Err", 1109 "Cause", 1110 "Payload", 1111 "Dst", 1112 "Offender", 1113 "NetProto", 1114 } 1115 } 1116 1117 func (s *SockError) beforeSave() {} 1118 1119 // +checklocksignore 1120 func (s *SockError) StateSave(stateSinkObject state.Sink) { 1121 s.beforeSave() 1122 stateSinkObject.Save(0, &s.sockErrorEntry) 1123 stateSinkObject.Save(1, &s.Err) 1124 stateSinkObject.Save(2, &s.Cause) 1125 stateSinkObject.Save(3, &s.Payload) 1126 stateSinkObject.Save(4, &s.Dst) 1127 stateSinkObject.Save(5, &s.Offender) 1128 stateSinkObject.Save(6, &s.NetProto) 1129 } 1130 1131 func (s *SockError) afterLoad(context.Context) {} 1132 1133 // +checklocksignore 1134 func (s *SockError) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1135 stateSourceObject.Load(0, &s.sockErrorEntry) 1136 stateSourceObject.Load(1, &s.Err) 1137 stateSourceObject.Load(2, &s.Cause) 1138 stateSourceObject.Load(3, &s.Payload) 1139 stateSourceObject.Load(4, &s.Dst) 1140 stateSourceObject.Load(5, &s.Offender) 1141 stateSourceObject.Load(6, &s.NetProto) 1142 } 1143 1144 func (s *stdClock) StateTypeName() string { 1145 return "pkg/tcpip.stdClock" 1146 } 1147 1148 func (s *stdClock) StateFields() []string { 1149 return []string{ 1150 "monotonicOffset", 1151 } 1152 } 1153 1154 // +checklocksignore 1155 func (s *stdClock) StateSave(stateSinkObject state.Sink) { 1156 s.beforeSave() 1157 stateSinkObject.Save(0, &s.monotonicOffset) 1158 } 1159 1160 // +checklocksignore 1161 func (s *stdClock) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1162 stateSourceObject.Load(0, &s.monotonicOffset) 1163 stateSourceObject.AfterLoad(func() { s.afterLoad(ctx) }) 1164 } 1165 1166 func (mt *MonotonicTime) StateTypeName() string { 1167 return "pkg/tcpip.MonotonicTime" 1168 } 1169 1170 func (mt *MonotonicTime) StateFields() []string { 1171 return []string{ 1172 "nanoseconds", 1173 } 1174 } 1175 1176 func (mt *MonotonicTime) beforeSave() {} 1177 1178 // +checklocksignore 1179 func (mt *MonotonicTime) StateSave(stateSinkObject state.Sink) { 1180 mt.beforeSave() 1181 stateSinkObject.Save(0, &mt.nanoseconds) 1182 } 1183 1184 func (mt *MonotonicTime) afterLoad(context.Context) {} 1185 1186 // +checklocksignore 1187 func (mt *MonotonicTime) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1188 stateSourceObject.Load(0, &mt.nanoseconds) 1189 } 1190 1191 func (a *Address) StateTypeName() string { 1192 return "pkg/tcpip.Address" 1193 } 1194 1195 func (a *Address) StateFields() []string { 1196 return []string{ 1197 "addr", 1198 "length", 1199 } 1200 } 1201 1202 func (a *Address) beforeSave() {} 1203 1204 // +checklocksignore 1205 func (a *Address) StateSave(stateSinkObject state.Sink) { 1206 a.beforeSave() 1207 stateSinkObject.Save(0, &a.addr) 1208 stateSinkObject.Save(1, &a.length) 1209 } 1210 1211 func (a *Address) afterLoad(context.Context) {} 1212 1213 // +checklocksignore 1214 func (a *Address) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1215 stateSourceObject.Load(0, &a.addr) 1216 stateSourceObject.Load(1, &a.length) 1217 } 1218 1219 func (m *AddressMask) StateTypeName() string { 1220 return "pkg/tcpip.AddressMask" 1221 } 1222 1223 func (m *AddressMask) StateFields() []string { 1224 return []string{ 1225 "mask", 1226 "length", 1227 } 1228 } 1229 1230 func (m *AddressMask) beforeSave() {} 1231 1232 // +checklocksignore 1233 func (m *AddressMask) StateSave(stateSinkObject state.Sink) { 1234 m.beforeSave() 1235 stateSinkObject.Save(0, &m.mask) 1236 stateSinkObject.Save(1, &m.length) 1237 } 1238 1239 func (m *AddressMask) afterLoad(context.Context) {} 1240 1241 // +checklocksignore 1242 func (m *AddressMask) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1243 stateSourceObject.Load(0, &m.mask) 1244 stateSourceObject.Load(1, &m.length) 1245 } 1246 1247 func (f *FullAddress) StateTypeName() string { 1248 return "pkg/tcpip.FullAddress" 1249 } 1250 1251 func (f *FullAddress) StateFields() []string { 1252 return []string{ 1253 "NIC", 1254 "Addr", 1255 "Port", 1256 "LinkAddr", 1257 } 1258 } 1259 1260 func (f *FullAddress) beforeSave() {} 1261 1262 // +checklocksignore 1263 func (f *FullAddress) StateSave(stateSinkObject state.Sink) { 1264 f.beforeSave() 1265 stateSinkObject.Save(0, &f.NIC) 1266 stateSinkObject.Save(1, &f.Addr) 1267 stateSinkObject.Save(2, &f.Port) 1268 stateSinkObject.Save(3, &f.LinkAddr) 1269 } 1270 1271 func (f *FullAddress) afterLoad(context.Context) {} 1272 1273 // +checklocksignore 1274 func (f *FullAddress) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1275 stateSourceObject.Load(0, &f.NIC) 1276 stateSourceObject.Load(1, &f.Addr) 1277 stateSourceObject.Load(2, &f.Port) 1278 stateSourceObject.Load(3, &f.LinkAddr) 1279 } 1280 1281 func (s *SendableControlMessages) StateTypeName() string { 1282 return "pkg/tcpip.SendableControlMessages" 1283 } 1284 1285 func (s *SendableControlMessages) StateFields() []string { 1286 return []string{ 1287 "HasTTL", 1288 "TTL", 1289 "HasHopLimit", 1290 "HopLimit", 1291 "HasIPv6PacketInfo", 1292 "IPv6PacketInfo", 1293 } 1294 } 1295 1296 func (s *SendableControlMessages) beforeSave() {} 1297 1298 // +checklocksignore 1299 func (s *SendableControlMessages) StateSave(stateSinkObject state.Sink) { 1300 s.beforeSave() 1301 stateSinkObject.Save(0, &s.HasTTL) 1302 stateSinkObject.Save(1, &s.TTL) 1303 stateSinkObject.Save(2, &s.HasHopLimit) 1304 stateSinkObject.Save(3, &s.HopLimit) 1305 stateSinkObject.Save(4, &s.HasIPv6PacketInfo) 1306 stateSinkObject.Save(5, &s.IPv6PacketInfo) 1307 } 1308 1309 func (s *SendableControlMessages) afterLoad(context.Context) {} 1310 1311 // +checklocksignore 1312 func (s *SendableControlMessages) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1313 stateSourceObject.Load(0, &s.HasTTL) 1314 stateSourceObject.Load(1, &s.TTL) 1315 stateSourceObject.Load(2, &s.HasHopLimit) 1316 stateSourceObject.Load(3, &s.HopLimit) 1317 stateSourceObject.Load(4, &s.HasIPv6PacketInfo) 1318 stateSourceObject.Load(5, &s.IPv6PacketInfo) 1319 } 1320 1321 func (c *ReceivableControlMessages) StateTypeName() string { 1322 return "pkg/tcpip.ReceivableControlMessages" 1323 } 1324 1325 func (c *ReceivableControlMessages) StateFields() []string { 1326 return []string{ 1327 "Timestamp", 1328 "HasInq", 1329 "Inq", 1330 "HasTOS", 1331 "TOS", 1332 "HasTTL", 1333 "TTL", 1334 "HasHopLimit", 1335 "HopLimit", 1336 "HasTimestamp", 1337 "HasTClass", 1338 "TClass", 1339 "HasIPPacketInfo", 1340 "PacketInfo", 1341 "HasIPv6PacketInfo", 1342 "IPv6PacketInfo", 1343 "HasOriginalDstAddress", 1344 "OriginalDstAddress", 1345 "SockErr", 1346 } 1347 } 1348 1349 func (c *ReceivableControlMessages) beforeSave() {} 1350 1351 // +checklocksignore 1352 func (c *ReceivableControlMessages) StateSave(stateSinkObject state.Sink) { 1353 c.beforeSave() 1354 var TimestampValue int64 1355 TimestampValue = c.saveTimestamp() 1356 stateSinkObject.SaveValue(0, TimestampValue) 1357 stateSinkObject.Save(1, &c.HasInq) 1358 stateSinkObject.Save(2, &c.Inq) 1359 stateSinkObject.Save(3, &c.HasTOS) 1360 stateSinkObject.Save(4, &c.TOS) 1361 stateSinkObject.Save(5, &c.HasTTL) 1362 stateSinkObject.Save(6, &c.TTL) 1363 stateSinkObject.Save(7, &c.HasHopLimit) 1364 stateSinkObject.Save(8, &c.HopLimit) 1365 stateSinkObject.Save(9, &c.HasTimestamp) 1366 stateSinkObject.Save(10, &c.HasTClass) 1367 stateSinkObject.Save(11, &c.TClass) 1368 stateSinkObject.Save(12, &c.HasIPPacketInfo) 1369 stateSinkObject.Save(13, &c.PacketInfo) 1370 stateSinkObject.Save(14, &c.HasIPv6PacketInfo) 1371 stateSinkObject.Save(15, &c.IPv6PacketInfo) 1372 stateSinkObject.Save(16, &c.HasOriginalDstAddress) 1373 stateSinkObject.Save(17, &c.OriginalDstAddress) 1374 stateSinkObject.Save(18, &c.SockErr) 1375 } 1376 1377 func (c *ReceivableControlMessages) afterLoad(context.Context) {} 1378 1379 // +checklocksignore 1380 func (c *ReceivableControlMessages) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1381 stateSourceObject.Load(1, &c.HasInq) 1382 stateSourceObject.Load(2, &c.Inq) 1383 stateSourceObject.Load(3, &c.HasTOS) 1384 stateSourceObject.Load(4, &c.TOS) 1385 stateSourceObject.Load(5, &c.HasTTL) 1386 stateSourceObject.Load(6, &c.TTL) 1387 stateSourceObject.Load(7, &c.HasHopLimit) 1388 stateSourceObject.Load(8, &c.HopLimit) 1389 stateSourceObject.Load(9, &c.HasTimestamp) 1390 stateSourceObject.Load(10, &c.HasTClass) 1391 stateSourceObject.Load(11, &c.TClass) 1392 stateSourceObject.Load(12, &c.HasIPPacketInfo) 1393 stateSourceObject.Load(13, &c.PacketInfo) 1394 stateSourceObject.Load(14, &c.HasIPv6PacketInfo) 1395 stateSourceObject.Load(15, &c.IPv6PacketInfo) 1396 stateSourceObject.Load(16, &c.HasOriginalDstAddress) 1397 stateSourceObject.Load(17, &c.OriginalDstAddress) 1398 stateSourceObject.Load(18, &c.SockErr) 1399 stateSourceObject.LoadValue(0, new(int64), func(y any) { c.loadTimestamp(ctx, y.(int64)) }) 1400 } 1401 1402 func (l *LinkPacketInfo) StateTypeName() string { 1403 return "pkg/tcpip.LinkPacketInfo" 1404 } 1405 1406 func (l *LinkPacketInfo) StateFields() []string { 1407 return []string{ 1408 "Protocol", 1409 "PktType", 1410 } 1411 } 1412 1413 func (l *LinkPacketInfo) beforeSave() {} 1414 1415 // +checklocksignore 1416 func (l *LinkPacketInfo) StateSave(stateSinkObject state.Sink) { 1417 l.beforeSave() 1418 stateSinkObject.Save(0, &l.Protocol) 1419 stateSinkObject.Save(1, &l.PktType) 1420 } 1421 1422 func (l *LinkPacketInfo) afterLoad(context.Context) {} 1423 1424 // +checklocksignore 1425 func (l *LinkPacketInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1426 stateSourceObject.Load(0, &l.Protocol) 1427 stateSourceObject.Load(1, &l.PktType) 1428 } 1429 1430 func (f *ICMPv6Filter) StateTypeName() string { 1431 return "pkg/tcpip.ICMPv6Filter" 1432 } 1433 1434 func (f *ICMPv6Filter) StateFields() []string { 1435 return []string{ 1436 "DenyType", 1437 } 1438 } 1439 1440 func (f *ICMPv6Filter) beforeSave() {} 1441 1442 // +checklocksignore 1443 func (f *ICMPv6Filter) StateSave(stateSinkObject state.Sink) { 1444 f.beforeSave() 1445 stateSinkObject.Save(0, &f.DenyType) 1446 } 1447 1448 func (f *ICMPv6Filter) afterLoad(context.Context) {} 1449 1450 // +checklocksignore 1451 func (f *ICMPv6Filter) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1452 stateSourceObject.Load(0, &f.DenyType) 1453 } 1454 1455 func (l *LingerOption) StateTypeName() string { 1456 return "pkg/tcpip.LingerOption" 1457 } 1458 1459 func (l *LingerOption) StateFields() []string { 1460 return []string{ 1461 "Enabled", 1462 "Timeout", 1463 } 1464 } 1465 1466 func (l *LingerOption) beforeSave() {} 1467 1468 // +checklocksignore 1469 func (l *LingerOption) StateSave(stateSinkObject state.Sink) { 1470 l.beforeSave() 1471 stateSinkObject.Save(0, &l.Enabled) 1472 stateSinkObject.Save(1, &l.Timeout) 1473 } 1474 1475 func (l *LingerOption) afterLoad(context.Context) {} 1476 1477 // +checklocksignore 1478 func (l *LingerOption) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1479 stateSourceObject.Load(0, &l.Enabled) 1480 stateSourceObject.Load(1, &l.Timeout) 1481 } 1482 1483 func (i *IPPacketInfo) StateTypeName() string { 1484 return "pkg/tcpip.IPPacketInfo" 1485 } 1486 1487 func (i *IPPacketInfo) StateFields() []string { 1488 return []string{ 1489 "NIC", 1490 "LocalAddr", 1491 "DestinationAddr", 1492 } 1493 } 1494 1495 func (i *IPPacketInfo) beforeSave() {} 1496 1497 // +checklocksignore 1498 func (i *IPPacketInfo) StateSave(stateSinkObject state.Sink) { 1499 i.beforeSave() 1500 stateSinkObject.Save(0, &i.NIC) 1501 stateSinkObject.Save(1, &i.LocalAddr) 1502 stateSinkObject.Save(2, &i.DestinationAddr) 1503 } 1504 1505 func (i *IPPacketInfo) afterLoad(context.Context) {} 1506 1507 // +checklocksignore 1508 func (i *IPPacketInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1509 stateSourceObject.Load(0, &i.NIC) 1510 stateSourceObject.Load(1, &i.LocalAddr) 1511 stateSourceObject.Load(2, &i.DestinationAddr) 1512 } 1513 1514 func (i *IPv6PacketInfo) StateTypeName() string { 1515 return "pkg/tcpip.IPv6PacketInfo" 1516 } 1517 1518 func (i *IPv6PacketInfo) StateFields() []string { 1519 return []string{ 1520 "Addr", 1521 "NIC", 1522 } 1523 } 1524 1525 func (i *IPv6PacketInfo) beforeSave() {} 1526 1527 // +checklocksignore 1528 func (i *IPv6PacketInfo) StateSave(stateSinkObject state.Sink) { 1529 i.beforeSave() 1530 stateSinkObject.Save(0, &i.Addr) 1531 stateSinkObject.Save(1, &i.NIC) 1532 } 1533 1534 func (i *IPv6PacketInfo) afterLoad(context.Context) {} 1535 1536 // +checklocksignore 1537 func (i *IPv6PacketInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1538 stateSourceObject.Load(0, &i.Addr) 1539 stateSourceObject.Load(1, &i.NIC) 1540 } 1541 1542 func (s *StatCounter) StateTypeName() string { 1543 return "pkg/tcpip.StatCounter" 1544 } 1545 1546 func (s *StatCounter) StateFields() []string { 1547 return []string{ 1548 "count", 1549 } 1550 } 1551 1552 func (s *StatCounter) beforeSave() {} 1553 1554 // +checklocksignore 1555 func (s *StatCounter) StateSave(stateSinkObject state.Sink) { 1556 s.beforeSave() 1557 stateSinkObject.Save(0, &s.count) 1558 } 1559 1560 func (s *StatCounter) afterLoad(context.Context) {} 1561 1562 // +checklocksignore 1563 func (s *StatCounter) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1564 stateSourceObject.Load(0, &s.count) 1565 } 1566 1567 func (r *ReceiveErrors) StateTypeName() string { 1568 return "pkg/tcpip.ReceiveErrors" 1569 } 1570 1571 func (r *ReceiveErrors) StateFields() []string { 1572 return []string{ 1573 "ReceiveBufferOverflow", 1574 "MalformedPacketsReceived", 1575 "ClosedReceiver", 1576 "ChecksumErrors", 1577 } 1578 } 1579 1580 func (r *ReceiveErrors) beforeSave() {} 1581 1582 // +checklocksignore 1583 func (r *ReceiveErrors) StateSave(stateSinkObject state.Sink) { 1584 r.beforeSave() 1585 stateSinkObject.Save(0, &r.ReceiveBufferOverflow) 1586 stateSinkObject.Save(1, &r.MalformedPacketsReceived) 1587 stateSinkObject.Save(2, &r.ClosedReceiver) 1588 stateSinkObject.Save(3, &r.ChecksumErrors) 1589 } 1590 1591 func (r *ReceiveErrors) afterLoad(context.Context) {} 1592 1593 // +checklocksignore 1594 func (r *ReceiveErrors) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1595 stateSourceObject.Load(0, &r.ReceiveBufferOverflow) 1596 stateSourceObject.Load(1, &r.MalformedPacketsReceived) 1597 stateSourceObject.Load(2, &r.ClosedReceiver) 1598 stateSourceObject.Load(3, &r.ChecksumErrors) 1599 } 1600 1601 func (s *SendErrors) StateTypeName() string { 1602 return "pkg/tcpip.SendErrors" 1603 } 1604 1605 func (s *SendErrors) StateFields() []string { 1606 return []string{ 1607 "SendToNetworkFailed", 1608 "NoRoute", 1609 } 1610 } 1611 1612 func (s *SendErrors) beforeSave() {} 1613 1614 // +checklocksignore 1615 func (s *SendErrors) StateSave(stateSinkObject state.Sink) { 1616 s.beforeSave() 1617 stateSinkObject.Save(0, &s.SendToNetworkFailed) 1618 stateSinkObject.Save(1, &s.NoRoute) 1619 } 1620 1621 func (s *SendErrors) afterLoad(context.Context) {} 1622 1623 // +checklocksignore 1624 func (s *SendErrors) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1625 stateSourceObject.Load(0, &s.SendToNetworkFailed) 1626 stateSourceObject.Load(1, &s.NoRoute) 1627 } 1628 1629 func (r *ReadErrors) StateTypeName() string { 1630 return "pkg/tcpip.ReadErrors" 1631 } 1632 1633 func (r *ReadErrors) StateFields() []string { 1634 return []string{ 1635 "ReadClosed", 1636 "InvalidEndpointState", 1637 "NotConnected", 1638 } 1639 } 1640 1641 func (r *ReadErrors) beforeSave() {} 1642 1643 // +checklocksignore 1644 func (r *ReadErrors) StateSave(stateSinkObject state.Sink) { 1645 r.beforeSave() 1646 stateSinkObject.Save(0, &r.ReadClosed) 1647 stateSinkObject.Save(1, &r.InvalidEndpointState) 1648 stateSinkObject.Save(2, &r.NotConnected) 1649 } 1650 1651 func (r *ReadErrors) afterLoad(context.Context) {} 1652 1653 // +checklocksignore 1654 func (r *ReadErrors) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1655 stateSourceObject.Load(0, &r.ReadClosed) 1656 stateSourceObject.Load(1, &r.InvalidEndpointState) 1657 stateSourceObject.Load(2, &r.NotConnected) 1658 } 1659 1660 func (w *WriteErrors) StateTypeName() string { 1661 return "pkg/tcpip.WriteErrors" 1662 } 1663 1664 func (w *WriteErrors) StateFields() []string { 1665 return []string{ 1666 "WriteClosed", 1667 "InvalidEndpointState", 1668 "InvalidArgs", 1669 } 1670 } 1671 1672 func (w *WriteErrors) beforeSave() {} 1673 1674 // +checklocksignore 1675 func (w *WriteErrors) StateSave(stateSinkObject state.Sink) { 1676 w.beforeSave() 1677 stateSinkObject.Save(0, &w.WriteClosed) 1678 stateSinkObject.Save(1, &w.InvalidEndpointState) 1679 stateSinkObject.Save(2, &w.InvalidArgs) 1680 } 1681 1682 func (w *WriteErrors) afterLoad(context.Context) {} 1683 1684 // +checklocksignore 1685 func (w *WriteErrors) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1686 stateSourceObject.Load(0, &w.WriteClosed) 1687 stateSourceObject.Load(1, &w.InvalidEndpointState) 1688 stateSourceObject.Load(2, &w.InvalidArgs) 1689 } 1690 1691 func (src *TransportEndpointStats) StateTypeName() string { 1692 return "pkg/tcpip.TransportEndpointStats" 1693 } 1694 1695 func (src *TransportEndpointStats) StateFields() []string { 1696 return []string{ 1697 "PacketsReceived", 1698 "PacketsSent", 1699 "ReceiveErrors", 1700 "ReadErrors", 1701 "SendErrors", 1702 "WriteErrors", 1703 } 1704 } 1705 1706 func (src *TransportEndpointStats) beforeSave() {} 1707 1708 // +checklocksignore 1709 func (src *TransportEndpointStats) StateSave(stateSinkObject state.Sink) { 1710 src.beforeSave() 1711 stateSinkObject.Save(0, &src.PacketsReceived) 1712 stateSinkObject.Save(1, &src.PacketsSent) 1713 stateSinkObject.Save(2, &src.ReceiveErrors) 1714 stateSinkObject.Save(3, &src.ReadErrors) 1715 stateSinkObject.Save(4, &src.SendErrors) 1716 stateSinkObject.Save(5, &src.WriteErrors) 1717 } 1718 1719 func (src *TransportEndpointStats) afterLoad(context.Context) {} 1720 1721 // +checklocksignore 1722 func (src *TransportEndpointStats) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1723 stateSourceObject.Load(0, &src.PacketsReceived) 1724 stateSourceObject.Load(1, &src.PacketsSent) 1725 stateSourceObject.Load(2, &src.ReceiveErrors) 1726 stateSourceObject.Load(3, &src.ReadErrors) 1727 stateSourceObject.Load(4, &src.SendErrors) 1728 stateSourceObject.Load(5, &src.WriteErrors) 1729 } 1730 1731 func (a *AddressWithPrefix) StateTypeName() string { 1732 return "pkg/tcpip.AddressWithPrefix" 1733 } 1734 1735 func (a *AddressWithPrefix) StateFields() []string { 1736 return []string{ 1737 "Address", 1738 "PrefixLen", 1739 } 1740 } 1741 1742 func (a *AddressWithPrefix) beforeSave() {} 1743 1744 // +checklocksignore 1745 func (a *AddressWithPrefix) StateSave(stateSinkObject state.Sink) { 1746 a.beforeSave() 1747 stateSinkObject.Save(0, &a.Address) 1748 stateSinkObject.Save(1, &a.PrefixLen) 1749 } 1750 1751 func (a *AddressWithPrefix) afterLoad(context.Context) {} 1752 1753 // +checklocksignore 1754 func (a *AddressWithPrefix) StateLoad(ctx context.Context, stateSourceObject state.Source) { 1755 stateSourceObject.Load(0, &a.Address) 1756 stateSourceObject.Load(1, &a.PrefixLen) 1757 } 1758 1759 func init() { 1760 state.Register((*ErrAborted)(nil)) 1761 state.Register((*ErrAddressFamilyNotSupported)(nil)) 1762 state.Register((*ErrAlreadyBound)(nil)) 1763 state.Register((*ErrAlreadyConnected)(nil)) 1764 state.Register((*ErrAlreadyConnecting)(nil)) 1765 state.Register((*ErrBadAddress)(nil)) 1766 state.Register((*ErrBadBuffer)(nil)) 1767 state.Register((*ErrBadLocalAddress)(nil)) 1768 state.Register((*ErrBroadcastDisabled)(nil)) 1769 state.Register((*ErrClosedForReceive)(nil)) 1770 state.Register((*ErrClosedForSend)(nil)) 1771 state.Register((*ErrConnectStarted)(nil)) 1772 state.Register((*ErrConnectionAborted)(nil)) 1773 state.Register((*ErrConnectionRefused)(nil)) 1774 state.Register((*ErrConnectionReset)(nil)) 1775 state.Register((*ErrDestinationRequired)(nil)) 1776 state.Register((*ErrDuplicateAddress)(nil)) 1777 state.Register((*ErrDuplicateNICID)(nil)) 1778 state.Register((*ErrInvalidEndpointState)(nil)) 1779 state.Register((*ErrInvalidOptionValue)(nil)) 1780 state.Register((*ErrInvalidPortRange)(nil)) 1781 state.Register((*ErrMalformedHeader)(nil)) 1782 state.Register((*ErrMessageTooLong)(nil)) 1783 state.Register((*ErrNetworkUnreachable)(nil)) 1784 state.Register((*ErrNoBufferSpace)(nil)) 1785 state.Register((*ErrNoPortAvailable)(nil)) 1786 state.Register((*ErrHostUnreachable)(nil)) 1787 state.Register((*ErrHostDown)(nil)) 1788 state.Register((*ErrNoNet)(nil)) 1789 state.Register((*ErrNoSuchFile)(nil)) 1790 state.Register((*ErrNotConnected)(nil)) 1791 state.Register((*ErrNotPermitted)(nil)) 1792 state.Register((*ErrNotSupported)(nil)) 1793 state.Register((*ErrPortInUse)(nil)) 1794 state.Register((*ErrQueueSizeNotSupported)(nil)) 1795 state.Register((*ErrTimeout)(nil)) 1796 state.Register((*ErrUnknownDevice)(nil)) 1797 state.Register((*ErrUnknownNICID)(nil)) 1798 state.Register((*ErrUnknownProtocol)(nil)) 1799 state.Register((*ErrUnknownProtocolOption)(nil)) 1800 state.Register((*ErrWouldBlock)(nil)) 1801 state.Register((*ErrMissingRequiredFields)(nil)) 1802 state.Register((*ErrMulticastInputCannotBeOutput)(nil)) 1803 state.Register((*sockErrorList)(nil)) 1804 state.Register((*sockErrorEntry)(nil)) 1805 state.Register((*SocketOptions)(nil)) 1806 state.Register((*LocalSockError)(nil)) 1807 state.Register((*SockError)(nil)) 1808 state.Register((*stdClock)(nil)) 1809 state.Register((*MonotonicTime)(nil)) 1810 state.Register((*Address)(nil)) 1811 state.Register((*AddressMask)(nil)) 1812 state.Register((*FullAddress)(nil)) 1813 state.Register((*SendableControlMessages)(nil)) 1814 state.Register((*ReceivableControlMessages)(nil)) 1815 state.Register((*LinkPacketInfo)(nil)) 1816 state.Register((*ICMPv6Filter)(nil)) 1817 state.Register((*LingerOption)(nil)) 1818 state.Register((*IPPacketInfo)(nil)) 1819 state.Register((*IPv6PacketInfo)(nil)) 1820 state.Register((*StatCounter)(nil)) 1821 state.Register((*ReceiveErrors)(nil)) 1822 state.Register((*SendErrors)(nil)) 1823 state.Register((*ReadErrors)(nil)) 1824 state.Register((*WriteErrors)(nil)) 1825 state.Register((*TransportEndpointStats)(nil)) 1826 state.Register((*AddressWithPrefix)(nil)) 1827 }