Skip to content

Commit

Permalink
examples: python: Call print_interfaces
Browse files Browse the repository at this point in the history
Call print_interfaces just like C version of server and client do.

Signed-off-by: Yasushi SHOJI <[email protected]>
  • Loading branch information
yashi committed Apr 30, 2024
1 parent 9dfa1ee commit f33f496
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/python_bindings_example_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
3 changes: 3 additions & 0 deletions examples/python_bindings_example_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit f33f496

Please sign in to comment.