SetNICName sets a NIC's name.
(id tcpip.NICID, name string)
| 1138 | |
| 1139 | // SetNICName sets a NIC's name. |
| 1140 | func (s *Stack) SetNICName(id tcpip.NICID, name string) tcpip.Error { |
| 1141 | s.mu.Lock() |
| 1142 | defer s.mu.Unlock() |
| 1143 | |
| 1144 | nic, ok := s.nics[id] |
| 1145 | if !ok { |
| 1146 | return &tcpip.ErrUnknownNICID{} |
| 1147 | } |
| 1148 | nic.name = name |
| 1149 | return nil |
| 1150 | } |
| 1151 | |
| 1152 | // SetNICMTU sets a NIC's MTU. |
| 1153 | func (s *Stack) SetNICMTU(id tcpip.NICID, mtu uint32) tcpip.Error { |
no test coverage detected