Skip to content
Snippets Groups Projects
Commit 829ce7d7 authored by Jochen Bartl's avatar Jochen Bartl
Browse files

Corrected some spelling errors in build_dissect.rst.

- Resolves #164 http://trac.secdev.org/scapy/ticket/164
parent bc9a1059
No related branches found
No related tags found
No related merge requests found
...@@ -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 desassembling a string. when assembling the layer or dissected one by one when disassembling 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 explicitely 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 differents, 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 instantiated 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 explicitely 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 beginning
TCP/IP TCP/IP
------ ------
......
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