summaryrefslogtreecommitdiffstats
path: root/python-ethtool/etherinfo_obj.c
Commit message (Collapse)AuthorAgeFilesLines
* Python reference counter was not properly set for etherinfo_ipv6addr objectsDavid Sommerseth2010-08-091-0/+1
| | | | | | | | | This caused a double free situation, when Python tried to free the object if the etherinfo::get_ipv6_addresses() method was called several times. In addition the ethtool::get_interfaces_info() would also free the structures uses by etherinfo_ipv6addr objects. Signed-off-by: David Sommerseth <davids@redhat.com>
* Moved etherinfo::ipv6_addresses to etherinfo::get_ipv6_addresses()David Sommerseth2010-08-031-29/+46
| | | | | | | This is more appropriate as it is not a static list of IPv6 address objects which are returned. Signed-off-by: David Sommerseth <davids@redhat.com>
* Added missing copyright notifications and updated where neededDavid Sommerseth2010-08-031-0/+16
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Improved IPv6 supportDavid Sommerseth2010-07-301-22/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As the IPv6 protocol allows a single device to have more than one IPv6 address, the previous implementation did not provide all IPv6 information. It would reject all except the last parsed IPv6 address. NOTE: This implementation will break the previous API. This change removes the ethtool.etherinfo.ipv6_address and ethtool.etherinfo.ipv6_netmask members. A new member is added, ethtool.etherinfo.ipv6_addresses (in plural). This contains a tupple list containing of ethtool.etherinfo_ipv6addr objects, one object for each configured IPv6 address on the device. These objects have the following members available: .address - The IPv6 address .netmask - The IPv6 netmask (in bit notation) .scope - A string with the IPv6 address scope Example code: import ethtool devs = ethtool.get_interfaces_info('eth0') for ip6 in devs[0].ipv6_addresses: print "[%s] %s/%i" % (ip6.scope, ip6.address, ip6.netmask) Signed-off-by: David Sommerseth <davids@redhat.com>
* Fixed a bug - IPv4 address quering tried to query NLQRY_LINK instead of ↵David Sommerseth2010-05-311-1/+1
| | | | NLQRY_ADDR
* Clean up - avoid static variables in etherinfo_obj.hDavid Sommerseth2010-04-281-0/+79
|
* Updated to fetch the interface information when the "getter" function triggersDavid Sommerseth2010-04-281-25/+41
|
* Changed the RETURN_STRING() macro to return None instead of False, to make ↵David Sommerseth2009-09-071-3/+3
| | | | it more Pythonish
* Make Python dir() function work with ethtool.etherinfo objectsDavid Sommerseth2009-09-071-2/+1
|
* Completed implementing the new Python get_interface_info() function.David Sommerseth2009-09-071-10/+64
| | | | | | | | | | | | | | | | | | It will return a list of Python etherinfo objects. These objects have the following properties: .device - Device name .mac_address - Hardware address .ipv4_address .ipv4_netmask .ipv4_broadcast .ipv6_address .ipv6_netmask In addition, it will produce a human readable output if these objects are treated as strings. It will not be possible to modify any of the properties in these objects.
* First cut at a python etherinfo class in C. Does nothing useful yet.David Sommerseth2009-09-041-0/+121