Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
Index your code
hub
/
github.com/secdev/scapy
/ ip2int
Method
ip2int
scapy/base_classes.py:202–206 ·
view source on GitHub ↗
(cls, addr)
Source
from the content-addressed store, hash-verified
200
201
@classmethod
202
def
ip2int(cls, addr):
203
# type: (str) -> int
204
return
cast(int, struct.unpack(
205
"!I"
, socket.inet_aton(cls.name2addr(addr))
206
)[0])
207
208
@staticmethod
209
def
int2ip(val):
Callers
1
__init__
Method · 0.95
Calls
1
name2addr
Method · 0.80
Tested by
no test coverage detected