restructure; cleanup

SVN-Revision: 120
v19.07.3_mercusys_ac12_duma
Mike Baker 20 years ago
parent 7e2cd2eb94
commit 214d560052

@ -15,7 +15,7 @@ BUSYBOX_SOURCE:=busybox-1.00-pre8.tar.bz2
BUSYBOX_SITE:=http://www.busybox.net/downloads
endif
BUSYBOX_UNZIP=bzcat
BUSYBOX_CONFIG:=$(SOURCE_DIR)/busybox.config
BUSYBOX_CONFIG:=$(SOURCE_DIR)/openwrt/busybox/busybox.config
$(DL_DIR)/$(BUSYBOX_SOURCE):
$(WGET) -P $(DL_DIR) $(BUSYBOX_SITE)/$(BUSYBOX_SOURCE)
@ -25,7 +25,7 @@ busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
$(BUSYBOX_DIR)/.configured: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
$(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# Allow busybox patches.
$(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR) busybox-*.patch
$(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR)/openwrt/busybox/patches
cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config
$(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\
PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak

@ -93,15 +93,15 @@ $(OPENSSH_IPK_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
$(OPENSSH_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
rm -rf $(OPENSSH_IPK_DIR)/build
mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL
cp $(SOURCE_DIR)/openssh.server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openssh.server.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles
cp $(SOURCE_DIR)/openssh.server.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
cp $(SOURCE_DIR)/openssh.server.postinst $(OPENSSH_IPK_DIR)/build/CONTROL/postinst
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.postinst $(OPENSSH_IPK_DIR)/build/CONTROL/postinst
chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/postinst
mkdir -p $(OPENSSH_IPK_DIR)/build/etc/init.d
cp $(SOURCE_DIR)/openssh.server.sshd_config $(OPENSSH_IPK_DIR)/build/etc/sshd_config
cp $(SOURCE_DIR)/openssh.server.S50sshd-ipk $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.sshd_config $(OPENSSH_IPK_DIR)/build/etc/sshd_config
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.server.S50sshd-ipk $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd
chmod a+x $(OPENSSH_IPK_DIR)/build/etc/init.d/S50sshd
mkdir -p $(OPENSSH_IPK_DIR)/build/usr/sbin
cp $(OPENSSH_IPK_DIR)/usr/sbin/sshd $(OPENSSH_IPK_DIR)/build/usr/sbin
@ -113,12 +113,12 @@ $(OPENSSH_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
$(OPENSSH_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
rm -rf $(OPENSSH_IPK_DIR)/build
mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL
cp $(SOURCE_DIR)/openssh.client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openssh.client.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles
cp $(SOURCE_DIR)/openssh.client.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.conffiles $(OPENSSH_IPK_DIR)/build/CONTROL/conffiles
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.preinst $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
chmod a+x $(OPENSSH_IPK_DIR)/build/CONTROL/preinst
mkdir -p $(OPENSSH_IPK_DIR)/build/etc
cp $(SOURCE_DIR)/openssh.client.ssh_config $(OPENSSH_IPK_DIR)/build/etc/ssh_config
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.ssh_config $(OPENSSH_IPK_DIR)/build/etc/ssh_config
mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin
cp $(OPENSSH_IPK_DIR)/usr/bin/ssh $(OPENSSH_IPK_DIR)/build/usr/bin
cp $(OPENSSH_IPK_DIR)/usr/bin/scp $(OPENSSH_IPK_DIR)/build/usr/bin
@ -128,7 +128,7 @@ $(OPENSSH_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
$(OPENSSH_SFTP_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
rm -rf $(OPENSSH_IPK_DIR)/build
mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL
cp $(SOURCE_DIR)/openssh.sftp-server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.sftp-server.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
mkdir -p $(OPENSSH_IPK_DIR)/build/usr/sbin
cp $(OPENSSH_IPK_DIR)/usr/sbin/sftp-server $(OPENSSH_IPK_DIR)/build/usr/sbin
cd $(BUILD_DIR); $(STAGING_DIR)/bin/ipkg-build -c -o root -g root $(OPENSSH_IPK_DIR)/build
@ -137,7 +137,7 @@ $(OPENSSH_SFTP_SERVER_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
$(OPENSSH_SFTP_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
rm -rf $(OPENSSH_IPK_DIR)/build
mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL
cp $(SOURCE_DIR)/openssh.sftp-client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.sftp-client.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin
cp $(OPENSSH_IPK_DIR)/usr/bin/sftp $(OPENSSH_IPK_DIR)/build/usr/bin
cd $(BUILD_DIR); $(STAGING_DIR)/bin/ipkg-build -c -o root -g root $(OPENSSH_IPK_DIR)/build
@ -146,7 +146,7 @@ $(OPENSSH_SFTP_CLIENT_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
$(OPENSSH_CLIENT_EX_IPK): $(OPENSSH_IPK_DIR)/usr/bin/ssh
rm -rf $(OPENSSH_IPK_DIR)/build
mkdir -p $(OPENSSH_IPK_DIR)/build/CONTROL
cp $(SOURCE_DIR)/openssh.client.ex.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/openssh/openssh.client.ex.control $(OPENSSH_IPK_DIR)/build/CONTROL/control
mkdir -p $(OPENSSH_IPK_DIR)/build/usr/bin
cp $(OPENSSH_IPK_DIR)/usr/bin/ssh-add $(OPENSSH_IPK_DIR)/build/usr/bin
cp $(OPENSSH_IPK_DIR)/usr/bin/ssh-agent $(OPENSSH_IPK_DIR)/build/usr/bin

@ -70,7 +70,7 @@ openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
$(LIBSSL_IPK): uclibc $(STAGING_DIR)/usr/lib/libcrypto.a
mkdir -p $(OPENSSL_IPK_DIR)/CONTROL
cp $(SOURCE_DIR)/libssl.control $(OPENSSL_IPK_DIR)/CONTROL/control
cp $(SOURCE_DIR)/openwrt/openssl/control $(OPENSSL_IPK_DIR)/CONTROL/control
mkdir -p $(OPENSSL_IPK_DIR)/usr/lib
cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(OPENSSL_IPK_DIR)/usr/lib/
cp -fa $(STAGING_DIR)/lib/libssl.so* $(OPENSSL_IPK_DIR)/usr/lib/

@ -36,22 +36,10 @@ openwrt-base: $(OPENWRT_TARGETS)
ifneq ($(filter $(TARGETS),openwrt-base),)
# WRT54G_SOURCE=wrt54gv2.2.02.2.tgz
# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.2
# WRT54G_SOURCE=wrt54g.2.02.7.tgz
# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.7
# WRT54G_DIR=$(BUILD_DIR)/WRT54G
WRT54G_SOURCE=wrt54gs.2.07.1.tgz
WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gs/2.07.1
WRT54G_DIR=$(BUILD_DIR)/WRT54GS
# OPENWRT_ROOT=openwrt-root.tar.bz2
# OPENWRT_SITE=http://127.0.0.1
# OPENWRT_DIR=$(BUILD_DIR)/openwrt
LINUX_DIR=$(WRT54G_DIR)/release/src/linux/linux
LINUX_FORMAT=zImage
LINUX_BINLOC=arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz
@ -63,17 +51,14 @@ $(LINUX_DIR)/.unpacked: $(WRT54G_DIR)/.prepared
touch $(LINUX_DIR)/.unpacked
$(LINUX_DIR)/.patched: $(WRT54G_DIR)/.prepared
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-netfilter.patch
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-sch_htb.patch
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-linux.patch
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-nfsswap.patch
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR)/openwrt/kernel/patches
# use replacement diag module code
cp -f $(SOURCE_DIR)/openwrt-diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c
cp -f $(SOURCE_DIR)/openwrt-wrt54g-linux.config $(LINUX_DIR)/.config
cp -f $(SOURCE_DIR)/openwrt/kernel/diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c
cp -f $(SOURCE_DIR)/openwrt/kernel/linux.config $(LINUX_DIR)/.config
-(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux)
-(cd $(LINUX_DIR)/arch/mips/brcm-boards/bcm947xx/; \
rm -rf compressed; \
tar jxvf $(SOURCE_DIR)/compressed-20040531.tar.bz2; \
tar jxvf $(SOURCE_DIR)/openwrt/kernel/compressed-20040531.tar.bz2; \
)
touch $(LINUX_DIR)/.patched
@ -107,8 +92,7 @@ $(WRT54G_DIR)/.source: $(DL_DIR)/$(WRT54G_SOURCE)
touch $(WRT54G_DIR)/.source
$(WRT54G_DIR)/.prepared: $(WRT54G_DIR)/.source
$(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-router.patch
$(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-shared.patch
$(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR)/openwrt/patches
touch $(WRT54G_DIR)/.prepared
######################################################################
@ -236,8 +220,8 @@ openwrt-prune:
######################################################################
wrt-tools:
$(CC) -o $(WRT54G_DIR)/release/tools/trx $(SOURCE_DIR)/trx.c
$(CC) -o $(WRT54G_DIR)/release/tools/addpattern $(SOURCE_DIR)/addpattern.c
$(CC) -o $(WRT54G_DIR)/release/tools/trx $(SOURCE_DIR)/openwrt/tools/trx.c
$(CC) -o $(WRT54G_DIR)/release/tools/addpattern $(SOURCE_DIR)/openwrt/tools/addpattern.c
openwrt-linux.trx: openwrt-prune squashfsroot wrt-tools
$(WRT54G_DIR)/release/tools/trx -o openwrt-linux.trx \
@ -253,24 +237,4 @@ openwrt-g-code.bin: openwrt-gs-code.bin
openwrt-code.bin: openwrt-gs-code.bin openwrt-g-code.bin
######################################################################
openwrt-sourceball:
tar cjf buildroot-openwrt.tar.bz2 \
README.openwrt \
Makefile \
Makefile-openwrt \
make/openwrt.mk \
make/uclibc.mk \
make/busybox.mk \
sources/uClibc.config \
sources/uClibc.config-openwrt \
sources/busybox-openwrt-*.patch \
sources/busybox.config \
sources/busybox.config-openwrt \
sources/dnsmasq1-openwrt.patch \
sources/iptables-openwrt-extensions.patch \
sources/openwrt-wrt54g-linux.config \
sources/openwrt-wrt54g-*.patch \
sources/openwrt-diag.c
endif

@ -66,7 +66,7 @@ zlib: uclibc $(TARGET_DIR)/lib/libz.so.1.1.4
$(ZLIB_IPK): uclibc $(STAGING_DIR)/lib/libz.so.1.1.4
mkdir -p $(ZLIB_IPK_DIR)/CONTROL
cp $(SOURCE_DIR)/zlib.control $(ZLIB_IPK_DIR)/CONTROL/control
cp $(SOURCE_DIR)/openwrt/ipkg/zlib/control $(ZLIB_IPK_DIR)/CONTROL/control
mkdir -p $(ZLIB_IPK_DIR)/lib
cp -dpf $(STAGING_DIR)/lib/libz.so* $(ZLIB_IPK_DIR)/lib;
-$(STRIP) --strip-unneeded $(ZLIB_IPK_DIR)/lib/libz.so*

@ -1,129 +0,0 @@
diff -urN busybox-dist/networking/udhcp/dumpleases.c busybox/networking/udhcp/dumpleases.c
--- busybox-dist/networking/udhcp/dumpleases.c 2004-03-15 02:29:00.000000000 -0600
+++ busybox/networking/udhcp/dumpleases.c 2004-03-16 09:52:32.000000000 -0600
@@ -42,7 +42,7 @@
#endif
{
FILE *fp;
- int i, c, mode = REMAINING;
+ int i, c, mode = ABSOLUTE;
long expires;
const char *file = LEASES_FILE;
struct dhcpOfferedAddr lease;
@@ -73,7 +73,7 @@
fp = xfopen(file, "r");
- printf("Mac Address IP-Address Expires %s\n", mode == REMAINING ? "in" : "at");
+ printf("Mac Address IP-Address Hostname Expires %s\n", mode == REMAINING ? "in" : "at");
/* "00:00:00:00:00:00 255.255.255.255 Wed Jun 30 21:49:08 1993" */
while (fread(&lease, sizeof(lease), 1, fp)) {
@@ -84,7 +84,8 @@
addr.s_addr = lease.yiaddr;
printf(" %-15s", inet_ntoa(addr));
expires = ntohl(lease.expires);
- printf(" ");
+ //expires = lease.expires;
+ printf(" %-15s ",lease.hostname);
if (mode == REMAINING) {
if (!expires) printf("expired\n");
else {
diff -urN busybox-dist/networking/udhcp/files.c busybox/networking/udhcp/files.c
--- busybox-dist/networking/udhcp/files.c 2004-03-15 02:29:00.000000000 -0600
+++ busybox/networking/udhcp/files.c 2004-03-16 09:50:04.000000000 -0600
@@ -281,7 +281,7 @@
if (lease.yiaddr >= server_config.start && lease.yiaddr <= server_config.end) {
lease.expires = ntohl(lease.expires);
if (!server_config.remaining) lease.expires -= time(0);
- if (!(add_lease(lease.chaddr, lease.yiaddr, lease.expires))) {
+ if (!(add_lease(lease.hostname, lease.chaddr, lease.yiaddr, lease.expires))) {
LOG(LOG_WARNING, "Too many leases while loading %s\n", file);
break;
}
diff -urN busybox-dist/networking/udhcp/leases.c busybox/networking/udhcp/leases.c
--- busybox-dist/networking/udhcp/leases.c 2004-03-15 02:29:00.000000000 -0600
+++ busybox/networking/udhcp/leases.c 2004-03-16 09:50:04.000000000 -0600
@@ -35,7 +35,7 @@
/* add a lease into the table, clearing out any old ones */
-struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease)
+struct dhcpOfferedAddr *add_lease(uint8_t *hostname, uint8_t *chaddr, uint32_t yiaddr, unsigned long lease)
{
struct dhcpOfferedAddr *oldest;
@@ -45,6 +45,13 @@
oldest = oldest_expired_lease();
if (oldest) {
+ if (hostname) {
+ uint8_t length = *(hostname-1);
+ if (length>15) length=15;
+ memcpy(oldest->hostname,hostname,length);
+ oldest->hostname[length]=0;
+ }
+
memcpy(oldest->chaddr, chaddr, 16);
oldest->yiaddr = yiaddr;
oldest->expires = time(0) + lease;
@@ -112,7 +119,7 @@
temp.s_addr = addr;
LOG(LOG_INFO, "%s belongs to someone, reserving it for %ld seconds",
inet_ntoa(temp), server_config.conflict_time);
- add_lease(blank_chaddr, addr, server_config.conflict_time);
+ add_lease(blank_chaddr, blank_chaddr, addr, server_config.conflict_time);
return 1;
} else return 0;
}
diff -urN busybox-dist/networking/udhcp/leases.h busybox/networking/udhcp/leases.h
--- busybox-dist/networking/udhcp/leases.h 2004-01-30 17:45:12.000000000 -0600
+++ busybox/networking/udhcp/leases.h 2004-03-16 09:50:04.000000000 -0600
@@ -4,6 +4,7 @@
struct dhcpOfferedAddr {
+ uint8_t hostname[16];
uint8_t chaddr[16];
uint32_t yiaddr; /* network order */
uint32_t expires; /* host order */
@@ -12,7 +13,7 @@
extern uint8_t blank_chaddr[];
void clear_lease(uint8_t *chaddr, uint32_t yiaddr);
-struct dhcpOfferedAddr *add_lease(uint8_t *chaddr, uint32_t yiaddr, unsigned long lease);
+struct dhcpOfferedAddr *add_lease(uint8_t *hostname, uint8_t *chaddr, uint32_t yiaddr, unsigned long lease);
int lease_expired(struct dhcpOfferedAddr *lease);
struct dhcpOfferedAddr *oldest_expired_lease(void);
struct dhcpOfferedAddr *find_lease_by_chaddr(uint8_t *chaddr);
diff -urN busybox-dist/networking/udhcp/serverpacket.c busybox/networking/udhcp/serverpacket.c
--- busybox-dist/networking/udhcp/serverpacket.c 2004-03-15 02:29:01.000000000 -0600
+++ busybox/networking/udhcp/serverpacket.c 2004-03-16 09:51:36.000000000 -0600
@@ -29,6 +29,7 @@
#include "dhcpd.h"
#include "options.h"
#include "common.h"
+#include "files.h"
/* send a packet to giaddr using the kernel ip stack */
static int send_packet_to_relay(struct dhcpMessage *payload)
@@ -152,7 +153,7 @@
return -1;
}
- if (!add_lease(packet.chaddr, packet.yiaddr, server_config.offer_time)) {
+ if (!add_lease(get_option(oldpacket, DHCP_HOST_NAME), packet.chaddr, packet.yiaddr, server_config.offer_time)) {
LOG(LOG_WARNING, "lease pool is full -- OFFER abandoned");
return -1;
}
@@ -233,7 +234,9 @@
if (send_packet(&packet, 0) < 0)
return -1;
- add_lease(packet.chaddr, packet.yiaddr, lease_time_align);
+ add_lease(get_option(oldpacket, DHCP_HOST_NAME), packet.chaddr, packet.yiaddr, lease_time_align);
+
+ write_leases();
return 0;
}

File diff suppressed because it is too large Load Diff

@ -1,163 +0,0 @@
# When building a target filesystem, it is desirable to not have to
# become root and then run 'mknod' a thousand times. Using a device
# table you can create device nodes and directories "on the fly".
#
# This is a sample device table file for use with genext2fs. You can
# do all sorts of interesting things with a device table file. For
# example, if you want to adjust the permissions on a particular file
# you can just add an entry like:
# /sbin/foobar f 2755 0 0 - - - - -
# and (assuming the file /sbin/foobar exists) it will be made setuid
# root (regardless of what its permissions are on the host filesystem.
# Furthermore, you can use a single table entry to create a many device
# minors. For example, if I wanted to create /dev/hda and /dev/hda[0-15]
# I could just use the following two table entries:
# /dev/hda b 640 0 0 3 0 0 0 -
# /dev/hda b 640 0 0 3 1 1 1 15
#
# Device table entries take the form of:
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
# where name is the file name, type can be one of:
# f A regular file
# d Directory
# c Character special device file
# b Block special device file
# p Fifo (named pipe)
# uid is the user id for the target file, gid is the group id for the
# target file. The rest of the entries (major, minor, etc) apply only
# to device special files.
# Have fun
# -Erik Andersen <andersen@codepoet.org>
#
#<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
/dev d 755 0 0 - - - - -
/dev d 755 0 0 - - - - -
/dev/pts d 755 0 0 - - - - -
/tmp d 1777 0 0 - - - - -
/etc d 755 0 0 - - - - -
/home/default d 2755 1000 1000 - - - - -
/etc/network/if-up.d d 755 0 0 - - - - -
/etc/network/if-pre-up.d d 755 0 0 - - - - -
/etc/network/if-down.d d 755 0 0 - - - - -
/etc/network/if-post-down.d d 755 0 0 - - - - -
# Adjust permissions on some normal files
/etc/shadow f 600 0 0 - - - - -
/etc/passwd f 644 0 0 - - - - -
/bin/busybox f 4755 0 0 - - - - -
# uncomment this to allow starting x as non-root
#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - -
# Normal system devices
/dev/mem c 640 0 0 1 1 0 0 -
/dev/kmem c 640 0 0 1 2 0 0 -
/dev/null c 666 0 0 1 3 0 0 -
/dev/zero c 666 0 0 1 5 0 0 -
/dev/random c 666 0 0 1 8 0 0 -
/dev/urandom c 666 0 0 1 9 0 0 -
/dev/ram b 640 0 0 1 1 0 0 -
/dev/ram b 640 0 0 1 0 0 1 4
/dev/loop b 640 0 0 7 0 0 1 2
/dev/rtc c 640 0 0 10 135 - - -
/dev/console c 666 0 0 5 1 - - -
/dev/tty c 666 0 0 5 0 - - -
/dev/tty c 666 0 0 4 0 0 1 8
/dev/ttyp c 666 0 0 3 0 0 1 10
/dev/ptyp c 666 0 0 2 0 0 1 10
/dev/ptmx c 666 0 0 5 2 - - -
/dev/ttyP c 666 0 0 57 0 0 1 4
/dev/ttyS c 666 0 0 4 64 0 1 4
/dev/fb c 640 0 5 29 0 0 32 4
#/dev/ttySA c 666 0 0 204 5 0 1 3
/dev/psaux c 666 0 0 10 1 0 0 -
#/dev/ppp c 666 0 0 108 0 - - -
# MTD stuff
/dev/mtd c 640 0 0 90 0 0 2 4
/dev/mtdblock b 640 0 0 31 0 0 1 4
#Tun/tap driver
/dev/net d 755 0 0 - - - - -
/dev/net/tun c 660 0 0 10 200 - - -
# Audio stuff
#/dev/audio c 666 0 29 14 4 - - -
#/dev/audio1 c 666 0 29 14 20 - - -
#/dev/dsp c 666 0 29 14 3 - - -
#/dev/dsp1 c 666 0 29 14 19 - - -
#/dev/sndstat c 666 0 29 14 6 - - -
# User-mode Linux stuff
/dev/ubda b 640 0 0 98 0 0 0 -
/dev/ubda b 640 0 0 98 1 1 1 15
# IDE Devices
/dev/hda b 640 0 0 3 0 0 0 -
/dev/hda b 640 0 0 3 1 1 1 15
/dev/hdb b 640 0 0 3 64 0 0 -
/dev/hdb b 640 0 0 3 65 1 1 15
#/dev/hdc b 640 0 0 22 0 0 0 -
#/dev/hdc b 640 0 0 22 1 1 1 15
#/dev/hdd b 640 0 0 22 64 0 0 -
#/dev/hdd b 640 0 0 22 65 1 1 15
#/dev/hde b 640 0 0 33 0 0 0 -
#/dev/hde b 640 0 0 33 1 1 1 15
#/dev/hdf b 640 0 0 33 64 0 0 -
#/dev/hdf b 640 0 0 33 65 1 1 15
#/dev/hdg b 640 0 0 34 0 0 0 -
#/dev/hdg b 640 0 0 34 1 1 1 15
#/dev/hdh b 640 0 0 34 64 0 0 -
#/dev/hdh b 640 0 0 34 65 1 1 15
# SCSI Devices
#/dev/sda b 640 0 0 8 0 0 0 -
#/dev/sda b 640 0 0 8 1 1 1 15
#/dev/sdb b 640 0 0 8 16 0 0 -
#/dev/sdb b 640 0 0 8 17 1 1 15
#/dev/sdc b 640 0 0 8 32 0 0 -
#/dev/sdc b 640 0 0 8 33 1 1 15
#/dev/sdd b 640 0 0 8 48 0 0 -
#/dev/sdd b 640 0 0 8 49 1 1 15
#/dev/sde b 640 0 0 8 64 0 0 -
#/dev/sde b 640 0 0 8 65 1 1 15
#/dev/sdf b 640 0 0 8 80 0 0 -
#/dev/sdf b 640 0 0 8 81 1 1 15
#/dev/sdg b 640 0 0 8 96 0 0 -
#/dev/sdg b 640 0 0 8 97 1 1 15
#/dev/sdh b 640 0 0 8 112 0 0 -
#/dev/sdh b 640 0 0 8 113 1 1 15
#/dev/sg c 640 0 0 21 0 0 1 15
#/dev/scd b 640 0 0 11 0 0 1 15
#/dev/st c 640 0 0 9 0 0 1 8
#/dev/nst c 640 0 0 9 128 0 1 8
#/dev/st c 640 0 0 9 32 1 1 4
#/dev/st c 640 0 0 9 64 1 1 4
#/dev/st c 640 0 0 9 96 1 1 4
# Floppy disk devices
#/dev/fd b 640 0 0 2 0 0 1 2
#/dev/fd0d360 b 640 0 0 2 4 0 0 -
#/dev/fd1d360 b 640 0 0 2 5 0 0 -
#/dev/fd0h1200 b 640 0 0 2 8 0 0 -
#/dev/fd1h1200 b 640 0 0 2 9 0 0 -
#/dev/fd0u1440 b 640 0 0 2 28 0 0 -
#/dev/fd1u1440 b 640 0 0 2 29 0 0 -
#/dev/fd0u2880 b 640 0 0 2 32 0 0 -
#/dev/fd1u2880 b 640 0 0 2 33 0 0 -
# All the proprietary cdrom devices in the world
#/dev/aztcd b 640 0 0 29 0 0 0 -
#/dev/bpcd b 640 0 0 41 0 0 0 -
#/dev/capi20 c 640 0 0 68 0 0 1 2
#/dev/cdu31a b 640 0 0 15 0 0 0 -
#/dev/cdu535 b 640 0 0 24 0 0 0 -
#/dev/cm206cd b 640 0 0 32 0 0 0 -
#/dev/sjcd b 640 0 0 18 0 0 0 -
#/dev/sonycd b 640 0 0 15 0 0 0 -
#/dev/gscd b 640 0 0 16 0 0 0 -
#/dev/sbpcd b 640 0 0 25 0 0 0 -
#/dev/sbpcd b 640 0 0 25 0 0 1 4
#/dev/mcd b 640 0 0 23 0 0 0 -
#/dev/optcd b 640 0 0 17 0 0 0 -

@ -1,219 +0,0 @@
diff -x CVS -urN dnsmasq-1.18/dhcp.c dnsmasq.old/dhcp.c
--- dnsmasq-1.18/dhcp.c 2003-11-05 08:30:20.000000000 -0600
+++ dnsmasq.old/dhcp.c 2004-01-05 23:40:11.000000000 -0600
@@ -15,14 +15,20 @@
#include "dnsmasq.h"
-static int next_token (char *token, int buffsize, FILE * fp);
+struct dhcpOfferedAddr {
+ u_int8_t hostname[16];
+ u_int8_t chaddr[16];
+ u_int32_t yiaddr; /* network order */
+ u_int32_t expires; /* host order */
+};
void load_dhcp(char *file, char *suffix, time_t now, char *hostname)
{
- char token[MAXTOK], *dot;
+ char *dot;
struct all_addr host_address;
- time_t ttd, tts;
+ time_t ttd;
FILE *fp = fopen (file, "r");
+ struct dhcpOfferedAddr lease;
if (!fp)
{
@@ -34,154 +40,45 @@
/* remove all existing DHCP cache entries */
cache_unhash_dhcp();
-
- while ((next_token(token, MAXTOK, fp)))
- {
- if (strcmp(token, "lease") == 0)
- {
- hostname[0] = '\0';
- ttd = tts = (time_t)(-1);
-#ifdef HAVE_IPV6
- if (next_token(token, MAXTOK, fp) &&
- inet_pton(AF_INET, token, &host_address))
-#else
- if (next_token(token, MAXTOK, fp) &&
- (host_address.addr4.s_addr = inet_addr(token)) != (in_addr_t) -1)
-#endif
- {
- if (next_token(token, MAXTOK, fp) && *token == '{')
- {
- while (next_token(token, MAXTOK, fp) && *token != '}')
+
+ while (fread(&lease, sizeof(lease), 1, fp)) {
+ host_address.addr.addr4.s_addr = lease.yiaddr;
+
+ strcpy(hostname,lease.hostname);
+ if (lease.expires>(unsigned)now)
+ ttd = lease.expires;
+ else
+ ttd = -1;
+ dot = strchr(hostname, '.');
+ if (suffix)
{
- if ((strcmp(token, "client-hostname") == 0) ||
- (strcmp(token, "hostname") == 0))
- {
- if (next_token(hostname, MAXDNAME, fp))
- if (!canonicalise(hostname))
- {
- *hostname = 0;
- syslog(LOG_ERR, "bad name in %s", file);
- }
- }
- else if ((strcmp(token, "ends") == 0) ||
- (strcmp(token, "starts") == 0))
- {
- struct tm lease_time;
- int is_ends = (strcmp(token, "ends") == 0);
- if (next_token(token, MAXTOK, fp) && /* skip weekday */
- next_token(token, MAXTOK, fp) && /* Get date from lease file */
- sscanf (token, "%d/%d/%d",
- &lease_time.tm_year,
- &lease_time.tm_mon,
- &lease_time.tm_mday) == 3 &&
- next_token(token, MAXTOK, fp) &&
- sscanf (token, "%d:%d:%d:",
- &lease_time.tm_hour,
- &lease_time.tm_min,
- &lease_time.tm_sec) == 3)
- {
- /* There doesn't seem to be a universally available library function
- which converts broken-down _GMT_ time to seconds-in-epoch.
- The following was borrowed from ISC dhcpd sources, where
- it is noted that it might not be entirely accurate for odd seconds.
- Since we're trying to get the same answer as dhcpd, that's just
- fine here. */
- static int months [11] = { 31, 59, 90, 120, 151, 181,
- 212, 243, 273, 304, 334 };
- time_t time = ((((((365 * (lease_time.tm_year - 1970) + /* Days in years since '70 */
- (lease_time.tm_year - 1969) / 4 + /* Leap days since '70 */
- (lease_time.tm_mon > 1 /* Days in months this year */
- ? months [lease_time.tm_mon - 2]
- : 0) +
- (lease_time.tm_mon > 2 && /* Leap day this year */
- !((lease_time.tm_year - 1972) & 3)) +
- lease_time.tm_mday - 1) * 24) + /* Day of month */
- lease_time.tm_hour) * 60) +
- lease_time.tm_min) * 60) + lease_time.tm_sec;
- if (is_ends)
- ttd = time;
- else
- tts = time; }
+ if (dot)
+ { /* suffix and lease has ending: must match */
+ if (strcmp(dot+1, suffix) != 0)
+ syslog(LOG_WARNING,
+ "Ignoring DHCP lease for %s because it has an illegal domain part", hostname);
+ else
+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
}
- }
-
- /* missing info? */
- if (!*hostname)
- continue;
- if (ttd == (time_t)(-1))
- continue;
-
- /* infinite lease to is represented by -1 */
- /* This makes is to the lease file as
- start time one less than end time. */
- /* We use -1 as infinite in ttd */
- if ((tts != -1) && (ttd == tts - 1))
- ttd = (time_t)(-1);
- else if (ttd < now)
- continue;
-
- dot = strchr(hostname, '.');
- if (suffix)
- {
- if (dot)
- { /* suffix and lease has ending: must match */
- if (strcmp(dot+1, suffix) != 0)
- syslog(LOG_WARNING,
- "Ignoring DHCP lease for %s because it has an illegal domain part", hostname);
- else
- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
- }
- else
- { /* suffix exists but lease has no ending - add lease and lease.suffix */
- cache_add_dhcp_entry(hostname, &host_address, ttd, 0);
- strncat(hostname, ".", MAXDNAME);
- strncat(hostname, suffix, MAXDNAME);
- hostname[MAXDNAME-1] = 0; /* in case strncat hit limit */
- /* Make FQDN canonical for reverse lookups */
- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
- }
- }
- else
- { /* no suffix */
- if (dot) /* no lease ending allowed */
- syslog(LOG_WARNING,
- "Ignoring DHCP lease for %s because it has a domain part", hostname);
- else
- cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
- }
- }
- }
- }
- }
+ else
+ { /* suffix exists but lease has no ending - add lease and lease.suffix */
+ cache_add_dhcp_entry(hostname, &host_address, ttd, 0);
+ strncat(hostname, ".", MAXDNAME);
+ strncat(hostname, suffix, MAXDNAME);
+ hostname[MAXDNAME-1] = 0; /* in case strncat hit limit */
+ /* Make FQDN canonical for reverse lookups */
+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
+ }
+ }
+ else
+ { /* no suffix */
+ if (dot) /* no lease ending allowed */
+ syslog(LOG_WARNING,
+ "Ignoring DHCP lease for %s because it has a domain part", hostname);
+ else
+ cache_add_dhcp_entry(hostname, &host_address, ttd, F_REVERSE);
+ }
+ }
fclose(fp);
}
-
-static int next_token (char *token, int buffsize, FILE * fp)
-{
- int c, count = 0;
- char *cp = token;
-
- while((c = getc(fp)) != EOF)
- {
- if (c == '#')
- do { c = getc(fp); } while (c != '\n' && c != EOF);
-
- if (c == ' ' || c == '\t' || c == '\n' || c == ';')
- {
- if (count)
- break;
- }
- else if ((c != '"') && (count<buffsize-1))
- {
- *cp++ = c;
- count++;
- }
- }
-
- *cp = 0;
- return count ? 1 : 0;
-}
-
-
-

@ -1,877 +0,0 @@
#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
# CONFIG_SBUS is not set
CONFIG_UID16=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
#
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
CONFIG_MELAN=y
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=4
CONFIG_X86_USE_STRING_486=y
CONFIG_X86_ALIGNMENT_16=y
CONFIG_X86_F00F_WORKS_OK=y
# CONFIG_X86_MCE is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_HIGHMEM is not set
CONFIG_MATH_EMULATION=y
CONFIG_MTRR=y
# CONFIG_SMP is not set
# CONFIG_X86_UP_APIC is not set
# CONFIG_X86_UP_IOAPIC is not set
# CONFIG_X86_TSC_DISABLE is not set
#
# General setup
#
CONFIG_NET=y
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_ISA=y
CONFIG_PCI_NAMES=y
CONFIG_EISA=y
CONFIG_MCA=y
CONFIG_HOTPLUG=y
#
# PCMCIA/CardBus support
#
CONFIG_PCMCIA=m
CONFIG_CARDBUS=y
CONFIG_TCIC=y
CONFIG_I82092=y
CONFIG_I82365=y
#
# PCI Hotplug Support
#
CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_COMPAQ is not set
# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_OOM_KILLER is not set
CONFIG_PM=y
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
CONFIG_APM_RTC_IS_GMT=y
CONFIG_APM_ALLOW_INTS=y
CONFIG_APM_REAL_MODE_POWER_OFF=y
#
# ACPI Support
#
# CONFIG_ACPI is not set
#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_PS2 is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_STATS is not set
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not set
# CONFIG_MD_MULTIPATH is not set
# CONFIG_BLK_DEV_LVM is not set
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK_DEV=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
CONFIG_INET_ECN=y
# CONFIG_SYN_COOKIES is not set
#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
# CONFIG_IP_NF_AMANDA is not set
CONFIG_IP_NF_TFTP=y
CONFIG_IP_NF_IRC=y
CONFIG_IP_NF_QUEUE=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_PKTTYPE=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_RECENT=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_DSCP=y
CONFIG_IP_NF_MATCH_AH_ESP=y
CONFIG_IP_NF_MATCH_LENGTH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_TCPMSS=y
CONFIG_IP_NF_MATCH_HELPER=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_MATCH_CONNTRACK=y
CONFIG_IP_NF_MATCH_UNCLEAN=y
CONFIG_IP_NF_MATCH_OWNER=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_MIRROR=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_NAT_LOCAL=y
CONFIG_IP_NF_NAT_SNMP_BASIC=y
CONFIG_IP_NF_NAT_IRC=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_NAT_TFTP=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_DSCP=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_TCPMSS=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_SCTP_HMAC_NONE is not set
CONFIG_SCTP_HMAC_SHA1=y
# CONFIG_SCTP_HMAC_MD5 is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# Appletalk devices
#
# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
CONFIG_BRIDGE=y
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
#
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_CSZ=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_DSMARK=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_RSVP=y
CONFIG_NET_CLS_RSVP6=y
CONFIG_NET_CLS_POLICE=y
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
#
# Telephony Support
#
# CONFIG_PHONE is not set
# CONFIG_PHONE_IXJ is not set
# CONFIG_PHONE_IXJ_PCMCIA is not set
#
# ATA/IDE/MFM/RLL support
#
CONFIG_IDE=y
#
# IDE, ATA and ATAPI Block devices
#
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_IDEDISK_STROKE=y
CONFIG_BLK_DEV_IDECS=m
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set
#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_ISAPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_PCI_WIP=y
# CONFIG_BLK_DEV_ADMA100 is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_AMD74XX_OVERRIDE is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_HPT34X_AUTODMA is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_PDC202XX_BURST is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_ATARAID is not set
# CONFIG_BLK_DEV_ATARAID_PDC is not set
# CONFIG_BLK_DEV_ATARAID_HPT is not set
# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
# CONFIG_BLK_DEV_ATARAID_SII is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_BOOT is not set
# CONFIG_FUSION_ISENSE is not set
# CONFIG_FUSION_CTL is not set
# CONFIG_FUSION_LAN is not set
#
# IEEE 1394 (FireWire) support (EXPERIMENTAL)
#
# CONFIG_IEEE1394 is not set
#
# I2O device support
#
# CONFIG_I2O is not set
# CONFIG_I2O_PCI is not set
# CONFIG_I2O_BLOCK is not set
# CONFIG_I2O_LAN is not set
# CONFIG_I2O_SCSI is not set
# CONFIG_I2O_PROC is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y
# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_SUNLANCE is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNBMAC is not set
# CONFIG_SUNQE is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_SKMC is not set
# CONFIG_NE2_MCA is not set
# CONFIG_IBMLANA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_CS89x0 is not set
# CONFIG_TULIP is not set
# CONFIG_DE4X5 is not set
# CONFIG_DGRS is not set
# CONFIG_DM9102 is not set
# CONFIG_EEPRO100 is not set
# CONFIG_EEPRO100_PIO is not set
# CONFIG_E100 is not set
# CONFIG_LNE390 is not set
# CONFIG_FEALNX is not set
CONFIG_NATSEMI=y
# CONFIG_NE2K_PCI is not set
# CONFIG_FORCEDETH is not set
# CONFIG_NE3210 is not set
# CONFIG_ES3210 is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_SUNDANCE_MMIO is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_VIA_RHINE_MMIO is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_NET_POCKET is not set
#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_MYRI_SBUS is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_TIGON3 is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
CONFIG_NET_RADIO=y
# CONFIG_STRIP is not set
# CONFIG_WAVELAN is not set
# CONFIG_ARLAN is not set
# CONFIG_AIRONET4500 is not set
# CONFIG_AIRONET4500_NONCS is not set
# CONFIG_AIRONET4500_PROC is not set
# CONFIG_AIRO is not set
CONFIG_HERMES=m
CONFIG_HOSTAP=m
# CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set
# CONFIG_PCI_HERMES is not set
# CONFIG_HOSTAP_PLX is not set
# CONFIG_HOSTAP_PCI is not set
#
# Wireless Pcmcia cards support
#
CONFIG_PCMCIA_HERMES=m
CONFIG_HOSTAP_CS=m
# CONFIG_AIRO_CS is not set
# CONFIG_PCMCIA_ATMEL is not set
CONFIG_NET_WIRELESS=y
#
# Token Ring devices
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
# CONFIG_RCPCI is not set
# CONFIG_SHAPER is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# PCMCIA network device support
#
# CONFIG_NET_PCMCIA is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Input core support
#
# CONFIG_INPUT is not set
# CONFIG_INPUT_KEYBDEV is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_UINPUT is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_INPUT_GAMEPORT is not set
#
# Input core support is needed for gameports
#
#
# Input core support is needed for joysticks
#
# CONFIG_QIC02_TAPE is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_IPMI_PANIC_EVENT is not set
# CONFIG_IPMI_DEVICE_INTERFACE is not set
# CONFIG_IPMI_KCS is not set
# CONFIG_IPMI_WATCHDOG is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_SCx200 is not set
# CONFIG_SCx200_GPIO is not set
CONFIG_AMD_RNG=y
# CONFIG_INTEL_RNG is not set
CONFIG_HW_RANDOM=y
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
#
# Direct Rendering Manager (XFree86 DRI support)
#
# CONFIG_DRM is not set
#
# PCMCIA character devices
#
# CONFIG_PCMCIA_SERIAL_CS is not set
# CONFIG_SYNCLINK_CS is not set
# CONFIG_MWAVE is not set
# CONFIG_OBMOUSE is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_QFMT_V2 is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BEFS_DEBUG is not set
# CONFIG_BFS_FS is not set
CONFIG_EXT3_FS=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
CONFIG_TMPFS=y
CONFIG_RAMFS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_JFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_EXT2_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_XFS_FS is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_TRACE is not set
# CONFIG_XFS_DEBUG is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_NFS_FS is not set
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_DIRECTIO is not set
# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
# CONFIG_SUNRPC is not set
# CONFIG_LOCKD is not set
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
# CONFIG_ZISOFS_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_SMB_NLS is not set
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
# Console drivers
#
# CONFIG_VGA_CONSOLE is not set
# CONFIG_VIDEO_SELECT is not set
# CONFIG_MDA_CONSOLE is not set
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Support for USB gadgets
#
# CONFIG_USB_GADGET is not set
#
# Bluetooth support
#
# CONFIG_BLUEZ is not set
#
# Kernel hacking
#
# CONFIG_DEBUG_KERNEL is not set
CONFIG_LOG_BUF_SHIFT=0
#
# Cryptographic options
#
# CONFIG_CRYPTO is not set
#
# Library routines
#
CONFIG_OPTIMIZE_FOR_SIZE=y
CONFIG_CRC32=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
# CONFIG_FW_LOADER is not set

@ -0,0 +1,5 @@
#!/bin/sh
killall pppoecd
sleep 3
killall -9 pppoecd

@ -0,0 +1,10 @@
Package: zlib
Priority: optional
Version: 1.1.4-1
Architecture: mipsel
Maintainer: below0
Section: libs
Source: Embedded in the main OpenWrt buildroot
Description: zlib is a library implementing the 'deflate' compression system used by many programs.

@ -351,6 +351,7 @@ CONFIG_IP_NF_MATCH_CONNTRACK=m
CONFIG_IP_NF_MATCH_UNCLEAN=m
CONFIG_IP_NF_MATCH_STRING=m
# CONFIG_IP_NF_MATCH_OWNER is not set
CONFIG_IP_NF_MATCH_PHYSDEV=m
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_NETLINK=m
@ -432,6 +433,25 @@ CONFIG_VLAN_8021Q=y
# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
CONFIG_BRIDGE=y
CONFIG_BRIDGE_NF_EBTABLES=m
CONFIG_BRIDGE_EBT_T_FILTER=m
CONFIG_BRIDGE_EBT_T_NAT=m
CONFIG_BRIDGE_EBT_BROUTE=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_IPF=m
CONFIG_BRIDGE_EBT_ARPF=m
CONFIG_BRIDGE_EBT_AMONG=m
CONFIG_BRIDGE_EBT_LIMIT=m
CONFIG_BRIDGE_EBT_VLANF=m
CONFIG_BRIDGE_EBT_802_3=m
CONFIG_BRIDGE_EBT_PKTTYPE=m
CONFIG_BRIDGE_EBT_STP=m
CONFIG_BRIDGE_EBT_MARKF=m
CONFIG_BRIDGE_EBT_ARPREPLY=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_DNAT=m
CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_MARK_T=m
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set

@ -0,0 +1,316 @@
/*
* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* July 29, 2004
*
* This is a hacked replacement for the 'trx' utility used to create
* wrt54g .trx firmware files. It isn't pretty, but it does the job
* for me.
*
* As an extension, you can specify a larger maximum length for the
* .trx file using '-m'. It will be rounded up to be a multiple of 4K.
* NOTE: This space will be malloc()'d.
*
* TODO: Support '-b' option to specify offsets for each file.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
uint32_t crc32buf(char *buf, size_t len);
/**********************************************************************/
/* from trxhdr.h */
#define TRX_MAGIC 0x30524448 /* "HDR0" */
#define TRX_VERSION 1
#define TRX_MAX_LEN 0x3A0000
#define TRX_NO_HEADER 1 /* Do not write TRX header */
struct trx_header {
uint32_t magic; /* "HDR0" */
uint32_t len; /* Length of file including header */
uint32_t crc32; /* 32-bit CRC from flag_version to end of file */
uint32_t flag_version; /* 0:15 flags, 16:31 version */
uint32_t offsets[3]; /* Offsets of partitions from start of header */
};
/**********************************************************************/
void usage(void) __attribute__ (( __noreturn__ ));
void usage(void)
{
fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] file [file [file]]\n");
exit(EXIT_FAILURE);
}
int main(int argc, char **argv)
{
FILE *out = stdout;
FILE *in;
char *ofn = NULL;
char *buf;
char *e;
int c, i;
size_t n;
unsigned long maxlen = TRX_MAX_LEN;
struct trx_header *p;
fprintf(stderr, "mjn3's trx replacement - v0.80\n");
while ((c = getopt(argc, argv, "o:m:")) != -1) {
switch (c) {
case 'o':
ofn = optarg;
break;
case 'm':
errno = 0;
maxlen = strtoul(optarg, &e, 0);
if (errno || (e == optarg) || *e) {
fprintf(stderr, "illegal numeric string\n");
usage();
}
#undef ROUND
#define ROUND 0x1000
if (maxlen & (ROUND-1)) {
maxlen += (ROUND - (maxlen & (ROUND-1)));
}
if (maxlen < ROUND) {
fprintf(stderr, "maxlen too small (or wrapped)\n");
usage();
}
break;
default:
usage();
}
}
if (ofn && !(out = fopen(ofn, "w"))) {
fprintf(stderr, "can not open \"%s\" for writing\n", ofn);
usage();
}
if (optind == argc) {
fprintf(stderr, "we require at least one arg\n");
usage();
}
if (argc - optind > 3) {
fprintf(stderr, "too many args: %d > 3\n", argc - optind);
usage();
}
if (maxlen > TRX_MAX_LEN) {
fprintf(stderr, "WARNING: maxlen exceeds default maximum! Beware of overwriting nvram!\n");
}
if (!(buf = malloc(maxlen))) {
fprintf(stderr, "malloc failed\n");
return EXIT_FAILURE;
}
p = (struct trx_header *) buf;
p->magic = TRX_MAGIC;
p->len = sizeof(struct trx_header);
p->flag_version = (TRX_VERSION << 16);
i = 0;
while (optind < argc) {
p->offsets[i++] = p->len;
if (!(in = fopen(argv[optind], "r"))) {
fprintf(stderr, "can not open \"%s\" for reading\n", argv[optind]);
usage();
}
n = fread(buf + p->len, 1, maxlen - p->len, in);
if (!feof(in)) {
fprintf(stderr, "fread failure or file \"%s\" too large\n",
argv[optind]);
fclose(in);
return EXIT_FAILURE;
}
fclose(in);
++optind;
if (optind < argc) {
#undef ROUND
#define ROUND 4
if (n & (ROUND-1)) {
memset(buf + p->len + n, 0, ROUND - (n & (ROUND-1)));
n += ROUND - (n & (ROUND-1));
}
}
p->len += n;
}
#undef ROUND
#define ROUND 0x1000
n = p->len & (ROUND-1);
if (n) {
memset(buf + p->len, 0, ROUND - n);
p->len += ROUND - n;
}
p->crc32 = crc32buf((char *) &p->flag_version,
p->len - offsetof(struct trx_header, flag_version));
if (!fwrite(buf, p->len, 1, out) || fflush(out)) {
fprintf(stderr, "fwrite failed\n");
return EXIT_FAILURE;
}
fclose(out);
return EXIT_SUCCESS;
}
/**********************************************************************/
/* The following was grabbed and tweaked from the old snippets collection
* of public domain C code. */
/**********************************************************************\
|* Demonstration program to compute the 32-bit CRC used as the frame *|
|* check sequence in ADCCP (ANSI X3.66, also known as FIPS PUB 71 *|
|* and FED-STD-1003, the U.S. versions of CCITT's X.25 link-level *|
|* protocol). The 32-bit FCS was added via the Federal Register, *|
|* 1 June 1982, p.23798. I presume but don't know for certain that *|
|* this polynomial is or will be included in CCITT V.41, which *|
|* defines the 16-bit CRC (often called CRC-CCITT) polynomial. FIPS *|
|* PUB 78 says that the 32-bit FCS reduces otherwise undetected *|
|* errors by a factor of 10^-5 over 16-bit FCS. *|
\**********************************************************************/
/* Copyright (C) 1986 Gary S. Brown. You may use this program, or
code or tables extracted from it, as desired without restriction.*/
/* First, the polynomial itself and its table of feedback terms. The */
/* polynomial is */
/* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
/* Note that we take it "backwards" and put the highest-order term in */
/* the lowest-order bit. The X^32 term is "implied"; the LSB is the */
/* X^31 term, etc. The X^0 term (usually shown as "+1") results in */
/* the MSB being 1. */
/* Note that the usual hardware shift register implementation, which */
/* is what we're using (we're merely optimizing it by doing eight-bit */
/* chunks at a time) shifts bits into the lowest-order term. In our */
/* implementation, that means shifting towards the right. Why do we */
/* do it this way? Because the calculated CRC must be transmitted in */
/* order from highest-order term to lowest-order term. UARTs transmit */
/* characters in order from LSB to MSB. By storing the CRC this way, */
/* we hand it to the UART in the order low-byte to high-byte; the UART */
/* sends each low-bit to hight-bit; and the result is transmission bit */
/* by bit from highest- to lowest-order term without requiring any bit */
/* shuffling on our part. Reception works similarly. */
/* The feedback terms table consists of 256, 32-bit entries. Notes: */
/* */
/* 1. The table can be generated at runtime if desired; code to do so */
/* is shown later. It might not be obvious, but the feedback */
/* terms simply represent the results of eight shift/xor opera- */
/* tions for all combinations of data and CRC register values. */
/* */
/* 2. The CRC accumulation logic is the same for all CRC polynomials, */
/* be they sixteen or thirty-two bits wide. You simply choose the */
/* appropriate table. Alternatively, because the table can be */
/* generated at runtime, you can start by generating the table for */
/* the polynomial in question and use exactly the same "updcrc", */
/* if your application needn't simultaneously handle two CRC */
/* polynomials. (Note, however, that XMODEM is strange.) */
/* */
/* 3. For 16-bit CRCs, the table entries need be only 16 bits wide; */
/* of course, 32-bit entries work OK if the high 16 bits are zero. */
/* */
/* 4. The values must be right-shifted by eight bits by the "updcrc" */
/* logic; the shift must be unsigned (bring in zeroes). On some */
/* hardware you could probably optimize the shift in assembler by */
/* using byte-swap instructions. */
static const uint32_t crc_32_tab[] = { /* CRC polynomial 0xedb88320 */
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
#define UPDC32(octet,crc) (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8))
uint32_t crc32buf(char *buf, size_t len)
{
uint32_t crc;
crc = 0xFFFFFFFF;
for ( ; len; --len, ++buf)
{
crc = UPDC32(*buf, crc);
}
return crc;
}

@ -1,8 +0,0 @@
# /etc/fstab: static file system information.
#
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /tmp tmpfs defaults 0 0

@ -1,10 +0,0 @@
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
utmp:x:43:
staff:x:50:
default:x:1000:

@ -1,44 +0,0 @@
#! /bin/sh
#
# urandom This script saves the random seed between reboots.
# It is called from the boot, halt and reboot scripts.
#
# Version: @(#)urandom 1.33 22-Jun-1998 miquels@cistron.nl
#
[ -c /dev/urandom ] || exit 0
#. /etc/default/rcS
case "$1" in
start|"")
if [ "$VERBOSE" != no ]
then
echo -n "Initializing random number generator... "
fi
# Load and then save 512 bytes,
# which is the size of the entropy pool
if [ -f /etc/random-seed ]
then
cat /etc/random-seed >/dev/urandom
fi
rm -f /etc/random-seed
umask 077
dd if=/dev/urandom of=/etc/random-seed count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
[ "$VERBOSE" != no ] && echo "done."
;;
stop)
# Carry a random seed from shut-down to start-up;
# see documentation in linux/drivers/char/random.c
[ "$VERBOSE" != no ] && echo -n "Saving random seed... "
umask 077
dd if=/dev/urandom of=/etc/random-seed count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
[ "$VERBOSE" != no ] && echo "done."
;;
*)
echo "Usage: urandom {start|stop}" >&2
exit 1
;;
esac

@ -1,35 +0,0 @@
#!/bin/sh
#
# Start the network....
#
start() {
echo "Starting network..."
/sbin/ifup -a
}
stop() {
echo -n "Stopping network..."
/sbin/ifdown -a
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?

@ -1,27 +0,0 @@
#!/bin/sh
# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done

@ -1,47 +0,0 @@
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Set up a couple of getty's
tty1::respawn:/sbin/getty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
# Logging junk
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
tty3::respawn:/usr/bin/tail -f /var/log/messages
# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a

@ -1,44 +0,0 @@
# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info readline' for more information.
# Be 8 bit clean.
set input-meta on
set output-meta on
set bell-style visible
# To allow the use of 8bit-characters like the german umlauts, comment out
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.
# set convert-meta off
"\e0d": backward-word
"\e0c": forward-word
"\e[h": beginning-of-line
"\e[f": end-of-line
"\e[1~": beginning-of-line
"\e[4~": end-of-line
#"\e[5~": beginning-of-history
#"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# Common standard keypad and cursor
# (codes courtsey Werner Fink, <werner@suse.de>)
#"\e[1~": history-search-backward
"\e[2~": yank
"\e[3~": delete-char
#"\e[4~": set-mark
"\e[5~": history-search-backward
"\e[6~": history-search-forward
# Normal keypad and cursor of xterm
"\e[F": end-of-line
"\e[H": beginning-of-line
# Application keypad and cursor of xterm
"\eOA": previous-history
"\eOC": forward-char
"\eOB": next-history
"\eOD": backward-char
"\eOF": end-of-line
"\eOH": beginning-of-line

@ -1,4 +0,0 @@
Welcome to the Erik's uClibc development environment.

@ -1,4 +0,0 @@
# Configure Loopback
auto lo
iface lo inet loopback

@ -1,13 +0,0 @@
root:x:0:0:root:/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:100:sync:/bin:/bin/sync
mail:x:8:8:mail:/var/spool/mail:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
operator:x:37:37:Operator:/var:/bin/sh
sshd:x:103:99:Operator:/var:/bin/sh
nobody:x:99:99:nobody:/home:/bin/sh
default:x:1000:1000:Default non-root user:/home/default:/bin/sh

@ -1,48 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login interactive shells.
export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
/usr/local/bin
# If running interactively, then:
if [ "$PS1" ]; then
if [ "$BASH" ]; then
export PS1="[\u@\h \W]\\$ "
alias ll='/bin/ls --color=tty -laFh'
alias ls='/bin/ls --color=tty -F'
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
else
if [ "`id -u`" -eq 0 ]; then
export PS1='# '
else
export PS1='$ '
fi
fi
export USER=`id -un`
export LOGNAME=$USER
export HOSTNAME=`/bin/hostname`
export HISTSIZE=1000
export HISTFILESIZE=1000
export PAGER='/bin/more '
export EDITOR='/bin/vi'
export INPUTRC=/etc/inputrc
export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
### Some aliases
alias ps2='ps facux '
alias ps1='ps faxo "%U %t %p %a" '
alias af='ps af'
alias cls='clear'
alias df='df -h'
alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
#alias bc='bc -l'
alias minicom='minicom -c on'
alias calc='calc -Cd '
alias bc='calc -Cd '
fi;

@ -1,31 +0,0 @@
# /etc/protocols:
# $Id$
#
# Internet (IP) protocols
#
# from: @(#)protocols 5.1 (Berkeley) 4/17/89
#
# Updated for NetBSD based on RFC 1340, Assigned Numbers (July 1992).
ip 0 IP # internet protocol, pseudo protocol number
icmp 1 ICMP # internet control message protocol
igmp 2 IGMP # Internet Group Management
ggp 3 GGP # gateway-gateway protocol
ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
st 5 ST # ST datagram mode
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
iso-tp4 29 ISO-TP4 # ISO Transport Protocol class 4
xtp 36 XTP # Xpress Tranfer Protocol
ddp 37 DDP # Datagram Delivery Protocol
idpr-cmtp 39 IDPR-CMTP # IDPR Control Message Transport
rspf 73 RSPF #Radio Shortest Path First.
vmtp 81 VMTP # Versatile Message Transport
ospf 89 OSPFIGP # Open Shortest Path First IGP
ipip 94 IPIP # Yet Another IP encapsulation
encap 98 ENCAP # Yet Another IP encapsulation

@ -1,2 +0,0 @@
domain dev.null
nameserver 127.0.0.1

@ -1,12 +0,0 @@
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
ttyS0
ttyS1
ttyS2
ttyS3

@ -1,302 +0,0 @@
# /etc/services:
# $Id$
#
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports
# are included, only the more common ones.
tcpmux 1/tcp # TCP port service multiplexer
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
daytime 13/tcp
daytime 13/udp
netstat 15/tcp
qotd 17/tcp quote
msp 18/tcp # message send protocol
msp 18/udp # message send protocol
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
ftp-data 20/tcp
ftp 21/tcp
fsp 21/udp fspd
ssh 22/tcp # SSH Remote Login Protocol
ssh 22/udp # SSH Remote Login Protocol
telnet 23/tcp
# 24 - private
smtp 25/tcp mail
# 26 - unassigned
time 37/tcp timserver
time 37/udp timserver
rlp 39/udp resource # resource location
nameserver 42/tcp name # IEN 116
whois 43/tcp nicname
re-mail-ck 50/tcp # Remote Mail Checking Protocol
re-mail-ck 50/udp # Remote Mail Checking Protocol
domain 53/tcp nameserver # name-domain server
domain 53/udp nameserver
mtp 57/tcp # deprecated
bootps 67/tcp # BOOTP server
bootps 67/udp
bootpc 68/tcp # BOOTP client
bootpc 68/udp
tftp 69/udp
gopher 70/tcp # Internet Gopher
gopher 70/udp
rje 77/tcp netrjs
finger 79/tcp
www 80/tcp http # WorldWideWeb HTTP
www 80/udp # HyperText Transfer Protocol
link 87/tcp ttylink
kerberos 88/tcp kerberos5 krb5 # Kerberos v5
kerberos 88/udp kerberos5 krb5 # Kerberos v5
supdup 95/tcp
# 100 - reserved
hostnames 101/tcp hostname # usually from sri-nic
iso-tsap 102/tcp tsap # part of ISODE.
csnet-ns 105/tcp cso-ns # also used by CSO name server
csnet-ns 105/udp cso-ns
# unfortunately the poppassd (Eudora) uses a port which has already
# been assigned to a different service. We list the poppassd as an
# alias here. This should work for programs asking for this service.
# (due to a bug in inetd the 3com-tsmux line is disabled)
#3com-tsmux 106/tcp poppassd
#3com-tsmux 106/udp poppassd
rtelnet 107/tcp # Remote Telnet
rtelnet 107/udp
pop-2 109/tcp postoffice # POP version 2
pop-2 109/udp
pop-3 110/tcp # POP version 3
pop-3 110/udp
sunrpc 111/tcp portmapper # RPC 4.0 portmapper TCP
sunrpc 111/udp portmapper # RPC 4.0 portmapper UDP
auth 113/tcp authentication tap ident
sftp 115/tcp
uucp-path 117/tcp
nntp 119/tcp readnews untp # USENET News Transfer Protocol
ntp 123/tcp
ntp 123/udp # Network Time Protocol
netbios-ns 137/tcp # NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp # NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp # NETBIOS session service
netbios-ssn 139/udp
imap2 143/tcp # Interim Mail Access Proto v2
imap2 143/udp
snmp 161/udp # Simple Net Mgmt Proto
snmp-trap 162/udp snmptrap # Traps for SNMP
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
cmip-man 163/udp
cmip-agent 164/tcp
cmip-agent 164/udp
xdmcp 177/tcp # X Display Mgr. Control Proto
xdmcp 177/udp
nextstep 178/tcp NeXTStep NextStep # NeXTStep window
nextstep 178/udp NeXTStep NextStep # server
bgp 179/tcp # Border Gateway Proto.
bgp 179/udp
prospero 191/tcp # Cliff Neuman's Prospero
prospero 191/udp
irc 194/tcp # Internet Relay Chat
irc 194/udp
smux 199/tcp # SNMP Unix Multiplexer
smux 199/udp
at-rtmp 201/tcp # AppleTalk routing
at-rtmp 201/udp
at-nbp 202/tcp # AppleTalk name binding
at-nbp 202/udp
at-echo 204/tcp # AppleTalk echo
at-echo 204/udp
at-zis 206/tcp # AppleTalk zone information
at-zis 206/udp
qmtp 209/tcp # The Quick Mail Transfer Protocol
qmtp 209/udp # The Quick Mail Transfer Protocol
z3950 210/tcp wais # NISO Z39.50 database
z3950 210/udp wais
ipx 213/tcp # IPX
ipx 213/udp
imap3 220/tcp # Interactive Mail Access
imap3 220/udp # Protocol v3
ulistserv 372/tcp # UNIX Listserv
ulistserv 372/udp
https 443/tcp # MCom
https 443/udp # MCom
snpp 444/tcp # Simple Network Paging Protocol
snpp 444/udp # Simple Network Paging Protocol
saft 487/tcp # Simple Asynchronous File Transfer
saft 487/udp # Simple Asynchronous File Transfer
npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS
npmp-local 610/udp dqs313_qmaster # npmp-local / DQS
npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS
npmp-gui 611/udp dqs313_execd # npmp-gui / DQS
hmmp-ind 612/tcp dqs313_intercell# HMMP Indication / DQS
hmmp-ind 612/udp dqs313_intercell# HMMP Indication / DQS
#
# UNIX specific services
#
exec 512/tcp
biff 512/udp comsat
login 513/tcp
who 513/udp whod
shell 514/tcp cmd # no passwords used
syslog 514/udp
printer 515/tcp spooler # line printer spooler
talk 517/udp
ntalk 518/udp
route 520/udp router routed # RIP
timed 525/udp timeserver
tempo 526/tcp newdate
courier 530/tcp rpc
conference 531/tcp chat
netnews 532/tcp readnews
netwall 533/udp # -for emergency broadcasts
uucp 540/tcp uucpd # uucp daemon
afpovertcp 548/tcp # AFP over TCP
afpovertcp 548/udp # AFP over TCP
remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem
klogin 543/tcp # Kerberized `rlogin' (v5)
kshell 544/tcp krcmd # Kerberized `rsh' (v5)
kerberos-adm 749/tcp # Kerberos `kadmin' (v5)
#
webster 765/tcp # Network dictionary
webster 765/udp
#
# From ``Assigned Numbers'':
#
#> The Registered Ports are not controlled by the IANA and on most systems
#> can be used by ordinary user processes or programs executed by ordinary
#> users.
#
#> Ports are used in the TCP [45,106] to name the ends of logical
#> connections which carry long term conversations. For the purpose of
#> providing services to unknown callers, a service contact port is
#> defined. This list specifies the port used by the server process as its
#> contact port. While the IANA can not control uses of these ports it
#> does register or list uses of these ports as a convienence to the
#> community.
#
nfsdstatus 1110/tcp
nfsd-keepalive 1110/udp
ingreslock 1524/tcp
ingreslock 1524/udp
prospero-np 1525/tcp # Prospero non-privileged
prospero-np 1525/udp
datametrics 1645/tcp old-radius # datametrics / old radius entry
datametrics 1645/udp old-radius # datametrics / old radius entry
sa-msg-port 1646/tcp old-radacct # sa-msg-port / old radacct entry
sa-msg-port 1646/udp old-radacct # sa-msg-port / old radacct entry
radius 1812/tcp # Radius
radius 1812/udp # Radius
radacct 1813/tcp # Radius Accounting
radacct 1813/udp # Radius Accounting
nfsd 2049/tcp nfs
nfsd 2049/udp nfs
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
mysql 3306/tcp # MySQL
mysql 3306/udp # MySQL
rfe 5002/tcp # Radio Free Ethernet
rfe 5002/udp # Actually uses UDP only
cfengine 5308/tcp # CFengine
cfengine 5308/udp # CFengine
bbs 7000/tcp # BBS service
#
#
# Kerberos (Project Athena/MIT) services
# Note that these are for Kerberos v4, and are unofficial. Sites running
# v4 should uncomment these and comment out the v5 entries above.
#
kerberos4 750/udp kerberos-iv kdc # Kerberos (server) udp
kerberos4 750/tcp kerberos-iv kdc # Kerberos (server) tcp
kerberos_master 751/udp # Kerberos authentication
kerberos_master 751/tcp # Kerberos authentication
passwd_server 752/udp # Kerberos passwd server
krb_prop 754/tcp # Kerberos slave propagation
krbupdate 760/tcp kreg # Kerberos registration
kpasswd 761/tcp kpwd # Kerberos "passwd"
kpop 1109/tcp # Pop with Kerberos
knetd 2053/tcp # Kerberos de-multiplexor
zephyr-srv 2102/udp # Zephyr server
zephyr-clt 2103/udp # Zephyr serv-hm connection
zephyr-hm 2104/udp # Zephyr hostmanager
eklogin 2105/tcp # Kerberos encrypted rlogin
#
# Unofficial but necessary (for NetBSD) services
#
supfilesrv 871/tcp # SUP server
supfiledbg 1127/tcp # SUP debugging
#
# Datagram Delivery Protocol services
#
rtmp 1/ddp # Routing Table Maintenance Protocol
nbp 2/ddp # Name Binding Protocol
echo 4/ddp # AppleTalk Echo Protocol
zip 6/ddp # Zone Information Protocol
#
# Services added for the Debian GNU/Linux distribution
poppassd 106/tcp # Eudora
poppassd 106/udp # Eudora
mailq 174/tcp # Mailer transport queue for Zmailer
mailq 174/tcp # Mailer transport queue for Zmailer
omirr 808/tcp omirrd # online mirror
omirr 808/udp omirrd # online mirror
rmtcfg 1236/tcp # Gracilis Packeten remote config server
xtel 1313/tcp # french minitel
coda_opcons 1355/udp # Coda opcons (Coda fs)
coda_venus 1363/udp # Coda venus (Coda fs)
coda_auth 1357/udp # Coda auth (Coda fs)
coda_udpsrv 1359/udp # Coda udpsrv (Coda fs)
coda_filesrv 1361/udp # Coda filesrv (Coda fs)
codacon 1423/tcp venus.cmu # Coda Console (Coda fs)
coda_aux1 1431/tcp # coda auxiliary service (Coda fs)
coda_aux1 1431/udp # coda auxiliary service (Coda fs)
coda_aux2 1433/tcp # coda auxiliary service (Coda fs)
coda_aux2 1433/udp # coda auxiliary service (Coda fs)
coda_aux3 1435/tcp # coda auxiliary service (Coda fs)
coda_aux3 1435/udp # coda auxiliary service (Coda fs)
cfinger 2003/tcp # GNU Finger
afbackup 2988/tcp # Afbackup system
afbackup 2988/udp # Afbackup system
icp 3130/tcp # Internet Cache Protocol (Squid)
icp 3130/udp # Internet Cache Protocol (Squid)
postgres 5432/tcp # POSTGRES
postgres 5432/udp # POSTGRES
fax 4557/tcp # FAX transmission service (old)
hylafax 4559/tcp # HylaFAX client-server protocol (new)
noclog 5354/tcp # noclogd with TCP (nocol)
noclog 5354/udp # noclogd with UDP (nocol)
hostmon 5355/tcp # hostmon uses TCP (nocol)
hostmon 5355/udp # hostmon uses TCP (nocol)
ircd 6667/tcp # Internet Relay Chat
ircd 6667/udp # Internet Relay Chat
webcache 8080/tcp # WWW caching service
webcache 8080/udp # WWW caching service
tproxy 8081/tcp # Transparent Proxy
tproxy 8081/udp # Transparent Proxy
mandelspawn 9359/udp mandelbrot # network mandelbrot
amanda 10080/udp # amanda backup services
amandaidx 10082/tcp # amanda backup services
amidxtape 10083/tcp # amanda backup services
isdnlog 20011/tcp # isdn logging system
isdnlog 20011/udp # isdn logging system
vboxd 20012/tcp # voice box system
vboxd 20012/udp # voice box system
binkp 24554/tcp # Binkley
binkp 24554/udp # Binkley
asp 27374/tcp # Address Search Protocol
asp 27374/udp # Address Search Protocol
tfido 60177/tcp # Ifmail
tfido 60177/udp # Ifmail
fido 60179/tcp # Ifmail
fido 60179/udp # Ifmail
# Local services

@ -1,12 +0,0 @@
root::10933:0:99999:7:::
bin:*:10933:0:99999:7:::
daemon:*:10933:0:99999:7:::
adm:*:10933:0:99999:7:::
lp:*:10933:0:99999:7:::
sync:*:10933:0:99999:7:::
shutdown:*:10933:0:99999:7:::
halt:*:10933:0:99999:7:::
uucp:*:10933:0:99999:7:::
operator:*:10933:0:99999:7:::
nobody:*:10933:0:99999:7:::
default::10933:0:99999:7:::

@ -1,7 +0,0 @@
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
case "`tty`" in
/dev/tty[0-9]*) clear
esac

@ -1,15 +0,0 @@
# .bash_profile
export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
/usr/local/bin
umask 022
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

@ -1,48 +0,0 @@
# ~/.bashrc: executed by bash(1) for non-login interactive shells.
export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
/usr/local/bin
# If running interactively, then:
if [ "$PS1" ]; then
if [ "$BASH" ]; then
export PS1="[\u@\h \W]\\$ "
else
if [ "`id -u`" -eq 0 ]; then
export PS1='# '
else
export PS1='$ '
fi
fi
export USER=`id -un`
export LOGNAME=$USER
export HOSTNAME=`/bin/hostname`
export HISTSIZE=1000
export HISTFILESIZE=1000
export PAGER='/bin/more '
export EDITOR='/bin/vi'
export INPUTRC=/etc/inputrc
export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:';
### Some aliases
alias ps2='ps facux '
alias ps1='ps faxo "%U %t %p %a" '
alias af='ps af'
alias cls='clear'
alias ll='/bin/ls --color=tty -laFh'
alias ls='/bin/ls --color=tty -F'
alias df='df -h'
alias indent='indent -bad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs -npsl -nsc -nsob -nss -ts4 '
#alias bc='bc -l'
alias minicom='minicom -c on'
alias calc='calc -Cd '
alias bc='calc -Cd '
fi;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save