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

Function _send

scapy/sendrecv.py:436–458  ·  view source on GitHub ↗

Internal function used by send and sendp

(x,  # type: _PacketIterable
          _func,  # type: Callable[[NetworkInterface], Type[SuperSocket]]
          inter=0,  # type: int
          loop=0,  # type: int
          iface=None,  # type: Optional[_GlobInterfaceType]
          count=None,  # type: Optional[int]
          verbose=None,  # type: Optional[int]
          realtime=False,  # type: bool
          return_packets=False,  # type: bool
          socket=None,  # type: Optional[SuperSocket]
          **kargs  # type: Any
          )

Source from the content-addressed store, hash-verified

434
435
436def _send(x, # type: _PacketIterable
437 _func, # type: Callable[[NetworkInterface], Type[SuperSocket]]
438 inter=0, # type: int
439 loop=0, # type: int
440 iface=None, # type: Optional[_GlobInterfaceType]
441 count=None, # type: Optional[int]
442 verbose=None, # type: Optional[int]
443 realtime=False, # type: bool
444 return_packets=False, # type: bool
445 socket=None, # type: Optional[SuperSocket]
446 **kargs # type: Any
447 ):
448 # type: (...) -> Optional[PacketList]
449 """Internal function used by send and sendp"""
450 need_closing = socket is None
451 iface = resolve_iface(iface or conf.iface)
452 socket = socket or _func(iface)(iface=iface, **kargs)
453 results = __gen_send(socket, x, inter=inter, loop=loop,
454 count=count, verbose=verbose,
455 realtime=realtime, return_packets=return_packets)
456 if need_closing:
457 socket.close()
458 return results
459
460
461@conf.commands.register

Callers 2

sendFunction · 0.85
sendpFunction · 0.85

Calls 3

resolve_ifaceFunction · 0.90
__gen_sendFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected