fragattacks/tests/hwsim/utils.py
Jouni Malinen 19ae1d0788 tests: Verify P2P operations with a separate group interface
This extends P2P test coverage to include the case of separate group
interface use with autonomous GO and group formation through GO
negotiation.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-24 15:32:52 +02:00

18 lines
456 B
Python

#!/usr/bin/python
#
# Testing utilities
# Copyright (c) 2013, Jouni Malinen <j@w1.fi>
#
# 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