You are here : python_3socketsocketif_nametoindex

socket.if_nametoindex() - socket

Return a network interface index number corresponding to an
interface name.
OSError if no interface with the given name exists.


Syntax

socket.if_nametoindex(if_name)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference