tech-net archive

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

Re: ifconfig(8) - a tale of two states

> On Oct 7, 2020, at 8:35 AM, Mike Pumford <> wrote:
> On 07/10/2020 16:20, Greg Troxel wrote:
>> It may be that with 10base2, "UP" means "cable is terminated properly".
>> Or perhaps it's NA.
> 10base2 can't really do link up detection at all. There is no such concept as its a 2 wire connection so there is no separate link indication at all. Do cards of that type even support the media interface most of the time?
> Not sure about 10base5 connections.

Most of the time, such interfaces register the "manual" media type, i.e. it's not software-controllable, human has to fiddle with a thing.  Some interfaces had 10base5 and 10base2 connectors, and you just used whichever you had run to that desk / spot in the server room.  Sometimes you had to fiddle with a jumper on the interface.

Example from the LANCE driver, which supports boards that have software-selectable media and boards that don't:

        /* Initialize ifmedia structures. */
        sc->sc_ethercom.ec_ifmedia = &sc->sc_media;
        ifmedia_init(&sc->sc_media, 0, lance_mediachange, lance_mediastatus);
        if (sc->sc_supmedia != NULL) {
                for (i = 0; i < sc->sc_nsupmedia; i++)
                        ifmedia_add(&sc->sc_media, sc->sc_supmedia[i],
                           0, NULL);
                ifmedia_set(&sc->sc_media, sc->sc_defaultmedia);
        } else {
                ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_MANUAL, 0, NULL);
                ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_MANUAL);

-- thorpej

Home | Main Index | Thread Index | Old Index