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 <[email protected]>

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 : [email protected])


Messages

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