Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/secdev/scapy
/ mask2iplen
Method
mask2iplen
scapy/contrib/bgp.py:94–96 ·
view source on GitHub ↗
Get the IP field mask length (in bytes).
(self, mask)
Source
from the content-addressed store, hash-verified
92
""
"
93
94
def
mask2iplen(self, mask):
95
""
"Get the IP field mask length (in bytes)."
""
96
return
(mask + 7) // 8
97
98
def
h2i(self, pkt, h):
99
""
"x.x.x.x/y to "
internal
" representation."
""
Callers
4
i2len
Method · 0.95
i2m
Method · 0.95
getfield
Method · 0.95
m2i
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected