On Mon, Jan 8, 2024 at 11:39 AM Jeremy Spewock <jspewock@iol.unh.edu> wrote:


On Mon, Jan 8, 2024 at 7:01 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
On Wed, Jan 3, 2024 at 11:33 PM <jspewock@iol.unh.edu> wrote:
>
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> Added the options to filter out LLDP and ARP packets when
> sniffing for packets with scapy. This was done using BPF filters to
> ensure that the noise these packets provide does not interfere with test
> cases.
>
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> ---
>  dts/framework/test_suite.py                   | 15 +++++++++--
>  dts/framework/testbed_model/tg_node.py        | 14 ++++++++--
>  .../traffic_generator/__init__.py             |  7 ++++-
>  .../capturing_traffic_generator.py            | 22 ++++++++++++++-
>  .../testbed_model/traffic_generator/scapy.py  | 27 +++++++++++++++++++
>  5 files changed, 79 insertions(+), 6 deletions(-)
>

<snip>

> diff --git a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
> index 0246590333..c1c9facedd 100644
> --- a/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
> +++ b/dts/framework/testbed_model/traffic_generator/capturing_traffic_generator.py
<snip>
> @@ -26,6 +27,19 @@ def _get_default_capture_name() -> str:
>      return str(uuid.uuid4())
>
>
> +@dataclass(slots=True)

This should also be frozen. If we need a different filter, it's better
to create a new object I think.

This is also a good point, I'll make this change as well.