aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-08-15 02:17:34 +0000
committerH. Peter Anvin <hpa@zytor.com>2004-08-15 02:17:34 +0000
commit9919dee4d83f5773685eaafb9105ec40a3cf89f7 (patch)
tree320e9710967475b5a03650f51f03cbc01f95080f
parent6170431424815b44550de0738d4c35768a1fc9df (diff)
downloadklibc-9919dee4d83f5773685eaafb9105ec40a3cf89f7.tar.gz
Make the documentation match reality a bit better; add -g to theklibc-0.161
i386 CFLAGS (strip DTRT on i386.)
-rw-r--r--ipconfig/README56
-rw-r--r--ipconfig/main.c4
-rw-r--r--klibc/arch/i386/MCONFIG2
3 files changed, 47 insertions, 15 deletions
diff --git a/ipconfig/README b/ipconfig/README
index 55b265f29c59b..46c03fa665551 100644
--- a/ipconfig/README
+++ b/ipconfig/README
@@ -30,16 +30,48 @@ none no autoconfiguration - either static config, or none at all
An interface spec can be either short form, which is just the name of
an interface (eth0 or whatever), or long form. The long form consists
-of up to six elements, separated by colons:
-
-addr:server:gateway:netmask:interface:proto
-
-addr the local IP address
-server the server's IP address (doubles as DNS server)
-gateway default gateway
-netmask netmask
-interface name of the interface (empty string is synonym for "all")
-proto the autoconfig protocol to use, as outlined above
+of up to seven elements, separated by colons:
+
+<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
+
+ <client-ip> IP address of the client. If empty, the address will
+ either be determined by RARP/BOOTP/DHCP. What protocol
+ is used de- pends on the <autoconf> parameter. If this
+ parameter is not empty, autoconf will be used.
+
+ <server-ip> IP address of the NFS server. If RARP is used to
+ determine the client address and this parameter is NOT
+ empty only replies from the specified server are
+ accepted. To use different RARP and NFS server,
+ specify your RARP server here (or leave it blank), and
+ specify your NFS server in the `nfsroot' parameter
+ (see above). If this entry is blank the address of the
+ server is used which answered the RARP/BOOTP/DHCP
+ request.
+
+ <gw-ip> IP address of a gateway if the server is on a different
+ subnet. If this entry is empty no gateway is used and the
+ server is assumed to be on the local network, unless a
+ value has been received by BOOTP/DHCP.
+
+ <netmask> Netmask for local network interface. If this is empty,
+ the netmask is derived from the client IP address assuming
+ classful addressing, unless overridden in BOOTP/DHCP reply.
+
+ <hostname> Name of the client. If empty, the client IP address is
+ used in ASCII notation, or the value received by
+ BOOTP/DHCP.
+
+ <device> Name of network device to use. If this is empty, all
+ devices are used for RARP/BOOTP/DHCP requests, and the
+ first one we receive a reply on is configured. If you
+ have only one device, you can safely leave this blank.
+
+ <autoconf> Method to use for autoconfiguration. If this is either
+ 'rarp', 'bootp', or 'dhcp' the specified protocol is
+ used. If the value is 'both', 'all' or empty, all
+ protocols are used. 'off', 'static' or 'none' means
+ no autoconfiguration.
IP addresses and netmasks must be either absent (defaulting to zero)
or presented in dotted-quad notation.
@@ -52,13 +84,13 @@ from 2.4 and earlier kernels.
Here are a few examples of valid ipconfig command lines.
Enable the loopback interface:
- ipconfig 127.0.0.1::::lo:none
+ ipconfig 127.0.0.1:::::lo:none
Try to configure eth0 using bootp for up to 30 seconds:
ipconfig -t 30 -c bootp eth0
Configure eth0 and eth1 using dhcp or bootp, and eth2 statically:
- ipconfig -c any eth0 eth1 192.168.1.1::::eth2:none
+ ipconfig -c any eth0 eth1 192.168.1.1:::::eth2:none
--
diff --git a/ipconfig/main.c b/ipconfig/main.c
index 57fb874b4e1b3..f4f0a7f5ab4db 100644
--- a/ipconfig/main.c
+++ b/ipconfig/main.c
@@ -412,7 +412,7 @@ static unsigned int parse_proto(const char *ip)
{
unsigned int caps = 0;
- if (*ip == '\0' || strcmp(ip, "on") == 0 || strcmp(ip, "any") == 0)
+ if (*ip == '\0' || strcmp(ip, "on") == 0 || strcmp(ip, "any") == 0 || strcmp(ip, "both") == 0)
caps = CAP_BOOTP | CAP_DHCP | CAP_RARP;
else if (strcmp(ip, "dhcp") == 0)
caps = CAP_BOOTP | CAP_DHCP;
@@ -420,7 +420,7 @@ static unsigned int parse_proto(const char *ip)
caps = CAP_BOOTP;
else if (strcmp(ip, "rarp") == 0)
caps = CAP_RARP;
- else if (strcmp(ip, "none") == 0 || strcmp(ip, "static") == 0)
+ else if (strcmp(ip, "none") == 0 || strcmp(ip, "static") == 0 || strcmp(ip, "off") == 0)
goto bail;
else {
fprintf(stderr, "%s: invalid protocol '%s'\n",
diff --git a/klibc/arch/i386/MCONFIG b/klibc/arch/i386/MCONFIG
index ba1ae9ca00b52..2421452eea408 100644
--- a/klibc/arch/i386/MCONFIG
+++ b/klibc/arch/i386/MCONFIG
@@ -13,7 +13,7 @@ REGPARM_OPT := -mregparm=3 -DREGPARM=3
gcc_major := $(shell echo __GNUC__ | $(CC) -E -xc - | tail -n 1)
-OPTFLAGS = $(REGPARM) -march=i386 -Os
+OPTFLAGS = $(REGPARM) -march=i386 -Os -g
ifeq ($(gcc_major),3)
REGPARM := $(REGPARM_OPT)