(idSeq uint32, cb func())
| 1520 | } |
| 1521 | |
| 1522 | func (e *userspaceEngine) setICMPEchoResponseCallback(idSeq uint32, cb func()) { |
| 1523 | e.mu.Lock() |
| 1524 | defer e.mu.Unlock() |
| 1525 | if cb == nil { |
| 1526 | delete(e.icmpEchoResponseCallback, idSeq) |
| 1527 | } else { |
| 1528 | mak.Set(&e.icmpEchoResponseCallback, idSeq, cb) |
| 1529 | } |
| 1530 | } |
| 1531 | |
| 1532 | // PeerForIP returns the Node in the wireguard config |
| 1533 | // that's responsible for handling the given IP address. |
no test coverage detected