Commit 8ffe81d4 authored by Martín Ferrari's avatar Martín Ferrari

Initial template for commands interface

parent 2849fdf7
#!/usr/bin/env python
# vim:ts=4:sw=4:et:ai:sts=4
"""Utility functions to interact with system commands, such as `ip' and
`tc'."""
def get_interfaces(iface = None):
"""Returns a dictionary, indexed by interface number, with link and address
information about each interface contained in another dict.
ret = {
1: {
'name' : 'lo',
'flags' : ['UP', 'LOOPBACK'],
'mtu' : 16436,
'qdisc' : 'noqueue',
'lladdr' : '00:00:00:00:00:00',
'addr' : [ {
'addr' : '127.0.0.1',
'plen' : 8,
'bcast' : None,
'family': 'inet'
}, {
'addr' : '::1',
'plen' : 128,
'family': 'inet6'
} ]
},
}"""
pass
def get_routes():
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment