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

Method _subval

scapy/layers/dcerpc.py:2266–2277  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

2264 return super(_NDRConfField, self).addfield(pkt, s, value)
2265
2266 def _subval(self, x):
2267 if self.conformant_in_struct:
2268 value = x
2269 elif (
2270 not self.CONFORMANT_STRING
2271 and x.value
2272 and isinstance(x.value[0], NDRVaryingArray)
2273 ):
2274 value = x.value[0]
2275 else:
2276 value = x.value
2277 return value
2278
2279 def i2len(self, pkt, x):
2280 return super(_NDRConfField, self).i2len(pkt, self._subval(x))

Callers 3

i2lenMethod · 0.95
valueofMethod · 0.95
valueofMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected