summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
87129df)
documentation for altphys, bnc/aui, llc[012]. Also changed ifconfig to use
inet_aton() rather than inet_addr() so that you can specify the IP address
255.255.255.255.
addresses and 10Mb/s Ethernet addresses.
.It Fl arp
Disable the use of the Address Resolution Protocol.
addresses and 10Mb/s Ethernet addresses.
.It Fl arp
Disable the use of the Address Resolution Protocol.
+.It Cm altphys
+Instruct the adapter to use a physical network connection other than
+the default, such as the AUI port rather than a built-in transceiver.
+(See
+.Cm aui ,
+which is another name for the same flag, below.)
+.It Fl altphys
+Disable the use of the alternate physical network connection.
+.It Cm aui
+On certain Ethernet drivers, configures the adapter to use the AUI
+port rather than the default built-in transceiver. (See also
+.Cm altphys ) .
+.It Cm bnc
+On certain Ethernet drivers, configures the adapter to use the
+built-in transceiver rather than the AUI port. (See also
+.Cm Fl altphys ) .
.It Cm broadcast
(Inet only)
Specify the address to use to represent broadcasts to the
.It Cm broadcast
(Inet only)
Specify the address to use to represent broadcasts to the
IP encapsulation of
.Tn CLNP
packets is done differently.
IP encapsulation of
.Tn CLNP
packets is done differently.
+.It Cm llc0
+Enable use of IEEE 802.2 LLC class 0. (Currently
+unimplemented.)
+.It Fl llc0
+Disable IEEE 802.2 LLC class 0. Not all interfaces may permit this,
+as most 802 networks have no alternative link layer other than 802.2.
+.It Cm llc1
+Enable use of IEEE 802.2 LLC class 1. (Currently unimplemented.)
+.It Fl llc1
+Disable use of IEEE 802.2 LLC class 1.
+.It Cm llc2
+Enable use of IEEE 802.2 LLC class 2. (Currently unimplemented.)
+.It Fl llc2
+Disable use of IEEE 802.2 LLC class 2.
.It Cm metric Ar n
Set the routing metric of the interface to
.Ar n ,
.It Cm metric Ar n
Set the routing metric of the interface to
.Ar n ,
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
- * -------------------- ----- ----------------------
- * CURRENT PATCH LEVEL: 1 00102
- * -------------------- ----- ----------------------
- *
- * 06 Sep 92 Herb Peyerl Added "aui"/"bnc" options to ifconfig
- * for 3COM 3C503 port selection
- * 10 Mar 93 Rodney W. Grimes Made the aui/bnc more general, you now
- * also have llc[0-2] and -llc[0-2].
- * Added the rest of the output flag bits.
#ifndef lint
static char sccsid[] = "@(#)ifconfig.c 5.1 (Berkeley) 2/28/91";
#ifndef lint
static char sccsid[] = "@(#)ifconfig.c 5.1 (Berkeley) 2/28/91";
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define NSIP
#include <netns/ns.h>
#include <netns/ns_if.h>
#define NSIP
#include <netns/ns.h>
#include <netns/ns_if.h>
#define EON
#include <netiso/iso.h>
#include <netiso/iso_var.h>
#define EON
#include <netiso/iso.h>
#include <netiso/iso_var.h>
#include <netdb.h>
#include <sys/protosw.h>
#include <netdb.h>
#include <sys/protosw.h>
{ "-arp", IFF_NOARP, setifflags },
{ "debug", IFF_DEBUG, setifflags },
{ "-debug", -IFF_DEBUG, setifflags },
{ "-arp", IFF_NOARP, setifflags },
{ "debug", IFF_DEBUG, setifflags },
{ "-debug", -IFF_DEBUG, setifflags },
+#ifdef IFF_ALTPHYS
+ { "aui", IFF_ALTPHYS, setifflags },
+ { "bnc", -IFF_ALTPHYS, setifflags },
+ { "altphys", IFF_ALTPHYS, setifflags },
+ { "-altphys", -IFF_ALTPHYS, setifflags },
+#else
{ "aui", IFF_LLC0, setifflags }, /* 06 Sep 92*/
{ "bnc", -IFF_LLC0, setifflags },
{ "aui", IFF_LLC0, setifflags }, /* 06 Sep 92*/
{ "bnc", -IFF_LLC0, setifflags },
+ { "altphys", IFF_LLC0, setifflags },
+ { "-altphys", -IFF_LLC0, setifflags },
+#endif
{ "llc0", IFF_LLC0, setifflags }, /* 10 Mar 93 */
{ "-llc0", -IFF_LLC0, setifflags },
{ "llc1", IFF_LLC1, setifflags },
{ "llc0", IFF_LLC0, setifflags }, /* 10 Mar 93 */
{ "-llc0", -IFF_LLC0, setifflags },
{ "llc1", IFF_LLC1, setifflags },
+/*
+ * This is ok if IFF_ALTPHYS is not defined, since we can be sure of never
+ * seeing in in that case anyway.
+ */
#define IFFBITS \
"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\
\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LLC0\16LLC1\17LLC2\
#define IFFBITS \
"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\
\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX\15LLC0\16LLC1\17LLC2\
+\20ALTPHYS\21MULTICAST\22VIRTUAL"
/*
* Print the status of the interface. If an address family was
/*
* Print the status of the interface. If an address family was
int force;
{
struct sockaddr_in *sin;
int force;
{
struct sockaddr_in *sin;
strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
if (ioctl(s, SIOCGIFADDR, (caddr_t)&ifr) < 0) {
strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
if (ioctl(s, SIOCGIFADDR, (caddr_t)&ifr) < 0) {
fprintf(stderr, "ifconfig: ");
switch (errno) {
fprintf(stderr, "ifconfig: ");
switch (errno) {
if (which != MASK)
sin->sin_family = AF_INET;
if (which != MASK)
sin->sin_family = AF_INET;
- if ((val = inet_addr(s)) != -1)
- sin->sin_addr.s_addr = val;
+ if (inet_aton(s, &sin->sin_addr))
+ ; /* do nothing, conversion successful */
else if (hp = gethostbyname(s))
bcopy(hp->h_addr, (char *)&sin->sin_addr, hp->h_length);
else if (np = getnetbyname(s))
else if (hp = gethostbyname(s))
bcopy(hp->h_addr, (char *)&sin->sin_addr, hp->h_length);
else if (np = getnetbyname(s))