SetNICMTU sets a NIC's MTU.
(id tcpip.NICID, mtu uint32)
| 1151 | |
| 1152 | // SetNICMTU sets a NIC's MTU. |
| 1153 | func (s *Stack) SetNICMTU(id tcpip.NICID, mtu uint32) tcpip.Error { |
| 1154 | s.mu.Lock() |
| 1155 | defer s.mu.Unlock() |
| 1156 | |
| 1157 | nic, ok := s.nics[id] |
| 1158 | if !ok { |
| 1159 | return &tcpip.ErrUnknownNICID{} |
| 1160 | } |
| 1161 | nic.NetworkLinkEndpoint.SetMTU(mtu) |
| 1162 | return nil |
| 1163 | } |
| 1164 | |
| 1165 | // NICInfo captures the name and addresses assigned to a NIC. |
| 1166 | type NICInfo struct { |
no test coverage detected