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

Method send

scapy/arch/linux/__init__.py:294–305  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

292 return self.LL, pkt, ts
293
294 def send(self, x):
295 # type: (Packet) -> int
296 try:
297 return SuperSocket.send(self, x)
298 except socket.error as msg:
299 if msg.errno == 22 and len(x) < conf.min_pkt_size:
300 padding = b"\x00" * (conf.min_pkt_size - len(x))
301 if isinstance(x, Packet):
302 return SuperSocket.send(self, x / Padding(load=padding))
303 else:
304 return SuperSocket.send(self, raw(x) + padding)
305 raise
306
307
308class L2ListenSocket(L2Socket):

Callers 2

_sr1_rtrequestFunction · 0.45
sendMethod · 0.45

Calls 2

PaddingClass · 0.90
rawFunction · 0.90

Tested by

no test coverage detected