Bring the link down/up `count` times so the switch's LINK LED blinks in a recognisable cadence. Always leaves the interface up when finished.
(interface, count, on_ms, off_ms)
| 1316 | reasons.append(f"MAC {imp['mac']} answers for {len(ips)} IPs " |
| 1317 | f"({', '.join(ips[:4])}{'…' if len(ips) > 4 else ''}) " |
| 1318 | '— possible ARP spoofing') |
| 1319 | |
| 1320 | # Optional passive ARP-frame capture (opt-in via capture_seconds > 0). The |
| 1321 | # fast neighbour-table analysis above always runs; this only adds live-frame |
| 1322 | # signals when a caller asks for them (the Net Integrity rotation), so the |
| 1323 | # every-cycle fast core stays a cheap table read. |
| 1324 | capture = None |
| 1325 | if capture_seconds and int(capture_seconds) > 0: |
| 1326 | exempt = _local_macs() |
| 1327 | if gw_mac: |
| 1328 | exempt.add(gw_mac.lower()) |
| 1329 | if confirmed_vmac: |
| 1330 | exempt.add(confirmed_vmac) |
| 1331 | events = _arp_frame_capture(iface, int(capture_seconds)) |
| 1332 | cfind, cverdict, creasons = _arp_capture_analyze(events, int(capture_seconds), exempt) |
| 1333 | capture = {'seconds': int(capture_seconds), 'frames': len(events), |
| 1334 | 'findings': cfind} |