Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
0ff702ff
Commit
0ff702ff
authored
7 years ago
by
Pierre LALET
Browse files
Options
Downloads
Patches
Plain Diff
Add PPP link types
parent
9b659725
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scapy/data.py
+3
-0
3 additions, 0 deletions
scapy/data.py
scapy/layers/ppp.py
+7
-0
7 additions, 0 deletions
scapy/layers/ppp.py
with
10 additions
and
0 deletions
scapy/data.py
+
3
−
0
View file @
0ff702ff
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
scapy/layers/ppp.py
+
7
−
0
View file @
0ff702ff
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment