summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-02-26 18:55:39 +0000
committerrwatson <rwatson@FreeBSD.org>2000-02-26 18:55:39 +0000
commitccbd17ca87bbd7b091dddbfe192e3b06aeab3189 (patch)
tree22d05e3dd418545908601adb554914de78874bb9 /sbin
parent1fe9db8a589e36c181fc4d2ad8aa026bc8ef6eec (diff)
downloadFreeBSD-src-ccbd17ca87bbd7b091dddbfe192e3b06aeab3189.zip
FreeBSD-src-ccbd17ca87bbd7b091dddbfe192e3b06aeab3189.tar.gz
Introduce ``add'' and ``remove'' as alternatives to ``alias'' and ``delete''.
Improve compatibility with BSD/OS, and also more accurately reflect that IP aliases aren't really any different than the primary IP address on an interface. Reviewed by: dcs Approved by: jkh
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.88
-rw-r--r--sbin/ifconfig/ifconfig.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index a100c96..022dc4f 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -130,11 +130,14 @@ for example,
The following parameters may be set with
.Nm ifconfig :
.Bl -tag -width indent
+.It Cm add
+Another name for the ``alias'' parameter. Introduced for compatibility
+with BSD/OS.
.It Cm alias
Establish an additional network address for this interface.
This is sometimes useful when changing network numbers, and
one wishes to accept packets addressed to the old interface.
-If the alias is on the same subnet as the first network adress
+If the address is on the same subnet as the first network adress
for this interface, a netmask of 0xffffffff has to be specified.
.It Cm anycast
(Inet6 only)
@@ -331,6 +334,9 @@ of the form startnet-endnet. Appletalk uses this scheme instead of
netmasks though
.Fx
implements it internally as a set of netmasks.
+.It Cm remove
+Another name for the ``delete'' parameter. Introduced for compatibility
+with BSD/OS.
.It Cm phase
The argument following this specifies the version (phase) of the
Appletalk network attached to the interface. Values of 1 or 2 are permitted.
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 8b567bf..aa22007 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -170,9 +170,11 @@ struct cmd {
{ "-arp", IFF_NOARP, setifflags },
{ "debug", IFF_DEBUG, setifflags },
{ "-debug", -IFF_DEBUG, setifflags },
+ { "add", IFF_UP, notealias },
{ "alias", IFF_UP, notealias },
{ "-alias", -IFF_UP, notealias },
{ "delete", -IFF_UP, notealias },
+ { "remove", -IFF_UP, notealias },
#ifdef notdef
#define EN_SWABIPS 0x1000
{ "swabips", EN_SWABIPS, setifflags },
OpenPOWER on IntegriCloud