The HyperNews Linux KHG Discussion Pages
Next-in-Thread Next Message Previous Message Next Thread

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.

Next-in-Thread Next Message Previous Message Next Thread

to: "Re: Question on network interfaces"

Subscribe Membership Move/Remove Admin Mode Show Frames Help for HyperNews 1.9.4