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

Поисковые слова: rigel
Question on network interfaces The HyperNews Linux KHG Discussion Pages

Question: Question on network interfaces

Forum: Network Buffers And Memory Management
Keywords: network interface
Date: Sun, 19 May 1996 17:46:31 GMT
From: Vijay Gupta <vijay@crhc.uiuc.edu>

Hi,

        I am working on some networking code at the kernel level
using version 1.3.71. I had the following problems :

How to find :

(1) the interfaces which are available :

        (e.g. in the case of a router, you will have many
         interfaces, one interface for each of its IP addresses).

        Many times you have both a SLIP as well as an Ethernet
        interface to your router computer.

(2) the status of the interface :

        whether the interface is up or down.

There is a structure called "struct ifnet" which is used in include/linux/route.h. struct ifnet has information like the name of the interface (e.g. le0 or sl0), as well as the status of the interface (whether up or down).

But I could not find the definition of this structure anywhere in version 1.3.71.

Older versions of linux had the definition of this structure available (struct ifnet also occurs in BSD code). But now I am unable to find its definition or use. Is there a substitute for that structure ?

If there is no substitute, is it the case that the information about the available interfaces cannot be obtained ?

Thank you very much,
        Vijay Gupta
        (Email : vijay@crhc.uiuc.edu)


Messages

2. Feedback: Re: Question on network interfaces by Pedro Roque
1. None: Untitled
1. Note: Finding net info by Alan Cox