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

Method _l3socket

scapy/interfaces.py:63–74  ·  view source on GitHub ↗

Return L3 socket used by interfaces of this provider

(self, dev, ipv6)

Source from the content-addressed store, hash-verified

61 return conf.L2listen
62
63 def _l3socket(self, dev, ipv6):
64 # type: (NetworkInterface, bool) -> Type[scapy.supersocket.SuperSocket]
65 """Return L3 socket used by interfaces of this provider"""
66 if LINUX and not self.libpcap and dev.name == conf.loopback_name:
67 # handle the loopback case. see troubleshooting.rst
68 if ipv6:
69 from scapy.supersocket import L3RawSocket6
70 return cast(Type['scapy.supersocket.SuperSocket'], L3RawSocket6)
71 else:
72 from scapy.supersocket import L3RawSocket
73 return L3RawSocket
74 return conf.L3socket
75
76 def _is_valid(self, dev):
77 # type: (NetworkInterface) -> bool

Callers 1

l3socketMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected