diff --git a/scapy/data.py b/scapy/data.py index 33224223078ac413755f272fab8c9e56e0f836a5..a3a9b588f0fb280f6c8637648707c1add0b27b4f 100644 --- a/scapy/data.py +++ b/scapy/data.py @@ -32,6 +32,9 @@ ARPHDR_TUN = 65534 # From pcap/dlt.h DLT_NULL = 0 +DLT_PPP = 9 +DLT_PPP_SERIAL = 50 +DLT_PPP_ETHER = 51 DLT_RAW = 101 DLT_IPV4 = 228 DLT_IPV6 = 229 diff --git a/scapy/layers/ppp.py b/scapy/layers/ppp.py index 8ebd2ceadc829ac4bcae16ba489e23a5ccfc7186..f195ac2cb27a70bd3d8ebf5c1b0a5a3ca4348f62 100644 --- a/scapy/layers/ppp.py +++ b/scapy/layers/ppp.py @@ -10,6 +10,8 @@ PPP (Point to Point Protocol) """ import struct +from scapy.config import conf +from scapy.data import DLT_PPP, DLT_PPP_SERIAL, DLT_PPP_ETHER from scapy.packet import Packet, bind_layers from scapy.layers.eap import EAP from scapy.layers.l2 import Ether, CookedLinux, GRE_PPTP @@ -709,3 +711,8 @@ bind_layers( PPP, PPP_PAP, proto=0xc023) bind_layers( Ether, PPP_IPCP, type=0x8021) bind_layers( Ether, PPP_ECP, type=0x8053) bind_layers( GRE_PPTP, PPP, proto=0x880b) + + +conf.l2types.register(DLT_PPP, PPP) +conf.l2types.register(DLT_PPP_SERIAL, HDLC) +conf.l2types.register(DLT_PPP_ETHER, PPPoE)