MCPcopy Index your code
hub / github.com/secdev/scapy / __init__

Method __init__

scapy/layers/dhcp.py:388–397  ·  view source on GitHub ↗
(self, size=None, rndstr=None)

Source from the content-addressed store, hash-verified

386
387class RandDHCPOptions(RandField):
388 def __init__(self, size=None, rndstr=None):
389 if size is None:
390 size = RandNumExpo(0.05)
391 self.size = size
392 if rndstr is None:
393 rndstr = RandBin(RandNum(0, 255))
394 self.rndstr = rndstr
395 self._opts = list(DHCPOptions.values())
396 self._opts.remove("pad")
397 self._opts.remove("end")
398
399 def _fix(self):
400 op = []

Callers

nothing calls this directly

Calls 5

RandNumExpoClass · 0.90
RandBinClass · 0.90
RandNumClass · 0.90
valuesMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected