Returns all available IPs matching to interfaces, using the windows system. Should only be used as a WinPcapy fallback. :param v6: IPv6 addresses
(v6=False)
| 690 | |
| 691 | |
| 692 | def get_ips(v6=False): |
| 693 | # type: (bool) -> Dict[NetworkInterface, List[str]] |
| 694 | """Returns all available IPs matching to interfaces, using the windows system. |
| 695 | Should only be used as a WinPcapy fallback. |
| 696 | |
| 697 | :param v6: IPv6 addresses |
| 698 | """ |
| 699 | res = {} |
| 700 | for iface in conf.ifaces.values(): |
| 701 | if v6: |
| 702 | res[iface] = iface.ips[6] |
| 703 | else: |
| 704 | res[iface] = iface.ips[4] |
| 705 | return res |
| 706 | |
| 707 | |
| 708 | def get_ip_from_name(ifname, v6=False): |
no test coverage detected