problem probing network interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   Date: Thu, 08 May 2003 14:24:07 -0400
   From: Jeff Garzik <jgarzik@pobox.com>

   > OK.  So why are you testing for "running" rather than "up"?  Are these
   > two synonymous in the kernel?

   I don't test either of these in my drivers.

Ummm... lines 2455-2456 from "drivers/net/8139too.c" in 2.4.21-pre7
read

	if (!netif_running(dev))
		return -EINVAL;

This is the first action inside netdev_ioctl().  Is that one of your
drivers?  (I'm not trying to be difficult or sarcastic, I'm just
trying to understand what is going on.)

   > More generally, I need some help understanding how to configure a
   > "down" interface to detect link beat.

   Like I just said, this is mostly impossible.

   If the interface is down, consider the NIC powered down.  There is
   obviously no link beat.

   > My program polls the known interfaces to see if there are any
   > changes to link beat.  Right now I'm just ORing in IFF_UP to the
   > existing set of flags but I worry that by doing so I'm doing too
   > much.  Is there a minimum set of flags that will give me access
   > to link beat without making the interface fully active?

   See what I said, above :)

Sorry, I expressed myself poorly.  What I am asking is not how to test
this on a "down" interface, but what are the right changes to make to
such an interface so that I can test the link beat.  I know that if I
bring the interface fully "up" it will work.  But that is overkill,
and in any case I don't yet know the right IP configuration.  All I
want to know is whether there is a link beat.

For example, is it sufficient to just set IFF_UP and leave the other
flags off?  Or do I have to be more careful?

Chris
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux