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

Method m2i

scapy/layers/dcerpc.py:2010–2017  ·  view source on GitHub ↗
(self, pkt, s)

Source from the content-addressed store, hash-verified

2008 NDRConstructedType.__init__(self, [self.fld])
2009
2010 def m2i(self, pkt, s):
2011 remain, val = self.fld.getfield(pkt, s)
2012 if val is None:
2013 val = NDRNone()
2014 # A mistake here would be to use / instead of add_payload. It adds a copy
2015 # which breaks pointer defferal. Same applies elsewhere
2016 val.add_payload(conf.padding_layer(remain))
2017 return val
2018
2019 def any2i(self, pkt, x):
2020 # User-friendly helper

Callers

nothing calls this directly

Calls 3

NDRNoneClass · 0.85
getfieldMethod · 0.45
add_payloadMethod · 0.45

Tested by

no test coverage detected