Messages in this thread | | | Date | Fri, 9 Jul 1999 16:45:50 +0200 | From | Jan Kasprzak <> | Subject | IFF_UP vs IFF_RUNNING |
| |
Hello,
what is the difference between the IFF_UP and IFF_RUNNING? I have looked into the ifconfig's source, and the "ifconfig up" command sets both the IFF_UP and IFF_RUNNING flags, while the "ifconfig down" clears the IFF_UP only. This can mean that the IFF_UP is for "administrative status" of an interface (i.e. system administrator want the interface to be active), and the IFF_RUNNING is the "operative status" (in Cis*o terminology) - the line protocol (keepalive/linefill, linkbeat) on the interface is running.
Am I right with this guess? If so, then I think the drivers/net/syncppp.c uses these two flags in the opposite sense: The code around line 530 is the following:
if (! (dev->flags & IFF_UP) && (dev->flags & IFF_RUNNING)) { /* Coming out of loopback mode. */ dev->flags |= IFF_UP; printk (KERN_INFO "%s: up\n", dev->name);
I think device driver should never set the administrative status (IFF_UP) itself, but can set the operative status (IFF_RUNNING), if the line become OK (e.g. it gets correct LCP or keepalive packet).
-Yenya
-- \ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/ \\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E // \\\ Czech Linux Homepage: http://www.linux.cz/ /// The new code base has not stabilized enough yet for benchmarking. Be patient, we'll be sure to delay NT5's release a bit, trust me... (DaveM)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |