diff --git a/doc/scapy/advanced_usage.rst b/doc/scapy/advanced_usage.rst index 4458e16cb50074aa85e9dc65e9d4decf573409ee..c15f4622f95e9c1512c23fdd84084cf21011028f 100644 --- a/doc/scapy/advanced_usage.rst +++ b/doc/scapy/advanced_usage.rst @@ -541,7 +541,7 @@ Running this example gives the following result:: This simple automaton can be described with the following graph: - +.. image:: graphics/ATMT_HelloWorld.* The graph can be automatically drawn from the code with:: @@ -583,6 +583,8 @@ Real example Here is a real example take from Scapy. It implements a TFTP client that can issue read requests. +.. image:: graphics/ATMT_TFTP_read.* + :: class TFTP_read(Automaton): @@ -784,5 +786,5 @@ Two methods are hooks to be overloaded. The ``parse_args()`` method is called with arguments given at ``__init__()`` and ``run()``. Use that to parametrize the behaviour of your automaton. -The ``master_filter()` method is called each time a packet is sniffed and decides if it is interesting for the automaton. When working on a specific protocol, this is where you will ensure the packet belongs to the connection you are being part of, so that you do not need to make all the sanity checks in each transition. +The ``master_filter()`` method is called each time a packet is sniffed and decides if it is interesting for the automaton. When working on a specific protocol, this is where you will ensure the packet belongs to the connection you are being part of, so that you do not need to make all the sanity checks in each transition. diff --git a/graphics/ATMT_HelloWorld.png b/graphics/ATMT_HelloWorld.png new file mode 100644 index 0000000000000000000000000000000000000000..e5b5ddb188a64bba6f71d07ff850d4f9601a0ce5 Binary files /dev/null and b/graphics/ATMT_HelloWorld.png differ diff --git a/graphics/ATMT_TFTP_read.png b/graphics/ATMT_TFTP_read.png new file mode 100644 index 0000000000000000000000000000000000000000..50621d976ac1addc852537ac49343ffd0e9e7209 Binary files /dev/null and b/graphics/ATMT_TFTP_read.png differ