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

Method any2i

scapy/layers/dns.py:1238–1248  ·  view source on GitHub ↗
(self, pkt, x)

Source from the content-addressed store, hash-verified

1236class _DNSPacketListField(PacketListField):
1237 # A normal PacketListField with backward-compatible hacks
1238 def any2i(self, pkt, x):
1239 # type: (Optional[Packet], List[Any]) -> List[Any]
1240 if x is None:
1241 warnings.warn(
1242 ("The DNS fields 'qd', 'an', 'ns' and 'ar' are now "
1243 "PacketListField(s) ! "
1244 "Setting a null default should be [] instead of None"),
1245 DeprecationWarning
1246 )
1247 x = []
1248 return super(_DNSPacketListField, self).any2i(pkt, x)
1249
1250 def i2h(self, pkt, x):
1251 # type: (Optional[Packet], List[Packet]) -> Any

Callers

nothing calls this directly

Calls 1

any2iMethod · 0.45

Tested by

no test coverage detected