github.com/sagernet/gvisor@v0.0.0-20240428053021-e691de28565f/pkg/tcpip/network/ipv4/ipv4_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package ipv4
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/sagernet/gvisor/pkg/state"
     9  )
    10  
    11  func (i *icmpv4DestinationUnreachableSockError) StateTypeName() string {
    12  	return "pkg/tcpip/network/ipv4.icmpv4DestinationUnreachableSockError"
    13  }
    14  
    15  func (i *icmpv4DestinationUnreachableSockError) StateFields() []string {
    16  	return []string{}
    17  }
    18  
    19  func (i *icmpv4DestinationUnreachableSockError) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (i *icmpv4DestinationUnreachableSockError) StateSave(stateSinkObject state.Sink) {
    23  	i.beforeSave()
    24  }
    25  
    26  func (i *icmpv4DestinationUnreachableSockError) afterLoad(context.Context) {}
    27  
    28  // +checklocksignore
    29  func (i *icmpv4DestinationUnreachableSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    30  }
    31  
    32  func (i *icmpv4DestinationHostUnreachableSockError) StateTypeName() string {
    33  	return "pkg/tcpip/network/ipv4.icmpv4DestinationHostUnreachableSockError"
    34  }
    35  
    36  func (i *icmpv4DestinationHostUnreachableSockError) StateFields() []string {
    37  	return []string{
    38  		"icmpv4DestinationUnreachableSockError",
    39  	}
    40  }
    41  
    42  func (i *icmpv4DestinationHostUnreachableSockError) beforeSave() {}
    43  
    44  // +checklocksignore
    45  func (i *icmpv4DestinationHostUnreachableSockError) StateSave(stateSinkObject state.Sink) {
    46  	i.beforeSave()
    47  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
    48  }
    49  
    50  func (i *icmpv4DestinationHostUnreachableSockError) afterLoad(context.Context) {}
    51  
    52  // +checklocksignore
    53  func (i *icmpv4DestinationHostUnreachableSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    54  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
    55  }
    56  
    57  func (i *icmpv4DestinationNetUnreachableSockError) StateTypeName() string {
    58  	return "pkg/tcpip/network/ipv4.icmpv4DestinationNetUnreachableSockError"
    59  }
    60  
    61  func (i *icmpv4DestinationNetUnreachableSockError) StateFields() []string {
    62  	return []string{
    63  		"icmpv4DestinationUnreachableSockError",
    64  	}
    65  }
    66  
    67  func (i *icmpv4DestinationNetUnreachableSockError) beforeSave() {}
    68  
    69  // +checklocksignore
    70  func (i *icmpv4DestinationNetUnreachableSockError) StateSave(stateSinkObject state.Sink) {
    71  	i.beforeSave()
    72  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
    73  }
    74  
    75  func (i *icmpv4DestinationNetUnreachableSockError) afterLoad(context.Context) {}
    76  
    77  // +checklocksignore
    78  func (i *icmpv4DestinationNetUnreachableSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    79  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
    80  }
    81  
    82  func (i *icmpv4DestinationPortUnreachableSockError) StateTypeName() string {
    83  	return "pkg/tcpip/network/ipv4.icmpv4DestinationPortUnreachableSockError"
    84  }
    85  
    86  func (i *icmpv4DestinationPortUnreachableSockError) StateFields() []string {
    87  	return []string{
    88  		"icmpv4DestinationUnreachableSockError",
    89  	}
    90  }
    91  
    92  func (i *icmpv4DestinationPortUnreachableSockError) beforeSave() {}
    93  
    94  // +checklocksignore
    95  func (i *icmpv4DestinationPortUnreachableSockError) StateSave(stateSinkObject state.Sink) {
    96  	i.beforeSave()
    97  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
    98  }
    99  
   100  func (i *icmpv4DestinationPortUnreachableSockError) afterLoad(context.Context) {}
   101  
   102  // +checklocksignore
   103  func (i *icmpv4DestinationPortUnreachableSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   104  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
   105  }
   106  
   107  func (i *icmpv4DestinationProtoUnreachableSockError) StateTypeName() string {
   108  	return "pkg/tcpip/network/ipv4.icmpv4DestinationProtoUnreachableSockError"
   109  }
   110  
   111  func (i *icmpv4DestinationProtoUnreachableSockError) StateFields() []string {
   112  	return []string{
   113  		"icmpv4DestinationUnreachableSockError",
   114  	}
   115  }
   116  
   117  func (i *icmpv4DestinationProtoUnreachableSockError) beforeSave() {}
   118  
   119  // +checklocksignore
   120  func (i *icmpv4DestinationProtoUnreachableSockError) StateSave(stateSinkObject state.Sink) {
   121  	i.beforeSave()
   122  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
   123  }
   124  
   125  func (i *icmpv4DestinationProtoUnreachableSockError) afterLoad(context.Context) {}
   126  
   127  // +checklocksignore
   128  func (i *icmpv4DestinationProtoUnreachableSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   129  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
   130  }
   131  
   132  func (i *icmpv4SourceRouteFailedSockError) StateTypeName() string {
   133  	return "pkg/tcpip/network/ipv4.icmpv4SourceRouteFailedSockError"
   134  }
   135  
   136  func (i *icmpv4SourceRouteFailedSockError) StateFields() []string {
   137  	return []string{
   138  		"icmpv4DestinationUnreachableSockError",
   139  	}
   140  }
   141  
   142  func (i *icmpv4SourceRouteFailedSockError) beforeSave() {}
   143  
   144  // +checklocksignore
   145  func (i *icmpv4SourceRouteFailedSockError) StateSave(stateSinkObject state.Sink) {
   146  	i.beforeSave()
   147  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
   148  }
   149  
   150  func (i *icmpv4SourceRouteFailedSockError) afterLoad(context.Context) {}
   151  
   152  // +checklocksignore
   153  func (i *icmpv4SourceRouteFailedSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   154  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
   155  }
   156  
   157  func (i *icmpv4SourceHostIsolatedSockError) StateTypeName() string {
   158  	return "pkg/tcpip/network/ipv4.icmpv4SourceHostIsolatedSockError"
   159  }
   160  
   161  func (i *icmpv4SourceHostIsolatedSockError) StateFields() []string {
   162  	return []string{
   163  		"icmpv4DestinationUnreachableSockError",
   164  	}
   165  }
   166  
   167  func (i *icmpv4SourceHostIsolatedSockError) beforeSave() {}
   168  
   169  // +checklocksignore
   170  func (i *icmpv4SourceHostIsolatedSockError) StateSave(stateSinkObject state.Sink) {
   171  	i.beforeSave()
   172  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
   173  }
   174  
   175  func (i *icmpv4SourceHostIsolatedSockError) afterLoad(context.Context) {}
   176  
   177  // +checklocksignore
   178  func (i *icmpv4SourceHostIsolatedSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   179  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
   180  }
   181  
   182  func (i *icmpv4DestinationHostUnknownSockError) StateTypeName() string {
   183  	return "pkg/tcpip/network/ipv4.icmpv4DestinationHostUnknownSockError"
   184  }
   185  
   186  func (i *icmpv4DestinationHostUnknownSockError) StateFields() []string {
   187  	return []string{
   188  		"icmpv4DestinationUnreachableSockError",
   189  	}
   190  }
   191  
   192  func (i *icmpv4DestinationHostUnknownSockError) beforeSave() {}
   193  
   194  // +checklocksignore
   195  func (i *icmpv4DestinationHostUnknownSockError) StateSave(stateSinkObject state.Sink) {
   196  	i.beforeSave()
   197  	stateSinkObject.Save(0, &i.icmpv4DestinationUnreachableSockError)
   198  }
   199  
   200  func (i *icmpv4DestinationHostUnknownSockError) afterLoad(context.Context) {}
   201  
   202  // +checklocksignore
   203  func (i *icmpv4DestinationHostUnknownSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   204  	stateSourceObject.Load(0, &i.icmpv4DestinationUnreachableSockError)
   205  }
   206  
   207  func (e *icmpv4FragmentationNeededSockError) StateTypeName() string {
   208  	return "pkg/tcpip/network/ipv4.icmpv4FragmentationNeededSockError"
   209  }
   210  
   211  func (e *icmpv4FragmentationNeededSockError) StateFields() []string {
   212  	return []string{
   213  		"icmpv4DestinationUnreachableSockError",
   214  		"mtu",
   215  	}
   216  }
   217  
   218  func (e *icmpv4FragmentationNeededSockError) beforeSave() {}
   219  
   220  // +checklocksignore
   221  func (e *icmpv4FragmentationNeededSockError) StateSave(stateSinkObject state.Sink) {
   222  	e.beforeSave()
   223  	stateSinkObject.Save(0, &e.icmpv4DestinationUnreachableSockError)
   224  	stateSinkObject.Save(1, &e.mtu)
   225  }
   226  
   227  func (e *icmpv4FragmentationNeededSockError) afterLoad(context.Context) {}
   228  
   229  // +checklocksignore
   230  func (e *icmpv4FragmentationNeededSockError) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   231  	stateSourceObject.Load(0, &e.icmpv4DestinationUnreachableSockError)
   232  	stateSourceObject.Load(1, &e.mtu)
   233  }
   234  
   235  func init() {
   236  	state.Register((*icmpv4DestinationUnreachableSockError)(nil))
   237  	state.Register((*icmpv4DestinationHostUnreachableSockError)(nil))
   238  	state.Register((*icmpv4DestinationNetUnreachableSockError)(nil))
   239  	state.Register((*icmpv4DestinationPortUnreachableSockError)(nil))
   240  	state.Register((*icmpv4DestinationProtoUnreachableSockError)(nil))
   241  	state.Register((*icmpv4SourceRouteFailedSockError)(nil))
   242  	state.Register((*icmpv4SourceHostIsolatedSockError)(nil))
   243  	state.Register((*icmpv4DestinationHostUnknownSockError)(nil))
   244  	state.Register((*icmpv4FragmentationNeededSockError)(nil))
   245  }