Savagedlight / libifconfig

A C API to do most things done by the FreeBSD 'ifconfig' program today
Other
26 stars 7 forks source link

Allow to retrieve original interface name via ifconfig_get_orig_name() #52

Closed s3erios closed 6 years ago

s3erios commented 6 years ago

This approach uses net.link sysctl (may be suboptimal with many interfaces in system, but utilizes existing kernel functionality).

There is no MIT license header (since the code is rewritten part of head/tools/tools/ifinfo/ifinfo.c, I think this should be mentioned somehow).

asomers commented 6 years ago

What's the equivalent operation using command line?

s3erios commented 6 years ago

I'm not sure if there is any such command exists; 'ifinfo' tool (in tools/tools/ifinfo) just displays it in parentheses (e.g., 'Interface lo0 (lo0)).

Savagedlight commented 6 years ago

Thanks for the contribution! PR was committed to downstream a while ago, time to commit it here too.