From 98f9cb4032156ff2c35599715634ca4fb096556b Mon Sep 17 00:00:00 2001 From: William Nesheim Date: Wed, 16 Oct 1991 22:43:45 -0800 Subject: [PATCH] added three new flags for link layer control (LLC) this can be used to enable slip compression and other LL options. SCCS-vsn: sbin/ifconfig/ifconfig.c 5.3 --- usr/src/sbin/ifconfig/ifconfig.c | 45 +++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/usr/src/sbin/ifconfig/ifconfig.c b/usr/src/sbin/ifconfig/ifconfig.c index e4c64ee095..f36b62bb10 100644 --- a/usr/src/sbin/ifconfig/ifconfig.c +++ b/usr/src/sbin/ifconfig/ifconfig.c @@ -2,7 +2,33 @@ * Copyright (c) 1983 Regents of the University of California. * All rights reserved. * - * %sccs.include.redist.c% + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #ifndef lint @@ -12,7 +38,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)ifconfig.c 5.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)ifconfig.c 5.1 (Berkeley) 2/28/91"; #endif /* not lint */ #include @@ -91,6 +117,12 @@ struct cmd { { "ipdst", NEXTARG, setifipdst }, { "snpaoffset", NEXTARG, setsnpaoffset }, { "nsellength", NEXTARG, setnsellength }, + { "llc0", IFF_LLC0, setifflags } , + { "-llc0", -IFF_LLC0, setifflags } , + { "llc1", IFF_LLC1, setifflags } , + { "-llc1", -IFF_LLC1, setifflags } , + { "llc2", IFF_LLC2, setifflags } , + { "-llc2", -IFF_LLC2, setifflags } , { 0, 0, setifaddr }, { 0, 0, setifdstaddr }, }; @@ -135,12 +167,13 @@ main(argc, argv) register struct afswtch *rafp; if (argc < 2) { - fprintf(stderr, "usage: ifconfig interface\n%s%s%s%s%s", + fprintf(stderr, "usage: ifconfig interface\n%s%s%s%s%s%s", "\t[ af [ address [ dest_addr ] ] [ up ] [ down ]", "[ netmask mask ] ]\n", "\t[ metric n ]\n", "\t[ trailers | -trailers ]\n", - "\t[ arp | -arp ]\n"); + "\t[ arp | -arp ]\n", + "\t[ llc0 | -llc0 ] [ llc1 | -llc1 ] [ llc2 | -llc2 ] \n"); exit(1); } argc--, argv++; @@ -324,8 +357,8 @@ setsnpaoffset(val) } #define IFFBITS \ -"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\ -\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX" +"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\ +\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LLC0\16LLC1\16LLC2" /* * Print the status of the interface. If an address family was -- 2.20.1