Subject: Re: Implementing interface media type autodetection?
To: Chris G Demetriou <>
From: John Hawkinson <>
List: tech-net
Date: 06/08/1996 20:17:50
In <199606082134.RAA27041@lola-granola.MIT.EDU> I initially suggested:

} 	 1. Have the driver do autodetection at boot time, and assume
} 	 that users who want to make use of autodetection won't explicitly
} 	 modify the link flags. This certainly seems nondeterministic...
} 	 4. Add an ioctl() to have the driver perform autodection,
} 	 set the current media type to the discovered type,
} 	 and set the link[012] flags as appropriate.

You wrote:

> (1) + (4) might be reasonable, but i don't particularly like them.


I remembered this peripherally but sort of hoped I could get away with
not mentioning it in the interest of expediency. Alas...

> I think that a better option would be similar to what Matt Thomas (i
> think it was him, anyway 8-) suggested, i.e. move the media type
> completely out of the 'link' flags.

Yes, this is clearly a better long-term plan.

> Consider SIOCSIFMEDIA and SIOCGIFMEDIA ioctls, which set and get the
> media type of the device.  You could then have media types like:

So how do we go about doing this transition?  As the person to open my
mouth about this, I'm certainly willing to do some work, but I'm
somewhat reluctant to go and send in change-requests for all the
drivers in the tree [perhaps an interim solution would be to have
SIOCSIFMEDIA know about the link flags for various interfaces that
don't understand it yet?]...