Skip to content
Snippets Groups Projects
Commit 0ff702ff authored by Pierre LALET's avatar Pierre LALET
Browse files

Add PPP link types

parent 9b659725
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,9 @@ ARPHDR_TUN = 65534 ...@@ -32,6 +32,9 @@ ARPHDR_TUN = 65534
# From pcap/dlt.h # From pcap/dlt.h
DLT_NULL = 0 DLT_NULL = 0
DLT_PPP = 9
DLT_PPP_SERIAL = 50
DLT_PPP_ETHER = 51
DLT_RAW = 101 DLT_RAW = 101
DLT_IPV4 = 228 DLT_IPV4 = 228
DLT_IPV6 = 229 DLT_IPV6 = 229
......
...@@ -10,6 +10,8 @@ PPP (Point to Point Protocol) ...@@ -10,6 +10,8 @@ PPP (Point to Point Protocol)
""" """
import struct 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.packet import Packet, bind_layers
from scapy.layers.eap import EAP from scapy.layers.eap import EAP
from scapy.layers.l2 import Ether, CookedLinux, GRE_PPTP from scapy.layers.l2 import Ether, CookedLinux, GRE_PPTP
...@@ -709,3 +711,8 @@ bind_layers( PPP, PPP_PAP, proto=0xc023) ...@@ -709,3 +711,8 @@ bind_layers( PPP, PPP_PAP, proto=0xc023)
bind_layers( Ether, PPP_IPCP, type=0x8021) bind_layers( Ether, PPP_IPCP, type=0x8021)
bind_layers( Ether, PPP_ECP, type=0x8053) bind_layers( Ether, PPP_ECP, type=0x8053)
bind_layers( GRE_PPTP, PPP, proto=0x880b) 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment