-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathnode.py
More file actions
54 lines (44 loc) · 1.02 KB
/
node.py
File metadata and controls
54 lines (44 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# imports
from dataclasses import dataclass
################
@dataclass
class NodeDataClass:
pos: int
ip: str
mac: str
lat: float
lon: float
lat_plot: float
lon_plot: float
position: int # position in "circle" with center lat, lon
country_iso: str
country_str: str
region: str
city: str
host: str
show_host: bool
whosip: str # delimiters: WHOSIP_START, WHOSIP_END
host_resolved: bool
ping: bool
bad: bool
killed: bool
killed_process: str
local: bool # local Network? incl. broadcast and multicast
conn_established: bool
tx: int # bytes transmitted by node
rx: int # bytes received by node
tx_kB: int # kiloBytes transmitted by node
rx_kB: int # kiloBytes received by node
date: str
time: str
comm_partner_list: list
comm_partner_list_killed: list
##################
@dataclass
class DbIpCityResponse:
city: str
country: str
ip_address: str
latitude: float
longitude: float
region: str