IFF_RUNNING indicates that "resources are allocated for this device", i.e., everything's ready to go. IFF_UP provides an administrative control over the operational status of the device.
Chuck Youse Director of Systems cyo...@cybersites.com -----Original Message----- From: Brian Somers <br...@awfulhak.org> To: freebsd-hackers@FreeBSD.ORG <freebsd-hackers@FreeBSD.ORG> Date: Wednesday, May 26, 1999 7:47 AM Subject: Interface UP & RUNNING flags >Hi, > >Can someone tell me the difference between the IFF_UP and IFF_RUNNING >flags ? > >Currently, the tun pseudo-device never bothers removing the RUNNING >flag. This can easily be fixed with > >Index: if_tun.c >=================================================================== >RCS file: /home/ncvs/src/sys/net/if_tun.c,v >retrieving revision 1.55 >diff -u -r1.55 if_tun.c >--- if_tun.c 1999/05/06 18:12:54 1.55 >+++ if_tun.c 1999/05/26 12:30:55 >@@ -210,6 +210,13 @@ > } > splx(s); > } >+ >+ if (ifp->if_flags & IFF_RUNNING) { >+ s = splimp(); >+ ifp->if_flags &= ~IFF_RUNNING; >+ splx(s); >+ } >+ > funsetown(tp->tun_sigio); > selwakeup(&tp->tun_rsel); > > >But is this the right fix ? Should IFF_RUNNING be removed with the >last address - for *all* interfaces ? > >Cheers. >-- >Brian <br...@awfulhak.org> <br...@freebsd.org> > <http://www.Awfulhak.org> <br...@openbsd.org> >Don't _EVER_ lose your sense of humour ! <br...@uk.freebsd.org> > > > > >To Unsubscribe: send mail to majord...@freebsd.org >with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message