(ipaddr: str)
| 30 | SOCK_SEQPACKET = 5 |
| 31 | |
| 32 | def inet_aton(ipaddr: str) -> int: |
| 33 | # ipdata = bytes(int(a, 0) for a in ipaddr.split('.', 4)) |
| 34 | ipdata = ipaddress.IPv4Address(ipaddr).packed |
| 35 | |
| 36 | return int.from_bytes(ipdata, byteorder='big') |
| 37 | |
| 38 | |
| 39 | def inet6_aton(ipaddr: str) -> Tuple[int, ...]: |
no outgoing calls
no test coverage detected