(self, x)
| 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 | |
| 308 | class L2ListenSocket(L2Socket): |
no test coverage detected