|
10 | 10 | """ |
11 | 11 |
|
12 | 12 | import struct |
13 | | -from scapy.packet import * |
14 | | -from scapy.layers.l2 import * |
15 | | -from scapy.layers.inet import * |
16 | | -from scapy.fields import * |
| 13 | +from scapy.packet import Packet, bind_layers |
| 14 | +from scapy.layers.l2 import Ether, CookedLinux |
| 15 | +from scapy.layers.inet import IP |
| 16 | +from scapy.layers.inet6 import IPv6 |
| 17 | +from scapy.fields import BitField, ByteEnumField, ByteField, \ |
| 18 | + ConditionalField, FieldLenField, IPField, PacketListField, \ |
| 19 | + ShortEnumField, ShortField, StrFixedLenField, StrLenField, XByteField, \ |
| 20 | + XShortField |
| 21 | + |
17 | 22 |
|
18 | 23 | class PPPoE(Packet): |
19 | 24 | name = "PPP over Ethernet" |
@@ -340,7 +345,8 @@ class PPP_ECP(Packet): |
340 | 345 | bind_layers( CookedLinux, PPPoE, proto=0x8864) |
341 | 346 | bind_layers( PPPoE, PPP, code=0) |
342 | 347 | bind_layers( HDLC, PPP, ) |
343 | | -bind_layers( PPP, IP, proto=33) |
| 348 | +bind_layers( PPP, IP, proto=0x0021) |
| 349 | +bind_layers( PPP, IPv6, proto=0x0057) |
344 | 350 | bind_layers( PPP, PPP_IPCP, proto=0x8021) |
345 | 351 | bind_layers( PPP, PPP_ECP, proto=0x8053) |
346 | 352 | bind_layers( Ether, PPP_IPCP, type=0x8021) |
|
0 commit comments