VintageNet.Interface.Classification.to_instance

You're seeing just the function to_instance, go back to VintageNet.Interface.Classification module for more information.

Specs

to_instance(VintageNet.ifname()) :: non_neg_integer()

Extract a number out of an interface name

The result is the interface index for most interfaces seen on Nerves (eth0, eth1, ...), and something quite imperfect when using predictable interface naming (enp6s0, enp6s1).

This is currently used to order priorities when there are two interfaces available of the same type that cannot be differentiated by other means. It has the one property of being easy to explain.