From owner-freebsd-stable@FreeBSD.ORG Mon Feb 12 19:54:43 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40A5B16A401; Mon, 12 Feb 2007 19:54:43 +0000 (UTC) (envelope-from joao@matik.com.br) Received: from msrv.matik.com.br (msrv.matik.com.br [200.152.83.14]) by mx1.freebsd.org (Postfix) with ESMTP id B0B3013C478; Mon, 12 Feb 2007 19:54:42 +0000 (UTC) (envelope-from joao@matik.com.br) Received: from anb (anb.matik.com.br [200.152.83.34]) by msrv.matik.com.br (8.13.8/8.13.1) with ESMTP id l1CJseoh061312; Mon, 12 Feb 2007 17:54:40 -0200 (BRST) (envelope-from joao@matik.com.br) From: JoaoBR Organization: Infomatik To: freebsd-stable@freebsd.org, kevin@insidesystems.net, brooks@freebsd.org Date: Mon, 12 Feb 2007 17:30:35 -0200 User-Agent: KMail/1.9.4 References: <200702121809.l1CI9rBq065457@lurza.secnetix.de> In-Reply-To: <200702121809.l1CI9rBq065457@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200702121730.36307.joao@matik.com.br> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on msrv.matik.com.br X-Virus-Status: Clean Cc: Subject: Re: Desired behaviour of "ifconfig -alias" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2007 19:54:43 -0000 On Monday 12 February 2007 16:09, Oliver Fromme wrote: > > > > it is not misleading and it is a perfect term. With alias you add > > secondary addresses to an interface. Like secondary is probably the > > better word, > > No, not at all. As soon as you use the terms "primary IP > address" and "secondary IP addresses", you imply that they > are not equal. But they are equal. It's just a list of > IP addresses assigned to an interface which happens to have > a certain order. > nobody claims that there is an master-slave order or something, alias is th= e=20 secondary in order of time, but not in value, I do not even understand why= =20 you talking so much about this, the point is more than clear=20 > > Yes, that's why I wrote it should be changed to not contain > the word "alias" anymore, but simply an enumerated list. > > > > If no IP address is specified, then it's not completely > > > nonsensical to remove the first address. In fact I've > > > used that short-cut to quickly remove the only address > > > from an interface. I've used "ifconfig xyz0 delete" > > > quite a lot. > > yes it is! it does not matter which word, without an IP address it should N= OT=20 remove anything > > the man page tells us that -alias removes *the* specified address and > > not the first, also the man page does not say that there is any further > > action when *no* IP address specified > > That's true. Usually if something is not documented, the > behaviour is undefined. > undefined is absolutely not similar to remove something .. > > delete is according to the man page another word for -alias, that mean= s, > > using grammatical logic that -alias is the main command, > > No. It means that "delete" and "remove" are aliases for > "-alias". In reality they're simply equal. ;-) > > > then according to the man > > page there is no other command as "-alias *IP*" to remove an IP address > > and -alias only should not remove anything > > It's not documented that way. As I wrote above. > > If something is not documented, that doesn't mean that it > shouldn't do anything at all. In that case a _lot_ of > things wouldn't work. :-) all commands which remove something "usally" say something when trying to u= se=20 without value, rm, rmdir, rmuser ... I really do not remember any other=20 then -alias which does so > > you see, now you apply logic because you want to and when not not ... = ;) > > > > to let it more clear what I mean, you say: "you don't tell it anything > > to add" so why the heck "ifconfig nic -alias" should remove one if I do > > not tell so? > > In the case of adding something, what should be added if > nothing is specified? Should the tool invent an arbitrary > IP address and add it? Now that would be nonsensical. > > But when removing something without specifying which one, > it makes some sense to simply remove the first existing > address on that interface. It would even be OK with me > to remove the last one, or an arbitrary one -- I use that > shortcut mostely when I need to remove the only address > from an interface (or all existing addresses), so it > doesn't matter. > come on, now your are looking up a way out of this mess ... > In fact, it might also make sense to enhance the syntax > to allow the specification of a number, for example > "ifconfig xyz0 delete #2" would remove the second address my god what a horrible idea is that! do you remember "#" in UNIX???? the command "ifconfig nic -alias IP" is OK, perfect, even delete is, the=20 problem and the only problem is that both remove without specifying a value= a=20 value and that *IS* wrong behaviour, otherwise *you* must agree that rm=20 removes the first file it finds, rmuser the first user and and and, that is= =20 wrong, documented or not > However, such a feature will run into problems when the > set of ip addresses is not an ordered list anymore, which > might very well happen in the future. Then there will be > no "first" and "last" anymore, but instead the interface > will just have an unordered set of IP addresses. In fact > I wish that would already be the case, so people saying > "primary" and "secondary" would shut up already. :-) then they come up in random order on each "ifconfig nic" :) ??? =2D-=20 Jo=E3o A mensagem foi scaneada pelo sistema de e-mail e pode ser considerada segura. Service fornecido pelo Datacenter Matik https://datacenter.matik.com.br