Rich Lane | a68176f | 2013-08-09 17:41:05 -0700 | [diff] [blame] | 1 | # Distributed under the OpenFlow Software License (see LICENSE) |
| 2 | # Copyright (c) 2010 The Board of Trustees of The Leland Stanford Junior University |
| 3 | # Copyright (c) 2012, 2013 Big Switch Networks, Inc. |
| 4 | """ |
| 5 | Wrap scapy to satisfy pylint |
| 6 | """ |
Rich Lane | 720eaf2 | 2013-08-09 18:00:45 -0700 | [diff] [blame] | 7 | import sys |
Rich Lane | a68176f | 2013-08-09 17:41:05 -0700 | [diff] [blame] | 8 | |
| 9 | try: |
Rich Lane | 024f9d5 | 2013-08-12 15:56:39 -0700 | [diff] [blame] | 10 | import scapy.config |
| 11 | import scapy.route |
| 12 | import scapy.route6 |
Rich Lane | a68176f | 2013-08-09 17:41:05 -0700 | [diff] [blame] | 13 | import scapy.layers.l2 |
| 14 | import scapy.layers.inet |
| 15 | import scapy.layers.inet6 |
| 16 | except ImportError: |
| 17 | sys.exit("Need to install scapy for packet parsing") |
| 18 | |
| 19 | Ether = scapy.layers.l2.Ether |
| 20 | LLC = scapy.layers.l2.LLC |
| 21 | SNAP = scapy.layers.l2.SNAP |
| 22 | Dot1Q = scapy.layers.l2.Dot1Q |
| 23 | IP = scapy.layers.inet.IP |
| 24 | IPOption = scapy.layers.inet.IPOption |
| 25 | IPv6 = scapy.layers.inet6.IPv6 |
| 26 | ARP = scapy.layers.inet.ARP |
| 27 | TCP = scapy.layers.inet.TCP |
| 28 | UDP = scapy.layers.inet.UDP |
| 29 | ICMP = scapy.layers.inet.ICMP |
| 30 | ICMPv6Unknown = scapy.layers.inet6.ICMPv6Unknown |
| 31 | ICMPv6EchoRequest = scapy.layers.inet6.ICMPv6EchoRequest |