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
9f6816e3
Commit
9f6816e3
authored
9 years ago
by
Pierre LALET
Browse files
Options
Downloads
Patches
Plain Diff
Fix test case (Packet attributes need to be in __slots__)
parent
cb081c79
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/regression.uts
+5
-5
5 additions, 5 deletions
test/regression.uts
with
5 additions
and
5 deletions
test/regression.uts
+
5
−
5
View file @
9f6816e3
...
@@ -218,15 +218,15 @@ assert(_ == '5\x00\x00\x14\x00\x01\x00\x00 \x00\xac\xe7\x7f\x00\x00\x01\x7f\x00\
...
@@ -218,15 +218,15 @@ assert(_ == '5\x00\x00\x14\x00\x01\x00\x00 \x00\xac\xe7\x7f\x00\x00\x01\x7f\x00\
~ field actionfield
~ field actionfield
class TestAction(Packet):
class TestAction(Packet):
__slots__ = ["_val", "_fld", "_priv1", "_priv2"]
name = "TestAction"
name = "TestAction"
fields_desc = [ ActionField(ByteField("tst", 3), "my_action", priv1=1, priv2=2) ]
fields_desc = [ ActionField(ByteField("tst", 3), "my_action", priv1=1, priv2=2) ]
_val = None
def __init__(self, *args, **kargs):
_fld = None
self._val, self._fld, self._priv1, self._priv2 = None, None, None, None
_priv1 = None
super(TestAction, self).__init__(*args, **kargs)
_priv2 = None
def my_action(self, val, fld, priv1, priv2):
def my_action(self, val, fld, priv1, priv2):
print "Action (%i)!" %val
print "Action (%i)!" %val
self._val, self._fld, self._priv1, self._priv2 = val, fld, priv1, priv2
self._val, self._fld, self._priv1, self._priv2 = val, fld, priv1, priv2
= Triggering action
= Triggering action
~ field actionfield
~ field actionfield
...
...
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