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

Method send

scapy/supersocket.py:392–410  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

390 return pkt
391
392 def send(self, x):
393 # type: (Packet) -> int
394 try:
395 sx = raw(x)
396 if self.outs:
397 x.sent_time = time.time()
398 return self.outs.sendto(
399 sx,
400 (x.dst, 0)
401 )
402 except AttributeError:
403 raise ValueError(
404 "Missing 'dst' attribute in the first layer to be "
405 "sent using a native L3 socket ! (make sure you passed the "
406 "IP layer)"
407 )
408 except socket.error as msg:
409 log_runtime.error(msg)
410 return 0
411
412 class L3RawSocket6(L3RawSocket):
413 def __init__(self,

Callers

nothing calls this directly

Calls 1

rawFunction · 0.90

Tested by

no test coverage detected