On Tue, 11 Sep 2001, Andy Schweig wrote:
> Actually, it will be a Netgraph node. The idea is to use the character
> device interface for configuration.
> Each of these cards has a 6-byte MAC address programmed into it which
> can be used as a unique ID for the card.s
> We would like to be able to program the driver with an association
> between MAC address and card number (0, 1, 2, etc.). This card number
> would determine the name of the Netgraph node (e.g., "wan520c0").
Not quite sure I follow (4.x or -current by the way?)
I think you mean that you would just use the MAC address
as a fixed identifier, rather than a unit number (as is used by, say,
if_sr,c).
> It would seem that this configuration would have to happen before the
> creation of any Netgraph nodes, which means that some method other
> than Netgraph would need to be used to give the driver this mapping
> information (e.g., an ioctl using the character device interface).
>
I don't understand.. On detecting the hardware, the driver would
read the MAC and set up the name... What configuration do
you mean? And anyway, a name is optional in netgraph. teh node can be
addressed before it gets a name by using it's unique ID.
> Another strategy occurred to me while writing this mail, namely that a
> default association could be made between Netgraph node names and
> physical devices which could be changed by issuing a control message
> to the Netgraph node. Perhaps this is a better alternative. I would
> welcome any suggestions you might have for handling this situation.
> Thanks again for your help...
>
I think that is a better tack..
The default name that it sets up can be the MAC address, and you can
redefine it to be "Sydney1" or "London3" if you want.
(Actually you can't yet in 4.x because you can't REname a node, but I'm
going to remove that restriction, because it's silly.)
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message