added three new flags for link layer control (LLC)
authorWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Thu, 17 Oct 1991 06:43:45 +0000 (22:43 -0800)
committerWilliam Nesheim <william@ucbvax.Berkeley.EDU>
Thu, 17 Oct 1991 06:43:45 +0000 (22:43 -0800)
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

index e4c64ee..f36b62b 100644 (file)
@@ -2,7 +2,33 @@
  * Copyright (c) 1983 Regents of the University of California.
  * All rights reserved.
  *
  * 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
  */
 
 #ifndef lint
@@ -12,7 +38,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #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 <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -91,6 +117,12 @@ struct      cmd {
        { "ipdst",      NEXTARG,        setifipdst },
        { "snpaoffset", NEXTARG,        setsnpaoffset },
        { "nsellength", NEXTARG,        setnsellength },
        { "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 },
 };
        { 0,            0,              setifaddr },
        { 0,            0,              setifdstaddr },
 };
@@ -135,12 +167,13 @@ main(argc, argv)
        register struct afswtch *rafp;
 
        if (argc < 2) {
        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[ 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++;
                exit(1);
        }
        argc--, argv++;
@@ -324,8 +357,8 @@ setsnpaoffset(val)
 }
 
 #define        IFFBITS \
 }
 
 #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
 
 /*
  * Print the status of the interface.  If an address family was