From f33f496ca3635e59103599df0a95a0dcee9c201c Mon Sep 17 00:00:00 2001 From: Yasushi SHOJI Date: Tue, 30 Apr 2024 18:48:13 +0900 Subject: [PATCH] examples: python: Call print_interfaces Call print_interfaces just like C version of server and client do. Signed-off-by: Yasushi SHOJI --- examples/python_bindings_example_client.py | 4 ++++ examples/python_bindings_example_server.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/examples/python_bindings_example_client.py b/examples/python_bindings_example_client.py index e875e7bed..ea9de49e0 100644 --- a/examples/python_bindings_example_client.py +++ b/examples/python_bindings_example_client.py @@ -68,6 +68,10 @@ def getOptions(): # [state 1 or 0 (open/closed)] [5-bit src address] [5-bit dest address] [6-bit dest port] [6 bit src port] [socket to be woken when packet is ready] libcsp.print_connections() + print("Interfaces:") + # Prints interfaces format: + libcsp.print_interfaces() + print("Routes:") # Prints route table format: # [address] [netmask] [interface name] optional([via]) diff --git a/examples/python_bindings_example_server.py b/examples/python_bindings_example_server.py index a40c7b43a..d0c482169 100644 --- a/examples/python_bindings_example_server.py +++ b/examples/python_bindings_example_server.py @@ -122,6 +122,9 @@ def csp_server(): print("Model: %s" % libcsp.get_model()) print("Revision: %s" % libcsp.get_revision()) + print("Interfaces:") + libcsp.print_interfaces() + print("Routes:") libcsp.print_routes()