Getting info about network devices

Dave Ihnat ignatz at dminet.com
Thu Jun 10 12:31:58 UTC 2004


On Thu, Jun 10, 2004 at 11:30:54AM +0200, Krishnendu Sadhukhan wrote:
> Well, I am coding in C, so ifconfig won't be that convenient. I am
> rather looking for some kind of system data file, like /etc/path_to_inst
> in Solaris.
>
> Does RedHat provide this kind of data file so that programs can make
> use of them easily ?

Generally, an interface is configured at network startup time,
and tools such as 'ifconfig' query the driver interface for
information.  How the information is stored and presented to
ifconfig is distribution-dependent-- e.g., RedHat uses files in
/etc/sysconfig/network-scripts, and data from these files is parsed and
used in the network startup script in /etc/rc.d/init.d (and links to
the startup level directories).

You know, it *is* Open Source--just grab a copy of 'ifconfig' and take a look
at it.

Cheers,
-- 
	Dave Ihnat
	ignatz at dminet.com





More information about the redhat-list mailing list