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
b4d6c788
Commit
b4d6c788
authored
7 years ago
by
Pierre LALET
Browse files
Options
Downloads
Patches
Plain Diff
PPI: fix l2types and layers binding
parent
09053c76
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/contrib/ppi.py
+8
-7
8 additions, 7 deletions
scapy/contrib/ppi.py
with
8 additions
and
7 deletions
scapy/contrib/ppi.py
+
8
−
7
View file @
b4d6c788
...
@@ -21,8 +21,12 @@
...
@@ -21,8 +21,12 @@
"""
"""
PPI (Per-Packet Information).
PPI (Per-Packet Information).
"""
"""
import
logging
,
struct
import
logging
import
struct
from
scapy.config
import
conf
from
scapy.config
import
conf
from
scapy.data
import
DLT_EN10MB
,
DLT_IEEE802_11
,
DLT_PPI
from
scapy.packet
import
*
from
scapy.packet
import
*
from
scapy.fields
import
*
from
scapy.fields
import
*
from
scapy.layers.l2
import
Ether
from
scapy.layers.l2
import
Ether
...
@@ -88,10 +92,7 @@ class PPI(Packet):
...
@@ -88,10 +92,7 @@ class PPI(Packet):
#Register PPI
#Register PPI
addPPIType
(
"
default
"
,
PPIGenericFldHdr
)
addPPIType
(
"
default
"
,
PPIGenericFldHdr
)
conf
.
l2types
.
register
(
192
,
PPI
)
conf
.
l2types
.
register
(
DLT_PPI
,
PPI
)
conf
.
l2types
.
register_num2layer
(
192
,
PPI
)
bind_layers
(
PPI
,
Dot11
,
dlt
=
conf
.
l2types
.
get
(
Dot11
))
bind_layers
(
PPI
,
Dot11
,
dlt
=
DLT_IEEE802_11
)
bind_layers
(
Dot11
,
PPI
)
bind_layers
(
PPI
,
Ether
,
dlt
=
DLT_EN10MB
)
bind_layers
(
PPI
,
Ether
,
dlt
=
conf
.
l2types
.
get
(
Ether
))
bind_layers
(
Dot11
,
Ether
)
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