MCPcopy Create free account
hub / github.com/secdev/scapy / getfield

Method getfield

scapy/contrib/bgp.py:126–128  ·  view source on GitHub ↗
(self, pkt, s)

Source from the content-addressed store, hash-verified

124 return s + self.i2m(pkt, val)
125
126 def getfield(self, pkt, s):
127 length = self.mask2iplen(orb(s[0])) + 1
128 return s[length:], self.m2i(pkt, s[:length])
129
130 def m2i(self, pkt, m):
131 mask = orb(m[0])

Callers 1

getfieldMethod · 0.45

Calls 3

mask2iplenMethod · 0.95
m2iMethod · 0.95
orbFunction · 0.90

Tested by

no test coverage detected