Savagedlight / libifconfig

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

Subnamespace libifconfig #47

Open asomers opened 7 years ago

asomers commented 7 years ago

sbin/ifconfig is organized into a base/mixin model. Some basic functionality like setting an interface description is contained in ifconfig.c, but most functionality is contained in mixin files for each feature domain. Cramming all of ifconfig's features into a single file would make for an unmanageably large file, so I suggest that libifconfig organize itself the same way. Doing so will also make the conversion of ifconfig easier. Except for a few core functions, I suggest that most of libifconfig's public functions be named ifconfig_<DOMAIN>_<GET|SET>_<THING>, for example ifconfig_group_get_groups.

Savagedlight commented 7 years ago

This idea makes a lot of sense, and I'll give it further thought once IRL cools down a bit & I get my dev environment back up and running. :)