Available Network Interfaces?

I'm looking for a way to programmatically determine the available network interfaces on FreeBSD 8.1 install as well as an netstat packet statistics. Ideally in C or Python, and avoiding simply parsing ifconfig and other sys utilities. Are there any lower level ways to do this?

I'm also attempting to build a FreeBSD network firewall appliance with automated installation and a basic ncurses (dialog) user interface for deployment across a few sites I manage. It looks like PXE boot is still the best solution for automated installation and configuration (though scarcely documented). Does anyone have any experience with either of these who would be willing to share their recommendations and words of wisdom?

Rolling my own is a must here, not looking to run pfsense, etc.

Thanks! :D
 
I've been trying to sort through it, but it is quite complex. Does anyone know of a reliable python library that can do this?

Is the jumpstart guide still relevant? It looks quite dated...
 
ckp98 said:
Is the jumpstart guide still relevant? It looks quite dated...
The process hasn't changed, only the FreeBSD versions ;)
 
well $ ifconfig -l would be the easiest way, if you want to do it in C, just check the source of ifconfig...
 
Back
Top