summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-02-06 20:36:15 +0000
committerwollman <wollman@FreeBSD.org>1996-02-06 20:36:15 +0000
commit61d8d8e40b45efc45d9bbdf14fe96e565ceb074f (patch)
tree3775e2813ec951933b9585e48e3c57ba7dca08e2 /sbin/ifconfig
parentf0d10418a5a87de35e721ce8bbfd0e9353207adc (diff)
downloadFreeBSD-src-61d8d8e40b45efc45d9bbdf14fe96e565ceb074f.zip
FreeBSD-src-61d8d8e40b45efc45d9bbdf14fe96e565ceb074f.tar.gz
Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree. NB: because a function was deleted, libc is now at version 3.0 (was 2.2 previously).
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.8110
-rw-r--r--sbin/ifconfig/ifconfig.c25
2 files changed, 72 insertions, 63 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index a3d7672..e2e4ce2 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -29,9 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
+.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
+.\" $Id$
.\"
-.Dd January 5, 1994
+.Dd February 6, 1996
.Dt IFCONFIG 8
.Os BSD 4.2
.Sh NAME
@@ -93,12 +94,12 @@ are specified in hexadecimal.
The host number may be omitted on 10Mb/s Ethernet interfaces,
which use the hardware physical address,
and on interfaces other than the first.
-For the
-.Tn ISO
-family, addresses are specified as a long hexadecimal string,
-as in the Xerox family. However, two consecutive dots imply a zero
-byte, and the dots are optional, if the user wishes to (carefully)
-count out long strings of digits in network byte order.
+.\" For the
+.\" .Tn ISO
+.\" family, addresses are specified as a long hexadecimal string,
+.\" as in the Xerox family. However, two consecutive dots imply a zero
+.\" byte, and the dots are optional, if the user wishes to (carefully)
+.\" count out long strings of digits in network byte order.
.It Ar address_family
Specifies the
.Ar address family
@@ -108,7 +109,8 @@ with different naming schemes, specifying the address family is recommended.
The address or protocol families currently
supported are
.Dq inet ,
-.Dq iso ,
+.\" .Dq iso ,
+.Dq ipx ,
and
.Dq ns .
.It Ar Interface
@@ -189,7 +191,8 @@ interface.
Not all interfaces support setting the mtu, and some interfaces have
range restrictions.
.It Cm netmask Ar mask
-(Inet and ISO)
+.\" (Inet and ISO)
+(Inet only)
Specify how much of the address to reserve for subdividing
networks into sub-networks.
The mask includes the network part of the local address
@@ -206,54 +209,36 @@ and the subnet field should be contiguous with the network
portion.
.\" see
.\" Xr eon 5 .
-.It Cm nsellength Ar n
-.Pf ( Tn ISO
-only)
-This specifies a trailing number of bytes for a received
-.Tn NSAP
-used for local identification, the remaining leading part of which is
-taken to be the
-.Tn NET
-(Network Entity Title).
-The default value is 1, which is conformant to US
-.Tn GOSIP .
-When an ISO address is set in an ifconfig command,
-it is really the
-.Tn NSAP
-which is being specified.
-For example, in
-.Tn US GOSIP ,
-20 hex digits should be
-specified in the
-.Tn ISO NSAP
-to be assigned to the interface.
-There is some evidence that a number different from 1 may be useful
-for
-.Tn AFI
-37 type addresses.
-.It Cm trailers
-Request the use of a ``trailer'' link level encapsulation when
-sending (default).
-If a network interface supports
-.Cm trailers ,
-the system will, when possible, encapsulate outgoing
-messages in a manner which minimizes the number of
-memory to memory copy operations performed by the receiver.
-On networks that support the Address Resolution Protocol (see
-.Xr arp 4 ;
-currently, only 10 Mb/s Ethernet),
-this flag indicates that the system should request that other
-systems use trailers when sending to this host.
-Similarly, trailer encapsulations will be sent to other
-hosts that have made such requests.
-Currently used by Internet protocols only.
-.It Fl trailers
-Disable the use of a ``trailer'' link level encapsulation.
+.\" .It Cm nsellength Ar n
+.\" .Pf ( Tn ISO
+.\" only)
+.\" This specifies a trailing number of bytes for a received
+.\" .Tn NSAP
+.\" used for local identification, the remaining leading part of which is
+.\" taken to be the
+.\" .Tn NET
+.\" (Network Entity Title).
+.\" The default value is 1, which is conformant to US
+.\" .Tn GOSIP .
+.\" When an ISO address is set in an ifconfig command,
+.\" it is really the
+.\" .Tn NSAP
+.\" which is being specified.
+.\" For example, in
+.\" .Tn US GOSIP ,
+.\" 20 hex digits should be
+.\" specified in the
+.\" .Tn ISO NSAP
+.\" to be assigned to the interface.
+.\" There is some evidence that a number different from 1 may be useful
+.\" for
+.\" .Tn AFI
+.\" 37 type addresses.
.It Cm link[0-2]
Enable special processing of the link level of the interface.
These three options are interface specific in actual effect, however,
they are in general used to select special modes of operation. An example
-of this is to enable SLIP compression. Currently, only used by SLIP.
+of this is to enable SLIP compression.
.It Fl link[0-2]
Disable special processing at the link level with the specified interface.
.It Cm up
@@ -266,26 +251,29 @@ the hardware will be re-initialized.
.Pp
.Pp
.Nm Ifconfig
-.Ar -a
+.Fl a
displays information on all interfaces. When followed by a configuration
parameter, it will also set the configuration on all interfaces.
.Pp
.Nm Ifconfig
-.Ar -au
+.Fl au
is similar to
.Nm ifconfig
-.Ar -a ,
+.Fl a ,
except it only affects interfaces that are currently marked as up.
-Conversely,
+Similarly,
.Nm ifconfig
-.Ar -ad
+.Fl ad
affects only interfaces that are marked down.
.Pp
-.Nm Ifconfig
+The
+.Nm
+program
displays the current configuration for a network interface
when no optional parameters are supplied.
If a protocol family is specified,
-Ifconfig will report only the details specific to that protocol family.
+.Nm ifconfig
+will report only the details specific to that protocol family.
.Pp
Only the super-user may modify the configuration of a network interface.
.Sh DIAGNOSTICS
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 03c10ac..480a803 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -72,9 +72,11 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#include <netns/ns.h>
#include <netns/ns_if.h>
+#ifdef ISO
#define EON
#include <netiso/iso.h>
#include <netiso/iso_var.h>
+#endif
#include <sys/protosw.h>
#include <ctype.h>
@@ -90,8 +92,10 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
struct ifreq ifr, ridreq;
struct ifaliasreq addreq;
+#ifdef ISO
struct iso_ifreq iso_ridreq;
struct iso_aliasreq iso_addreq;
+#endif
struct sockaddr_in netmask;
char name[32];
@@ -110,7 +114,11 @@ extern int errno;
int setifflags(), setifaddr(), setifdstaddr(), setifnetmask();
int setifmetric(), setifmtu(), setifbroadaddr(), setifipdst();
-int notealias(), setsnpaoffset(), setnsellength(), notrailers();
+int notealias();
+#ifdef ISO
+int setsnpaoffset(), setnsellength();
+#endif
+int notrailers();
#define NEXTARG 0xffffff
@@ -139,8 +147,10 @@ struct cmd {
{ "metric", NEXTARG, setifmetric },
{ "broadcast", NEXTARG, setifbroadaddr },
{ "ipdst", NEXTARG, setifipdst },
+#ifdef ISO
{ "snpaoffset", NEXTARG, setsnpaoffset },
{ "nsellength", NEXTARG, setnsellength },
+#endif
{ "link0", IFF_LINK0, setifflags },
{ "-link0", -IFF_LINK0, setifflags },
{ "link1", IFF_LINK1, setifflags },
@@ -162,7 +172,9 @@ struct cmd {
int in_status(), in_getaddr();
int ipx_status(), ipx_getaddr();
int xns_status(), xns_getaddr();
+#ifdef ISO
int iso_status(), iso_getaddr();
+#endif
int ether_status();
/* Known address families */
@@ -183,8 +195,10 @@ struct afswtch {
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
{ "ns", AF_NS, xns_status, xns_getaddr,
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
+#ifdef ISO
{ "iso", AF_ISO, iso_status, iso_getaddr,
SIOCDIFADDR_ISO, SIOCAIFADDR_ISO, C(iso_ridreq), C(iso_addreq) },
+#endif
{ "ether", AF_INET, ether_status, NULL }, /* XXX not real!! */
{ 0, 0, 0, 0 }
};
@@ -408,8 +422,10 @@ ifconfig(argc,argv,af,rafp)
}
argc--, argv++;
}
+#ifdef ISO
if (af == AF_ISO)
adjust_nsellength();
+#endif
if (setipdst && af==AF_IPX) {
struct ipxip_req rq;
int size = sizeof(rq);
@@ -574,11 +590,13 @@ setifmtu(val)
perror("ioctl (set mtu)");
}
+#ifdef ISO
setsnpaoffset(val)
char *val;
{
iso_addreq.ifra_snpaoffset = atoi(val);
}
+#endif
#define IFFBITS \
"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\
@@ -764,6 +782,7 @@ xns_status(force)
putchar('\n');
}
+#ifdef ISO
iso_status(force)
int force;
{
@@ -803,7 +822,7 @@ iso_status(force)
putchar('\n');
}
-
+#endif
ether_status()
{
@@ -940,6 +959,7 @@ char *addr;
printf("Attempt to set XNS netmask will be ineffectual\n");
}
+#ifdef ISO
#define SISO(x) ((struct sockaddr_iso *) &(x))
struct sockaddr_iso *sisotab[] = {
SISO(iso_ridreq.ifr_Addr), SISO(iso_addreq.ifra_addr),
@@ -985,3 +1005,4 @@ adjust_nsellength()
fixnsel(sisotab[ADDR]);
fixnsel(sisotab[DSTADDR]);
}
+#endif
OpenPOWER on IntegriCloud