2013-11-24 14:32:52 +01:00
|
|
|
# Testing utilities
|
2015-01-07 12:41:31 +01:00
|
|
|
# Copyright (c) 2013-2015, Jouni Malinen <j@w1.fi>
|
2013-11-24 14:32:52 +01:00
|
|
|
#
|
|
|
|
# This software may be distributed under the terms of the BSD license.
|
|
|
|
# See README for more details.
|
|
|
|
|
|
|
|
def get_ifnames():
|
|
|
|
ifnames = []
|
|
|
|
with open("/proc/net/dev", "r") as f:
|
|
|
|
lines = f.readlines()
|
|
|
|
for l in lines:
|
|
|
|
val = l.split(':', 1)
|
|
|
|
if len(val) == 2:
|
|
|
|
ifnames.append(val[0].strip(' '))
|
|
|
|
return ifnames
|
2015-01-07 12:41:31 +01:00
|
|
|
|
|
|
|
class HwsimSkip(Exception):
|
|
|
|
def __init__(self, reason):
|
|
|
|
self.reason = reason
|
|
|
|
def __str__(self):
|
|
|
|
return self.reason
|