Skip to content

Commit 80c6fc8

Browse files
committed
Minor fixes
1 parent 7d3e5cd commit 80c6fc8

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

docs/contributing.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ Modbus protocols).
163163

164164
If you want to add a new protocol please look at the ``minicps/protocols.py``
165165
module. ``Protocol`` is the base class, and the
166-
``NewProtocolNameProtocol(Protocol)`` should be your new child class containing
167-
the code to manage it. A good point to start it to take a look
166+
``[NewProtocolName]Protocol(Protocol)`` should be your new child class
167+
(inheriting from the ``Protocol`` class) containing
168+
the code to manage the new protocol. A good point to start it to take a look
168169
at ``tests/protocols_tests.py`` to see how other protocols classes
169170
are unit-tested.
170171

@@ -194,7 +195,7 @@ Testing
194195
========
195196

196197
Unit testing is hard to setup properly! Please if you find any inconsistent unit test or
197-
decomposable unit test or you want to add a new one.
198+
decomposable unit test or you want to add a new one then send a PR.
198199

199200
.. }}}
200201

docs/userguide.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ then you can ``cd swat-s1`` folder and run:
6767
6868
sudo python run.py
6969
70+
And you should see the following:
71+
72+
.. code-block:: console
73+
74+
*** Ping: testing ping reachability
75+
attacker -> plc1 plc2 plc3
76+
plc1 -> attacker plc2 plc3
77+
plc2 -> attacker plc1 plc3
78+
plc3 -> attacker plc1 plc2
79+
*** Results: 0% dropped (12/12 received)
80+
mininet>
81+
7082
7183
.. INSTALL OPTIONAL {{{3
7284
.. _install-optional:

examples/swat-s1/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def __init__(self, name, net):
2020
self.name = name
2121
self.net = net
2222

23-
self.net.start()
23+
net.start()
24+
25+
net.pingAll()
2426

2527
# start devices
2628
plc1, plc2, plc3, s1 = self.net.get(
@@ -35,7 +37,7 @@ def __init__(self, name, net):
3537

3638
CLI(self.net)
3739

38-
self.net.stop()
40+
net.stop()
3941

4042
if __name__ == "__main__":
4143

0 commit comments

Comments
 (0)