MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _fetch_traffic_data

Method _fetch_traffic_data

display.py:1140–1150  ·  view source on GitHub ↗

Fetch real traffic analyzer data.

(self)

Source from the content-addressed store, hash-verified

1138 lldp['neighbor'] = neighbors[0]
1139 return {'eth': eth, 'eth_count': len(eth_list),
1140 'gateway': gateway, 'dns': nameservers, 'lldp': lldp}
1141
1142 def _netdiag_dhcp(self):
1143 """Non-blocking rogue-DHCP summary for the e-Paper DHCP page. The scan
1144 (nmap broadcast-dhcp-discover) takes ~10s, so it runs in a background
1145 thread and the page shows the last result — the render never blocks.
1146 Refreshes at most every ~3 min, and only while this page is on screen."""
1147 st = getattr(self, '_netdiag_dhcp_state', None)
1148 if st is None:
1149 st = self._netdiag_dhcp_state = {'ts': 0, 'data': None, 'scanning': False}
1150 now = time.time()
1151 if not st['scanning'] and (now - st['ts']) > 180:
1152 st['scanning'] = True
1153

Callers

nothing calls this directly

Calls 2

debugMethod · 0.80
get_summaryMethod · 0.45

Tested by

no test coverage detected