Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluation: results from the resgister to extern python program #5

Open
lululouisa opened this issue Dec 1, 2022 · 1 comment
Open

Comments

@lululouisa
Copy link

Hi,
i am wondering could we directly read the results value from the register to extern python program for a further evaluation?
i notice that in SwitchTree, you counted the number of detected attacks and normal packets based on the port respectively. However, when i prefer to use these values to draw a result figure, i have no idea to input these value directly into the python program. Or can i only manually record them and input into the python?

Thank you~~
Best regards,
Louisa

@ksingh25
Copy link
Owner

ksingh25 commented Dec 10, 2022

Hello,

Switchtree uses CLI for control plane. For controlling it using python and possibly reading statistics, you may check p4runtime examples . It shows an example to use python scripts such as mycontroller.py.
For that one will have to make gRPC work as well.

Another way could be to launch the CLI command using a python script and parse the output.

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants