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

Method __init__

scapy/arch/linux/__init__.py:319–337  ·  view source on GitHub ↗
(self,
                 iface=None,  # type: Optional[Union[str, NetworkInterface]]
                 type=ETH_P_ALL,  # type: int
                 promisc=None,  # type: Optional[Any]
                 filter=None,  # type: Optional[Any]
                 nofilter=0,  # type: int
                 monitor=None,  # type: Optional[Any]
                 )

Source from the content-addressed store, hash-verified

317 desc = "read/write packets at layer 3 using Linux PF_PACKET sockets"
318
319 def __init__(self,
320 iface=None, # type: Optional[Union[str, NetworkInterface]]
321 type=ETH_P_ALL, # type: int
322 promisc=None, # type: Optional[Any]
323 filter=None, # type: Optional[Any]
324 nofilter=0, # type: int
325 monitor=None, # type: Optional[Any]
326 ):
327 self.send_socks = {}
328 super(L3PacketSocket, self).__init__(
329 iface=iface,
330 type=type,
331 promisc=promisc,
332 filter=filter,
333 nofilter=nofilter,
334 monitor=monitor,
335 )
336 self.filter = filter
337 self.send_socks = {network_name(self.iface): self}
338
339 def recv(self, x=MTU, **kwargs):
340 # type: (int, **Any) -> Optional[Packet]

Callers

nothing calls this directly

Calls 2

network_nameFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected