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

Method i2m

scapy/layers/inet6.py:273–282  ·  view source on GitHub ↗
(self, pkt, x)

Source from the content-addressed store, hash-verified

271 return remain + ret, lst
272
273 def i2m(self, pkt, x):
274 s = b""
275 for y in x:
276 try:
277 y = inet_pton(socket.AF_INET6, y)
278 except Exception:
279 y = socket.getaddrinfo(y, None, socket.AF_INET6)[0][-1][0]
280 y = inet_pton(socket.AF_INET6, y)
281 s += y
282 return s
283
284 def i2repr(self, pkt, x):
285 s = []

Callers 1

addfieldMethod · 0.45

Calls 1

inet_ptonFunction · 0.90

Tested by

no test coverage detected