mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
Find interface index for wireless interfaces
helper function to find number to pass to run command of miracle-sinkctl
This commit is contained in:
parent
a2735d9b4d
commit
3dfa75d90b
1 changed files with 22 additions and 0 deletions
|
@ -50,6 +50,17 @@ function find_wireless_pci_slot {
|
||||||
show_pci_slot $i
|
show_pci_slot $i
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# find wireless pci slot
|
||||||
|
#
|
||||||
|
function find_wireless_ifindex {
|
||||||
|
for i in $( find_wireless_network_interfaces )
|
||||||
|
do
|
||||||
|
show_ifindex $i
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# find wireless connected interfaces
|
# find wireless connected interfaces
|
||||||
#
|
#
|
||||||
|
@ -74,6 +85,17 @@ function find_physical_for_network_interface {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# find interface index for interface
|
||||||
|
#
|
||||||
|
function show_ifindex {
|
||||||
|
IF_INDEX=$(iw dev $1 info | grep ifindex | awk '{print $2}')
|
||||||
|
if [ -n "$IF_INDEX" ]
|
||||||
|
then
|
||||||
|
echo $IF_INDEX
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check interface for P2P capabilities
|
# Check interface for P2P capabilities
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue