Skip to content

Commit

Permalink
python: Add print_interfaces()
Browse files Browse the repository at this point in the history
Add a new method, print_interfaces(), which intern calls
csp_iflist_print().

Signed-off-by: Yasushi SHOJI <[email protected]>
  • Loading branch information
yashi committed Apr 30, 2024
1 parent 333e5d1 commit 9dfa1ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bindings/python/pycsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,11 @@ static PyObject * pycsp_print_routes(PyObject * self, PyObject * args) {
Py_RETURN_NONE;
}

static PyObject * pycsp_print_interfaces(PyObject * self, PyObject * args) {
csp_iflist_print();
Py_RETURN_NONE;
}

static PyMethodDef methods[] = {

/* csp/csp.h */
Expand Down Expand Up @@ -999,6 +1004,7 @@ static PyMethodDef methods[] = {
{"packet_set_data", pycsp_packet_set_data, METH_VARARGS, ""},
{"print_connections", pycsp_print_connections, METH_NOARGS, ""},
{"print_routes", pycsp_print_routes, METH_NOARGS, ""},
{"print_interfaces", pycsp_print_interfaces, METH_NOARGS, ""},

/* sentinel */
{NULL, NULL, 0, NULL}};
Expand Down

0 comments on commit 9dfa1ee

Please sign in to comment.