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.
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 exampleifconfig_group_get_groups
.