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
829ce7d7
Commit
829ce7d7
authored
16 years ago
by
Jochen Bartl
Browse files
Options
Downloads
Patches
Plain Diff
Corrected some spelling errors in build_dissect.rst.
- Resolves #164
http://trac.secdev.org/scapy/ticket/164
parent
bc9a1059
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
doc/scapy/build_dissect.rst
+6
-6
6 additions, 6 deletions
doc/scapy/build_dissect.rst
with
6 additions
and
6 deletions
doc/scapy/build_dissect.rst
+
6
−
6
View file @
829ce7d7
...
@@ -12,7 +12,7 @@ Simple example
...
@@ -12,7 +12,7 @@ Simple example
A layer is a subclass of the ``Packet`` class. All the logic behind layer manipulation
A layer is a subclass of the ``Packet`` class. All the logic behind layer manipulation
is hold by the ``Packet`` class and will be inherited.
is hold by the ``Packet`` class and will be inherited.
A simple layer is compounded by a list of fields that will be either concatenated
A simple layer is compounded by a list of fields that will be either concatenated
when assembling the layer or dissected one by one when d
e
sassembling a string.
when assembling the layer or dissected one by one when d
i
sassembling a string.
The list of fields is held in an attribute named ``fields_desc``. Each field is an instance
The list of fields is held in an attribute named ``fields_desc``. Each field is an instance
of a field class::
of a field class::
...
@@ -695,7 +695,7 @@ automatically according to what comes next.
...
@@ -695,7 +695,7 @@ automatically according to what comes next.
If we use these classes with nothing else, we will have trouble when
If we use these classes with nothing else, we will have trouble when
dissecting the packets as nothing binds Foo layer with the multiple
dissecting the packets as nothing binds Foo layer with the multiple
``Bar*`` even when we explicit
e
ly build the packet through the call to
``Bar*`` even when we explicitly build the packet through the call to
``show2()``::
``show2()``::
>>> p = Foo()/Bar1(val=1337)
>>> p = Foo()/Bar1(val=1337)
...
@@ -723,7 +723,7 @@ behavior, we must look at how the layers are assembled. When two
...
@@ -723,7 +723,7 @@ behavior, we must look at how the layers are assembled. When two
independent packets instances ``Foo()`` and ``Bar1(val=1337)`` are
independent packets instances ``Foo()`` and ``Bar1(val=1337)`` are
compounded with the '/' operator, it results in a new packet where the
compounded with the '/' operator, it results in a new packet where the
two previous instances are cloned (i.e. are now two distinct objects
two previous instances are cloned (i.e. are now two distinct objects
structurally different
s
, but holding the same values)::
structurally different, but holding the same values)::
def __div__(self, other):
def __div__(self, other):
if isinstance(other, Packet):
if isinstance(other, Packet):
...
@@ -739,7 +739,7 @@ hand side. This is performed through the call to
...
@@ -739,7 +739,7 @@ hand side. This is performed through the call to
``add_payload()``. Finally, the new packet is returned.
``add_payload()``. Finally, the new packet is returned.
Note: we can observe that if other isn't a ``Packet`` but a string,
Note: we can observe that if other isn't a ``Packet`` but a string,
the ``Raw`` class is instantied to form the payload. Like in this
the ``Raw`` class is instanti
at
ed to form the payload. Like in this
example::
example::
>>> IP()/"AAAA"
>>> IP()/"AAAA"
...
@@ -773,7 +773,7 @@ For now, when the value of this field will be requested,
...
@@ -773,7 +773,7 @@ For now, when the value of this field will be requested,
The fields are dispatched between three dictionaries:
The fields are dispatched between three dictionaries:
- ``fields``: fields whose the value have been explicit
e
ly set, like
- ``fields``: fields whose the value have been explicitly set, like
``pdst`` in TCP (``pdst='42'``)
``pdst`` in TCP (``pdst='42'``)
- ``overloaded_fields``: overloaded fields
- ``overloaded_fields``: overloaded fields
- ``default_fields``: all the fields with their default value (these fields
- ``default_fields``: all the fields with their default value (these fields
...
@@ -952,7 +952,7 @@ Special
...
@@ -952,7 +952,7 @@ Special
PadField(fld, align, padwith=None)
PadField(fld, align, padwith=None)
# Add bytes after the proxified field so that it ends at
# Add bytes after the proxified field so that it ends at
# the specified alignment from its begining
# the specified alignment from its begin
n
ing
TCP/IP
TCP/IP
------
------
...
...
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