Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/library/linux/khg/HyperNews/get/net/net-intro/1/2.html
Дата изменения: Thu Mar 23 12:38:17 2000
Дата индексирования: Wed Sep 15 04:09:36 2010
Кодировка:

Поисковые слова: обвмадеойс нефептощи рпфплпч
Re: Question on network interfaces The HyperNews Linux KHG Discussion Pages

Feedback: Re: Question on network interfaces

Forum: Network Buffers And Memory Management
Re: Question Question on network interfaces (Vijay Gupta)
Keywords: network interface
Date: Wed, 28 Aug 1996 15:33:15 GMT
From: Pedro Roque <roque@di.fc.ul.pt>

If you want to scan the interface list from kernel space you can do something like:

{
	struct device *dev;

	for (dev = dev_base; dev != NULL; dev = dev->next) 
        {
		/* your code here */
		/* example */
		
		if (dev->family == AF_INET)
		{
			/* this is an inet device */
		}

		if (dev->type == ARPHRD_ETHER)
		{
			/* this is ethernet */
		}
	}
}

./Pedro.