MCPcopy Index your code
hub / github.com/secdev/scapy / atol

Function atol

scapy/utils.py:755–761  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

753
754
755def atol(x):
756 # type: (str) -> int
757 try:
758 ip = inet_aton(x)
759 except socket.error:
760 raise ValueError("Bad IP format: %s" % x)
761 return cast(int, struct.unpack("!I", ip)[0])
762
763
764def valid_ip(addr):

Callers 10

make_routeMethod · 0.90
ifchangeMethod · 0.90
ifaddMethod · 0.90
routeMethod · 0.90
_read_routes_cFunction · 0.90
read_routesFunction · 0.90
read_routesFunction · 0.90
isValidMCAddrFunction · 0.90
parse_optionsMethod · 0.90
valid_ipFunction · 0.85

Calls 1

inet_atonFunction · 0.85

Tested by

no test coverage detected