fakeNetworkEndpoint is a network-layer protocol endpoint. It counts sent and received packets; the counts of all endpoints are aggregated in the protocol descriptor. Headers of this protocol are fakeNetHeaderLen bytes. Addresses are 4 bytes, but we only use the first byte.
| 79 | // Headers of this protocol are fakeNetHeaderLen bytes. Addresses are 4 bytes, |
| 80 | // but we only use the first byte. |
| 81 | type fakeNetworkEndpoint struct { |
| 82 | stack.AddressableEndpointState |
| 83 | |
| 84 | mu struct { |
| 85 | sync.RWMutex |
| 86 | |
| 87 | enabled bool |
| 88 | forwarding bool |
| 89 | multicastForwarding bool |
| 90 | } |
| 91 | |
| 92 | nic stack.NetworkInterface |
| 93 | proto *fakeNetworkProtocol |
| 94 | dispatcher stack.TransportDispatcher |
| 95 | } |
| 96 | |
| 97 | func (f *fakeNetworkEndpoint) Enable() tcpip.Error { |
| 98 | f.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected