SetTransportProtocolOption allows configuring individual protocol level options. This method returns an error if the protocol is not supported or option is not supported by the protocol implementation or the provided value is incorrect.
(transport tcpip.TransportProtocolNumber, option tcpip.SettableTransportProtocolOption)
| 509 | // option is not supported by the protocol implementation or the provided value |
| 510 | // is incorrect. |
| 511 | func (s *Stack) SetTransportProtocolOption(transport tcpip.TransportProtocolNumber, option tcpip.SettableTransportProtocolOption) tcpip.Error { |
| 512 | transProtoState, ok := s.transportProtocols[transport] |
| 513 | if !ok { |
| 514 | return &tcpip.ErrUnknownProtocol{} |
| 515 | } |
| 516 | return transProtoState.proto.SetOption(option) |
| 517 | } |
| 518 | |
| 519 | // TransportProtocolOption allows retrieving individual protocol level option |
| 520 | // values. This method returns an error if the protocol is not supported or |