tech-net archive

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

Re: ifconfig (was: Specifying names for tap interfaces)



>> The only excuse for putting [interface-specific config] in ifconfig
>> I can see is to make it easy to put into /etc/ifconfig.* or
>> ifconfig_*.

> Why not take the same route as with fsck, i.e. have ifconfig call
> ifconfig_srt?

Good question.

The real answer, the answer that's actually true of the historical
cases I mentioned, is that I didn't think of it.

Thinking about it now, I find I don't like the idea.  Some of the
reasons that come to mind:

- fsck the wrapper does almost nothing but run fsck_xxx.  There is a
   good deal of ifconfig that applies to all interfaces, such as
   setting and printing network address configuration.

- There is no way to tell which ifconfig_xxx to run except by
   manipulating the interface name as a string, which feels to me like
   an ugly design botch.  (If-and-when interface names are mutable,
   even that won't work.)  So far interface names have had semantics
   only to humans, and I prefer to keep it that way.

- The device-specific configuration can be relatively complicated,
   beyond what I consider appropriate for an ifconfig command line.
   vlanconfig would be fairly straightforward to merge into ifconfig
   (and indeed that was, basically, done when NetBSD got its current
   flavour of vlans).  srtconfig much less so.

- There was an alternative - ifsetup_pre_xxN and ifsetup_post_xxN -
   which is substantially simpler and, I think, better design.  Indeed,
   having implemented them, I find myself using them for more than just
   device-specific configuration.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index