lkml.org 
[lkml]   [1999]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IFF_UP vs IFF_RUNNING


On Fri, 9 Jul 1999, Jan Kasprzak wrote:

> 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).


I have already fixed the syncppp driver (and dev.c to keep IFF_RUNNING
consistent) when integrating the comx drivers. You can download the full
patch from
ftp://ftp.itc.hu/pub/linux/v2.2/very_experimental

Greg



-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [from the cache]
©2003-2011 Jasper Spaans