Print the list of discovered MAC addresses.
(self, *args, **kwargs)
| 1026 | SndRcvList.__init__(self, res, name, stats) |
| 1027 | |
| 1028 | def show(self, *args, **kwargs): |
| 1029 | # type: (*Any, **Any) -> None |
| 1030 | """ |
| 1031 | Print the list of discovered MAC addresses. |
| 1032 | """ |
| 1033 | data = list() # type: List[Tuple[str | List[str], ...]] |
| 1034 | |
| 1035 | for s, r in self.res: |
| 1036 | manuf = conf.manufdb._get_short_manuf(r.src) |
| 1037 | manuf = "unknown" if manuf == r.src else manuf |
| 1038 | data.append((r[Ether].src, manuf, r[ARP].psrc)) |
| 1039 | |
| 1040 | print( |
| 1041 | pretty_list( |
| 1042 | data, |
| 1043 | [("src", "manuf", "psrc")], |
| 1044 | sortBy=2, |
| 1045 | ) |
| 1046 | ) |
| 1047 | |
| 1048 | |
| 1049 | @conf.commands.register |
no test coverage detected