MCPcopy 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

i2lenMethod · 0.95
i2mMethod · 0.95
getfieldMethod · 0.95
m2iMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected