summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorabial <abial@FreeBSD.org>1998-08-27 17:38:45 +0000
committerabial <abial@FreeBSD.org>1998-08-27 17:38:45 +0000
commitd38ad5332060d44f048e5b407d0b8e17da9a909c (patch)
tree3a1c3f90cb24f6c1da60d6fc980d38317610a4c8 /release
downloadFreeBSD-src-d38ad5332060d44f048e5b407d0b8e17da9a909c.zip
FreeBSD-src-d38ad5332060d44f048e5b407d0b8e17da9a909c.tar.gz
Initial import of PicoBSD v0.4 tree.
Diffstat (limited to 'release')
-rw-r--r--release/picobsd/README.html18
-rw-r--r--release/picobsd/Version1
-rwxr-xr-xrelease/picobsd/build/build347
-rwxr-xr-xrelease/picobsd/build/clean34
-rwxr-xr-xrelease/picobsd/build/install14
-rwxr-xr-xrelease/picobsd/build/populate71
-rwxr-xr-xrelease/picobsd/build/stage1102
-rwxr-xr-xrelease/picobsd/build/stage240
-rwxr-xr-xrelease/picobsd/build/stage391
-rw-r--r--release/picobsd/dial/conf/PICOBSD85
-rw-r--r--release/picobsd/dial/crunch1/Makefile40
-rw-r--r--release/picobsd/dial/crunch1/crunch.conf55
-rw-r--r--release/picobsd/dial/floppy.tree/boot.config0
-rw-r--r--release/picobsd/dial/floppy.tree/etc/fstab4
-rw-r--r--release/picobsd/dial/floppy.tree/etc/gettytab40
-rw-r--r--release/picobsd/dial/floppy.tree/etc/group19
-rw-r--r--release/picobsd/dial/floppy.tree/etc/host.conf3
-rw-r--r--release/picobsd/dial/floppy.tree/etc/login.conf120
-rw-r--r--release/picobsd/dial/floppy.tree/etc/master.passwd7
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf9
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf.template10
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ppp/ppp.deny15
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ppp/ppp.linkup6
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ppp/ppp.secret.sample23
-rw-r--r--release/picobsd/dial/floppy.tree/etc/profile4
-rw-r--r--release/picobsd/dial/floppy.tree/etc/protocols7
-rw-r--r--release/picobsd/dial/floppy.tree/etc/rc.network70
-rw-r--r--release/picobsd/dial/floppy.tree/etc/resolv.conf3
-rw-r--r--release/picobsd/dial/floppy.tree/etc/services93
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ssh_config2
-rw-r--r--release/picobsd/dial/floppy.tree/etc/termcap123
-rw-r--r--release/picobsd/dial/floppy.tree/etc/ttys31
-rw-r--r--release/picobsd/dial/floppy.tree/kernel.config0
-rw-r--r--release/picobsd/dial/lang/LICENCE.ssh8
-rw-r--r--release/picobsd/dial/lang/README.en74
-rw-r--r--release/picobsd/dial/lang/README.pl72
-rw-r--r--release/picobsd/dial/lang/boot.help.en23
-rw-r--r--release/picobsd/dial/lang/boot.help.pl23
-rwxr-xr-xrelease/picobsd/dial/lang/dialup.en370
-rwxr-xr-xrelease/picobsd/dial/lang/dialup.pl364
-rw-r--r--release/picobsd/dial/lang/hosts.en5
-rw-r--r--release/picobsd/dial/lang/hosts.pl5
-rwxr-xr-xrelease/picobsd/dial/lang/login.en9
-rwxr-xr-xrelease/picobsd/dial/lang/login.pl10
-rwxr-xr-xrelease/picobsd/dial/lang/mfs.rc.en32
-rwxr-xr-xrelease/picobsd/dial/lang/mfs.rc.pl28
-rw-r--r--release/picobsd/dial/lang/motd.en16
-rw-r--r--release/picobsd/dial/lang/motd.pl16
-rw-r--r--release/picobsd/dial/lang/rc.conf.en32
-rw-r--r--release/picobsd/dial/lang/rc.conf.pl32
-rw-r--r--release/picobsd/dial/lang/rc.en103
-rw-r--r--release/picobsd/dial/lang/rc.network.en70
-rw-r--r--release/picobsd/dial/lang/rc.network.pl70
-rw-r--r--release/picobsd/dial/lang/rc.pl107
-rwxr-xr-xrelease/picobsd/dial/lang/reboot.en3
-rwxr-xr-xrelease/picobsd/dial/lang/reboot.pl3
-rw-r--r--release/picobsd/dial/lang/resolv.conf.en3
-rw-r--r--release/picobsd/dial/lang/resolv.conf.pl3
-rwxr-xr-xrelease/picobsd/dial/lang/update.en20
-rwxr-xr-xrelease/picobsd/dial/lang/update.pl21
-rwxr-xr-xrelease/picobsd/dial/mfs.tree/MAKEDEV1167
-rw-r--r--release/picobsd/dial/mfs.tree/Makefile69
-rw-r--r--release/picobsd/dial/mfs.tree/login.conf62
-rw-r--r--release/picobsd/dial/mfs.tree/mfs.mtree58
-rw-r--r--release/picobsd/doc/bugs.html82
-rw-r--r--release/picobsd/doc/faq.html208
-rw-r--r--release/picobsd/doc/hardware.html107
-rw-r--r--release/picobsd/doc/how2build.html177
-rw-r--r--release/picobsd/doc/intrinsics.html126
-rw-r--r--release/picobsd/doc/intro.html300
-rw-r--r--release/picobsd/help/README8
-rw-r--r--release/picobsd/help/cat.hlp5
-rw-r--r--release/picobsd/help/cat.hlp.en5
-rw-r--r--release/picobsd/help/cat.hlp.pl5
-rw-r--r--release/picobsd/help/chmod.hlp5
-rw-r--r--release/picobsd/help/chmod.hlp.en5
-rw-r--r--release/picobsd/help/chmod.hlp.pl5
-rw-r--r--release/picobsd/help/chown.hlp8
-rw-r--r--release/picobsd/help/chown.hlp.en8
-rw-r--r--release/picobsd/help/chown.hlp.pl8
-rw-r--r--release/picobsd/help/chuck.hlp6
-rw-r--r--release/picobsd/help/cp.hlp6
-rw-r--r--release/picobsd/help/cp.hlp.en6
-rw-r--r--release/picobsd/help/cp.hlp.pl6
-rw-r--r--release/picobsd/help/dd.hlp12
-rw-r--r--release/picobsd/help/df.hlp5
-rw-r--r--release/picobsd/help/df.hlp.en5
-rw-r--r--release/picobsd/help/df.hlp.pl5
-rw-r--r--release/picobsd/help/dialup.hlp4
-rw-r--r--release/picobsd/help/dialup.hlp.en4
-rw-r--r--release/picobsd/help/dialup.hlp.pl5
-rw-r--r--release/picobsd/help/echo.hlp8
-rw-r--r--release/picobsd/help/echo.hlp.en8
-rw-r--r--release/picobsd/help/echo.hlp.pl8
-rw-r--r--release/picobsd/help/ee.hlp4
-rw-r--r--release/picobsd/help/ee.hlp.en4
-rw-r--r--release/picobsd/help/ee.hlp.pl4
-rw-r--r--release/picobsd/help/fsck.hlp15
-rw-r--r--release/picobsd/help/fsck.hlp.en15
-rw-r--r--release/picobsd/help/fsck.hlp.pl15
-rw-r--r--release/picobsd/help/ftp.hlp8
-rw-r--r--release/picobsd/help/ftp.hlp.en8
-rw-r--r--release/picobsd/help/ftp.hlp.pl8
-rw-r--r--release/picobsd/help/getty.hlp1
-rw-r--r--release/picobsd/help/gzip.hlp26
-rw-r--r--release/picobsd/help/gzip.hlp.en26
-rw-r--r--release/picobsd/help/gzip.hlp.pl12
-rw-r--r--release/picobsd/help/help.hlp7
-rw-r--r--release/picobsd/help/help.hlp.en7
-rw-r--r--release/picobsd/help/help.hlp.pl7
-rw-r--r--release/picobsd/help/hostname.hlp5
-rw-r--r--release/picobsd/help/hostname.hlp.en5
-rw-r--r--release/picobsd/help/hostname.hlp.pl5
-rw-r--r--release/picobsd/help/ifconfig.hlp18
-rw-r--r--release/picobsd/help/ifconfig.hlp.en18
-rw-r--r--release/picobsd/help/ifconfig.hlp.pl18
-rw-r--r--release/picobsd/help/init.hlp1
-rw-r--r--release/picobsd/help/kbdcontrol.hlp7
-rw-r--r--release/picobsd/help/kbdcontrol.hlp.en7
-rw-r--r--release/picobsd/help/kbdcontrol.hlp.pl7
-rw-r--r--release/picobsd/help/kget.hlp21
-rw-r--r--release/picobsd/help/kget.hlp.en21
-rw-r--r--release/picobsd/help/kget.hlp.pl23
-rw-r--r--release/picobsd/help/kill.hlp8
-rw-r--r--release/picobsd/help/kill.hlp.en8
-rw-r--r--release/picobsd/help/kill.hlp.pl8
-rw-r--r--release/picobsd/help/ln.hlp9
-rw-r--r--release/picobsd/help/ln.hlp.en9
-rw-r--r--release/picobsd/help/ln.hlp.pl9
-rw-r--r--release/picobsd/help/ls.hlp10
-rw-r--r--release/picobsd/help/ls.hlp.en10
-rw-r--r--release/picobsd/help/ls.hlp.pl11
-rw-r--r--release/picobsd/help/mkdir.hlp5
-rw-r--r--release/picobsd/help/mkdir.hlp.en5
-rw-r--r--release/picobsd/help/mkdir.hlp.pl5
-rw-r--r--release/picobsd/help/mknod.hlp5
-rw-r--r--release/picobsd/help/more.hlp7
-rw-r--r--release/picobsd/help/more.hlp.en7
-rw-r--r--release/picobsd/help/more.hlp.pl8
-rw-r--r--release/picobsd/help/mount.hlp21
-rw-r--r--release/picobsd/help/mount.hlp.en21
-rw-r--r--release/picobsd/help/mount.hlp.pl19
-rw-r--r--release/picobsd/help/mount_cd9660.hlp9
-rw-r--r--release/picobsd/help/mount_cd9660.hlp.en9
-rw-r--r--release/picobsd/help/mount_cd9660.hlp.pl9
-rw-r--r--release/picobsd/help/mount_ext2fs.hlp11
-rw-r--r--release/picobsd/help/mount_ext2fs.hlp.en11
-rw-r--r--release/picobsd/help/mount_ext2fs.hlp.pl11
-rw-r--r--release/picobsd/help/mount_msdos.hlp13
-rw-r--r--release/picobsd/help/mount_msdos.hlp.en13
-rw-r--r--release/picobsd/help/mount_msdos.hlp.pl13
-rw-r--r--release/picobsd/help/mount_procfs.hlp9
-rw-r--r--release/picobsd/help/moused.hlp44
-rw-r--r--release/picobsd/help/moused.hlp.en44
-rw-r--r--release/picobsd/help/moused.hlp.pl29
-rw-r--r--release/picobsd/help/mv.hlp9
-rw-r--r--release/picobsd/help/mv.hlp.en9
-rw-r--r--release/picobsd/help/mv.hlp.pl9
-rw-r--r--release/picobsd/help/ping.hlp10
-rw-r--r--release/picobsd/help/ping.hlp.en10
-rw-r--r--release/picobsd/help/ping.hlp.pl10
-rw-r--r--release/picobsd/help/ppp.hlp16
-rw-r--r--release/picobsd/help/ppp.hlp.en16
-rw-r--r--release/picobsd/help/ppp.hlp.pl14
-rw-r--r--release/picobsd/help/ps.hlp9
-rw-r--r--release/picobsd/help/ps.hlp.en9
-rw-r--r--release/picobsd/help/ps.hlp.pl7
-rw-r--r--release/picobsd/help/pwd.hlp1
-rw-r--r--release/picobsd/help/pwd.hlp.en1
-rw-r--r--release/picobsd/help/pwd.hlp.pl1
-rw-r--r--release/picobsd/help/reboot.hlp3
-rw-r--r--release/picobsd/help/reboot.hlp.en3
-rw-r--r--release/picobsd/help/reboot.hlp.pl3
-rw-r--r--release/picobsd/help/rm.hlp13
-rw-r--r--release/picobsd/help/rm.hlp.en13
-rw-r--r--release/picobsd/help/rm.hlp.pl12
-rw-r--r--release/picobsd/help/route.hlp13
-rw-r--r--release/picobsd/help/route.hlp.en13
-rw-r--r--release/picobsd/help/route.hlp.pl13
-rw-r--r--release/picobsd/help/sh.hlp3
-rw-r--r--release/picobsd/help/sh.hlp.en3
-rw-r--r--release/picobsd/help/sh.hlp.pl3
-rw-r--r--release/picobsd/help/shutdown.hlp3
-rw-r--r--release/picobsd/help/shutdown.hlp.en3
-rw-r--r--release/picobsd/help/shutdown.hlp.pl3
-rw-r--r--release/picobsd/help/ssh.hlp29
-rw-r--r--release/picobsd/help/ssh.hlp.en29
-rw-r--r--release/picobsd/help/ssh.hlp.pl29
-rw-r--r--release/picobsd/help/swapon.hlp5
-rw-r--r--release/picobsd/help/swapon.hlp.en5
-rw-r--r--release/picobsd/help/swapon.hlp.pl5
-rw-r--r--release/picobsd/help/sysctl.hlp15
-rw-r--r--release/picobsd/help/sysctl.hlp.en15
-rw-r--r--release/picobsd/help/sysctl.hlp.pl15
-rw-r--r--release/picobsd/help/telnet.hlp14
-rw-r--r--release/picobsd/help/telnet.hlp.en14
-rw-r--r--release/picobsd/help/telnet.hlp.pl14
-rw-r--r--release/picobsd/help/test.hlp1
-rw-r--r--release/picobsd/help/test.hlp.en1
-rw-r--r--release/picobsd/help/test.hlp.pl1
-rw-r--r--release/picobsd/help/umount.hlp12
-rw-r--r--release/picobsd/help/umount.hlp.en12
-rw-r--r--release/picobsd/help/umount.hlp.pl12
-rw-r--r--release/picobsd/help/vidcontrol.hlp7
-rw-r--r--release/picobsd/help/vidcontrol.hlp.en7
-rw-r--r--release/picobsd/help/vidcontrol.hlp.pl7
-rw-r--r--release/picobsd/help/vm.hlp12
-rw-r--r--release/picobsd/help/vm.hlp.en12
-rw-r--r--release/picobsd/help/vm.hlp.pl14
-rw-r--r--release/picobsd/help/vnconfig.hlp9
-rw-r--r--release/picobsd/isp/conf/PICOBSD128
-rw-r--r--release/picobsd/isp/crunch1/Makefile49
-rw-r--r--release/picobsd/isp/crunch1/crunch.conf56
-rw-r--r--release/picobsd/isp/crunch1/login.diff33
-rw-r--r--release/picobsd/isp/crunch1/mibs/EtherLike-MIB.txt318
-rw-r--r--release/picobsd/isp/crunch1/mibs/HOST-RESOURCES-MIB.txt877
-rw-r--r--release/picobsd/isp/crunch1/mibs/IANAifType-MIB.txt81
-rw-r--r--release/picobsd/isp/crunch1/mibs/IF-MIB.txt822
-rw-r--r--release/picobsd/isp/crunch1/mibs/IP-MIB.txt507
-rw-r--r--release/picobsd/isp/crunch1/mibs/RFC1155-SMI.txt9
-rw-r--r--release/picobsd/isp/crunch1/mibs/RFC1213-MIB.txt1550
-rw-r--r--release/picobsd/isp/crunch1/mibs/RFC1271-MIB.txt1633
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-CONF.txt7
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-M2M-MIB.txt371
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-MIB.txt440
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-PARTY-MIB.txt586
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-SMI.txt54
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-TC.txt90
-rw-r--r--release/picobsd/isp/crunch1/mibs/SNMPv2-TM.txt54
-rw-r--r--release/picobsd/isp/crunch1/mibs/TCP-MIB.txt234
-rw-r--r--release/picobsd/isp/crunch1/mibs/UCD-SNMP-MIB.txt519
-rw-r--r--release/picobsd/isp/crunch1/mibs/UDP-MIB.txt109
-rw-r--r--release/picobsd/isp/crunch1/passwd.diff48
-rw-r--r--release/picobsd/isp/crunch1/ppp.diff12
-rw-r--r--release/picobsd/isp/floppy.tree/boot.config0
-rw-r--r--release/picobsd/isp/floppy.tree/etc/disktab87
-rw-r--r--release/picobsd/isp/floppy.tree/etc/fstab4
-rw-r--r--release/picobsd/isp/floppy.tree/etc/gettytab40
-rw-r--r--release/picobsd/isp/floppy.tree/etc/group19
-rw-r--r--release/picobsd/isp/floppy.tree/etc/host.conf3
-rw-r--r--release/picobsd/isp/floppy.tree/etc/hosts5
-rw-r--r--release/picobsd/isp/floppy.tree/etc/inetd.conf21
-rw-r--r--release/picobsd/isp/floppy.tree/etc/login.conf120
-rw-r--r--release/picobsd/isp/floppy.tree/etc/master.passwd7
-rw-r--r--release/picobsd/isp/floppy.tree/etc/motd12
-rw-r--r--release/picobsd/isp/floppy.tree/etc/ppp/ppp.conf8
-rw-r--r--release/picobsd/isp/floppy.tree/etc/ppp/ppp.deny15
-rw-r--r--release/picobsd/isp/floppy.tree/etc/ppp/ppp.linkup10
-rw-r--r--release/picobsd/isp/floppy.tree/etc/ppp/ppp.secret.sample23
-rw-r--r--release/picobsd/isp/floppy.tree/etc/profile3
-rw-r--r--release/picobsd/isp/floppy.tree/etc/protocols7
-rw-r--r--release/picobsd/isp/floppy.tree/etc/rc62
-rw-r--r--release/picobsd/isp/floppy.tree/etc/rc.conf25
-rw-r--r--release/picobsd/isp/floppy.tree/etc/rc.firewall172
-rw-r--r--release/picobsd/isp/floppy.tree/etc/rc.network80
-rw-r--r--release/picobsd/isp/floppy.tree/etc/rc.serial127
-rw-r--r--release/picobsd/isp/floppy.tree/etc/remote50
-rw-r--r--release/picobsd/isp/floppy.tree/etc/resolv.conf3
-rw-r--r--release/picobsd/isp/floppy.tree/etc/services93
-rw-r--r--release/picobsd/isp/floppy.tree/etc/shells6
-rw-r--r--release/picobsd/isp/floppy.tree/etc/snmpd.conf43
-rw-r--r--release/picobsd/isp/floppy.tree/etc/termcap123
-rw-r--r--release/picobsd/isp/floppy.tree/etc/ttys31
-rw-r--r--release/picobsd/isp/floppy.tree/kernel.config0
-rw-r--r--release/picobsd/isp/lang/README.en33
-rw-r--r--release/picobsd/isp/lang/README.pl33
-rw-r--r--release/picobsd/isp/lang/boot.help.en18
-rw-r--r--release/picobsd/isp/lang/boot.help.pl16
-rw-r--r--release/picobsd/isp/lang/hosts.en5
-rw-r--r--release/picobsd/isp/lang/hosts.pl5
-rw-r--r--release/picobsd/isp/lang/m.en11
-rw-r--r--release/picobsd/isp/lang/m.pl11
-rw-r--r--release/picobsd/isp/lang/mfs.rc.en34
-rw-r--r--release/picobsd/isp/lang/mfs.rc.pl36
-rw-r--r--release/picobsd/isp/lang/motd.en12
-rw-r--r--release/picobsd/isp/lang/motd.pl12
-rw-r--r--release/picobsd/isp/lang/rc.conf.en25
-rw-r--r--release/picobsd/isp/lang/rc.conf.pl25
-rw-r--r--release/picobsd/isp/lang/rc.en64
-rw-r--r--release/picobsd/isp/lang/rc.network.en79
-rw-r--r--release/picobsd/isp/lang/rc.network.pl80
-rw-r--r--release/picobsd/isp/lang/rc.pl62
-rwxr-xr-xrelease/picobsd/isp/lang/reboot.en2
-rwxr-xr-xrelease/picobsd/isp/lang/reboot.pl2
-rw-r--r--release/picobsd/isp/lang/resolv.conf.en3
-rw-r--r--release/picobsd/isp/lang/resolv.conf.pl3
-rwxr-xr-xrelease/picobsd/isp/lang/update.en23
-rwxr-xr-xrelease/picobsd/isp/lang/update.pl23
-rwxr-xr-xrelease/picobsd/isp/mfs.tree/MAKEDEV1167
-rw-r--r--release/picobsd/isp/mfs.tree/Makefile41
-rw-r--r--release/picobsd/isp/mfs.tree/mfs.mtree56
-rw-r--r--release/picobsd/net/conf/PICOBSD94
-rw-r--r--release/picobsd/net/crunch1/Makefile48
-rw-r--r--release/picobsd/net/crunch1/crunch.conf56
-rw-r--r--release/picobsd/net/crunch1/login.diff33
-rw-r--r--release/picobsd/net/crunch1/mibs/EtherLike-MIB.txt318
-rw-r--r--release/picobsd/net/crunch1/mibs/HOST-RESOURCES-MIB.txt877
-rw-r--r--release/picobsd/net/crunch1/mibs/IANAifType-MIB.txt81
-rw-r--r--release/picobsd/net/crunch1/mibs/IF-MIB.txt822
-rw-r--r--release/picobsd/net/crunch1/mibs/IP-MIB.txt507
-rw-r--r--release/picobsd/net/crunch1/mibs/RFC1155-SMI.txt9
-rw-r--r--release/picobsd/net/crunch1/mibs/RFC1213-MIB.txt1550
-rw-r--r--release/picobsd/net/crunch1/mibs/RFC1271-MIB.txt1633
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-CONF.txt7
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-M2M-MIB.txt371
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-MIB.txt440
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-PARTY-MIB.txt586
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-SMI.txt54
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-TC.txt90
-rw-r--r--release/picobsd/net/crunch1/mibs/SNMPv2-TM.txt54
-rw-r--r--release/picobsd/net/crunch1/mibs/TCP-MIB.txt234
-rw-r--r--release/picobsd/net/crunch1/mibs/UCD-SNMP-MIB.txt519
-rw-r--r--release/picobsd/net/crunch1/mibs/UDP-MIB.txt109
-rw-r--r--release/picobsd/net/crunch1/passwd.diff48
-rw-r--r--release/picobsd/net/crunch1/ppp.diff12
-rw-r--r--release/picobsd/net/floppy.tree/boot.config0
-rw-r--r--release/picobsd/net/floppy.tree/etc/disktab87
-rw-r--r--release/picobsd/net/floppy.tree/etc/fstab4
-rw-r--r--release/picobsd/net/floppy.tree/etc/gettytab40
-rw-r--r--release/picobsd/net/floppy.tree/etc/group19
-rw-r--r--release/picobsd/net/floppy.tree/etc/host.conf3
-rw-r--r--release/picobsd/net/floppy.tree/etc/hosts5
-rw-r--r--release/picobsd/net/floppy.tree/etc/inetd.conf23
-rw-r--r--release/picobsd/net/floppy.tree/etc/login.conf120
-rw-r--r--release/picobsd/net/floppy.tree/etc/master.passwd7
-rw-r--r--release/picobsd/net/floppy.tree/etc/motd12
-rw-r--r--release/picobsd/net/floppy.tree/etc/ppp/ppp.conf8
-rw-r--r--release/picobsd/net/floppy.tree/etc/ppp/ppp.deny15
-rw-r--r--release/picobsd/net/floppy.tree/etc/ppp/ppp.linkup10
-rw-r--r--release/picobsd/net/floppy.tree/etc/ppp/ppp.secret.sample23
-rw-r--r--release/picobsd/net/floppy.tree/etc/profile4
-rw-r--r--release/picobsd/net/floppy.tree/etc/protocols7
-rw-r--r--release/picobsd/net/floppy.tree/etc/rc62
-rw-r--r--release/picobsd/net/floppy.tree/etc/rc.conf25
-rw-r--r--release/picobsd/net/floppy.tree/etc/rc.firewall172
-rw-r--r--release/picobsd/net/floppy.tree/etc/rc.network80
-rw-r--r--release/picobsd/net/floppy.tree/etc/rc.serial127
-rw-r--r--release/picobsd/net/floppy.tree/etc/remote50
-rw-r--r--release/picobsd/net/floppy.tree/etc/resolv.conf3
-rw-r--r--release/picobsd/net/floppy.tree/etc/services93
-rw-r--r--release/picobsd/net/floppy.tree/etc/shells6
-rw-r--r--release/picobsd/net/floppy.tree/etc/snmpd.conf45
-rw-r--r--release/picobsd/net/floppy.tree/etc/termcap123
-rw-r--r--release/picobsd/net/floppy.tree/etc/ttys32
-rw-r--r--release/picobsd/net/floppy.tree/kernel.config0
-rw-r--r--release/picobsd/net/lang/README.en41
-rw-r--r--release/picobsd/net/lang/README.pl56
-rw-r--r--release/picobsd/net/lang/boot.help.en18
-rw-r--r--release/picobsd/net/lang/boot.help.pl16
-rw-r--r--release/picobsd/net/lang/hosts.en5
-rw-r--r--release/picobsd/net/lang/hosts.pl5
-rw-r--r--release/picobsd/net/lang/m.en11
-rw-r--r--release/picobsd/net/lang/m.pl11
-rw-r--r--release/picobsd/net/lang/mfs.rc.en33
-rw-r--r--release/picobsd/net/lang/mfs.rc.pl35
-rw-r--r--release/picobsd/net/lang/motd.en12
-rw-r--r--release/picobsd/net/lang/motd.pl12
-rw-r--r--release/picobsd/net/lang/rc.conf.en25
-rw-r--r--release/picobsd/net/lang/rc.conf.pl25
-rw-r--r--release/picobsd/net/lang/rc.en64
-rw-r--r--release/picobsd/net/lang/rc.network.en79
-rw-r--r--release/picobsd/net/lang/rc.network.pl80
-rw-r--r--release/picobsd/net/lang/rc.pl62
-rwxr-xr-xrelease/picobsd/net/lang/reboot.en2
-rwxr-xr-xrelease/picobsd/net/lang/reboot.pl2
-rw-r--r--release/picobsd/net/lang/resolv.conf.en3
-rw-r--r--release/picobsd/net/lang/resolv.conf.pl3
-rwxr-xr-xrelease/picobsd/net/lang/update.en23
-rwxr-xr-xrelease/picobsd/net/lang/update.pl23
-rwxr-xr-xrelease/picobsd/net/mfs.tree/MAKEDEV1167
-rw-r--r--release/picobsd/net/mfs.tree/Makefile38
-rw-r--r--release/picobsd/net/mfs.tree/mfs.mtree58
-rw-r--r--release/picobsd/router/BAD_DOCS!!!0
-rw-r--r--release/picobsd/router/conf/PICOBSD97
-rw-r--r--release/picobsd/router/crunch1/Makefile36
-rw-r--r--release/picobsd/router/crunch1/crunch.conf55
-rw-r--r--release/picobsd/router/crunch1/mibs/EtherLike-MIB.txt318
-rw-r--r--release/picobsd/router/crunch1/mibs/HOST-RESOURCES-MIB.txt877
-rw-r--r--release/picobsd/router/crunch1/mibs/IANAifType-MIB.txt81
-rw-r--r--release/picobsd/router/crunch1/mibs/IF-MIB.txt822
-rw-r--r--release/picobsd/router/crunch1/mibs/IP-MIB.txt507
-rw-r--r--release/picobsd/router/crunch1/mibs/RFC1155-SMI.txt9
-rw-r--r--release/picobsd/router/crunch1/mibs/RFC1213-MIB.txt1550
-rw-r--r--release/picobsd/router/crunch1/mibs/RFC1271-MIB.txt1633
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-CONF.txt7
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-M2M-MIB.txt371
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-MIB.txt440
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-PARTY-MIB.txt586
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-SMI.txt54
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-TC.txt90
-rw-r--r--release/picobsd/router/crunch1/mibs/SNMPv2-TM.txt54
-rw-r--r--release/picobsd/router/crunch1/mibs/TCP-MIB.txt234
-rw-r--r--release/picobsd/router/crunch1/mibs/UCD-SNMP-MIB.txt519
-rw-r--r--release/picobsd/router/crunch1/mibs/UDP-MIB.txt109
-rw-r--r--release/picobsd/router/floppy.tree/boot.config0
-rw-r--r--release/picobsd/router/floppy.tree/etc/disktab87
-rw-r--r--release/picobsd/router/floppy.tree/etc/fstab4
-rw-r--r--release/picobsd/router/floppy.tree/etc/gettytab40
-rw-r--r--release/picobsd/router/floppy.tree/etc/group19
-rw-r--r--release/picobsd/router/floppy.tree/etc/host.conf3
-rw-r--r--release/picobsd/router/floppy.tree/etc/hosts5
-rw-r--r--release/picobsd/router/floppy.tree/etc/login.conf120
-rw-r--r--release/picobsd/router/floppy.tree/etc/motd12
-rw-r--r--release/picobsd/router/floppy.tree/etc/ppp/ppp.conf8
-rw-r--r--release/picobsd/router/floppy.tree/etc/ppp/ppp.deny15
-rw-r--r--release/picobsd/router/floppy.tree/etc/ppp/ppp.linkup10
-rw-r--r--release/picobsd/router/floppy.tree/etc/ppp/ppp.secret.sample23
-rw-r--r--release/picobsd/router/floppy.tree/etc/profile4
-rw-r--r--release/picobsd/router/floppy.tree/etc/protocols7
-rw-r--r--release/picobsd/router/floppy.tree/etc/rc18
-rw-r--r--release/picobsd/router/floppy.tree/etc/rc.conf25
-rw-r--r--release/picobsd/router/floppy.tree/etc/rc.firewall172
-rw-r--r--release/picobsd/router/floppy.tree/etc/rc.network80
-rw-r--r--release/picobsd/router/floppy.tree/etc/rc.serial127
-rw-r--r--release/picobsd/router/floppy.tree/etc/remote50
-rw-r--r--release/picobsd/router/floppy.tree/etc/resolv.conf3
-rw-r--r--release/picobsd/router/floppy.tree/etc/services93
-rw-r--r--release/picobsd/router/floppy.tree/etc/shells6
-rw-r--r--release/picobsd/router/floppy.tree/etc/snmpd.conf45
-rw-r--r--release/picobsd/router/floppy.tree/etc/termcap123
-rw-r--r--release/picobsd/router/floppy.tree/etc/ttys32
-rw-r--r--release/picobsd/router/floppy.tree/kernel.config0
-rw-r--r--release/picobsd/router/lang/BAD_DOCS!!!0
-rw-r--r--release/picobsd/router/lang/README.en40
-rw-r--r--release/picobsd/router/lang/README.pl39
-rw-r--r--release/picobsd/router/lang/boot.help.en18
-rw-r--r--release/picobsd/router/lang/boot.help.pl16
-rw-r--r--release/picobsd/router/lang/hosts.en5
-rw-r--r--release/picobsd/router/lang/hosts.pl5
-rw-r--r--release/picobsd/router/lang/mfs.rc.en25
-rw-r--r--release/picobsd/router/lang/mfs.rc.pl25
-rw-r--r--release/picobsd/router/lang/motd.en12
-rw-r--r--release/picobsd/router/lang/motd.pl12
-rw-r--r--release/picobsd/router/lang/rc.en18
-rw-r--r--release/picobsd/router/lang/rc.pl18
-rwxr-xr-xrelease/picobsd/router/lang/reboot.en2
-rwxr-xr-xrelease/picobsd/router/lang/reboot.pl2
-rw-r--r--release/picobsd/router/lang/resolv.conf.en3
-rw-r--r--release/picobsd/router/lang/resolv.conf.pl3
-rwxr-xr-xrelease/picobsd/router/lang/update.en10
-rwxr-xr-xrelease/picobsd/router/lang/update.pl11
-rwxr-xr-xrelease/picobsd/router/mfs.tree/MAKEDEV1167
-rw-r--r--release/picobsd/router/mfs.tree/Makefile38
-rw-r--r--release/picobsd/router/mfs.tree/login.conf62
-rw-r--r--release/picobsd/router/mfs.tree/mfs.mtree44
-rw-r--r--release/picobsd/tinyware/aps/Makefile9
-rw-r--r--release/picobsd/tinyware/aps/README19
-rw-r--r--release/picobsd/tinyware/aps/main.c101
-rw-r--r--release/picobsd/tinyware/ash/Makefile44
-rw-r--r--release/picobsd/tinyware/ash/TOUR357
-rw-r--r--release/picobsd/tinyware/ash/alias.c267
-rw-r--r--release/picobsd/tinyware/ash/alias.h53
-rw-r--r--release/picobsd/tinyware/ash/arith.h41
-rw-r--r--release/picobsd/tinyware/ash/arith.y201
-rw-r--r--release/picobsd/tinyware/ash/arith_lex.l93
-rw-r--r--release/picobsd/tinyware/ash/bltin/bltin.h78
-rw-r--r--release/picobsd/tinyware/ash/bltin/echo.1113
-rw-r--r--release/picobsd/tinyware/ash/bltin/echo.c107
-rw-r--r--release/picobsd/tinyware/ash/builtins.def92
-rw-r--r--release/picobsd/tinyware/ash/cd.c383
-rw-r--r--release/picobsd/tinyware/ash/cd.h39
-rw-r--r--release/picobsd/tinyware/ash/error.c291
-rw-r--r--release/picobsd/tinyware/ash/error.h108
-rw-r--r--release/picobsd/tinyware/ash/eval.c1012
-rw-r--r--release/picobsd/tinyware/ash/eval.h74
-rw-r--r--release/picobsd/tinyware/ash/exec.c921
-rw-r--r--release/picobsd/tinyware/ash/exec.h72
-rw-r--r--release/picobsd/tinyware/ash/expand.c1385
-rw-r--r--release/picobsd/tinyware/ash/expand.h68
-rw-r--r--release/picobsd/tinyware/ash/funcs/cmv50
-rw-r--r--release/picobsd/tinyware/ash/funcs/dirs74
-rw-r--r--release/picobsd/tinyware/ash/funcs/kill50
-rw-r--r--release/picobsd/tinyware/ash/funcs/login39
-rw-r--r--release/picobsd/tinyware/ash/funcs/newgrp38
-rw-r--r--release/picobsd/tinyware/ash/funcs/popd74
-rw-r--r--release/picobsd/tinyware/ash/funcs/pushd74
-rw-r--r--release/picobsd/tinyware/ash/funcs/suspend42
-rw-r--r--release/picobsd/tinyware/ash/histedit.c501
-rw-r--r--release/picobsd/tinyware/ash/init.h43
-rw-r--r--release/picobsd/tinyware/ash/input.c516
-rw-r--r--release/picobsd/tinyware/ash/input.h66
-rw-r--r--release/picobsd/tinyware/ash/jobs.c1115
-rw-r--r--release/picobsd/tinyware/ash/jobs.h97
-rw-r--r--release/picobsd/tinyware/ash/machdep.h53
-rw-r--r--release/picobsd/tinyware/ash/mail.c124
-rw-r--r--release/picobsd/tinyware/ash/mail.h41
-rw-r--r--release/picobsd/tinyware/ash/main.c388
-rw-r--r--release/picobsd/tinyware/ash/main.h47
-rw-r--r--release/picobsd/tinyware/ash/memalloc.c306
-rw-r--r--release/picobsd/tinyware/ash/memalloc.h80
-rw-r--r--release/picobsd/tinyware/ash/miscbltin.c402
-rw-r--r--release/picobsd/tinyware/ash/miscbltin.h34
-rw-r--r--release/picobsd/tinyware/ash/mkbuiltins94
-rw-r--r--release/picobsd/tinyware/ash/mkinit.c523
-rw-r--r--release/picobsd/tinyware/ash/mknodes.c482
-rw-r--r--release/picobsd/tinyware/ash/mksyntax.c407
-rw-r--r--release/picobsd/tinyware/ash/mktokens95
-rw-r--r--release/picobsd/tinyware/ash/myhistedit.h50
-rw-r--r--release/picobsd/tinyware/ash/mystring.c144
-rw-r--r--release/picobsd/tinyware/ash/mystring.h49
-rw-r--r--release/picobsd/tinyware/ash/nodes.c.pat169
-rw-r--r--release/picobsd/tinyware/ash/nodetypes145
-rw-r--r--release/picobsd/tinyware/ash/options.c541
-rw-r--r--release/picobsd/tinyware/ash/options.h114
-rw-r--r--release/picobsd/tinyware/ash/output.c584
-rw-r--r--release/picobsd/tinyware/ash/output.h85
-rw-r--r--release/picobsd/tinyware/ash/parser.c1542
-rw-r--r--release/picobsd/tinyware/ash/parser.h82
-rw-r--r--release/picobsd/tinyware/ash/redir.c375
-rw-r--r--release/picobsd/tinyware/ash/redir.h51
-rw-r--r--release/picobsd/tinyware/ash/sh.11450
-rw-r--r--release/picobsd/tinyware/ash/shell.h83
-rw-r--r--release/picobsd/tinyware/ash/show.c446
-rw-r--r--release/picobsd/tinyware/ash/show.h46
-rw-r--r--release/picobsd/tinyware/ash/trap.c383
-rw-r--r--release/picobsd/tinyware/ash/trap.h50
-rw-r--r--release/picobsd/tinyware/ash/var.c754
-rw-r--r--release/picobsd/tinyware/ash/var.h130
-rw-r--r--release/picobsd/tinyware/help/Makefile9
-rw-r--r--release/picobsd/tinyware/help/README8
-rw-r--r--release/picobsd/tinyware/help/help.c97
-rw-r--r--release/picobsd/tinyware/kget/Makefile11
-rw-r--r--release/picobsd/tinyware/kget/README47
-rw-r--r--release/picobsd/tinyware/kget/kget.h2
-rw-r--r--release/picobsd/tinyware/kget/uc_eisa.c166
-rw-r--r--release/picobsd/tinyware/kget/uc_isa.c214
-rw-r--r--release/picobsd/tinyware/kget/uc_kmem.c87
-rw-r--r--release/picobsd/tinyware/kget/uc_list.c76
-rw-r--r--release/picobsd/tinyware/kget/uc_main.c466
-rw-r--r--release/picobsd/tinyware/kget/uc_main.h167
-rw-r--r--release/picobsd/tinyware/kget/uc_pci.c122
-rw-r--r--release/picobsd/tinyware/kget/uc_scsi.c477
-rw-r--r--release/picobsd/tinyware/ns/Makefile9
-rw-r--r--release/picobsd/tinyware/ns/README41
-rw-r--r--release/picobsd/tinyware/ns/ns.c628
-rw-r--r--release/picobsd/tinyware/oinit/Makefile12
-rw-r--r--release/picobsd/tinyware/oinit/README123
-rw-r--r--release/picobsd/tinyware/oinit/oinit.c924
-rw-r--r--release/picobsd/tinyware/simple_httpd/README6
-rw-r--r--release/picobsd/tinyware/simple_httpd/simple_httpd.c356
-rw-r--r--release/picobsd/tinyware/sps/Makefile9
-rw-r--r--release/picobsd/tinyware/sps/README17
-rw-r--r--release/picobsd/tinyware/sps/sps.c104
-rw-r--r--release/picobsd/tinyware/view/Makefile9
-rw-r--r--release/picobsd/tinyware/view/README86
-rw-r--r--release/picobsd/tinyware/view/fbsd.pngbin0 -> 7386 bytes
-rw-r--r--release/picobsd/tinyware/view/picobsd.vu9
-rw-r--r--release/picobsd/tinyware/view/view.c583
-rw-r--r--release/picobsd/tinyware/vm/Makefile10
-rw-r--r--release/picobsd/tinyware/vm/README10
-rw-r--r--release/picobsd/tinyware/vm/vm.c61
-rw-r--r--release/picobsd/tools/daemon/Makefile8
-rw-r--r--release/picobsd/tools/daemon/README7
-rw-r--r--release/picobsd/tools/daemon/daemon.c127
-rw-r--r--release/picobsd/tools/daemon/logo6
-rw-r--r--release/picobsd/tools/dumpnlist/Makefile8
-rw-r--r--release/picobsd/tools/dumpnlist/dumpnlist.c45
-rw-r--r--release/picobsd/tools/write_mfs_in_kernel/Makefile9
-rw-r--r--release/picobsd/tools/write_mfs_in_kernel/write_mfs_in_kernel.c96
559 files changed, 65575 insertions, 0 deletions
diff --git a/release/picobsd/README.html b/release/picobsd/README.html
new file mode 100644
index 0000000..ddb663b
--- /dev/null
+++ b/release/picobsd/README.html
@@ -0,0 +1,18 @@
+<html>
+<body>
+<h1><b><center> PicoBSD Development Kit </center></b></h1>
+
+<p>All documentation, instructions, list of supported hardware and FAQ are
+in doc/ directory. The docs are marked with HTML tags, but we try to keep
+them readable even without a browser.
+
+<p>Please start from <A HREF="doc/intro.html">here</a> for general
+description of the project and its features, or just go directly
+<A HREF="doc/how2build.html">here</a> for detailed instructions on how to
+build your version of PicoBSD.
+
+<p>Enjoy!</p>
+
+<! $Id: README.html,v 1.3 1998/08/19 17:00:26 abial Exp $ >
+</body>
+</html>
diff --git a/release/picobsd/Version b/release/picobsd/Version
new file mode 100644
index 0000000..bd73f47
--- /dev/null
+++ b/release/picobsd/Version
@@ -0,0 +1 @@
+0.4
diff --git a/release/picobsd/build/build b/release/picobsd/build/build
new file mode 100755
index 0000000..72bb305
--- /dev/null
+++ b/release/picobsd/build/build
@@ -0,0 +1,347 @@
+#!/bin/sh -
+
+#
+# $Id: build,v 1.8 1998/08/10 19:06:48 abial Exp $
+#
+
+# You can set the SRC variable which points to your source tree. It's
+# /usr/src by default (most people shouldn't change it).
+SRC=/usr/src
+
+# Default MFS sizes for different types of the floppy. Again, most people
+# shouldn't change them unless they know what they are doing.
+
+DIAL_DFLT_SIZE=1600
+ROUTER_DFLT_SIZE=820
+NET_DFLT_SIZE=2100
+ISP_DFLT_SIZE=2100
+
+# SET THIS if you're building on 2.2.x system
+#
+# RELENG_2_2=yes
+
+# Path to srcdirs of special program for init(8) (standard if empty)
+INIT=
+
+# --------- YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW -----------
+# The "build" script will ask you for parameters. Just run it... :-)
+# --------- YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW -----------
+
+set -e
+
+# Build kernel with previously set parameters.
+
+build_kernel() {
+ echo ""
+ echo "-> We must make the PICOBSD${suffix}.${SIZE} kernel first..."
+ pwd=`pwd`
+ cat ../${TYPE}/conf/PICOBSD | grep -v "MFS_ROOT">${CONF}/PICOBSD${suffix}.${SIZE}
+ echo "options \"MFS_ROOT=${SIZE}\"" >>${CONF}/PICOBSD${suffix}.${SIZE}
+ cd ${CONF}
+ config PICOBSD${suffix}.${SIZE}
+ cd ../../compile/PICOBSD${suffix}.${SIZE}
+ make depend && make
+ cd ${pwd}
+}
+
+# Main build procedure. It calls other scripts (stage1-3 and populate)
+main() {
+
+if [ "${TYPE}" = "dial" ]
+then
+ suffix="-D"
+fi
+if [ "${TYPE}" = "net" ]
+then
+ suffix="-N"
+fi
+if [ "${TYPE}" = "isp" ]
+then
+ suffix="-I"
+fi
+if [ "${TYPE}" = "router" ]
+then
+ suffix="-R"
+fi
+
+CONF="${SRC}/sys/i386/conf"
+
+clear
+echo "-> Building with following parameters:"
+echo -n " Type: ${TYPE}"
+if [ "X${INIT}" != "X" ]
+then
+ echo " (using ${INIT} as init(8))"
+else
+ echo ""
+fi
+echo " MFS size: ${SIZE} kB"
+echo " Language: ${LANGUAGE}"
+echo ""
+echo "-> We'll use the sources living in ${SRC}"
+echo ""
+echo "-> I hope you have checked the ../${TYPE}/conf/PICOBSD config file..."
+echo ""
+echo ""
+sleep 2
+
+# Now check if we must build the kernel first
+
+if [ ! -f ${SRC}/sys/i386/conf/PICOBSD${suffix}.${SIZE} ]
+then
+ build_kernel
+elif [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel ]
+then
+ build_kernel
+fi
+
+export SIZE LANGUAGE TYPE SRC RELENG_2_2 INIT
+
+for i in stage1 populate stage2 stage3
+do
+ echo "====================== ${i} started ====================="
+ ./${i}
+ if [ "X$?" != "X0" ]
+ then
+ echo ""
+ echo "-> ERROR in \"${i}\" script. Aborting the build process."
+ echo -n "-> Cleaning temporary files... "
+ umount -f /mnt
+ vnconfig -u /dev/rvn0
+ ./clean ${TYPE}
+ echo "Done."
+ exit 10
+ else
+ echo "==================== ${i} completed ====================="
+ fi
+done
+}
+
+# Set the LANGUAGE variable
+
+set_lang() {
+ clear
+ echo " Language setup"
+ echo ""
+ echo "Language can be either 'en' (English - default) or 'pl' (Polish)"
+ echo ""
+ read -p "Enter the LANGUAGE (en, pl): " LANGUAGE
+ if [ "X${LANGUAGE}" = "X" ]
+ then
+ LANGUAGE=en
+ fi
+}
+
+# Set the INIT variable
+
+set_init() {
+ clear
+ echo " Choose your init(8) program"
+ echo ""
+ echo "You can choose either standard init(8) (which requires getty), or"
+ echo "you can choose 'oinit' from TinyWare collection."
+ echo ""
+ read -p "Enter the INIT (init, oinit): " INIT
+ if [ "X${INIT}" = "Xinit" ]
+ then
+ unset INIT
+ fi
+}
+
+# Set the default MFS size depending on the type of setup
+
+set_dflt_size() {
+ echo ""
+ if [ "X${TYPE}" = "X" ]
+ then
+ TYPE=dial
+ fi
+ echo "Setting default MFS size for \"${TYPE}\" type floppy."
+ if [ "X${TYPE}" = "Xdial" ]
+ then
+ SIZE=$DIAL_DFLT_SIZE
+ elif [ "X${TYPE}" = "Xnet" ]
+ then
+ SIZE=$NET_DFLT_SIZE
+ elif [ "X${TYPE}" = "Xrouter" ]
+ then
+ SIZE=$ROUTER_DFLT_SIZE
+ elif [ "X${TYPE}" = "Xisp" ]
+ then
+ SIZE=$ISP_DFLT_SIZE
+ else
+ echo "Unknown type of setup: \"${TYPE}\". Aborting..."
+ exit 10
+ fi
+}
+
+# Set MFS size interactively
+
+set_size() {
+ clear
+ echo " Memory Filesystem (MFS) Size setup"
+ echo ""
+ echo " Size can be anything decent (usually 1700 or 2500) in kB."
+ echo " NOTE1: you can also use other numbers (e.g. 1500, 1456, 1789 ...)"
+ echo " even much bigger (like 4567), but keep in mind that this memory is"
+ echo " totally lost to other programs. Usually you want to keep this as small as"
+ echo " possible."
+ echo ""
+ echo " NOTE2: for pre-canned setups there are specific requirements:"
+ echo " dial - requires at least SIZE=$DIAL_DFLT_SIZE"
+ echo " router - requires at least SIZE=$ROUTER_DFLT_SIZE (500kB less without SNMP)"
+ echo " net - requires at least SIZE=$NET_DFLT_SIZE (500kB less without SNMP)"
+ echo " isp - requires at least SIZE=$ISP_DFLT_SIZE (500kB less without SNMP)"
+ echo ""
+ echo " The last two configurations are not likely to run reliably on machines"
+ echo " with less than 10MB of RAM, while the 'dial' is tested and proved to run"
+ echo " as many as ~30 processes on 10 consoles with only 8MB RAM. YMMV."
+ echo ""
+ read -p "Enter the SIZE in kB: " SIZE
+ if [ "X${SIZE}" = "X" ]
+ then
+ set_dflt_size
+ fi
+}
+
+# Set type of floppy interactively
+
+set_type() {
+ clear
+ echo " Setup the type of configuration"
+ echo ""
+
+ echo " Type can be either 'dial', 'router', 'net' or 'isp'. There are four"
+ echo " sets of configuration files in subdirs ../dial, ../router, ../net"
+ echo " and ../isp respectively - the contents of the floppy is constructed"
+ echo " basing on the Makefiles and scripts in them."
+ echo ""
+ echo " E.g. if you define TYPE=dial, you'll end up having a floppy which is"
+ echo " suitable for dialup access and not much else. If you define TYPE=net,"
+ echo " you'll have a small router-fixit-like floppy, which lacks most"
+ echo " interactive tools. TYPE=isp gives you a dialin server floppy."
+ echo ""
+ read -p "Enter the TYPE of the floppy (dial, net, router, isp): " TYPE
+ if [ "X${TYPE}" = "X" ]
+ then
+ TYPE=dial
+ fi
+ if [ "X${TYPE}" = "Xrouter" ]
+ then
+ INIT=oinit
+ fi
+ if [ "X${TYPE}" = "Xdial" -a "X${INIT}" = "X" ]
+ then
+ set_init
+ fi
+
+ set_dflt_size
+}
+
+put_title() {
+ clear
+ echo " Building the PicoBSD v. 0.4 floppy"
+ echo "============================================================================"
+ echo ""
+}
+
+
+#-------------------------------------------------------------------
+# Main entry of the script
+
+# If $1="package", it creates a neat set of floppies
+
+if [ X"$1" = X"package" ]
+then
+ touch build.status
+ echo "##############################################" >>build.status
+ echo "## `date` ">>build.status
+ echo "##############################################" >>build.status
+ ./clean dial
+ for y in en pl
+ do
+ for z in dial router net isp
+ do
+ TYPE=${z}
+ LANGUAGE=${y}
+ set_dflt_size
+ echo "---------------------------------------------">>build.status
+ echo "Building TYPE=${z}, LANGUAGE=${y}, SIZE=${SIZE}" >>build.status
+ export TYPE SIZE LANGUAGE SRC RELENG_2_2 INIT
+ main
+ if [ "X$?" != "X0" ]
+ then
+ echo " ** FAILED! **">>build.status
+ else
+ echo " (ok)">>build.status
+ fi
+ mv picobsd.bin pb_${y}${suffix}.bin
+ echo "Calling ./clean for ${TYPE}, ${LANGUAGE}, ${SIZE}">>build.status
+ ./clean ${TYPE}
+ done
+ done
+ exit 0
+fi
+
+# Set build parameters interactively
+
+TYPE=dial
+LANGUAGE=en
+set_dflt_size
+while [ "X${ans}" != "Xn" ]
+do
+ put_title
+ echo "Current build parameters are as follows:"
+ echo ""
+ echo " 1. Type: ${TYPE}"
+ if [ "X${INIT}" != "X" ]
+ then
+ echo " a. (using ${INIT} as init(8))"
+ else
+ echo " a. (using stock init as init(8))"
+ fi
+ echo ""
+ echo " 2. MFS size: ${SIZE} kB"
+ echo " 3. Language: ${LANGUAGE}"
+ echo ""
+ echo "Which parameter would you like to change?"
+ read -p "(1, a, 2, 3; n -no change, build it ; q -quit): " ans
+ case ${ans} in
+ 1) set_type
+ clear
+ ;;
+ a) set_init
+ clear
+ ;;
+ 2) set_size
+ clear
+ ;;
+ 3) set_lang
+ clear
+ ;;
+ q) echo ""
+ echo "Hey! Don't give up so quickly. Quitting for now..."
+ echo ""
+ exit 0
+ ;;
+ n) ;;
+ *) echo "Unknown option \"${ans}\". Try again."
+ sleep 2
+ clear
+ ;;
+ esac
+done
+# Export the parameters
+export LANGUAGE SIZE TYPE SRC RELENG_2_2 INIT
+# Call the build procedure
+main
+# Install if it's ok.
+echo ""
+if [ "X$?" = "X0" ]
+then
+ echo "The build process was completed successfuly."
+ echo ""
+ echo "Now we are going to install the image on the floppy."
+ ./install
+fi
+exit 0
diff --git a/release/picobsd/build/clean b/release/picobsd/build/clean
new file mode 100755
index 0000000..d02371b
--- /dev/null
+++ b/release/picobsd/build/clean
@@ -0,0 +1,34 @@
+#! /bin/sh -
+
+#
+# $Id: clean,v 1.7 1998/08/19 07:05:23 abial Exp $
+#
+set -e
+
+if [ $# -lt 1 ]
+then
+ echo "What to clean? Possible targets are 'dial', 'net', 'isp', 'router' or 'all'"
+ exit 1
+fi
+
+if [ "$1" = "all" ]
+then
+ list="dial net isp router"
+else
+ list=$1
+fi
+
+rm -f kernel kernel.kz fs.PICOBSD picobsd.bin *.o *core *.db
+rm -f picobsd.bin
+rm -f build.status
+cd ..
+for j in $list
+do
+ echo "===================== $0 $j started ======================"
+ for i in `ls -d tinyware/[a-z]*` tools/write_mfs_in_kernel tools/dumpnlist ${j}/crunch1
+ do
+ (cd ${i} && make clean && rm -f .depend)
+ done
+
+ echo "=============== $0 $j completed successfuly =============="
+done
diff --git a/release/picobsd/build/install b/release/picobsd/build/install
new file mode 100755
index 0000000..98f3e56
--- /dev/null
+++ b/release/picobsd/build/install
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+#
+# $Id: install,v 1.3 1998/08/02 01:04:37 abial Exp $
+#
+
+echo "Please insert a blank floppy in /dev/fd0."
+echo "WARNING: the contents of the floppy will be permanently erased!"
+echo "Press ^C to abort, Enter to continue."
+read junk
+
+echo "Writing picobsd.bin..."
+dd if=picobsd.bin of=/dev/rfd0
+echo "Done."
diff --git a/release/picobsd/build/populate b/release/picobsd/build/populate
new file mode 100755
index 0000000..6850e4d
--- /dev/null
+++ b/release/picobsd/build/populate
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# $Id: populate,v 1.6 1998/08/12 13:04:24 abial Exp $
+#
+
+pwd=`pwd`
+
+echo "-> Populating MFS tree..."
+cd ../${TYPE}/mfs.tree
+make
+if [ X"${RELENG_2_2}" != X"" ]
+then
+ make devnodes
+fi
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while making \"${TYPE}\" hierarchy in /mnt..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+if [ "${TYPE}" = "router" ]
+then
+ cp ../lang/mfs.rc.${LANGUAGE} /mnt/etc/oinit.rc
+else
+ cp ../lang/mfs.rc.${LANGUAGE} /mnt/etc/rc
+ cp login.conf /mnt/etc/login.conf
+ cp ../lang/reboot.${LANGUAGE} /mnt/stand/reboot
+ ln -f /mnt/stand/reboot /mnt/stand/shutdown
+ cp ../lang/README.${LANGUAGE} /mnt/README
+fi
+cp ../lang/update.${LANGUAGE} /mnt/stand/update
+if [ "${TYPE}" = "dial" ]
+then
+ cp ../lang/login.${LANGUAGE} /mnt/stand/login
+ cp ../lang/dialup.${LANGUAGE} /mnt/stand/dialup
+ (cd ../../help; for i in `ls *.hlp.${LANGUAGE}`;\
+ do \
+ cp $i /mnt/help/`basename $i .${LANGUAGE}`;\
+ done)
+elif [ "${TYPE}" != "router" ]
+then
+ cp ../../build/kvm_kernel.db /mnt/var/db/kvm_kernel.db
+ rm ../../build/kvm_kernel.db
+fi
+
+echo "-> Making and installing crunch1..."
+cd ../crunch1
+make "SRC=${SRC}" && make install 2>&1 >/dev/null
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while building ../${TYPE}/crunch1..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+cd ${pwd}
+
+echo "-> Preparing kernel symbols list..."
+if [ ! -f ../tools/dumpnlist/dumpnlist ]
+then
+ (cd ../tools/dumpnlist; make)
+fi
+../tools/dumpnlist/dumpnlist ./kernel >/mnt/stand/symbols
+
+echo "-> Preparing kernel config list..."
+if [ ! -f ../tinyware/kget/kget ]
+then
+ (cd ../tinyware/kget; make)
+fi
+../tinyware/kget/kget ./kernel /mnt/stand/vanilla
+(echo "-> Fixing permissions"; cd /mnt; chown -R root *)
diff --git a/release/picobsd/build/stage1 b/release/picobsd/build/stage1
new file mode 100755
index 0000000..a95fb01
--- /dev/null
+++ b/release/picobsd/build/stage1
@@ -0,0 +1,102 @@
+#! /bin/sh -
+
+#
+# $Id: stage1,v 1.4 1998/08/10 19:06:48 abial Exp $
+#
+
+set -e
+
+if [ "${TYPE}" = "dial" ]
+then
+ suffix="-D"
+fi
+if [ "${TYPE}" = "net" ]
+then
+ suffix="-N"
+fi
+if [ "${TYPE}" = "isp" ]
+then
+ suffix="-I"
+fi
+if [ "${TYPE}" = "router" ]
+then
+ suffix="-R"
+fi
+
+if [ ! -f ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel ]; then
+ echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} first"
+ exit 1
+fi
+
+echo "-> Preparing kernel..."
+cp -p ${SRC}/sys/compile/PICOBSD${suffix}.${SIZE}/kernel kernel
+if [ "${TYPE}" != "dial" ]
+then
+ echo "-> Preparing kvm database..."
+ mv /var/db/kvm_kernel.db /var/db/old.db
+ kvm_mkdb kernel
+ cp /var/db/kvm_kernel.db kvm_kernel.db
+ mv /var/db/old.db /var/db/kvm_kernel.db
+fi
+
+echo "-> Preparing MFS filesystem..."
+umount /dev/vn0 2> /dev/null || true
+umount /mnt 2> /dev/null || true
+vnconfig -u /dev/rvn0 2> /dev/null || true
+
+dd of=fs.PICOBSD if=/dev/zero count=${SIZE} bs=1k 2> /dev/null
+
+awk 'BEGIN {printf "%c%c", 85, 170}' | \
+ dd of=fs.PICOBSD obs=1 seek=510 conv=notrunc 2> /dev/null
+
+vnconfig -s labels -c /dev/rvn0 fs.PICOBSD 2>/dev/null
+#vnconfig -c /dev/rvn0 fs.PICOBSD 2>/dev/null
+if [ "X$?" != "X0" ]
+then
+ echo "-> Error while doing vnconfig of fs.PICOBSD on /dev/rvn0..."
+ echo " Most probably your running kernel doesn't have the vn(4) device."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+dd if=/usr/mdec/boot1 of=fs.PICOBSD conv=notrunc 2> /dev/null
+
+# This command does weird things on 2.2.x systems. In such case use normal
+# disktype here instead
+if [ "${TYPE}" != "router" ]
+then
+ disklabel -rw vn0 auto
+else
+ disklabel -rw /dev/rvn0 fd820
+fi
+if [ "X$?" != "X0" ]
+then
+ echo "-> Error while labeling fs.PICOBSD (vn0)..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+# You can save some space on MFS if you don't want so many inodes...
+if [ "${TYPE}" = "dial" ]
+then
+ newfs -i 10240 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
+fi
+if [ "${TYPE}" = "router" ]
+then
+ newfs -i 12000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
+fi
+if [ "${TYPE}" = "net" ]
+then
+ newfs -i 16000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
+fi
+if [ "${TYPE}" = "isp" ]
+then
+ newfs -i 15000 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
+fi
+mount /dev/vn0c /mnt
+if [ "X$?" != "X0" ]
+then
+ echo "-> Error while mounting fs.PICOBSD (/dev/vn0c) on /mnt..."
+ echo "-> Aborting $0"
+ exit 10
+fi
diff --git a/release/picobsd/build/stage2 b/release/picobsd/build/stage2
new file mode 100755
index 0000000..72426cb
--- /dev/null
+++ b/release/picobsd/build/stage2
@@ -0,0 +1,40 @@
+#! /bin/sh -
+
+#
+# $Id: stage2,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $
+#
+set -e
+
+if [ "${TYPE}" = "dial" ]
+then
+ suffix="-D"
+fi
+if [ "${TYPE}" = "net" ]
+then
+ suffix="-N"
+fi
+if [ "${TYPE}" = "isp" ]
+then
+ suffix="-I"
+fi
+
+
+if [ ! -f kernel ]; then
+ echo "-> ERROR: you must build PICOBSD${suffix}.${SIZE} kernel first"
+ exit 1
+fi
+
+echo "-> Preparing kernel with MFS filesystem inside..."
+df -ik /mnt
+umount /mnt 2>&1 >/dev/null
+fsck -p /dev/rvn0c
+vnconfig -u /dev/rvn0 2>&1 >/dev/null
+
+if [ ! -f ../tools/write_mfs_in_kernel/wmik ]; then
+ (cd ../tools/write_mfs_in_kernel; make)
+fi
+
+../tools/write_mfs_in_kernel/wmik kernel fs.PICOBSD
+kzip -v kernel
+rm fs.PICOBSD
+rm kernel
diff --git a/release/picobsd/build/stage3 b/release/picobsd/build/stage3
new file mode 100755
index 0000000..c4ebf4c
--- /dev/null
+++ b/release/picobsd/build/stage3
@@ -0,0 +1,91 @@
+#! /bin/sh -
+
+#
+# $Id: stage3,v 1.4 1998/08/10 19:06:48 abial Exp $
+#
+set -e
+
+if [ ! -f kernel.kz ]; then
+ echo "-> ERROR: you must build kernel.kz first"
+ exit 1
+fi
+
+echo "-> Preparing 1.44 floppy filesystem..."
+umount /dev/vn0 2> /dev/null || true
+umount /mnt 2> /dev/null || true
+vnconfig -u /dev/rvn0 2> /dev/null || true
+
+dd of=picobsd.bin if=/dev/zero count=1440 bs=1k 2> /dev/null
+
+awk 'BEGIN {printf "%c%c", 85, 170}' | \
+ dd of=picobsd.bin obs=1 seek=510 conv=notrunc 2> /dev/null
+
+#vnconfig -s labels -c /dev/rvn0 picobsd.bin 2>/dev/null
+vnconfig -c /dev/rvn0 picobsd.bin 2>/dev/null
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while doing vnconfig of picobsd.bin on /dev/rvn0..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+dd if=/usr/mdec/boot1 of=picobsd.bin conv=notrunc 2> /dev/null
+
+disklabel -Brw -b /usr/mdec/fdboot -s /usr/mdec/bootfd /dev/rvn0 fd1440 2>&1 >/dev/null
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while labeling picobsd.bin on /dev/rvn0..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+newfs -i 32768 -m 0 -p 0 -o space /dev/rvn0c 2>&1 >/dev/null
+
+mount /dev/vn0c /mnt
+
+pwd=`pwd`
+
+cd ../${TYPE}/floppy.tree
+echo "-> Copying language dependent files..."
+for i in hosts motd rc resolv.conf
+do
+ cp ../lang/${i}.${LANGUAGE} etc/${i}
+done
+if [ "${TYPE}" != "router" ]
+then
+ cp ../lang/rc.conf.${LANGUAGE} etc/rc.conf
+ cp ../lang/rc.network.${LANGUAGE} etc/rc.network
+fi
+
+echo "-> Populating floppy filesystem..."
+cp ../lang/boot.help.${LANGUAGE} /mnt/boot.help
+cp -pr . /mnt
+if [ "${TYPE}" = "dial" ]
+then
+ pwd_mkdb -d etc/ etc/master.passwd
+ mv etc/spwd.db /mnt/etc/
+ rm etc/pwd.db
+fi
+
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while transferring ../${TYPE}/floppy.tree to /mnt..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+
+cd ${pwd}
+cp kernel.kz /mnt/kernel
+if [ "X$?" != "X0" ]
+then
+ echo "-> ERROR while transferring kernel.kz to /mnt..."
+ echo "-> Aborting $0"
+ exit 10
+fi
+(echo "-> Fixing permissions"; cd /mnt; chown -R root *)
+rm kernel.kz
+
+df -ik /mnt
+
+umount /mnt
+vnconfig -u /dev/rvn0
diff --git a/release/picobsd/dial/conf/PICOBSD b/release/picobsd/dial/conf/PICOBSD
new file mode 100644
index 0000000..2c07ad5
--- /dev/null
+++ b/release/picobsd/dial/conf/PICOBSD
@@ -0,0 +1,85 @@
+#
+# $Id: PICOBSD,v 1.4 1998/08/02 12:19:29 abial Exp $
+#
+machine "i386"
+cpu "I386_CPU"
+cpu "I486_CPU"
+cpu "I586_CPU"
+cpu "I686_CPU"
+ident PICOBSD
+maxusers 3
+
+options MATH_EMULATE #Support for x87 emulation
+options INET #InterNETworking
+options FFS #Berkeley Fast Filesystem
+options MFS
+options MSDOSFS #MSDOS Filesystem
+options "CD9660" #ISO 9660 Filesystem
+options "EXT2FS"
+options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
+options USERCONFIG #boot -c editor
+options VISUAL_USERCONFIG #visual boot -c editor
+options USERCONFIG_BOOT #imply -c and parse info area
+options DEVFS
+options SLICE
+options PCI_QUIET
+options NO_SWAPPING
+
+config kernel root on fd0
+
+controller isa0
+controller pci0
+
+controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+disk fd0 at fdc0 drive 0
+disk fd1 at fdc0 drive 1
+
+options "CMD640" # work around CMD640 chip deficiency
+controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
+disk wd0 at wdc0 drive 0
+disk wd1 at wdc0 drive 1
+
+controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr
+disk wd2 at wdc1 drive 0
+disk wd3 at wdc1 drive 1
+
+options ATAPI #Enable ATAPI support for IDE bus
+options ATAPI_STATIC #Don't do it as an LKM
+device wcd0 #IDE CD-ROM
+
+# syscons is the default console driver, resembling an SCO console
+device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
+
+device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
+
+device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr
+device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
+device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr
+device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr
+
+device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
+
+# Order is important here due to intrusive probes, do *not* alphabetize
+# this list of network interfaces until the probes have been fixed.
+# Right now it appears that the ie0 must be probed before ep0. See
+# revision 1.20 of this file.
+device de0
+#device de1
+device fxp0
+
+device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr
+#device ed1 at isa? port 0x300 net irq 5 iomem 0xd0000 vector edintr
+device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector ieintr
+device ep0 at isa? port 0x300 net irq 10 vector epintr
+#device ex0 at isa? port? net irq? vector exintr
+#device fe0 at isa? port 0x300 net irq ? vector feintr
+device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
+device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zeintr
+#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
+
+pseudo-device loop
+pseudo-device ether
+pseudo-device tun 1
+pseudo-device pty 16
+pseudo-device gzip # Exec gzipped a.out's
diff --git a/release/picobsd/dial/crunch1/Makefile b/release/picobsd/dial/crunch1/Makefile
new file mode 100644
index 0000000..467850d
--- /dev/null
+++ b/release/picobsd/dial/crunch1/Makefile
@@ -0,0 +1,40 @@
+#
+# $Id: Makefile,v 1.4 1998/08/10 19:38:39 abial Exp $
+#
+NOCRYPT?= yes
+SRC?=/usr/src
+
+all: crunch
+
+crunch:
+ if [ "X${INIT}" != "X" ]; \
+ then \
+ echo "progs ${INIT}" >crunch1.conf ; \
+ else \
+ echo "progs init getty" >crunch1.conf ; \
+ fi;
+ @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >>crunch1.conf
+ @crunchgen ${.CURDIR}/crunch1.conf
+ @${MAKE} -f crunch1.mk all NOCRYPT=${NOCRYPT} \
+ "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY" 2>&1 >/dev/null
+
+clean:
+ rm -f *.o *.stub *.lo *_stub.c *.mk \
+ crunch.cache \
+ crunch.mk \
+ crunch.c \
+ crunch \
+ crunch1* \
+ .tmp_* \
+ *.gz
+
+install:
+ cp crunch1 /mnt/stand/crunch
+ chmod 555 /mnt/stand/crunch
+ for i in `crunchgen -l crunch1.conf` ; \
+ do \
+ ln /mnt/stand/crunch /mnt/stand/$${i}; \
+ done
+ rm /mnt/stand/crunch
+
+.include <bsd.prog.mk>
diff --git a/release/picobsd/dial/crunch1/crunch.conf b/release/picobsd/dial/crunch1/crunch.conf
new file mode 100644
index 0000000..aedb560
--- /dev/null
+++ b/release/picobsd/dial/crunch1/crunch.conf
@@ -0,0 +1,55 @@
+# $Id: crunch.conf,v 1.6 1998/08/02 12:19:49 abial Exp $
+#
+# NOTE1: the string "/usr/src" will be automatically replaced with the
+# correct value set in 'build' script - you should change it there
+#
+# NOTE2: use of init(8) is now optional (selectable in "build" script).
+# See Makefile for details on how it's added here - you shouldn't add it
+# manually here...
+
+# source dir for SSH.
+# * You have to configure and build the port
+# * Then you have to make a symlink:
+# cd /usr/ports/security/ssh/work/
+# ln -s ssh-1.2.21 ssh
+# * Then you have to add OBJS=${SSH_OBJS} in the Makefile (somewhere around
+# line 290)
+srcdirs /usr/ports/security/ssh/work/
+
+# ash, kget etc...
+srcdirs ../../tinyware
+
+# other sources
+srcdirs /usr/src/bin
+srcdirs /usr/src/sbin/i386
+srcdirs /usr/src/sbin
+srcdirs /usr/src/usr.bin
+srcdirs /usr/src/gnu/usr.bin
+srcdirs /usr/src/usr.sbin
+srcdirs /usr/src/libexec
+
+progs ppp ssh ftp telnet ee gzip more
+ln gzip gunzip
+ln gzip zcat
+
+progs ash test kget echo pwd
+progs hostname cat kill sps vm ns
+progs chmod chown help
+progs cp df fsck ping mv ln traceroute
+progs ifconfig kbdcontrol moused
+progs ls mkdir mount mount_msdos mount_cd9660 mount_ext2fs
+progs rm route sysctl umount
+progs vidcontrol
+ln ash sh
+ln ash -sh
+ln test [
+ln sps ps
+ln ns netstat
+ln mount_msdos msdos
+ln mount_cd9660 cd9660
+ln mount_ext2fs ext2fs
+ln chown chgrp
+
+libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lgnuregex -lmp -lgmp -lm
+libs -lncurses -lmytinfo -lipx -lz
+libs -ltermcap -ltelnet -lalias
diff --git a/release/picobsd/dial/floppy.tree/boot.config b/release/picobsd/dial/floppy.tree/boot.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/boot.config
diff --git a/release/picobsd/dial/floppy.tree/etc/fstab b/release/picobsd/dial/floppy.tree/etc/fstab
new file mode 100644
index 0000000..64d34ca
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/fstab
@@ -0,0 +1,4 @@
+#proc /proc procfs rw 0 0
+#/dev/fd0c /start_floppy ufs rw 1 1
+#/dev/wd0s1 /dos msdos rw 0 0
+#/dev/wcd0c /cdrom cd9660 ro,noauto 0 0
diff --git a/release/picobsd/dial/floppy.tree/etc/gettytab b/release/picobsd/dial/floppy.tree/etc/gettytab
new file mode 100644
index 0000000..612c875
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/gettytab
@@ -0,0 +1,40 @@
+# from: @(#)gettytab 5.14 (Berkeley) 3/27/91
+#
+default:\
+ :cb:ce:ck:lc:fd#1000:cl:im=\r\n PicoBSD (%h) (%t) \r\n\r\n:sp#1200:
+
+P|Pc|Pc console:\
+ :ht:np:sp#115200:
+
+#
+# Fixed speed entries
+2|std.9600|9600-baud:\
+ :np:sp#9600:
+g|std.19200|19200-baud:\
+ :np:sp#19200:
+std.38400|38400-baud:\
+ :np:sp#38400:
+std.57600|57600-baud:\
+ :np:sp#57600:
+std.115200|115200-baud:\
+ :np:sp#115200:
+
+#
+# Entry specifying explicit device settings. See termios(4) and
+# /usr/include/termios.h, too. The entry forces the tty into
+# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control.
+#
+# cflags: CLOCAL | HUPCL | CREAD | CS8
+# oflags: OPOST | ONLCR | OXTABS
+# iflags: IXOFF | IXON | ICRNL | IGNPAR
+# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE
+#
+# The `0' flags don't have input enabled. The `1' flags don't echo.
+# (Echoing is done inside getty itself.)
+#
+local.9600|CLOCAL tty @ 9600 Bd:\
+ :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\
+ :o0#0x00000007:o1#0x00000002:o2#0x00000007:\
+ :i0#0x00000704:i1#0x00000000:i2#0x00000704:\
+ :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\
+ :sp#9600:
diff --git a/release/picobsd/dial/floppy.tree/etc/group b/release/picobsd/dial/floppy.tree/etc/group
new file mode 100644
index 0000000..abbd733
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/group
@@ -0,0 +1,19 @@
+wheel:*:0:root,user
+daemon:*:1:daemon
+kmem:*:2:root
+sys:*:3:root
+tty:*:4:root
+operator:*:5:root
+mail:*:6:
+bin:*:7:
+news:*:8:
+man:*:9:
+games:*:13:
+staff:*:20:root,user
+guest:*:31:root
+uucp:*:66:
+xten:*:67:xten
+dialer:*:68:
+network:*:69:
+nogroup:*:65533:
+nobody:*:65534:
diff --git a/release/picobsd/dial/floppy.tree/etc/host.conf b/release/picobsd/dial/floppy.tree/etc/host.conf
new file mode 100644
index 0000000..8418e14
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/host.conf
@@ -0,0 +1,3 @@
+# $Id: host.conf,v 1.1.1.1 1998/07/14 07:30:41 abial Exp $
+hosts
+bind
diff --git a/release/picobsd/dial/floppy.tree/etc/login.conf b/release/picobsd/dial/floppy.tree/etc/login.conf
new file mode 100644
index 0000000..97ea6e8
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/login.conf
@@ -0,0 +1,120 @@
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+#
+# $Id: login.conf,v 1.1.1.1 1998/07/14 07:30:41 abial Exp $
+#
+
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=passwd:
+
+auth-root-defaults:\
+ :auth-login=passwd:\
+ :auth-rlogin=passwd:\
+
+auth-ftp-defaults:\
+ :auth=passwd:
+
+# Example defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+
+#
+# standard - standard user defaults
+#
+standard:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,EDITOR=/usr/bin/ee:\
+ :path=~/bin /bin /usr/bin:\
+ :nologin=/etc/nologin:\
+ :cputime=1h30m:\
+ :datasize=8M:\
+ :stacksize=2M:\
+ :memorylocked=4M:\
+ :memoryuse=8M:\
+ :filesize=8M:\
+ :coredumpsize=8M:\
+ :openfiles=24:\
+ :maxproc=32:\
+ :priority=0:\
+ :requirehome:\
+ :passwordperiod=90d:\
+ :umask=002:\
+ :ignoretime@:\
+ :tc=default:
+#
+# Staff users - few restrictions and allow login anytime
+#
+staff:\
+ :ignorenologin:\
+ :ignoretime:\
+ :requirehome@:\
+ :accounted@:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :umask=022:\
+ :tc=standard:
+
+
+#
+# root - fallback for root logins
+#
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:\
+#
+# Settings used by /etc/rc
+#
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
+#
+# Polish Users Accounts. Setup proper environment variables.
+#
+polish:Polish Users Accounts:\
+ :lang=pl_pl.ISO-8859-2:\
+ :tc=default:
diff --git a/release/picobsd/dial/floppy.tree/etc/master.passwd b/release/picobsd/dial/floppy.tree/etc/master.passwd
new file mode 100644
index 0000000..9d85cdf
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/master.passwd
@@ -0,0 +1,7 @@
+root:$1$xOOaGnKU$U9QdsCI40XXcCUMBN.7Az.:0:0::0:0:Charlie &:/root:/bin/sh
+toor:*:0:0::0:0:Bourne-again Superuser:/root:
+daemon:*:1:1::0:0:Owner of many system processes:/root:/nonexistent
+operator:*:2:20::0:0:System &:/usr/guest/operator:/bin/csh
+bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/nonexistent
+nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/nonexistent
+user:$1$T9q8Coad$WatJttamwr2UAdbfKbWxj.:1002:1002:polish:0:0:user:/home/user:/bin/sh
diff --git a/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf
new file mode 100644
index 0000000..a25854d
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf
@@ -0,0 +1,9 @@
+# $Id: ppp.conf,v 1.2 1998/07/16 23:28:02 abial Exp $
+#
+# PPP Sample Configuration File
+default:
+ set speed 38400
+ disable lqr
+ deny lqr
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
+
diff --git a/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf.template b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf.template
new file mode 100644
index 0000000..0856c69
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.conf.template
@@ -0,0 +1,10 @@
+#
+# $Id: ppp.conf.template,v 1.2 1998/07/16 23:28:02 abial Exp $
+# PPP Sample Configuration File
+#
+default:
+ set speed 38400
+ disable lqr
+ deny lqr
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
+
diff --git a/release/picobsd/dial/floppy.tree/etc/ppp/ppp.deny b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.deny
new file mode 100644
index 0000000..51e1e9b
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.deny
@@ -0,0 +1,15 @@
+# list of users disallowed any pppd access via 'system
+# password login'.
+# read by pppd(8).
+root
+toor
+daemon
+operator
+bin
+games
+news
+man
+ftp
+uucp
+xten
+ingres
diff --git a/release/picobsd/dial/floppy.tree/etc/ppp/ppp.linkup b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.linkup
new file mode 100644
index 0000000..8a9d900
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.linkup
@@ -0,0 +1,6 @@
+# Example of ppp.linkup file
+#
+# Otherwise, simply add peer as default gateway.
+#
+MYADDR:
+ add 0 0 HISADDR
diff --git a/release/picobsd/dial/floppy.tree/etc/ppp/ppp.secret.sample b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.secret.sample
new file mode 100644
index 0000000..7e8ee67
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ppp/ppp.secret.sample
@@ -0,0 +1,23 @@
+##################################################
+#
+# Example of ppp.secret file
+#
+# This file is used to authenticate incoming connections.
+# You must ``enable'' either PAP or CHAP in your ppp.conf file.
+# The peer may then use any of the Authname/Authkey pairs listed.
+# If an IP address is given, it will be assigned to the peer.
+#
+# If an entry exists for your local machine (as given by the
+# ``hostname -s'' command), the password specified will be
+# required for all server socket connections. Refer to the ppp(8)
+# and pppctl(8) man pages for further details.
+#
+# $Id: ppp.secret.sample,v 1.1.1.1 1998/07/14 07:30:41 abial Exp $
+#
+##################################################
+
+# Authname Authkey Peer's IP address
+
+oscar OurSecretKey 192.244.184.34/24
+BigBird X4dWg9327 192.244.184.33/32
+tama localPasswdForControl
diff --git a/release/picobsd/dial/floppy.tree/etc/profile b/release/picobsd/dial/floppy.tree/etc/profile
new file mode 100644
index 0000000..b0aa3b2
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/profile
@@ -0,0 +1,4 @@
+# System-wide .profile file for sh(1).
+BLOCKSIZE=K; export BLOCKSIZE
+PATH=/stand:.; export PATH
+set -o emacs
diff --git a/release/picobsd/dial/floppy.tree/etc/protocols b/release/picobsd/dial/floppy.tree/etc/protocols
new file mode 100644
index 0000000..c80be39
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/protocols
@@ -0,0 +1,7 @@
+#
+# Internet (IP) protocols
+ip 0 IP # internet protocol, pseudo protocol number
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+tcp 6 TCP # transmission control protocol
+udp 17 UDP # user datagram protocol
diff --git a/release/picobsd/dial/floppy.tree/etc/rc.network b/release/picobsd/dial/floppy.tree/etc/rc.network
new file mode 100644
index 0000000..7254f28
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/rc.network
@@ -0,0 +1,70 @@
+#!/bin/sh -
+# $Id: rc.network,v 1.7 1998/08/19 07:06:13 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/dial/floppy.tree/etc/resolv.conf b/release/picobsd/dial/floppy.tree/etc/resolv.conf
new file mode 100644
index 0000000..e0de67e
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/resolv.conf
@@ -0,0 +1,3 @@
+# $Id: resolv.conf,v 1.7 1998/08/19 07:06:13 abial Exp $
+domain mydomain.org.pl
+nameserver 194.204.159.1
diff --git a/release/picobsd/dial/floppy.tree/etc/services b/release/picobsd/dial/floppy.tree/etc/services
new file mode 100644
index 0000000..817b6d3
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/services
@@ -0,0 +1,93 @@
+echo 4/ddp
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+systat 11/tcp
+systat 11/udp
+daytime 13/tcp
+daytime 13/udp
+qotd 17/tcp
+qotd 17/udp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp-data 20/udp
+ftp 21/tcp
+ftp 21/udp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+telnet 23/udp
+smtp 25/tcp
+smtp 25/udp
+time 37/tcp
+time 37/udp
+domain 53/tcp
+domain 53/udp
+tacacs-ds 65/tcp
+tacacs-ds 65/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/tcp
+tftp 69/udp
+gopher 70/tcp
+gopher 70/udp
+finger 79/tcp
+finger 79/udp
+http 80/tcp
+http 80/udp
+pop2 109/tcp
+pop2 109/udp
+pop3 110/tcp
+pop3 110/udp
+uucp-path 117/tcp
+uucp-path 117/udp
+nntp 119/tcp
+nntp 119/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap 143/tcp
+imap 143/udp
+snmp 161/tcp
+snmp 161/udp
+snmptrap 162/tcp
+snmptrap 162/udp
+bgp 179/tcp
+bgp 179/udp
+irc 194/tcp
+irc 194/udp
+ipx 213/tcp
+ipx 213/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+netware-ip 396/tcp
+netware-ip 396/udp
+https 443/tcp
+https 443/udp
+exec 512/tcp
+biff 512/udp
+login 513/tcp
+who 513/udp
+cmd 514/tcp
+syslog 514/udp
+printer 515/tcp
+printer 515/udp
+talk 517/tcp
+talk 517/udp
+ntalk 518/tcp
+ntalk 518/udp
+timed 525/tcp
+timed 525/udp
+uucp 540/tcp
+uucp 540/udp
+uucp-rlogin 541/tcp
+uucp-rlogin 541/udp
diff --git a/release/picobsd/dial/floppy.tree/etc/ssh_config b/release/picobsd/dial/floppy.tree/etc/ssh_config
new file mode 100644
index 0000000..6e1694c
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ssh_config
@@ -0,0 +1,2 @@
+Host *
+FallBackToRsh no
diff --git a/release/picobsd/dial/floppy.tree/etc/termcap b/release/picobsd/dial/floppy.tree/etc/termcap
new file mode 100644
index 0000000..5a9316a
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/termcap
@@ -0,0 +1,123 @@
+# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
+# All rights reserved.
+# @(#)termcap.src 5.88 (Berkeley) 4/30/91
+#
+#
+# for syscons
+# common entry without semigraphics
+cons25w|ansiw|ansi80x25-raw:\
+ :al=\E[L:am:bs:NP:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:co#80:\
+ :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:cb=\E[1K:\
+ :ms:nd=\E[C:pt:rs=\E[x\E[m\Ec:so=\E[7m:se=\E[m:up=\E[A:\
+ :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[37;40m:\
+ :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\
+ :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\
+ :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:eo:sf=\E[S:sr=\E[T:\
+ :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\E[K:kB=\E[Z:\
+ :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\
+ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:bw:\
+ :mb=\E[5m:md=\E[1m:mh=\E[30;1m:mr=\E[7m:me=\E[m:bl=^G:ut:it#8:
+cons25|ansis|ansi80x25:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :tc=cons25w:
+cons25-m|ansis-mono|ansi80x25-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25:
+cons50|ansil|ansi80x50:\
+ :li#50:tc=cons25:
+cons50-m|ansil-mono|ansi80x50-mono:\
+ :li#50:tc=cons25-m:
+# 80x25 ISO 8859-1 FreeBSD console
+cons25l1|cons25-iso8859-1:\
+ :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237.^Y-^X+\253,\273I\247y\232z\233:\
+ :tc=cons25w:
+cons25l1-m|cons25-iso8859-1-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25l1:
+# 80x50 ISO 8859-1 FreeBSD console
+cons50l1|cons50-iso8859-1:\
+ :li#50:tc=cons25l1:
+cons50l1-m|cons50-iso8859-1-mono:\
+ :li#50:tc=cons25l1-m:
+dosansi|ANSI.SYS standard crt|ansi:\
+ :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\
+ :do=\E[B:li#25:mi:nd=\E[C:\
+ :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\
+ :md=\E[1m:mh=\E[m:mb=\E[5m:me=\E[m:\
+ :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\
+ :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\
+ :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED:
+
+# Note: this entry describes the "native"
+# capabilities of the PC monochrome display, without ANY emulation; most
+# communications packages (but NOT PC/IX connect) do some kind of emulation.
+pc|ibmpc|ibm pc PC/IX:\
+ :li#24:co#80:am:bs:bw:eo:\
+ :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\
+ :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:
+pc3mono|IBM PC 386BSD Console with monochrome monitor:\
+ :so=\E[0;1r\E[m:tc=pc3:
+pc3|ibmpc3|IBM PC 386BSD Console:\
+ :Co#8:\
+ :DO=\E[%dB:\
+ :F1=\E[W:\
+ :F2=\E[X:\
+ :K1=\E[H:\
+ :K2=\E[I:\
+ :K3=\E[E:\
+ :K4=\E[F:\
+ :K5=\E[G:\
+ :LE=\E[%dD:\
+ :RI=\E[%dC:\
+ :Sb=\E[1;%dx:\
+ :Sf=\E[2;%dx:\
+ :UP=\E[%dA:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :am:\
+ :bl=^G:\
+ :bs:\
+ :cb=\E[1K:\
+ :cd=\E[J:\
+ :ce=\E[K:\
+ :cl=\E[H\E[J:\
+ :cm=\E[%i%d;%dH:\
+ :co#80:\
+ :cr=^M:\
+ :do=\E[B:\
+ :ho=\E[H:\
+ :is=\E[m:\
+ :it#8:\
+ :k;=\E[V:\
+ :k1=\E[M:\
+ :k2=\E[N:\
+ :k3=\E[O:\
+ :k4=\E[P:\
+ :k5=\E[Q:\
+ :k6=\E[R:\
+ :k7=\E[S:\
+ :k8=\E[T:\
+ :k9=\E[U:\
+ :kD=\177:\
+ :@7=\E[F:\
+ :kN=\E[G:\
+ :kP=\E[I:\
+ :kb=\177:\
+ :kd=\E[B:\
+ :kh=\E[H:\
+ :kl=\E[D:\
+ :kr=\E[C:\
+ :ku=\E[A:\
+ :le=^H:\
+ :li#25:\
+ :ms:\
+ :nd=\E[C:\
+ :op=\E[x:\
+ :pa#64:\
+ :rs=\E[m:\
+ :se=\E[m:\
+ :sf=\E[S:\
+ :so=\E[7;1r\E[7m:\
+ :sr=\E[T:\
+ :ta=^I:\
+ :te=\E[m:\
+ :ti=\E[m:\
+ :up=\E[A:\
+ :ut:
diff --git a/release/picobsd/dial/floppy.tree/etc/ttys b/release/picobsd/dial/floppy.tree/etc/ttys
new file mode 100644
index 0000000..d3b0295
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/etc/ttys
@@ -0,0 +1,31 @@
+#
+# @(#)ttys 5.1 (Berkeley) 4/17/89
+#
+# name getty type status comments
+#
+# This entry needed for asking password when init goes to single-user mode
+# If you want to be asked for password, change "secure" to "insecure" here
+console none unknown off secure
+#
+ttyv0 "/usr/libexec/getty Pc" cons25 on secure
+# Virtual terminals
+ttyv1 "/usr/libexec/getty Pc" cons25 on secure
+ttyv2 "/usr/libexec/getty Pc" cons25 on secure
+ttyv3 "/usr/libexec/getty Pc" cons25 on secure
+ttyv4 "/usr/libexec/getty Pc" cons25 on secure
+ttyv5 "/usr/libexec/getty Pc" cons25 on secure
+ttyv6 "/usr/libexec/getty Pc" cons25 on secure
+ttyv7 "/usr/libexec/getty Pc" cons25 on secure
+ttyv8 "/usr/libexec/getty Pc" cons25 on secure
+ttyv9 "/usr/libexec/getty Pc" cons25 on secure
+# Pseudo terminals
+ttyp0 none network secure
+ttyp1 none network secure
+ttyp2 none network secure
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
diff --git a/release/picobsd/dial/floppy.tree/kernel.config b/release/picobsd/dial/floppy.tree/kernel.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/dial/floppy.tree/kernel.config
diff --git a/release/picobsd/dial/lang/LICENCE.ssh b/release/picobsd/dial/lang/LICENCE.ssh
new file mode 100644
index 0000000..eb90236
--- /dev/null
+++ b/release/picobsd/dial/lang/LICENCE.ssh
@@ -0,0 +1,8 @@
+SSH is included here under different license than BSD one. Please see
+http://www.cs.hut.fi/ssh for details. In short, it permits non-commercial
+use only. Your usage may be further restricted by applicable local laws on
+using strong encryption methods.
+
+<abial@nask.pl>
+
+$Id: LICENCE.ssh,v 1.1.1.1 1998/07/14 07:30:41 abial Exp $
diff --git a/release/picobsd/dial/lang/README.en b/release/picobsd/dial/lang/README.en
new file mode 100644
index 0000000..04a0b2e
--- /dev/null
+++ b/release/picobsd/dial/lang/README.en
@@ -0,0 +1,74 @@
+1998.07.22, Warsaw, Poland
+
+ PicoBSD 0.4 (DIALUP flavor)
+ ---------------------------
+
+
+What is PicoBSD?
+----------------
+
+It's a one floppy version of FreeBSD (please see http://www.freebsd.org),
+configured mainly for dialup access. It can be used as a means to read your
+mail remotely, or to log in somewhere and do the work there.
+
+What are minimal requirements?
+------------------------------
+
+* 386SX CPU or better (this release contains also FPU emulator)
+* 8MB RAM - the more the better.
+* Modem sitting on COM1-COM4 (default is to use COM2), if you want to have
+ a PPP connection.
+* Network card: compatible with NE2000, or PCI cards with DEC chipsets
+ or 3C509 series (ed, ep and de drivers). There is also driver for Intel
+ EtherExpress PCI card (fxp), and Lance/PCnet (lnc).
+
+How to make a dialup connection?
+--------------------------------
+
+I recommend running /stand/dialup script, which will additionally configure
+the PPP to allow you to automatically connect to your provider, and
+will make the ppp to run in background. However, if you like to do it
+yourself, or the script doesn't work properly in your case (let me know
+this!), here are the steps you should take:
+
+1. Go to /etc/ppp directory and edit file ppp.conf (using ee editor). You
+ should check at least the port number of your modem (it's configured
+ on cuaa1==COM2 by default).
+2. After you're happy with it, start 'ppp' program. Enter the terminal
+ mode ('term') - you are now directly connected to your modem, so you
+ can normally dial the number using AT commands (e.g. atdt555666777),
+ and log in to communictaion server. You should see something like
+ this:
+
+ (comm server prompt) login: abial
+ (comm server prompt) Password: ********
+
+ Then either the comm server automatically switches to PPP, or you
+ should issue a command to tell it to do so (e.g. 'go ppp', 'PPP' or
+ other). When PPP is started, you should see something like:
+
+ ppp on pico> Packet mode
+ PPP on pico>
+
+ Notice the uppercase PPP - it means that the protocol is up, and now
+ you're connected. Congratulations. :-)
+3. Your console is blocked now, but you can use other virtual consoles
+ available under Alt-Fn.
+
+Where to get additional info?
+-----------------------------
+
+There is official page of this project at:
+
+ http://www.freebsd.org/~picobsd/
+
+You can find some informations there - not too much yet, to be sure... ;-)
+I'll put there also new versions of PicoBSD and bugfixes.
+
+I'll be glad hearing from you about your experiences with PicoBSD. Thanks.
+
+Have fun!
+
+Andrzej Bialecki <abial@nask.pl>
+
+$Id: README.en,v 1.3 1998/08/10 19:07:52 abial Exp $
diff --git a/release/picobsd/dial/lang/README.pl b/release/picobsd/dial/lang/README.pl
new file mode 100644
index 0000000..49c1149
--- /dev/null
+++ b/release/picobsd/dial/lang/README.pl
@@ -0,0 +1,72 @@
+1998.07.23, Warszawa
+
+ PicoBSD 0.4 (wersja DIALUP)
+ ---------------------------
+
+Co to jest PicoBSD?
+-------------------
+
+Jest to jednodyskietkowa wersja FreeBSD skonfigurowana g³ównie pod k±tem
+zastosowania jako narzêdzie dostêpu przez dialup lub ethernet.
+W celu zapoznania siê z pe³nym systemem zajrzyj na http://www.freebsd.org
+
+Jakie s± minimalne wymagania?
+-----------------------------
+
+* Procesor 386SX lub lepszy (dostêpny jest emulator FPU)
+* 8MB pamiêci - jest to absolutnie nieprzekraczalne minimum. Oczywi¶cie im
+ wiecej, tym lepiej - ograniczenie jest g³ównie spowodowane brakiem swapu. Po
+ zapoznaniu siê z systemem mo¿esz sobie skonfigurowaæ tzw. swap-file na dysku
+ twardym, np. na partycji DOS-owej lub Linux-owej. S³u¿y do tego program
+ vnconfig, oraz urz±dzenie vn(4). Wówczas prawdopodobnie wystarczy 4MB pamiêci.
+* Modem, skonfigurowany na COM1-COM4 (standardowo system wykorzystuje COM2),
+ je¶li bêdzie wykorzystywany dostêp przez PPP.
+* Karta sieciowa: kompatybilna z NE2000, niektóre typy 3Com, lub wersje PCI z
+ chipsetem DEC21040 (drivery ed, ep i de), je¶li bêdziesz korzystaæ z dostêpu
+ przez ethernet. Jest te¿ driver do karty PCI Intel EtherExpress (fxp), i
+ kart Lance/PCnet (lnc).
+
+W jaki sposób uzyskaæ dostêp dialup?
+------------------------------------
+
+Zalecam skorzystanie ze skryptu /stand/dialup, który skonfiguruje dodatkowo
+us³ugê PPP w ten sposób, ¿e bêdzie siê automatycznie ³±czyæ z providerem, oraz
+ppp bêdzie dzia³aæ w tle. Je¶li jednak co¶ nie wyjdzie (daj mi znaæ o tym!),
+lub lubisz robiæ to sam, oto opis poszczególnych kroków:
+
+1. wejd¼ do katalogu /etc/ppp i w pliku ppp.conf zmieñ port
+ szeregowy na ten, na którym masz modem (cuaa0==COM1, cuaa1==COM2,
+ itd...) Mo¿esz to zrobiæ edytorem 'ee /etc/ppp/ppp.conf'.
+
+2. uruchom program 'ppp'. Przejd¼ do trybu terminalowego (polecenie
+ 'term'). W tym momencie masz bezpo¶redni kontakt z modemem, wiêc
+ normalnie wybierz numer dialup i zaloguj siê do serwera
+ komunikacyjnego. Wydaj mu polecenie przej¶cia w tryb ppp. Powiniene¶
+ zobaczyæ co¶ takiego:
+
+ (communication server...): ppp
+
+ ppp on pico> Packet mode
+ PPP on pico>
+
+ W tym momencie jeste¶ ju¿ online! Gratulujê.
+3. Do Twojej dyspozycji s± nastêpuj±ce programy: telnet, ftp, i ssh.
+ Poniewa¿ wywo³a³e¶ 'ppp' rêcznie, wiêc blokuje Ci konsolê. Nie
+ szkodzi - masz do dyspozycji 9 kolejnych konsoli wirtualnych, po
+ których mo¿na siê poruszaæ naciskaj±c lewy Alt i klawisz funkcyjny
+ F1-F10.
+
+Skad wzi±æ dodatkowe informacje?
+--------------------------------
+
+Oficjalna strona projektu PicoBSD:
+
+ http://www.freebsd.org/~picobsd/
+
+Mo¿na tam znale¼æ trochê wiêcej informacji, oraz poprawki i nowe wersje.
+
+Mi³ej zabawy!
+
+Andrzej Bia³ecki <abial@nask.pl>
+
+$Id: README.pl,v 1.3 1998/08/10 19:07:52 abial Exp $
diff --git a/release/picobsd/dial/lang/boot.help.en b/release/picobsd/dial/lang/boot.help.en
new file mode 100644
index 0000000..714fbcb
--- /dev/null
+++ b/release/picobsd/dial/lang/boot.help.en
@@ -0,0 +1,23 @@
+
++--------------------------------------------------------------------------+
+ Welcome to FreeBSD !!!
+ The system is coming up, please wait.
++--------------------------------------------------------------------------+
+
+ This is special version of FreeBSD-3.0, called PicoBSD (v.0.4).
+
+ It allows you to connect to the Internet via dialup connection (using PPP)
+ or via Ethernet card.
+
+ You can adjust kernel parameters to match those of your hardware via
+ -c switch (boot: -c) to boot prompt. If you are booting for the first
+ time, you enter this mode automatically.
+
+ The floppy contains also some tools for remote access (telnet, ftp, SSH)
+ and local disk access (FreeBSD, DOS and Linux filesystem support).
+
+ I hope you'll enjoy it.
+
+ abial@nask.pl
++--------------------------------------------------------------------------+
+
diff --git a/release/picobsd/dial/lang/boot.help.pl b/release/picobsd/dial/lang/boot.help.pl
new file mode 100644
index 0000000..a161255
--- /dev/null
+++ b/release/picobsd/dial/lang/boot.help.pl
@@ -0,0 +1,23 @@
+
++----------------------------------------------------------------------+
+ Witamy we FreeBSD !!!
+ Prosze czekac. Trwa uruchamianie systemu.
++----------------------------------------------------------------------+
+
+ To jest specjalna wersja FreeBSD-3.0, zwana PicoBSD (v.0.4).
+
+ Pozwala ona na uzyskanie polaczenia z Internetem przez protokol PPP
+ (polaczenie dialup) lub karte Ethernet.
+
+ Mozna dopasowac parametry sprzetowe podajac opcje -c przy starcie
+ systemu (boot: -c). Przy pierwszym starcie tryb ten jest uruchamiany
+ automatycznie.
+
+ Zawarte jest tu kilka narzedzi dla zdalnego dostepu (telnet, ftp, SSH)
+ oraz do obslugi lokalnej maszyny (dyskow FreeBSD, Linux i DOS).
+
+ Milego uzywania.
+
+ abial@nask.pl
++----------------------------------------------------------------------+
+
diff --git a/release/picobsd/dial/lang/dialup.en b/release/picobsd/dial/lang/dialup.en
new file mode 100755
index 0000000..918c670
--- /dev/null
+++ b/release/picobsd/dial/lang/dialup.en
@@ -0,0 +1,370 @@
+#!/bin/sh
+# $Id: dialup.en,v 1.3 1998/08/07 19:29:57 abial Exp $
+set_resolv() {
+ echo ""
+ echo " Default Domain Name"
+ echo ""
+ echo "Here you should enter your default Internet domain. If your"
+ echo "provider uses something like 'www.big.isp.com', this should"
+ echo "be most probably 'big.isp.com'."
+ echo ""
+ echo "If you simply press enter here, you will have a 'mydomain.edu',"
+ echo "which is not the best idea, but may suffice for now..."
+ echo ""
+ read -p "Please enter the default domain name: " domain
+ if [ "X${domain}" = "X" ]
+ then
+ echo ""
+ echo "Fine, your domain will be 'mydomain.edu', but be aware"
+ echo "that it probably doesn't exist."
+ echo ""
+ read -p "Press any key to continue." junk
+ domain="mydomain.edu"
+ fi
+ echo ""
+ echo " DNS Server Address"
+ echo ""
+ echo "Here you should enter the numeric address of your domain name"
+ echo "server. It is needed for resolving human-readable host names"
+ echo "(such as www.freebsd.org) to machine readable IP numbers. If"
+ echo "it's not set properly, you will have to use numeric IP addresses"
+ echo "when connecting to other hosts, which is highly inconvenient."
+ echo ""
+ echo "If you simply press Enter here, we'll set it to one of root"
+ echo "DNS servers. This may not always work."
+ echo ""
+ read -p "Please enter the DNS server address in form A.B.C.D: " dns
+ if [ "X${dns}" = "X" ]
+ then
+ echo ""
+ echo "Fine, your DNS server will be 192.33.4.12, but be aware"
+ echo "that this may not always work ok."
+ echo ""
+ read -p "Press any key to continue." junk
+ dns="192.33.4.12"
+ fi
+}
+
+set_phone() {
+while [ "X${phone}" = "X" ]
+do
+ echo ""
+ echo " Phone Number"
+ echo ""
+ echo "Here you should enter the full phone number you normally"
+ echo "use to connect to your provider, with all necessary prefixes"
+ echo "attached, e.g.: 01122334455"
+ echo ""
+ read -p "Please enter the phone number: " phone
+done
+}
+
+set_port() {
+while [ "X${dev}" = "X" ]
+do
+ echo ""
+ echo " Port Number"
+ echo ""
+ echo "Here you should enter the port number, to which your modem is"
+ echo "attached. REMEMBER: COM1 is port 0 in FreeBSD, COM2 - port 1,"
+ echo "and so on. You should enter only the number, not the full name"
+ echo "of the device."
+ echo ""
+ read -p "Please enter the port number (0,1,2): " dev
+done
+}
+
+set_speed() {
+while [ "X${speed}" = "X" ]
+do
+ echo ""
+ echo " Port Speed"
+ echo ""
+ echo "Here you should choose the serial port speed."
+ echo ""
+ echo "NOTICE: port speed is NOT the same as modem speed - these are"
+ echo "different things. If your modem is capable of V.42 or MNP"
+ echo "compression, the actual speed of serial port should be set much"
+ echo "higher. E.g. for 14.4 kbps modem with compression you should"
+ echo "choose 38400, for 28.8 kbps modem with compression you should"
+ echo "choose 115200."
+ echo ""
+ echo " 1. 9600 bps"
+ echo " 2. 14400 bps"
+ echo " 3. 28800 bps"
+ echo " 4. 38400 bps (14.4 kbps modem with compression)"
+ echo " 5. 57600 bps"
+ echo " 6. 115200 bps (28.8 kbps modem with compression)"
+ echo ""
+ read -p "Please choose the port speed (1-6): " ans
+ case ${ans} in
+ 1)
+ speed=9600
+ ;;
+ 2)
+ speed=14400
+ ;;
+ 3)
+ speed=28800
+ ;;
+ 4)
+ speed=38400
+ ;;
+ 5)
+ speed=57600
+ ;;
+ 6)
+ speed=115200
+ ;;
+ *)
+ read -p "Bad value! Press enter to continue..." junk
+ unset speed
+ ;;
+ esac
+done
+}
+
+set_timeout() {
+while [ "X${timo}" = "X" ]
+do
+ echo ""
+ echo " Idle Timeout"
+ echo ""
+ echo "Here you should enter timeout (in seconds). After this time, if"
+ echo "the connection is idle, it's disconnected (to save your money :-)"
+ echo ""
+ read -p "Please enter the timeout value: " timo
+done
+}
+
+set_login() {
+while [ "X${user}" = "X" ]
+do
+ echo ""
+ echo " Login Name"
+ echo ""
+ echo "Here you should enter your login name that you normally use"
+ echo "to log in to your provider's terminal server."
+ echo ""
+ read -p "Please enter your login name: " user
+done
+}
+
+set_password() {
+while [ "X${pass}" = "X" ]
+do
+ echo ""
+ echo " Password"
+ echo ""
+ echo "Here you enter the password that you use to log in to the"
+ echo "terminal server."
+ echo ""
+ echo "WARNING: your password will be stored in readable form on the"
+ echo "floppy!!! If you don't like it... well, you must dial in manually."
+ echo "In that case abort this script (Ctrl-C). Otherwise, continue."
+ echo ""
+ read -p "Please enter your password: " pass
+done
+}
+
+set_chat() {
+echo ""
+while [ "X${chat}" = "X" ]
+do
+ echo " Type of Login Dialog"
+ echo ""
+ echo "What type of login dialog do you expect from the terminal server?"
+ echo ""
+ echo "1) ......login: ${user}"
+ echo " ...password: ********"
+ echo " (terminal server starts PPP here)"
+ echo ""
+ echo "2) ......login: ${user}"
+ echo " ...password: ********"
+ echo " ...protocol: ppp"
+ echo " (terminal server starts PPP here)"
+ echo ""
+ echo "3) ......username: ${user}"
+ echo " ......password: ********"
+ echo " (terminal server starts PPP here)"
+ echo ""
+ echo "4) ......username: ${user}"
+ echo " ......password: ********"
+ echo " portX/..xxx...: ppp"
+ echo " (terminal server starts PPP here)"
+ echo ""
+ read -p "Choose 1,2,3 or 4: " chat
+ case ${chat} in
+ 1)
+ chat1="TIMEOUT 10 ogin:--ogin: ${user} word: \\\\P"
+ chat2="login/password"
+ ;;
+ 2)
+ chat1="TIMEOUT 10 ogin:--ogin: ${user} word: \\\\P otocol: ppp"
+ chat2="login/password/protocol"
+ ;;
+ 3)
+ chat1="TIMEOUT 10 ername:--ername: ${user} word: \\\\P"
+ chat2="username/password"
+ ;;
+ 4)
+ chat1="TIMEOUT 10 ername:--ername: ${user} word: \\\\P port ppp"
+ chat2="username/password/port"
+ ;;
+ *) echo "Bad value! Please choose 1,2,3 or 4."
+ echo ""
+ unset chat
+ unset chat2
+ ;;
+ esac
+done
+}
+
+# Main entry of the script
+
+echo ""
+echo " Welcome to The Simplest PPP Configurator! :-)"
+echo ""
+echo " Your PPP is already preconfigured, so that you can dial manually."
+echo "However, you probably noticed that it requires chatting with your modem"
+echo "and logging in every time you want to connect. It's simple and it works,"
+echo "but it's also annoying."
+echo ""
+echo "This script will try to configure your PPP so that you can run it in"
+echo "background (thus freeing the console), and log in automatically."
+echo ""
+echo "If you want to continue, press Enter, otherwise press Ctrl-C."
+echo ""
+read junk
+
+# Step through the options.
+set_phone
+set_port
+set_speed
+set_timeout
+set_login
+set_password
+set_chat
+set_resolv
+
+ans="loop_it"
+while [ "X${ans}" != "X" ]
+do
+
+echo ""
+echo " Ok. You assigned the following values:"
+echo ""
+echo " 1. Phone number: ${phone}"
+echo " 2. Port number: cuaa${dev}"
+echo " 3. Port speed: ${speed} baud"
+echo " 4. Timeout: ${timo} s"
+echo " 5. Login name: ${user}"
+echo " 6. Password: ${pass}"
+echo " 7. Chat pattern: ${chat} (${chat2})"
+echo " 8. Default domain: ${domain}"
+echo " DNS Server: ${dns}"
+echo ""
+echo "If you're satisfied with these values, just press Enter."
+read -p "Otherwise, enter the number of the option you want to change (1-8): " ans
+a="X${ans}"
+case ${a} in
+X1)
+ unset phone
+ set_phone
+ ;;
+X2)
+ unset dev
+ set_port
+ ;;
+X3)
+ unset speed
+ set_speed
+ ;;
+X4)
+ unset timo
+ set_timeout
+ ;;
+X5)
+ unset user
+ set_login
+ ;;
+X6)
+ unset pass
+ set_password
+ ;;
+X7)
+ unset chat
+ set_chat
+ ;;
+X8)
+ unset dns
+ unset domain
+ set_resolv
+ ;;
+X) ;;
+*)
+ read -p "Unknown option: ${ans}. Press enter to continue..."
+ ;;
+esac
+
+done
+
+echo ""
+echo -n "Generating /etc/ppp/ppp.conf file..."
+rm -f /etc/ppp/ppp.conf
+cp /etc/ppp/ppp.conf.template /etc/ppp/ppp.conf
+echo "" >>/etc/ppp/ppp.conf
+echo "# This part was generated with $0" >>/etc/ppp/ppp.conf
+echo "dialup:" >>/etc/ppp/ppp.conf
+echo " set line /dev/cuaa${dev}" >>/etc/ppp/ppp.conf
+echo " set speed ${speed}" >>/etc/ppp/ppp.conf
+echo " set phone ${phone}" >>/etc/ppp/ppp.conf
+echo " set authkey ${pass}" >>/etc/ppp/ppp.conf
+echo " set timeout ${timo}" >>/etc/ppp/ppp.conf
+echo " set login \"${chat1}\"" >>/etc/ppp/ppp.conf
+echo " set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0" >>/etc/ppp/ppp.conf
+
+echo " Done."
+echo -n "Generating /etc/resolv.conf..."
+echo "# This file was generated with $0">/etc/resolv.conf
+echo "domain ${domain}" >>/etc/resolv.conf
+echo "nameserver ${dns}">>/etc/resolv.conf
+echo "hostname=\"pico.${domain}\"">>/etc/rc.conf
+
+echo " Done."
+
+echo ""
+echo "REMEMBER to run /stand/update! Otherwise these changes will be lost!"
+echo ""
+echo "Please check the contents of /etc/ppp/ppp.conf, and edit it if"
+echo "necessary. When you're satisfied with it, run ppp in background:"
+echo ""
+echo " ppp -background dialup"
+echo ""
+echo "Now, if you're sure that your /etc/ppp/ppp.conf file is ok (which is"
+echo -n "probable :-) would you like to start the dialup connection now? (y/n) "
+read ans
+while [ "X${ans}" = "Xy" ]
+do
+ echo ""
+ echo "Starting dialup connection. Wait until you see a 'PPP Enabled' message..."
+ echo ""
+ ppp -background dialup
+ if [ "X$?" != "X0" ]
+ then
+ echo ""
+ echo -n "Hmmm... Command failed. Try again? (y/n) "
+ read ans
+ if [ "X${ans}" != "Xy" ]
+ then
+ echo ""
+ echo "Try again later. Check also your config file (/etc/ppp/ppp.conf)"
+ echo ""
+ fi
+ else
+ echo ""
+ echo "Congratulations! You're on-line now."
+ echo ""
+ exit 0
+ fi
+done
diff --git a/release/picobsd/dial/lang/dialup.pl b/release/picobsd/dial/lang/dialup.pl
new file mode 100755
index 0000000..3d7dcf5
--- /dev/null
+++ b/release/picobsd/dial/lang/dialup.pl
@@ -0,0 +1,364 @@
+#!/bin/sh
+# $Id: dialup.pl,v 1.4 1998/08/10 19:07:52 abial Exp $
+set_resolv() {
+ echo ""
+ echo " Domy¶lna Nazwa Domeny"
+ echo ""
+ echo "Podaj domy¶ln± nazwê domeny Internetowej, której bêdziesz u¿ywaæ."
+ echo "Je¶li Twój provider ma nazwy typu 'www.akuku.com.pl', to bêdzie"
+ echo "to najprawdopodobniej 'akuku.com.pl'."
+ echo ""
+ echo "Je¶li po prostu naci¶niesz Enter, ustawisz (nieistniej±c±) domenê"
+ echo "'mydomain.org.pl', co nie jest najlepszym pomys³em, ale mo¿e na"
+ echo "razie wystarczyæ."
+ echo ""
+ read -p "Podaj domy¶ln± nazwê domeny: " domain
+ if [ "X${domain}" = "X" ]
+ then
+ echo ""
+ echo "Dobrze, ustawimy 'mydomain.org.pl', ale miej ¶wiadomo¶æ"
+ echo "¿e taka domena prawdopodobnie nie istnieje."
+ echo ""
+ read -p "Naci¶nij Enter" junk
+ domain="mydomain.org.pl"
+ fi
+ echo ""
+ echo " Adres Serwera DNS"
+ echo ""
+ echo "Podaj adres w postaci numerycznej serwera DNS. Jest on potrzebny"
+ echo "do zamiany nazw (takich jak www.freebsd.org.pl) na adresy IP"
+ echo "(takie jak 192.168.1.1). Je¶li nie jest to ustawione poprawnie,"
+ echo "bêdziesz musia³ pos³ugiwaæ siê adresami IP podczas ³±czenia siê"
+ echo "z innymi maszynami - jest to co najmniej niewygodne."
+ echo ""
+ echo "Je¶li po prostu naci¶niesz Enter, ustawisz (istniej±cy) serwer"
+ echo "o numerze 194.204.159.1 (w sieci TP SA)."
+ echo ""
+ read -p "Podaj adres IP serwera DNS (w postaci A.B.C.D): " dns
+ if [ "X${dns}" = "X" ]
+ then
+ echo ""
+ echo "Dobrze, ustawimy adres DNS serwera na 194.204.159.1, ale"
+ echo "niekoniecznie musi to byæ najlepszy serwer w Twojej czê¶ci sieci."
+ echo ""
+ read -p "Naci¶nij Enter..." junk
+ dns="194.204.159.1"
+ fi
+}
+set_phone() {
+while [ "X${phone}" = "X" ]
+do
+ echo ""
+ echo " Numer Telefoniczny"
+ echo ""
+ echo "Podaj numer telefoniczny, którego normalnie u¿ywasz, ¿eby"
+ echo "dodzwoniæ siê do swojego providera. Powiniene¶ podaæ pe³ny"
+ echo "numer, z ewentualnymi przedrostkami, np: 022113355"
+ echo ""
+ read -p "Podaj numer telefoniczny: " phone
+done
+}
+
+set_port() {
+while [ "X${dev}" = "X" ]
+do
+ echo ""
+ echo " Numer Portu Modemowego"
+ echo ""
+ echo "Podaj numer portu szeregowego, do którego pod³±czony jest modem."
+ echo "UWAGA: DOSowy port COM1 to port 0 (cuaa0) we FreeBSD, COM2 -"
+ echo "port 1, itd. Podaj tutaj tylko numer, a nie pe³n± nazwê urz±dzenia."
+ echo ""
+ read -p "Podaj numer portu szeregowego (0,1,2): " dev
+done
+}
+
+set_speed() {
+while [ "X${speed}" = "X" ]
+do
+ echo ""
+ echo " Prêdko¶æ Linii Szeregowej"
+ echo ""
+ echo "Wybierz prêdko¶æ linii szeregowej, której u¿ywa modem."
+ echo ""
+ echo "UWAGA: Prêdko¶æ linii szeregowej NIE jest tym samym, co prêdko¶æ"
+ echo "modemu. Je¶li Twój modem obs³uguje protokó³ V.42 lub MNP"
+ echo "(zazwyczaj tak w³a¶nie jest), prêdko¶æ linii szeregowej musi byæ"
+ echo "du¿o wiêksza od prêdko¶ci modemu. Np. dla modemów 14.4 kbps z"
+ echo "kompresj± nale¿y wybraæ prêdko¶æ 38400 bps, a dla modemów"
+ echo "28.8 kbps z kompresj± nale¿y wybraæ prêdko¶æ 115200 bps."
+ echo ""
+ echo " 1. 9600 bps"
+ echo " 2. 14400 bps"
+ echo " 3. 28800 bps"
+ echo " 4. 38400 bps (modem 14.4 kbps z kompresj±)"
+ echo " 5. 57600 bps"
+ echo " 6. 115200 bps (modem 28.8 kbps z kompresj±)"
+ echo ""
+ read -p "Wybierz prêdko¶æ linii szeregowej (1-6): " ans
+ case ${ans} in
+ 1)
+ speed=9600
+ ;;
+ 2)
+ speed=14400
+ ;;
+ 3)
+ speed=28800
+ ;;
+ 4)
+ speed=38400
+ ;;
+ 5)
+ speed=57600
+ ;;
+ 6)
+ speed=115200
+ ;;
+ *)
+ read -p "Z³a warto¶æ! Naci¶nij Enter..." junk
+ unset speed
+ ;;
+ esac
+done
+}
+
+set_timeout() {
+while [ "X${timo}" = "X" ]
+do
+ echo ""
+ echo " Czas roz³±czenia"
+ echo ""
+ echo "Podaj czas (w sekundach), po którym, je¶li nie ma ruchu na ³±czu,"
+ echo "nast±pi automatyczne roz³±czenie. To pomaga w oszczêdzaniu :-)"
+ echo ""
+ read -p "Podaj czas roz³±czenia: " timo
+done
+}
+
+set_user() {
+while [ "X${user}" = "X" ]
+do
+ echo ""
+ echo " Nazwa U¿ytkownika"
+ echo ""
+ echo "Podaj nazwê u¿ytkownika (login name), której normalnie u¿ywasz"
+ echo "do zalogowania siê do serwera komunikacyjnego providera."
+ echo ""
+ read -p "Podaj nazwê u¿ytkownika: " user
+done
+}
+
+set_pass() {
+while [ "X${pass}" = "X" ]
+do
+ echo ""
+ echo " Has³o"
+ echo ""
+ echo "Podaj has³o, którego u¿ywasz do zalogowania siê do providera."
+ echo ""
+ echo "UWAGA: Has³o to zostanie zapisane w czytelnej postaci na"
+ echo "dyskietce!!! Je¶li tego nie chcesz... bêdziesz musia³ logowaæ siê"
+ echo "rêcznie, tak jak dotychczas. W tym przypadku przerwij ten skrypt"
+ echo "przez Ctrl-C."
+ echo ""
+ read -p "Podaj swoje has³o: " pass
+done
+}
+
+set_chat() {
+echo ""
+while [ "X${chat}" = "X" ]
+do
+ echo " Rodzaj dialogu podczas logowania siê"
+ echo ""
+ echo "Jak normalnie przebiega proces logowania siê do serwera"
+ echo "komunikacyjnego?"
+ echo ""
+ echo "1) ......login: ${user}"
+ echo " ...password: ********"
+ echo " (tutaj startuje PPP)"
+ echo ""
+ echo "2) ...username: ${user} (TP S.A.)"
+ echo " ...password: ********"
+ echo " (tutaj startuje PPP)"
+ echo ""
+ echo "3) ......username: ${user} (NASK)"
+ echo " ......password: ********"
+ echo " portX/..xxx...: ppp"
+ echo " (tutaj startuje PPP)"
+ echo ""
+ read -p "Wybierz 1,2 lub 3: " chat
+ case ${chat} in
+ 1)
+ chat1="TIMEOUT 10 ogin:--ogin: ${user} word: \\\\P"
+ chat2="login/password"
+ ;;
+ 2)
+ chat1="TIMEOUT 10 ername:--ername: ${user} word: \\\\P"
+ chat2="TP SA - username/password"
+ ;;
+ 3)
+ chat1="TIMEOUT 10 ername:--ername: ${user} word: \\\\P port ppp"
+ chat2="NASK - username/password/port"
+ ;;
+ *) echo "Z³a warto¶æ! Musisz wybraæ 1,2 lub 3."
+ echo ""
+ unset chat
+ unset chat2
+ ;;
+ esac
+done
+}
+
+
+# Main entry of the script
+
+echo ""
+echo " Witamy w Automatycznym Konfiguratorze PPP! :-)"
+echo ""
+echo " PPP jest ju¿ wstêpnie skonfigurowane, tak ¿e mo¿na rêcznie wybieraæ"
+echo "numer i rêcznie logowaæ siê do serwera komunikacyjnego. Jest to jednak"
+echo "dosyæ uci±¿liwy sposób na d³u¿sz± metê."
+echo ""
+echo "Ten skrypt postara siê stworzyæ tak± konfiguracjê PPP, ¿eby umo¿liwiæ"
+echo "automatyczne wybieranie numeru i logowanie siê, a ponadto pozwoli na"
+echo "uruchamianie ppp w tle - nie zajmuje ono wówczas konsoli."
+echo ""
+echo "Je¶li chcesz kontynuowaæ, naci¶nij Enter, je¶li nie - Ctrl-C."
+echo ""
+read junk
+# Step through the options
+set_phone
+set_port
+set_speed
+set_timeout
+set_user
+set_pass
+set_chat
+set_resolv
+
+ans="loop_it"
+while [ "X${ans}" != "X" ]
+do
+
+echo ""
+echo " Ustawione zosta³y nastêpuj±ce parametry:"
+echo ""
+echo " 1. Numer telef.: ${phone}"
+echo " 2. Numer portu: cuaa${dev}"
+echo " 3. Prêdko¶æ portu: ${speed}"
+echo " 4. Czas roz³±cz.: ${timo} s"
+echo " 5. U¿ytkownik: ${user}"
+echo " 6. Has³o: ${pass}"
+echo " 7. Typ dialogu: ${chat} (${chat2})"
+echo " 8. Nazwa domeny: ${domain}"
+echo " Serwer DNS: ${dns}"
+echo ""
+echo "Je¶li te warto¶ci s± poprawne, po prostu naci¶nij Enter"
+read -p "Je¶li nie, podaj numer opcji, któr± chcesz zmieniæ (1-8): " ans
+
+a="X${ans}"
+case ${a} in
+X1)
+ unset phone
+ set_phone
+ ;;
+X2)
+ unset dev
+ set_port
+ ;;
+X3)
+ unset speed
+ set_speed
+ ;;
+X4)
+ unset timo
+ set_timeout
+ ;;
+X5)
+ unset user
+ set_user
+ ;;
+X6)
+ unset pass
+ set_pass
+ ;;
+X7)
+ unset chat
+ unset chat1
+ unset chat2
+ set_chat
+ ;;
+X8)
+ unset domain
+ unset dns
+ set_resolv
+ ;;
+X)
+ ;;
+*)
+ read -p "Z³y numer opcji! Naci¶nij Enter..." junk
+ ans="wrong"
+ ;;
+esac
+done
+
+echo ""
+echo -n "Generowanie /etc/ppp/ppp.conf file..."
+rm -f /etc/ppp/ppp.conf
+cp /etc/ppp/ppp.conf.template /etc/ppp/ppp.conf
+echo "" >>/etc/ppp/ppp.conf
+echo "# This part was generated with $0" >>/etc/ppp/ppp.conf
+echo "dialup:" >>/etc/ppp/ppp.conf
+echo " set line /dev/cuaa${dev}" >>/etc/ppp/ppp.conf
+echo " set phone ${phone}" >>/etc/ppp/ppp.conf
+echo " set authkey ${pass}" >>/etc/ppp/ppp.conf
+echo " set timeout ${timo}" >>/etc/ppp/ppp.conf
+echo " set login \"${chat1}\"" >>/etc/ppp/ppp.conf
+echo " set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0" >>/etc/ppp/ppp.conf
+
+echo " Zrobione."
+
+echo -n "Generowanie /etc/resolv.conf..."
+echo "# This file was generated with $0">/etc/resolv.conf
+echo "domain ${domain}" >>/etc/resolv.conf
+echo "nameserver ${dns}">>/etc/resolv.conf
+echo "hostname=\"pico.${domain}\"">>/etc/rc.conf
+echo " Zrobione."
+
+echo ""
+echo "Ok. Sprawd¼ zawarto¶æ /etc/ppp/ppp.conf, i popraw go je¶li to konieczne."
+echo "Nastêpnie mo¿esz wystartowaæ ppp w tle:"
+echo ""
+echo " ppp -background dialup"
+echo ""
+echo "PAMIÊTAJ, ¿eby uruchomiæ /stand/update ! Inaczej zmiany nie zostan± zapisane"
+echo "na dyskietce!"
+echo ""
+echo "Ok. Je¶li Twój plik /etc/ppp/ppp.conf jest prawid³owy (co jest dosyæ"
+echo -n "prawdopodobne :-), czy chcesz teraz uruchomiæ po³±czenie dialup? (t/n) "
+read ans
+while [ "X${ans}" = "Xt" ]
+do
+ echo ""
+ echo "Uruchamiam po³±czenie dialup. Proszê czekaæ dopóki nie pojawi siê"
+ echo "komunikat 'PPP Enabled'..."
+ echo ""
+ ppp -background dialup
+ if [ "X$?" != "X0" ]
+ then
+ echo -n "Po³±czenie nie powiod³o siê. Spróbowaæ jeszcze raz? (t/n) "
+ read ans
+ if [ "X${ans}" != "Xt" ]
+ then
+ echo "Spróbuj pó¼niej. Sprawd¼ równie¿ plik konfiguracyjny /etc/ppp/ppp.conf."
+ echo ""
+ fi
+ else
+ echo ""
+ echo "Gratulujê! Jeste¶ on-line."
+ echo ""
+ exit 0
+ fi
+done
diff --git a/release/picobsd/dial/lang/hosts.en b/release/picobsd/dial/lang/hosts.en
new file mode 100644
index 0000000..b0659b6
--- /dev/null
+++ b/release/picobsd/dial/lang/hosts.en
@@ -0,0 +1,5 @@
+# $Id: hosts.en,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.edu
+127.0.0.1 pico.mydomain.edu
diff --git a/release/picobsd/dial/lang/hosts.pl b/release/picobsd/dial/lang/hosts.pl
new file mode 100644
index 0000000..f88b8fc
--- /dev/null
+++ b/release/picobsd/dial/lang/hosts.pl
@@ -0,0 +1,5 @@
+# $Id: hosts.pl,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/dial/lang/login.en b/release/picobsd/dial/lang/login.en
new file mode 100755
index 0000000..a47b3ee
--- /dev/null
+++ b/release/picobsd/dial/lang/login.en
@@ -0,0 +1,9 @@
+#!/bin/sh
+# $Id: login.en,v 1.2 1998/07/15 20:11:43 abial Exp $
+
+if [ "$2" != "root" ]
+then
+ exit
+fi
+cat /etc/motd
+exec -sh
diff --git a/release/picobsd/dial/lang/login.pl b/release/picobsd/dial/lang/login.pl
new file mode 100755
index 0000000..510600c
--- /dev/null
+++ b/release/picobsd/dial/lang/login.pl
@@ -0,0 +1,10 @@
+#!/bin/sh
+# $Id: login.pl,v 1.2 1998/07/15 20:11:44 abial Exp $
+
+if [ "$2" != "root" ]
+then
+ exit
+fi
+cat /etc/motd
+LANG=pl; export LANG
+exec -sh
diff --git a/release/picobsd/dial/lang/mfs.rc.en b/release/picobsd/dial/lang/mfs.rc.en
new file mode 100755
index 0000000..de53bbb
--- /dev/null
+++ b/release/picobsd/dial/lang/mfs.rc.en
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $Id: mfs.rc.en,v 1.3 1998/08/07 19:29:57 abial Exp $
+### WARNING !!!!!! #####
+# We remove this file during execution (see EOF).
+# Awful things happen if its size is > 1024B
+
+trap : 2
+trap : 3
+
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+
+trap "echo 'Reboot interrupted'; exit 1" 3
+
+sysctl -w vm.defer_swapspace_pageouts=1 vm.disable_swapspace_pageouts=1 2>&1 >/dev/null
+
+echo ""
+echo "-------------------------------------------"
+echo " Please wait. The system is coming up..."
+echo "-------------------------------------------"
+echo ""
+echo "Reading /etc from startup floppy..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+umount /start_floppy
+echo "Ok. (Now you can remove floppy if you like)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/dial/lang/mfs.rc.pl b/release/picobsd/dial/lang/mfs.rc.pl
new file mode 100755
index 0000000..d59befd
--- /dev/null
+++ b/release/picobsd/dial/lang/mfs.rc.pl
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $Id: mfs.rc.pl,v 1.3 1998/08/07 19:29:57 abial Exp $
+
+### WARNING !!!! ###
+# We remove this file during execution (see EOF)
+# Awful things happen if its size is > 1024B
+trap : 2
+trap : 3 # shouldn't be needed
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+trap "echo 'Reboot zostal przerwany'; exit 1" 3
+sysctl -w vm.defer_swapspace_pageouts=1 vm.disable_swapspace_pageouts=1 2>&1 >/dev/null
+echo ""
+echo "-----------------------------------------------"
+echo " Prosze czekac. Trwa uruchamianie systemu..."
+echo "-----------------------------------------------"
+echo ""
+echo "Wczytuje konfiguracje z /etc z dyskietki... "
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+umount /start_floppy
+echo "Ok. (Jesli chcesz, mozesz juz wyjac dyskietke)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/dial/lang/motd.en b/release/picobsd/dial/lang/motd.en
new file mode 100644
index 0000000..6fc16de
--- /dev/null
+++ b/release/picobsd/dial/lang/motd.en
@@ -0,0 +1,16 @@
+==================================================
+ )\_)\
+PicoBSD 0.4 (DIALUP) (o,o)
+ __ \~/
+Welcome to PicoBSD! -->====\
+ ~~ d d
+You can find a short description of the pico
+system in file /README. You can view it using
+"ee /README" or "more /README". There is also 'help'
+command which gives short description of each program.
+
+Run 'dialup' script to additionaly configure PPP
+(including automatic dialing and background operation).
+
+For more info see http://www.freebsd.org/~picobsd.
+
diff --git a/release/picobsd/dial/lang/motd.pl b/release/picobsd/dial/lang/motd.pl
new file mode 100644
index 0000000..65ef427
--- /dev/null
+++ b/release/picobsd/dial/lang/motd.pl
@@ -0,0 +1,16 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (DIALUP) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README" lub "ee /README". Mozesz tez uzyskac
+krotki opis kazdego polecenia podajac 'help polecenie'.
+
+Uruchom skrypt 'dialup', zeby w pelni skonfigurowac PPP
+(wraz z automatycznym laczeniem sie i praca w tle).
+
+Wiecej informacji znajdziesz na http://www.freebsd.org/~picobsd.
+
diff --git a/release/picobsd/dial/lang/rc.conf.en b/release/picobsd/dial/lang/rc.conf.en
new file mode 100644
index 0000000..aca4e46
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.conf.en
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $Id: rc.conf.en,v 1.2 1998/08/10 19:07:53 abial Exp $
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.edu" # Set this!
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### System console options #################################
+keymap="NO" # keymap in /usr/share/syscons/* (or NO).
+keyrate="NO" # keyboard rate to: slow, normal, fast (or NO).
+keybell="NO" # bell to duration.pitch or normal or visual (or NO).
+keychange="NO" # function keys default values (or NO).
+cursor="NO" # cursor type {normal|blink|destructive} (or NO).
+font8x16="NO" # font 8x16 from /usr/share/syscons/* (or NO).
+font8x14="NO" # font 8x14 from /usr/share/syscons/* (or NO).
+font8x8="NO" # font 8x8 from /usr/share/syscons/* (or NO).
+blanktime="NO" # blank time (in seconds) or "NO" to turn it off.
+moused_enable="YES" # Run the mouse daemon
+moused_type="microsoft"
+moused_port="/dev/cuaa0"
+moused_flags="-3"
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/dial/lang/rc.conf.pl b/release/picobsd/dial/lang/rc.conf.pl
new file mode 100644
index 0000000..28a0bda
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.conf.pl
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $Id: rc.conf.pl,v 1.3 1998/08/10 19:07:53 abial Exp $
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### System console options #################################
+keymap="pl_PL.ISO_8859-2.kbd" # keymap in /usr/share/syscons/* (or NO).
+keyrate="NO" # keyboard rate to: slow, normal, fast (or NO).
+keybell="NO" # bell to duration.pitch or normal or visual (or NO).
+keychange="NO" # function keys default values (or NO).
+cursor="NO" # cursor type {normal|blink|destructive} (or NO).
+font8x16="iso02-8x16.fnt" # font 8x16 from /usr/share/syscons/* (or NO).
+font8x14="NO" # font 8x14 from /usr/share/syscons/* (or NO).
+font8x8="NO" # font 8x8 from /usr/share/syscons/* (or NO).
+blanktime="NO" # blank time (in seconds) or "NO" to turn it off.
+moused_enable="YES" # Run the mouse daemon
+moused_type="microsoft"
+moused_port="/dev/cuaa0"
+moused_flags="-3"
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/dial/lang/rc.en b/release/picobsd/dial/lang/rc.en
new file mode 100644
index 0000000..9f5fea4
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.en
@@ -0,0 +1,103 @@
+#!/bin/sh
+# $Id: rc.en,v 1.3 1998/08/10 19:07:53 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+# clean up left-over files
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+
+# stdin must be redirected because it might be for a serial console
+kbddev=/dev/ttyv0
+viddev=/dev/ttyv0
+
+echo -n "Configuring console:"
+
+# keymap
+if [ "X${keymap}" != X"NO" ]; then
+ echo -n ' keymap'; kbdcontrol < ${kbddev} -l /usr/share/syscons/${keymap}
+fi
+
+# keyrate
+if [ "X${keyrate}" != X"NO" ]; then
+ echo -n ' keyrate'; kbdcontrol < ${kbddev} -r ${keyrate}
+fi
+
+# keybell
+if [ "X${keybell}" != X"NO" ]; then
+ echo -n ' keybell'; kbdcontrol < ${kbddev} -b ${keybell}
+fi
+
+# change function keys
+if [ "X${keychange}" != X"NO" ]; then
+ echo -n " keychange"
+ set - ${keychange}
+ while [ $# -gt 0 ]
+ do
+ kbdcontrol < ${kbddev} -f "$1" "$2"
+ shift; shift
+ done
+fi
+
+# cursor type
+if [ "X${cursor}" != X"NO" ]; then
+ echo -n ' cursor'; vidcontrol < ${viddev} -c ${cursor}
+fi
+
+# font 8x16
+if [ "X${font8x16}" != X"NO" ]; then
+ echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 /usr/share/syscons/${font8x16}
+fi
+
+# font 8x14
+if [ "X${font8x14}" != X"NO" ]; then
+ echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 /usr/share/syscons/${font8x14}
+fi
+
+# font 8x8
+if [ "X${font8x8}" != X"NO" ]; then
+ echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 /usr/share/syscons/${font8x8}
+fi
+
+# blank time
+if [ "X${blanktime}" != X"NO" ]; then
+ echo -n ' blanktime'; vidcontrol < ${viddev} -t ${blanktime}
+fi
+
+# mouse daemon
+if [ "X${moused_enable}" = X"YES" ] ; then
+ echo -n ' moused'
+ moused ${moused_flags} -p ${moused_port} -t ${moused_type}
+ vidcontrol <${viddev} -m on
+fi
+
+echo ''
+echo ''
+echo ''
+echo '+---------- PicoBSD 0.4 (DIALUP) --------------+'
+echo '| |'
+echo '| Log in as "root" (no password). |'
+echo '| |'
+echo '| This version of PicoBSD is fully under |'
+echo '| BSD license (except for SSH). For more |'
+echo '| details see http://www.freebsd.org/~picobsd, |'
+echo '| or contact the author. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/dial/lang/rc.network.en b/release/picobsd/dial/lang/rc.network.en
new file mode 100644
index 0000000..ff32f44
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.network.en
@@ -0,0 +1,70 @@
+#!/bin/sh -
+# $Id: rc.network.en,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+network_pass1() {
+ echo -n 'Doing initial network setup:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Additional routing options:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' turning on ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/dial/lang/rc.network.pl b/release/picobsd/dial/lang/rc.network.pl
new file mode 100644
index 0000000..196f32b
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.network.pl
@@ -0,0 +1,70 @@
+#!/bin/sh -
+# $Id: rc.network.pl,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/dial/lang/rc.pl b/release/picobsd/dial/lang/rc.pl
new file mode 100644
index 0000000..7197f11
--- /dev/null
+++ b/release/picobsd/dial/lang/rc.pl
@@ -0,0 +1,107 @@
+#!/bin/sh
+#
+# $Id: rc.pl,v 1.3 1998/08/10 19:07:53 abial Exp $
+#
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+
+# stdin must be redirected because it might be for a serial console
+kbddev=/dev/ttyv0
+viddev=/dev/ttyv0
+
+echo -n "Konfigurowanie konsoli:"
+
+# keymap
+if [ "X${keymap}" != X"NO" ]; then
+ echo -n ' mapa klawiatury'; kbdcontrol <${kbddev} -l /usr/share/syscons/${keymap}
+fi
+
+# keyrate
+if [ "X${keyrate}" != X"NO" ]; then
+ echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
+fi
+
+# keybell
+if [ "X${keybell}" != X"NO" ]; then
+ echo -n ' keybell'; kbdcontrol <${kbddev} -b ${keybell}
+fi
+
+# change function keys
+if [ "X${keychange}" != X"NO" ]; then
+ echo -n " keychange"
+ set - ${keychange}
+ while [ $# -gt 0 ]
+ do
+ kbdcontrol <${kbddev} -f "$1" "$2"
+ shift; shift
+ done
+fi
+
+# cursor type
+if [ "X${cursor}" != X"NO" ]; then
+ echo -n ' kursor'; vidcontrol <${viddev} -c ${cursor}
+fi
+
+# font 8x16
+if [ "X${font8x16}" != X"NO" ]; then
+ echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 /usr/share/syscons/${font8x16}
+fi
+
+# font 8x14
+if [ "X${font8x14}" != X"NO" ]; then
+ echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 /usr/share/syscons/${font8x14}
+fi
+
+# font 8x8
+if [ "X${font8x8}" != X"NO" ]; then
+ echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 /usr/share/syscons/${font8x8}
+fi
+
+# blank time
+if [ "X${blanktime}" != X"NO" ]; then
+ echo -n ' wygaszacz'; vidcontrol <${viddev} -t ${blanktime}
+fi
+
+# mouse daemon
+if [ "X${moused_enable}" = X"YES" ] ; then
+ echo -n ' moused'
+ moused ${moused_flags} -p ${moused_port} -t ${moused_type}
+ vidcontrol <${viddev} -m on
+fi
+
+echo ''
+echo ''
+echo '+----------- PicoBSD 0.4 (DIALUP) -------------+'
+echo '| |'
+echo '| Zaloguj sie jako "root" (brak hasla). |'
+echo '| |'
+echo '| PicoBSD podlega licencji BSD (z wyjatkiem |'
+echo '| SSH). Po wiecej szczegolow zajrzyj na |'
+echo '| http://www.freebsd.org/~picobsd, lub |'
+echo '| skontaktuj sie z autorem. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/dial/lang/reboot.en b/release/picobsd/dial/lang/reboot.en
new file mode 100755
index 0000000..a99ac6d
--- /dev/null
+++ b/release/picobsd/dial/lang/reboot.en
@@ -0,0 +1,3 @@
+#!/bin/sh
+# $Id: reboot.en,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+exec /sbin/echo "Press Ctrl-Alt-Del instead of $0"
diff --git a/release/picobsd/dial/lang/reboot.pl b/release/picobsd/dial/lang/reboot.pl
new file mode 100755
index 0000000..50dc6e8
--- /dev/null
+++ b/release/picobsd/dial/lang/reboot.pl
@@ -0,0 +1,3 @@
+#!/bin/sh
+#$Id: reboot.pl,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+exec /sbin/echo "Zamiast $0 nacisnij Ctrl-Alt-Del"
diff --git a/release/picobsd/dial/lang/resolv.conf.en b/release/picobsd/dial/lang/resolv.conf.en
new file mode 100644
index 0000000..c373f5b
--- /dev/null
+++ b/release/picobsd/dial/lang/resolv.conf.en
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.en,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+domain mydomain.edu
+nameserver 192.33.4.12
diff --git a/release/picobsd/dial/lang/resolv.conf.pl b/release/picobsd/dial/lang/resolv.conf.pl
new file mode 100644
index 0000000..1843c29
--- /dev/null
+++ b/release/picobsd/dial/lang/resolv.conf.pl
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.pl,v 1.2 1998/08/10 19:07:53 abial Exp $
+domain mydomain.org.pl
+nameserver 194.204.159.1
diff --git a/release/picobsd/dial/lang/update.en b/release/picobsd/dial/lang/update.en
new file mode 100755
index 0000000..006e0ed
--- /dev/null
+++ b/release/picobsd/dial/lang/update.en
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $Id: update.en,v 1.4 1998/08/10 19:07:53 abial Exp $
+pwd=`pwd`
+echo -n "Updating /etc contents on startup floppy... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "Cannot mount the floppy read-write!"
+ echo "Check the write-protection..."
+ exit 1
+fi
+cd /etc
+cp -Rp . /start_floppy/etc/
+echo " Done."
+echo -n "Updating kernel parameters... "
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd ${pwd}
+echo " Done."
diff --git a/release/picobsd/dial/lang/update.pl b/release/picobsd/dial/lang/update.pl
new file mode 100755
index 0000000..97105d2
--- /dev/null
+++ b/release/picobsd/dial/lang/update.pl
@@ -0,0 +1,21 @@
+#!/bin/sh
+# $Id: update.pl,v 1.4 1998/08/10 19:07:53 abial Exp $
+pwd=`pwd`
+echo -n "Uaktualniam katalog /etc na dyskietce... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "B³±d podczas montowania read/write dyskietki!"
+ echo "Sprawd¼, czy nie jest zabezpieczona przed zapisem..."
+ exit 1
+fi
+cd /etc
+cp -Rp . /start_floppy/etc/
+echo " Zrobione."
+echo -n "Uaktualniam parametry j±dra..."
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd /etc
+cd ${pwd}
+echo " Zrobione."
diff --git a/release/picobsd/dial/mfs.tree/MAKEDEV b/release/picobsd/dial/mfs.tree/MAKEDEV
new file mode 100755
index 0000000..287da34
--- /dev/null
+++ b/release/picobsd/dial/mfs.tree/MAKEDEV
@@ -0,0 +1,1167 @@
+#!/bin/sh -
+#
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
+#
+# Written and contributed by W. Jolitz 12/90
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
+#
+# Device "make" file. Valid arguments:
+# all makes all known devices, standard number of units (or close)
+# std standard devices
+# local configuration specific devices
+# mach-4 mach4&lites+devices for Mach's XFree86 distribution
+# (see http://www.cs.hut.fi/lites.html for more info on LITES)
+#
+# Tapes:
+# wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape
+# st* "NEW type scsi tapes" (old driver uses the
+# block devices of the disks to get access)
+# ft* QIC-40/QIC-80 3M cartridge tape (interfaced
+# via the floppy disk controller)
+#
+# Disks:
+# wd* "Winchester" disk drives (ST506,IDE,ESDI,RLL,...)
+# wfd* "IDE floppy" disk drives (LS-120)
+# fd* "floppy" disk drives (3 1/2", 5 1/4")
+# sd* "SCSI disks"
+# cd* "SCSI CD-ROM disks"
+# mcd* "Mitsumi CD-ROM disks"
+# scd* "Sony CD-ROM disks"
+# matcd* "Matsushita (Panasonic) CD-ROM disks"
+# wcd* "IDE CD-ROM disks"
+# vn* "vnode disks"
+# od* "optical disks"
+#
+# Console ports:
+# vty* virtual console devices for syscons/pcvt/codrv
+#
+# Pointing devices:
+# mse* Logitech and ATI Inport bus mouse
+# psm* PS/2 mouse
+# sysmouse Mousesystems mouse emulator for syscons
+#
+# Time devices:
+# refclock-* serial ports used by xntpd parse refclocks
+#
+# Terminal ports:
+# tty* general purpose serial ports
+# cua* dialout serial ports
+# ttyA* Specialix SI/XIO dialin ports ('*' = number of devices)
+# cuaA* Specialix SI/XIO dialout ports
+# ttyD* Digiboard - 16 dialin ports
+# cuaD* Digiboard - 16 dialout ports
+# ttyR* Rocketport dialin ports
+# cuaR* Rocketport dialout ports
+#
+# Pseudo terminals:
+# pty* set of 32 master and slave pseudo terminals
+# vty* virtual terminals using syscons/pcvt/codrv console
+#
+# Printers:
+# lpt* stock lp
+#
+# SCSI devices (other than CD-ROM, tape and disk):
+# ssc The ``super scsi'' device
+# uk* "unknown" device (supports ioctl calls only)
+# worm* WORM driver
+# pt* Processor Type (HP scanner, as one example)
+#
+# PC-CARD (previously called PCMCIA) support
+# card* PC-CARD slots
+#
+# Special purpose devices:
+# apm Advanced Power Management BIOS
+# bpf* packet filter
+# speaker pc speaker
+# tw* xten power controller
+# snd* various sound cards
+# pcaudio PCM audio driver
+# socksys iBCS2 socket system driver
+# vat VAT compatibility audio driver (requires snd*)
+# gsc Genius GS-4500 hand scanner
+# joy pc joystick
+# tun* Tunneling IP device
+# snp* tty snoop devices
+# spigot Video Spigot video acquisition card
+# ctx* Cortex-I video acquisition card
+# meteor* Matrox Meteor video acquisition card (pci)
+# bktr* Bt848 based video acquisition card (pci)
+# labpc* National Instrument's Lab-PC and LAB-PC+
+# perfmon CPU performance-monitoring counters
+# pci PCI configuration-space access from user mode
+# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
+#
+# $Id: MAKEDEV,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+#
+
+PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
+umask 77
+
+# Usage: die exitcode msg
+die() {
+ echo $2
+ exit $1
+}
+
+# Convert integer to partition name
+dkitop() {
+ local p
+
+ case $1 in
+ 0) p=a;; 1) p=b;; 2) p=c;; 3) p=d;; 4) p=e;; 5) p=f;; 6) p=g;; 7) p=h;;
+ *) p="?";;
+ esac
+ echo $p
+}
+
+# Convert integer to slice name
+dkitos() {
+ local s
+
+ case $1 in
+ 0) s="";;
+ 1) s="";;
+ *) s=s$(($1-1));;
+ esac
+ echo $s
+}
+
+# Convert disk (type, unit, slice, partition) to minor number
+dkminor()
+{
+ echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
+}
+
+# Override mknod(2) to add extra handling to it.
+mknod() {
+ rm -f "$1" || exit 1
+ /sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
+ chown root.wheel "$1" || exit 1
+}
+
+# Convert the last character of a tty name to a minor number.
+ttyminor()
+{
+ case $unit in
+ [0-9]) m=$unit;;
+ a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
+ h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
+ o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
+ v) m=31;;
+ *) m="?";;
+ esac
+ echo $m
+}
+
+# Raw partition for disks
+dkrawpart=2
+
+# Compatibility slice for disks
+dkcompatslice=0
+
+# Raw slice for disks
+dkrawslice=1
+
+# Control bit for SCSI
+scsictl=$((1 << 29))
+
+# Standard umasks
+disk_umask=037 # allow group operator to read disks
+tape_umask=017 # allow group operator to read/write tapes
+
+for i in $*; do
+case $i in
+
+all)
+ sh MAKEDEV std # standard
+ sh MAKEDEV fd0 fd1 # bdev, floppy disk
+ sh MAKEDEV sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 # bdev, ordinary disk
+ sh MAKEDEV od0 # bdev, optical disk
+ sh MAKEDEV wfd0 # bdev, LS-120 floppy
+ sh MAKEDEV vn0 # bdev, virtual disk
+ sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
+ sh MAKEDEV ft0 st0 wt0 # bdev, tape
+ sh MAKEDEV vty4 # cdev, virtual tty
+ sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
+ sh MAKEDEV pty0 # cdev, pseudo tty
+ sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3 # cdev, serial tty
+ sh MAKEDEV mse0 psm0 sysmouse # cdev, mouse
+ sh MAKEDEV pcaudio speaker # cdev, noise
+ sh MAKEDEV lpt0 lpt1 lpt2 # cdev, printer
+ sh MAKEDEV bpf0 ipl tun0 # cdev, network
+ sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
+ sh MAKEDEV apm card0 card1 # cdev, laptop
+ ;;
+std)
+ mknod console c 0 0; chmod 600 console
+ mknod drum c 4 0; chmod 640 drum; chgrp kmem drum
+ mknod kmem c 2 1; chmod 640 kmem; chgrp kmem kmem
+ mknod mem c 2 0; chmod 640 mem; chgrp kmem mem
+ mknod null c 2 2; chmod 666 null
+ mknod random c 2 3; chmod 644 random
+ mknod urandom c 2 4; chmod 644 urandom
+ mknod zero c 2 12; chmod 666 zero
+ mknod io c 2 14; chmod 600 io
+ mknod tty c 1 0; chmod 666 tty
+ mknod klog c 7 0; chmod 600 klog
+ mknod stdin c 22 0; chmod 666 stdin
+ mknod stdout c 22 1; chmod 666 stdout
+ mknod stderr c 22 2; chmod 666 stderr
+ mknod lkm c 32 0; chmod 644 lkm
+ mknod pci c 78 0; chmod 644 pci
+ mkdir -p fd
+ (cd fd && eval `echo "" | awk ' BEGIN { \
+ for (i = 0; i < 64; i++) \
+ printf("mknod %d c 22 %d;", i, i)}'`)
+ chown -R bin.bin fd
+ chmod 555 fd
+ chmod 666 fd/*
+ ;;
+
+mach-4)
+ mknod iopl c 22 0
+ mknod kbd c 23 0
+ mknod mouse c 24 0
+ mknod time c 25 0
+ mknod timezone c 26 0
+ ;;
+
+# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
+wt*)
+ umask $tape_umask
+ u=`expr $i : '..\(.*\)'`
+ if [ x$u = x ]; then u=0; fi
+ mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
+ mknod nrwt${u} c 10 `expr 4 + $u`
+# mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks
+# mknod nrWt${u} c 10 `expr 68 + $u`
+ mknod rwt${u}b c 10 `expr 16 + $u` # 60 megabytes
+ mknod nrwt${u}b c 10 `expr 20 + $u`
+ mknod rwt${u}c c 10 `expr 24 + $u` # 120 megabytes
+ mknod nrwt${u}c c 10 `expr 28 + $u`
+ mknod rwt${u}d c 10 `expr 32 + $u` # 150 megabytes
+ mknod nrwt${u}d c 10 `expr 36 + $u`
+# mknod rwt${u}e c 10 `expr 40 + $u` # 300 megabytes?
+# mknod nrwt${u}e c 10 `expr 44 + $u`
+# mknod rwt${u}f c 10 `expr 48 + $u` # 600 megabytes?
+# mknod nrwt${u}f c 10 `expr 52 + $u`
+ chgrp operator r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
+ umask 77
+ ;;
+
+# Individual slices.
+od*s*|sd*s*|vn*s*|wd*s*|wfd*s*)
+ umask $disk_umask
+ case $i in
+ od*s*) name=od; blk=20; chr=70;;
+ sd*s*) name=sd; blk=4; chr=13;;
+ wd*s*) name=wd; blk=0; chr=3;;
+ vn*s*) name=vn; blk=15; chr=43;;
+ wfd*s*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*s*)
+ unit=`expr $i : '...\([0-9]*\)s'`
+ slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\([0-9]*\)s'`
+ slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ case $slice in
+ [0-9]|[1-2][0-9]|30)
+ oldslice=$slice
+ slice=$(($slice+1))
+ slicename=`dkitos $slice`
+ minor=`dkminor 0 $unit $slice $dkrawpart`
+ mknod $name$unit$slicename b $blk $minor
+ mknod r$name$unit$slicename c $chr $minor
+ case $part in
+ [a-h])
+ case $oldslice in
+ 0) slice=$oldslice ;;
+ esac
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit $slice $part`
+ partname=`dkitop $part`
+ mknod $name$unit$slicename$partname \
+ b $blk $minor
+ mknod r$name$unit$slicename$partname \
+ c $chr $minor
+ done
+ ;;
+ "")
+ ;;
+ *)
+ echo bad partition for disk in: $i
+ ;;
+ esac
+ chgrp operator $name$unit$slicename* \
+ r$name$unit$slicename*
+ ;;
+ *)
+ echo bad slice for disk in: $i
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
+ ;;
+ esac
+ umask 77
+ ;;
+
+fd*)
+ umask $disk_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=fd; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64`
+ # Fake BSD partitions
+ for i in a b c d e f g h
+ do
+ ln ${name}${unit} ${name}${unit}$i
+ ln r${name}${unit} r${name}${unit}$i
+ done
+ # User-readable and programmer-readable name sets
+
+ mknod ${name}${unit}.1720 b $blk `expr $unit '*' 64 + 1`
+ mknod r${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1`
+ # ln ${name}${unit}.1720 ${name}${unit}135hs21
+ # ln r${name}${unit}.1720 r${name}${unit}135hs21
+
+ mknod ${name}${unit}.1480 b $blk `expr $unit '*' 64 + 2`
+ mknod r${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2`
+ # ln ${name}${unit}.1480 ${name}${unit}135hs18
+ # ln r${name}${unit}.1480 r${name}${unit}135hs18
+ # ln ${name}${unit}.1480 ${name}${unit}96hs18
+ # ln r${name}${unit}.1480 r${name}${unit}96hs18
+
+ mknod ${name}${unit}.1440 b $blk `expr $unit '*' 64 + 3`
+ mknod r${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3`
+ # ln ${name}${unit}.1440 ${name}${unit}135
+ # ln r${name}${unit}.1440 r${name}${unit}135
+ # ln ${name}${unit}.1440 ${name}${unit}135ds18
+ # ln r${name}${unit}.1440 r${name}${unit}135ds18
+ # ln ${name}${unit}.1440 ${name}${unit}96ds18
+ # ln r${name}${unit}.1440 r${name}${unit}96ds18
+
+ mknod ${name}${unit}.1200 b $blk `expr $unit '*' 64 + 4`
+ mknod r${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4`
+ # ln ${name}${unit}.1200 ${name}${unit}96
+ # ln r${name}${unit}.1200 r${name}${unit}96
+ # ln ${name}${unit}.1200 ${name}${unit}96ds15
+ # ln r${name}${unit}.1200 r${name}${unit}96ds15
+ # ln ${name}${unit}.1200 ${name}${unit}135ds15
+ # ln r${name}${unit}.1200 r${name}${unit}135ds15
+
+ mknod ${name}${unit}.820 b $blk `expr $unit '*' 64 + 5`
+ mknod r${name}${unit}.820 c $chr `expr $unit '*' 64 + 5`
+ # ln ${name}${unit}.820 ${name}${unit}96hs10
+ # ln r${name}${unit}.820 r${name}${unit}96hs10
+ # ln ${name}${unit}.820 ${name}${unit}135hs10
+ # ln r${name}${unit}.820 r${name}${unit}135hs10
+
+ mknod ${name}${unit}.800 b $blk `expr $unit '*' 64 + 6`
+ mknod r${name}${unit}.800 c $chr `expr $unit '*' 64 + 6`
+ # ln ${name}${unit}.800 ${name}${unit}96ds10
+ # ln r${name}${unit}.800 r${name}${unit}96ds10
+ # ln ${name}${unit}.800 ${name}${unit}135ds10
+ # ln r${name}${unit}.800 r${name}${unit}135ds10
+
+ mknod ${name}${unit}.720 b $blk `expr $unit '*' 64 + 7`
+ mknod r${name}${unit}.720 c $chr `expr $unit '*' 64 + 7`
+ # ln ${name}${unit}.720 ${name}${unit}96ds9
+ # ln r${name}${unit}.720 r${name}${unit}96ds9
+ # ln ${name}${unit}.720 ${name}${unit}135ds9
+ # ln r${name}${unit}.720 r${name}${unit}135ds9
+
+ mknod ${name}${unit}.360 b $blk `expr $unit '*' 64 + 8`
+ mknod r${name}${unit}.360 c $chr `expr $unit '*' 64 + 8`
+ # ln ${name}${unit}.360 ${name}${unit}48
+ # ln r${name}${unit}.360 r${name}${unit}48
+ # ln ${name}${unit}.360 ${name}${unit}48ds9
+ # ln r${name}${unit}.360 r${name}${unit}48ds9
+
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ft*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=ft; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64 + 32`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64 + 32`
+ ln ${name}${unit} ${name}${unit}a
+ ln r${name}${unit} r${name}${unit}a
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+od*|sd*|vn*|wd*|wfd*)
+ umask $disk_umask
+ case $i in
+ od*) name=od; blk=20; chr=70;;
+ sd*) name=sd; blk=4; chr=13;;
+ vn*) name=vn; blk=15; chr=43;;
+ wd*) name=wd; blk=0; chr=3;;
+ wfd*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*)
+ unit=`expr $i : '...\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for slicepartname in s0h s1 s2 s3 s4
+ do
+ sh MAKEDEV $name$unit$slicepartname
+ done
+ case $name in
+ od|sd)
+ minor=`dkminor 0 $unit 0 0`
+ mknod r${name}${unit}.ctl c $chr $(($minor | $scsictl))
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ccd*)
+ umask $disk_umask
+ name=ccd
+ blk=21; chr=74
+ unit=`expr $i : '...\(.*\)'`
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit 0 $part`
+ partname=`dkitop $part`
+ mknod $name$unit$partname b $blk $minor
+ mknod r$name$unit$partname c $chr $minor
+ done
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ssc*)
+ mknod ssc c 49 0
+ ;;
+
+uk*)
+ unit=`expr $i : 'uk\(.*\)'`
+ mknod uk$unit c 31 $unit
+ ;;
+
+worm*)
+ umask $disk_umask
+ unit=`expr $i : 'worm\(.*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ chr=62
+ blk=23
+ name=worm
+ mknod ${name}${unit} b $blk ${unit}
+ mknod r${name}${unit} c $chr ${unit}
+ chgrp operator ${name}${unit} r${name}${unit}
+ umask 077
+ mknod r${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+# SCSI processor type driver
+pt[0-9]*)
+ chr=61
+ name=pt
+ unit=`expr $i : 'pt\([0-9][0-9]*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ unit=`expr $unit + 1 - 1`
+ mknod ${name}${unit} c $chr $unit
+ mknod ${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+pty*)
+ class=`expr $i : 'pty\(.*\)'`
+ case $class in
+ 0) offset=0 name=p;;
+ 1) offset=32 name=q;;
+ 2) offset=64 name=r;;
+ 3) offset=96 name=s;;
+# Note that xterm (at least) only look at p-s.
+ 4) offset=128 name=P;;
+ 5) offset=160 name=Q;;
+ 6) offset=192 name=R;;
+ 7) offset=224 name=S;;
+ # This still leaves [tuTU].
+ *) echo bad unit for pty in: $i;;
+ esac
+ case $class in
+ 0|1|2|3|4|5|6|7)
+ umask 0
+ eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
+ for (i = 0; i < 32; i++) {
+ c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
+ printf("mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d;", \
+ n, c, b+i, \
+ n, c, b+i); \
+ } \
+ }'`
+ umask 77
+ ;;
+ esac
+ ;;
+
+st*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ chr=14
+
+ case $unit in
+ 0|1|2|3|4|5|6)
+ for mode in 0 1 2 3
+ do
+ mknod rst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 0`
+ mknod nrst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 1`
+ mknod erst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 2`
+ mknod st${unit}ctl.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 3`
+ chgrp operator rst${unit}.${mode}\
+ nrst${unit}.${mode} \
+ erst${unit}.${mode} \
+ st${unit}ctl.${mode}
+ chmod 600 st${unit}ctl.${mode}
+ done
+ mknod rst${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 rst${unit}.ctl
+
+ ln rst${unit}.0 rst${unit}
+ ln nrst${unit}.0 nrst${unit}
+ ln erst${unit}.0 erst${unit}
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ch*)
+ umask 37
+ unit=`expr $i : '..\(.*\)'`
+ case $i in
+ ch*) name=ch; chr=17;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit} c $chr `expr $unit '*' 16 + 0`
+ chgrp operator ${name}${unit}
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ *)
+ echo bad unit for media changer in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+cd*|mcd*|scd*)
+ umask $disk_umask
+ case $i in
+ cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
+ mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
+ scd*) unit=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ case $name in
+ cd)
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+matcd*)
+ umask 2
+ case $i in
+ matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
+
+ mknod ${name}${unit}la b $blk `expr $unit '*' 8 + 128`
+ mknod ${name}${unit}lc b $blk `expr $unit '*' 8 + 130`
+ mknod r${name}${unit}la c $chr `expr $unit '*' 8 + 128`
+ mknod r${name}${unit}lc c $chr `expr $unit '*' 8 + 130`
+ chgrp operator ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ chmod 640 ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+wcd*)
+ umask 2 ;
+ unit=`expr $i : '...\(.*\)'`
+ blk=19
+ chr=69
+ case $unit in
+ 0|1|2|3)
+ mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
+ chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+lpt*)
+ unit=`expr $i : 'lpt\(.*\)'`
+ mknod lpt$unit c 16 $unit
+ mknod lpctl$unit c 16 `expr $unit + 128`
+ ;;
+
+tw*)
+ unit=`expr $i : 'tw\(.*\)'`
+ mknod tw$unit c 19 $unit
+ chgrp operator tw$unit
+ ;;
+
+# Use this to create virtual consoles for syscons, pcvt or codrv
+# ttyv0-b
+# use as MAKEDEV vtyNN to create NN entries
+vty*)
+ chr=12
+ units=`expr $i : 'vty\(.*\)'`
+ eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
+ for (i = 0; i < n; i++)
+ printf("mknod ttyv%01x c %d %d;", i, c, i); }'`
+ ln -fs ttyv0 vga # XXX X still needs this pccons relic
+ ;;
+
+bpf*)
+ unit=`expr $i : 'bpf\(.*\)'`
+ mknod bpf$unit c 23 $unit
+ ;;
+
+speaker)
+ mknod speaker c 26 0
+ ;;
+
+cuaa?|cua?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuaa$unit c 28 `expr $m + 128`
+ mknod cuaia$unit c 28 `expr $m + 32 + 128`
+ mknod cuala$unit c 28 `expr $m + 64 + 128`
+ chown uucp.dialer cua*a$unit
+ umask 77
+ ;;
+
+tty0?|ttyd?|tty?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttyd$unit c 28 $m
+ mknod ttyid$unit c 28 `expr $m + 32`
+ mknod ttyld$unit c 28 `expr $m + 64`
+ ;;
+
+cuac?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuac$name c $major `expr $minor + 128`
+ mknod cuaic$name c $major `expr $minor + 32 + 128`
+ mknod cualc$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cuac$name cuaic$name cualc$name
+ done
+ umask 77
+ ;;
+
+ttyc?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyc$name c $major $minor
+ mknod ttyic$name c $major `expr $minor + 32`
+ mknod ttylc$name c $major `expr $minor + 64`
+ done
+ ;;
+
+# RISCom8 'rc' driver entries
+
+cuam?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuam$unit c 63 `expr $m + 128`
+ chown uucp.dialer cuam$unit
+ umask 77
+ ;;
+
+ttym?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttym$unit c 63 $m
+ ;;
+
+# Specialix SI/XIO.
+# Note: these are 'base 1' to match the numbers on the panels, and to match
+# the manual that comes with the system.
+ttyA*)
+ major=68
+ nports=`expr $i : 'ttyA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod ttyA$name c $major $minor
+ mknod ttyiA$name c $major `expr $minor + 65536`
+ mknod ttylA$name c $major `expr $minor + 131072`
+ port=`expr $port + 1`
+ done
+ # For the user-mode control program, 'sicontrol'
+ mknod si_control c 68 262144
+ ;;
+
+cuaA*)
+ umask 7
+ major=68
+ nports=`expr $i : 'cuaA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod cuaA$name c $major `expr $minor + 128`
+ mknod cuaiA$name c $major `expr $minor + 128 + 65536`
+ mknod cualA$name c $major `expr $minor + 128 + 131072`
+ chown uucp.dialer cuaA$name cuaiA$name cualA$name
+ port=`expr $port + 1`
+ done
+ umask 77
+ ;;
+
+# Digiboard PC/?? 16 port card.
+# The current scheme of minor numbering is:
+#
+# unused{14} CARD{2} major{8} CALLOUT{1} LOCK{1} INIT{1} PORT{5}
+#
+# CARD bitfield in future versions may be extended to 3 bits.
+#
+# See dgb(4)
+#
+ttyD?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyD$name c $major $minor
+ mknod ttyiD$name c $major `expr $minor + 32`
+ mknod ttylD$name c $major `expr $minor + 64`
+ done
+ ;;
+
+cuaD?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuaD$name c $major `expr $minor + 128`
+ mknod cuaiD$name c $major `expr $minor + 32 + 128`
+ mknod cualD$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cua*D$name
+ done
+ umask 77
+ ;;
+
+ttyR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/ttyR*; rm -f /dev/ttyiR*; rm -f /dev/ttylR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/ttyR$Rnum c $major $MINOR
+ mknod /dev/ttylR$Rnum c $major `expr $MINOR + 32`
+ mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ ;;
+
+cuaR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/cuaR*; rm -f /dev/cuaiR*; rm -f /dev/cualR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/cuaR$Rnum c $major `expr $MINOR + 128`
+ mknod /dev/cualR$Rnum c $major `expr $MINOR + 128 + 32`
+ mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ chown uucp.dialer /dev/cuaR*
+ ;;
+
+mse*)
+ unit=`expr $i : 'mse\(.*\)'`
+ chr=27
+ mknod mse$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+psm*)
+ unit=`expr $i : 'psm\(.*\)'`
+ chr=21
+ mknod psm$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+mouse*)
+ name=`expr $i : 'mouse\(.*\)'`
+ if [ ! -c $name ]; then
+ $0 $name # make the appropriate device
+ fi
+ ln -fs $name mouse
+ ;;
+
+pcaudio)
+ mknod pcaudio c 24 0
+ mknod pcaudioctl c 24 128
+ ;;
+
+socksys)
+ mknod socksys c 41 0
+ mknod spx c 41 1
+ ln -fs socksys nfsd
+ chmod 666 socksys nfsd spx
+ ;;
+
+snd*)
+#
+# changes from Linux voxware
+# minor Linux FreeBSD
+# 8 sequencer2 (aka music0) music0
+# 17 patmgr0 sequencer1
+# 33 patmgr1 sequencer2
+#
+
+ unit=`expr $i : 'snd\(.*\)'`
+ chr=30
+
+ # XXX write this less verbosely, like std
+ snd_security_hole=0 # XXX
+ umask $snd_security_hole
+
+ if [ $unit = "0" ] ; then
+ ln -fs mixer$unit mixer
+ ln -fs sequencer$unit sequencer
+ ln -fs dsp$unit dsp
+ ln -fs audio$unit audio
+ ln -fs dspW$unit dspW
+ ln -fs music$unit music
+ ln -fs pss$unit pss
+ fi
+
+ mknod mixer$unit c $chr `expr $unit '*' 16 + 0`
+ mknod sequencer$unit c $chr `expr $unit '*' 16 + 1`
+ mknod midi$unit c $chr `expr $unit '*' 16 + 2`
+ mknod dsp$unit c $chr `expr $unit '*' 16 + 3`
+ mknod audio$unit c $chr `expr $unit '*' 16 + 4`
+ mknod dspW$unit c $chr `expr $unit '*' 16 + 5`
+ mknod sndstat c $chr 6
+ # minor number 7 is unused
+ mknod music$unit c $chr `expr $unit '*' 16 + 8`
+ mknod pss$unit c $chr `expr $unit '*' 16 + 9`
+ # minor numbers 10-15 are unused
+ umask 77
+ ;;
+
+vat)
+ mknod vatio c 25 128
+ chmod 660 vatio
+ ;;
+
+gsc*)
+ unit=`expr $i : 'gsc\(.*\)'`
+ mknod gsc${unit} c 47 $unit
+ mknod gsc${unit}p c 47 $(($unit + 8))
+ mknod gsc${unit}d c 47 $(($unit + 32))
+ mknod gsc${unit}pd c 47 $(($unit + 40))
+ chmod 666 gsc${unit}*
+ ;;
+
+apm*)
+ chr=39
+ mknod apm c $chr 0
+ chgrp operator apm
+ chmod 660 apm
+ ;;
+
+card*)
+ unit=`expr $i : 'card\(.*\)'`
+ chr=50
+ mknod card$unit c $chr $unit
+ chmod 644 card$unit
+ ;;
+
+ttyx?|ttyy?|ttyz?)
+ case $i in
+ *0) unit=0;; *1) unit=1;; *2) unit=2;; *3) unit=3;;
+ *4) unit=4;; *5) unit=5;; *6) unit=6;; *7) unit=7;;
+ *8) unit=8;; *9) unit=9;; *a) unit=10;; *b) unit=11;;
+ *c) unit=12;; *d) unit=13;; *e) unit=14;; *f) unit=15;;
+ esac
+ case $i in
+ ttyy?) unit=`expr $unit \+ 16`;;
+ ttyz?) unit=`expr $unit \+ 32`;;
+ esac
+ mknod $i c 42 $unit
+ chown uucp.wheel $i
+ ;;
+
+cronyx)
+ mknod cronyx c 42 63
+ ;;
+
+joy)
+ mknod joy0 c 51 0
+ mknod joy1 c 51 1
+ chgrp operator joy0 joy1
+ chmod 640 joy0 joy1
+ ;;
+
+spigot)
+ mknod spigot c 11 0
+ chmod 444 spigot
+ ;;
+
+ctx?)
+ unit=`expr $i : 'ctx\(.*\)'`
+ mknod ctx$unit c 40 $unit
+ chmod 444 ctx$unit
+ ;;
+
+meteor?)
+ unit=`expr $i : 'meteor\(.*\)'`
+ mknod meteor$unit c 67 $unit
+ chmod 444 meteor$unit
+ ;;
+
+bktr?)
+ unit=`expr $i : 'bktr\(.*\)'`
+ mknod bktr$unit c 92 $unit
+ mknod tuner$unit c 92 $((16 + $unit ))
+ chmod 444 bktr$unit tuner$unit
+ ;;
+
+tun*)
+ ntun=`expr $i : 'tun\(.*\)$'`
+ unit=0
+ while [ $unit -le $ntun ]; do
+ mknod tun$unit c 52 $unit
+ chown uucp.dialer tun$unit
+ unit=`expr $unit + 1`
+ done
+ ;;
+
+sysmouse)
+ mknod sysmouse c 12 128
+ mknod consolectl c 12 255
+ ;;
+
+snp?)
+ unit=`expr $i : 'snp\(.*\)'`
+ mknod snp$unit c 53 $unit
+ ;;
+
+# dufault@hda.com: If I do much more work on other A-D boards
+# then eventually we'll have a "ad" and "dio" interface and some of these
+# "labpcaio" ones will be gone.
+# labpcaio: D-A and A-D.
+# labpcdio: Digital in and Digital out.
+#
+labpc*)
+ umask 7
+ case $i in
+ labpcaio*)
+ name=labpcaio
+ unit=`expr $i : 'labpcaio\(.*\)'`
+ all="0 1 2 3 4 5 6 7"
+ offset=0
+ ;;
+ labpcdio*)
+ name=labpcdio
+ unit=`expr $i : 'labpcdio\(.*\)'`
+ all="0 1 2 3"
+ offset=8
+ ;;
+ *)
+ die 3 "Don't know LabPC type $i"
+ ;;
+ esac
+ if [ "X${unit}" = "X" ]; then
+ unit=all
+ fi
+ case $unit in
+ 0|1|2|3|4|5|6|7)
+ mknod $name$unit c 66 `expr $offset + $unit `
+ ;;
+ all)
+ for i in $all
+ do
+ mknod $name$i c 66 `expr $offset + $i `
+ done
+ ;;
+ *)
+ echo "No such LabPC unit: $unit"
+ ;;
+ esac
+ umask 77
+ ;;
+
+perfmon)
+ mknod perfmon c 2 32
+ chgrp kmem perfmon
+ chmod 640 perfmon
+ ;;
+
+ipl)
+ mknod ipl c 79 0
+ mknod ipnat c 79 1
+ mknod ipstate c 79 2
+ mknod ipauth c 79 3
+ ;;
+
+local)
+ umask 0 # XXX should be elsewhere
+ sh MAKEDEV.local
+ umask 77
+ ;;
+
+*)
+ echo $i - no such device name
+ ;;
+
+esac
+done
diff --git a/release/picobsd/dial/mfs.tree/Makefile b/release/picobsd/dial/mfs.tree/Makefile
new file mode 100644
index 0000000..e2b9b80
--- /dev/null
+++ b/release/picobsd/dial/mfs.tree/Makefile
@@ -0,0 +1,69 @@
+#
+# $Id: Makefile,v 1.3 1998/08/10 19:08:02 abial Exp $
+#
+
+DESTDIR?=/mnt
+
+STAND_LINKS= bin sbin
+USR_LINKS= bin sbin libexec
+PL_LOCALE_LINKS= pl polish
+US_LOCALE_LINKS= en english
+
+.if ${LANGUAGE} == pl
+LOCALE= pl_PL.ISO_8859-2
+LOCALE_LINKS=${PL_LOCALE_LINKS}
+FONT=iso02-8x16.fnt
+KBD=pl_PL.ISO_8859-2.kbd
+.else
+LOCALE= en_US.ISO_8859-1
+LOCALE_LINKS=${US_LOCALE_LINKS}
+.endif
+
+all: tree links
+
+tree:
+ mtree -deU -f mfs.mtree -p ${DESTDIR}
+
+links: tree
+ (cd ${DESTDIR}; \
+ for i in ${STAND_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd var/run; \
+ ln -s /dev/null log; \
+ cd ../../usr; \
+ for i in ${USR_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd share/misc;\
+ ln -s /etc/termcap termcap; \
+ echo emacs >/usr/share/misc/init.ee; \
+ cd ../; \
+ cd locale; \
+ for i in ${LOCALE_LINKS}; \
+ do \
+ ln -s ${LOCALE} $${i}; \
+ done; \
+ cp /usr/share/locale/${LOCALE}/* ${LOCALE}/; \
+ if [ "X${FONT}" != "X" ]; \
+ then \
+ cp /usr/share/syscons/fonts/${FONT} ../syscons/; \
+ cp /usr/share/syscons/keymaps/${KBD} ../syscons/; \
+ fi; \
+ cd ../nls; \
+ for i in ${LOCALE_LINKS}; \
+ do \
+ ln -s ${LOCALE} $${i}; \
+ done;)
+
+
+# We don't do it under 'all' because it's needed only on non-DEVFS systems
+devnodes: tree
+ (cp MAKEDEV ${DESTDIR}/dev/; \
+ cd ${DESTDIR}/dev; \
+ ./MAKEDEV std tun2 vty10 fd0 wd0 wd0s1h pty0; \
+ rm MAKEDEV;)
+
+clean:
diff --git a/release/picobsd/dial/mfs.tree/login.conf b/release/picobsd/dial/mfs.tree/login.conf
new file mode 100644
index 0000000..ddfb8cc
--- /dev/null
+++ b/release/picobsd/dial/mfs.tree/login.conf
@@ -0,0 +1,62 @@
+# $Id: login.conf,v 1.1 1998/08/10 19:08:02 abial Exp $
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=krb_skey_or_passwd,passwd,kerberos,skey:
+
+auth-root-defaults:\
+ :auth-login=krb_skey_or_passwd,passwd,kerberos,skey:\
+ :auth-rlogin=krb_or_skey,kerberos,skey:
+auth-ftp-defaults:\
+ :auth=skey_or_pwd,passwd,skey:
+# Example defaults
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+# root - fallback for root logins
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:
+# Settings used by /etc/rc
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
diff --git a/release/picobsd/dial/mfs.tree/mfs.mtree b/release/picobsd/dial/mfs.tree/mfs.mtree
new file mode 100644
index 0000000..e29df1d
--- /dev/null
+++ b/release/picobsd/dial/mfs.tree/mfs.mtree
@@ -0,0 +1,58 @@
+#
+# $Id: mfs.mtree,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
+#
+/set type=dir uname=root gname=wheel mode=0755
+.
+ dev
+ ..
+ dos
+ ..
+ etc
+ ..
+ help
+ ..
+ mnt
+ ..
+ mnt1
+ ..
+ mnt2
+ ..
+ proc
+ ..
+ stand
+ ..
+ start_floppy
+ ..
+ tmp
+ ..
+ usr
+ share
+ locale
+ pl_PL.ISO_8859-2
+ ..
+ en_US.ISO_8859-1
+ ..
+ ..
+ misc
+ ..
+ nls
+ pl_PL.ISO_8859-2
+ ..
+ en_US.ISO_8859-1
+ ..
+ ..
+ syscons
+ ..
+ ..
+ ..
+ var
+ db
+ ..
+ run
+ ..
+ spool
+ lock
+ ..
+ ..
+ ..
+..
diff --git a/release/picobsd/doc/bugs.html b/release/picobsd/doc/bugs.html
new file mode 100644
index 0000000..a320659
--- /dev/null
+++ b/release/picobsd/doc/bugs.html
@@ -0,0 +1,82 @@
+<HTML>
+<! $Id: bugs.html,v 1.3 1998/08/19 16:59:35 abial Exp $ >
+<HEAD>
+ <TITLE>History and Bug fixes</TITLE>
+</HEAD>
+<BODY>
+
+<center><h1>History and List of Bugfixes</h1></center>
+
+<p>This is the short release history of PicoBSD, as well as the list of bugs
+which were found. Some of them were already corrected, so that you should read
+the list before reporting a new one.</p>
+
+<p>We tried to make this software bug-free, but life is life... Sorry for the
+ inconvenience.</p>
+
+<h3>PicoBSD 0.4</h3>
+<ul>
+<li>
+ 1998.08.19: PicoBSD 0.4 released.
+ <p>New features include: NATd,
+ netstat, DEVFS/SLICE instead of standard /dev, additional network
+ drivers, and several minor fixes. Distribution contains also
+ a collection of small versions of system programs (TinyWare), among
+ them custom init(8).</p>
+ <p>I added also the fourth type of setup - 'router' - which is a
+ specialized version of PicoBSD that focuses on providing as small
+ as possible router solution.</p>
+</li>
+</ul>
+<h3>PicoBSD 0.31</h3>
+<ul>
+<li>
+ 1998.03.28: Some people reported that the binary files (*.flp) were
+ being corrupted during download because their browsers assumed that
+ these are text files. I changed the names to *.bin - their contents
+ is the same.
+</li>
+<li>
+ 1998.03.20: PicoBSD 0.31 released. New features include: SNMP daemon,
+ better creation of /kernel.config, some other minor fixes. Massive
+ changes in the building scripts. I also removed vn(4) driver from
+ "net" and "isp" floppies.
+</li>
+</ul>
+<h3>PicoBSD 0.3</h3>
+<p>The following bugs were found in this release of PicoBSD:</p>
+<ul>
+<li> 1998.02.27: A bug in kget(8) utility caused it to dump core in certain
+ situations. As a consequence, it wasn't possible to save the changes
+ made in UserConfig (-c). This will be corrected in the next release (or
+ bugfix issue).
+</li>
+<li> 1998.02.24: Wrongly sized MFS caused the passwd(1) on "net" type
+ floppy to fail because of lack of space for temporary files. This bug
+ affected only "net" floppies, and of course the scripts ("2000" looks
+ quite similar to "2200" :-(( ). Also, the 'update' script didn't work
+ as expected...
+<p> This was fixed the same day, and the corrected files are: pb03en1.zip,
+ pb03pn1.zip, and pbsd-s031.tgz respectively. They are now under standard
+ links on the main page of PicoBSD project, so if you downloaded after
+ this date, you shouldn't worry.</p>
+<p> Please check that you have the fixed versions - the archive name should
+ contain the tiny number, such as "pb03en<b>1</b>.zip", or
+ pbsd-s03<b>1</b>.tgz".</p>
+<li>
+ 1998.02.15: PicoBSD 0.3 released. This is the first version that I can
+ truly recommend - previous one was too buggy... :-)
+</li>
+</li>
+</ul>
+
+<h5>Last modified:
+Wed Aug 19 08:53:04 CEST 1998
+</h5>
+
+<HR align="center" width="100%">
+<CENTER><h5>Any comments? Send them to
+<A HREF="mailto:abial@nask.pl">the author</A> </h5></CENTER>
+
+</BODY>
+</HTML>
diff --git a/release/picobsd/doc/faq.html b/release/picobsd/doc/faq.html
new file mode 100644
index 0000000..2b59ffd
--- /dev/null
+++ b/release/picobsd/doc/faq.html
@@ -0,0 +1,208 @@
+<HTML>
+<! $Id: faq.html,v 1.2 1998/08/19 06:46:19 abial Exp $ >
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+ <META NAME="Author" CONTENT="Dinesh Nair">
+ <META NAME="Description" CONTENT="Frequently Asked Questions for PicoBSD">
+ <META NAME="Keywords" CONTENT="PicoBSD,FreeBSD,Unix,Dinesh Nair,Andrzej Bialecki,Network Computer">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; FreeBSD 2.2.5-STABLE i386) [Netscape]">
+ <TITLE>PicoBSD FAQ</TITLE>
+</HEAD>
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
+
+<CENTER>
+<H1>
+The PicoBSD FAQ
+</H1></CENTER>
+
+<CENTER>
+<HR WIDTH="100%"></CENTER>
+<B>What is PicoBSD ?</B>
+
+<P>PicoBSD is a floppy sized version of popular operating system FreeBSD.
+It fits within a single bootable 1.44MB floppy and runs on a minimum i386
+with 8MB RAM. PicoBSD currently comes in four flavours: dialup, net, router and
+isp. For a description of how each of the flavours differ, take a look
+at the <B><A HREF="http://www.freebsd.org/~picobsd/picobsd.html">PicoBSD
+home page</A></B>.
+
+<P><B>What version of FreeBSD is PicoBSD based on ?</B>
+
+<P>PicoBSD has versions based on both FreeBSD 3.0-current and FreeBSD 2.2.5-RELEASE.
+<A HREF="mailto:abial@nask.pl">Andrzej Bialecki</A> maintains the <A HREF="http://www.freebsd.org/~picobsd/picobsd.html">FreeBSD
+3.0-current version</A> and <A HREF="mailto:dinesh@alphaque.com">Dinesh
+Nair</A> maintains the <A HREF="http://info.net-gw.com/picoBSD/">FreeBSD
+2.2.5-RELEASE</A> version. Both the versions don't differ by much except
+for the following:
+<UL TYPE=CIRCLE>
+<LI>
+the 3.0-current version is, well, more current so it has support for the
+latest whiz-bang devices; on the other hand, it sometimes mean it can
+provide functionality not yet present in 2.2.5-RELEASE</LI>
+
+<LI>
+the 2.2.5-RELEASE version is more stable and since binary sizes are smaller,
+it sometimes has a little more functionality than the 3.0-current version</LI>
+</UL>
+As far as possible, both versions will be kept functionally similar, but
+occasionaly divergence may occur.
+
+<P><B>What can PicoBSD do?</B>
+
+<P>With the TCP/IP capabilities of FreeBSD included in and based on the
+strong 4.4BSD TCP/IP stack, PicoBSD can be used as a low cost Network Computer.
+With a text based HTML 3.2 compliant browser (2.2.5-RELEASE version only)
+and Internet access tools such as telnet and ftp, it can serve as a low
+cost Internet dialup client. With support for mounting MSDOS and Unix harddisks,
+it also can be used as a portable OS which you can carry around in a floppy.
+The net and isp flavours would allow you to make use of those redundant
+i386es as a low cost router or dialin PPP server. With SNMP and firewall
+support built-in, PicoBSD provides the functionality of dedicated routers
+and dialin terminal servers.
+
+<P><B>What are PicoBSD's minimum requirements?</B>
+
+<P>PicoBSD runs on a minimum i386 with 8MB RAM for the dialup flavour and
+10MB RAM for the net and isp flavours. Diskspace requirements are a single
+1.44MB floppy. For on-demand PPP access, a modem would be required, either
+external or internal.
+For LAN access, an Ethernet NIC (support for 3Com, NE2000 etc available)
+would also be required.
+
+<P><B>Where do I get PicoBSD?</B> PicoBSD is available at the following
+locations:
+<UL TYPE=CIRCLE>
+<LI>
+<A HREF="http://www.freebsd.org/~picobsd/picobsd.html">PicoBSD based on
+FreeBSD 3.0-current</A> maintained by Andrzej Bialecki</LI>
+
+<LI>
+<A HREF="http://info.net-gw.com/picoBSD/">PicoBSD based on FreeBSD 2.2.5-RELEASE</A>
+maintained by Dinesh Nair</LI>
+</UL>
+Additional mirror sites will be brought online as demand increases. If
+you're interested in mirroring the PicoBSD distribution, please get in
+touch with <A HREF="mailto:dinesh@alphaque.com">Dinesh Nair</A> or
+<A HREF="mailto:abial@nask.pl">Andrzej Bialecki</A>.
+
+<P><B>How do I copy it to the floppy?</B>
+
+<P>The binary images provided as part of the PicoBSD distribution are 1.44MB
+sized floppy images. They cannot be copied to a floppy using the <I>MSDOS
+COPY</I> or <I>Unix cp</I> commands. Instead, an image copy must be done
+using tools such as&nbsp; <A HREF="ftp://ftp.freebsd.org/pub/FreeBSD/tools/rawrite.exe">rawrite.exe</A>
+or f<A HREF="ftp://ftp.freebsd.org/pub/FreeBSD/tools/fdimage.exe">dimage.exe</A>
+under MSDOS and <B>dd</B> under Unix.
+
+<P>Under DOS you would do something like this:
+<UL>
+<PRE><B>C:\> fdimage.exe picobsd.flp a:</B></PRE>
+</UL>
+while under Unix you would use something like:
+<UL><B>dd if=picobsd.flp of=/dev/rfd0</B></UL>
+
+<B>How do I configure dialup PPP access on the Dialup flavour?</B>
+
+<P>There is an auto-configuration script to configure PPP dialup access.
+Run <I>/stand/dialup</I> after booting up from the floppy and make the
+relevant menu selections. Once you've tested it to work, you should make
+your changes permanent by committing them to the floppy using <I>/stand/update</I>.
+
+<P><B>How do I set my DNS server ?</B>
+
+<P>Use the provided <I>/stand/ee</I> editor and edit <I>/etc/resolv.conf</I>.
+Replace the <U>domain</U> with your domain and change the <U>nameserver</U>
+IP address to your nameserver or your ISP's nameserver. You may have as
+many <U>nameserver</U> lines as you want. Don't forget to run <I>/stand/update</I>
+to commit your changes to the floppy.
+<p>NOTE: starting with version 0.4, the <i>dialup</i> scripts asks you to
+set your nameserver as well as default domain name.</p>
+
+<P><B>How do I set my hostname ?</B>
+
+<P>Edit /<I>etc/rc.conf</I> and change the value of the <U>hostname</U>
+variable.
+
+<p><b>PicoBSD has "mkdir" but not "rmdir". How can I delete
+subsdirectories?</b></p>
+<p>"rm -d" will delete directories.</p>
+
+<p><b>Can I use a modem configured on COM3/COM4 instead of COM1, COM2?</b></p>
+
+<p>Yes, but these ports are initially disabled - most machines have only
+two serial ports anyway. You have to enable them in UserConfig.</P>
+<p>Here are the preferred settings:</p>
+<ul>
+<li> sio0=COM1: port 0x3f8, irq 4, used by default for mouse (/dev/cuaa0)
+</li>
+<li> sio1=COM2: port 0x2f8, irq 3, used by default for modem (/dev/cuaa1)
+</li>
+<li> sio2=COM3: port 0x3e8, irq 5, disabled by default
+</li>
+<li> sio3=COM4: port 0x2e8, irq 10, disabled by default
+</li>
+</ul>
+
+<p><b>I see a configuration conflict the first time I boot PicoBSD. What
+should I do?</b></p>
+
+<p>Disable those devices which are not present in your machine. If there is
+still some conflict, change the settings (I/O port, IRQ etc.).</p>
+
+<p><b>What kind of SCSI support is there?</b></p>
+
+<p>None. Either build your own version of PicoBSD, or just install normal
+FreeBSD distribution.</p>
+
+<P><B>How do I connect using PPP ?</B>
+
+<P>Just run the PPP process, <I>/stand/ppp</I>. at the <B>ppp on pico></B>
+prompt, type <U>dial</U> and sit back and wait for the modem to sing it's
+mating tunes. When the <B>ppp on pico></B> prompt is capitalized to <B>PPP
+on pico></B>, you've managed to succesfully achieve a link-level PPP and
+TCP/IP connection with your ISP. Additionally, the PPP program will enter
+<I>Packet Mode</I>. Remember, don't <U>quit</U> or <U>close</U> the PPP
+connection if you want to continue to access the Internet.&nbsp; Type <U>help</U>
+at the <B>ppp on pico></B> prompt for a list of PPP commands.
+
+<P><B>The PPP process is running on my screen. How do I use the browser
+or telnet to a host ?</B>
+
+<P>PicoBSD has many virtual terminals, 10 on the dialup flavour. You have
+run PPP on the first virtual terminal. You can switch to the others and
+run the browser and telnet clients there. Switching thru the VTs is done
+by ALT-F1 for VT0, ALT-F2 for VT1, ALT-F3 for VT2 etc. From these terminals,
+you could use telnet or the lynx browser cum newsreader.
+
+<p><b>I can't establish a PPP connection. The mouse pointer randomly appears
+and disappears. and moving the mouse has no effect.</b></p>
+
+<p>You have the mouse driver configured to use the modem's serial port.
+Issue a 'ps -ax', remember the pid (process ID) of 'moused', then issue a
+'kill -9 <pid>'. Edit /etc/rc.conf to specify the correct mouse port. Issue
+an 'update' commmand to save new configuration to the floppy, and reboot.
+<P><B>I saved my lynx configuration but it was not there when I rebooted.
+Why ?</B>
+
+<P>The lynx configuration is saved in <I>/etc/lynx.cfg</I>. You should
+run /<I>stand/update</I> to commit this to the floppy when you change the
+configuration. In effect, anything you change in /etc can be committed
+by running /<I>stand/update</I>.
+
+<P><B>How come there are no manual pages ?</B>
+
+<P>Well, this is a floppy-sized OS, so there's not enough space for full
+manpages. Instead, short help descriptions are given with the <I>/stand/help</I>
+program. If you need more detailed descriptions, take a look at the <A HREF="http://www.freebsd.org/handbook/">FreeBSD
+Handbook</A> or the <A HREF="http://www.freebsd.org/">FreeBSD Home</A>.
+<BR>&nbsp;
+<BR>&nbsp;
+<HR WIDTH="100%">
+<CENTER><FONT SIZE=-1>More FAQ points will be added as feedback from the
+PicoBSD user community comes in. And big thanks to all of you who already
+sent us some suggestions!</FONT></CENTER>
+<P><B><FONT SIZE=-1>Last Modified:
+Sun Aug 9 13:40:15 CEST 1998
+</FONT></B></P>
+</BODY>
+</HTML>
diff --git a/release/picobsd/doc/hardware.html b/release/picobsd/doc/hardware.html
new file mode 100644
index 0000000..e8c7318
--- /dev/null
+++ b/release/picobsd/doc/hardware.html
@@ -0,0 +1,107 @@
+<html>
+<! $Id: hardware.html,v 1.3 1998/08/19 16:59:35 abial Exp $ >
+<body>
+<h1><center>Lists of supported hardware configurations.</center></h1>
+
+<p>Below you will find supported configurations for each of the flavors of
+PicoBSD as of version 0.4, as well as the lists of programs included.</p>
+
+<h3>Dialup version:</h3>
+<ul>
+<li>minimum 386SX CPU (either Intel, AMD, Cyrix etc - doesn't matter),
+</li>
+<li>minimum 8MB of RAM (some people reported success
+stories with 4MB only, but I certainly don't recommend it)
+</li>
+<li>a modem (for Internet connection using PPP protocol), either internal or
+external, connected to COM1-COM4. NOTE: COM3 and COM4 are disabled by default
+- you have to explicitly enable them in UserConfig.
+</li>
+<li>an Ethernet card for LAN connection:
+<ul>
+<li> ed - default settings: port 0x280, irq 10, iomem 0xd8000
+ <p>NE2000 compatible ISA and PCI cards, most SMC and 3C503</p>
+</li>
+<li> ep - default settings: port 0x300, irq 10,
+ <p>3C509 ISA card</p>
+</li>
+<li> ie - default settings: port 0x300, irq 10, iomem 0xd0000
+ <p>Intel EtherExpress ISA, StarLan, 3C507</p>
+</li>
+<li> le - default settings: port 0x300, irq 5, iomem 0xd0000
+ <p>DEC EtherWorks 2 and 3</p>
+</li>
+<li> lnc - default settings: port 0x280, irq 10, iomem 0xd0000
+ <p>Lance/PCNet</p>
+</li>
+<li> de - DEC21040-based PCI cards,
+</li>
+<li> fxp - Intel EtherExpress Pro/100B PCI card
+</li>
+</ul>
+</li>
+<li>10 virtual consoles plus console utilities (vidcontrol, kbdcontrol)
+</li>
+<li>basic networking tools: ifconfig, route, ping, ns (mini-netstat),
+traceroute
+</li>
+<li>basic remote access tools: telnet, ftp and SSH
+</li>
+<li>basic OS tools: shell, mount (FreeBSD, DOS, Linux), umount, ps, kill, vm
+(mini-vmstat), fsck, df, etc..
+</li>
+<li>editable configuration (/etc directory and kernel configuration)
+</li>
+<li>simple editor ee
+</li>
+<li>simple help system for people new to FreeBSD
+</li>
+</ul>
+<h3>Router-like version:</h3>
+<ul>
+<li>minimum 386SX CPU,
+</li>
+<li>minimum 10 MB of RAM (8MB for basic setup)
+</li>
+<li>support for PPP protocol on dialup/leased lines (using ijppp)
+</li>
+<li>support for several types of Ethernet cards (two of each kind) - see above
+for descriptions: ed, ie, ep, de, fxp, lnc
+</li>
+<li>network daemons: routing daemon (routed), inetd, telnetd, snmpd.
+</li>
+<li>IP Firewall and NAT daemon (natd).
+</li>
+<li>more OS utilities, including: syslogd, mount_nfs, network logins via
+telnet
+</li>
+<li>this version doesn't include: ssh, ftp
+</li>
+</ul>
+<h3>Router version:</h3>
+<ul>
+<li>minimum 386SX CPU,
+</li>
+<li>minimum 4 MB of RAM (6MB for running some additional daemons)
+</li>
+<li>support for PPP protocol on dialup/leased lines (using kernel ppp)
+</li>
+<li>support for several types of Ethernet cards - see above
+for descriptions: ed, ie, ep, de, fxp, lnc
+</li>
+<li>custom init(8), which includes also a simple command-line interface,
+and its own way to configure the system on startup.
+</li>
+<li>IP Firewall and NAT daemon (natd - it requires additional portion of RAM).
+</li>
+<li>very few OS tools, except those absolutely necessary,
+</li>
+</ul>
+
+<p>There's also the fourth version, which can serve as a dialin server - I hope
+you'll find it as a cheap yet reliable alternative to commercial communication
+servers :-)) This work is still in progress, and
+<A HREF="beta.html">I need some people to test</a> the early
+dial-in server version.</p>
+</body>
+</html>
diff --git a/release/picobsd/doc/how2build.html b/release/picobsd/doc/how2build.html
new file mode 100644
index 0000000..f37e7d2
--- /dev/null
+++ b/release/picobsd/doc/how2build.html
@@ -0,0 +1,177 @@
+<html>
+<! $Id: how2build.html,v 1.2 1998/08/19 16:59:36 abial Exp $ >
+<head>
+<title><center>PicoBSD Development Kit</center></title>
+</head>
+<body>
+<h1><center> How to build your own version
+ of PicoBSD?
+</center></h1>
+
+<ol>
+<li>
+ Get the file <code>picobsd.tgz</code>. It contains the scripts
+ you'll need. Also, I assume you run quite -current system with
+ full sources installed.
+
+<p> NOTE: there were some mysterious interactions between vn(4) driver and
+ 'disklabel auto' in versions earlier than 3.0. There is another set
+ of scripts prepared by <A HREF="mailto:dinesh@alphaque.com">Dinesh Nair
+ </a> which allows to build PicoBSD floppies on a earlier systems.</p>
+
+<p> Unpack the archive in some place with at least 5MB free space.</p>
+</li>
+<li> Change working directory (<code>cd build</code>) and run the
+ <code>./build</code> script. Select target language, size of MFS and
+ one of pre-canned setups (personal dialup, dialin server or
+ router-like). Details of each setup are contained in
+ dial/, isp/ and net/ directories respectively. You should at least
+ check <code>${TYPE}/config/PICOBSD</code> file to make sure it contains
+ the drivers you want.
+<p> I also recommend to adjust the ISA devices parameters to
+ match the ones of your hardware - though PicoBSD can save the
+ changes from UserConfig, this way it will produce smaller
+ <code>/kernel.config</code> file.</p>
+</li>
+<li> I assume you will use 1.44MB floppy. If not, please edit the file
+ <code>build/stage3</code>.
+</li>
+<li> There are several directories which contain some sources and config
+ files:
+<pre>
+ build/ main build directory; you MUST cd here!
+ dial/ config files for dialup setup
+ conf/ kernel config file
+ crunch1/ crunch of system programs
+ mfs.tree/ contains the MFS configuration
+ lang/ contains language-dependent files
+ floppy.tree/ contains the startup floppy hierarchy
+
+ isp/ config files for dialin server setup
+ ... (as above)
+ net/ config files for router-like setup
+ ... (as above)
+ tinyware/ collection of small system utilities
+ tools/ additional tools them needed during build
+</pre>
+<p> There are no <code>/etc/passwd</code> nor <code>/etc/pwd.db</code>
+ files on the "dial" floppy - in case of other types, they are
+ reconstructed from <code>/etc/master.passwd</code> on each startup
+ (and then put on MFS with the rest of <code>/etc</code>).
+ In case of "dial" type floppy, you don't need them at all.</p>
+
+<p> NOTE: thanks to the above, the floppy is needed only during startup,
+ and then only if you want to synchronize (possibly changed) MFS /etc
+ with the one on the floppy. It means that you can pull off the floppy
+ from the drive as soon as <code>login:</code> prompt appears.
+ In other words, it is almost equal to read-only floppy.</p>
+</li>
+<li> Edit the set of installed programs.
+<ul>
+<li> Go to <code>${TYPE}/crunch1</code> directory, and edit it
+ to suit your needs. Keep in mind that floppies aren't made
+ of rubber... :-)
+</li>
+<li> There are some patches included in these directories, which
+ are applied during build process to some of the Makefiles in
+ your <code>/usr/src</code>. These patches attempt to decrease
+ the size of some programs by cutting off rarely/unlikely used
+ parts. The patches are reversed when you do a
+ <code>make clean</code> (or <code>build/clean</code>
+ for that matter).
+<p> NOTE: patches may fail to apply, if your sources are too
+ different from the ones I used. Don't worry: they are so
+ straightforward that you can apply them by hand.</p>
+</li>
+<li> In order to have a functioning system you MUST include at
+ least <code>/stand/init</code>, or <code>/stand/oinit</code>,
+ or <code>/stand/sysinstall</code> in
+ your <code>crunch.conf</code>. Of course these can be your
+ own programs... But if you install the stock
+ <code>/sbin/init</code>, you
+ also have to install some others, like sh, getty, login etc...
+<p> This release of PicoBSD contains a small replacement for
+ init(8), called 'oinit'. You can find it in TinyWare
+ collection. The main building script allows you to use it
+ instead of normal init(8). <b>Be sure to read the oinit's docs
+ before you decide to use it!</b></p>
+</li>
+</ul>
+</li>
+<li> Make sure that the system you're running has /dev/[r]vn0* entries in
+ /dev directory (if not, you can make them with 'MAKEDEV vn0'), AND
+ that your running kernel has built-in vnode driver (there should be a
+ line in your kernel config file stating 'pseudo-device vn').
+</li>
+<li> You'll need at least 9MB of free disk space, and free /mnt directory.
+</li>
+<li> Do a <code>cd build/</code> and fire off the <code>./build</code>
+ script. Select the build parameters or 'n' for 'no change'. If all
+ is well, after some time (like 10-30m) you end up with a
+ 'picobsd.bin' file in this directory.
+
+<p> WARNING: make sure you don't have stale <code>.depend</code> files
+ around!!! You may encounter many strange errors during build process
+ in that case.</p>
+
+<p> If there were any errors, please execute each script by hand and try
+ to find what causes this error. Most often this will be one of the
+ following reasons:</p>
+<ul>
+<li> <code>crunchgen</code> can't find the source directory for a
+ program 'proggy':
+<ul>
+<li> make sure that the source directory for 'proggy' is called
+ 'proggy', otherwise the crunchgen won't find it
+</li>
+<li> make sure that the Makefile allows crunchgen to deduce the
+ set of objects to build. You can manually add an OBJS= ...
+ to the program's Makefile.
+</li>
+</ul>
+</li>
+<li> crunch fails to build.
+<ul>
+<li> check your system source tree for stale .depend files and/or
+ objects (*.o)
+</li>
+<li> see if the individual programs can be built using original
+ Makefiles. If not, cvsup the correct sources.
+</li>
+</ul>
+</li>
+<li> /: write failed - file system is full
+<ul>
+<li> this one is obvious - you wanted to put too many programs on
+ the MFS and/or the target floppy. Or, you really don't have
+ any space left on the root partition.. :-)
+</li>
+<li> also, you can check if the
+ MFS size is correctly reported while it's still mounted (right
+ after <code>stage1</code> script ends).
+</li>
+</ul>
+</ul>
+
+ You can also remove <code>2>&amp;1</code> redirections from Makefiles
+ to see the stderr.
+</li>
+<li> Transfer this file to the floppy:
+<pre>
+ dd if=picobsd.bin of=/dev/rfd0
+</pre>
+
+ (The 'build' script asks you if you want to do this.)
+</li>
+</ol>
+
+<p>That's all. You're welcome to change and improve these scripts. If you
+ stumble upon something which looks like a good idea to have it here, let me
+ know.</p>
+
+<p>If, for some reason, the scripts don't work for you at all, also let me
+ know.</p>
+
+<A HREF="mailto:abial@nask.pl">&lt;abial@nask.pl&gt;</a>
+</body>
+</html>
diff --git a/release/picobsd/doc/intrinsics.html b/release/picobsd/doc/intrinsics.html
new file mode 100644
index 0000000..af5e9a8
--- /dev/null
+++ b/release/picobsd/doc/intrinsics.html
@@ -0,0 +1,126 @@
+<html>
+<! $Id: intrinsics.html,v 1.2 1998/08/19 16:59:36 abial Exp $ >
+<head>
+<title><center>Details of building process</center></title>
+</head>
+<body>
+<h1><center> Details of building process.</center></h1>
+
+<p>For those of you who really want to know what's going on behind the scene,
+and can't quite deduce it from scripts themselves, here's short description of
+the build process:</p>
+
+<ul>
+<li> The './build' script sets the basic parameters of the floppy, such as:
+<ul>
+<li> LANGUAGE: language of the various system messages, and C locale.
+ Available choices are: "en" (English) and "pl" (Polish).
+</li>
+<li>
+ SIZE: size of the memory filesystem (MFS), which will contain all the
+ binaries (except the kernel). Make it big enough for all the pieces to
+ fit, but keep it as small as possible (remember that running system
+ needs some space in /var and /tmp!). Presently, "dial" type of floppy
+ requires at least SIZE=1700, and others require ca. 2800 (numbers
+ are in kB).
+</li>
+<li>
+ TYPE: determines which set of programs and which trees will be
+ installed on the floppies. This simply acts as a selector to dive into
+ respective subdirectories in ../. Presently, the TYPE can be one of:
+ "dial" (dialup floppy), "net" (networking floppy), "router" (router
+ floppy) or "isp" (work in progress - not really usable yet).
+</li>
+</ul>
+<li>
+ Then the './build' scripts checks if there is a kernel built on basis
+ of previously set parameters. The check is error prone, but is simple:
+ the target config file is called PICOBSD-${TYPE}.${SIZE}, and if there
+ exists a file called /sys/compile/PICOBSD-${TYPE}.${SIZE}/kernel, then
+ it is assumed it's the right one.
+
+<p> If there is no such file, the script starts compilation of the kernel,
+ using template in ../${YTPE}/conf/PICOBSD, and adding parameters which
+ determine the built-in MFS size.</p>
+<li>
+ Then the './build' script starts the consecutive stages of the build
+ process, which are performed by scripts (in the following order):
+ stage1, populate, stage2, stage3.
+</li>
+<li>
+ 'stage1' prepares the file called fs.PICOBSD with given size - it's a
+ placeholder for the future MFS. Next, it turns it into device (using
+ vnconfig), and then performs some tricks :-) which allow for
+ doing 'disklabel'. I use the 'auto' option to disklabel(8), which
+ behaves strangely in 2.2.x - what it's supposed to do is to
+ automagically determine the disk parameters from the underlying
+ device (in this case, /dev/rvn0). This works ok in 3.0-current, and
+ allows for using arbitrary (>1024kB) MFS sizes.
+
+<p> One notable exception here is with the "router" floppy - I use one
+ of extended floppy formats (820kB).</p>
+
+<p> After the file is labelled, the newfs(8) is run. Here you can adjust
+ the parameter -i, which can gain you some space on the MFS (sacrificing
+ available number of inodes, so be careful).</p>
+
+<p> Such prepared blank filesystem is mounted on /mnt. Here the stage1
+ ends.</p>
+</li>
+<li>
+ 'populate', as its name suggests, transfers all the pieces which will
+ reside in MFS, to the filesystem mounted on /mnt. This includes:
+<ul>
+<li> copying language dependent files from ../${TYPE}/lang/</li>
+<li> making the MFS hierarchy according to informations in
+ ../${TYPE}/mfs.tree/ subdir.
+<p> The MFS tree includes the /etc, which will contain the startup file
+ /etc/rc.
+ This file in turn doesn't do anything useful except copying the
+ real /etc hierarchy from the floppy filesystem. (There's one possible
+ improvement which comes to my mind - to have the whole /etc on the
+ floppy in tar.gz - this would require only one inode to store the whole
+ /etc, and we could gain some kB on the floppy)</p>
+</li>
+<li> making and installing the set of crunched programs, basing on the
+ description in ../${TYPE}/crunch1/crunch.conf. This involves
+ making the 'crunch', copying it to /mnt and making hard links to
+ the names of all the programs contained therein.</li>
+<li> preparing a short list of kernel symbols, which will be used by
+ various utilities at runtime. In case of "net" and "isp" floppy, it also
+ prepares the kvm_kernel.db database, which will be used by such
+ programs as ps, netstat and others</li>
+<li> preparing the list of "virgin" configuration of devices in kernel -
+ this list will be used by kget(8) program to save the changes to
+ /kernel.config file.</li>
+</ul>
+</li>
+<li>
+ 'stage2' prepares the target kernel. It takes the filesystem contained
+ in fs.PICOBSD (which has all the above pieces inside), and writes it
+ into the target kernel. Then it kzip(8)'s such construed kernel. This
+ process also strips the symbols from the kernel (that's why we prepared
+ the symbol list earlier).
+</li>
+<li>
+ 'stage3' does almost the same as 'stage1', but this time it prepares
+ the filesystem of the target floppy. Default size for the floppy is
+ set at 1440kB.
+<p> After preparing the filesystem (which again involves doing disklabel(8)
+ and newfs(8) - here you can notice that the resulting FS has very small
+ number of inodes in order to save space), the script transfers the
+ floppy hierarchy (which is
+ taken from ../${TYPE}/floppy.tree). Notice that it also contains
+ the /etc directory - its contents is copied right after bootup to the
+ real /etc in MFS. This allows for changing the system behaviour
+ (because you can't change the MFS contents without recompiling).</p>
+<p> The script finally copies previously prepared kernel to the floppy
+ filesystem. The filesystem is unmounted, and here the build process
+ ends.</p>
+</li>
+</ul>
+
+<h6>
+Last modified:
+Wed Aug 19 18:49:08 CEST 1998
+</h6>
diff --git a/release/picobsd/doc/intro.html b/release/picobsd/doc/intro.html
new file mode 100644
index 0000000..6c5ce16
--- /dev/null
+++ b/release/picobsd/doc/intro.html
@@ -0,0 +1,300 @@
+<HTML>
+<! $Id: intro.html,v 1.6 1998/08/19 17:32:59 abial Exp $ >
+<HEAD>
+ <TITLE>PicoBSD</TITLE>
+</HEAD>
+<BODY>
+
+<CENTER><h1><B>PicoBSD</B></h1>
+<HR shade align="center" size="8" width="25%"></P></CENTER>
+
+
+<IMG SRC="icons/daemon.gif" ALIGN="right">
+<p><b>Contents:</b></p>
+<ul>
+<li>
+<A HREF="#what">What is it</a>, and
+<A HREF="#hardware">what hardware is supported?</a>
+</li>
+<li>
+<A HREF="#where"><b>Where can I get it?</b></a>
+</li>
+<li>
+<A HREF="#how">How can I use it?</a>
+</li>
+<li>
+<A HREF="#create">Create your own, custom version of PicoBSD!</a>
+<p>Get the full PicoBSD Development Kit as well as full CVS repository of
+the project.</p>
+</li>
+<li>
+<A HREF="#info">Where can I get more info?</a>
+</li>
+<li>
+<A HREF="bugs.html">Release history and bugs parade...</a>
+<li>
+<A HREF="#future">Plans for the future.</a>
+</li>
+<li>
+<A HREF="#credits">Credits</a>
+</li>
+<li>
+<A HREF="#license">Licensing issues</a>
+</li>
+<li>
+<A HREF="faq.html">FAQ</a>
+</li>
+</ul>
+
+<HR shade align="center">
+<HR shade align="center">
+
+<A NAME="what"><h3>What is it?</h3>
+<p>If you ever dreamed about having really small, tiny, minimal system that
+would offer you benefits of Unix, while still fitting in reasonable space -
+here it is!</p>
+
+<p>PicoBSD is a one floppy version of
+<A HREF="http://www.freebsd.org/">FreeBSD</a> 3.0-current, which in its
+different variations allows you to have secure dialup access, small diskless
+router or even a dial-in server. And all this on only one standard 1.44MB
+floppy - no need to sacrifice over 100MB of your precious HDD space.</p>
+
+<p>PicoBSD is... well, pico-sized :-) , and the minimal hardware that
+is required to run it is 386SX CPU with 8MB of RAM (no HDD!).
+</p>
+
+<A NAME="hardware">
+<p>Here you can find detailed <A HREF="hardware.html">list of supported
+hardware and features</a>.
+
+<p>Current version of PicoBSD is 0.4, and this means that I consider it
+greatly immature, while on the other hand being somewhat tested and improved
+over previous versions. Does it tell you something? Well, at least you can
+try it - I cannot guarantee that it doesn't burn your house or blow up your
+machine, though the former is unlikely... :-)</p>
+
+<HR shade align="center">
+<A NAME="where"><h3>Where can I get it?</h3>
+<p>There are two language editions of PicoBSD - English and Polish one. You'll
+be probably more interested in the former :-) The only difference is in
+the set of fonts included, C locale, and the language of messages.</p>
+<p>You can download them from www.freebsd.org or one of its mirrors:</p>
+<ul>
+<li>Dialup version: <A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_en-D.bin">English</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_dial/README.en">README</a>) or
+<A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_pl-D.bin">Polish</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_dial/README.pl">README</a>)
+</li>
+<li>Networking (formerly known as 'router-like') version: <A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_en-N.bin">English</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_net/README.en">README</a>)
+ or <A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_pl-N.bin">Polish</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_net/README.pl">README</a>)
+</li>
+<li>Router version: <A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_en-R.bin">English</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_router/README.en">README</a>)
+ or <A HREF="http://www.freebsd.org/~picobsd/picobsd/pb_pl-R.bin">Polish</a>
+(<A HREF="http://www.freebsd.org/~picobsd/picobsd/doc_router/README.pl">README</a>)
+</li>
+<li>Dial-in server version: waiting for <A HREF="beta.html">beta testers</a> ... :-)
+</ul>
+
+<p><i>(See the <A HREF="hardware.html">feature list</a> for more
+details)</i></p>
+
+<p>The above floppies were built from 3.0-current sources. Though they
+provide more features, they tend to be less stable than the latest
+RELEASE of FreeBSD. Dinesh Nair back-ported these scripts to the
+latest release (2.2.5), and continues development of PicoBSD using sources
+from that branch. You can find floppies built from 2.2.5 sources
+<A HREF="http://www.freebsd.org/~picobsd/picobsd225/">here</a> or at
+<A HREF="http://info.net-gw.com/picoBSD/">his server</a>.</p>
+
+<HR shade align="center">
+<A NAME="how"><h3>How can I use it?</h3>
+<p>Previous versions were packed with PKZIP(tm) compatible program - now they
+are simply the raw binary floppy images, so you just need to grab the
+appropriate version of the file.</p>
+
+<p>I assume you will use 1.44MB floppy to boot the system - other sizes
+(bigger) are not tested.</p>
+
+<p>The file 'pb_xx-X.bin' must be written onto a blank floppy. It does NOT
+mean that it can be copied using e.g. DOS 'copy' command. You must use a
+program like
+<A HREF="ftp://ftp.freebsd.org/pub/FreeBSD/tools/rawrite.exe">rawrite.exe</a>
+or
+<A HREF="ftp://ftp.freebsd.org/pub/FreeBSD/tools/fdimage.exe">fdimage.exe</a>
+ to write this file directly on the raw floppy.</p>
+
+<p>Under DOS you would do something like this:</p>
+<pre>
+ C:\> fdimage.exe pb_xx-X.bin a:
+</pre>
+
+<p>while under Unix you would use something like:</p>
+<pre>
+ dd if=pb_xx-X.bin of=/dev/rfd0
+</pre>
+
+<p>Then boot off this floppy and enjoy!</p>
+
+<p>If you feel lost, try the 'help' command (it's available only on "dialup"
+floppies)</p>
+
+<HR shade align="center">
+<h3>Create your own, custom version of PicoBSD!</h3>
+
+<p>I made available also the
+<A HREF="http://www.freebsd.org/~picobsd/picobsd/picobsd.tgz">set of tools</a>
+(a.k.a the PicoBSD Development Kit) I used to create the floppies (see also the
+ <A HREF="how2build.html">detailed instructions</a>)</p>
+
+<p>You can also get the copy of
+<A HREF="http://www.freebsd.org/~picobsd/pcvs.tgz">the CVS repository</a> of
+the project - CVSup operation is still under construction...</p>
+
+<p> Now, if you don't like the setup of PicoBSD, or you miss
+some program, or (better yet) you want to improve PicoBSD - you can grab the
+copy of exactly the same tools I used and build your own, customized
+ version! </p>
+
+<p>Think of it: if your're an ISP, you can build the dialup version for
+ your customers, including some scripts to automatically connect them to
+your site. You can also create a demo disk for your friend (or your boss! :-)).
+You can also build a firewall/router for your office, etc, etc...
+ possibilities are really endless and limited only by your imagination.</p>
+
+<p>You will need at least 10MB of free disk space for building, and of course
+the full system sources installed. I also assume that the sources are
+quite -current. There is also a back-ported version of the scripts prepared by
+<A HREF="mailto:dinesh@alphaque.com">Dinesh Nair</a> which builds ok on
+2.2.6-R systems.</p>
+
+<p>Version 0.31 was packed with pax(1) - newer versions are packed again
+with tar and gzip to avoid confusion... :-)</p>
+
+<p>I'm very interested in hearing from you about your experiences - if you
+come up with a setup you think is interesting, please let me know!</p>
+
+<HR shade align="center">
+<A NAME="info"><h3>Where can I get more info?</h3>
+
+<p>Almost all of the programs included on the floppies are exactly the
+same versions as in normal FreeBSD installation, so that the normal
+manual pages apply. However, I didn't include the manpages themselves -
+they would take over 200kB!</p>
+
+<p> For the total newbies, which would use (I assume)
+the 'dialup' version, there is a short README on the floppy which gives
+step by step instructions on how to get a dialup connection. There is also
+a script called 'dialup' which attempts to configure PPP to allow for automatic
+log in to your provider, and for background operation.
+There is also a small help system ('help' command)</p>
+
+<p> There are some system utilities which are unique to PicoBSD, and at this
+ moment they are documented in detail only in source and READMEs :-(.</p>
+
+
+<p>As for the new releases which will (hopefully) be prepared in the future:
+just keep an eye on this page. I'll also send announcements to FreeBSD mailing
+lists.</p>
+
+<HR shade align="center">
+<A NAME="future"><h3>Plans for the future</h3>
+
+<p>Well, I hope that thanks to your comments I'll be able to continuously
+improve the setup and contents of PicoBSD. I also have specific dreams (if
+dreams can be specific..) - here they are, as an incentive to your
+imagination and coding skills:</p>
+<ul>
+<li>
+To write a command line tool patterned after Cisco IOS, which could configure
+various aspects of router-like version of PicoBSD. I'm nowhere near with this
+goal - I even don't have any good idea how to do it cleanly (I do have some
+ideas, but I classify them as dirty hacks).
+</li>
+<li>
+To put an XWindow-like GUI on the 'dialup' floppy. (Update: you can look at
+<A HREF="http://www.freebsd.org/~picobsd/preview/preview2.tgz">preview
+version</a> and send me your comments).
+</li>
+<li>
+To gain some experience with solid state disks, and prepare standard images
+for e.g. 4MB versions of SSD, with Cisco 25xx-like contents... I also hope
+ to achieve this goal in the nearest
+future, thanks to involvement of some PicoBSD enthusiast :-)</p>
+(Update: I'm experimenting with an M-System's 16MB flash right now, and
+there is also ongoing development for a driver for their DiskOnChip)
+</li>
+<li>
+To be able to boot from more primitive filesystem than FFS - DOS or Minix
+would be just fine, as they don't waste so much space for their internals.
+</li>
+<li>
+To have an alternative to current MFS - it wastes a lot of space just
+because it mimicks the normal FFS on top of memory blocks...
+</li>
+<li>
+To further minimize the memory footprint of router-like setup. I'd like it
+to be able to run truely effortlessly on 4MB machines... This would
+probably include rewriting oinit(8) to run multithreaded.
+</li>
+<li>
+And many others, too vague to put them here. <b>You</b> can also suggest me
+some others applications/solutions you're dreaming of...
+</li>
+</ul>
+
+<A NAME="credits"><h3>Credits</h3>
+
+<p>The following people are either responsible for the very existence of this
+project, or significantly eased my pains of gaining necessary knowledge:</p>
+<ul>
+<li>
+the whole FreeBSD team for this magnificent OS, and their hard work of
+continuous development,
+</li>
+<li>
+Dinesh Nair, for co-development and preparing of the version which compiles
+on -RELEASE,
+</li>
+<li>
+Joe Greco, for his encouraging example of XKERNEL (some parts of the scripts
+still bear his fingerprints :-) (you can get it
+ <A HREF="../../../xkernel.tgz">here</a>).
+</li>
+<li>Goran Hasse of <A HREF="http://www.raditex.se">Raditex AB, Sweden</a>, for
+sending me an M-Systems' flash disk to experiment with.
+</li>
+<li>
+Mike Smith for various tips and encouragement.
+</li>
+<li>
+freebsd-* mailing lists participants, which helped me with some other
+pieces.
+</li>
+<li>
+and many other people who keep encouraging me to continue this work. Thanks,
+guys!
+</li>
+</ul>
+
+<A NAME="license"><h3>Licensing issues</h3>
+
+<p>PicoBSD is distributed under BSD copyright,
+which allows you to use it in various ways, including commercial
+applications. So grab it and enjoy! And if you feel that you want to help
+with this project, either by donating some time to write code, or by
+some other donation, just <A HREF="mailto:abial@nask.pl">contact me</a>.</p>
+
+<h5>Last modified:
+Fri Aug 7 08:35:20 CEST 1998
+</h5>
+
+<HR shade align="left" size="2" width="100%">
+<CENTER><h5>Any comments? Send them to
+<A HREF="mailto:abial@nask.pl">the author</A> </h5></CENTER>
+
+</BODY>
+</HTML>
diff --git a/release/picobsd/help/README b/release/picobsd/help/README
new file mode 100644
index 0000000..3b8ff78
--- /dev/null
+++ b/release/picobsd/help/README
@@ -0,0 +1,8 @@
+1998.02.20
+
+This is work in progress. Eventually I'll prepare the help system for newbies,
+and these files are just the beginning of it...
+
+<abial@nask.pl>
+
+$Id: README,v 1.1.1.1 1998/07/14 07:30:42 abial Exp $
diff --git a/release/picobsd/help/cat.hlp b/release/picobsd/help/cat.hlp
new file mode 100644
index 0000000..ed14871
--- /dev/null
+++ b/release/picobsd/help/cat.hlp
@@ -0,0 +1,5 @@
+cat concatenate and print files
+
+ Usage:
+
+ cat [-benstuv] [-] [file ...]
diff --git a/release/picobsd/help/cat.hlp.en b/release/picobsd/help/cat.hlp.en
new file mode 100644
index 0000000..ed14871
--- /dev/null
+++ b/release/picobsd/help/cat.hlp.en
@@ -0,0 +1,5 @@
+cat concatenate and print files
+
+ Usage:
+
+ cat [-benstuv] [-] [file ...]
diff --git a/release/picobsd/help/cat.hlp.pl b/release/picobsd/help/cat.hlp.pl
new file mode 100644
index 0000000..cb49b99
--- /dev/null
+++ b/release/picobsd/help/cat.hlp.pl
@@ -0,0 +1,5 @@
+cat polacz lub wyswietl pliki
+
+ Sposob uzycia:
+
+ cat [-benstuv] [-] [plik ...]
diff --git a/release/picobsd/help/chmod.hlp b/release/picobsd/help/chmod.hlp
new file mode 100644
index 0000000..6e516c5
--- /dev/null
+++ b/release/picobsd/help/chmod.hlp
@@ -0,0 +1,5 @@
+chmod change file modes
+
+ Usage:
+
+ chmod [-R [-H | -L | -P]] mode file ...
diff --git a/release/picobsd/help/chmod.hlp.en b/release/picobsd/help/chmod.hlp.en
new file mode 100644
index 0000000..6e516c5
--- /dev/null
+++ b/release/picobsd/help/chmod.hlp.en
@@ -0,0 +1,5 @@
+chmod change file modes
+
+ Usage:
+
+ chmod [-R [-H | -L | -P]] mode file ...
diff --git a/release/picobsd/help/chmod.hlp.pl b/release/picobsd/help/chmod.hlp.pl
new file mode 100644
index 0000000..be69019
--- /dev/null
+++ b/release/picobsd/help/chmod.hlp.pl
@@ -0,0 +1,5 @@
+chmod zmiana praw dostepu do pliku
+
+ Sposob uzycia:
+
+ chmod [-R [-H | -L | -P]] prawa plik ...
diff --git a/release/picobsd/help/chown.hlp b/release/picobsd/help/chown.hlp
new file mode 100644
index 0000000..e32e855
--- /dev/null
+++ b/release/picobsd/help/chown.hlp
@@ -0,0 +1,8 @@
+chgrp change group
+chown change owner
+
+ Usage:
+
+ chown [-R [-H | -L | -P]] [-f] [-h] owner[:group] file ...
+ chown [-R [-H | -L | -P]] [-f] [-h] :group file ...
+ chgrp [-R [-H | -L | -P]] [-f] [-h] group file ...
diff --git a/release/picobsd/help/chown.hlp.en b/release/picobsd/help/chown.hlp.en
new file mode 100644
index 0000000..e32e855
--- /dev/null
+++ b/release/picobsd/help/chown.hlp.en
@@ -0,0 +1,8 @@
+chgrp change group
+chown change owner
+
+ Usage:
+
+ chown [-R [-H | -L | -P]] [-f] [-h] owner[:group] file ...
+ chown [-R [-H | -L | -P]] [-f] [-h] :group file ...
+ chgrp [-R [-H | -L | -P]] [-f] [-h] group file ...
diff --git a/release/picobsd/help/chown.hlp.pl b/release/picobsd/help/chown.hlp.pl
new file mode 100644
index 0000000..0cdda8b
--- /dev/null
+++ b/release/picobsd/help/chown.hlp.pl
@@ -0,0 +1,8 @@
+chgrp zmien grupe
+chown zmien wlasciciela
+
+ Sposob uzycia:
+
+ chown [-R [-H | -L | -P]] [-f] [-h] wlasc[:grupa] plik ...
+ chown [-R [-H | -L | -P]] [-f] [-h] :grupa plik ...
+ chgrp [-R [-H | -L | -P]] [-f] [-h] grupa plik ...
diff --git a/release/picobsd/help/chuck.hlp b/release/picobsd/help/chuck.hlp
new file mode 100644
index 0000000..897ed16
--- /dev/null
+++ b/release/picobsd/help/chuck.hlp
@@ -0,0 +1,6 @@
+chuck a friendly daemon :-)
+
+ This is slightly reworked version of a classic ELIZA program.
+ Kudos go to original author (J. Weizenbaum), then to the
+ author of this implementation <chris@wacsvax.OZ>. I only
+ slightly changed the dialog...
diff --git a/release/picobsd/help/cp.hlp b/release/picobsd/help/cp.hlp
new file mode 100644
index 0000000..8117159
--- /dev/null
+++ b/release/picobsd/help/cp.hlp
@@ -0,0 +1,6 @@
+cp copy files
+
+ Usage:
+
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] src target
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory
diff --git a/release/picobsd/help/cp.hlp.en b/release/picobsd/help/cp.hlp.en
new file mode 100644
index 0000000..8117159
--- /dev/null
+++ b/release/picobsd/help/cp.hlp.en
@@ -0,0 +1,6 @@
+cp copy files
+
+ Usage:
+
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] src target
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] src1 ... srcN directory
diff --git a/release/picobsd/help/cp.hlp.pl b/release/picobsd/help/cp.hlp.pl
new file mode 100644
index 0000000..30dea47
--- /dev/null
+++ b/release/picobsd/help/cp.hlp.pl
@@ -0,0 +1,6 @@
+cp kopiuj pliki
+
+ Sposob uzycia:
+
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] plik1 plik2
+ cp [-R [-H | -L | -P]] [-f | -i] [-p] plik1 ... plikN katalog
diff --git a/release/picobsd/help/dd.hlp b/release/picobsd/help/dd.hlp
new file mode 100644
index 0000000..d972d40
--- /dev/null
+++ b/release/picobsd/help/dd.hlp
@@ -0,0 +1,12 @@
+dd convert and copy a file
+
+ Examples of usage:
+
+ This command will create 16MB, zero-filled file in /dos/SWAP.swp:
+
+ dd if=/dev/zero of=/dos/SWAP.swp bs=512 count=32000
+
+ This command will transfer floppy image from picobsd.flp to device
+ /dev/rfd0, which denotes raw floppy A:
+
+ dd if=picobsd.flp of=/dev/rfd0
diff --git a/release/picobsd/help/df.hlp b/release/picobsd/help/df.hlp
new file mode 100644
index 0000000..987849b
--- /dev/null
+++ b/release/picobsd/help/df.hlp
@@ -0,0 +1,5 @@
+df display free disk space
+
+ Usage:
+
+ df [-ikn] [-t type] [file | filesystem ...]
diff --git a/release/picobsd/help/df.hlp.en b/release/picobsd/help/df.hlp.en
new file mode 100644
index 0000000..987849b
--- /dev/null
+++ b/release/picobsd/help/df.hlp.en
@@ -0,0 +1,5 @@
+df display free disk space
+
+ Usage:
+
+ df [-ikn] [-t type] [file | filesystem ...]
diff --git a/release/picobsd/help/df.hlp.pl b/release/picobsd/help/df.hlp.pl
new file mode 100644
index 0000000..39fda44
--- /dev/null
+++ b/release/picobsd/help/df.hlp.pl
@@ -0,0 +1,5 @@
+df pokaz ilosc wolnego miejsca na dysku
+
+ Sposob uzycia:
+
+ df [-ikn] [-t typ] [plik | filesystem ...]
diff --git a/release/picobsd/help/dialup.hlp b/release/picobsd/help/dialup.hlp
new file mode 100644
index 0000000..c729023
--- /dev/null
+++ b/release/picobsd/help/dialup.hlp
@@ -0,0 +1,4 @@
+dialup a simple PPP configuration script
+
+ This script attempts to create the /etc/ppp/ppp.conf file suitable for
+ automatic dialing and background operation of 'ppp' program.
diff --git a/release/picobsd/help/dialup.hlp.en b/release/picobsd/help/dialup.hlp.en
new file mode 100644
index 0000000..c729023
--- /dev/null
+++ b/release/picobsd/help/dialup.hlp.en
@@ -0,0 +1,4 @@
+dialup a simple PPP configuration script
+
+ This script attempts to create the /etc/ppp/ppp.conf file suitable for
+ automatic dialing and background operation of 'ppp' program.
diff --git a/release/picobsd/help/dialup.hlp.pl b/release/picobsd/help/dialup.hlp.pl
new file mode 100644
index 0000000..a19c8d9
--- /dev/null
+++ b/release/picobsd/help/dialup.hlp.pl
@@ -0,0 +1,5 @@
+dialup prosty skrypt konfiguracyjny do PPP
+
+ Skrypt ten tworzy plik /etc/ppp/ppp.conf w oparciu o wartosci
+ podane przez uzytkownika, umozliwiajac automatyczne wybieranie
+ numeru oraz dzialanie w tle.
diff --git a/release/picobsd/help/echo.hlp b/release/picobsd/help/echo.hlp
new file mode 100644
index 0000000..b54bdc3
--- /dev/null
+++ b/release/picobsd/help/echo.hlp
@@ -0,0 +1,8 @@
+echo write arguments to the standard output
+
+ Usage:
+
+ echo [-n] [string...]
+
+ Optional parameter -n tells echo not to end the output with new
+ line character.
diff --git a/release/picobsd/help/echo.hlp.en b/release/picobsd/help/echo.hlp.en
new file mode 100644
index 0000000..b54bdc3
--- /dev/null
+++ b/release/picobsd/help/echo.hlp.en
@@ -0,0 +1,8 @@
+echo write arguments to the standard output
+
+ Usage:
+
+ echo [-n] [string...]
+
+ Optional parameter -n tells echo not to end the output with new
+ line character.
diff --git a/release/picobsd/help/echo.hlp.pl b/release/picobsd/help/echo.hlp.pl
new file mode 100644
index 0000000..e268038
--- /dev/null
+++ b/release/picobsd/help/echo.hlp.pl
@@ -0,0 +1,8 @@
+echo wypisz argumenty na standardowym wyjsciu (stdout)
+
+ Sposob uzycia:
+
+ echo [-n] [argumenty...]
+
+ Opcjonalny parametr -n powoduje, ze nie zostanie dodany znak
+ konca wiersza.
diff --git a/release/picobsd/help/ee.hlp b/release/picobsd/help/ee.hlp
new file mode 100644
index 0000000..dfb66c0
--- /dev/null
+++ b/release/picobsd/help/ee.hlp
@@ -0,0 +1,4 @@
+ee Easy Editor
+
+ This simple editor comes with its own help, visible in the upper part
+ of the screen. Follow that instructions.
diff --git a/release/picobsd/help/ee.hlp.en b/release/picobsd/help/ee.hlp.en
new file mode 100644
index 0000000..dfb66c0
--- /dev/null
+++ b/release/picobsd/help/ee.hlp.en
@@ -0,0 +1,4 @@
+ee Easy Editor
+
+ This simple editor comes with its own help, visible in the upper part
+ of the screen. Follow that instructions.
diff --git a/release/picobsd/help/ee.hlp.pl b/release/picobsd/help/ee.hlp.pl
new file mode 100644
index 0000000..e0582195
--- /dev/null
+++ b/release/picobsd/help/ee.hlp.pl
@@ -0,0 +1,4 @@
+ee Easy Editor
+
+ Ten prosty edytor wyposazony jest w swoj wlasny system pomocy,
+ umieszczony w gornej czesci ekranu.
diff --git a/release/picobsd/help/fsck.hlp b/release/picobsd/help/fsck.hlp
new file mode 100644
index 0000000..e4c13e3
--- /dev/null
+++ b/release/picobsd/help/fsck.hlp
@@ -0,0 +1,15 @@
+fsck filesystem consistency check and interactive repair
+
+ Usage:
+
+ fsck -p [-f] [-m mode]
+ fsck [-b block#] [-c level] [-l maxparallel] [-y] [-n] [-m mode]
+ [filesystem] ...
+
+ but in its simplest and most common version:
+
+ fsck -y <filesystem>
+
+ where <filesystem> is a name of the raw device, on which the filesystem
+ lies, e.g. /dev/rfd0 for floppy A:, or /dev/rwd0s1 for partition #1 on
+ first IDE drive.
diff --git a/release/picobsd/help/fsck.hlp.en b/release/picobsd/help/fsck.hlp.en
new file mode 100644
index 0000000..e4c13e3
--- /dev/null
+++ b/release/picobsd/help/fsck.hlp.en
@@ -0,0 +1,15 @@
+fsck filesystem consistency check and interactive repair
+
+ Usage:
+
+ fsck -p [-f] [-m mode]
+ fsck [-b block#] [-c level] [-l maxparallel] [-y] [-n] [-m mode]
+ [filesystem] ...
+
+ but in its simplest and most common version:
+
+ fsck -y <filesystem>
+
+ where <filesystem> is a name of the raw device, on which the filesystem
+ lies, e.g. /dev/rfd0 for floppy A:, or /dev/rwd0s1 for partition #1 on
+ first IDE drive.
diff --git a/release/picobsd/help/fsck.hlp.pl b/release/picobsd/help/fsck.hlp.pl
new file mode 100644
index 0000000..5f4b748
--- /dev/null
+++ b/release/picobsd/help/fsck.hlp.pl
@@ -0,0 +1,15 @@
+fsck narzedzie do sprawdzania poprawnosci i spojnosci filesystemu.
+
+ Sposob uzycia:
+
+ fsck -p [-f] [-m mode]
+ fsck [-b block#] [-c level] [-l maxparallel] [-y] [-n] [-m mode]
+ [filesystem] ...
+
+ ...ale w najprostszej i najczesciej spotykanej formie:
+
+ fsck -y <filesystem>
+
+ gdzie <filesystem> jest nazwa "surowego" urzadzenia, na ktorym
+ znajduje sie system plikow, np. /dev/rfd0 dla dyskietki A:, lub
+ /dev/rwd0s1 dla pierwszej partycji pierwszego dysku IDE.
diff --git a/release/picobsd/help/ftp.hlp b/release/picobsd/help/ftp.hlp
new file mode 100644
index 0000000..3b61e90
--- /dev/null
+++ b/release/picobsd/help/ftp.hlp
@@ -0,0 +1,8 @@
+ftp ARPANET file transfer program
+
+ Usage:
+
+ ftp [-adeginptvV] [host [port]]
+ ftp host:path[/]
+ ftp ftp://host[:port]/path[/]
+ ftp http://host[:port]/file
diff --git a/release/picobsd/help/ftp.hlp.en b/release/picobsd/help/ftp.hlp.en
new file mode 100644
index 0000000..3b61e90
--- /dev/null
+++ b/release/picobsd/help/ftp.hlp.en
@@ -0,0 +1,8 @@
+ftp ARPANET file transfer program
+
+ Usage:
+
+ ftp [-adeginptvV] [host [port]]
+ ftp host:path[/]
+ ftp ftp://host[:port]/path[/]
+ ftp http://host[:port]/file
diff --git a/release/picobsd/help/ftp.hlp.pl b/release/picobsd/help/ftp.hlp.pl
new file mode 100644
index 0000000..201aa17
--- /dev/null
+++ b/release/picobsd/help/ftp.hlp.pl
@@ -0,0 +1,8 @@
+ftp Program do przesylania plikow
+
+ Sposob uzycia:
+
+ ftp [-adeginptvV] [host [port]]
+ ftp host:path[/]
+ ftp ftp://host[:port]/path[/]
+ ftp http://host[:port]/file
diff --git a/release/picobsd/help/getty.hlp b/release/picobsd/help/getty.hlp
new file mode 100644
index 0000000..e48874f
--- /dev/null
+++ b/release/picobsd/help/getty.hlp
@@ -0,0 +1 @@
+getty set terminal mode
diff --git a/release/picobsd/help/gzip.hlp b/release/picobsd/help/gzip.hlp
new file mode 100644
index 0000000..f125fe3
--- /dev/null
+++ b/release/picobsd/help/gzip.hlp
@@ -0,0 +1,26 @@
+gzip, gunzip, zcat compress or expand files
+
+ Usage:
+
+ gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
+ -c --stdout write on standard output, keep original
+ files unchanged
+ -d --decompress decompress
+ -f --force force overwrite of output file and compress
+ links
+ -h --help give this help
+ -l --list list compressed file contents
+ -L --license display software license
+ -n --no-name do not save or restore the original name and
+ time stamp
+ -N --name save or restore the original name and time stamp
+ -q --quiet suppress all warnings
+ -r --recursive operate recursively on directories
+ -S .suf --suffix .suf use suffix .suf on compressed files
+ -t --test test compressed file integrity
+ -v --verbose verbose mode
+ -V --version display version number
+ -1 --fast compress faster
+ -9 --best compress better
+ file... files to (de)compress. If none given, use
+ standard input.
diff --git a/release/picobsd/help/gzip.hlp.en b/release/picobsd/help/gzip.hlp.en
new file mode 100644
index 0000000..f125fe3
--- /dev/null
+++ b/release/picobsd/help/gzip.hlp.en
@@ -0,0 +1,26 @@
+gzip, gunzip, zcat compress or expand files
+
+ Usage:
+
+ gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
+ -c --stdout write on standard output, keep original
+ files unchanged
+ -d --decompress decompress
+ -f --force force overwrite of output file and compress
+ links
+ -h --help give this help
+ -l --list list compressed file contents
+ -L --license display software license
+ -n --no-name do not save or restore the original name and
+ time stamp
+ -N --name save or restore the original name and time stamp
+ -q --quiet suppress all warnings
+ -r --recursive operate recursively on directories
+ -S .suf --suffix .suf use suffix .suf on compressed files
+ -t --test test compressed file integrity
+ -v --verbose verbose mode
+ -V --version display version number
+ -1 --fast compress faster
+ -9 --best compress better
+ file... files to (de)compress. If none given, use
+ standard input.
diff --git a/release/picobsd/help/gzip.hlp.pl b/release/picobsd/help/gzip.hlp.pl
new file mode 100644
index 0000000..807a95e
--- /dev/null
+++ b/release/picobsd/help/gzip.hlp.pl
@@ -0,0 +1,12 @@
+gzip, gunzip, zcat kompresuj lub dekompresuj plik(i)
+
+ Sposob uzycia:
+
+ gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
+ -c --stdout dekompresuj na stdout
+ -d --decompress dekompresuj
+ -l --list pokaz zawartosc
+ -t --test testuj poprawnosc archiwum
+ -1 --fast szybka kompresja
+ -9 --best dobra kompresja
+ file... pliki do (de)kompresji.
diff --git a/release/picobsd/help/help.hlp b/release/picobsd/help/help.hlp
new file mode 100644
index 0000000..dc35a41
--- /dev/null
+++ b/release/picobsd/help/help.hlp
@@ -0,0 +1,7 @@
+help Simple help system for PicoBSD
+
+ This command displays short description of the commands included
+ on PicoBSD floppy. When invoked with no argument, it displays this
+ text :-). Any other argument is treated as a name of file located in
+ /help directory on the floppy, and this file is displayed page by
+ page.
diff --git a/release/picobsd/help/help.hlp.en b/release/picobsd/help/help.hlp.en
new file mode 100644
index 0000000..dc35a41
--- /dev/null
+++ b/release/picobsd/help/help.hlp.en
@@ -0,0 +1,7 @@
+help Simple help system for PicoBSD
+
+ This command displays short description of the commands included
+ on PicoBSD floppy. When invoked with no argument, it displays this
+ text :-). Any other argument is treated as a name of file located in
+ /help directory on the floppy, and this file is displayed page by
+ page.
diff --git a/release/picobsd/help/help.hlp.pl b/release/picobsd/help/help.hlp.pl
new file mode 100644
index 0000000..fa219d5
--- /dev/null
+++ b/release/picobsd/help/help.hlp.pl
@@ -0,0 +1,7 @@
+help Prosty system pomocy dla PicoBSD
+
+ To polecenie wyswietla krotka instrukcje obslugi programow na
+ dyskietce. Uruchomione bez zadnego argumentu, wyswietla ten tekst. :-)
+ Kazdy inny argument traktowany jest jak nazwa pliku znajdujacego sie
+ w katalogu /help, po czym zostaje wyswietlona zawartosc tego pliku
+ strona po stronie.
diff --git a/release/picobsd/help/hostname.hlp b/release/picobsd/help/hostname.hlp
new file mode 100644
index 0000000..0e29ffe
--- /dev/null
+++ b/release/picobsd/help/hostname.hlp
@@ -0,0 +1,5 @@
+hostname set or print name of current host system
+
+ Usage:
+
+ hostname [-s] [name-of-host]
diff --git a/release/picobsd/help/hostname.hlp.en b/release/picobsd/help/hostname.hlp.en
new file mode 100644
index 0000000..0e29ffe
--- /dev/null
+++ b/release/picobsd/help/hostname.hlp.en
@@ -0,0 +1,5 @@
+hostname set or print name of current host system
+
+ Usage:
+
+ hostname [-s] [name-of-host]
diff --git a/release/picobsd/help/hostname.hlp.pl b/release/picobsd/help/hostname.hlp.pl
new file mode 100644
index 0000000..b40bda8
--- /dev/null
+++ b/release/picobsd/help/hostname.hlp.pl
@@ -0,0 +1,5 @@
+hostname ustaw lub wyswietl nazwe maszyny
+
+ Sposob uzycia:
+
+ hostname [-s] [name-of-host]
diff --git a/release/picobsd/help/ifconfig.hlp b/release/picobsd/help/ifconfig.hlp
new file mode 100644
index 0000000..65da95f
--- /dev/null
+++ b/release/picobsd/help/ifconfig.hlp
@@ -0,0 +1,18 @@
+ifconfig configure network interface parameters
+
+ Usage:
+
+ ifconfig -a [ -d ] [ -u ] [ af ]
+ ifconfig -l [ -d ] [ -u ]
+ [ af [ address [ dest_addr ] ] [ netmask mask ]
+ [ broadcast addr ]
+
+ [ alias ] [ delete ] ]
+ [ up ] [ down ]
+ [ metric n ]
+ [ mtu n ]
+ [ arp | -arp ]
+ [ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]
+ [ media mtype ]
+ [ mediaopt mopts ]
+ [ -mediaopt mopts ]
diff --git a/release/picobsd/help/ifconfig.hlp.en b/release/picobsd/help/ifconfig.hlp.en
new file mode 100644
index 0000000..65da95f
--- /dev/null
+++ b/release/picobsd/help/ifconfig.hlp.en
@@ -0,0 +1,18 @@
+ifconfig configure network interface parameters
+
+ Usage:
+
+ ifconfig -a [ -d ] [ -u ] [ af ]
+ ifconfig -l [ -d ] [ -u ]
+ [ af [ address [ dest_addr ] ] [ netmask mask ]
+ [ broadcast addr ]
+
+ [ alias ] [ delete ] ]
+ [ up ] [ down ]
+ [ metric n ]
+ [ mtu n ]
+ [ arp | -arp ]
+ [ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]
+ [ media mtype ]
+ [ mediaopt mopts ]
+ [ -mediaopt mopts ]
diff --git a/release/picobsd/help/ifconfig.hlp.pl b/release/picobsd/help/ifconfig.hlp.pl
new file mode 100644
index 0000000..7d35e4e
--- /dev/null
+++ b/release/picobsd/help/ifconfig.hlp.pl
@@ -0,0 +1,18 @@
+ifconfig konfiguracja parametrow interfejsow sieciowych
+
+ Sposob uzycia:
+
+ ifconfig -a [ -d ] [ -u ] [ af ]
+ ifconfig -l [ -d ] [ -u ]
+ [ af [ address [ dest_addr ] ] [ netmask mask ]
+ [ broadcast addr ]
+
+ [ alias ] [ delete ] ]
+ [ up ] [ down ]
+ [ metric n ]
+ [ mtu n ]
+ [ arp | -arp ]
+ [ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]
+ [ media mtype ]
+ [ mediaopt mopts ]
+ [ -mediaopt mopts ]
diff --git a/release/picobsd/help/init.hlp b/release/picobsd/help/init.hlp
new file mode 100644
index 0000000..e6ddc73
--- /dev/null
+++ b/release/picobsd/help/init.hlp
@@ -0,0 +1 @@
+init process control initialization
diff --git a/release/picobsd/help/kbdcontrol.hlp b/release/picobsd/help/kbdcontrol.hlp
new file mode 100644
index 0000000..0a77656
--- /dev/null
+++ b/release/picobsd/help/kbdcontrol.hlp
@@ -0,0 +1,7 @@
+kbdcontrol a utility for manipulating the syscons keyboard driver section
+
+ Usage:
+
+ kbdcontrol [-dFx] [-b duration.pitch | belltype]
+ [-r delay.repeat | speed] [-l mapfile] [-f # string]
+ [-h size] [-L mapfile]
diff --git a/release/picobsd/help/kbdcontrol.hlp.en b/release/picobsd/help/kbdcontrol.hlp.en
new file mode 100644
index 0000000..0a77656
--- /dev/null
+++ b/release/picobsd/help/kbdcontrol.hlp.en
@@ -0,0 +1,7 @@
+kbdcontrol a utility for manipulating the syscons keyboard driver section
+
+ Usage:
+
+ kbdcontrol [-dFx] [-b duration.pitch | belltype]
+ [-r delay.repeat | speed] [-l mapfile] [-f # string]
+ [-h size] [-L mapfile]
diff --git a/release/picobsd/help/kbdcontrol.hlp.pl b/release/picobsd/help/kbdcontrol.hlp.pl
new file mode 100644
index 0000000..a459337
--- /dev/null
+++ b/release/picobsd/help/kbdcontrol.hlp.pl
@@ -0,0 +1,7 @@
+kbdcontrol ustawianie parametrow klawiatury
+
+ Sposob uzycia:
+
+ kbdcontrol [-dFx] [-b dlugosc.wysokosc | rodzaj]
+ [-r opoz.czest | szybk] [-l mapa] [-f # napis]
+ [-h rozmiar] [-L mapa]
diff --git a/release/picobsd/help/kget.hlp b/release/picobsd/help/kget.hlp
new file mode 100644
index 0000000..632c807
--- /dev/null
+++ b/release/picobsd/help/kget.hlp
@@ -0,0 +1,21 @@
+kget Get list of kernel configuration.
+
+ This utility allows to gather device configuration which possibly
+ was changed in userconfig (-c) session, and to save it to /kernel.config
+ file on startup floppy, so that when user boots next time, the
+ settings will automatically be changed.
+
+ Usage is straightforward:
+
+ kget [-incore|kernel_name] [vanilla]
+
+ E.g.: Get device configuration of running kernel
+
+ kget -incore
+
+ Produce list of parameters changed from /stand/vanilla
+
+ kget -incore /stand/vanilla
+
+ (You can redirect the stdout to /kernel.config - this list
+ already contains all the requires keywords.)
diff --git a/release/picobsd/help/kget.hlp.en b/release/picobsd/help/kget.hlp.en
new file mode 100644
index 0000000..632c807
--- /dev/null
+++ b/release/picobsd/help/kget.hlp.en
@@ -0,0 +1,21 @@
+kget Get list of kernel configuration.
+
+ This utility allows to gather device configuration which possibly
+ was changed in userconfig (-c) session, and to save it to /kernel.config
+ file on startup floppy, so that when user boots next time, the
+ settings will automatically be changed.
+
+ Usage is straightforward:
+
+ kget [-incore|kernel_name] [vanilla]
+
+ E.g.: Get device configuration of running kernel
+
+ kget -incore
+
+ Produce list of parameters changed from /stand/vanilla
+
+ kget -incore /stand/vanilla
+
+ (You can redirect the stdout to /kernel.config - this list
+ already contains all the requires keywords.)
diff --git a/release/picobsd/help/kget.hlp.pl b/release/picobsd/help/kget.hlp.pl
new file mode 100644
index 0000000..005fb26
--- /dev/null
+++ b/release/picobsd/help/kget.hlp.pl
@@ -0,0 +1,23 @@
+kget Utworz liste konfiguracji jadra
+
+ Ten program pozwala uzyskac parametry sterownikow urzadzen,
+ ktore byc moze zostaly zmienione na etapie uruchamiania systemu z
+ flaga '-c', pozwala rowniez zachowac te liste w specjalnym formacie
+ do pliku /kernel.config, zeby zostala uzyta jako dane konfiguracyjne
+ przy nastepnym starcie systemu.
+
+ Sposob uzycia:
+
+ kget [-incore|nazwa_jadra] [vanilla]
+
+ E.g.: Utworz liste parametrow dzialajacego jadra:
+
+ kget -incore
+
+ Utworz liste roznic w parametrach w stosunku do listy
+ zawartej w pliku /stand/vanilla:
+
+ kget -incore /stand/vanilla
+
+ (Wynik tego polecenia mozna przekierowac wprost do pliku
+ /kernel.config na dyskietce)
diff --git a/release/picobsd/help/kill.hlp b/release/picobsd/help/kill.hlp
new file mode 100644
index 0000000..e6322e7
--- /dev/null
+++ b/release/picobsd/help/kill.hlp
@@ -0,0 +1,8 @@
+kill terminate or signal a process
+
+ Usage:
+
+ kill [-s signal_name] pid ...
+ kill -l [exit_status]
+ kill -signal_name pid ...
+ kill -signal_number pid ...
diff --git a/release/picobsd/help/kill.hlp.en b/release/picobsd/help/kill.hlp.en
new file mode 100644
index 0000000..e6322e7
--- /dev/null
+++ b/release/picobsd/help/kill.hlp.en
@@ -0,0 +1,8 @@
+kill terminate or signal a process
+
+ Usage:
+
+ kill [-s signal_name] pid ...
+ kill -l [exit_status]
+ kill -signal_name pid ...
+ kill -signal_number pid ...
diff --git a/release/picobsd/help/kill.hlp.pl b/release/picobsd/help/kill.hlp.pl
new file mode 100644
index 0000000..bde1e71
--- /dev/null
+++ b/release/picobsd/help/kill.hlp.pl
@@ -0,0 +1,8 @@
+kill zakoncz proces, lub wyslij sygnal
+
+ Sposob uzycia:
+
+ kill [-s signal_name] pid ...
+ kill -l [exit_status]
+ kill -signal_name pid ...
+ kill -signal_number pid ...
diff --git a/release/picobsd/help/ln.hlp b/release/picobsd/help/ln.hlp
new file mode 100644
index 0000000..a7c7065
--- /dev/null
+++ b/release/picobsd/help/ln.hlp
@@ -0,0 +1,9 @@
+ln make links
+
+ Usage:
+
+ ln [-fs] file1 file2
+ ln [-fs] file ... directory
+
+ -f Unlink any already existing file (force link)
+ -s Create symbolic link
diff --git a/release/picobsd/help/ln.hlp.en b/release/picobsd/help/ln.hlp.en
new file mode 100644
index 0000000..a7c7065
--- /dev/null
+++ b/release/picobsd/help/ln.hlp.en
@@ -0,0 +1,9 @@
+ln make links
+
+ Usage:
+
+ ln [-fs] file1 file2
+ ln [-fs] file ... directory
+
+ -f Unlink any already existing file (force link)
+ -s Create symbolic link
diff --git a/release/picobsd/help/ln.hlp.pl b/release/picobsd/help/ln.hlp.pl
new file mode 100644
index 0000000..22fbd06
--- /dev/null
+++ b/release/picobsd/help/ln.hlp.pl
@@ -0,0 +1,9 @@
+ln utworz link
+
+ Sposob uzycia:
+
+ ln [-fs] plik1 plik2
+ ln [-fs] plik ... katalog
+
+ -f (force) usun uprzednio istniejacy plik o tej samej nazwie
+ -s utworz link symboliczny
diff --git a/release/picobsd/help/ls.hlp b/release/picobsd/help/ls.hlp
new file mode 100644
index 0000000..7a171cb
--- /dev/null
+++ b/release/picobsd/help/ls.hlp
@@ -0,0 +1,10 @@
+ls list directory contents
+
+ Usage:
+
+ ls [-ACFLRTWacdfgikloqrstu1] [file ...]
+
+ Most common switches are:
+
+ -l list in long format
+ -a include directory entries whose names begin with a dot '.'
diff --git a/release/picobsd/help/ls.hlp.en b/release/picobsd/help/ls.hlp.en
new file mode 100644
index 0000000..7a171cb
--- /dev/null
+++ b/release/picobsd/help/ls.hlp.en
@@ -0,0 +1,10 @@
+ls list directory contents
+
+ Usage:
+
+ ls [-ACFLRTWacdfgikloqrstu1] [file ...]
+
+ Most common switches are:
+
+ -l list in long format
+ -a include directory entries whose names begin with a dot '.'
diff --git a/release/picobsd/help/ls.hlp.pl b/release/picobsd/help/ls.hlp.pl
new file mode 100644
index 0000000..f6860b6
--- /dev/null
+++ b/release/picobsd/help/ls.hlp.pl
@@ -0,0 +1,11 @@
+ls wyswietl zawartosc katalogu
+
+ Sposob uzycia:
+
+ ls [-ACFLRTWacdfgikloqrstu1] [plik ...]
+
+ Najczesciej uzywane opcje:
+
+ -l (long) wyswietl w rozszerzonym formacie
+ -a wyswietl rowniez te pliki, ktorych nazwy zaczynaja sie od '.'
+ -R wyswietl rowniez zawartosc podkatalogow
diff --git a/release/picobsd/help/mkdir.hlp b/release/picobsd/help/mkdir.hlp
new file mode 100644
index 0000000..85c3142
--- /dev/null
+++ b/release/picobsd/help/mkdir.hlp
@@ -0,0 +1,5 @@
+mkdir make directories
+
+ Usage:
+
+ mkdir [-p] [-m mode] directory ...
diff --git a/release/picobsd/help/mkdir.hlp.en b/release/picobsd/help/mkdir.hlp.en
new file mode 100644
index 0000000..85c3142
--- /dev/null
+++ b/release/picobsd/help/mkdir.hlp.en
@@ -0,0 +1,5 @@
+mkdir make directories
+
+ Usage:
+
+ mkdir [-p] [-m mode] directory ...
diff --git a/release/picobsd/help/mkdir.hlp.pl b/release/picobsd/help/mkdir.hlp.pl
new file mode 100644
index 0000000..2354766
--- /dev/null
+++ b/release/picobsd/help/mkdir.hlp.pl
@@ -0,0 +1,5 @@
+mkdir utworz katalog
+
+ Sposob uzycia:
+
+ mkdir [-p] [-m mode] nazwa_katalogu ...
diff --git a/release/picobsd/help/mknod.hlp b/release/picobsd/help/mknod.hlp
new file mode 100644
index 0000000..5de07ba
--- /dev/null
+++ b/release/picobsd/help/mknod.hlp
@@ -0,0 +1,5 @@
+mknod build special file
+
+ Usage:
+
+ mknod name [b | c] major minor
diff --git a/release/picobsd/help/more.hlp b/release/picobsd/help/more.hlp
new file mode 100644
index 0000000..0333be2
--- /dev/null
+++ b/release/picobsd/help/more.hlp
@@ -0,0 +1,7 @@
+more file perusal filter for crt viewing
+
+ Usage:
+
+ more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [file ...]
+
+ But most commonly just 'more <file>' or e.g. 'ls -l|more'
diff --git a/release/picobsd/help/more.hlp.en b/release/picobsd/help/more.hlp.en
new file mode 100644
index 0000000..0333be2
--- /dev/null
+++ b/release/picobsd/help/more.hlp.en
@@ -0,0 +1,7 @@
+more file perusal filter for crt viewing
+
+ Usage:
+
+ more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [file ...]
+
+ But most commonly just 'more <file>' or e.g. 'ls -l|more'
diff --git a/release/picobsd/help/more.hlp.pl b/release/picobsd/help/more.hlp.pl
new file mode 100644
index 0000000..1e4d4e95
--- /dev/null
+++ b/release/picobsd/help/more.hlp.pl
@@ -0,0 +1,8 @@
+more program do wyswietlania zawartosci plikow
+
+ Sposob uzycia:
+
+ more [-ceinus] [-t tag] [-x tabs] [-/ pattern] [-#] [plik ...]
+
+ Najczesciej stosowany w postaci 'more nazwa pliku' lub jako
+ filtr: 'ls -l | more'
diff --git a/release/picobsd/help/mount.hlp b/release/picobsd/help/mount.hlp
new file mode 100644
index 0000000..526fbe8
--- /dev/null
+++ b/release/picobsd/help/mount.hlp
@@ -0,0 +1,21 @@
+mount mount file systems
+
+ Usage:
+
+ mount [-dfpruvw] [-o options] [-t ufs | external_type] special node
+ mount [-adfpruvw] [-t ufs | external_type]
+ mount [-dfpruvw] special | node
+
+ E.g.:
+
+ * mount UFS floppy A: on /mnt directory:
+
+ mount /dev/fd0c /mnt
+
+ * mount DOS primary partition (on primary IDE drive) on /dos:
+
+ mount -t msdos /dev/wd0s1 /dos
+
+ * mount Linux partition on /mnt
+
+ mount -t ext2fs /dev/wd0s1 /mnt
diff --git a/release/picobsd/help/mount.hlp.en b/release/picobsd/help/mount.hlp.en
new file mode 100644
index 0000000..526fbe8
--- /dev/null
+++ b/release/picobsd/help/mount.hlp.en
@@ -0,0 +1,21 @@
+mount mount file systems
+
+ Usage:
+
+ mount [-dfpruvw] [-o options] [-t ufs | external_type] special node
+ mount [-adfpruvw] [-t ufs | external_type]
+ mount [-dfpruvw] special | node
+
+ E.g.:
+
+ * mount UFS floppy A: on /mnt directory:
+
+ mount /dev/fd0c /mnt
+
+ * mount DOS primary partition (on primary IDE drive) on /dos:
+
+ mount -t msdos /dev/wd0s1 /dos
+
+ * mount Linux partition on /mnt
+
+ mount -t ext2fs /dev/wd0s1 /mnt
diff --git a/release/picobsd/help/mount.hlp.pl b/release/picobsd/help/mount.hlp.pl
new file mode 100644
index 0000000..0bf0bed
--- /dev/null
+++ b/release/picobsd/help/mount.hlp.pl
@@ -0,0 +1,19 @@
+mount zamontuj system plikow
+
+ Sposob uzycia:
+
+ mount [-dfpruvw] [-o opcje] [-t [ufs|msdos|ext2fs] urzadzenie punkt
+
+ N.p.:
+
+ * zamontuj dyskietke DOS A: na katalogu /mnt:
+
+ mount -t msdos /dev/fd0a /mnt
+
+ * zamontuj pierwsza partycje DOS (na pierwszym dysku IDE) na /dos:
+
+ mount -t msdos /dev/wd0s1 /dos
+
+ * zamontuj partycje Linux na /mnt:
+
+ mount -t ext2fs /dev/wd0s1 /mnt
diff --git a/release/picobsd/help/mount_cd9660.hlp b/release/picobsd/help/mount_cd9660.hlp
new file mode 100644
index 0000000..1e13824
--- /dev/null
+++ b/release/picobsd/help/mount_cd9660.hlp
@@ -0,0 +1,9 @@
+mount_cd9660 mount an ISO-9660 filesystem
+
+ Usage:
+
+ mount_cd9660 [-egrv] [-o options] [-s startsector] special node
+
+ Most commonly, to mount an ATAPI CD-ROM on /mnt directory:
+
+ mount_cd9660 /dev/wcd0c /mnt
diff --git a/release/picobsd/help/mount_cd9660.hlp.en b/release/picobsd/help/mount_cd9660.hlp.en
new file mode 100644
index 0000000..1e13824
--- /dev/null
+++ b/release/picobsd/help/mount_cd9660.hlp.en
@@ -0,0 +1,9 @@
+mount_cd9660 mount an ISO-9660 filesystem
+
+ Usage:
+
+ mount_cd9660 [-egrv] [-o options] [-s startsector] special node
+
+ Most commonly, to mount an ATAPI CD-ROM on /mnt directory:
+
+ mount_cd9660 /dev/wcd0c /mnt
diff --git a/release/picobsd/help/mount_cd9660.hlp.pl b/release/picobsd/help/mount_cd9660.hlp.pl
new file mode 100644
index 0000000..d7b7d75
--- /dev/null
+++ b/release/picobsd/help/mount_cd9660.hlp.pl
@@ -0,0 +1,9 @@
+mount_cd9660 zamontuj CD-ROM (ISO-9660 filesystem)
+
+ Sposob uzycia:
+
+ mount_cd9660 [-egrv] [-o options] [-s startsector] urzadzenie punkt
+
+ Najczesciej w celu zamontowania CD-ROMu ATAPI:
+
+ mount_cd9660 /dev/wcd0c /mnt
diff --git a/release/picobsd/help/mount_ext2fs.hlp b/release/picobsd/help/mount_ext2fs.hlp
new file mode 100644
index 0000000..636d9c9
--- /dev/null
+++ b/release/picobsd/help/mount_ext2fs.hlp
@@ -0,0 +1,11 @@
+mount_ext2fs mount a ext2fs (Linux) file system
+
+ Usage:
+
+ mount_ext2fs [-o options] special node
+
+ E.g. to mount first partition of first IDE drive on /mnt:
+
+ mount_ext2fs /dev/wd0s1 /mnt
+
+ To mount it read-only, add '-o ro' as options.
diff --git a/release/picobsd/help/mount_ext2fs.hlp.en b/release/picobsd/help/mount_ext2fs.hlp.en
new file mode 100644
index 0000000..636d9c9
--- /dev/null
+++ b/release/picobsd/help/mount_ext2fs.hlp.en
@@ -0,0 +1,11 @@
+mount_ext2fs mount a ext2fs (Linux) file system
+
+ Usage:
+
+ mount_ext2fs [-o options] special node
+
+ E.g. to mount first partition of first IDE drive on /mnt:
+
+ mount_ext2fs /dev/wd0s1 /mnt
+
+ To mount it read-only, add '-o ro' as options.
diff --git a/release/picobsd/help/mount_ext2fs.hlp.pl b/release/picobsd/help/mount_ext2fs.hlp.pl
new file mode 100644
index 0000000..f2c241c
--- /dev/null
+++ b/release/picobsd/help/mount_ext2fs.hlp.pl
@@ -0,0 +1,11 @@
+mount_ext2fs zamontuj system plikow EXT2FS (Linux)
+
+ Sposob uzycia:
+
+ mount_ext2fs [-o opcje] urzadzenie punkt
+
+ N.p. zeby zamontowac pierwsza partycje na pierwszym dysku IDE:
+
+ mount_ext2fs /dev/wd0s1 /mnt
+
+ W celu zamontowania tylko do odczytu, nalezy dodac opcje -o ro.
diff --git a/release/picobsd/help/mount_msdos.hlp b/release/picobsd/help/mount_msdos.hlp
new file mode 100644
index 0000000..365b65c
--- /dev/null
+++ b/release/picobsd/help/mount_msdos.hlp
@@ -0,0 +1,13 @@
+mount_msdos mount an MS-DOS file system
+
+ Usage:
+
+ mount_msdos [-o options] [-u user] [-g group] [-m mask] bdev dir
+
+ E.g. to mount primary DOS partition of primary IDE drive on /dos:
+
+ mount_msdos /dev/wd0s1 /dos
+
+ To mount first extended partition on /mnt:
+
+ mount_msdos /dev/wd0s5 /mnt
diff --git a/release/picobsd/help/mount_msdos.hlp.en b/release/picobsd/help/mount_msdos.hlp.en
new file mode 100644
index 0000000..365b65c
--- /dev/null
+++ b/release/picobsd/help/mount_msdos.hlp.en
@@ -0,0 +1,13 @@
+mount_msdos mount an MS-DOS file system
+
+ Usage:
+
+ mount_msdos [-o options] [-u user] [-g group] [-m mask] bdev dir
+
+ E.g. to mount primary DOS partition of primary IDE drive on /dos:
+
+ mount_msdos /dev/wd0s1 /dos
+
+ To mount first extended partition on /mnt:
+
+ mount_msdos /dev/wd0s5 /mnt
diff --git a/release/picobsd/help/mount_msdos.hlp.pl b/release/picobsd/help/mount_msdos.hlp.pl
new file mode 100644
index 0000000..b587110
--- /dev/null
+++ b/release/picobsd/help/mount_msdos.hlp.pl
@@ -0,0 +1,13 @@
+mount_msdos zamontuj system plikow MS-DOS
+
+ Sposob uzycia:
+
+ mount_msdos [-o opcje] [-u user] [-g grupa] [-m maska] bdev dir
+
+ N.p. zeby zamontowac partycje C: z dysku IDE na /doc
+
+ mount_msdos /dev/wd0s1 /dos
+
+ W celu zamontowania pierwszej partycji extended"
+
+ mount_msdos /dev/wd0s5 /mnt
diff --git a/release/picobsd/help/mount_procfs.hlp b/release/picobsd/help/mount_procfs.hlp
new file mode 100644
index 0000000..d7cb55f
--- /dev/null
+++ b/release/picobsd/help/mount_procfs.hlp
@@ -0,0 +1,9 @@
+mount_procfs mount process filesystem
+
+ Usage:
+
+ mount_procfs [-o options] what_to_mount mount_point
+
+ Most commonly this will be:
+
+ mount_procfs proc /proc
diff --git a/release/picobsd/help/moused.hlp b/release/picobsd/help/moused.hlp
new file mode 100644
index 0000000..0b7f7f4
--- /dev/null
+++ b/release/picobsd/help/moused.hlp
@@ -0,0 +1,44 @@
+moused mouse daemon
+
+ Usage:
+
+ moused [-3DPRcdfs] [-F rate] [-r resolution] [-S baudrate] [-C threshold]
+ [-m N=M] [-z target] [-t mousetype] -p port
+
+ Most common options are:
+
+ -3 Emulate the third (middle) button for 2-button mice. It is emu-
+ lated by pressing the left and right physical buttons simultane-
+ ously.
+ -p port Use port to communicate with the mouse.
+ -t type
+ microsoft Microsoft (2-button) serial mouse protocol.
+ intellimouse Microsoft IntelliMouse protocol. Genius Net-
+ Mouse, ASCII Mie Mouse, Logitech MouseMan+ and
+ FirstMouse+ use this protocol too.
+ mousesystems MouseSystems 5-byte protocol. 3-button mice may
+ use this protocol.
+ mmseries MM Series mouse protocol.
+ logitech Logitech mouse protocol. Note that this is for
+ old Logitech models. mouseman or intellimouse
+ should be specified for newer models.
+ mouseman Logitech MouseMan and TrackMan protocol. Some
+ 3-button mice may be compatible with this proto-
+ col. Note that MouseMan+ and FirstMouse+ use
+ intellimouse protocol rather than this one.
+ glidepoint ALPS GlidePoint protocol.
+ thinkingmouse Kensington ThinkingMouse protocol.
+ mmhittab Hitachi tablet protocol.
+
+3-button serial mice may have a small switch to choose between
+``MS'' and ``PC'', or ``2'' and ``3''. ``MS'' or ``2'' usually mean
+the microsoft protocol. ``PC'' or ``3'' will choose the
+mousesystems protocol.
+To test if the selected protocol type is correct for the given mouse, en-
+able the mouse pointer in the current virtual console:
+ vidcontrol -m on
+start the mouse daemon in the foreground mode:
+ moused -f -p _selected_port_ -t _selected_protocol_
+and see if the mouse pointer travels correctly according to the mouse
+movement. Then try cut & paste features by clicking the left, right and
+middle buttons. Type ^C to stop the command.
diff --git a/release/picobsd/help/moused.hlp.en b/release/picobsd/help/moused.hlp.en
new file mode 100644
index 0000000..0b7f7f4
--- /dev/null
+++ b/release/picobsd/help/moused.hlp.en
@@ -0,0 +1,44 @@
+moused mouse daemon
+
+ Usage:
+
+ moused [-3DPRcdfs] [-F rate] [-r resolution] [-S baudrate] [-C threshold]
+ [-m N=M] [-z target] [-t mousetype] -p port
+
+ Most common options are:
+
+ -3 Emulate the third (middle) button for 2-button mice. It is emu-
+ lated by pressing the left and right physical buttons simultane-
+ ously.
+ -p port Use port to communicate with the mouse.
+ -t type
+ microsoft Microsoft (2-button) serial mouse protocol.
+ intellimouse Microsoft IntelliMouse protocol. Genius Net-
+ Mouse, ASCII Mie Mouse, Logitech MouseMan+ and
+ FirstMouse+ use this protocol too.
+ mousesystems MouseSystems 5-byte protocol. 3-button mice may
+ use this protocol.
+ mmseries MM Series mouse protocol.
+ logitech Logitech mouse protocol. Note that this is for
+ old Logitech models. mouseman or intellimouse
+ should be specified for newer models.
+ mouseman Logitech MouseMan and TrackMan protocol. Some
+ 3-button mice may be compatible with this proto-
+ col. Note that MouseMan+ and FirstMouse+ use
+ intellimouse protocol rather than this one.
+ glidepoint ALPS GlidePoint protocol.
+ thinkingmouse Kensington ThinkingMouse protocol.
+ mmhittab Hitachi tablet protocol.
+
+3-button serial mice may have a small switch to choose between
+``MS'' and ``PC'', or ``2'' and ``3''. ``MS'' or ``2'' usually mean
+the microsoft protocol. ``PC'' or ``3'' will choose the
+mousesystems protocol.
+To test if the selected protocol type is correct for the given mouse, en-
+able the mouse pointer in the current virtual console:
+ vidcontrol -m on
+start the mouse daemon in the foreground mode:
+ moused -f -p _selected_port_ -t _selected_protocol_
+and see if the mouse pointer travels correctly according to the mouse
+movement. Then try cut & paste features by clicking the left, right and
+middle buttons. Type ^C to stop the command.
diff --git a/release/picobsd/help/moused.hlp.pl b/release/picobsd/help/moused.hlp.pl
new file mode 100644
index 0000000..4179120
--- /dev/null
+++ b/release/picobsd/help/moused.hlp.pl
@@ -0,0 +1,29 @@
+moused mouse daemon
+
+ Sposob uzycia:
+
+ moused [-3DPRcdfs] [-F rate] [-r resolution] [-S baudrate] [-C threshold]
+ [-m N=M] [-z target] [-t mousetype] -p port
+
+ Najczestsze opcje to:
+
+ -3 emulacja trzeciego (srodkowego) przycisku na dwu-klawiszowych
+ myszach.
+ -p port nazwa portu: /dev/cuaa0 == COM1:, psm0 == gniazdo PS/2
+ -t typ
+ microsoft Microsoft (2 przyciski) mysz szeregowa.
+ intellimouse Microsoft IntelliMouse, Genius Net- Mouse,
+ ASCII Mie Mouse, Logitech MouseMan+, FirstMouse+
+ mousesystems MouseSystems
+ mmseries MM Series
+ logitech Logitech. Ten protokol jest dla starszych typow
+ myszy - dla nowszych trzeba uzywac mouseman lub
+ intellimouse
+ mouseman Logitech MouseMan i TrackMan
+ glidepoint ALPS GlidePoint
+ thinkingmouse Kensington ThinkingMouse protocol.
+ mmhittab Hitachi tablet
+
+Mozna wlaczyc wyswietlanie wskaznika myszy przez:
+
+ vidcontrol -m on
diff --git a/release/picobsd/help/mv.hlp b/release/picobsd/help/mv.hlp
new file mode 100644
index 0000000..0cbf6d8
--- /dev/null
+++ b/release/picobsd/help/mv.hlp
@@ -0,0 +1,9 @@
+mv move files
+
+ Usage:
+
+ mv [-f | -i] source target
+ mv [-f | -i] source ... directory
+
+ -f Do not prompt for confirmation
+ -i Prompt for confirmation
diff --git a/release/picobsd/help/mv.hlp.en b/release/picobsd/help/mv.hlp.en
new file mode 100644
index 0000000..0cbf6d8
--- /dev/null
+++ b/release/picobsd/help/mv.hlp.en
@@ -0,0 +1,9 @@
+mv move files
+
+ Usage:
+
+ mv [-f | -i] source target
+ mv [-f | -i] source ... directory
+
+ -f Do not prompt for confirmation
+ -i Prompt for confirmation
diff --git a/release/picobsd/help/mv.hlp.pl b/release/picobsd/help/mv.hlp.pl
new file mode 100644
index 0000000..5a6b27e
--- /dev/null
+++ b/release/picobsd/help/mv.hlp.pl
@@ -0,0 +1,9 @@
+mv przenis plik(i)
+
+ Sposob uzycia:
+
+ mv [-f | -i] plik1 plik2
+ mv [-f | -i] plik1 ... plikN katalog
+
+ -f nie pytaj o potwierdzenie
+ -i pytaj o potwierdzenie
diff --git a/release/picobsd/help/ping.hlp b/release/picobsd/help/ping.hlp
new file mode 100644
index 0000000..6d3cb71
--- /dev/null
+++ b/release/picobsd/help/ping.hlp
@@ -0,0 +1,10 @@
+ping send ICMP ECHO_REQUEST packets to network hosts
+
+ Usage:
+
+ ping [-QRadfnqrv] [-c count] [-i wait] [-l preload] [-p pattern]
+ [-s packetsize] [host | [-L] [-I iface] [-T ttl] mcast-group]
+
+ Most commonly:
+
+ ping <host>
diff --git a/release/picobsd/help/ping.hlp.en b/release/picobsd/help/ping.hlp.en
new file mode 100644
index 0000000..6d3cb71
--- /dev/null
+++ b/release/picobsd/help/ping.hlp.en
@@ -0,0 +1,10 @@
+ping send ICMP ECHO_REQUEST packets to network hosts
+
+ Usage:
+
+ ping [-QRadfnqrv] [-c count] [-i wait] [-l preload] [-p pattern]
+ [-s packetsize] [host | [-L] [-I iface] [-T ttl] mcast-group]
+
+ Most commonly:
+
+ ping <host>
diff --git a/release/picobsd/help/ping.hlp.pl b/release/picobsd/help/ping.hlp.pl
new file mode 100644
index 0000000..47faed6
--- /dev/null
+++ b/release/picobsd/help/ping.hlp.pl
@@ -0,0 +1,10 @@
+ping wyslij prosbe ICMP o echo
+
+ Sposob uzycia:
+
+ ping [-QRadfnqrv] [-c count] [-i wait] [-l preload] [-p pattern]
+ [-s packetsize] [host | [-L] [-I iface] [-T ttl] mcast-group]
+
+ Najczesciej:
+
+ ping nazwa_maszyny
diff --git a/release/picobsd/help/ppp.hlp b/release/picobsd/help/ppp.hlp
new file mode 100644
index 0000000..55527dd
--- /dev/null
+++ b/release/picobsd/help/ppp.hlp
@@ -0,0 +1,16 @@
+ppp Point to Point Protocol client
+
+ Usage:
+
+ ppp [-auto | -background | -direct | -dedicated | -ddial ] [system]
+
+ In case of PicoBSD most probably this will be:
+
+ ppp -background <system_name>
+
+ You should run 'dialup' script to configure automatic dialing. Then
+ you can use
+
+ ppp -background dialup
+
+ to connect to your provider.
diff --git a/release/picobsd/help/ppp.hlp.en b/release/picobsd/help/ppp.hlp.en
new file mode 100644
index 0000000..55527dd
--- /dev/null
+++ b/release/picobsd/help/ppp.hlp.en
@@ -0,0 +1,16 @@
+ppp Point to Point Protocol client
+
+ Usage:
+
+ ppp [-auto | -background | -direct | -dedicated | -ddial ] [system]
+
+ In case of PicoBSD most probably this will be:
+
+ ppp -background <system_name>
+
+ You should run 'dialup' script to configure automatic dialing. Then
+ you can use
+
+ ppp -background dialup
+
+ to connect to your provider.
diff --git a/release/picobsd/help/ppp.hlp.pl b/release/picobsd/help/ppp.hlp.pl
new file mode 100644
index 0000000..7c5f6a6
--- /dev/null
+++ b/release/picobsd/help/ppp.hlp.pl
@@ -0,0 +1,14 @@
+ppp obsluga protokolu PPP
+
+ Sposob uzycia:
+
+ ppp [-auto | -background | -direct | -dedicated | -ddial ] [system]
+
+ W przypadku PicoBSD najczesciej bedzie to:
+
+ ppp -background nazwa_polaczenia
+
+ Nalezy przedtem uruchomic skrypt 'dialup' w celu poprawnej
+ konfiguracji. Wowczas w celu dokonania polaczenia wystarczy:
+
+ ppp -background dialup
diff --git a/release/picobsd/help/ps.hlp b/release/picobsd/help/ps.hlp
new file mode 100644
index 0000000..3e5125b
--- /dev/null
+++ b/release/picobsd/help/ps.hlp
@@ -0,0 +1,9 @@
+ps List running processes
+
+ This is a small 'ps' replacement, which uses information
+ available via sysctl(3) interface. It's primitive, but
+ gives you the most important informations, i.e. how many
+ processes are running and on which vty, and the pid number
+ to kill some of them. :-)
+
+ Currently, no options are implemented yet.
diff --git a/release/picobsd/help/ps.hlp.en b/release/picobsd/help/ps.hlp.en
new file mode 100644
index 0000000..3e5125b
--- /dev/null
+++ b/release/picobsd/help/ps.hlp.en
@@ -0,0 +1,9 @@
+ps List running processes
+
+ This is a small 'ps' replacement, which uses information
+ available via sysctl(3) interface. It's primitive, but
+ gives you the most important informations, i.e. how many
+ processes are running and on which vty, and the pid number
+ to kill some of them. :-)
+
+ Currently, no options are implemented yet.
diff --git a/release/picobsd/help/ps.hlp.pl b/release/picobsd/help/ps.hlp.pl
new file mode 100644
index 0000000..f9b61cc
--- /dev/null
+++ b/release/picobsd/help/ps.hlp.pl
@@ -0,0 +1,7 @@
+ps Pokaz dzialajace procesy
+
+ Prosta wersja programu, korzystajaca z informacji dostepnych przez
+ sysctl(3). Wyswietla wystarczajaco duzo informacji, zeby zorientowac
+ sie w stanie systemu, oraz ewentualnie zastopowac jakies procesy.
+
+ Obecnie nie posiada zadnych opcji.
diff --git a/release/picobsd/help/pwd.hlp b/release/picobsd/help/pwd.hlp
new file mode 100644
index 0000000..593a9eb
--- /dev/null
+++ b/release/picobsd/help/pwd.hlp
@@ -0,0 +1 @@
+pwd return working directory name
diff --git a/release/picobsd/help/pwd.hlp.en b/release/picobsd/help/pwd.hlp.en
new file mode 100644
index 0000000..593a9eb
--- /dev/null
+++ b/release/picobsd/help/pwd.hlp.en
@@ -0,0 +1 @@
+pwd return working directory name
diff --git a/release/picobsd/help/pwd.hlp.pl b/release/picobsd/help/pwd.hlp.pl
new file mode 100644
index 0000000..2a926bc
--- /dev/null
+++ b/release/picobsd/help/pwd.hlp.pl
@@ -0,0 +1 @@
+pwd wyswietl aktualny katalog.
diff --git a/release/picobsd/help/reboot.hlp b/release/picobsd/help/reboot.hlp
new file mode 100644
index 0000000..d40c8ca
--- /dev/null
+++ b/release/picobsd/help/reboot.hlp
@@ -0,0 +1,3 @@
+reboot reboot the system
+
+ Press Ctlr-Alt-Del instead of 'reboot'.
diff --git a/release/picobsd/help/reboot.hlp.en b/release/picobsd/help/reboot.hlp.en
new file mode 100644
index 0000000..d40c8ca
--- /dev/null
+++ b/release/picobsd/help/reboot.hlp.en
@@ -0,0 +1,3 @@
+reboot reboot the system
+
+ Press Ctlr-Alt-Del instead of 'reboot'.
diff --git a/release/picobsd/help/reboot.hlp.pl b/release/picobsd/help/reboot.hlp.pl
new file mode 100644
index 0000000..b809804
--- /dev/null
+++ b/release/picobsd/help/reboot.hlp.pl
@@ -0,0 +1,3 @@
+reboot zrestartuj system
+
+ Nacisnij Ctlr-Alt-Del.
diff --git a/release/picobsd/help/rm.hlp b/release/picobsd/help/rm.hlp
new file mode 100644
index 0000000..60f2cd1
--- /dev/null
+++ b/release/picobsd/help/rm.hlp
@@ -0,0 +1,13 @@
+rm remove directory entries
+
+ Usage:
+
+ rm [-f | -i] [-dPRrW] file ...
+
+ -f attepmt removal without confirmation, regardless of
+ premissions
+ -i request confirmation before removing
+ -r remove the whole tree rooted at "file" argument
+
+ WARNING: There is no way to "undelete" deleted files! They
+ are lost forever.
diff --git a/release/picobsd/help/rm.hlp.en b/release/picobsd/help/rm.hlp.en
new file mode 100644
index 0000000..60f2cd1
--- /dev/null
+++ b/release/picobsd/help/rm.hlp.en
@@ -0,0 +1,13 @@
+rm remove directory entries
+
+ Usage:
+
+ rm [-f | -i] [-dPRrW] file ...
+
+ -f attepmt removal without confirmation, regardless of
+ premissions
+ -i request confirmation before removing
+ -r remove the whole tree rooted at "file" argument
+
+ WARNING: There is no way to "undelete" deleted files! They
+ are lost forever.
diff --git a/release/picobsd/help/rm.hlp.pl b/release/picobsd/help/rm.hlp.pl
new file mode 100644
index 0000000..d847ff0
--- /dev/null
+++ b/release/picobsd/help/rm.hlp.pl
@@ -0,0 +1,12 @@
+rm usun plik(i)
+
+ Sposob uzycia:
+
+ rm [-f | -i] [-dPRrW] plik ...
+
+ -f sprobuj usunac sila, nie sprawdzajac praw dostepu
+ -i pytaj przed usunieciem
+ -r usun cale drzewko zaczynajace sie od nazwy 'plik'
+
+ OSTRZEZENIE: Nie ma zadnego sposobu na odtworzenie
+ skasowanych plikow!!! Sa one stracone na zawsze.
diff --git a/release/picobsd/help/route.hlp b/release/picobsd/help/route.hlp
new file mode 100644
index 0000000..bf0061b
--- /dev/null
+++ b/release/picobsd/help/route.hlp
@@ -0,0 +1,13 @@
+route manually manipulate the routing tables
+
+ Usage:
+
+ route [ -nqv ] command [[ modifiers ] args ]
+
+ Where 'command' is most commonly 'add' or 'delete', modifiers can be
+ '-net' or '-host', and args are destination and gateway.
+
+ E.g., to add default route to the gateway:
+
+ route add default <gateway name or IP>
+
diff --git a/release/picobsd/help/route.hlp.en b/release/picobsd/help/route.hlp.en
new file mode 100644
index 0000000..bf0061b
--- /dev/null
+++ b/release/picobsd/help/route.hlp.en
@@ -0,0 +1,13 @@
+route manually manipulate the routing tables
+
+ Usage:
+
+ route [ -nqv ] command [[ modifiers ] args ]
+
+ Where 'command' is most commonly 'add' or 'delete', modifiers can be
+ '-net' or '-host', and args are destination and gateway.
+
+ E.g., to add default route to the gateway:
+
+ route add default <gateway name or IP>
+
diff --git a/release/picobsd/help/route.hlp.pl b/release/picobsd/help/route.hlp.pl
new file mode 100644
index 0000000..92f4f6d
--- /dev/null
+++ b/release/picobsd/help/route.hlp.pl
@@ -0,0 +1,13 @@
+route recznie manipuluj tablica routingu
+
+ Sposob uzycia:
+
+ route [ -nqv ] polecenie [[ opcje ] args ]
+
+ 'Polecenie' to najczesciej 'add' (dodaj) lub 'delete' (usun),
+ 'opcje to '-net' lub '-host', a argumenty to nazwa hosta lub routera.
+
+ Np. w celu dodania routingu do podstawowego routera w sieci (default):
+
+ route add default nazwa_routera
+
diff --git a/release/picobsd/help/sh.hlp b/release/picobsd/help/sh.hlp
new file mode 100644
index 0000000..6198b23
--- /dev/null
+++ b/release/picobsd/help/sh.hlp
@@ -0,0 +1,3 @@
+sh a Bourne Shell (command interpreter)
+
+ This version is a slightly stripped down /bin/sh, also known as Ash.
diff --git a/release/picobsd/help/sh.hlp.en b/release/picobsd/help/sh.hlp.en
new file mode 100644
index 0000000..6198b23
--- /dev/null
+++ b/release/picobsd/help/sh.hlp.en
@@ -0,0 +1,3 @@
+sh a Bourne Shell (command interpreter)
+
+ This version is a slightly stripped down /bin/sh, also known as Ash.
diff --git a/release/picobsd/help/sh.hlp.pl b/release/picobsd/help/sh.hlp.pl
new file mode 100644
index 0000000..c278b8e
--- /dev/null
+++ b/release/picobsd/help/sh.hlp.pl
@@ -0,0 +1,3 @@
+sh Bourne Shell (interpeter polecen)
+
+ Jeest to Ash, nieco skromniejsz wersja standardowego /bin/sh.
diff --git a/release/picobsd/help/shutdown.hlp b/release/picobsd/help/shutdown.hlp
new file mode 100644
index 0000000..f222d5a
--- /dev/null
+++ b/release/picobsd/help/shutdown.hlp
@@ -0,0 +1,3 @@
+shutdown shut down the system
+
+ Press Ctlr-Alt-Del instead of 'shutdown'.
diff --git a/release/picobsd/help/shutdown.hlp.en b/release/picobsd/help/shutdown.hlp.en
new file mode 100644
index 0000000..f222d5a
--- /dev/null
+++ b/release/picobsd/help/shutdown.hlp.en
@@ -0,0 +1,3 @@
+shutdown shut down the system
+
+ Press Ctlr-Alt-Del instead of 'shutdown'.
diff --git a/release/picobsd/help/shutdown.hlp.pl b/release/picobsd/help/shutdown.hlp.pl
new file mode 100644
index 0000000..2a9a47a
--- /dev/null
+++ b/release/picobsd/help/shutdown.hlp.pl
@@ -0,0 +1,3 @@
+shutdown zakoncz dzialanie systemu
+
+ Nacisnij Ctlr-Alt-Del
diff --git a/release/picobsd/help/ssh.hlp b/release/picobsd/help/ssh.hlp
new file mode 100644
index 0000000..bf6c168
--- /dev/null
+++ b/release/picobsd/help/ssh.hlp
@@ -0,0 +1,29 @@
+ssh Secure Shell remote access command
+
+ Usage: ssh [options] host [command]
+
+ -l user Log in using this user name.
+ -n Redirect input from /dev/null.
+ -a Disable authentication agent forwarding.
+ -x Disable X11 connection forwarding.
+ -i file Identity for RSA authentication (default: ~/.ssh/identity).
+ -t Tty; allocate a tty even if command is given.
+ -v Verbose; display verbose debugging messages.
+ -V Display version number only.
+ -q Quiet; don't display any warning messages.
+ -f Fork into background after authentication.
+ -e char Set escape character; ``none'' = disable (default: ~).
+ -c cipher Select encryption algorithm: ``idea'', ``3des''
+ -p port Connect to this port. Server must be on the same port.
+ -P Don't use priviledged source port.
+ -L listen-port:host:port Forward local port to remote address
+ -R listen-port:host:port Forward remote port to local address
+ These cause ssh to listen for connections on a port, and
+ forward them to the other side by connecting to host:port.
+ -C Enable compression.
+ -o 'option' Process the option as if it was read from a configuration
+ file.
+
+ Most commonly this will be:
+
+ ssh -l your_login remote_host
diff --git a/release/picobsd/help/ssh.hlp.en b/release/picobsd/help/ssh.hlp.en
new file mode 100644
index 0000000..bf6c168
--- /dev/null
+++ b/release/picobsd/help/ssh.hlp.en
@@ -0,0 +1,29 @@
+ssh Secure Shell remote access command
+
+ Usage: ssh [options] host [command]
+
+ -l user Log in using this user name.
+ -n Redirect input from /dev/null.
+ -a Disable authentication agent forwarding.
+ -x Disable X11 connection forwarding.
+ -i file Identity for RSA authentication (default: ~/.ssh/identity).
+ -t Tty; allocate a tty even if command is given.
+ -v Verbose; display verbose debugging messages.
+ -V Display version number only.
+ -q Quiet; don't display any warning messages.
+ -f Fork into background after authentication.
+ -e char Set escape character; ``none'' = disable (default: ~).
+ -c cipher Select encryption algorithm: ``idea'', ``3des''
+ -p port Connect to this port. Server must be on the same port.
+ -P Don't use priviledged source port.
+ -L listen-port:host:port Forward local port to remote address
+ -R listen-port:host:port Forward remote port to local address
+ These cause ssh to listen for connections on a port, and
+ forward them to the other side by connecting to host:port.
+ -C Enable compression.
+ -o 'option' Process the option as if it was read from a configuration
+ file.
+
+ Most commonly this will be:
+
+ ssh -l your_login remote_host
diff --git a/release/picobsd/help/ssh.hlp.pl b/release/picobsd/help/ssh.hlp.pl
new file mode 100644
index 0000000..5a0d3cb
--- /dev/null
+++ b/release/picobsd/help/ssh.hlp.pl
@@ -0,0 +1,29 @@
+ssh Secure Shell
+
+ Sposob uzycia: ssh [options] host [command]
+
+ -l user Log in using this user name.
+ -n Redirect input from /dev/null.
+ -a Disable authentication agent forwarding.
+ -x Disable X11 connection forwarding.
+ -i file Identity for RSA authentication (default: ~/.ssh/identity).
+ -t Tty; allocate a tty even if command is given.
+ -v Verbose; display verbose debugging messages.
+ -V Display version number only.
+ -q Quiet; don't display any warning messages.
+ -f Fork into background after authentication.
+ -e char Set escape character; ``none'' = disable (default: ~).
+ -c cipher Select encryption algorithm: ``idea'', ``3des''
+ -p port Connect to this port. Server must be on the same port.
+ -P Don't use priviledged source port.
+ -L listen-port:host:port Forward local port to remote address
+ -R listen-port:host:port Forward remote port to local address
+ These cause ssh to listen for connections on a port, and
+ forward them to the other side by connecting to host:port.
+ -C Enable compression.
+ -o 'option' Process the option as if it was read from a configuration
+ file.
+
+ Najczesciej uzywa sie w tej postaci:
+
+ ssh -l nazwa_uzytk nazwa_maszyny
diff --git a/release/picobsd/help/swapon.hlp b/release/picobsd/help/swapon.hlp
new file mode 100644
index 0000000..a5e1c68
--- /dev/null
+++ b/release/picobsd/help/swapon.hlp
@@ -0,0 +1,5 @@
+swaponspecify additional device for paging and swapping
+
+ Usage:
+
+ swapon [-a] [special_file ...]
diff --git a/release/picobsd/help/swapon.hlp.en b/release/picobsd/help/swapon.hlp.en
new file mode 100644
index 0000000..a5e1c68
--- /dev/null
+++ b/release/picobsd/help/swapon.hlp.en
@@ -0,0 +1,5 @@
+swaponspecify additional device for paging and swapping
+
+ Usage:
+
+ swapon [-a] [special_file ...]
diff --git a/release/picobsd/help/swapon.hlp.pl b/release/picobsd/help/swapon.hlp.pl
new file mode 100644
index 0000000..aacd482
--- /dev/null
+++ b/release/picobsd/help/swapon.hlp.pl
@@ -0,0 +1,5 @@
+swapondodaj urzadzenie wymiany (swap)
+
+ Sposob uzycia:
+
+ swapon [-a] [plik_specjalny ...]
diff --git a/release/picobsd/help/sysctl.hlp b/release/picobsd/help/sysctl.hlp
new file mode 100644
index 0000000..8a2c911
--- /dev/null
+++ b/release/picobsd/help/sysctl.hlp
@@ -0,0 +1,15 @@
+sysctl get or set kernel state
+
+ Usage:
+
+ sysctl [-bnX] variable ...
+ sysctl [-bnX] -w variable=value ...
+ sysctl [-bnX] -a
+ sysctl [-bnX] -A
+
+ To see the whole MIB table use:
+ sysctl -a
+
+ To set specific variable to new value use:
+
+ sysctl -w variable=value
diff --git a/release/picobsd/help/sysctl.hlp.en b/release/picobsd/help/sysctl.hlp.en
new file mode 100644
index 0000000..8a2c911
--- /dev/null
+++ b/release/picobsd/help/sysctl.hlp.en
@@ -0,0 +1,15 @@
+sysctl get or set kernel state
+
+ Usage:
+
+ sysctl [-bnX] variable ...
+ sysctl [-bnX] -w variable=value ...
+ sysctl [-bnX] -a
+ sysctl [-bnX] -A
+
+ To see the whole MIB table use:
+ sysctl -a
+
+ To set specific variable to new value use:
+
+ sysctl -w variable=value
diff --git a/release/picobsd/help/sysctl.hlp.pl b/release/picobsd/help/sysctl.hlp.pl
new file mode 100644
index 0000000..abce331
--- /dev/null
+++ b/release/picobsd/help/sysctl.hlp.pl
@@ -0,0 +1,15 @@
+sysctl ustaw lub wyswietl parametr jadra
+
+ Sposob uzycia:
+
+ sysctl [-bnX] zmienna ...
+ sysctl [-bnX] -w zmienna=wartosc ...
+ sysctl [-bnX] -a
+ sysctl [-bnX] -A
+
+ W celu wyswietlenia calego drzewa MIB:
+ sysctl -a
+
+ W celu przypisania wartosci zmiennek:
+
+ sysctl -w zmienna=wartosc
diff --git a/release/picobsd/help/telnet.hlp b/release/picobsd/help/telnet.hlp
new file mode 100644
index 0000000..ddceebd
--- /dev/null
+++ b/release/picobsd/help/telnet.hlp
@@ -0,0 +1,14 @@
+telnet user interface to the TELNET protocol
+
+ Usage:
+
+ telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]
+ [-n tracefile][-r] [host-name [port]]
+
+ Most commonly this will be just:
+
+ telnet <remote_host>
+
+ WARNING: Telnet protocol is unsafe, as it passes the
+ passwords in clear text over the network. Use 'ssh' instead, where it's
+ possible.
diff --git a/release/picobsd/help/telnet.hlp.en b/release/picobsd/help/telnet.hlp.en
new file mode 100644
index 0000000..ddceebd
--- /dev/null
+++ b/release/picobsd/help/telnet.hlp.en
@@ -0,0 +1,14 @@
+telnet user interface to the TELNET protocol
+
+ Usage:
+
+ telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]
+ [-n tracefile][-r] [host-name [port]]
+
+ Most commonly this will be just:
+
+ telnet <remote_host>
+
+ WARNING: Telnet protocol is unsafe, as it passes the
+ passwords in clear text over the network. Use 'ssh' instead, where it's
+ possible.
diff --git a/release/picobsd/help/telnet.hlp.pl b/release/picobsd/help/telnet.hlp.pl
new file mode 100644
index 0000000..be3f77b
--- /dev/null
+++ b/release/picobsd/help/telnet.hlp.pl
@@ -0,0 +1,14 @@
+telnet klient protokolu Telnet
+
+ Sposob uzycia:
+
+ telnet [-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]
+ [-n tracefile][-r] [host-name [port]]
+
+ Najczesciej jest to:
+
+ telnet nazwa_maszyny
+
+ UWAGA: Protokol telnet jest niezbyt bezpieczny, gdyz
+ przesyla niezaszyfrowane hasla przez siec. Jesli to mozliwe, uzywaj
+ zamiast niego SSH.
diff --git a/release/picobsd/help/test.hlp b/release/picobsd/help/test.hlp
new file mode 100644
index 0000000..351dc76
--- /dev/null
+++ b/release/picobsd/help/test.hlp
@@ -0,0 +1 @@
+test condition evaluation utility
diff --git a/release/picobsd/help/test.hlp.en b/release/picobsd/help/test.hlp.en
new file mode 100644
index 0000000..351dc76
--- /dev/null
+++ b/release/picobsd/help/test.hlp.en
@@ -0,0 +1 @@
+test condition evaluation utility
diff --git a/release/picobsd/help/test.hlp.pl b/release/picobsd/help/test.hlp.pl
new file mode 100644
index 0000000..de1cec8
--- /dev/null
+++ b/release/picobsd/help/test.hlp.pl
@@ -0,0 +1 @@
+test sprawdz istnienie warunku
diff --git a/release/picobsd/help/umount.hlp b/release/picobsd/help/umount.hlp
new file mode 100644
index 0000000..910a0b4
--- /dev/null
+++ b/release/picobsd/help/umount.hlp
@@ -0,0 +1,12 @@
+umount unmount filesystems
+
+ Usage:
+
+ umount [-fv] special | node
+ umount -a | -A [-fv] [-h host] [-t type]
+
+ Most commonly this will be:
+
+ umount <mount_point>
+
+ e.g. 'umount /mnt'
diff --git a/release/picobsd/help/umount.hlp.en b/release/picobsd/help/umount.hlp.en
new file mode 100644
index 0000000..910a0b4
--- /dev/null
+++ b/release/picobsd/help/umount.hlp.en
@@ -0,0 +1,12 @@
+umount unmount filesystems
+
+ Usage:
+
+ umount [-fv] special | node
+ umount -a | -A [-fv] [-h host] [-t type]
+
+ Most commonly this will be:
+
+ umount <mount_point>
+
+ e.g. 'umount /mnt'
diff --git a/release/picobsd/help/umount.hlp.pl b/release/picobsd/help/umount.hlp.pl
new file mode 100644
index 0000000..20ea0d1
--- /dev/null
+++ b/release/picobsd/help/umount.hlp.pl
@@ -0,0 +1,12 @@
+umount odmontuj system plikow
+
+ Sposob uzycia:
+
+ umount [-fv] urzadzenie | punkt
+ umount -a | -A [-fv] [-h host] [-t type]
+
+ Najczesciej:
+
+ umount /nazwa_katalogu
+
+ Np. 'umount /mnt'
diff --git a/release/picobsd/help/vidcontrol.hlp b/release/picobsd/help/vidcontrol.hlp
new file mode 100644
index 0000000..0aafefb
--- /dev/null
+++ b/release/picobsd/help/vidcontrol.hlp
@@ -0,0 +1,7 @@
+vidcontrol a utility for manipulating the syscons video driver
+
+ Usage:
+
+ vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]
+ [-L] [-m on|off] [-f size file] [-s number] [-t N|off]
+ [-x] [mode] [fgcol [bgcol]] [show]
diff --git a/release/picobsd/help/vidcontrol.hlp.en b/release/picobsd/help/vidcontrol.hlp.en
new file mode 100644
index 0000000..0aafefb
--- /dev/null
+++ b/release/picobsd/help/vidcontrol.hlp.en
@@ -0,0 +1,7 @@
+vidcontrol a utility for manipulating the syscons video driver
+
+ Usage:
+
+ vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]
+ [-L] [-m on|off] [-f size file] [-s number] [-t N|off]
+ [-x] [mode] [fgcol [bgcol]] [show]
diff --git a/release/picobsd/help/vidcontrol.hlp.pl b/release/picobsd/help/vidcontrol.hlp.pl
new file mode 100644
index 0000000..5e8df49
--- /dev/null
+++ b/release/picobsd/help/vidcontrol.hlp.pl
@@ -0,0 +1,7 @@
+vidcontrol ustwa parametry sterownika video
+
+ Sposob uzycia:
+
+ vidcontrol [-r fg bg] [-b kolor] [-c kursor] [-d] [-l mapa]
+ [-L] [-m on|off] [-f rozmiar plik] [-s numer] [-t N|off]
+ [-x] [mode] [fgcol [bgcol]] [show]
diff --git a/release/picobsd/help/vm.hlp b/release/picobsd/help/vm.hlp
new file mode 100644
index 0000000..c707ca5
--- /dev/null
+++ b/release/picobsd/help/vm.hlp
@@ -0,0 +1,12 @@
+vm Show memory usage.
+
+ This program repeatedly displays current memory usage, showing the
+ following numbers:
+
+ * procs: number of processes; r - running, d - waiting for I/O,
+ p - paging, s - sleeping,
+ * virt mem: virtual memory amounts (total and active), in kB
+ * real mem: real memory amounts (total and active), in kB
+ * shared vm: amount of shared virtual memory (total and active), in kB
+ * shared real: amount of shared real memory (total and active), in kB
+ * free: amount of free memory, in kB
diff --git a/release/picobsd/help/vm.hlp.en b/release/picobsd/help/vm.hlp.en
new file mode 100644
index 0000000..c707ca5
--- /dev/null
+++ b/release/picobsd/help/vm.hlp.en
@@ -0,0 +1,12 @@
+vm Show memory usage.
+
+ This program repeatedly displays current memory usage, showing the
+ following numbers:
+
+ * procs: number of processes; r - running, d - waiting for I/O,
+ p - paging, s - sleeping,
+ * virt mem: virtual memory amounts (total and active), in kB
+ * real mem: real memory amounts (total and active), in kB
+ * shared vm: amount of shared virtual memory (total and active), in kB
+ * shared real: amount of shared real memory (total and active), in kB
+ * free: amount of free memory, in kB
diff --git a/release/picobsd/help/vm.hlp.pl b/release/picobsd/help/vm.hlp.pl
new file mode 100644
index 0000000..b95d838
--- /dev/null
+++ b/release/picobsd/help/vm.hlp.pl
@@ -0,0 +1,14 @@
+vm Pokaz zajetosc pamieci
+
+ Program pokazuje aktualna zajetosc pamieci (do nacisniecia ^C),
+ wyswietlajac nastepujace wartosci:
+
+ * procs: liczba procesow: r - running (dzialajace),
+ d - czekajace na I/O,
+ p - paging,
+ s - sleeping,
+ * virt mem: ilosc pamieci witrualnej (total i active), w kB
+ * real mem: ilosc pamieci rzeczywistej (total i active) w kB
+ * shared vm: ilosc dzielonej pamieci wirtualnej, w kB
+ * shared real: ilosc dzielonej pamieci rzeczywistej, w kB
+ * free: ilosc wolnej pamieci, w kB.
diff --git a/release/picobsd/help/vnconfig.hlp b/release/picobsd/help/vnconfig.hlp
new file mode 100644
index 0000000..12bd0f5
--- /dev/null
+++ b/release/picobsd/help/vnconfig.hlp
@@ -0,0 +1,9 @@
+vnconfig configure and enable vnode disks
+
+ Usage:
+
+ vnconfig [-acdefguv] [-s option] [-r option] [special-device file]
+
+ E.g. to enable swapping on a file called /dos/SWAP.swp:
+
+ vnconfig -e /dev/vn0b /dos/SWAP.swp swap
diff --git a/release/picobsd/isp/conf/PICOBSD b/release/picobsd/isp/conf/PICOBSD
new file mode 100644
index 0000000..c8cd4b9
--- /dev/null
+++ b/release/picobsd/isp/conf/PICOBSD
@@ -0,0 +1,128 @@
+#
+# $Id: PICOBSD,v 1.2 1998/08/02 12:22:00 abial Exp $
+#
+
+machine "i386"
+cpu "I386_CPU"
+cpu "I486_CPU"
+cpu "I586_CPU"
+cpu "I686_CPU"
+ident PICOBSD
+maxusers 20
+
+options MATH_EMULATE #Support for x87 emulation
+options INET #InterNETworking
+options FFS #Berkeley Fast Filesystem
+options NFS #Network Filesystem
+options BOOTP
+options MFS
+options MSDOSFS #MSDOS Filesystem
+options "CD9660" #ISO 9660 Filesystem
+options PROCFS #Process filesystem
+options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
+options USERCONFIG #boot -c editor
+options USERCONFIG_BOOT #imply -c and parse info area
+options VISUAL_USERCONFIG #visual boot -c editor
+options IPFIREWALL
+options IPFIREWALL_DEFAULT_TO_ACCEPT
+options IPDIVERT
+options DEVFS
+options SLICE
+options PCI_QUIET
+
+config kernel root on fd0a
+
+controller isa0
+controller pci0
+
+controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+disk fd0 at fdc0 drive 0
+#disk fd1 at fdc0 drive 1
+
+options "CMD640" # work around CMD640 chip deficiency
+controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
+disk wd0 at wdc0 drive 0
+disk wd1 at wdc0 drive 1
+
+controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr
+disk wd2 at wdc1 drive 0
+disk wd3 at wdc1 drive 1
+
+options ATAPI #Enable ATAPI support for IDE bus
+options ATAPI_STATIC #Don't do it as an LKM
+device wcd0 #IDE CD-ROM
+
+# syscons is the default console driver, resembling an SCO console
+device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
+
+device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
+
+device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr
+device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
+device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
+device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr
+
+# Support for multiport serial cards
+
+options "COM_MULTIPORT"
+
+# AST
+
+device sio4 at isa? port 0x2a0 tty flags 0x701
+device sio5 at isa? port 0x2a8 tty flags 0x701
+device sio6 at isa? port 0x2b0 tty flags 0x701
+device sio7 at isa? port 0x2b8 tty flags 0x701 irq 12 vector siointr
+
+# Boca Board. You must configure the ports above with -c to change the flags.
+
+device sio8 at isa? port 0x120 tty flags 0xb05
+device sio9 at isa? port 0x128 tty flags 0xb05
+device sio10 at isa? port 0x130 tty flags 0xb05
+device sio11 at isa? port 0x138 tty flags 0xb05 irq 12 vector siointr
+
+# Hayes ESP boards
+
+options "COM_ESP"
+
+# Comtrol Rocketport
+# The PCI versions
+device rp0
+device rp1
+# The ISA versions
+device rp0 at isa? port 0x100 tty
+device rp1 at isa? port 0x180 tty
+
+# Cyclades Cyclom-Y serial driver
+device cy0 at isa? tty irq 10 iomem 0xd4000 iosiz 0x2000 vector cyintr
+device cy1 at isa? tty irq 11 iomem 0xd6000 iosiz 0x2000 vector cyintr
+
+device lpt0 at isa? port? tty irq 7 vector lptintr
+
+# Order is important here due to intrusive probes, do *not* alphabetize
+# this list of network interfaces until the probes have been fixed.
+# Right now it appears that the ie0 must be probed before ep0. See
+# revision 1.20 of this file.
+device de0
+device de1
+device fxp0
+
+device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr
+device ed1 at isa? port 0x300 net irq 5 iomem 0xd0000 vector edintr
+device ie0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector ieintr
+device ep0 at isa? port 0x300 net irq 10 vector epintr
+device ep1 at isa? port 0x280 net irq 5 vector epintr
+#device ex0 at isa? port? net irq? vector exintr
+#device fe0 at isa? port 0x300 net irq ? vector feintr
+#device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
+device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zeintr
+#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
+
+pseudo-device loop
+pseudo-device ether
+# iijppp uses tun instead of ppp device
+pseudo-device ppp 8
+pseudo-device tun 2
+#pseudo-device vn
+pseudo-device pty 16
+pseudo-device gzip # Exec gzipped a.out's
diff --git a/release/picobsd/isp/crunch1/Makefile b/release/picobsd/isp/crunch1/Makefile
new file mode 100644
index 0000000..67a1ca1
--- /dev/null
+++ b/release/picobsd/isp/crunch1/Makefile
@@ -0,0 +1,49 @@
+#
+# $Id: Makefile,v 1.2 1998/08/02 12:22:04 abial Exp $
+#
+SRC?=/usr/src
+
+all: crunch
+
+crunch:
+ @if [ ! -f .patched ]; then \
+ cat login.diff|(cd /usr/src/usr.bin/login; patch -p0); \
+ cat passwd.diff|(cd /usr/src/usr.bin/passwd; patch -p0); \
+ cat ppp.diff|(cd /usr/src/usr.sbin/ppp; patch -p0); \
+ touch .patched; \
+ fi
+ @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
+ @crunchgen ./crunch1.conf
+ @${MAKE} -f crunch1.mk all \
+ "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY -DNOSECURE -DNOCRYPT" 2>&1 >/dev/null
+
+clean:
+ @if [ -f .patched ]; then \
+ cat login.diff|(cd /usr/src/usr.bin/login; patch -R -p0); \
+ cat passwd.diff|(cd /usr/src/usr.bin/passwd; patch -R -p0); \
+ cat ppp.diff|(cd /usr/src/usr.sbin/ppp; patch -R -p0); \
+ rm .patched; \
+ fi
+ rm -f *.o *.stub *.lo *_stub.c *.mk \
+ crunch.cache \
+ crunch.mk \
+ crunch.c \
+ crunch1* \
+ crunch \
+ .tmp_* \
+ *.gz
+
+install:
+ cp crunch1 /mnt/stand/crunch
+ chmod 555 /mnt/stand/crunch
+ for i in `crunchgen -l crunch1.conf` ; \
+ do \
+ ln /mnt/stand/crunch /mnt/stand/$${i}; \
+ done
+ rm /mnt/stand/crunch
+ # Install the MIB files
+ mkdir -p /mnt/usr/local/share/snmp/mibs
+ cp mibs/*.txt /mnt/usr/local/share/snmp/mibs/
+
+
+.include <bsd.prog.mk>
diff --git a/release/picobsd/isp/crunch1/crunch.conf b/release/picobsd/isp/crunch1/crunch.conf
new file mode 100644
index 0000000..fadf39d
--- /dev/null
+++ b/release/picobsd/isp/crunch1/crunch.conf
@@ -0,0 +1,56 @@
+#
+# $Id: crunch.conf,v 1.4 1998/08/10 19:16:19 abial Exp $
+#
+# NOTE: the string "/usr/src" will be automatically replaced with the
+# correct value set in 'build' script - you should change it there
+
+# sources for kget & vm
+srcdirs ../../tinyware
+# sources for ucd-snmp - they must be already patched & configured!
+# The necessary steps are given below:
+# * you have to symlink subdirectory agent -> snmpd
+# * you have to properly construct an OBJS variable in snmpd/Makefile:
+# OBJS=${MIBOBJS} ${AGENTOBJS}
+# * we install a special version of MIB files - stripped of comments and
+# descriptions. These MIBs are included here to save you the stripping.
+srcdirs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1
+# other sources
+srcdirs /usr/src/bin
+srcdirs /usr/src/sbin/i386
+srcdirs /usr/src/sbin
+srcdirs /usr/src/usr.bin
+srcdirs /usr/src/gnu/usr.bin
+srcdirs /usr/src/usr.sbin
+srcdirs /usr/src/libexec
+
+progs ash test echo hostname ln login getty
+progs inetd telnetd stty w dmesg kget snmpd natd
+progs init fsck ifconfig df ps ns vm cat
+progs cp rm mkdir ls chmod chown
+progs sysctl route swapon pwd_mkdb dev_mkdb
+progs mount mount_msdos umount comcontrol
+progs kill mount_std natd
+
+progs pwd pppd telnet more
+progs passwd date
+progs mount_cd9660 mount_nfs ping traceroute routed ipfw
+
+ln mount_cd9660 cd9660
+ln mount_nfs nfs
+ln test [
+ln ash -sh
+ln ash sh
+#ln newfs mount_mfs
+ln chown chgrp
+# XXX Why? Some bug in crunchgen?
+#ln newfs mfs
+ln mount_msdos msdos
+ln mount_std procfs
+ln mount_std mount_procfs
+ln ns netstat
+
+# For snmpd
+libs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1/snmplib/libsnmp.a
+libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm
+libs -lmytinfo -lipx -lz -lpcap -lalias
+libs -ltermcap -lgnuregex -ltelnet -lcurses
diff --git a/release/picobsd/isp/crunch1/login.diff b/release/picobsd/isp/crunch1/login.diff
new file mode 100644
index 0000000..98af18b
--- /dev/null
+++ b/release/picobsd/isp/crunch1/login.diff
@@ -0,0 +1,33 @@
+*** Makefile.orig Sat Aug 1 20:35:53 1998
+--- Makefile Sat Aug 1 20:36:50 1998
+***************
+*** 9,22 ****
+ #Uncomment to activate login_auth
+ #Warning: requires src/libexec/login_* auth modules
+ #LC_AUTH=-DLOGIN_CAP_AUTH
+! CFLAGS+=-Wall -DSKEY -DLOGIN_ACCESS -DLOGALL -DLOGIN_CAP $(LC_AUTH)
+
+ .if defined(KLOGIN_PARANOID)
+ CFLAGS+=-DKLOGIN_PARANOID
+ .endif
+
+! DPADD= ${LIBUTIL} ${LIBSKEY} ${LIBMD} ${LIBCRYPT}
+! LDADD= -lutil -lskey -lmd -lcrypt
+
+ .if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(LC_AUTH)
+ CFLAGS+=-DKERBEROS
+--- 9,22 ----
+ #Uncomment to activate login_auth
+ #Warning: requires src/libexec/login_* auth modules
+ #LC_AUTH=-DLOGIN_CAP_AUTH
+! CFLAGS+=-Wall $(LC_AUTH)
+
+ .if defined(KLOGIN_PARANOID)
+ CFLAGS+=-DKLOGIN_PARANOID
+ .endif
+
+! DPADD= ${LIBUTIL} ${LIBMD} ${LIBCRYPT}
+! LDADD= -lutil -lmd -lcrypt
+
+ .if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(LC_AUTH)
+ CFLAGS+=-DKERBEROS
diff --git a/release/picobsd/isp/crunch1/mibs/EtherLike-MIB.txt b/release/picobsd/isp/crunch1/mibs/EtherLike-MIB.txt
new file mode 100644
index 0000000..82b19ac
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/EtherLike-MIB.txt
@@ -0,0 +1,318 @@
+EtherLike-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ ifEntry, ifIndex
+ FROM IF-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress, TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ transmission, mib-2, Integer32, Gauge32, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+etherMIB MODULE-IDENTITY
+ LAST-UPDATED "9402030400Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street
+ North Andover, MA 01845
+ US
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 35 }
+
+etherMIBObjects ::= { etherMIB 1 }
+
+dot3 ::= { transmission 7 }
+
+dot3StatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 2 }
+
+dot3StatsEntry OBJECT-TYPE
+ SYNTAX Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { dot3StatsIndex }
+ ::= { dot3StatsTable 1 }
+
+Dot3StatsEntry ::=
+ SEQUENCE {
+ dot3StatsIndex
+ INTEGER,
+
+ dot3StatsAlignmentErrors
+ Counter32,
+
+ dot3StatsFCSErrors
+ Counter32,
+
+ dot3StatsSingleCollisionFrames
+ Counter32,
+
+ dot3StatsMultipleCollisionFrames
+ Counter32,
+
+ dot3StatsSQETestErrors
+ Counter32,
+
+ dot3StatsDeferredTransmissions
+ Counter32,
+
+ dot3StatsLateCollisions
+ Counter32,
+
+ dot3StatsExcessiveCollisions
+ Counter32,
+
+ dot3StatsInternalMacTransmitErrors
+ Counter32,
+
+ dot3StatsCarrierSenseErrors
+ Counter32,
+
+ dot3StatsFrameTooLongs
+ Counter32,
+
+ dot3StatsInternalMacReceiveErrors
+ Counter32,
+
+ dot3StatsEtherChipSet
+ OBJECT IDENTIFIER
+ }
+
+dot3StatsIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 1 }
+
+dot3StatsAlignmentErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 2 }
+
+dot3StatsFCSErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 3 }
+
+dot3StatsSingleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 4 }
+
+dot3StatsMultipleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 5 }
+
+dot3StatsSQETestErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "ANSI/IEEE Std 802.3-1985 Carrier Sense
+ Multiple Access with Collision Detection Access
+ Method and Physical Layer Specifications"
+ ::= { dot3StatsEntry 6 }
+
+dot3StatsDeferredTransmissions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 7 }
+
+dot3StatsLateCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 8 }
+
+dot3StatsExcessiveCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 9 }
+
+dot3StatsInternalMacTransmitErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 10 }
+
+dot3StatsCarrierSenseErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 11 }
+
+dot3StatsFrameTooLongs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 13 }
+
+dot3StatsInternalMacReceiveErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 16 }
+
+dot3StatsEtherChipSet OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 17 }
+
+dot3CollTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 5 }
+
+dot3CollEntry OBJECT-TYPE
+ SYNTAX Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, dot3CollCount }
+ ::= { dot3CollTable 1 }
+
+Dot3CollEntry ::=
+ SEQUENCE {
+ dot3CollCount
+ INTEGER,
+
+ dot3CollFrequencies
+ Counter32
+ }
+
+dot3CollCount OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3CollEntry 2 }
+
+dot3CollFrequencies OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3CollEntry 3 }
+
+dot3Tests ::= { dot3 6 }
+
+dot3Errors ::= { dot3 7 }
+
+dot3TestTdr ::= { dot3Tests 1 }
+
+dot3TestLoopBack ::= { dot3Tests 2 }
+
+dot3ErrorInitError ::= { dot3Errors 1 }
+
+dot3ErrorLoopbackError ::= { dot3Errors 2 }
+
+dot3ChipSets ::= { dot3 8 }
+
+dot3ChipSetAMD ::= { dot3ChipSets 1 }
+
+dot3ChipSetAMD7990 ::= { dot3ChipSetAMD 1 }
+
+dot3ChipSetAMD79900 ::= { dot3ChipSetAMD 2 }
+
+dot3ChipSetAMD79C940 ::= { dot3ChipSetAMD 3 }
+
+dot3ChipSetIntel ::= { dot3ChipSets 2 }
+
+dot3ChipSetIntel82586 ::= { dot3ChipSetIntel 1 }
+
+dot3ChipSetIntel82596 ::= { dot3ChipSetIntel 2 }
+
+dot3ChipSetSeeq ::= { dot3ChipSets 3 }
+
+dot3ChipSetSeeq8003 ::= { dot3ChipSetSeeq 1 }
+
+dot3ChipSetNational ::= { dot3ChipSets 4 }
+
+dot3ChipSetNational8390 ::= { dot3ChipSetNational 1 }
+
+dot3ChipSetNationalSonic ::= { dot3ChipSetNational 2 }
+
+dot3ChipSetFujitsu ::= { dot3ChipSets 5 }
+
+dot3ChipSetFujitsu86950 ::= { dot3ChipSetFujitsu 1 }
+
+dot3ChipSetDigital ::= { dot3ChipSets 6 }
+
+dot3ChipSetDigitalDC21040 ::= { dot3ChipSetDigital 1 }
+
+etherConformance ::= { etherMIB 2 }
+
+etherGroups ::= { etherConformance 1 }
+
+etherCompliances ::= { etherConformance 2 }
+
+etherCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { etherStatsGroup }
+ GROUP etherCollisionTableGroup
+ ::= { etherCompliances 1 }
+
+etherStatsGroup OBJECT-GROUP
+ OBJECTS {
+ dot3StatsIndex,
+ dot3StatsAlignmentErrors,
+ dot3StatsFCSErrors,
+ dot3StatsSingleCollisionFrames,
+ dot3StatsMultipleCollisionFrames,
+ dot3StatsSQETestErrors,
+ dot3StatsDeferredTransmissions,
+ dot3StatsLateCollisions,
+ dot3StatsExcessiveCollisions,
+ dot3StatsInternalMacTransmitErrors,
+ dot3StatsCarrierSenseErrors,
+ dot3StatsFrameTooLongs,
+ dot3StatsInternalMacReceiveErrors,
+ dot3StatsEtherChipSet
+ }
+ STATUS current
+ ::= { etherGroups 1 }
+
+etherCollisionTableGroup OBJECT-GROUP
+ OBJECTS { dot3CollCount, dot3CollFrequencies }
+ STATUS current
+ ::= { etherGroups 2 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/HOST-RESOURCES-MIB.txt b/release/picobsd/isp/crunch1/mibs/HOST-RESOURCES-MIB.txt
new file mode 100644
index 0000000..078dc02
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/HOST-RESOURCES-MIB.txt
@@ -0,0 +1,877 @@
+HOST-RESOURCES-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ Gauge, Counter, TimeTicks
+ FROM RFC1155-SMI
+ mib-2, DisplayString
+ FROM RFC1213-MIB
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+host ::= { mib-2 25 }
+
+hrSystem ::= { host 1 }
+
+hrStorage ::= { host 2 }
+
+hrDevice ::= { host 3 }
+
+hrSWRun ::= { host 4 }
+
+hrSWRunPerf ::= { host 5 }
+
+hrSWInstalled ::= { host 6 }
+
+Boolean ::=
+ INTEGER {
+ true(1),
+ false(2)
+ }
+
+KBytes ::=
+ INTEGER
+
+ProductID ::=
+ OBJECT IDENTIFIER
+
+DateAndTime ::=
+ OCTET STRING
+
+InternationalDisplayString ::=
+ OCTET STRING
+
+hrSystemUptime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 1 }
+
+hrSystemDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 2 }
+
+hrSystemInitialLoadDevice OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 3 }
+
+hrSystemInitialLoadParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 4 }
+
+hrSystemNumUsers OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 5 }
+
+hrSystemProcesses OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 6 }
+
+hrSystemMaxProcesses OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 7 }
+
+hrStorageTypes ::= { hrStorage 1 }
+
+hrStorageOther ::= { hrStorageTypes 1 }
+
+hrStorageRam ::= { hrStorageTypes 2 }
+
+hrStorageVirtualMemory ::= { hrStorageTypes 3 }
+
+hrStorageFixedDisk ::= { hrStorageTypes 4 }
+
+hrStorageRemovableDisk ::= { hrStorageTypes 5 }
+
+hrStorageFloppyDisk ::= { hrStorageTypes 6 }
+
+hrStorageCompactDisc ::= { hrStorageTypes 7 }
+
+hrStorageRamDisk ::= { hrStorageTypes 8 }
+
+hrMemorySize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorage 2 }
+
+hrStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrStorage 3 }
+
+hrStorageEntry OBJECT-TYPE
+ SYNTAX HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrStorageIndex }
+ ::= { hrStorageTable 1 }
+
+HrStorageEntry ::=
+ SEQUENCE {
+ hrStorageIndex
+ INTEGER,
+
+ hrStorageType
+ OBJECT IDENTIFIER,
+
+ hrStorageDescr
+ DisplayString,
+
+ hrStorageAllocationUnits
+ INTEGER,
+
+ hrStorageSize
+ INTEGER,
+
+ hrStorageUsed
+ INTEGER,
+
+ hrStorageAllocationFailures
+ Counter
+ }
+
+hrStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 1 }
+
+hrStorageType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 2 }
+
+hrStorageDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 3 }
+
+hrStorageAllocationUnits OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 4 }
+
+hrStorageSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrStorageEntry 5 }
+
+hrStorageUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 6 }
+
+hrStorageAllocationFailures OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 7 }
+
+hrDeviceTypes ::= { hrDevice 1 }
+
+hrDeviceOther ::= { hrDeviceTypes 1 }
+
+hrDeviceUnknown ::= { hrDeviceTypes 2 }
+
+hrDeviceProcessor ::= { hrDeviceTypes 3 }
+
+hrDeviceNetwork ::= { hrDeviceTypes 4 }
+
+hrDevicePrinter ::= { hrDeviceTypes 5 }
+
+hrDeviceDiskStorage ::= { hrDeviceTypes 6 }
+
+hrDeviceVideo ::= { hrDeviceTypes 10 }
+
+hrDeviceAudio ::= { hrDeviceTypes 11 }
+
+hrDeviceCoprocessor ::= { hrDeviceTypes 12 }
+
+hrDeviceKeyboard ::= { hrDeviceTypes 13 }
+
+hrDeviceModem ::= { hrDeviceTypes 14 }
+
+hrDeviceParallelPort ::= { hrDeviceTypes 15 }
+
+hrDevicePointing ::= { hrDeviceTypes 16 }
+
+hrDeviceSerialPort ::= { hrDeviceTypes 17 }
+
+hrDeviceTape ::= { hrDeviceTypes 18 }
+
+hrDeviceClock ::= { hrDeviceTypes 19 }
+
+hrDeviceVolatileMemory ::= { hrDeviceTypes 20 }
+
+hrDeviceNonVolatileMemory ::= { hrDeviceTypes 21 }
+
+hrDeviceTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 2 }
+
+hrDeviceEntry OBJECT-TYPE
+ SYNTAX HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDeviceTable 1 }
+
+HrDeviceEntry ::=
+ SEQUENCE {
+ hrDeviceIndex
+ INTEGER,
+
+ hrDeviceType
+ OBJECT IDENTIFIER,
+
+ hrDeviceDescr
+ DisplayString,
+
+ hrDeviceID
+ ProductID,
+
+ hrDeviceStatus
+ INTEGER,
+
+ hrDeviceErrors
+ Counter
+ }
+
+hrDeviceIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 1 }
+
+hrDeviceType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 2 }
+
+hrDeviceDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 3 }
+
+hrDeviceID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 4 }
+
+hrDeviceStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ running(2),
+ warning(3),
+ testing(4),
+ down(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 5 }
+
+hrDeviceErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 6 }
+
+hrProcessorTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 3 }
+
+hrProcessorEntry OBJECT-TYPE
+ SYNTAX HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrProcessorTable 1 }
+
+HrProcessorEntry ::=
+ SEQUENCE {
+ hrProcessorFrwID
+ ProductID,
+
+ hrProcessorLoad
+ INTEGER
+ }
+
+hrProcessorFrwID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 1 }
+
+hrProcessorLoad OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 2 }
+
+hrNetworkTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 4 }
+
+hrNetworkEntry OBJECT-TYPE
+ SYNTAX HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrNetworkTable 1 }
+
+HrNetworkEntry ::=
+ SEQUENCE {
+ hrNetworkIfIndex
+ INTEGER
+ }
+
+hrNetworkIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrNetworkEntry 1 }
+
+hrPrinterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 5 }
+
+hrPrinterEntry OBJECT-TYPE
+ SYNTAX HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrPrinterTable 1 }
+
+HrPrinterEntry ::=
+ SEQUENCE {
+ hrPrinterStatus
+ INTEGER,
+
+ hrPrinterDetectedErrorState
+ OCTET STRING
+ }
+
+hrPrinterStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ idle(3),
+ printing(4),
+ warmup(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 1 }
+
+hrPrinterDetectedErrorState OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 2 }
+
+hrDiskStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 6 }
+
+hrDiskStorageEntry OBJECT-TYPE
+ SYNTAX HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDiskStorageTable 1 }
+
+HrDiskStorageEntry ::=
+ SEQUENCE {
+ hrDiskStorageAccess
+ INTEGER,
+
+ hrDiskStorageMedia
+ INTEGER,
+
+ hrDiskStorageRemoveble
+ Boolean,
+
+ hrDiskStorageCapacity
+ KBytes
+ }
+
+hrDiskStorageAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 1 }
+
+hrDiskStorageMedia OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ hardDisk(3),
+ floppyDisk(4),
+ opticalDiskROM(5),
+ opticalDiskWORM(6),
+ opticalDiskRW(7),
+ ramDisk(8)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 2 }
+
+hrDiskStorageRemoveble OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 3 }
+
+hrDiskStorageCapacity OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 4 }
+
+hrPartitionTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 7 }
+
+hrPartitionEntry OBJECT-TYPE
+ SYNTAX HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex, hrPartitionIndex }
+ ::= { hrPartitionTable 1 }
+
+HrPartitionEntry ::=
+ SEQUENCE {
+ hrPartitionIndex
+ INTEGER,
+
+ hrPartitionLabel
+ InternationalDisplayString,
+
+ hrPartitionID
+ OCTET STRING,
+
+ hrPartitionSize
+ KBytes,
+
+ hrPartitionFSIndex
+ INTEGER
+ }
+
+hrPartitionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 1 }
+
+hrPartitionLabel OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 2 }
+
+hrPartitionID OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 3 }
+
+hrPartitionSize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 4 }
+
+hrPartitionFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 5 }
+
+hrFSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 8 }
+
+hrFSEntry OBJECT-TYPE
+ SYNTAX HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrFSIndex }
+ ::= { hrFSTable 1 }
+
+hrFSTypes ::= { hrDevice 9 }
+
+hrFSOther ::= { hrFSTypes 1 }
+
+hrFSUnknown ::= { hrFSTypes 2 }
+
+hrFSBerkeleyFFS ::= { hrFSTypes 3 }
+
+hrFSSys5FS ::= { hrFSTypes 4 }
+
+hrFSFat ::= { hrFSTypes 5 }
+
+hrFSHPFS ::= { hrFSTypes 6 }
+
+hrFSHFS ::= { hrFSTypes 7 }
+
+hrFSMFS ::= { hrFSTypes 8 }
+
+hrFSNTFS ::= { hrFSTypes 9 }
+
+hrFSVNode ::= { hrFSTypes 10 }
+
+hrFSJournaled ::= { hrFSTypes 11 }
+
+hrFSiso9660 ::= { hrFSTypes 12 }
+
+hrFSRockRidge ::= { hrFSTypes 13 }
+
+hrFSNFS ::= { hrFSTypes 14 }
+
+hrFSNetware ::= { hrFSTypes 15 }
+
+hrFSAFS ::= { hrFSTypes 16 }
+
+hrFSDFS ::= { hrFSTypes 17 }
+
+hrFSAppleshare ::= { hrFSTypes 18 }
+
+hrFSRFS ::= { hrFSTypes 19 }
+
+hrFSDGCFS ::= { hrFSTypes 20 }
+
+hrFSBFS ::= { hrFSTypes 21 }
+
+HrFSEntry ::=
+ SEQUENCE {
+ hrFSIndex
+ INTEGER,
+
+ hrFSMountPoint
+ InternationalDisplayString,
+
+ hrFSRemoteMountPoint
+ InternationalDisplayString,
+
+ hrFSType
+ OBJECT IDENTIFIER,
+
+ hrFSAccess
+ INTEGER,
+
+ hrFSBootable
+ Boolean,
+
+ hrFSStorageIndex
+ INTEGER,
+
+ hrFSLastFullBackupDate
+ DateAndTime,
+
+ hrFSLastPartialBackupDate
+ DateAndTime
+ }
+
+hrFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 1 }
+
+hrFSMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 2 }
+
+hrFSRemoteMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 3 }
+
+hrFSType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 4 }
+
+hrFSAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 5 }
+
+hrFSBootable OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 6 }
+
+hrFSStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 7 }
+
+hrFSLastFullBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 8 }
+
+hrFSLastPartialBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 9 }
+
+hrSWOSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRun 1 }
+
+hrSWRunTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRun 2 }
+
+hrSWRunEntry OBJECT-TYPE
+ SYNTAX HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunTable 1 }
+
+HrSWRunEntry ::=
+ SEQUENCE {
+ hrSWRunIndex
+ INTEGER,
+
+ hrSWRunName
+ InternationalDisplayString,
+
+ hrSWRunID
+ ProductID,
+
+ hrSWRunPath
+ InternationalDisplayString,
+
+ hrSWRunParameters
+ InternationalDisplayString,
+
+ hrSWRunType
+ INTEGER,
+
+ hrSWRunStatus
+ INTEGER
+ }
+
+hrSWRunIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 1 }
+
+hrSWRunName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 2 }
+
+hrSWRunID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 3 }
+
+hrSWRunPath OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 4 }
+
+hrSWRunParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 5 }
+
+hrSWRunType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 6 }
+
+hrSWRunStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ running(1),
+ runnable(2),
+ notRunnable(3),
+ invalid(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSWRunEntry 7 }
+
+hrSWRunPerfTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRunPerf 1 }
+
+hrSWRunPerfEntry OBJECT-TYPE
+ SYNTAX HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunPerfTable 1 }
+
+HrSWRunPerfEntry ::=
+ SEQUENCE {
+ hrSWRunPerfCPU
+ INTEGER,
+
+ hrSWRunPerfMem
+ KBytes
+ }
+
+hrSWRunPerfCPU OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 1 }
+
+hrSWRunPerfMem OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 2 }
+
+hrSWInstalledLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 1 }
+
+hrSWInstalledLastUpdateTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 2 }
+
+hrSWInstalledTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWInstalled 3 }
+
+hrSWInstalledEntry OBJECT-TYPE
+ SYNTAX HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWInstalledIndex }
+ ::= { hrSWInstalledTable 1 }
+
+HrSWInstalledEntry ::=
+ SEQUENCE {
+ hrSWInstalledIndex
+ INTEGER,
+
+ hrSWInstalledName
+ InternationalDisplayString,
+
+ hrSWInstalledID
+ ProductID,
+
+ hrSWInstalledType
+ INTEGER,
+
+ hrSWInstalledDate
+ DateAndTime
+ }
+
+hrSWInstalledIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 1 }
+
+hrSWInstalledName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 2 }
+
+hrSWInstalledID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 3 }
+
+hrSWInstalledType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 4 }
+
+hrSWInstalledDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 5 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/IANAifType-MIB.txt b/release/picobsd/isp/crunch1/mibs/IANAifType-MIB.txt
new file mode 100644
index 0000000..2f3a4ec
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/IANAifType-MIB.txt
@@ -0,0 +1,81 @@
+IANAifType-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ mib-2, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ianaifType MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IANA"
+ CONTACT-INFO
+ "Internet Assigned Numbers Authority
+
+ Postal: USC/Information Sciences Institute
+ 4676 Admiralty Way, Marina del Rey, CA 90292
+
+ Tel: +1 310 822 1511
+ E-Mail: iana@isi.edu"
+ ::= { mib-2 30 }
+
+IANAifType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ regular1822(2),
+ hdh1822(3),
+ ddnX25(4),
+ rfc877x25(5),
+ ethernetCsmacd(6),
+ iso88023Csmacd(7),
+ iso88024TokenBus(8),
+ iso88025TokenRing(9),
+ iso88026Man(10),
+ starLan(11),
+ proteon10Mbit(12),
+ proteon80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ ds1(18),
+ e1(19),
+ basicISDN(20),
+ primaryISDN(21),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ eon(25),
+ ethernet3Mbit(26),
+ nsip(27),
+ slip(28),
+ ultra(29),
+ ds3(30),
+ sip(31),
+ frameRelay(32),
+ rs232(33),
+ para(34),
+ arcnet(35),
+ arcnetPlus(36),
+ atm(37),
+ miox25(38),
+ sonet(39),
+ x25ple(40),
+ iso88022llc(41),
+ localTalk(42),
+ smdsDxi(43),
+ frameRelayService(44),
+ v35(45),
+ hssi(46),
+ hippi(47),
+ modem(48),
+ aal5(49),
+ sonetPath(50),
+ sonetVT(51),
+ smdsIcip(52),
+ propVirtual(53),
+ propMultiplexor(54)
+ }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/IF-MIB.txt b/release/picobsd/isp/crunch1/mibs/IF-MIB.txt
new file mode 100644
index 0000000..af9aab5
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/IF-MIB.txt
@@ -0,0 +1,822 @@
+IF-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ IANAifType
+ FROM IANAifType-MIB
+ snmpTraps
+ FROM SNMPv2-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TestAndIncr, AutonomousType, RowStatus, TruthValue, PhysAddress, DisplayString,
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ NOTIFICATION-TYPE, mib-2, Counter64, TimeTicks, Integer32, Gauge32, Counter32,
+ OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+interfaces ::= { mib-2 2 }
+
+ifMIB MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road, Mountain View, CA 94043
+
+ Tel: +1 415 966 7934
+ E-Mail: kzm@hls.com
+
+ Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street, North Andover, MA 01845
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 31 }
+
+ifMIBObjects ::= { ifMIB 1 }
+
+OwnerString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+InterfaceIndex ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "d"
+ STATUS current
+ SYNTAX Integer32
+
+ifNumber OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { interfaces 1 }
+
+ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { interfaces 2 }
+
+ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ InterfaceIndex,
+
+ ifDescr
+ DisplayString,
+
+ ifType
+ IANAifType,
+
+ ifMtu
+ Integer32,
+
+ ifSpeed
+ Gauge32,
+
+ ifPhysAddress
+ PhysAddress,
+
+ ifAdminStatus
+ INTEGER,
+
+ ifOperStatus
+ INTEGER,
+
+ ifLastChange
+ TimeTicks,
+
+ ifInOctets
+ Counter32,
+
+ ifInUcastPkts
+ Counter32,
+
+ ifInNUcastPkts
+ Counter32,
+
+ ifInDiscards
+ Counter32,
+
+ ifInErrors
+ Counter32,
+
+ ifInUnknownProtos
+ Counter32,
+
+ ifOutOctets
+ Counter32,
+
+ ifOutUcastPkts
+ Counter32,
+
+ ifOutNUcastPkts
+ Counter32,
+
+ ifOutDiscards
+ Counter32,
+
+ ifOutErrors
+ Counter32,
+
+ ifOutQLen
+ Gauge32,
+
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ifIndex OBJECT-TYPE
+ SYNTAX InterfaceIndex
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 1 }
+
+ifDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 2 }
+
+ifType OBJECT-TYPE
+ SYNTAX IANAifType
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 3 }
+
+ifMtu OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 4 }
+
+ifSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 5 }
+
+ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 6 }
+
+ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifEntry 7 }
+
+ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3),
+ unknown(4),
+ dormant(5)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 8 }
+
+ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 9 }
+
+ifInOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 10 }
+
+ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 11 }
+
+ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 12 }
+
+ifInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 13 }
+
+ifInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 14 }
+
+ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 15 }
+
+ifOutOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 16 }
+
+ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 17 }
+
+ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 18 }
+
+ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 19 }
+
+ifOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 20 }
+
+ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 21 }
+
+ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 22 }
+
+ifXTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 1 }
+
+ifXEntry OBJECT-TYPE
+ SYNTAX IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifXTable 1 }
+
+IfXEntry ::=
+ SEQUENCE {
+ ifName
+ DisplayString,
+
+ ifInMulticastPkts
+ Counter32,
+
+ ifInBroadcastPkts
+ Counter32,
+
+ ifOutMulticastPkts
+ Counter32,
+
+ ifOutBroadcastPkts
+ Counter32,
+
+ ifHCInOctets
+ Counter64,
+
+ ifHCInUcastPkts
+ Counter64,
+
+ ifHCInMulticastPkts
+ Counter64,
+
+ ifHCInBroadcastPkts
+ Counter64,
+
+ ifHCOutOctets
+ Counter64,
+
+ ifHCOutUcastPkts
+ Counter64,
+
+ ifHCOutMulticastPkts
+ Counter64,
+
+ ifHCOutBroadcastPkts
+ Counter64,
+
+ ifLinkUpDownTrapEnable
+ INTEGER,
+
+ ifHighSpeed
+ Gauge32,
+
+ ifPromiscuousMode
+ TruthValue,
+
+ ifConnectorPresent
+ TruthValue
+ }
+
+ifName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 1 }
+
+ifInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 2 }
+
+ifInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 3 }
+
+ifOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 4 }
+
+ifOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 5 }
+
+ifHCInOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 6 }
+
+ifHCInUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 7 }
+
+ifHCInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 8 }
+
+ifHCInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 9 }
+
+ifHCOutOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 10 }
+
+ifHCOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 11 }
+
+ifHCOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 12 }
+
+ifHCOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 13 }
+
+ifLinkUpDownTrapEnable OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 14 }
+
+ifHighSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 15 }
+
+ifPromiscuousMode OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 16 }
+
+ifConnectorPresent OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 17 }
+
+ifStackTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 2 }
+
+ifStackEntry OBJECT-TYPE
+ SYNTAX IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifStackHigherLayer, ifStackLowerLayer }
+ ::= { ifStackTable 1 }
+
+IfStackEntry ::=
+ SEQUENCE {
+ ifStackHigherLayer
+ Integer32,
+
+ ifStackLowerLayer
+ Integer32,
+
+ ifStackStatus
+ RowStatus
+ }
+
+ifStackHigherLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 1 }
+
+ifStackLowerLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 2 }
+
+ifStackStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifStackEntry 3 }
+
+ifTestTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 3 }
+
+ifTestEntry OBJECT-TYPE
+ SYNTAX IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifTestTable 1 }
+
+IfTestEntry ::=
+ SEQUENCE {
+ ifTestId
+ TestAndIncr,
+
+ ifTestStatus
+ INTEGER,
+
+ ifTestType
+ AutonomousType,
+
+ ifTestResult
+ INTEGER,
+
+ ifTestCode
+ OBJECT IDENTIFIER,
+
+ ifTestOwner
+ OwnerString
+ }
+
+ifTestId OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 1 }
+
+ifTestStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ notInUse(1),
+ inUse(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 2 }
+
+ifTestType OBJECT-TYPE
+ SYNTAX AutonomousType
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 3 }
+
+ifTestResult OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ success(2),
+ inProgress(3),
+ notSupported(4),
+ unAbleToRun(5),
+ aborted(6),
+ failed(7)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 4 }
+
+ifTestCode OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 5 }
+
+ifTestOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 6 }
+
+ifRcvAddressTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 4 }
+
+ifRcvAddressEntry OBJECT-TYPE
+ SYNTAX IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, ifRcvAddressAddress }
+ ::= { ifRcvAddressTable 1 }
+
+IfRcvAddressEntry ::=
+ SEQUENCE {
+ ifRcvAddressAddress
+ PhysAddress,
+
+ ifRcvAddressStatus
+ RowStatus,
+
+ ifRcvAddressType
+ INTEGER
+ }
+
+ifRcvAddressAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ifRcvAddressEntry 1 }
+
+ifRcvAddressStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifRcvAddressEntry 2 }
+
+ifRcvAddressType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { volatile }
+ ::= { ifRcvAddressEntry 3 }
+
+linkDown NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 3 }
+
+linkUp NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 4 }
+
+ifConformance ::= { ifMIB 2 }
+
+ifGroups ::= { ifConformance 1 }
+
+ifCompliances ::= { ifConformance 2 }
+
+ifCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ifGeneralGroup, ifStackGroup }
+ GROUP ifFixedLengthGroup
+
+ GROUP ifHCFixedLengthGroup
+
+ GROUP ifPacketGroup
+
+ GROUP ifHCPacketGroup
+
+ GROUP ifTestGroup
+
+ GROUP ifRcvAddressGroup
+
+ OBJECT ifLinkUpDownTrapEnable
+ MIN-ACCESS read-only
+
+ OBJECT ifPromiscuousMode
+ MIN-ACCESS read-only
+
+ OBJECT ifStackStatus
+ SYNTAX INTEGER {
+ active(1)
+ }
+ MIN-ACCESS read-only
+
+ OBJECT ifAdminStatus
+ SYNTAX INTEGER {
+ up(1),
+ down(2)
+ }
+ MIN-ACCESS read-only
+ ::= { ifCompliances 1 }
+
+ifGeneralGroup OBJECT-GROUP
+ OBJECTS {
+ ifDescr,
+ ifType,
+ ifSpeed,
+ ifPhysAddress,
+ ifAdminStatus,
+ ifOperStatus,
+ ifLastChange,
+ ifLinkUpDownTrapEnable,
+ ifConnectorPresent,
+ ifHighSpeed,
+ ifName
+ }
+ STATUS current
+ ::= { ifGroups 1 }
+
+ifFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 2 }
+
+ifHCFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 3 }
+
+ifPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 4 }
+
+ifHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 5 }
+
+ifVHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInUcastPkts,
+ ifHCInMulticastPkts,
+ ifHCInBroadcastPkts,
+ ifHCOutUcastPkts,
+ ifHCOutMulticastPkts,
+ ifHCOutBroadcastPkts,
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 6 }
+
+ifRcvAddressGroup OBJECT-GROUP
+ OBJECTS { ifRcvAddressStatus, ifRcvAddressType }
+ STATUS current
+ ::= { ifGroups 7 }
+
+ifTestGroup OBJECT-GROUP
+ OBJECTS {
+ ifTestId,
+ ifTestStatus,
+ ifTestType,
+ ifTestResult,
+ ifTestCode,
+ ifTestOwner
+ }
+ STATUS current
+ ::= { ifGroups 8 }
+
+ifStackGroup OBJECT-GROUP
+ OBJECTS { ifStackStatus }
+ STATUS current
+ ::= { ifGroups 9 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/IP-MIB.txt b/release/picobsd/isp/crunch1/mibs/IP-MIB.txt
new file mode 100644
index 0000000..59118e7
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/IP-MIB.txt
@@ -0,0 +1,507 @@
+IP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress
+ FROM SNMPv2-TC
+ mib-2, IpAddress, Counter32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ipMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 48 }
+
+ip ::= { mib-2 4 }
+
+ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ forwarding(1),
+ notForwarding(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 1 }
+
+ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 2 }
+
+ipInReceives OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 3 }
+
+ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 4 }
+
+ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 5 }
+
+ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 6 }
+
+ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 7 }
+
+ipInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 8 }
+
+ipInDelivers OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 9 }
+
+ipOutRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 10 }
+
+ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 11 }
+
+ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 12 }
+
+ipReasmTimeout OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 13 }
+
+ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 14 }
+
+ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 15 }
+
+ipReasmFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 16 }
+
+ipFragOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 17 }
+
+ipFragFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 18 }
+
+ipFragCreates OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 19 }
+
+ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 20 }
+
+ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+
+ ipAdEntIfIndex
+ INTEGER,
+
+ ipAdEntNetMask
+ IpAddress,
+
+ ipAdEntBcastAddr
+ INTEGER,
+
+ ipAdEntReasmMaxSize
+ INTEGER
+ }
+
+ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 1 }
+
+ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 2 }
+
+ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 3 }
+
+ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 4 }
+
+ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 5 }
+
+ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 22 }
+
+ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipNetToMediaIfIndex, ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+
+ ipNetToMediaPhysAddress
+ PhysAddress,
+
+ ipNetToMediaNetAddress
+ IpAddress,
+
+ ipNetToMediaType
+ INTEGER
+ }
+
+ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 1 }
+
+ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 2 }
+
+ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 3 }
+
+ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ invalid(2),
+ dynamic(3),
+ static(4)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 4 }
+
+ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 23 }
+
+icmp ::= { mib-2 5 }
+
+icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 1 }
+
+icmpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 2 }
+
+icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 3 }
+
+icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 4 }
+
+icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 5 }
+
+icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 6 }
+
+icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 7 }
+
+icmpInEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 8 }
+
+icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 9 }
+
+icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 10 }
+
+icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 11 }
+
+icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 12 }
+
+icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 13 }
+
+icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 14 }
+
+icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 15 }
+
+icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 16 }
+
+icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 17 }
+
+icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 18 }
+
+icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 19 }
+
+icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 20 }
+
+icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 21 }
+
+icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 22 }
+
+icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 23 }
+
+icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 24 }
+
+icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 25 }
+
+icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 26 }
+
+ipMIBConformance ::= { ipMIB 2 }
+
+ipMIBCompliances ::= { ipMIBConformance 1 }
+
+ipMIBGroups ::= { ipMIBConformance 2 }
+
+ipMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ipGroup, icmpGroup }
+ ::= { ipMIBCompliances 1 }
+
+ipGroup OBJECT-GROUP
+ OBJECTS {
+ ipForwarding,
+ ipDefaultTTL,
+ ipInReceives,
+ ipInHdrErrors,
+ ipInAddrErrors,
+ ipForwDatagrams,
+ ipInUnknownProtos,
+ ipInDiscards,
+ ipInDelivers,
+ ipOutRequests,
+ ipOutDiscards,
+ ipOutNoRoutes,
+ ipReasmTimeout,
+ ipReasmReqds,
+ ipReasmOKs,
+ ipReasmFails,
+ ipFragOKs,
+ ipFragFails,
+ ipFragCreates,
+ ipAdEntAddr,
+ ipAdEntIfIndex,
+ ipAdEntNetMask,
+ ipAdEntBcastAddr,
+ ipAdEntReasmMaxSize,
+ ipNetToMediaIfIndex,
+ ipNetToMediaPhysAddress,
+ ipNetToMediaNetAddress,
+ ipNetToMediaType,
+ ipRoutingDiscards
+ }
+ STATUS current
+ ::= { ipMIBGroups 1 }
+
+icmpGroup OBJECT-GROUP
+ OBJECTS {
+ icmpInMsgs,
+ icmpInErrors,
+ icmpInDestUnreachs,
+ icmpInTimeExcds,
+ icmpInParmProbs,
+ icmpInSrcQuenchs,
+ icmpInRedirects,
+ icmpInEchos,
+ icmpInEchoReps,
+ icmpInTimestamps,
+ icmpInTimestampReps,
+ icmpInAddrMasks,
+ icmpInAddrMaskReps,
+ icmpOutMsgs,
+ icmpOutErrors,
+ icmpOutDestUnreachs,
+ icmpOutTimeExcds,
+ icmpOutParmProbs,
+ icmpOutSrcQuenchs,
+ icmpOutRedirects,
+ icmpOutEchos,
+ icmpOutEchoReps,
+ icmpOutTimestamps,
+ icmpOutTimestampReps,
+ icmpOutAddrMasks,
+ icmpOutAddrMaskReps
+ }
+ STATUS current
+ ::= { ipMIBGroups 2 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/RFC1155-SMI.txt b/release/picobsd/isp/crunch1/mibs/RFC1155-SMI.txt
new file mode 100644
index 0000000..e59574e
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/RFC1155-SMI.txt
@@ -0,0 +1,9 @@
+RFC1155-SMI DEFINITIONS ::= BEGIN
+ nullOID OBJECT IDENTIFIER ::= { ccitt 0 }
+ internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
+ directory OBJECT IDENTIFIER ::= { internet 1 }
+ mgmt OBJECT IDENTIFIER ::= { internet 2 }
+ experimental OBJECT IDENTIFIER ::= { internet 3 }
+ private OBJECT IDENTIFIER ::= { internet 4 }
+ enterprises OBJECT IDENTIFIER ::= { private 1 }
+END
diff --git a/release/picobsd/isp/crunch1/mibs/RFC1213-MIB.txt b/release/picobsd/isp/crunch1/mibs/RFC1213-MIB.txt
new file mode 100644
index 0000000..1f1f253
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/RFC1213-MIB.txt
@@ -0,0 +1,1550 @@
+RFC1213-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ mgmt, NetworkAddress, IpAddress, Counter, Gauge,
+ TimeTicks
+ FROM RFC1155-SMI
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+
+
+ mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
+
+
+ DisplayString ::=
+ OCTET STRING
+
+
+
+ PhysAddress ::=
+ OCTET STRING
+
+
+ system OBJECT IDENTIFIER ::= { mib-2 1 }
+
+ interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
+
+ at OBJECT IDENTIFIER ::= { mib-2 3 }
+
+ ip OBJECT IDENTIFIER ::= { mib-2 4 }
+
+ icmp OBJECT IDENTIFIER ::= { mib-2 5 }
+
+ tcp OBJECT IDENTIFIER ::= { mib-2 6 }
+
+ udp OBJECT IDENTIFIER ::= { mib-2 7 }
+
+ egp OBJECT IDENTIFIER ::= { mib-2 8 }
+
+
+ transmission OBJECT IDENTIFIER ::= { mib-2 10 }
+
+ snmp OBJECT IDENTIFIER ::= { mib-2 11 }
+
+
+
+ sysDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { system 1 }
+
+ sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 2 }
+
+ sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 3 }
+
+ sysContact OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 4 }
+
+ sysName OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 5 }
+
+ sysLocation OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 6 }
+
+ sysServices OBJECT-TYPE
+ SYNTAX INTEGER (0..127)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 7 }
+
+
+
+
+ ifNumber OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { interfaces 1 }
+
+
+
+ ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { interfaces 2 }
+
+ ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+ IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ INTEGER,
+
+
+ ifDescr
+ DisplayString,
+ ifType
+ INTEGER,
+ ifMtu
+ INTEGER,
+ ifSpeed
+ Gauge,
+ ifPhysAddress
+ PhysAddress,
+ ifAdminStatus
+ INTEGER,
+ ifOperStatus
+ INTEGER,
+ ifLastChange
+ TimeTicks,
+ ifInOctets
+ Counter,
+ ifInUcastPkts
+ Counter,
+ ifInNUcastPkts
+ Counter,
+ ifInDiscards
+ Counter,
+ ifInErrors
+ Counter,
+ ifInUnknownProtos
+ Counter,
+ ifOutOctets
+ Counter,
+ ifOutUcastPkts
+ Counter,
+ ifOutNUcastPkts
+ Counter,
+ ifOutDiscards
+ Counter,
+ ifOutErrors
+ Counter,
+ ifOutQLen
+ Gauge,
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ ifIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ifEntry 1 }
+
+ ifDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 2 }
+
+ ifType OBJECT-TYPE
+ SYNTAX INTEGER {
+ regular1822(2),
+ hdh1822(3),
+ ddn-x25(4),
+ rfc877-x25(5),
+ ethernet-csmacd(6),
+ iso88023-csmacd(7),
+ iso88024-tokenBus(8),
+ iso88025-tokenRing(9),
+ iso88026-man(10),
+ starLan(11),
+ proteon-10Mbit(12),
+ proteon-80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ basicISDN(20),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ ethernet-3Mbit(26),
+
+
+ frame-relay(32)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 3 }
+
+ ifMtu OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 4 }
+
+ ifSpeed OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 5 }
+
+ ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 6 }
+
+ ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ifEntry 7 }
+
+ ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 8 }
+
+ ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 9 }
+
+ ifInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { ifEntry 10 }
+
+ ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 11 }
+
+ ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 12 }
+
+ ifInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 13 }
+
+ ifInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 14 }
+
+
+ ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 15 }
+
+ ifOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 16 }
+
+ ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 17 }
+
+ ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 18 }
+
+ ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 19 }
+
+ ifOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 20 }
+
+ ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 21 }
+
+ ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 22 }
+
+
+
+
+
+
+
+ atTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ ::= { at 1 }
+
+ atEntry OBJECT-TYPE
+ SYNTAX AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ INDEX { atIfIndex,
+ atNetAddress }
+ ::= { atTable 1 }
+
+ AtEntry ::=
+ SEQUENCE {
+ atIfIndex
+ INTEGER,
+
+
+ atPhysAddress
+ PhysAddress,
+ atNetAddress
+ NetworkAddress
+ }
+
+ atIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 1 }
+
+ atPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 2 }
+
+ atNetAddress OBJECT-TYPE
+ SYNTAX NetworkAddress
+ ACCESS read-write
+ STATUS deprecated
+
+
+ ::= { atEntry 3 }
+
+
+
+ ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 1 }
+
+ ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 2 }
+
+ ipInReceives OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 3 }
+
+ ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 4 }
+
+ ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 5 }
+
+ ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 6 }
+
+ ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 7 }
+
+ ipInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 8 }
+
+ ipInDelivers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 9 }
+
+ ipOutRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 10 }
+
+ ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 11 }
+
+ ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 12 }
+
+ ipReasmTimeout OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 13 }
+
+ ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 14 }
+
+ ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 15 }
+
+ ipReasmFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 16 }
+
+ ipFragOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 17 }
+
+ ipFragFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 18 }
+
+ ipFragCreates OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 19 }
+
+
+
+
+ ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 20 }
+
+ ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+ IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+ ipAdEntIfIndex
+ INTEGER,
+ ipAdEntNetMask
+ IpAddress,
+ ipAdEntBcastAddr
+ INTEGER,
+ ipAdEntReasmMaxSize
+ INTEGER (0..65535)
+ }
+
+ ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 1 }
+
+
+ ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 2 }
+
+ ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 3 }
+
+ ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 4 }
+
+ ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 5 }
+
+
+
+
+ ipRouteTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 21 }
+
+ ipRouteEntry OBJECT-TYPE
+ SYNTAX IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipRouteDest }
+ ::= { ipRouteTable 1 }
+
+ IpRouteEntry ::=
+ SEQUENCE {
+ ipRouteDest
+ IpAddress,
+ ipRouteIfIndex
+ INTEGER,
+ ipRouteMetric1
+ INTEGER,
+ ipRouteMetric2
+ INTEGER,
+ ipRouteMetric3
+ INTEGER,
+ ipRouteMetric4
+ INTEGER,
+ ipRouteNextHop
+ IpAddress,
+ ipRouteType
+ INTEGER,
+ ipRouteProto
+ INTEGER,
+ ipRouteAge
+ INTEGER,
+ ipRouteMask
+ IpAddress,
+ ipRouteMetric5
+ INTEGER,
+
+
+ ipRouteInfo
+ OBJECT IDENTIFIER
+ }
+
+ ipRouteDest OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 1 }
+
+ ipRouteIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 2 }
+
+ ipRouteMetric1 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 3 }
+
+ ipRouteMetric2 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 4 }
+
+ ipRouteMetric3 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 5 }
+
+ ipRouteMetric4 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 6 }
+
+ ipRouteNextHop OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 7 }
+
+ ipRouteType OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 8 }
+
+ ipRouteProto OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ egp(5),
+ ggp(6),
+
+
+ hello(7),
+ rip(8),
+ is-is(9),
+ es-is(10),
+ ciscoIgrp(11),
+ bbnSpfIgp(12),
+ ospf(13),
+ bgp(14)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 9 }
+
+ ipRouteAge OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 10 }
+
+ ipRouteMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 11 }
+
+ ipRouteMetric5 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 12 }
+
+ ipRouteInfo OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 13 }
+
+
+
+ ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+
+
+ ::= { ip 22 }
+
+ ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipNetToMediaIfIndex,
+ ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+ IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+ ipNetToMediaPhysAddress
+ PhysAddress,
+ ipNetToMediaNetAddress
+ IpAddress,
+ ipNetToMediaType
+ INTEGER
+ }
+
+ ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 1 }
+
+ ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 2 }
+
+
+ ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 3 }
+
+ ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ dynamic(3),
+ static(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 4 }
+
+
+ ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 23 }
+
+
+
+ icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 1 }
+
+ icmpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 2 }
+
+ icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 3 }
+
+ icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 4 }
+
+
+ icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 5 }
+
+ icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 6 }
+
+ icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 7 }
+
+ icmpInEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 8 }
+
+ icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 9 }
+
+ icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 10 }
+
+ icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 11 }
+
+ icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 12 }
+
+ icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 13 }
+
+ icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 14 }
+
+ icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 15 }
+
+ icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 16 }
+
+ icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 17 }
+
+ icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 18 }
+
+ icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 19 }
+
+ icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 20 }
+
+ icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 21 }
+
+ icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 22 }
+
+ icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 23 }
+
+ icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 24 }
+
+ icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 25 }
+
+
+ icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 26 }
+
+
+
+
+ tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 1 }
+
+ tcpRtoMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 2 }
+
+ tcpRtoMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 3 }
+
+ tcpMaxConn OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 4 }
+
+ tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 5 }
+
+ tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 6 }
+
+
+ tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 7 }
+
+ tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 8 }
+
+ tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 9 }
+
+ tcpInSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 10 }
+
+ tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 11 }
+
+ tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 12 }
+
+
+
+ tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { tcp 13 }
+
+ tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort }
+ ::= { tcpConnTable 1 }
+
+
+ TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+ tcpConnLocalAddress
+ IpAddress,
+ tcpConnLocalPort
+ INTEGER (0..65535),
+ tcpConnRemAddress
+ IpAddress,
+ tcpConnRemPort
+ INTEGER (0..65535)
+ }
+
+ tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { tcpConnEntry 1 }
+
+ tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 2 }
+
+ tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 3 }
+
+ tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 4 }
+
+ tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 5 }
+
+
+ tcpInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 14 }
+
+ tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 15 }
+
+
+
+ udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 1 }
+
+ udpNoPorts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 2 }
+
+ udpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 3 }
+
+
+ udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 4 }
+
+
+
+ udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { udp 5 }
+
+ udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+ UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+ udpLocalPort
+ INTEGER (0..65535)
+ }
+
+ udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 1 }
+
+ udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 2 }
+
+
+
+ egpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 1 }
+
+ egpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 2 }
+
+ egpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 3 }
+
+ egpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 4 }
+
+
+
+ egpNeighTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { egp 5 }
+
+ egpNeighEntry OBJECT-TYPE
+ SYNTAX EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { egpNeighAddr }
+ ::= { egpNeighTable 1 }
+
+ EgpNeighEntry ::=
+ SEQUENCE {
+ egpNeighState
+ INTEGER,
+ egpNeighAddr
+ IpAddress,
+ egpNeighAs
+ INTEGER,
+ egpNeighInMsgs
+ Counter,
+ egpNeighInErrs
+ Counter,
+ egpNeighOutMsgs
+ Counter,
+ egpNeighOutErrs
+ Counter,
+
+
+ egpNeighInErrMsgs
+ Counter,
+ egpNeighOutErrMsgs
+ Counter,
+ egpNeighStateUps
+ Counter,
+ egpNeighStateDowns
+ Counter,
+ egpNeighIntervalHello
+ INTEGER,
+ egpNeighIntervalPoll
+ INTEGER,
+ egpNeighMode
+ INTEGER,
+ egpNeighEventTrigger
+ INTEGER
+ }
+
+ egpNeighState OBJECT-TYPE
+ SYNTAX INTEGER {
+ idle(1),
+ acquisition(2),
+ down(3),
+ up(4),
+ cease(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 1 }
+
+ egpNeighAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 2 }
+
+ egpNeighAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 3 }
+
+ egpNeighInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 4 }
+
+ egpNeighInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 5 }
+
+ egpNeighOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 6 }
+
+ egpNeighOutErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 7 }
+
+ egpNeighInErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 8 }
+
+ egpNeighOutErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 9 }
+
+ egpNeighStateUps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 10 }
+
+ egpNeighStateDowns OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 11 }
+
+ egpNeighIntervalHello OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 12 }
+
+ egpNeighIntervalPoll OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 13 }
+
+ egpNeighMode OBJECT-TYPE
+ SYNTAX INTEGER { active(1), passive(2) }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 14 }
+
+ egpNeighEventTrigger OBJECT-TYPE
+ SYNTAX INTEGER { start(1), stop(2) }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { egpNeighEntry 15 }
+
+
+ egpAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 6 }
+
+
+
+
+
+
+
+
+ snmpInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 1 }
+
+ snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 2 }
+
+ snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 3 }
+
+ snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 4 }
+
+ snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 5 }
+
+ snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 6 }
+
+
+
+ snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 8 }
+
+ snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 9 }
+
+ snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 10 }
+
+ snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 11 }
+
+ snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 12 }
+
+ snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 13 }
+
+ snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 14 }
+
+ snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 15 }
+
+ snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 16 }
+
+ snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 17 }
+
+ snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 18 }
+
+ snmpInTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 19 }
+
+ snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 20 }
+
+
+ snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 21 }
+
+ snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 22 }
+
+
+ snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 24 }
+
+ snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 25 }
+
+ snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { snmp 26 }
+
+ snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 27 }
+
+ snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 28 }
+
+ snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 29 }
+
+ snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER { enabled(1), disabled(2) }
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { snmp 30 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/RFC1271-MIB.txt b/release/picobsd/isp/crunch1/mibs/RFC1271-MIB.txt
new file mode 100644
index 0000000..1c85945
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/RFC1271-MIB.txt
@@ -0,0 +1,1633 @@
+RFC1271-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ Counter FROM RFC1155-SMI
+ DisplayString FROM RFC1158-MIB
+ mib-2 FROM RFC1213-MIB
+ OBJECT-TYPE FROM RFC-1212;
+
+
+
+ rmon OBJECT IDENTIFIER ::= { mib-2 16 }
+
+
+ OwnerString ::= OCTET STRING
+
+
+
+ EntryStatus ::= INTEGER
+ { valid(1),
+ createRequest(2),
+ underCreation(3),
+ invalid(4)
+ }
+
+
+
+
+ statistics OBJECT IDENTIFIER ::= { rmon 1 }
+ history OBJECT IDENTIFIER ::= { rmon 2 }
+ alarm OBJECT IDENTIFIER ::= { rmon 3 }
+ hosts OBJECT IDENTIFIER ::= { rmon 4 }
+ hostTopN OBJECT IDENTIFIER ::= { rmon 5 }
+ matrix OBJECT IDENTIFIER ::= { rmon 6 }
+ filter OBJECT IDENTIFIER ::= { rmon 7 }
+ capture OBJECT IDENTIFIER ::= { rmon 8 }
+ event OBJECT IDENTIFIER ::= { rmon 9 }
+
+
+ etherStatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { statistics 1 }
+
+
+ etherStatsEntry OBJECT-TYPE
+ SYNTAX EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherStatsIndex }
+ ::= { etherStatsTable 1 }
+
+ EtherStatsEntry ::= SEQUENCE {
+ etherStatsIndex INTEGER (1..65535),
+ etherStatsDataSource OBJECT IDENTIFIER,
+ etherStatsDropEvents Counter,
+ etherStatsOctets Counter,
+ etherStatsPkts Counter,
+ etherStatsBroadcastPkts Counter,
+ etherStatsMulticastPkts Counter,
+ etherStatsCRCAlignErrors Counter,
+ etherStatsUndersizePkts Counter,
+ etherStatsOversizePkts Counter,
+ etherStatsFragments Counter,
+ etherStatsJabbers Counter,
+ etherStatsCollisions Counter,
+ etherStatsPkts64Octets Counter,
+ etherStatsPkts65to127Octets Counter,
+ etherStatsPkts128to255Octets Counter,
+ etherStatsPkts256to511Octets Counter,
+ etherStatsPkts512to1023Octets Counter,
+ etherStatsPkts1024to1518Octets Counter,
+ etherStatsOwner OwnerString,
+ etherStatsStatus INTEGER
+ }
+
+ etherStatsIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 1 }
+
+ etherStatsDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 2 }
+
+ etherStatsDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 3 }
+
+ etherStatsOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 4 }
+
+ etherStatsPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 5 }
+
+
+ etherStatsBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 6 }
+
+ etherStatsMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 7 }
+
+ etherStatsCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 8 }
+
+ etherStatsUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 9 }
+
+ etherStatsOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 10 }
+
+ etherStatsFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 11 }
+
+ etherStatsJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 12 }
+
+ etherStatsCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 13 }
+
+ etherStatsPkts64Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 14 }
+
+ etherStatsPkts65to127Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 15 }
+
+ etherStatsPkts128to255Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 16 }
+
+ etherStatsPkts256to511Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 17 }
+
+ etherStatsPkts512to1023Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 18 }
+
+
+ etherStatsPkts1024to1518Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 19 }
+
+ etherStatsOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 20 }
+
+ etherStatsStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 21 }
+
+
+
+
+
+ historyControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 1 }
+
+ historyControlEntry OBJECT-TYPE
+ SYNTAX HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { historyControlIndex }
+ ::= { historyControlTable 1 }
+
+ HistoryControlEntry ::= SEQUENCE {
+ historyControlIndex INTEGER (1..65535),
+ historyControlDataSource OBJECT IDENTIFIER,
+ historyControlBucketsRequested INTEGER (1..65535),
+ historyControlBucketsGranted INTEGER (1..65535),
+ historyControlInterval INTEGER (1..3600),
+ historyControlOwner OwnerString,
+ historyControlStatus INTEGER
+ }
+
+ historyControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 1 }
+
+
+ historyControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 2 }
+
+ historyControlBucketsRequested OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 50 }
+ ::= { historyControlEntry 3 }
+
+ historyControlBucketsGranted OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 4 }
+
+ historyControlInterval OBJECT-TYPE
+ SYNTAX INTEGER (1..3600)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 1800 }
+ ::= { historyControlEntry 5 }
+
+ historyControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 6 }
+
+ historyControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 7 }
+
+
+ etherHistoryTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherHistoryEntry
+
+
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 2 }
+
+ etherHistoryEntry OBJECT-TYPE
+ SYNTAX EtherHistoryEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherHistoryIndex , etherHistorySampleIndex }
+ ::= { etherHistoryTable 1 }
+
+ EtherHistoryEntry ::= SEQUENCE {
+ etherHistoryIndex INTEGER (1..65535),
+ etherHistorySampleIndex INTEGER,
+ etherHistoryIntervalStart TimeTicks,
+ etherHistoryDropEvents Counter,
+ etherHistoryOctets Counter,
+ etherHistoryPkts Counter,
+ etherHistoryBroadcastPkts Counter,
+ etherHistoryMulticastPkts Counter,
+ etherHistoryCRCAlignErrors Counter,
+ etherHistoryUndersizePkts Counter,
+ etherHistoryOversizePkts Counter,
+ etherHistoryFragments Counter,
+ etherHistoryJabbers Counter,
+ etherHistoryCollisions Counter,
+ etherHistoryUtilization INTEGER (0..10000)
+ }
+
+ etherHistoryIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 1 }
+
+
+ etherHistorySampleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 2 }
+
+ etherHistoryIntervalStart OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 3 }
+
+ etherHistoryDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 4 }
+
+ etherHistoryOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 5 }
+
+ etherHistoryPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 6 }
+
+ etherHistoryBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 7 }
+
+ etherHistoryMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 8 }
+
+ etherHistoryCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 9 }
+
+
+ etherHistoryUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 10 }
+
+ etherHistoryOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 11 }
+
+ etherHistoryFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 12 }
+
+ etherHistoryJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 13 }
+
+
+ etherHistoryCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 14 }
+
+ etherHistoryUtilization OBJECT-TYPE
+ SYNTAX INTEGER (0..10000)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 15 }
+
+
+
+
+
+ alarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { alarm 1 }
+
+ alarmEntry OBJECT-TYPE
+ SYNTAX AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { alarmIndex }
+ ::= { alarmTable 1 }
+
+ AlarmEntry ::= SEQUENCE {
+ alarmIndex INTEGER (1..65535),
+ alarmInterval INTEGER,
+ alarmVariable OBJECT IDENTIFIER,
+ alarmSampleType INTEGER,
+ alarmValue INTEGER,
+ alarmStartupAlarm INTEGER,
+ alarmRisingThreshold INTEGER,
+ alarmFallingThreshold INTEGER,
+ alarmRisingEventIndex INTEGER (1..65535),
+ alarmFallingEventIndex INTEGER (1..65535),
+ alarmOwner OwnerString,
+ alarmStatus INTEGER
+ }
+
+ alarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 1 }
+
+
+ alarmInterval OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 2 }
+
+ alarmVariable OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 3 }
+
+
+ alarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 4 }
+
+ alarmValue OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 5 }
+
+ alarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 6 }
+
+ alarmRisingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 7 }
+
+ alarmFallingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 8 }
+
+ alarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 9 }
+
+ alarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { alarmEntry 10 }
+
+ alarmOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 11 }
+
+ alarmStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 12 }
+
+
+
+
+
+
+
+
+
+
+ hostControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 1 }
+
+
+ hostControlEntry OBJECT-TYPE
+ SYNTAX HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostControlIndex }
+ ::= { hostControlTable 1 }
+
+ HostControlEntry ::= SEQUENCE {
+ hostControlIndex INTEGER (1..65535),
+ hostControlDataSource OBJECT IDENTIFIER,
+ hostControlTableSize INTEGER,
+ hostControlLastDeleteTime TimeTicks,
+ hostControlOwner OwnerString,
+ hostControlStatus INTEGER
+ }
+
+ hostControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 1 }
+
+ hostControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 2 }
+
+ hostControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 3 }
+
+ hostControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 4 }
+
+ hostControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 5 }
+
+ hostControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 6 }
+
+
+ hostTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 2 }
+
+ hostEntry OBJECT-TYPE
+ SYNTAX HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostIndex, hostAddress }
+ ::= { hostTable 1 }
+
+ HostEntry ::= SEQUENCE {
+ hostAddress OCTET STRING,
+ hostCreationOrder INTEGER (1..65535),
+ hostIndex INTEGER (1..65535),
+ hostInPkts Counter,
+ hostOutPkts Counter,
+ hostInOctets Counter,
+ hostOutOctets Counter,
+ hostOutErrors Counter,
+ hostOutBroadcastPkts Counter,
+ hostOutMulticastPkts Counter
+ }
+
+ hostAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 1 }
+
+ hostCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 2 }
+
+ hostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 3 }
+
+ hostInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 4 }
+
+ hostOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { hostEntry 5 }
+
+ hostInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 6 }
+
+ hostOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 7 }
+
+ hostOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 8 }
+
+ hostOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 9 }
+
+ hostOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 10 }
+
+
+ hostTimeTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 3 }
+
+ hostTimeEntry OBJECT-TYPE
+ SYNTAX HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTimeIndex, hostTimeCreationOrder }
+ ::= { hostTimeTable 1 }
+
+ HostTimeEntry ::= SEQUENCE {
+ hostTimeAddress OCTET STRING,
+ hostTimeCreationOrder INTEGER (1..65535),
+ hostTimeIndex INTEGER (1..65535),
+ hostTimeInPkts Counter,
+ hostTimeOutPkts Counter,
+ hostTimeInOctets Counter,
+ hostTimeOutOctets Counter,
+ hostTimeOutErrors Counter,
+ hostTimeOutBroadcastPkts Counter,
+ hostTimeOutMulticastPkts Counter
+ }
+
+ hostTimeAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 1 }
+
+ hostTimeCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 2 }
+
+ hostTimeIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 3 }
+
+
+ hostTimeInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 4 }
+
+ hostTimeOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 5 }
+
+ hostTimeInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 6 }
+
+ hostTimeOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 7 }
+
+ hostTimeOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 8 }
+
+ hostTimeOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 9 }
+
+ hostTimeOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 10 }
+
+
+
+
+
+
+ hostTopNControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 1 }
+
+ hostTopNControlEntry OBJECT-TYPE
+ SYNTAX HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNControlIndex }
+ ::= { hostTopNControlTable 1 }
+
+ HostTopNControlEntry ::= SEQUENCE {
+ hostTopNControlIndex INTEGER (1..65535),
+ hostTopNHostIndex INTEGER (1..65535),
+ hostTopNRateBase INTEGER,
+ hostTopNTimeRemaining INTEGER,
+ hostTopNDuration INTEGER,
+ hostTopNRequestedSize INTEGER,
+ hostTopNGrantedSize INTEGER,
+ hostTopNStartTime TimeTicks,
+ hostTopNOwner OwnerString,
+ hostTopNStatus INTEGER
+ }
+
+ hostTopNControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 1 }
+
+ hostTopNHostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { hostTopNControlEntry 2 }
+
+ hostTopNRateBase OBJECT-TYPE
+ SYNTAX INTEGER {
+ hostTopNInPkts(1),
+ hostTopNOutPkts(2),
+ hostTopNInOctets(3),
+ hostTopNOutOctets(4),
+ hostTopNOutErrors(5),
+ hostTopNOutBroadcastPkts(6),
+ hostTopNOutMulticastPkts(7)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 3 }
+
+ hostTopNTimeRemaining OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 4 }
+
+ hostTopNDuration OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 5 }
+
+ hostTopNRequestedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 10 }
+ ::= { hostTopNControlEntry 6 }
+
+
+ hostTopNGrantedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 7 }
+
+ hostTopNStartTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 8 }
+
+ hostTopNOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 9 }
+
+ hostTopNStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 10 }
+
+ hostTopNTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 2 }
+
+ hostTopNEntry OBJECT-TYPE
+ SYNTAX HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNReport, hostTopNIndex }
+ ::= { hostTopNTable 1 }
+
+ HostTopNEntry ::= SEQUENCE {
+ hostTopNReport INTEGER (1..65535),
+ hostTopNIndex INTEGER (1..65535),
+ hostTopNAddress OCTET STRING,
+ hostTopNRate INTEGER
+ }
+
+ hostTopNReport OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 1 }
+
+ hostTopNIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 2 }
+
+ hostTopNAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 3 }
+
+ hostTopNRate OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 4 }
+
+
+
+ matrixControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixControlEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { matrix 1 }
+
+ matrixControlEntry OBJECT-TYPE
+ SYNTAX MatrixControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixControlIndex }
+ ::= { matrixControlTable 1 }
+
+ MatrixControlEntry ::= SEQUENCE {
+ matrixControlIndex INTEGER (1..65535),
+ matrixControlDataSource OBJECT IDENTIFIER,
+ matrixControlTableSize INTEGER,
+ matrixControlLastDeleteTime TimeTicks,
+ matrixControlOwner OwnerString,
+ matrixControlStatus INTEGER
+ }
+
+ matrixControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 1 }
+
+ matrixControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 2 }
+
+ matrixControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 3 }
+
+ matrixControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 4 }
+
+ matrixControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 5 }
+
+ matrixControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { matrixControlEntry 6 }
+
+ matrixSDTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 2 }
+
+ matrixSDEntry OBJECT-TYPE
+ SYNTAX MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixSDIndex,
+ matrixSDSourceAddress, matrixSDDestAddress }
+ ::= { matrixSDTable 1 }
+
+ MatrixSDEntry ::= SEQUENCE {
+ matrixSDSourceAddress OCTET STRING,
+ matrixSDDestAddress OCTET STRING,
+ matrixSDIndex INTEGER (1..65535),
+ matrixSDPkts Counter,
+ matrixSDOctets Counter,
+ matrixSDErrors Counter
+ }
+
+ matrixSDSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 1 }
+
+
+ matrixSDDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 2 }
+
+ matrixSDIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 3 }
+
+ matrixSDPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 4 }
+
+ matrixSDOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 5 }
+
+ matrixSDErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixSDEntry 6 }
+
+
+ matrixDSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 3 }
+
+ matrixDSEntry OBJECT-TYPE
+ SYNTAX MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixDSIndex,
+ matrixDSDestAddress, matrixDSSourceAddress }
+ ::= { matrixDSTable 1 }
+
+ MatrixDSEntry ::= SEQUENCE {
+ matrixDSSourceAddress OCTET STRING,
+ matrixDSDestAddress OCTET STRING,
+ matrixDSIndex INTEGER (1..65535),
+ matrixDSPkts Counter,
+ matrixDSOctets Counter,
+ matrixDSErrors Counter
+ }
+
+ matrixDSSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 1 }
+
+ matrixDSDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixDSEntry 2 }
+
+ matrixDSIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 3 }
+
+ matrixDSPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 4 }
+
+ matrixDSOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 5 }
+
+ matrixDSErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 6 }
+
+
+
+
+
+ filterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 1 }
+
+ filterEntry OBJECT-TYPE
+ SYNTAX FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { filterIndex }
+ ::= { filterTable 1 }
+
+ FilterEntry ::= SEQUENCE {
+ filterIndex INTEGER (1..65535),
+ filterChannelIndex INTEGER (1..65535),
+ filterPktDataOffset INTEGER,
+ filterPktData OCTET STRING,
+ filterPktDataMask OCTET STRING,
+ filterPktDataNotMask OCTET STRING,
+ filterPktStatus INTEGER,
+ filterPktStatusMask INTEGER,
+ filterPktStatusNotMask INTEGER,
+ filterOwner OwnerString,
+ filterStatus INTEGER
+
+
+ }
+
+ filterIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { filterEntry 1 }
+
+ filterChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 2 }
+
+ filterPktDataOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { filterEntry 3 }
+
+ filterPktData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 4 }
+
+ filterPktDataMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 5 }
+
+ filterPktDataNotMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 6 }
+
+ filterPktStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 7 }
+
+ filterPktStatusMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { filterEntry 8 }
+
+ filterPktStatusNotMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 9 }
+
+ filterOwner OBJECT-TYPE
+ SYNTAX OwnerString
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 10 }
+
+ filterStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 11 }
+
+ channelTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 2 }
+
+ channelEntry OBJECT-TYPE
+ SYNTAX ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { channelIndex }
+ ::= { channelTable 1 }
+
+ ChannelEntry ::= SEQUENCE {
+ channelIndex INTEGER (1..65535),
+ channelIfIndex INTEGER (1..65535),
+ channelAcceptType INTEGER,
+ channelDataControl INTEGER,
+ channelTurnOnEventIndex INTEGER (0..65535),
+ channelTurnOffEventIndex INTEGER (0..65535),
+ channelEventIndex INTEGER (0..65535),
+ channelEventStatus INTEGER,
+ channelMatches Counter,
+ channelDescription DisplayString (SIZE (0..127)),
+ channelOwner OwnerString,
+ channelStatus INTEGER
+ }
+
+
+ channelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 1 }
+
+ channelIfIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 2 }
+
+ channelAcceptType OBJECT-TYPE
+ SYNTAX INTEGER {
+ acceptMatched(1),
+ acceptFailed(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 3 }
+
+ channelDataControl OBJECT-TYPE
+ SYNTAX INTEGER {
+ on(1),
+ off(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { off }
+ ::= { channelEntry 4 }
+
+ channelTurnOnEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 5 }
+
+ channelTurnOffEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 6 }
+
+ channelEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 7 }
+
+ channelEventStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ eventReady(1),
+ eventFired(2),
+ eventAlwaysReady(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { eventReady }
+ ::= { channelEntry 8 }
+
+ channelMatches OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 9 }
+
+ channelDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 10 }
+
+ channelOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 11 }
+
+ channelStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 12 }
+
+
+
+ bufferControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { capture 1 }
+
+ bufferControlEntry OBJECT-TYPE
+ SYNTAX BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { bufferControlIndex }
+ ::= { bufferControlTable 1 }
+
+ BufferControlEntry ::= SEQUENCE {
+ bufferControlIndex INTEGER (1..65535),
+ bufferControlChannelIndex INTEGER (1..65535),
+ bufferControlFullStatus INTEGER,
+ bufferControlFullAction INTEGER,
+ bufferControlCaptureSliceSize INTEGER,
+ bufferControlDownloadSliceSize INTEGER,
+ bufferControlDownloadOffset INTEGER,
+ bufferControlMaxOctetsRequested INTEGER,
+ bufferControlMaxOctetsGranted INTEGER,
+ bufferControlCapturedPackets INTEGER,
+
+
+ bufferControlTurnOnTime TimeTicks,
+ bufferControlOwner OwnerString,
+ bufferControlStatus INTEGER
+ }
+
+ bufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 1 }
+
+ bufferControlChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 2 }
+
+ bufferControlFullStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ spaceAvailable(1),
+ full(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 3 }
+
+ bufferControlFullAction OBJECT-TYPE
+ SYNTAX INTEGER {
+ lockWhenFull(1),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 4 }
+
+ bufferControlCaptureSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 5 }
+
+
+ bufferControlDownloadSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 6 }
+
+ bufferControlDownloadOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { bufferControlEntry 7 }
+
+ bufferControlMaxOctetsRequested OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { -1 }
+ ::= { bufferControlEntry 8 }
+
+ bufferControlMaxOctetsGranted OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 9 }
+
+ bufferControlCapturedPackets OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 10 }
+
+ bufferControlTurnOnTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 11 }
+
+ bufferControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 12 }
+
+ bufferControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 13 }
+
+ captureBufferTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CaptureBufferEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { capture 2 }
+
+ captureBufferEntry OBJECT-TYPE
+ SYNTAX CaptureBufferEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { captureBufferControlIndex, captureBufferIndex }
+ ::= { captureBufferTable 1 }
+
+ CaptureBufferEntry ::= SEQUENCE {
+ captureBufferControlIndex INTEGER (1..65535),
+ captureBufferIndex INTEGER,
+ captureBufferPacketID INTEGER,
+ captureBufferPacketData OCTET STRING,
+ captureBufferPacketLength INTEGER,
+ captureBufferPacketTime INTEGER,
+ captureBufferPacketStatus INTEGER
+ }
+
+ captureBufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 1 }
+
+ captureBufferIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 2 }
+
+ captureBufferPacketID OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { captureBufferEntry 3 }
+
+ captureBufferPacketData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 4 }
+
+ captureBufferPacketLength OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 5 }
+
+ captureBufferPacketTime OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 6 }
+
+
+ captureBufferPacketStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 7 }
+
+
+
+
+
+ eventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 1 }
+
+ eventEntry OBJECT-TYPE
+ SYNTAX EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { eventIndex }
+ ::= { eventTable 1 }
+
+ EventEntry ::= SEQUENCE {
+ eventIndex INTEGER (1..65535),
+ eventDescription DisplayString (SIZE (0..127)),
+ eventType INTEGER,
+ eventCommunity OCTET STRING (SIZE (0..127)),
+ eventLastTimeSent TimeTicks,
+ eventOwner OwnerString,
+ eventStatus INTEGER
+ }
+
+ eventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 1 }
+
+ eventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 2 }
+
+ eventType OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ log(2),
+ log-and-trap(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 3 }
+
+ eventCommunity OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 4 }
+
+ eventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 5 }
+
+ eventOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 6 }
+
+ eventStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 7 }
+
+ logTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 2 }
+
+ logEntry OBJECT-TYPE
+ SYNTAX LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { logEventIndex, logIndex }
+
+
+ ::= { logTable 1 }
+
+ LogEntry ::= SEQUENCE {
+ logEventIndex INTEGER (1..65535),
+ logIndex INTEGER,
+ logTime TimeTicks,
+ logDescription DisplayString (SIZE (0..255))
+ }
+
+ logEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 1 }
+
+ logIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 2 }
+
+ logTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 3 }
+
+
+ logDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 4 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-CONF.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-CONF.txt
new file mode 100644
index 0000000..7533685
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-CONF.txt
@@ -0,0 +1,7 @@
+SNMPv2-CONF DEFINITIONS ::= BEGIN
+
+IMPORTS iso FROM SNMPv2-SMI;
+
+dummy ::= { iso 999 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-M2M-MIB.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-M2M-MIB.txt
new file mode 100644
index 0000000..3ec4719
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-M2M-MIB.txt
@@ -0,0 +1,371 @@
+SNMPv2-M2M-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ Integer32, Counter32, snmpModules
+ FROM SNMPv2-SMI
+ DisplayString, InstancePointer, RowStatus, TimeStamp
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF
+ contextIdentity
+ FROM SNMPv2-PARTY-MIB;
+
+ snmpM2M MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ " Steven Waldbusser
+
+ Postal: Carnegie Mellon University
+ 4910 Forbes Ave
+ Pittsburgh, PA 15213
+
+ Tel: +1 412 268 6628
+ Fax: +1 412 268 4987
+
+ E-mail: waldbusser@cmu.edu"
+ ::= { snmpModules 2 }
+
+ snmpM2MObjects OBJECT IDENTIFIER ::= { snmpM2M 1 }
+
+
+
+ snmpAlarm OBJECT IDENTIFIER ::= { snmpM2MObjects 1 }
+
+
+
+ snmpAlarmNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarm 1 }
+
+ snmpAlarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarm 2 }
+
+ snmpAlarmEntry OBJECT-TYPE
+ SYNTAX SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { contextIdentity, snmpAlarmIndex }
+ ::= { snmpAlarmTable 1 }
+
+
+ SnmpAlarmEntry ::= SEQUENCE {
+ snmpAlarmIndex INTEGER,
+ snmpAlarmVariable InstancePointer,
+ snmpAlarmInterval Integer32,
+ snmpAlarmSampleType INTEGER,
+ snmpAlarmValue Integer32,
+ snmpAlarmStartupAlarm INTEGER,
+ snmpAlarmRisingThreshold Integer32,
+ snmpAlarmFallingThreshold Integer32,
+ snmpAlarmRisingEventIndex INTEGER,
+ snmpAlarmFallingEventIndex INTEGER,
+ snmpAlarmUnavailableEventIndex INTEGER,
+ snmpAlarmStatus RowStatus
+ }
+
+ snmpAlarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarmEntry 1 }
+
+
+ snmpAlarmVariable OBJECT-TYPE
+ SYNTAX InstancePointer
+ MAX-ACCESS read-create
+ STATUS current
+
+
+ ::= { snmpAlarmEntry 2 }
+
+ snmpAlarmInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 3 }
+
+
+ snmpAlarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { deltaValue }
+ ::= { snmpAlarmEntry 4 }
+
+
+ snmpAlarmValue OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarmEntry 5 }
+
+
+ snmpAlarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { risingOrFallingAlarm }
+ ::= { snmpAlarmEntry 6 }
+
+
+ snmpAlarmRisingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 7 }
+
+
+ snmpAlarmFallingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 8 }
+
+
+ snmpAlarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 9 }
+
+
+ snmpAlarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 10 }
+
+ snmpAlarmUnavailableEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 11 }
+
+
+ snmpAlarmStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 12 }
+
+
+
+ snmpAlarmNotifications
+ OBJECT IDENTIFIER ::= { snmpAlarm 3 }
+
+ snmpRisingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmRisingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 1 }
+
+ snmpFallingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmFallingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 2 }
+
+ snmpObjectUnavailableAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable }
+ STATUS current
+ ::= { snmpAlarmNotifications 3 }
+
+
+
+ snmpEvent OBJECT IDENTIFIER ::= { snmpM2MObjects 2 }
+
+
+ snmpEventNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 1 }
+
+
+ snmpEventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 2 }
+
+ snmpEventEntry OBJECT-TYPE
+ SYNTAX SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex }
+ ::= { snmpEventTable 1 }
+
+ SnmpEventEntry ::= SEQUENCE {
+ snmpEventIndex INTEGER,
+ snmpEventID OBJECT IDENTIFIER,
+ snmpEventDescription DisplayString,
+ snmpEventEvents Counter32,
+ snmpEventLastTimeSent TimeStamp,
+ snmpEventStatus RowStatus
+ }
+
+ snmpEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEventEntry 1 }
+
+
+ snmpEventID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 2 }
+
+ snmpEventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 3 }
+
+ snmpEventEvents OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEventEntry 4 }
+
+
+ snmpEventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ DEFVAL { 0 }
+ ::= { snmpEventEntry 5 }
+
+ snmpEventStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 6 }
+
+
+ snmpEventNotifyMinInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 3 }
+
+ snmpEventNotifyMaxRetransmissions OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 4 }
+
+
+
+
+ snmpEventNotifyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 5 }
+
+ snmpEventNotifyEntry OBJECT-TYPE
+ SYNTAX SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex, contextIdentity }
+ ::= { snmpEventNotifyTable 1 }
+
+ SnmpEventNotifyEntry ::= SEQUENCE {
+ snmpEventNotifyIntervalRequested Integer32,
+ snmpEventNotifyRetransmissionsRequested Integer32,
+ snmpEventNotifyLifetime Integer32,
+ snmpEventNotifyStatus RowStatus
+ }
+
+
+ snmpEventNotifyIntervalRequested OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 30 }
+ ::= { snmpEventNotifyEntry 1 }
+
+ snmpEventNotifyRetransmissionsRequested OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 5 }
+ ::= { snmpEventNotifyEntry 2 }
+
+
+ snmpEventNotifyLifetime OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 86400 }
+ ::= { snmpEventNotifyEntry 3 }
+
+ snmpEventNotifyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventNotifyEntry 4 }
+
+
+
+ snmpM2MConformance
+ OBJECT IDENTIFIER ::= { snmpM2M 2 }
+
+ snmpM2MCompliances
+ OBJECT IDENTIFIER ::= { snmpM2MConformance 1 }
+ snmpM2MGroups OBJECT IDENTIFIER ::= { snmpM2MConformance 2 }
+
+
+ snmpM2MCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { snmpAlarmGroup, snmpEventGroup }
+ ::= { snmpM2MCompliances 1 }
+
+
+ snmpAlarmGroup OBJECT-GROUP
+ OBJECTS { snmpAlarmNextIndex,
+ snmpAlarmVariable, snmpAlarmInterval,
+ snmpAlarmSampleType, snmpAlarmValue,
+ snmpAlarmStartupAlarm, snmpAlarmRisingThreshold,
+ snmpAlarmFallingThreshold,
+ snmpAlarmRisingEventIndex,
+ snmpAlarmFallingEventIndex,
+ snmpAlarmUnavailableEventIndex,
+ snmpAlarmStatus }
+ STATUS current
+ ::= { snmpM2MGroups 1 }
+
+
+ snmpEventGroup OBJECT-GROUP
+ OBJECTS { snmpEventNextIndex,
+ snmpEventID, snmpEventDescription,
+ snmpEventEvents, snmpEventLastTimeSent,
+ snmpEventStatus, snmpEventNotifyMinInterval,
+ snmpEventNotifyMaxRetransmissions,
+ snmpEventNotifyIntervalRequested,
+ snmpEventNotifyRetransmissionsRequested,
+ snmpEventNotifyLifetime, snmpEventNotifyStatus }
+ STATUS current
+ ::= { snmpM2MGroups 2 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-MIB.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-MIB.txt
new file mode 100644
index 0000000..303ff9a
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-MIB.txt
@@ -0,0 +1,440 @@
+SNMPv2-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ NOTIFICATION-GROUP, OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TimeStamp, TestAndIncr, DisplayString
+ FROM SNMPv2-TC
+ mib-2, snmpModules, Counter32, TimeTicks, NOTIFICATION-TYPE, OBJECT-TYPE,
+ MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpMIB MODULE-IDENTITY
+ LAST-UPDATED "9511090000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Marshall T. Rose
+
+ Postal: Dover Beach Consulting, Inc.
+ 420 Whisman Court
+ Mountain View, CA 94043-2186
+ US
+
+ Tel: +1 415 968 1052
+
+ E-mail: mrose@dbc.mtview.ca.us"
+ REVISION "9304010000Z"
+ ::= { snmpModules 1 }
+
+snmpMIBObjects ::= { snmpMIB 1 }
+
+system ::= { mib-2 1 }
+
+sysDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 1 }
+
+sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 2 }
+
+sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 3 }
+
+sysContact OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 4 }
+
+sysName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 5 }
+
+sysLocation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 6 }
+
+sysServices OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 7 }
+
+sysORLastChange OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 8 }
+
+sysORTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { system 9 }
+
+sysOREntry OBJECT-TYPE
+ SYNTAX SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { sysORIndex }
+ ::= { sysORTable 1 }
+
+SysOREntry ::=
+ SEQUENCE {
+ sysORIndex
+ INTEGER,
+
+ sysORID
+ OBJECT IDENTIFIER,
+
+ sysORDescr
+ DisplayString,
+
+ sysORUpTime
+ TimeStamp
+ }
+
+sysORIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { sysOREntry 1 }
+
+sysORID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 2 }
+
+sysORDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 3 }
+
+sysORUpTime OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 4 }
+
+snmp ::= { mib-2 11 }
+
+snmpInPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 1 }
+
+snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 3 }
+
+snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 4 }
+
+snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 5 }
+
+snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 6 }
+
+snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmp 30 }
+
+snmpSilentDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 31 }
+
+snmpProxyDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 32 }
+
+snmpTrap ::= { snmpMIBObjects 4 }
+
+snmpTrapOID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 1 }
+
+snmpTrapEnterprise OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 3 }
+
+snmpTraps ::= { snmpMIBObjects 5 }
+
+coldStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 1 }
+
+warmStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 2 }
+
+authenticationFailure NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 5 }
+
+snmpSet ::= { snmpMIBObjects 6 }
+
+snmpSetSerialNo OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmpSet 1 }
+
+snmpMIBConformance ::= { snmpMIB 2 }
+
+snmpMIBCompliances ::= { snmpMIBConformance 1 }
+
+snmpMIBGroups ::= { snmpMIBConformance 2 }
+
+snmpBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS {
+ snmpGroup,
+ snmpSetGroup,
+ systemGroup,
+ snmpBasicNotificationsGroup
+ }
+ GROUP snmpCommunityGroup
+ ::= { snmpMIBCompliances 2 }
+
+snmpGroup OBJECT-GROUP
+ OBJECTS {
+ snmpInPkts,
+ snmpInBadVersions,
+ snmpInASNParseErrs,
+ snmpSilentDrops,
+ snmpProxyDrops,
+ snmpEnableAuthenTraps
+ }
+ STATUS current
+ ::= { snmpMIBGroups 8 }
+
+snmpCommunityGroup OBJECT-GROUP
+ OBJECTS { snmpInBadCommunityNames, snmpInBadCommunityUses }
+ STATUS current
+ ::= { snmpMIBGroups 9 }
+
+snmpSetGroup OBJECT-GROUP
+ OBJECTS { snmpSetSerialNo }
+ STATUS current
+ ::= { snmpMIBGroups 5 }
+
+systemGroup OBJECT-GROUP
+ OBJECTS {
+ sysDescr,
+ sysObjectID,
+ sysUpTime,
+ sysContact,
+ sysName,
+ sysLocation,
+ sysServices,
+ sysORLastChange,
+ sysORID,
+ sysORUpTime,
+ sysORDescr
+ }
+ STATUS current
+ ::= { snmpMIBGroups 6 }
+
+
+snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 2 }
+
+snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 8 }
+
+snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 9 }
+
+snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 10 }
+
+snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 11 }
+
+snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 12 }
+
+snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 13 }
+
+snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 14 }
+
+snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 15 }
+
+snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 16 }
+
+snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 17 }
+
+snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 18 }
+
+snmpInTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 19 }
+
+snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 20 }
+
+snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 21 }
+
+snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 22 }
+
+snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 24 }
+
+snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 25 }
+
+snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 26 }
+
+snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 27 }
+
+snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 28 }
+
+snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 29 }
+
+snmpObsoleteGroup OBJECT-GROUP
+ OBJECTS {
+ snmpOutPkts,
+ snmpInTooBigs,
+ snmpInNoSuchNames,
+ snmpInBadValues,
+ snmpInReadOnlys,
+ snmpInGenErrs,
+ snmpInTotalReqVars,
+ snmpInTotalSetVars,
+ snmpInGetRequests,
+ snmpInGetNexts,
+ snmpInSetRequests,
+ snmpInGetResponses,
+ snmpInTraps,
+ snmpOutTooBigs,
+ snmpOutNoSuchNames,
+ snmpOutBadValues,
+ snmpOutGenErrs,
+ snmpOutGetRequests,
+ snmpOutGetNexts,
+ snmpOutSetRequests,
+ snmpOutGetResponses,
+ snmpOutTraps
+ }
+ STATUS obsolete
+ ::= { snmpMIBGroups 10 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-PARTY-MIB.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-PARTY-MIB.txt
new file mode 100644
index 0000000..89ef486
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-PARTY-MIB.txt
@@ -0,0 +1,586 @@
+SNMPv2-PARTY-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, snmpModules,
+ UInteger32
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, RowStatus, TruthValue
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF;
+
+ partyMIB MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMP Security Working Group"
+ CONTACT-INFO
+ " Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road
+ Mountain View, CA 94043
+ US
+
+ Tel: +1 415 966 7934
+ Fax: +1 415 960 3738
+
+ E-mail: kzm@hls.com"
+ ::= { snmpModules 3 }
+
+
+
+ Party ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+ TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+
+ Clock ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX UInteger32
+
+ Context ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+
+ StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ }
+
+
+
+ partyAdmin OBJECT IDENTIFIER ::= { partyMIB 1 }
+
+
+ partyProtocols OBJECT IDENTIFIER ::= { partyAdmin 1 }
+
+ noAuth OBJECT IDENTIFIER ::= { partyProtocols 1 }
+
+ noPriv OBJECT IDENTIFIER ::= { partyProtocols 2 }
+
+ desPrivProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 3 }
+
+ v2md5AuthProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 4 }
+
+
+ temporalDomains
+ OBJECT IDENTIFIER ::= { partyAdmin 2 }
+
+ currentTime OBJECT IDENTIFIER ::= { temporalDomains 1 }
+
+ restartTime OBJECT IDENTIFIER ::= { temporalDomains 2 }
+
+ cacheTime OBJECT IDENTIFIER ::= { temporalDomains 3 }
+
+
+
+
+ initialPartyId OBJECT IDENTIFIER ::= { partyAdmin 3 }
+
+ initialContextId
+ OBJECT IDENTIFIER ::= { partyAdmin 4 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ partyMIBObjects
+ OBJECT IDENTIFIER ::= { partyMIB 2 }
+
+
+ snmpParties OBJECT IDENTIFIER ::= { partyMIBObjects 1 }
+
+ partyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpParties 1 }
+
+ partyEntry OBJECT-TYPE
+ SYNTAX PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED partyIdentity }
+ ::= { partyTable 1 }
+
+
+ PartyEntry ::=
+ SEQUENCE {
+ partyIdentity Party,
+ partyIndex INTEGER,
+ partyTDomain OBJECT IDENTIFIER,
+ partyTAddress TAddress,
+ partyMaxMessageSize INTEGER,
+ partyLocal TruthValue,
+ partyAuthProtocol OBJECT IDENTIFIER,
+ partyAuthClock Clock,
+ partyAuthPrivate OCTET STRING,
+ partyAuthPublic OCTET STRING,
+ partyAuthLifetime INTEGER,
+ partyPrivProtocol OBJECT IDENTIFIER,
+ partyPrivPrivate OCTET STRING,
+ partyPrivPublic OCTET STRING,
+ partyCloneFrom Party,
+ partyStorageType StorageType,
+ partyStatus RowStatus
+ }
+
+ partyIdentity OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { partyEntry 1 }
+
+ partyIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { partyEntry 2 }
+
+
+ partyTDomain OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { snmpUDPDomain }
+ ::= { partyEntry 3 }
+
+ partyTAddress OBJECT-TYPE
+ SYNTAX TAddress
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { '000000000000'H }
+ ::= { partyEntry 4 }
+
+ partyMaxMessageSize OBJECT-TYPE
+ SYNTAX INTEGER (484..65507)
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 484 }
+ ::= { partyEntry 5 }
+
+
+ partyLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { false }
+ ::= { partyEntry 6 }
+
+ partyAuthProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { v2md5AuthProtocol }
+ ::= { partyEntry 7 }
+
+
+ partyAuthClock OBJECT-TYPE
+ SYNTAX Clock
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 0 }
+ ::= { partyEntry 8 }
+
+
+ partyAuthPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 9 }
+
+
+ partyAuthPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 10 }
+
+
+ partyAuthLifetime OBJECT-TYPE
+ SYNTAX INTEGER (0..2147483647)
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 300 }
+ ::= { partyEntry 11 }
+
+ partyPrivProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { noPriv }
+ ::= { partyEntry 12 }
+
+
+ partyPrivPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 13 }
+
+
+ partyPrivPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 14 }
+
+
+ partyCloneFrom OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 15 }
+
+
+ partyStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { partyEntry 16 }
+
+ partyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 17 }
+
+
+
+ snmpContexts OBJECT IDENTIFIER ::= { partyMIBObjects 2 }
+
+ contextTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpContexts 1 }
+
+ contextEntry OBJECT-TYPE
+ SYNTAX ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED contextIdentity }
+ ::= { contextTable 1 }
+
+ ContextEntry ::=
+ SEQUENCE {
+ contextIdentity Context,
+ contextIndex INTEGER,
+ contextLocal TruthValue,
+ contextViewIndex INTEGER,
+ contextLocalEntity OCTET STRING,
+ contextLocalTime OBJECT IDENTIFIER,
+ contextProxyDstParty Party,
+ contextProxySrcParty Party,
+ contextProxyContext OBJECT IDENTIFIER,
+ contextStorageType StorageType,
+ contextStatus RowStatus
+ }
+
+
+ contextIdentity OBJECT-TYPE
+ SYNTAX Context
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { contextEntry 1 }
+
+ contextIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { contextEntry 2 }
+
+ contextLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { true }
+ ::= { contextEntry 3 }
+
+
+ contextViewIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 4 }
+
+
+ contextLocalEntity OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 5 }
+
+ contextLocalTime OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { currentTime }
+ ::= { contextEntry 6 }
+
+
+ contextProxyDstParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 7 }
+
+ contextProxySrcParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 8 }
+
+
+ contextProxyContext OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 9 }
+
+ contextStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { contextEntry 10 }
+
+
+ contextStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 11 }
+
+
+
+ snmpAccess OBJECT IDENTIFIER ::= { partyMIBObjects 3 }
+
+ aclTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAccess 1 }
+
+ aclEntry OBJECT-TYPE
+ SYNTAX AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { aclTarget, aclSubject, aclResources }
+ ::= { aclTable 1 }
+
+ AclEntry ::=
+ SEQUENCE {
+ aclTarget INTEGER,
+ aclSubject INTEGER,
+ aclResources INTEGER,
+ aclPrivileges INTEGER,
+ aclStorageType StorageType,
+ aclStatus RowStatus
+ }
+
+
+ aclTarget OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 1 }
+
+ aclSubject OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 2 }
+
+ aclResources OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 3 }
+
+
+ aclPrivileges OBJECT-TYPE
+ SYNTAX INTEGER (0..255)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 4 }
+
+ aclStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { aclEntry 5 }
+
+
+ aclStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 6 }
+
+
+
+ snmpViews OBJECT IDENTIFIER ::= { partyMIBObjects 4 }
+
+ viewTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpViews 1 }
+
+ viewEntry OBJECT-TYPE
+ SYNTAX ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { viewIndex, IMPLIED viewSubtree }
+ ::= { viewTable 1 }
+
+ ViewEntry ::=
+ SEQUENCE {
+ viewIndex INTEGER,
+ viewSubtree OBJECT IDENTIFIER,
+ viewMask OCTET STRING,
+ viewType INTEGER,
+ viewStorageType StorageType,
+ viewStatus RowStatus
+ }
+
+
+ viewIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 1 }
+
+ viewSubtree OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 2 }
+
+ viewMask OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..16))
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { ''H }
+ ::= { viewEntry 3 }
+
+
+ viewType OBJECT-TYPE
+ SYNTAX INTEGER {
+ included(1),
+ excluded(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { included }
+ ::= { viewEntry 4 }
+
+ viewStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { viewEntry 5 }
+
+ viewStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { viewEntry 6 }
+
+
+
+ partyMIBConformance
+ OBJECT IDENTIFIER ::= { partyMIB 3 }
+
+ partyMIBCompliances
+ OBJECT IDENTIFIER ::= { partyMIBConformance 1 }
+ partyMIBGroups
+ OBJECT IDENTIFIER ::= { partyMIBConformance 2 }
+
+
+ unSecurableCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 1 }
+
+ partyNoPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 2 }
+
+
+ partyPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 3 }
+
+
+ fullPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 4 }
+
+
+ partyMIBGroup OBJECT-GROUP
+ OBJECTS { partyIndex, partyTDomain, partyTAddress,
+ partyMaxMessageSize, partyLocal,
+ partyAuthProtocol, partyAuthClock,
+ partyAuthPrivate, partyAuthPublic,
+ partyAuthLifetime, partyPrivProtocol,
+ partyPrivPrivate, partyPrivPublic,
+ partyStorageType, partyStatus,
+ partyCloneFrom,
+ contextIndex, contextLocal,
+ contextViewIndex, contextLocalEntity,
+ contextLocalTime, contextStorageType,
+ contextStatus, aclTarget, aclSubject,
+ aclPrivileges, aclStorageType, aclStatus,
+ viewMask, viewType, viewStorageType, viewStatus }
+ STATUS current
+ ::= { partyMIBGroups 1 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-SMI.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-SMI.txt
new file mode 100644
index 0000000..58ca3c3
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-SMI.txt
@@ -0,0 +1,54 @@
+SNMPv2-SMI DEFINITIONS ::= BEGIN
+
+org ::= { iso 3 }
+
+dod ::= { org 6 }
+
+internet ::= { dod 1 }
+
+directory ::= { internet 1 }
+
+mgmt ::= { internet 2 }
+
+mib-2 ::= { mgmt 1 }
+
+transmission ::= { mib-2 10 }
+
+experimental ::= { internet 3 }
+
+private ::= { internet 4 }
+
+enterprises ::= { private 1 }
+
+security ::= { internet 5 }
+
+snmpV2 ::= { internet 6 }
+
+snmpDomains ::= { snmpV2 1 }
+
+snmpProxys ::= { snmpV2 2 }
+
+snmpModules ::= { snmpV2 3 }
+
+ObjectName ::=
+ OBJECT IDENTIFIER
+
+NotificationName ::=
+ OBJECT IDENTIFIER
+
+
+
+
+
+
+
+
+
+
+
+
+zeroDotZero OBJECT-IDENTITY
+ STATUS current
+ ::= { 0 0 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-TC.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-TC.txt
new file mode 100644
index 0000000..b95d086
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-TC.txt
@@ -0,0 +1,90 @@
+SNMPv2-TC DEFINITIONS ::= BEGIN
+
+IMPORTS
+ FROM SNMPv2-SMI;
+
+DisplayString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+PhysAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+MacAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+TruthValue ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ true(1),
+ false(2)
+ }
+
+TestAndIncr ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+AutonomousType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+InstancePointer ::= TEXTUAL-CONVENTION
+ STATUS obsolete
+ SYNTAX OBJECT IDENTIFIER
+
+VariablePointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowPointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowStatus ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ active(1),
+ notInService(2),
+ notReady(3),
+ createAndGo(4),
+ createAndWait(5),
+ destroy(6)
+ }
+
+TimeStamp ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX TimeTicks
+
+TimeInterval ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+DateAndTime ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3),
+ permanent(4),
+ readOnly(5)
+ }
+
+TDomain ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/SNMPv2-TM.txt b/release/picobsd/isp/crunch1/mibs/SNMPv2-TM.txt
new file mode 100644
index 0000000..afd7d9f
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/SNMPv2-TM.txt
@@ -0,0 +1,54 @@
+SNMPv2-TM DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ snmpProxys, snmpDomains, OBJECT-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpUDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 1 }
+
+SnmpUDPAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1d.1d.1d.1d/2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpCLNSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 2 }
+
+snmpCONSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 3 }
+
+SnmpOSIAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "*1x:/1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpDDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 4 }
+
+SnmpNBPAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpIPXDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 5 }
+
+SnmpIPXAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "4x.1x:1x:1x:1x:1x:1x.2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+rfc1157Proxy ::= { snmpProxys 1 }
+
+rfc1157Domain OBJECT-IDENTITY
+ STATUS current
+ ::= { rfc1157Proxy 1 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/TCP-MIB.txt b/release/picobsd/isp/crunch1/mibs/TCP-MIB.txt
new file mode 100644
index 0000000..b6b96c8
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/TCP-MIB.txt
@@ -0,0 +1,234 @@
+TCP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, Gauge32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+tcpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 49 }
+
+tcp ::= { mib-2 6 }
+
+tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ constant(2),
+ rsre(3),
+ vanj(4)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 1 }
+
+tcpRtoMin OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 2 }
+
+tcpRtoMax OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 3 }
+
+tcpMaxConn OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 4 }
+
+tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 5 }
+
+tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 6 }
+
+tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 7 }
+
+tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 8 }
+
+tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 9 }
+
+tcpInSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 10 }
+
+tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 11 }
+
+tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 12 }
+
+tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { tcp 13 }
+
+tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX {
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort
+ }
+ ::= { tcpConnTable 1 }
+
+TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+
+ tcpConnLocalAddress
+ IpAddress,
+
+ tcpConnLocalPort
+ INTEGER,
+
+ tcpConnRemAddress
+ IpAddress,
+
+ tcpConnRemPort
+ INTEGER
+ }
+
+tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { tcpConnEntry 1 }
+
+tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 2 }
+
+tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 3 }
+
+tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 4 }
+
+tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 5 }
+
+tcpInErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 14 }
+
+tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 15 }
+
+tcpMIBConformance ::= { tcpMIB 2 }
+
+tcpMIBCompliances ::= { tcpMIBConformance 1 }
+
+tcpMIBGroups ::= { tcpMIBConformance 2 }
+
+tcpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { tcpGroup }
+ ::= { tcpMIBCompliances 1 }
+
+tcpGroup OBJECT-GROUP
+ OBJECTS {
+ tcpRtoAlgorithm,
+ tcpRtoMin,
+ tcpRtoMax,
+ tcpMaxConn,
+ tcpActiveOpens,
+ tcpPassiveOpens,
+ tcpAttemptFails,
+ tcpEstabResets,
+ tcpCurrEstab,
+ tcpInSegs,
+ tcpOutSegs,
+ tcpRetransSegs,
+ tcpConnState,
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort,
+ tcpInErrs,
+ tcpOutRsts
+ }
+ STATUS current
+ ::= { tcpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/isp/crunch1/mibs/UCD-SNMP-MIB.txt b/release/picobsd/isp/crunch1/mibs/UCD-SNMP-MIB.txt
new file mode 100644
index 0000000..29277a6
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/UCD-SNMP-MIB.txt
@@ -0,0 +1,519 @@
+UCD-SNMP-MIB DEFINITIONS ::= BEGIN
+
+
+IMPORTS
+ enterprises, OBJECT-TYPE
+ FROM SNMPv2-SMI
+ DisplayString
+ FROM SNMPv2-TC;
+
+ucdavis OBJECT IDENTIFIER ::= { enterprises 2021 }
+
+
+ucdSnmpAgent OBJECT IDENTIFIER ::= { ucdavis 250 }
+hpux9 OBJECT IDENTIFIER ::= { ucdSnmpAgent 1 }
+hpux10 OBJECT IDENTIFIER ::= { ucdSnmpAgent 6 }
+sunos4 OBJECT IDENTIFIER ::= { ucdSnmpAgent 2 }
+solaris OBJECT IDENTIFIER ::= { ucdSnmpAgent 3 }
+osf OBJECT IDENTIFIER ::= { ucdSnmpAgent 4 }
+ultrix OBJECT IDENTIFIER ::= { ucdSnmpAgent 5 }
+netbsd1 OBJECT IDENTIFIER ::= { ucdSnmpAgent 7 }
+freebsd2 OBJECT IDENTIFIER ::= { ucdSnmpAgent 8 }
+irix OBJECT IDENTIFIER ::= { ucdSnmpAgent 9 }
+unknown OBJECT IDENTIFIER ::= { ucdSnmpAgent 255 }
+
+
+processes OBJECT-TYPE
+ SYNTAX Processes
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { processIndex }
+ ::= { ucdavis 1 }
+
+
+Processes ::= SEQUENCE {
+ processIndex INTEGER,
+ processNames DisplayString,
+ processMin INTEGER,
+ processMax INTEGER,
+ processCount INTEGER,
+ processErrorFlag INTEGER,
+ processErrMessage DisplayString,
+ processErrFix INTEGER
+}
+
+processIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 1 }
+
+processNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 2 }
+
+processMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 3 }
+
+processMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 4 }
+
+processCount OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 5 }
+
+processErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 100 }
+
+processErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 101 }
+
+processErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { processes 102 }
+
+extensible OBJECT-TYPE
+ SYNTAX Extensible
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { extensibleIndex }
+ ::= { ucdavis 3 }
+
+Extensible ::= SEQUENCE {
+ extensibleIndex INTEGER,
+ extensibleNames DisplayString,
+ extensibleCommand DisplayString,
+ extensibleResult INTEGER,
+ extensibleOutput DisplayString,
+ extensibleErrFix INTEGER
+}
+
+extensibleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 1 }
+
+extensibleNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 2 }
+
+extensibleCommand OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 3 }
+
+extensibleResult OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 100 }
+
+extensibleOutput OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 101 }
+
+extensibleErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { extensible 102 }
+
+memory OBJECT-TYPE
+ SYNTAX Memory
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ucdavis 4 }
+
+Memory ::= SEQUENCE {
+ memIndex INTEGER,
+ memErrorName DisplayString,
+ memTotalSwap INTEGER,
+ memAvailSwap INTEGER,
+ memTotalReal INTEGER,
+ memAvailReal INTEGER,
+ memTotalSwapTXT INTEGER,
+ memAvailSwapTXT INTEGER,
+ memTotalRealTXT INTEGER,
+ memAvailRealTXT INTEGER,
+ memTotalFree INTEGER,
+ memMinimumSwap INTEGER,
+ memSwapError DisplayString
+}
+memIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 1 }
+
+memErrorName OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 2 }
+
+memTotalSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 3 }
+
+memAvailSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 4 }
+
+memTotalReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 5 }
+
+memAvailReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 6 }
+
+memTotalSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 7 }
+
+memAvailSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 8 }
+
+memTotalRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 9 }
+
+memAvailRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 10 }
+
+memTotalFree OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 11 }
+
+memMinimumSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 12 }
+
+memSwapError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 100 }
+
+memSwapErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 101 }
+
+lockd OBJECT-TYPE
+ SYNTAX Lockd
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { lockdIndex }
+ ::= { ucdavis 5 }
+
+Lockd ::= SEQUENCE {
+ lockdIndex INTEGER,
+ lockdError INTEGER,
+ lockdErrorMsg DisplayString
+}
+
+lockdIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 1 }
+
+lockdError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 100 }
+
+lockdErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 101 }
+
+disk OBJECT-TYPE
+ SYNTAX Disk
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { diskIndex }
+ ::= { ucdavis 6 }
+
+Disk ::= SEQUENCE {
+ diskIndex INTEGER,
+ diskPath DisplayString,
+ diskDevice DisplayString,
+ diskMinimum INTEGER,
+ diskTotal INTEGER,
+ diskAvail INTEGER,
+ diskUsed INTEGER,
+ diskPercent INTEGER,
+ diskErrorFlag INTEGER,
+ diskErrorMsg DisplayString
+}
+
+diskIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 1 }
+
+diskPath OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 2 }
+
+diskDevice OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 3 }
+
+diskMinimum OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 4 }
+
+diskTotal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 5 }
+
+diskAvail OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 6 }
+
+diskUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 7 }
+
+diskPercent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 8 }
+
+diskErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 100 }
+
+diskErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 101 }
+
+loadaves OBJECT-TYPE
+ SYNTAX Loadaves
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { loadaveIndex }
+ ::= { ucdavis 7 }
+
+
+Loadaves ::= SEQUENCE {
+ loadaveIndex INTEGER,
+ loadaveNames DisplayString,
+ loadaveLoad DisplayString,
+ loadaveConfig DisplayString,
+ loadaveErrorFlag INTEGER,
+ loadaveErrMessage DisplayString
+}
+
+loadaveIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 1 }
+
+loadaveNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 2 }
+
+loadaveLoad OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 3 }
+
+loadaveConfig OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 4 }
+
+loadaveErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 100 }
+
+loadaveErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 101 }
+
+version OBJECT-TYPE
+ SYNTAX Version
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { versionIndex }
+ ::= { ucdavis 100 }
+
+Version ::= SEQUENCE {
+ versionIndex INTEGER,
+ versionTag DisplayString,
+ versionDate DisplayString,
+ versionCDate DisplayString,
+ versionIdent DisplayString,
+ versionClearCache INTEGER,
+ versionUpdateConfig INTEGER
+}
+
+versionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 1 }
+
+versionTag OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 2 }
+
+versionDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 3 }
+
+versionCDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 4 }
+
+versionIdent OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 5 }
+
+versionClearCache OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 10 }
+
+versionUpdateConfig OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 11 }
+
+versionRestartAgent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 12 }
+
+snmperrs OBJECT-TYPE
+ SYNTAX Snmperrs
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { snmperrIndex }
+ ::= { ucdavis 101 }
+
+
+Snmperrs ::= SEQUENCE {
+ snmperrIndex INTEGER,
+ snmperrNames DisplayString,
+ snmperrErrorFlag INTEGER,
+ snmperrErrMessage DisplayString
+}
+
+snmperrIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 1 }
+
+snmperrNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 2 }
+
+snmperrErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 100 }
+
+snmperrErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 101 }
+
+END
+
diff --git a/release/picobsd/isp/crunch1/mibs/UDP-MIB.txt b/release/picobsd/isp/crunch1/mibs/UDP-MIB.txt
new file mode 100644
index 0000000..a6288e8
--- /dev/null
+++ b/release/picobsd/isp/crunch1/mibs/UDP-MIB.txt
@@ -0,0 +1,109 @@
+UDP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+udpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 50 }
+
+udp ::= { mib-2 7 }
+
+udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 1 }
+
+udpNoPorts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 2 }
+
+udpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 3 }
+
+udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 4 }
+
+udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { udp 5 }
+
+udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+
+ udpLocalPort
+ INTEGER
+ }
+
+udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 1 }
+
+udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 2 }
+
+udpMIBConformance ::= { udpMIB 2 }
+
+udpMIBCompliances ::= { udpMIBConformance 1 }
+
+udpMIBGroups ::= { udpMIBConformance 2 }
+
+udpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { udpGroup }
+ ::= { udpMIBCompliances 1 }
+
+udpGroup OBJECT-GROUP
+ OBJECTS {
+ udpInDatagrams,
+ udpNoPorts,
+ udpInErrors,
+ udpOutDatagrams,
+ udpLocalAddress,
+ udpLocalPort
+ }
+ STATUS current
+ ::= { udpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/isp/crunch1/passwd.diff b/release/picobsd/isp/crunch1/passwd.diff
new file mode 100644
index 0000000..1be0059
--- /dev/null
+++ b/release/picobsd/isp/crunch1/passwd.diff
@@ -0,0 +1,48 @@
+*** Makefile.orig Sat Aug 1 20:39:04 1998
+--- Makefile Sat Aug 1 20:40:38 1998
+***************
+*** 2,24 ****
+ # $Id: passwd.diff,v 1.1 1998/08/19 06:31:06 abial Exp $
+
+ PROG= passwd
+! SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c pw_yp.c \
+! yp_passwd.c ypxfr_misc.c ${GENSRCS}
+ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
+ yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
+ CFLAGS+=-Wall
+
+! DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
+! LDADD= -lcrypt -lrpcsvc -lutil
+ .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/vipw \
+! ${.CURDIR}/../rlogin ${.CURDIR}/../../libexec/ypxfr \
+! ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
+
+! CFLAGS+= -DLOGIN_CAP -DCRYPT -DYP -I. -I${.CURDIR} \
+ -I${.CURDIR}/../../usr.sbin/vipw \
+ -I${.CURDIR}/../../usr.bin/chpass \
+- -I${.CURDIR}/../../libexec/ypxfr \
+- -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd \
+ -Dyp_error=warnx -DLOGGING
+
+ CLEANFILES= ${GENSRCS}
+--- 2,21 ----
+ # $Id: passwd.diff,v 1.1 1998/08/19 06:31:06 abial Exp $
+
+ PROG= passwd
+! SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c
+!
+ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
+ yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
+ CFLAGS+=-Wall
+
+! DPADD= ${LIBCRYPT} ${LIBUTIL}
+! LDADD= -lcrypt -lutil
+ .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/vipw \
+! ${.CURDIR}/../rlogin
+
+! CFLAGS+= -DLOGIN_CAP -DCRYPT -I. -I${.CURDIR} \
+ -I${.CURDIR}/../../usr.sbin/vipw \
+ -I${.CURDIR}/../../usr.bin/chpass \
+ -Dyp_error=warnx -DLOGGING
+
+ CLEANFILES= ${GENSRCS}
diff --git a/release/picobsd/isp/crunch1/ppp.diff b/release/picobsd/isp/crunch1/ppp.diff
new file mode 100644
index 0000000..238a1c2
--- /dev/null
+++ b/release/picobsd/isp/crunch1/ppp.diff
@@ -0,0 +1,12 @@
+*** Makefile.orig Sat Jul 4 10:20:02 1998
+--- Makefile Sat Aug 1 20:43:49 1998
+***************
+*** 12,17 ****
+--- 12,18 ----
+ BINMODE=4554
+ BINOWN= root
+ BINGRP= network
++ NOSECURE=yes
+
+ OPSYS!= uname -s
+ .if (${OPSYS} == "OpenBSD")
diff --git a/release/picobsd/isp/floppy.tree/boot.config b/release/picobsd/isp/floppy.tree/boot.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/boot.config
diff --git a/release/picobsd/isp/floppy.tree/etc/disktab b/release/picobsd/isp/floppy.tree/etc/disktab
new file mode 100644
index 0000000..7575ba6
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/disktab
@@ -0,0 +1,87 @@
+#
+# Floppy formats:
+#
+# To make a filesystem on a floppy:
+# fdformat [-f <size>] fd<drive>[.<size>]
+# disklabel -B -r -w fd<drive>[.<size>] fd<size>
+# newfs <opts> fd<drive>[.<size>]
+#
+# with <opts>:
+# -t 2 - two heads
+# -u 9|15|18 - sectors per track
+# (using the default value of 1/4096 is not much useful for floppies)
+# -l 1 - interleave 1 (for most floppies)
+# -i 65536 - bytes of data per i-node
+# (the default -i value will render you with a floppy wasting way
+# too much space in i-node areas)
+#
+
+fd360:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\
+ :pa#720:oa#0:ba#4096:fa#512:\
+ :pb#720:ob#0:bb#4096:fb#512:\
+ :pc#720:oc#0:bc#4096:fc#512:
+
+fd720:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\
+ :pa#1440:oa#0:ba#4096:fa#512:\
+ :pb#1440:ob#0:bb#4096:fb#512:\
+ :pc#1440:oc#0:bc#4096:fc#512:
+
+fd1200|floppy5|5in|5.25in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\
+ :pa#2400:oa#0:ba#4096:fa#512:\
+ :pb#2400:ob#0:bb#4096:fb#512:\
+ :pc#2400:oc#0:bc#4096:fc#512:
+
+fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pb#2880:ob#0:bb#4096:fb#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+fd1024|floppy0|3.5in Special Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#16:nc#64:\
+ :pa#2048:oa#0:ba#4096:fa#512:\
+ :pb#2048:ob#0:bb#4096:fb#512:\
+ :pc#2048:oc#0:bc#4096:fc#512:
+
+# a == root
+# b == swap
+# c == d == whole disk
+# e == /var
+# f == scratch
+# h == /usr
+
+cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\
+ :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \
+ :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \
+ :pb#24288:ob#15840:tb=swap: \
+ :pc#202224:oc#0: \
+ :pd#202224:od#0: \
+ :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \
+ :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \
+ :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512:
+
+sony650|Sony 650 MB MOD|\
+ :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\
+ :pc#576600:oc#0:\
+ :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024:
+
+mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\
+ :ty=removeable:dt=SCSI:rm#3600:\
+ :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\
+ :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\
+ :pc#444384:oc#0:
+
+minimum:ty=mfs:se#512:nt#1:rm#300:\
+ :ns#2880:nc#1:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+zip100|zip 100:\
+ :ty=removable:se#512:nc#96:nt#64:ns#32:\
+ :pa#196608:oa#0:ba#4096:fa#512:\
+ :pb#196608:ob#0:bb#4096:fb#512:\
+ :pc#196608:oc#0:bc#4096:fc#512:
+
diff --git a/release/picobsd/isp/floppy.tree/etc/fstab b/release/picobsd/isp/floppy.tree/etc/fstab
new file mode 100644
index 0000000..ca519e8
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/fstab
@@ -0,0 +1,4 @@
+proc /proc procfs rw 0 0
+#/dev/fd0c /start_floppy ufs rw 1 1
+#/dev/wd0s1 /dos msdos rw 0 0
+#/dev/wcd0c /cdrom cd9660 ro,noauto 0 0
diff --git a/release/picobsd/isp/floppy.tree/etc/gettytab b/release/picobsd/isp/floppy.tree/etc/gettytab
new file mode 100644
index 0000000..90562ac
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/gettytab
@@ -0,0 +1,40 @@
+# from: @(#)gettytab 5.14 (Berkeley) 3/27/91
+#
+default:\
+ :cb:ce:ck:lc:fd#1000:cl:im=\r\nPicoBSD (%h) (%t)\r\n\r\n:sp#1200:
+
+P|Pc|Pc console:\
+ :ht:np:sp#115200:
+
+#
+# Fixed speed entries
+2|std.9600|9600-baud:\
+ :np:sp#9600:
+g|std.19200|19200-baud:\
+ :np:sp#19200:
+std.38400|38400-baud:\
+ :np:sp#38400:
+std.57600|57600-baud:\
+ :np:sp#57600:
+std.115200|115200-baud:\
+ :np:sp#115200:
+
+#
+# Entry specifying explicit device settings. See termios(4) and
+# /usr/include/termios.h, too. The entry forces the tty into
+# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control.
+#
+# cflags: CLOCAL | HUPCL | CREAD | CS8
+# oflags: OPOST | ONLCR | OXTABS
+# iflags: IXOFF | IXON | ICRNL | IGNPAR
+# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE
+#
+# The `0' flags don't have input enabled. The `1' flags don't echo.
+# (Echoing is done inside getty itself.)
+#
+local.9600|CLOCAL tty @ 9600 Bd:\
+ :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\
+ :o0#0x00000007:o1#0x00000002:o2#0x00000007:\
+ :i0#0x00000704:i1#0x00000000:i2#0x00000704:\
+ :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\
+ :sp#9600:
diff --git a/release/picobsd/isp/floppy.tree/etc/group b/release/picobsd/isp/floppy.tree/etc/group
new file mode 100644
index 0000000..abbd733
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/group
@@ -0,0 +1,19 @@
+wheel:*:0:root,user
+daemon:*:1:daemon
+kmem:*:2:root
+sys:*:3:root
+tty:*:4:root
+operator:*:5:root
+mail:*:6:
+bin:*:7:
+news:*:8:
+man:*:9:
+games:*:13:
+staff:*:20:root,user
+guest:*:31:root
+uucp:*:66:
+xten:*:67:xten
+dialer:*:68:
+network:*:69:
+nogroup:*:65533:
+nobody:*:65534:
diff --git a/release/picobsd/isp/floppy.tree/etc/host.conf b/release/picobsd/isp/floppy.tree/etc/host.conf
new file mode 100644
index 0000000..00fe5a2
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/host.conf
@@ -0,0 +1,3 @@
+# $Id: host.conf,v 1.1.1.1 1998/07/14 07:30:45 abial Exp $
+hosts
+bind
diff --git a/release/picobsd/isp/floppy.tree/etc/hosts b/release/picobsd/isp/floppy.tree/etc/hosts
new file mode 100644
index 0000000..994af78
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/hosts
@@ -0,0 +1,5 @@
+# $Id: hosts,v 1.5 1998/08/19 07:06:27 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/isp/floppy.tree/etc/inetd.conf b/release/picobsd/isp/floppy.tree/etc/inetd.conf
new file mode 100644
index 0000000..c7c50de
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/inetd.conf
@@ -0,0 +1,21 @@
+#
+# Internet server configuration database
+#
+# @(#)inetd.conf 5.4 (Berkeley) 6/30/90
+#
+telnet stream tcp nowait root /usr/libexec/telnetd telnetd
+#
+# "Small servers" -- used to be standard on, but we're more conservative
+# about things due to Internet security concerns. Only turn on what you
+# need.
+#
+#daytime stream tcp nowait root internal
+#daytime dgram udp wait root internal
+#time stream tcp nowait root internal
+#time dgram udp wait root internal
+#echo stream tcp nowait root internal
+#echo dgram udp wait root internal
+#discard stream tcp nowait root internal
+#discard dgram udp wait root internal
+#chargen stream tcp nowait root internal
+#chargen dgram udp wait root internal
diff --git a/release/picobsd/isp/floppy.tree/etc/login.conf b/release/picobsd/isp/floppy.tree/etc/login.conf
new file mode 100644
index 0000000..3bfdd8a
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/login.conf
@@ -0,0 +1,120 @@
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+#
+# $Id: login.conf,v 1.1.1.1 1998/07/14 07:30:45 abial Exp $
+#
+
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=passwd:
+
+auth-root-defaults:\
+ :auth-login=passwd:\
+ :auth-rlogin=passwd:\
+
+auth-ftp-defaults:\
+ :auth=passwd:
+
+# Example defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+
+#
+# standard - standard user defaults
+#
+standard:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,EDITOR=/usr/bin/ee:\
+ :path=~/bin /bin /usr/bin:\
+ :nologin=/etc/nologin:\
+ :cputime=1h30m:\
+ :datasize=8M:\
+ :stacksize=2M:\
+ :memorylocked=4M:\
+ :memoryuse=8M:\
+ :filesize=8M:\
+ :coredumpsize=8M:\
+ :openfiles=24:\
+ :maxproc=32:\
+ :priority=0:\
+ :requirehome:\
+ :passwordperiod=90d:\
+ :umask=002:\
+ :ignoretime@:\
+ :tc=default:
+#
+# Staff users - few restrictions and allow login anytime
+#
+staff:\
+ :ignorenologin:\
+ :ignoretime:\
+ :requirehome@:\
+ :accounted@:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :umask=022:\
+ :tc=standard:
+
+
+#
+# root - fallback for root logins
+#
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:\
+#
+# Settings used by /etc/rc
+#
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
+#
+# Polish Users Accounts. Setup proper environment variables.
+#
+polish:Polish Users Accounts:\
+ :lang=pl_pl.ISO-8859-2:\
+ :tc=default:
diff --git a/release/picobsd/isp/floppy.tree/etc/master.passwd b/release/picobsd/isp/floppy.tree/etc/master.passwd
new file mode 100644
index 0000000..9d85cdf
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/master.passwd
@@ -0,0 +1,7 @@
+root:$1$xOOaGnKU$U9QdsCI40XXcCUMBN.7Az.:0:0::0:0:Charlie &:/root:/bin/sh
+toor:*:0:0::0:0:Bourne-again Superuser:/root:
+daemon:*:1:1::0:0:Owner of many system processes:/root:/nonexistent
+operator:*:2:20::0:0:System &:/usr/guest/operator:/bin/csh
+bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/nonexistent
+nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/nonexistent
+user:$1$T9q8Coad$WatJttamwr2UAdbfKbWxj.:1002:1002:polish:0:0:user:/home/user:/bin/sh
diff --git a/release/picobsd/isp/floppy.tree/etc/motd b/release/picobsd/isp/floppy.tree/etc/motd
new file mode 100644
index 0000000..38474d1
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/motd
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (ISP-alpha) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/isp/floppy.tree/etc/ppp/ppp.conf b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.conf
new file mode 100644
index 0000000..ed5da5d
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.conf
@@ -0,0 +1,8 @@
+# PPP Sample Configuration File
+# Written by Toshiharu OHNO
+default:
+ set device /dev/cuaa1
+ set speed 38400
+ disable lqr
+ deny lqr
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
diff --git a/release/picobsd/isp/floppy.tree/etc/ppp/ppp.deny b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.deny
new file mode 100644
index 0000000..51e1e9b
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.deny
@@ -0,0 +1,15 @@
+# list of users disallowed any pppd access via 'system
+# password login'.
+# read by pppd(8).
+root
+toor
+daemon
+operator
+bin
+games
+news
+man
+ftp
+uucp
+xten
+ingres
diff --git a/release/picobsd/isp/floppy.tree/etc/ppp/ppp.linkup b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.linkup
new file mode 100644
index 0000000..05107c6
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.linkup
@@ -0,0 +1,10 @@
+# Example of ppp.linkup file
+#
+iij-demand:
+ delete ALL
+ add 0 0 HISADDR
+#
+# Otherwise, simply add peer as default gateway.
+#
+MYADDR:
+ add 0 0 HISADDR
diff --git a/release/picobsd/isp/floppy.tree/etc/ppp/ppp.secret.sample b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.secret.sample
new file mode 100644
index 0000000..25d97d0
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/ppp/ppp.secret.sample
@@ -0,0 +1,23 @@
+##################################################
+#
+# Example of ppp.secret file
+#
+# This file is used to authenticate incoming connections.
+# You must ``enable'' either PAP or CHAP in your ppp.conf file.
+# The peer may then use any of the Authname/Authkey pairs listed.
+# If an IP address is given, it will be assigned to the peer.
+#
+# If an entry exists for your local machine (as given by the
+# ``hostname -s'' command), the password specified will be
+# required for all server socket connections. Refer to the ppp(8)
+# and pppctl(8) man pages for further details.
+#
+# $Id: ppp.secret.sample,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+#
+##################################################
+
+# Authname Authkey Peer's IP address
+
+oscar OurSecretKey 192.244.184.34/24
+BigBird X4dWg9327 192.244.184.33/32
+tama localPasswdForControl
diff --git a/release/picobsd/isp/floppy.tree/etc/profile b/release/picobsd/isp/floppy.tree/etc/profile
new file mode 100644
index 0000000..babb9333
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/profile
@@ -0,0 +1,3 @@
+# System-wide .profile file for sh(1).
+BLOCKSIZE=K; export BLOCKSIZE
+PATH=/stand:.; export PATH
diff --git a/release/picobsd/isp/floppy.tree/etc/protocols b/release/picobsd/isp/floppy.tree/etc/protocols
new file mode 100644
index 0000000..c80be39
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/protocols
@@ -0,0 +1,7 @@
+#
+# Internet (IP) protocols
+ip 0 IP # internet protocol, pseudo protocol number
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+tcp 6 TCP # transmission control protocol
+udp 17 UDP # user datagram protocol
diff --git a/release/picobsd/isp/floppy.tree/etc/rc b/release/picobsd/isp/floppy.tree/etc/rc
new file mode 100644
index 0000000..f2b7ad1
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/rc
@@ -0,0 +1,62 @@
+#!/bin/sh
+# $Id: rc,v 1.5 1998/08/19 07:06:27 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Dodaje $swapfile jako dodatkowy swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+# clean up left-over files
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Uruchamiam inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Uruchamiam snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "UWAGA: brak swapu!"
+ echo "Nie uruchamiaj zbyt wielu programow na raz..."
+fi
+echo ''
+echo ''
+echo '+------------ PicoBSD 0.4 (ISP) ---------------+'
+echo '| |'
+echo '| Zaloguj sie jako "root" (haslo "setup"). |'
+echo '| |'
+echo '| Ta wersja PicoBSD w pelni podlega |'
+echo '| licencji BSD. Po wiecej szczegolow zajrzyj |'
+echo '| na http://www.freebsd.org/~picobsd, lub |'
+echo '| skontaktuj sie z autorem. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/isp/floppy.tree/etc/rc.conf b/release/picobsd/isp/floppy.tree/etc/rc.conf
new file mode 100644
index 0000000..515bf61
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/rc.conf
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf,v 1.5 1998/08/19 07:06:27 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/isp/floppy.tree/etc/rc.firewall b/release/picobsd/isp/floppy.tree/etc/rc.firewall
new file mode 100644
index 0000000..4ba5d30
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/rc.firewall
@@ -0,0 +1,172 @@
+############
+# Setup system for firewall service.
+# $Id: rc.firewall,v 1.1.1.1 1998/07/14 07:30:45 abial Exp $
+
+############
+# Define the firewall type in /etc/rc.conf. Valid values are:
+# open - will allow anyone in
+# client - will try to protect just this machine
+# simple - will try to protect a whole network
+# closed - totally disables IP services except via lo0 interface
+# UNKNOWN - disables the loading of firewall rules.
+# filename - will load the rules in the given filename (full path required)
+#
+# For ``client'' and ``simple'' the entries below should be customized
+# appropriately.
+
+############
+#
+# If you don't know enough about packet filtering, we suggest that you
+# take time to read this book:
+#
+# Building Internet Firewalls
+# Brent Chapman and Elizabeth Zwicky
+#
+# O'Reilly & Associates, Inc
+# ISBN 1-56592-124-0
+# http://www.ora.com/
+#
+# For a more advanced treatment of Internet Security read:
+#
+# Firewalls & Internet Security
+# Repelling the wily hacker
+# William R. Cheswick, Steven M. Bellowin
+#
+# Addison-Wesley
+# ISBN 0-201-6337-4
+# http://www.awl.com/
+#
+
+if [ "x$1" != "x" ]; then
+ firewall_type=$1
+fi
+
+############
+# Set quiet mode if requested
+if [ "x$firewall_quiet" = "xYES" ]; then
+ fwcmd="/sbin/ipfw -q"
+else
+ fwcmd="/sbin/ipfw"
+fi
+
+############
+# Flush out the list before we begin.
+$fwcmd -f flush
+
+############
+# If you just configured ipfw in the kernel as a tool to solve network
+# problems or you just want to disallow some particular kinds of traffic
+# they you will want to change the default policy to open. You can also
+# do this as your only action by setting the firewall_type to ``open''.
+
+# $fwcmd add 65000 pass all from any to any
+
+############
+# Only in rare cases do you want to change these rules
+$fwcmd add 1000 pass all from any to any via lo0
+$fwcmd add 1010 deny all from 127.0.0.0/8 to 127.0.0.0/8
+
+
+# Prototype setups.
+if [ "${firewall_type}" = "open" -o "${firewall_type}" = "OPEN" ]; then
+
+ $fwcmd add 65000 pass all from any to any
+
+elif [ "${firewall_type}" = "client" ]; then
+
+ ############
+ # This is a prototype setup that will protect your system somewhat against
+ # people from outside your own network.
+ ############
+
+ # set these to your network and netmask and ip
+ net="192.168.4.0"
+ mask="255.255.255.0"
+ ip="192.168.4.17"
+
+ # Allow any traffic to or from my own net.
+ $fwcmd add pass all from ${ip} to ${net}:${mask}
+ $fwcmd add pass all from ${net}:${mask} to ${ip}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${ip} 25 setup
+
+ # Allow setup of outgoing TCP connections only
+ $fwcmd add pass tcp from ${ip} to any setup
+
+ # Disallow setup of all other TCP connections
+ $fwcmd add deny tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" = "simple" ]; then
+
+ ############
+ # This is a prototype setup for a simple firewall. Configure this machine
+ # as a named server and ntp server, and point all the machines on the inside
+ # at this machine for those services.
+ ############
+
+ # set these to your outside interface network and netmask and ip
+ oif="ed0"
+ onet="192.168.4.0"
+ omask="255.255.255.0"
+ oip="192.168.4.17"
+
+ # set these to your inside interface network and netmask and ip
+ iif="ed1"
+ inet="192.168.3.0"
+ imask="255.255.255.0"
+ iip="192.168.3.17"
+
+ # Stop spoofing
+ $fwcmd add deny all from ${inet}:${imask} to any in via ${oif}
+ $fwcmd add deny all from ${onet}:${omask} to any in via ${iif}
+
+ # Stop RFC1918 nets on the outside interface
+ $fwcmd add deny all from 192.168.0.0:255.255.0.0 to any via ${oif}
+ $fwcmd add deny all from 172.16.0.0:255.240.0.0 to any via ${oif}
+ $fwcmd add deny all from 10.0.0.0:255.0.0.0 to any via ${oif}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${oip} 25 setup
+
+ # Allow access to our DNS
+ $fwcmd add pass tcp from any to ${oip} 53 setup
+
+ # Allow access to our WWW
+ $fwcmd add pass tcp from any to ${oip} 80 setup
+
+ # Reject&Log all setup of incoming connections from the outside
+ $fwcmd add deny log tcp from any to any in via ${oif} setup
+
+ # Allow setup of any other TCP connection
+ $fwcmd add pass tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" != "UNKNOWN" -a -r "${firewall_type}" ]; then
+ $fwcmd ${firewall_type}
+fi
diff --git a/release/picobsd/isp/floppy.tree/etc/rc.network b/release/picobsd/isp/floppy.tree/etc/rc.network
new file mode 100644
index 0000000..dbb6de0
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/rc.network
@@ -0,0 +1,80 @@
+#!/bin/sh -
+# $Id: rc.network,v 1.5 1998/08/19 07:06:27 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Zaladowano reguly filtrujace do firewalla."
+ else
+ echo "UWAGA: system posiada wbudowany modul firewalla, ale zadne reguly"
+ echo " filtrujace nie zostaly zaladowane."
+ echo " Wszystkie rodzaje ruchu IP sa dozwolone."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/isp/floppy.tree/etc/rc.serial b/release/picobsd/isp/floppy.tree/etc/rc.serial
new file mode 100644
index 0000000..840377b
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/rc.serial
@@ -0,0 +1,127 @@
+#!/bin/sh
+# $Id: rc.serial,v 1.1.1.1 1998/07/14 07:30:45 abial Exp $
+
+# Change some defaults for serial devices.
+# Standard defaults are:
+# dtrwait 300 drainwait 0
+# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
+# initial iflag, lflag and oflag all 0
+# speed 9600
+# special chars from <sys/ttydefaults.h>
+# nothing locked
+# except for serial consoles the initial iflag, lflag and oflag are from
+# <sys/ttydefaults.h> and clocal is locked on.
+
+default() {
+ # Reset everything changed by the other functions to initial defaults.
+
+ ci=$1; shift # call in device identifier
+ co=$1; shift # call out device identifier
+
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
+ stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
+ stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/cual$co$i -clocal -crtscts -hupcl 0
+ done
+}
+
+maybe() {
+ # Special settings.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Don't use ^R; it breaks bash's ^R when typed ahead.
+ stty </dev/ttyi$ci$i reprint undef
+ stty </dev/cuai$co$i reprint undef
+ # Lock clocal off on dialin device for security.
+ stty </dev/ttyl$ci$i clocal
+ # Lock the speeds to use old binaries that don't support them.
+ # Any legal speed works to lock the initial speed.
+ stty </dev/ttyl$ci$i 300
+ stty </dev/cual$co$i 300
+ done
+}
+
+modem() {
+ # Modem that supports CTS and perhaps RTS handshaking.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # may depend on modem
+ comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
+ # Lock crtscts on.
+ # Speed reasonable for V42bis.
+ stty </dev/ttyi$ci$i crtscts 57600
+ stty </dev/ttyl$ci$i crtscts
+ stty </dev/cuai$co$i crtscts 57600
+ stty </dev/cual$co$i crtscts
+ done
+}
+
+mouse() {
+ # Mouse on either callin or callout port.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Lock clocal on, hupcl off.
+ # Standard speed for Microsoft mouse.
+ stty </dev/ttyi$ci$i clocal -hupcl 1200
+ stty </dev/ttyl$ci$i clocal hupcl
+ stty </dev/cuai$co$i clocal -hupcl 1200
+ stty </dev/cual$co$i clocal hupcl
+ done
+}
+
+terminal() {
+ # Terminal that supports CTS and perhaps RTS handshaking
+ # with the cable or terminal arranged so that DCD is on
+ # at least while the terminal is on.
+ # Also works for bidirectional communications to another pc
+ # provided at most one side runs getty.
+ # Same as modem() except we want a faster speed and no dtrwait.
+
+ ci=$1; shift
+ co=$1; shift
+
+ modem $ci $co $*
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 0
+ stty </dev/ttyi$ci$i 115200
+ stty </dev/cuai$co$i 115200
+ done
+}
+
+# Don't use anything from this file unless you have some buggy programs
+# that require it.
+
+# Edit the functions and the examples to suit your system.
+# $1 is the call in device identifier, $2 is the call out device identifier
+# and the remainder of the line lists the device numbers.
+
+# Initialize assorted 8250-16550 (sio) ports.
+# maybe d a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v
+# mouse d a 2
+# modem d a 1
+# terminal d a 0
+
+# Initialize all ports on a Cyclades-8yo.
+# modem c c 00 01 02 03 04 05 06 07
+
+# Initialize all ports on a Cyclades-16ye.
+# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
+
+# Initialize all ports on a Digiboard 8.
+# modem D D 00 01 02 03 04 05 06 07
diff --git a/release/picobsd/isp/floppy.tree/etc/remote b/release/picobsd/isp/floppy.tree/etc/remote
new file mode 100644
index 0000000..6f9fcaf
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/remote
@@ -0,0 +1,50 @@
+# @(#)remote 5.2 (Berkeley) 6/30/90
+#
+# remote -- remote host description file
+# see tip(1), remote(5)
+#
+# dv device to use for the tty
+# el EOL marks (default is NULL)
+# du make a call flag (dial up)
+# pn phone numbers (@ =>'s search phones file; possibly taken from
+# PHONES environment variable)
+# at ACU type
+# ie input EOF marks (default is NULL)
+# oe output EOF string (default is NULL)
+# cu call unit (default is dv)
+# br baud rate (defaults to 300)
+# fs frame size (default is BUFSIZ) -- used in buffering writes on
+# receive operations
+# tc to continue a capability
+
+# Systems definitions
+netcom|Netcom Unix Access:\
+ :pn=\@:tc=unix1200:
+omen|Omen BBS:\
+ :pn=\@:tc=dos1200:
+
+# UNIX system definitions
+unix1200|1200 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200:
+unix300|300 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300:
+
+# DOS system definitions
+dos1200|1200 Baud dial-out to a DOS system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^Z:pa=none:tc=dial1200:
+
+# General dialer definitions used below
+#
+# COURIER switch settings:
+# switch: 1 2 3 4 5 6 7 8 9 10
+# setting: D U D U D D U D U U
+# Rackmount: U U D U D U D D U D
+#
+dial2400|2400 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#2400:cu=/dev/cuaa0:at=hayes:du:
+dial1200|1200 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#1200:cu=/dev/cuaa0:at=hayes:du:
+
+# Hardwired line
+cuaa0b|cua0b:dv=/dev/cuaa0:br#2400
+cuaa0c|cua0c:dv=/dev/cuaa0:br#9600
diff --git a/release/picobsd/isp/floppy.tree/etc/resolv.conf b/release/picobsd/isp/floppy.tree/etc/resolv.conf
new file mode 100644
index 0000000..42374ad
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/resolv.conf
@@ -0,0 +1,3 @@
+# $Id: resolv.conf,v 1.5 1998/08/19 07:06:27 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/isp/floppy.tree/etc/services b/release/picobsd/isp/floppy.tree/etc/services
new file mode 100644
index 0000000..817b6d3
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/services
@@ -0,0 +1,93 @@
+echo 4/ddp
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+systat 11/tcp
+systat 11/udp
+daytime 13/tcp
+daytime 13/udp
+qotd 17/tcp
+qotd 17/udp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp-data 20/udp
+ftp 21/tcp
+ftp 21/udp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+telnet 23/udp
+smtp 25/tcp
+smtp 25/udp
+time 37/tcp
+time 37/udp
+domain 53/tcp
+domain 53/udp
+tacacs-ds 65/tcp
+tacacs-ds 65/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/tcp
+tftp 69/udp
+gopher 70/tcp
+gopher 70/udp
+finger 79/tcp
+finger 79/udp
+http 80/tcp
+http 80/udp
+pop2 109/tcp
+pop2 109/udp
+pop3 110/tcp
+pop3 110/udp
+uucp-path 117/tcp
+uucp-path 117/udp
+nntp 119/tcp
+nntp 119/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap 143/tcp
+imap 143/udp
+snmp 161/tcp
+snmp 161/udp
+snmptrap 162/tcp
+snmptrap 162/udp
+bgp 179/tcp
+bgp 179/udp
+irc 194/tcp
+irc 194/udp
+ipx 213/tcp
+ipx 213/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+netware-ip 396/tcp
+netware-ip 396/udp
+https 443/tcp
+https 443/udp
+exec 512/tcp
+biff 512/udp
+login 513/tcp
+who 513/udp
+cmd 514/tcp
+syslog 514/udp
+printer 515/tcp
+printer 515/udp
+talk 517/tcp
+talk 517/udp
+ntalk 518/tcp
+ntalk 518/udp
+timed 525/tcp
+timed 525/udp
+uucp 540/tcp
+uucp 540/udp
+uucp-rlogin 541/tcp
+uucp-rlogin 541/udp
diff --git a/release/picobsd/isp/floppy.tree/etc/shells b/release/picobsd/isp/floppy.tree/etc/shells
new file mode 100644
index 0000000..df377f1
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/shells
@@ -0,0 +1,6 @@
+# List of acceptable shells for chpass(1).
+# Ftpd will not allow users to connect who are not using
+# one of these shells.
+
+/bin/sh
+/bin/csh
diff --git a/release/picobsd/isp/floppy.tree/etc/snmpd.conf b/release/picobsd/isp/floppy.tree/etc/snmpd.conf
new file mode 100644
index 0000000..be141f3
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/snmpd.conf
@@ -0,0 +1,43 @@
+# Read-only (1) and read-write (2) communities
+community 1 public
+community 2 private
+# Process checks.
+#
+# The following are examples of how to use the agent to check for
+# processes running on the host. The syntax looks something like:
+#
+# proc NAME [MAX=0] [MIN=0]
+#
+# NAME: the name of the process to check for. It must match
+# exactly (ie, http will not find httpd processes).
+# MAX: the maximum number allowed to be running. Defaults to 0.
+# MIN: the minimum number to be running. Defaults to 0.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.1
+proc inetd
+proc snmpd
+# ----------------------------------------------------------------------
+# disk checks
+# The agent can check the amount of available disk space, and make
+# sure it is above a set limit.
+#
+# disk PATH [MIN= 100000]
+#
+# PATH: mount path to the disk in question.
+# MIN: Disks with space below this value will have the Mib's errorFlag set.
+# Default value = 100000.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.6
+#disk /dos 10
+# ----------------------------------------------------------------------
+# load average checks
+#
+# load [1MAX= 12.0] [5MAX= 12.0] [15MAX= 12.0]
+# 1MAX: If the 1 minute load average is above this limit at query
+# time, the errorFlag will be set.
+# 5MAX: Similar, but for 5 min average.
+# 15MAX: Similar, but for 15 min average.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.7
+load 5 5 5
+#
+# ----------------------------------------------------------------------
+#syslocation Right here, right now.
+#syscontact Me <me@somewhere.org>
diff --git a/release/picobsd/isp/floppy.tree/etc/termcap b/release/picobsd/isp/floppy.tree/etc/termcap
new file mode 100644
index 0000000..5a9316a
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/termcap
@@ -0,0 +1,123 @@
+# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
+# All rights reserved.
+# @(#)termcap.src 5.88 (Berkeley) 4/30/91
+#
+#
+# for syscons
+# common entry without semigraphics
+cons25w|ansiw|ansi80x25-raw:\
+ :al=\E[L:am:bs:NP:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:co#80:\
+ :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:cb=\E[1K:\
+ :ms:nd=\E[C:pt:rs=\E[x\E[m\Ec:so=\E[7m:se=\E[m:up=\E[A:\
+ :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[37;40m:\
+ :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\
+ :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\
+ :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:eo:sf=\E[S:sr=\E[T:\
+ :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\E[K:kB=\E[Z:\
+ :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\
+ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:bw:\
+ :mb=\E[5m:md=\E[1m:mh=\E[30;1m:mr=\E[7m:me=\E[m:bl=^G:ut:it#8:
+cons25|ansis|ansi80x25:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :tc=cons25w:
+cons25-m|ansis-mono|ansi80x25-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25:
+cons50|ansil|ansi80x50:\
+ :li#50:tc=cons25:
+cons50-m|ansil-mono|ansi80x50-mono:\
+ :li#50:tc=cons25-m:
+# 80x25 ISO 8859-1 FreeBSD console
+cons25l1|cons25-iso8859-1:\
+ :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237.^Y-^X+\253,\273I\247y\232z\233:\
+ :tc=cons25w:
+cons25l1-m|cons25-iso8859-1-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25l1:
+# 80x50 ISO 8859-1 FreeBSD console
+cons50l1|cons50-iso8859-1:\
+ :li#50:tc=cons25l1:
+cons50l1-m|cons50-iso8859-1-mono:\
+ :li#50:tc=cons25l1-m:
+dosansi|ANSI.SYS standard crt|ansi:\
+ :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\
+ :do=\E[B:li#25:mi:nd=\E[C:\
+ :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\
+ :md=\E[1m:mh=\E[m:mb=\E[5m:me=\E[m:\
+ :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\
+ :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\
+ :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED:
+
+# Note: this entry describes the "native"
+# capabilities of the PC monochrome display, without ANY emulation; most
+# communications packages (but NOT PC/IX connect) do some kind of emulation.
+pc|ibmpc|ibm pc PC/IX:\
+ :li#24:co#80:am:bs:bw:eo:\
+ :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\
+ :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:
+pc3mono|IBM PC 386BSD Console with monochrome monitor:\
+ :so=\E[0;1r\E[m:tc=pc3:
+pc3|ibmpc3|IBM PC 386BSD Console:\
+ :Co#8:\
+ :DO=\E[%dB:\
+ :F1=\E[W:\
+ :F2=\E[X:\
+ :K1=\E[H:\
+ :K2=\E[I:\
+ :K3=\E[E:\
+ :K4=\E[F:\
+ :K5=\E[G:\
+ :LE=\E[%dD:\
+ :RI=\E[%dC:\
+ :Sb=\E[1;%dx:\
+ :Sf=\E[2;%dx:\
+ :UP=\E[%dA:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :am:\
+ :bl=^G:\
+ :bs:\
+ :cb=\E[1K:\
+ :cd=\E[J:\
+ :ce=\E[K:\
+ :cl=\E[H\E[J:\
+ :cm=\E[%i%d;%dH:\
+ :co#80:\
+ :cr=^M:\
+ :do=\E[B:\
+ :ho=\E[H:\
+ :is=\E[m:\
+ :it#8:\
+ :k;=\E[V:\
+ :k1=\E[M:\
+ :k2=\E[N:\
+ :k3=\E[O:\
+ :k4=\E[P:\
+ :k5=\E[Q:\
+ :k6=\E[R:\
+ :k7=\E[S:\
+ :k8=\E[T:\
+ :k9=\E[U:\
+ :kD=\177:\
+ :@7=\E[F:\
+ :kN=\E[G:\
+ :kP=\E[I:\
+ :kb=\177:\
+ :kd=\E[B:\
+ :kh=\E[H:\
+ :kl=\E[D:\
+ :kr=\E[C:\
+ :ku=\E[A:\
+ :le=^H:\
+ :li#25:\
+ :ms:\
+ :nd=\E[C:\
+ :op=\E[x:\
+ :pa#64:\
+ :rs=\E[m:\
+ :se=\E[m:\
+ :sf=\E[S:\
+ :so=\E[7;1r\E[7m:\
+ :sr=\E[T:\
+ :ta=^I:\
+ :te=\E[m:\
+ :ti=\E[m:\
+ :up=\E[A:\
+ :ut:
diff --git a/release/picobsd/isp/floppy.tree/etc/ttys b/release/picobsd/isp/floppy.tree/etc/ttys
new file mode 100644
index 0000000..90a7b0a
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/etc/ttys
@@ -0,0 +1,31 @@
+#
+# @(#)ttys 5.1 (Berkeley) 4/17/89
+#
+# name getty type status comments
+#
+# This entry needed for asking password when init goes to single-user mode
+# If you want to be asked for password, change "secure" to "insecure" here
+vga none cons25 off secure
+#
+ttyv0 "/usr/libexec/getty Pc" cons25 on secure
+# Virtual terminals
+ttyv1 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv2 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv3 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv4 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv5 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv6 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv7 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv8 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv9 "/usr/libexec/getty Pc" cons25 on secure
+# Pseudo terminals
+ttyp0 none network secure
+ttyp1 none network secure
+ttyp2 none network secure
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
diff --git a/release/picobsd/isp/floppy.tree/kernel.config b/release/picobsd/isp/floppy.tree/kernel.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/isp/floppy.tree/kernel.config
diff --git a/release/picobsd/isp/lang/README.en b/release/picobsd/isp/lang/README.en
new file mode 100644
index 0000000..0dbebfc
--- /dev/null
+++ b/release/picobsd/isp/lang/README.en
@@ -0,0 +1,33 @@
+1998.07.20, Warsaw, Poland
+
+ PicoBSD 0.4
+ -----------
+
+
+What is PicoBSD?
+----------------
+
+It's a one floppy version of FreeBSD (please see http://www.freebsd.org),
+configured mainly for networking applications. It can be used as a router or
+firewall, or kind of a fixit floppy (or all of them).
+
+What are minimal requirements?
+------------------------------
+
+* 386SX CPU or better (there is an FPU emulator in kernel)
+* 10MB RAM - the more the better. If you have an HDD, you can make a
+ swap partition or swap file (using vnode driver and vnconfig). Then you
+ probably will be able to run with ca. 6MB only. But RAM is cheap...
+* Modem sitting on COM1-COM4 (default is to use COM2), if you want to have
+ a PPP connection.
+* Network card: compatible with NE2000, or PCI cards with DEC chipsets
+ (ed and de drivers). The kernel supports two of them (i.e. four total) plus
+ two PPP connections (tun interfaces). So you can easily build something like
+ router with as many as 6 outlets :-)
+
+
+I'll be glad hearing from you about your experiences with PicoBSD. Thanks.
+
+Have fun!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/isp/lang/README.pl b/release/picobsd/isp/lang/README.pl
new file mode 100644
index 0000000..9f32dfb
--- /dev/null
+++ b/release/picobsd/isp/lang/README.pl
@@ -0,0 +1,33 @@
+1998.07.29, Warszawa
+
+ PicoBSD 0.4
+ -----------
+
+Co to jest PicoBSD?
+-------------------
+
+Jest to jednodyskietkowa wersja FreeBSD skonfigurowana glownie pod katem
+zastosowania jako klient/serwer uslug sieciowych (takich jak routing,
+firewall, NFS). W celu zapoznania sie z pelnym systemem zajrzyj na
+http://www.freebsd.org
+
+Jakie sa minimalne wymagania?
+-----------------------------
+
+* Procesor 386SX lub lepszy (jadro posiada emulator FPU)
+* 10MB pamieci - jest to absolutnie nieprzekraczalne minimum. Oczywiscie im
+ wiecej, tym lepiej - ograniczenie jest glownie spowodowane brakiem swapu. Po
+ zapoznaniu sie z systemem mozesz sobie skonfigurowac tzw. swap-file na dysku
+ twardym, np. na partycji DOS-owej. Wowczas prawdopodobnie wystarczy 6MB
+ pamieci.
+* Modem, skonfigurowany na COM1-COM4 (standardowo system wykorzystuje COM2),
+ jesli bedzie wykorzystywany dostep przez PPP.
+* Karta sieciowa: kompatybilna z NE2000, niektore typy 3Com, lub wersje PCI z
+ chipsetem DEC21040 (drivery ed i de). Jadro jest skonfigurowane tak, zeby
+ moc obsluzyc po dwie karty ed i de (czyli w sumie cztery) oraz dwa
+ polaczenia PPP rownoczesnie. Mozna wiec zbudowac router z 6 interfejsami.
+
+
+Milej zabawy!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/isp/lang/boot.help.en b/release/picobsd/isp/lang/boot.help.en
new file mode 100644
index 0000000..7cbce13
--- /dev/null
+++ b/release/picobsd/isp/lang/boot.help.en
@@ -0,0 +1,18 @@
+Usage: bios_drive:interface(unit,partition)kernel_name options
+ bios_drive 0, 1, ...
+ interface fd, wd or sd
+ unit 0, 1, ...
+ partition a, c, ...
+ kernel_name name of kernel, or ? for list of files in root directory
+ options -a (ask name) -C (cdrom) -c (userconfig) -D (dual consoles)
+ -d (debug early) -g (gdb) -h (serial console) -P (probe kbd)
+ -r (default root) -s (single user) -v (verbose)
+Examples:
+ 1:sd(0,a)mykernel boot `mykernel' on the first SCSI drive when one IDE
+ drive is present
+ 1:wd(2,a) boot from the second (secondary master) IDE drive
+ 1:sd(0,a)? list the files in the root directory on the specified
+ drive/unit/partition, and set the default bios_drive,
+ interface, unit and partition
+ -cv boot with the defaults, then run UserConfig to modify
+ hardware parameters (c), and print verbose messages (v)
diff --git a/release/picobsd/isp/lang/boot.help.pl b/release/picobsd/isp/lang/boot.help.pl
new file mode 100644
index 0000000..d60601f
--- /dev/null
+++ b/release/picobsd/isp/lang/boot.help.pl
@@ -0,0 +1,16 @@
+Opcje: dysk_bios:kontroler(dysk,partycja)nazwa_kernela opcje
+ dysk_bios 0, 1, ...
+ kontroler fd (dyskietka), wd (dysk IDE) lub sd (dysk SCSI)
+ dysk 0, 1, ... (numer dysku w kontrolerze)
+ partycja a, c, e, f ... (wedlug nazewnictwa BSD)
+ nazwa_kernela nazwa pliku kernela, lub ? zeby dostac liste plikow
+ opcje -a (pytaj o rootdev) -C (cdrom) -c (userconf.) -D (podwojna konsola)
+ -d (uruchom debugger) -g (gdb) -h (konsola szeregowa)
+ -P (probkuj klawiature) -r (domyslny rootdev) -s (tryb single user)
+ -v (verbose - szczegolowe komunikaty)
+Np: 1:sd(0,a)mykernel startuj `mykernel' z 1 dysku SCSI gdy jest tez 1 dysk
+ IDE, i jednoczesnie ustaw go jako domyslny dysk_bios,
+ kontroler, dysk i partycja
+ -cv startuj z parametrami domyslnymi, potem uruchom
+ konfiguracje param. sprzetowych (-c), i podawaj
+ szczegolowe komunikaty w trakcie bootowania (-v).
diff --git a/release/picobsd/isp/lang/hosts.en b/release/picobsd/isp/lang/hosts.en
new file mode 100644
index 0000000..e4afb80
--- /dev/null
+++ b/release/picobsd/isp/lang/hosts.en
@@ -0,0 +1,5 @@
+# $Id: hosts.en,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.edu
+127.0.0.1 pico.mydomain.edu
diff --git a/release/picobsd/isp/lang/hosts.pl b/release/picobsd/isp/lang/hosts.pl
new file mode 100644
index 0000000..39973af
--- /dev/null
+++ b/release/picobsd/isp/lang/hosts.pl
@@ -0,0 +1,5 @@
+# $Id: hosts.pl,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/isp/lang/m.en b/release/picobsd/isp/lang/m.en
new file mode 100644
index 0000000..077a3b5
--- /dev/null
+++ b/release/picobsd/isp/lang/m.en
@@ -0,0 +1,11 @@
+
+PicoBSD 0.32 (ISP-alpha)
+
+Welcome to PicoBSD!
+
+You can find a short description of the
+system in file /README. You can view it using
+"more /README".
+
+For more info contact the author (abial@nask.pl).
+
diff --git a/release/picobsd/isp/lang/m.pl b/release/picobsd/isp/lang/m.pl
new file mode 100644
index 0000000..8870e1e
--- /dev/null
+++ b/release/picobsd/isp/lang/m.pl
@@ -0,0 +1,11 @@
+
+PicoBSD 0.32 (ISP-alpha)
+
+Witamy w PicoBSD!
+
+W glownym katalogu w pliku README znajdziesz
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/isp/lang/mfs.rc.en b/release/picobsd/isp/lang/mfs.rc.en
new file mode 100644
index 0000000..718345a
--- /dev/null
+++ b/release/picobsd/isp/lang/mfs.rc.en
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $Id: mfs.rc.en,v 1.3 1998/08/10 19:16:42 abial Exp $
+
+# System startup script run by init on autoboot
+# or after single-user.
+
+stty status '^T'
+
+trap : 2
+trap : 3 # shouldn't be needed
+
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+
+trap "echo 'Reboot interrupted'; exit 1" 3
+
+### Special setup for one floppy PICOBSD ###
+echo ""
+echo "-------------------------------------------"
+echo " Please wait. The system is coming up..."
+echo "-------------------------------------------"
+echo ""
+echo "Reading /etc from startup floppy..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+pwd_mkdb -p ./master.passwd
+umount /start_floppy
+echo "Ok. (Now you may remove floppy if you like)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/isp/lang/mfs.rc.pl b/release/picobsd/isp/lang/mfs.rc.pl
new file mode 100644
index 0000000..d369093
--- /dev/null
+++ b/release/picobsd/isp/lang/mfs.rc.pl
@@ -0,0 +1,36 @@
+#!/bin/sh
+# $Id: mfs.rc.pl,v 1.3 1998/08/10 19:16:43 abial Exp $
+
+# System startup script run by init on autoboot
+# or after single-user.
+
+stty status '^T'
+
+trap : 2
+trap : 3 # shouldn't be needed
+
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+
+trap "echo 'Reboot zostal przerwany'; exit 1" 3
+
+############################################
+### Special setup for one floppy PICOBSD ###
+############################################
+echo ""
+echo "-----------------------------------------------"
+echo " Prosze czekac. Trwa uruchamianie systemu..."
+echo "-----------------------------------------------"
+echo ""
+echo "Wczytuje konfiguracje /etc z dyskietki..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+pwd_mkdb -p ./master.passwd
+umount /dev/fd0a
+echo "Ok. (Jesli chcesz, mozesz juz wyjac dyskietke)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/isp/lang/motd.en b/release/picobsd/isp/lang/motd.en
new file mode 100644
index 0000000..620028b
--- /dev/null
+++ b/release/picobsd/isp/lang/motd.en
@@ -0,0 +1,12 @@
+==================================================
+ )\_)\
+PicoBSD 0.4 (ISP-alpha) (o,o)
+ __ \~/
+Welcome to PicoBSD! -->====\
+ ~~ d d
+You can find a short description of the pico
+system in file /README. You can view it using
+"more /README".
+
+For more info contact the author (abial@nask.pl).
+
diff --git a/release/picobsd/isp/lang/motd.pl b/release/picobsd/isp/lang/motd.pl
new file mode 100644
index 0000000..38474d1
--- /dev/null
+++ b/release/picobsd/isp/lang/motd.pl
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (ISP-alpha) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/isp/lang/rc.conf.en b/release/picobsd/isp/lang/rc.conf.en
new file mode 100644
index 0000000..036f6c5
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.conf.en
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf.en,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.edu" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/isp/lang/rc.conf.pl b/release/picobsd/isp/lang/rc.conf.pl
new file mode 100644
index 0000000..28ef398
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.conf.pl
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf.pl,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/isp/lang/rc.en b/release/picobsd/isp/lang/rc.en
new file mode 100644
index 0000000..6cac739
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.en
@@ -0,0 +1,64 @@
+#!/bin/sh
+# $Id: rc.en,v 1.3 1998/08/10 19:16:43 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Adding $swapfile as additional swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+chmod 666 /dev/tty[pqrsPQRS]*
+# clean up left-over files
+rm -f /etc/nologin
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Starting inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Starting snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "WARNING: no swap partition!"
+ echo "Don't run too many programs at the same time..."
+fi
+echo ''
+echo ''
+echo '+----------- PicoBSD 0.4 (ISP) ----------------+'
+echo '| |'
+echo '| Log in as "root" (password "setup"). |'
+echo '| |'
+echo '| This version of PicoBSD is fully under |'
+echo '| BSD license. For more details see |'
+echo '| http://www.freebsd.org/~picobsd, or contact |'
+echo '| the author. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/isp/lang/rc.network.en b/release/picobsd/isp/lang/rc.network.en
new file mode 100644
index 0000000..e0abec2
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.network.en
@@ -0,0 +1,79 @@
+#!/bin/sh -
+# $Id: rc.network.en,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+network_pass1() {
+ echo -n 'Doing initial network setup:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Firewall rules loaded."
+ else
+ echo "Warning: kernel has firewall functionality, but firewall rules weren't loaded."
+ echo " All ip services are ENABLED by default."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Additional routing options:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' turning on ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/isp/lang/rc.network.pl b/release/picobsd/isp/lang/rc.network.pl
new file mode 100644
index 0000000..3aa476b
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.network.pl
@@ -0,0 +1,80 @@
+#!/bin/sh -
+# $Id: rc.network.pl,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Zaladowano reguly filtrujace do firewalla."
+ else
+ echo "UWAGA: system posiada wbudowany modul firewalla, ale zadne reguly"
+ echo " filtrujace nie zostaly zaladowane."
+ echo " Wszystkie rodzaje ruchu IP sa dozwolone."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/isp/lang/rc.pl b/release/picobsd/isp/lang/rc.pl
new file mode 100644
index 0000000..a504d14
--- /dev/null
+++ b/release/picobsd/isp/lang/rc.pl
@@ -0,0 +1,62 @@
+#!/bin/sh
+# $Id: rc.pl,v 1.3 1998/08/10 19:16:43 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Dodaje $swapfile jako dodatkowy swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+# clean up left-over files
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Uruchamiam inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Uruchamiam snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "UWAGA: brak swapu!"
+ echo "Nie uruchamiaj zbyt wielu programow na raz..."
+fi
+echo ''
+echo ''
+echo '+------------ PicoBSD 0.4 (ISP) ---------------+'
+echo '| |'
+echo '| Zaloguj sie jako "root" (haslo "setup"). |'
+echo '| |'
+echo '| Ta wersja PicoBSD w pelni podlega |'
+echo '| licencji BSD. Po wiecej szczegolow zajrzyj |'
+echo '| na http://www.freebsd.org/~picobsd, lub |'
+echo '| skontaktuj sie z autorem. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/isp/lang/reboot.en b/release/picobsd/isp/lang/reboot.en
new file mode 100755
index 0000000..4601bb8
--- /dev/null
+++ b/release/picobsd/isp/lang/reboot.en
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Press Ctrl-Alt-Del instead of $0"
diff --git a/release/picobsd/isp/lang/reboot.pl b/release/picobsd/isp/lang/reboot.pl
new file mode 100755
index 0000000..8181ced
--- /dev/null
+++ b/release/picobsd/isp/lang/reboot.pl
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Zamiast $0 nacisnij Ctrl-Alt-Del"
diff --git a/release/picobsd/isp/lang/resolv.conf.en b/release/picobsd/isp/lang/resolv.conf.en
new file mode 100644
index 0000000..0002d88
--- /dev/null
+++ b/release/picobsd/isp/lang/resolv.conf.en
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.en,v 1.1.1.1 1998/07/14 07:30:46 abial Exp $
+domain mydomain.edu
+nameserver 192.33.4.12
diff --git a/release/picobsd/isp/lang/resolv.conf.pl b/release/picobsd/isp/lang/resolv.conf.pl
new file mode 100644
index 0000000..ed0a3f6
--- /dev/null
+++ b/release/picobsd/isp/lang/resolv.conf.pl
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.pl,v 1.1.1.1 1998/07/14 07:30:47 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/isp/lang/update.en b/release/picobsd/isp/lang/update.en
new file mode 100755
index 0000000..acbd0de
--- /dev/null
+++ b/release/picobsd/isp/lang/update.en
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: update.en,v 1.3 1998/08/10 19:16:43 abial Exp $
+pwd=`pwd`
+echo -n "Updating /etc contents on startup floppy... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "Cannot mount the floppy read-write!"
+ echo "Check the write-protection..."
+ exit 1
+fi
+cd /etc
+rm *.db
+rm passwd
+cp -Rp . /start_floppy/etc/
+pwd_mkdb master.passwd
+echo " Done."
+echo -n "Updating kernel parameters... "
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd ${pwd}
+echo " Done."
diff --git a/release/picobsd/isp/lang/update.pl b/release/picobsd/isp/lang/update.pl
new file mode 100755
index 0000000..3a95e00
--- /dev/null
+++ b/release/picobsd/isp/lang/update.pl
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: update.pl,v 1.3 1998/08/10 19:16:43 abial Exp $
+pwd=`pwd`
+echo -n "Uaktualniam katalog /etc na dyskietce... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "Blad podczas montowania read/write dyskietki!"
+ echo "Sprawdz, czy nie jest zabezpieczona przed zapisem..."
+ exit 1
+fi
+cd /etc
+rm *.db
+rm passwd
+cp -Rp . /start_floppy/etc/
+pwd_mkdb master.passwd
+echo " Zrobione."
+echo -n "Uaktualniam parametry jadra..."
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd ${pwd}
+echo " Zrobione."
diff --git a/release/picobsd/isp/mfs.tree/MAKEDEV b/release/picobsd/isp/mfs.tree/MAKEDEV
new file mode 100755
index 0000000..639ffae
--- /dev/null
+++ b/release/picobsd/isp/mfs.tree/MAKEDEV
@@ -0,0 +1,1167 @@
+#!/bin/sh -
+#
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
+#
+# Written and contributed by W. Jolitz 12/90
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
+#
+# Device "make" file. Valid arguments:
+# all makes all known devices, standard number of units (or close)
+# std standard devices
+# local configuration specific devices
+# mach-4 mach4&lites+devices for Mach's XFree86 distribution
+# (see http://www.cs.hut.fi/lites.html for more info on LITES)
+#
+# Tapes:
+# wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape
+# st* "NEW type scsi tapes" (old driver uses the
+# block devices of the disks to get access)
+# ft* QIC-40/QIC-80 3M cartridge tape (interfaced
+# via the floppy disk controller)
+#
+# Disks:
+# wd* "Winchester" disk drives (ST506,IDE,ESDI,RLL,...)
+# wfd* "IDE floppy" disk drives (LS-120)
+# fd* "floppy" disk drives (3 1/2", 5 1/4")
+# sd* "SCSI disks"
+# cd* "SCSI CD-ROM disks"
+# mcd* "Mitsumi CD-ROM disks"
+# scd* "Sony CD-ROM disks"
+# matcd* "Matsushita (Panasonic) CD-ROM disks"
+# wcd* "IDE CD-ROM disks"
+# vn* "vnode disks"
+# od* "optical disks"
+#
+# Console ports:
+# vty* virtual console devices for syscons/pcvt/codrv
+#
+# Pointing devices:
+# mse* Logitech and ATI Inport bus mouse
+# psm* PS/2 mouse
+# sysmouse Mousesystems mouse emulator for syscons
+#
+# Time devices:
+# refclock-* serial ports used by xntpd parse refclocks
+#
+# Terminal ports:
+# tty* general purpose serial ports
+# cua* dialout serial ports
+# ttyA* Specialix SI/XIO dialin ports ('*' = number of devices)
+# cuaA* Specialix SI/XIO dialout ports
+# ttyD* Digiboard - 16 dialin ports
+# cuaD* Digiboard - 16 dialout ports
+# ttyR* Rocketport dialin ports
+# cuaR* Rocketport dialout ports
+#
+# Pseudo terminals:
+# pty* set of 32 master and slave pseudo terminals
+# vty* virtual terminals using syscons/pcvt/codrv console
+#
+# Printers:
+# lpt* stock lp
+#
+# SCSI devices (other than CD-ROM, tape and disk):
+# ssc The ``super scsi'' device
+# uk* "unknown" device (supports ioctl calls only)
+# worm* WORM driver
+# pt* Processor Type (HP scanner, as one example)
+#
+# PC-CARD (previously called PCMCIA) support
+# card* PC-CARD slots
+#
+# Special purpose devices:
+# apm Advanced Power Management BIOS
+# bpf* packet filter
+# speaker pc speaker
+# tw* xten power controller
+# snd* various sound cards
+# pcaudio PCM audio driver
+# socksys iBCS2 socket system driver
+# vat VAT compatibility audio driver (requires snd*)
+# gsc Genius GS-4500 hand scanner
+# joy pc joystick
+# tun* Tunneling IP device
+# snp* tty snoop devices
+# spigot Video Spigot video acquisition card
+# ctx* Cortex-I video acquisition card
+# meteor* Matrox Meteor video acquisition card (pci)
+# bktr* Bt848 based video acquisition card (pci)
+# labpc* National Instrument's Lab-PC and LAB-PC+
+# perfmon CPU performance-monitoring counters
+# pci PCI configuration-space access from user mode
+# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
+#
+# $Id: MAKEDEV,v 1.1.1.1 1998/07/14 07:30:47 abial Exp $
+#
+
+PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
+umask 77
+
+# Usage: die exitcode msg
+die() {
+ echo $2
+ exit $1
+}
+
+# Convert integer to partition name
+dkitop() {
+ local p
+
+ case $1 in
+ 0) p=a;; 1) p=b;; 2) p=c;; 3) p=d;; 4) p=e;; 5) p=f;; 6) p=g;; 7) p=h;;
+ *) p="?";;
+ esac
+ echo $p
+}
+
+# Convert integer to slice name
+dkitos() {
+ local s
+
+ case $1 in
+ 0) s="";;
+ 1) s="";;
+ *) s=s$(($1-1));;
+ esac
+ echo $s
+}
+
+# Convert disk (type, unit, slice, partition) to minor number
+dkminor()
+{
+ echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
+}
+
+# Override mknod(2) to add extra handling to it.
+mknod() {
+ rm -f "$1" || exit 1
+ /sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
+ chown root.wheel "$1" || exit 1
+}
+
+# Convert the last character of a tty name to a minor number.
+ttyminor()
+{
+ case $unit in
+ [0-9]) m=$unit;;
+ a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
+ h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
+ o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
+ v) m=31;;
+ *) m="?";;
+ esac
+ echo $m
+}
+
+# Raw partition for disks
+dkrawpart=2
+
+# Compatibility slice for disks
+dkcompatslice=0
+
+# Raw slice for disks
+dkrawslice=1
+
+# Control bit for SCSI
+scsictl=$((1 << 29))
+
+# Standard umasks
+disk_umask=037 # allow group operator to read disks
+tape_umask=017 # allow group operator to read/write tapes
+
+for i in $*; do
+case $i in
+
+all)
+ sh MAKEDEV std # standard
+ sh MAKEDEV fd0 fd1 # bdev, floppy disk
+ sh MAKEDEV sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 # bdev, ordinary disk
+ sh MAKEDEV od0 # bdev, optical disk
+ sh MAKEDEV wfd0 # bdev, LS-120 floppy
+ sh MAKEDEV vn0 # bdev, virtual disk
+ sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
+ sh MAKEDEV ft0 st0 wt0 # bdev, tape
+ sh MAKEDEV vty4 # cdev, virtual tty
+ sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
+ sh MAKEDEV pty0 # cdev, pseudo tty
+ sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3 # cdev, serial tty
+ sh MAKEDEV mse0 psm0 sysmouse # cdev, mouse
+ sh MAKEDEV pcaudio speaker # cdev, noise
+ sh MAKEDEV lpt0 lpt1 lpt2 # cdev, printer
+ sh MAKEDEV bpf0 ipl tun0 # cdev, network
+ sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
+ sh MAKEDEV apm card0 card1 # cdev, laptop
+ ;;
+std)
+ mknod console c 0 0; chmod 600 console
+ mknod drum c 4 0; chmod 640 drum; chgrp kmem drum
+ mknod kmem c 2 1; chmod 640 kmem; chgrp kmem kmem
+ mknod mem c 2 0; chmod 640 mem; chgrp kmem mem
+ mknod null c 2 2; chmod 666 null
+ mknod random c 2 3; chmod 644 random
+ mknod urandom c 2 4; chmod 644 urandom
+ mknod zero c 2 12; chmod 666 zero
+ mknod io c 2 14; chmod 600 io
+ mknod tty c 1 0; chmod 666 tty
+ mknod klog c 7 0; chmod 600 klog
+ mknod stdin c 22 0; chmod 666 stdin
+ mknod stdout c 22 1; chmod 666 stdout
+ mknod stderr c 22 2; chmod 666 stderr
+ mknod lkm c 32 0; chmod 644 lkm
+ mknod pci c 78 0; chmod 644 pci
+ mkdir -p fd
+ (cd fd && eval `echo "" | awk ' BEGIN { \
+ for (i = 0; i < 64; i++) \
+ printf("mknod %d c 22 %d;", i, i)}'`)
+ chown -R bin.bin fd
+ chmod 555 fd
+ chmod 666 fd/*
+ ;;
+
+mach-4)
+ mknod iopl c 22 0
+ mknod kbd c 23 0
+ mknod mouse c 24 0
+ mknod time c 25 0
+ mknod timezone c 26 0
+ ;;
+
+# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
+wt*)
+ umask $tape_umask
+ u=`expr $i : '..\(.*\)'`
+ if [ x$u = x ]; then u=0; fi
+ mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
+ mknod nrwt${u} c 10 `expr 4 + $u`
+# mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks
+# mknod nrWt${u} c 10 `expr 68 + $u`
+ mknod rwt${u}b c 10 `expr 16 + $u` # 60 megabytes
+ mknod nrwt${u}b c 10 `expr 20 + $u`
+ mknod rwt${u}c c 10 `expr 24 + $u` # 120 megabytes
+ mknod nrwt${u}c c 10 `expr 28 + $u`
+ mknod rwt${u}d c 10 `expr 32 + $u` # 150 megabytes
+ mknod nrwt${u}d c 10 `expr 36 + $u`
+# mknod rwt${u}e c 10 `expr 40 + $u` # 300 megabytes?
+# mknod nrwt${u}e c 10 `expr 44 + $u`
+# mknod rwt${u}f c 10 `expr 48 + $u` # 600 megabytes?
+# mknod nrwt${u}f c 10 `expr 52 + $u`
+ chgrp operator r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
+ umask 77
+ ;;
+
+# Individual slices.
+od*s*|sd*s*|vn*s*|wd*s*|wfd*s*)
+ umask $disk_umask
+ case $i in
+ od*s*) name=od; blk=20; chr=70;;
+ sd*s*) name=sd; blk=4; chr=13;;
+ wd*s*) name=wd; blk=0; chr=3;;
+ vn*s*) name=vn; blk=15; chr=43;;
+ wfd*s*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*s*)
+ unit=`expr $i : '...\([0-9]*\)s'`
+ slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\([0-9]*\)s'`
+ slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ case $slice in
+ [0-9]|[1-2][0-9]|30)
+ oldslice=$slice
+ slice=$(($slice+1))
+ slicename=`dkitos $slice`
+ minor=`dkminor 0 $unit $slice $dkrawpart`
+ mknod $name$unit$slicename b $blk $minor
+ mknod r$name$unit$slicename c $chr $minor
+ case $part in
+ [a-h])
+ case $oldslice in
+ 0) slice=$oldslice ;;
+ esac
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit $slice $part`
+ partname=`dkitop $part`
+ mknod $name$unit$slicename$partname \
+ b $blk $minor
+ mknod r$name$unit$slicename$partname \
+ c $chr $minor
+ done
+ ;;
+ "")
+ ;;
+ *)
+ echo bad partition for disk in: $i
+ ;;
+ esac
+ chgrp operator $name$unit$slicename* \
+ r$name$unit$slicename*
+ ;;
+ *)
+ echo bad slice for disk in: $i
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
+ ;;
+ esac
+ umask 77
+ ;;
+
+fd*)
+ umask $disk_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=fd; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64`
+ # Fake BSD partitions
+ for i in a b c d e f g h
+ do
+ ln ${name}${unit} ${name}${unit}$i
+ ln r${name}${unit} r${name}${unit}$i
+ done
+ # User-readable and programmer-readable name sets
+
+ mknod ${name}${unit}.1720 b $blk `expr $unit '*' 64 + 1`
+ mknod r${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1`
+ # ln ${name}${unit}.1720 ${name}${unit}135hs21
+ # ln r${name}${unit}.1720 r${name}${unit}135hs21
+
+ mknod ${name}${unit}.1480 b $blk `expr $unit '*' 64 + 2`
+ mknod r${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2`
+ # ln ${name}${unit}.1480 ${name}${unit}135hs18
+ # ln r${name}${unit}.1480 r${name}${unit}135hs18
+ # ln ${name}${unit}.1480 ${name}${unit}96hs18
+ # ln r${name}${unit}.1480 r${name}${unit}96hs18
+
+ mknod ${name}${unit}.1440 b $blk `expr $unit '*' 64 + 3`
+ mknod r${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3`
+ # ln ${name}${unit}.1440 ${name}${unit}135
+ # ln r${name}${unit}.1440 r${name}${unit}135
+ # ln ${name}${unit}.1440 ${name}${unit}135ds18
+ # ln r${name}${unit}.1440 r${name}${unit}135ds18
+ # ln ${name}${unit}.1440 ${name}${unit}96ds18
+ # ln r${name}${unit}.1440 r${name}${unit}96ds18
+
+ mknod ${name}${unit}.1200 b $blk `expr $unit '*' 64 + 4`
+ mknod r${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4`
+ # ln ${name}${unit}.1200 ${name}${unit}96
+ # ln r${name}${unit}.1200 r${name}${unit}96
+ # ln ${name}${unit}.1200 ${name}${unit}96ds15
+ # ln r${name}${unit}.1200 r${name}${unit}96ds15
+ # ln ${name}${unit}.1200 ${name}${unit}135ds15
+ # ln r${name}${unit}.1200 r${name}${unit}135ds15
+
+ mknod ${name}${unit}.820 b $blk `expr $unit '*' 64 + 5`
+ mknod r${name}${unit}.820 c $chr `expr $unit '*' 64 + 5`
+ # ln ${name}${unit}.820 ${name}${unit}96hs10
+ # ln r${name}${unit}.820 r${name}${unit}96hs10
+ # ln ${name}${unit}.820 ${name}${unit}135hs10
+ # ln r${name}${unit}.820 r${name}${unit}135hs10
+
+ mknod ${name}${unit}.800 b $blk `expr $unit '*' 64 + 6`
+ mknod r${name}${unit}.800 c $chr `expr $unit '*' 64 + 6`
+ # ln ${name}${unit}.800 ${name}${unit}96ds10
+ # ln r${name}${unit}.800 r${name}${unit}96ds10
+ # ln ${name}${unit}.800 ${name}${unit}135ds10
+ # ln r${name}${unit}.800 r${name}${unit}135ds10
+
+ mknod ${name}${unit}.720 b $blk `expr $unit '*' 64 + 7`
+ mknod r${name}${unit}.720 c $chr `expr $unit '*' 64 + 7`
+ # ln ${name}${unit}.720 ${name}${unit}96ds9
+ # ln r${name}${unit}.720 r${name}${unit}96ds9
+ # ln ${name}${unit}.720 ${name}${unit}135ds9
+ # ln r${name}${unit}.720 r${name}${unit}135ds9
+
+ mknod ${name}${unit}.360 b $blk `expr $unit '*' 64 + 8`
+ mknod r${name}${unit}.360 c $chr `expr $unit '*' 64 + 8`
+ # ln ${name}${unit}.360 ${name}${unit}48
+ # ln r${name}${unit}.360 r${name}${unit}48
+ # ln ${name}${unit}.360 ${name}${unit}48ds9
+ # ln r${name}${unit}.360 r${name}${unit}48ds9
+
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ft*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=ft; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64 + 32`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64 + 32`
+ ln ${name}${unit} ${name}${unit}a
+ ln r${name}${unit} r${name}${unit}a
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+od*|sd*|vn*|wd*|wfd*)
+ umask $disk_umask
+ case $i in
+ od*) name=od; blk=20; chr=70;;
+ sd*) name=sd; blk=4; chr=13;;
+ vn*) name=vn; blk=15; chr=43;;
+ wd*) name=wd; blk=0; chr=3;;
+ wfd*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*)
+ unit=`expr $i : '...\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for slicepartname in s0h s1 s2 s3 s4
+ do
+ sh MAKEDEV $name$unit$slicepartname
+ done
+ case $name in
+ od|sd)
+ minor=`dkminor 0 $unit 0 0`
+ mknod r${name}${unit}.ctl c $chr $(($minor | $scsictl))
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ccd*)
+ umask $disk_umask
+ name=ccd
+ blk=21; chr=74
+ unit=`expr $i : '...\(.*\)'`
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit 0 $part`
+ partname=`dkitop $part`
+ mknod $name$unit$partname b $blk $minor
+ mknod r$name$unit$partname c $chr $minor
+ done
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ssc*)
+ mknod ssc c 49 0
+ ;;
+
+uk*)
+ unit=`expr $i : 'uk\(.*\)'`
+ mknod uk$unit c 31 $unit
+ ;;
+
+worm*)
+ umask $disk_umask
+ unit=`expr $i : 'worm\(.*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ chr=62
+ blk=23
+ name=worm
+ mknod ${name}${unit} b $blk ${unit}
+ mknod r${name}${unit} c $chr ${unit}
+ chgrp operator ${name}${unit} r${name}${unit}
+ umask 077
+ mknod r${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+# SCSI processor type driver
+pt[0-9]*)
+ chr=61
+ name=pt
+ unit=`expr $i : 'pt\([0-9][0-9]*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ unit=`expr $unit + 1 - 1`
+ mknod ${name}${unit} c $chr $unit
+ mknod ${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+pty*)
+ class=`expr $i : 'pty\(.*\)'`
+ case $class in
+ 0) offset=0 name=p;;
+ 1) offset=32 name=q;;
+ 2) offset=64 name=r;;
+ 3) offset=96 name=s;;
+# Note that xterm (at least) only look at p-s.
+ 4) offset=128 name=P;;
+ 5) offset=160 name=Q;;
+ 6) offset=192 name=R;;
+ 7) offset=224 name=S;;
+ # This still leaves [tuTU].
+ *) echo bad unit for pty in: $i;;
+ esac
+ case $class in
+ 0|1|2|3|4|5|6|7)
+ umask 0
+ eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
+ for (i = 0; i < 32; i++) {
+ c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
+ printf("mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d;", \
+ n, c, b+i, \
+ n, c, b+i); \
+ } \
+ }'`
+ umask 77
+ ;;
+ esac
+ ;;
+
+st*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ chr=14
+
+ case $unit in
+ 0|1|2|3|4|5|6)
+ for mode in 0 1 2 3
+ do
+ mknod rst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 0`
+ mknod nrst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 1`
+ mknod erst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 2`
+ mknod st${unit}ctl.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 3`
+ chgrp operator rst${unit}.${mode}\
+ nrst${unit}.${mode} \
+ erst${unit}.${mode} \
+ st${unit}ctl.${mode}
+ chmod 600 st${unit}ctl.${mode}
+ done
+ mknod rst${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 rst${unit}.ctl
+
+ ln rst${unit}.0 rst${unit}
+ ln nrst${unit}.0 nrst${unit}
+ ln erst${unit}.0 erst${unit}
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ch*)
+ umask 37
+ unit=`expr $i : '..\(.*\)'`
+ case $i in
+ ch*) name=ch; chr=17;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit} c $chr `expr $unit '*' 16 + 0`
+ chgrp operator ${name}${unit}
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ *)
+ echo bad unit for media changer in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+cd*|mcd*|scd*)
+ umask $disk_umask
+ case $i in
+ cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
+ mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
+ scd*) unit=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ case $name in
+ cd)
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+matcd*)
+ umask 2
+ case $i in
+ matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
+
+ mknod ${name}${unit}la b $blk `expr $unit '*' 8 + 128`
+ mknod ${name}${unit}lc b $blk `expr $unit '*' 8 + 130`
+ mknod r${name}${unit}la c $chr `expr $unit '*' 8 + 128`
+ mknod r${name}${unit}lc c $chr `expr $unit '*' 8 + 130`
+ chgrp operator ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ chmod 640 ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+wcd*)
+ umask 2 ;
+ unit=`expr $i : '...\(.*\)'`
+ blk=19
+ chr=69
+ case $unit in
+ 0|1|2|3)
+ mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
+ chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+lpt*)
+ unit=`expr $i : 'lpt\(.*\)'`
+ mknod lpt$unit c 16 $unit
+ mknod lpctl$unit c 16 `expr $unit + 128`
+ ;;
+
+tw*)
+ unit=`expr $i : 'tw\(.*\)'`
+ mknod tw$unit c 19 $unit
+ chgrp operator tw$unit
+ ;;
+
+# Use this to create virtual consoles for syscons, pcvt or codrv
+# ttyv0-b
+# use as MAKEDEV vtyNN to create NN entries
+vty*)
+ chr=12
+ units=`expr $i : 'vty\(.*\)'`
+ eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
+ for (i = 0; i < n; i++)
+ printf("mknod ttyv%01x c %d %d;", i, c, i); }'`
+ ln -fs ttyv0 vga # XXX X still needs this pccons relic
+ ;;
+
+bpf*)
+ unit=`expr $i : 'bpf\(.*\)'`
+ mknod bpf$unit c 23 $unit
+ ;;
+
+speaker)
+ mknod speaker c 26 0
+ ;;
+
+cuaa?|cua?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuaa$unit c 28 `expr $m + 128`
+ mknod cuaia$unit c 28 `expr $m + 32 + 128`
+ mknod cuala$unit c 28 `expr $m + 64 + 128`
+ chown uucp.dialer cua*a$unit
+ umask 77
+ ;;
+
+tty0?|ttyd?|tty?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttyd$unit c 28 $m
+ mknod ttyid$unit c 28 `expr $m + 32`
+ mknod ttyld$unit c 28 `expr $m + 64`
+ ;;
+
+cuac?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuac$name c $major `expr $minor + 128`
+ mknod cuaic$name c $major `expr $minor + 32 + 128`
+ mknod cualc$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cuac$name cuaic$name cualc$name
+ done
+ umask 77
+ ;;
+
+ttyc?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyc$name c $major $minor
+ mknod ttyic$name c $major `expr $minor + 32`
+ mknod ttylc$name c $major `expr $minor + 64`
+ done
+ ;;
+
+# RISCom8 'rc' driver entries
+
+cuam?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuam$unit c 63 `expr $m + 128`
+ chown uucp.dialer cuam$unit
+ umask 77
+ ;;
+
+ttym?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttym$unit c 63 $m
+ ;;
+
+# Specialix SI/XIO.
+# Note: these are 'base 1' to match the numbers on the panels, and to match
+# the manual that comes with the system.
+ttyA*)
+ major=68
+ nports=`expr $i : 'ttyA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod ttyA$name c $major $minor
+ mknod ttyiA$name c $major `expr $minor + 65536`
+ mknod ttylA$name c $major `expr $minor + 131072`
+ port=`expr $port + 1`
+ done
+ # For the user-mode control program, 'sicontrol'
+ mknod si_control c 68 262144
+ ;;
+
+cuaA*)
+ umask 7
+ major=68
+ nports=`expr $i : 'cuaA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod cuaA$name c $major `expr $minor + 128`
+ mknod cuaiA$name c $major `expr $minor + 128 + 65536`
+ mknod cualA$name c $major `expr $minor + 128 + 131072`
+ chown uucp.dialer cuaA$name cuaiA$name cualA$name
+ port=`expr $port + 1`
+ done
+ umask 77
+ ;;
+
+# Digiboard PC/?? 16 port card.
+# The current scheme of minor numbering is:
+#
+# unused{14} CARD{2} major{8} CALLOUT{1} LOCK{1} INIT{1} PORT{5}
+#
+# CARD bitfield in future versions may be extended to 3 bits.
+#
+# See dgb(4)
+#
+ttyD?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyD$name c $major $minor
+ mknod ttyiD$name c $major `expr $minor + 32`
+ mknod ttylD$name c $major `expr $minor + 64`
+ done
+ ;;
+
+cuaD?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuaD$name c $major `expr $minor + 128`
+ mknod cuaiD$name c $major `expr $minor + 32 + 128`
+ mknod cualD$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cua*D$name
+ done
+ umask 77
+ ;;
+
+ttyR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/ttyR*; rm -f /dev/ttyiR*; rm -f /dev/ttylR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/ttyR$Rnum c $major $MINOR
+ mknod /dev/ttylR$Rnum c $major `expr $MINOR + 32`
+ mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ ;;
+
+cuaR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/cuaR*; rm -f /dev/cuaiR*; rm -f /dev/cualR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/cuaR$Rnum c $major `expr $MINOR + 128`
+ mknod /dev/cualR$Rnum c $major `expr $MINOR + 128 + 32`
+ mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ chown uucp.dialer /dev/cuaR*
+ ;;
+
+mse*)
+ unit=`expr $i : 'mse\(.*\)'`
+ chr=27
+ mknod mse$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+psm*)
+ unit=`expr $i : 'psm\(.*\)'`
+ chr=21
+ mknod psm$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+mouse*)
+ name=`expr $i : 'mouse\(.*\)'`
+ if [ ! -c $name ]; then
+ $0 $name # make the appropriate device
+ fi
+ ln -fs $name mouse
+ ;;
+
+pcaudio)
+ mknod pcaudio c 24 0
+ mknod pcaudioctl c 24 128
+ ;;
+
+socksys)
+ mknod socksys c 41 0
+ mknod spx c 41 1
+ ln -fs socksys nfsd
+ chmod 666 socksys nfsd spx
+ ;;
+
+snd*)
+#
+# changes from Linux voxware
+# minor Linux FreeBSD
+# 8 sequencer2 (aka music0) music0
+# 17 patmgr0 sequencer1
+# 33 patmgr1 sequencer2
+#
+
+ unit=`expr $i : 'snd\(.*\)'`
+ chr=30
+
+ # XXX write this less verbosely, like std
+ snd_security_hole=0 # XXX
+ umask $snd_security_hole
+
+ if [ $unit = "0" ] ; then
+ ln -fs mixer$unit mixer
+ ln -fs sequencer$unit sequencer
+ ln -fs dsp$unit dsp
+ ln -fs audio$unit audio
+ ln -fs dspW$unit dspW
+ ln -fs music$unit music
+ ln -fs pss$unit pss
+ fi
+
+ mknod mixer$unit c $chr `expr $unit '*' 16 + 0`
+ mknod sequencer$unit c $chr `expr $unit '*' 16 + 1`
+ mknod midi$unit c $chr `expr $unit '*' 16 + 2`
+ mknod dsp$unit c $chr `expr $unit '*' 16 + 3`
+ mknod audio$unit c $chr `expr $unit '*' 16 + 4`
+ mknod dspW$unit c $chr `expr $unit '*' 16 + 5`
+ mknod sndstat c $chr 6
+ # minor number 7 is unused
+ mknod music$unit c $chr `expr $unit '*' 16 + 8`
+ mknod pss$unit c $chr `expr $unit '*' 16 + 9`
+ # minor numbers 10-15 are unused
+ umask 77
+ ;;
+
+vat)
+ mknod vatio c 25 128
+ chmod 660 vatio
+ ;;
+
+gsc*)
+ unit=`expr $i : 'gsc\(.*\)'`
+ mknod gsc${unit} c 47 $unit
+ mknod gsc${unit}p c 47 $(($unit + 8))
+ mknod gsc${unit}d c 47 $(($unit + 32))
+ mknod gsc${unit}pd c 47 $(($unit + 40))
+ chmod 666 gsc${unit}*
+ ;;
+
+apm*)
+ chr=39
+ mknod apm c $chr 0
+ chgrp operator apm
+ chmod 660 apm
+ ;;
+
+card*)
+ unit=`expr $i : 'card\(.*\)'`
+ chr=50
+ mknod card$unit c $chr $unit
+ chmod 644 card$unit
+ ;;
+
+ttyx?|ttyy?|ttyz?)
+ case $i in
+ *0) unit=0;; *1) unit=1;; *2) unit=2;; *3) unit=3;;
+ *4) unit=4;; *5) unit=5;; *6) unit=6;; *7) unit=7;;
+ *8) unit=8;; *9) unit=9;; *a) unit=10;; *b) unit=11;;
+ *c) unit=12;; *d) unit=13;; *e) unit=14;; *f) unit=15;;
+ esac
+ case $i in
+ ttyy?) unit=`expr $unit \+ 16`;;
+ ttyz?) unit=`expr $unit \+ 32`;;
+ esac
+ mknod $i c 42 $unit
+ chown uucp.wheel $i
+ ;;
+
+cronyx)
+ mknod cronyx c 42 63
+ ;;
+
+joy)
+ mknod joy0 c 51 0
+ mknod joy1 c 51 1
+ chgrp operator joy0 joy1
+ chmod 640 joy0 joy1
+ ;;
+
+spigot)
+ mknod spigot c 11 0
+ chmod 444 spigot
+ ;;
+
+ctx?)
+ unit=`expr $i : 'ctx\(.*\)'`
+ mknod ctx$unit c 40 $unit
+ chmod 444 ctx$unit
+ ;;
+
+meteor?)
+ unit=`expr $i : 'meteor\(.*\)'`
+ mknod meteor$unit c 67 $unit
+ chmod 444 meteor$unit
+ ;;
+
+bktr?)
+ unit=`expr $i : 'bktr\(.*\)'`
+ mknod bktr$unit c 92 $unit
+ mknod tuner$unit c 92 $((16 + $unit ))
+ chmod 444 bktr$unit tuner$unit
+ ;;
+
+tun*)
+ ntun=`expr $i : 'tun\(.*\)$'`
+ unit=0
+ while [ $unit -le $ntun ]; do
+ mknod tun$unit c 52 $unit
+ chown uucp.dialer tun$unit
+ unit=`expr $unit + 1`
+ done
+ ;;
+
+sysmouse)
+ mknod sysmouse c 12 128
+ mknod consolectl c 12 255
+ ;;
+
+snp?)
+ unit=`expr $i : 'snp\(.*\)'`
+ mknod snp$unit c 53 $unit
+ ;;
+
+# dufault@hda.com: If I do much more work on other A-D boards
+# then eventually we'll have a "ad" and "dio" interface and some of these
+# "labpcaio" ones will be gone.
+# labpcaio: D-A and A-D.
+# labpcdio: Digital in and Digital out.
+#
+labpc*)
+ umask 7
+ case $i in
+ labpcaio*)
+ name=labpcaio
+ unit=`expr $i : 'labpcaio\(.*\)'`
+ all="0 1 2 3 4 5 6 7"
+ offset=0
+ ;;
+ labpcdio*)
+ name=labpcdio
+ unit=`expr $i : 'labpcdio\(.*\)'`
+ all="0 1 2 3"
+ offset=8
+ ;;
+ *)
+ die 3 "Don't know LabPC type $i"
+ ;;
+ esac
+ if [ "X${unit}" = "X" ]; then
+ unit=all
+ fi
+ case $unit in
+ 0|1|2|3|4|5|6|7)
+ mknod $name$unit c 66 `expr $offset + $unit `
+ ;;
+ all)
+ for i in $all
+ do
+ mknod $name$i c 66 `expr $offset + $i `
+ done
+ ;;
+ *)
+ echo "No such LabPC unit: $unit"
+ ;;
+ esac
+ umask 77
+ ;;
+
+perfmon)
+ mknod perfmon c 2 32
+ chgrp kmem perfmon
+ chmod 640 perfmon
+ ;;
+
+ipl)
+ mknod ipl c 79 0
+ mknod ipnat c 79 1
+ mknod ipstate c 79 2
+ mknod ipauth c 79 3
+ ;;
+
+local)
+ umask 0 # XXX should be elsewhere
+ sh MAKEDEV.local
+ umask 77
+ ;;
+
+*)
+ echo $i - no such device name
+ ;;
+
+esac
+done
diff --git a/release/picobsd/isp/mfs.tree/Makefile b/release/picobsd/isp/mfs.tree/Makefile
new file mode 100644
index 0000000..3e9344f
--- /dev/null
+++ b/release/picobsd/isp/mfs.tree/Makefile
@@ -0,0 +1,41 @@
+#
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:47 abial Exp $
+#
+
+DESTDIR?=/mnt
+
+STAND_LINKS= bin sbin
+USR_LINKS= bin sbin libexec
+PL_LOCALE_LINKS= pl polish
+
+all: tree links
+
+tree:
+ mtree -deU -f mfs.mtree -p ${DESTDIR}
+
+links: tree
+ (cd ${DESTDIR}; \
+ for i in ${STAND_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd var/run; \
+ ln -s /dev/null log; \
+ cd ../../usr; \
+ for i in ${USR_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd share/misc;\
+ ln -s /etc/termcap termcap; )
+
+
+# We don't do it under 'all' because it's needed only on non-DEVFS systems
+devnodes: tree
+ (cp MAKEDEV ${DESTDIR}/dev/; \
+ cd ${DESTDIR}/dev; \
+ ./MAKEDEV std tun2 vty10 fd0 wd0 wd0s1h pty0 vn0; \
+ ./MAKEDEV rp0 rp1 cy0 cy1; \
+ ./MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 cuaa4; \
+ ./MAKEDEV cuaa5 cuaa6 cuaa7 cuaa8 cuaa9; \
+ rm MAKEDEV;)
diff --git a/release/picobsd/isp/mfs.tree/mfs.mtree b/release/picobsd/isp/mfs.tree/mfs.mtree
new file mode 100644
index 0000000..1703df5
--- /dev/null
+++ b/release/picobsd/isp/mfs.tree/mfs.mtree
@@ -0,0 +1,56 @@
+#
+# $Id: mfs.mtree,v 1.1.1.1 1998/07/14 07:30:47 abial Exp $
+#
+/set type=dir uname=root gname=wheel mode=0755
+.
+ dev
+ ..
+ dos
+ ..
+ etc
+ ..
+ home
+ user
+ ..
+ ..
+ mnt
+ ..
+ mnt1
+ ..
+ mnt2
+ ..
+ proc
+ ..
+ root
+ ..
+ stand
+ ..
+ start_floppy
+ ..
+ tftpboot
+ ..
+ tmp
+ ..
+ usr
+ local
+ lib
+ snmp
+ ..
+ ..
+ ..
+ share
+ misc
+ ..
+ ..
+ ..
+ var
+ db
+ ..
+ run
+ ..
+ spool
+ lock
+ ..
+ ..
+ ..
+..
diff --git a/release/picobsd/net/conf/PICOBSD b/release/picobsd/net/conf/PICOBSD
new file mode 100644
index 0000000..0097c68
--- /dev/null
+++ b/release/picobsd/net/conf/PICOBSD
@@ -0,0 +1,94 @@
+#
+# $Id: PICOBSD,v 1.2 1998/08/02 12:23:17 abial Exp $
+#
+
+machine "i386"
+cpu "I386_CPU"
+cpu "I486_CPU"
+cpu "I586_CPU"
+cpu "I686_CPU"
+ident PICOBSD
+maxusers 10
+
+options MATH_EMULATE #Support for x87 emulation
+options INET #InterNETworking
+options FFS #Berkeley Fast Filesystem
+options NFS #Network Filesystem
+options MFS
+options MSDOSFS #MSDOS Filesystem
+options "CD9660" #ISO 9660 Filesystem
+options PROCFS #Process filesystem
+options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
+options USERCONFIG #boot -c editor
+options USERCONFIG_BOOT #imply -c and parse info area
+options VISUAL_USERCONFIG #visual boot -c editor
+options IPFIREWALL
+options IPFIREWALL_DEFAULT_TO_ACCEPT
+options IPDIVERT
+options PCI_QUIET
+options DEVFS
+options SLICE
+
+config kernel root on fd0
+
+controller isa0
+controller pci0
+
+controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+disk fd0 at fdc0 drive 0
+#disk fd1 at fdc0 drive 1
+
+options "CMD640" # work around CMD640 chip deficiency
+controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
+disk wd0 at wdc0 drive 0
+disk wd1 at wdc0 drive 1
+
+controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr
+disk wd2 at wdc1 drive 0
+disk wd3 at wdc1 drive 1
+
+options ATAPI #Enable ATAPI support for IDE bus
+options ATAPI_STATIC #Don't do it as an LKM
+device wcd0 #IDE CD-ROM
+
+# syscons is the default console driver, resembling an SCO console
+device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
+
+device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
+
+device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr
+device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
+device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr
+device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr
+
+device lpt0 at isa? port? tty irq 7 vector lptintr
+
+# Order is important here due to intrusive probes, do *not* alphabetize
+# this list of network interfaces until the probes have been fixed.
+# Right now it appears that the ie0 must be probed before ep0. See
+# revision 1.20 of this file.
+device de0
+device de1
+device fxp0
+device fxp1
+
+device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr
+device ed1 at isa? port 0x300 net irq 5 iomem 0xd0000 vector edintr
+device ie0 at isa? port 0x280 net irq 10 iomem 0xd0000 vector ieintr
+device ie1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector ieintr
+device ep0 at isa? port 0x300 net irq 10 vector epintr
+device ep1 at isa? port 0x280 net irq 5 vector epintr
+#device ex0 at isa? port? net irq? vector exintr
+#device fe0 at isa? port 0x300 net irq ? vector feintr
+#device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
+#device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zeintr
+#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
+
+pseudo-device loop
+pseudo-device ether
+pseudo-device tun 2
+#pseudo-device vn
+pseudo-device pty 16
+pseudo-device gzip # Exec gzipped a.out's
diff --git a/release/picobsd/net/crunch1/Makefile b/release/picobsd/net/crunch1/Makefile
new file mode 100644
index 0000000..f356c9d
--- /dev/null
+++ b/release/picobsd/net/crunch1/Makefile
@@ -0,0 +1,48 @@
+#
+# $Id: Makefile,v 1.3 1998/08/10 19:39:06 abial Exp $
+#
+SRC?=/usr/src
+
+all: crunch
+
+crunch:
+ @if [ ! -f .patched ]; then \
+ cat login.diff|(cd /usr/src/usr.bin/login; patch -p0); \
+ cat passwd.diff|(cd /usr/src/usr.bin/passwd; patch -p0); \
+ cat ppp.diff|(cd /usr/src/usr.sbin/ppp; patch -p0); \
+ touch .patched; \
+ fi
+ @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
+ @crunchgen ./crunch1.conf
+ @${MAKE} -f crunch1.mk all \
+ "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY -DNOSECURE -DNOCRYPT" 2>&1 >/dev/null
+
+clean:
+ @if [ -f .patched ]; then \
+ cat login.diff|(cd /usr/src/usr.bin/login; patch -R -p0); \
+ cat passwd.diff|(cd /usr/src/usr.bin/passwd; patch -R -p0); \
+ cat ppp.diff|(cd /usr/src/usr.sbin/ppp; patch -R -p0); \
+ rm .patched; \
+ fi
+ rm -f *.o *.stub *.lo *_stub.c *.mk \
+ crunch.cache \
+ crunch.mk \
+ crunch.c \
+ crunch1* \
+ crunch \
+ .tmp_* \
+ *.gz
+
+install:
+ cp crunch1 /mnt/stand/crunch
+ chmod 555 /mnt/stand/crunch
+ for i in `crunchgen -l crunch1.conf` ; \
+ do \
+ ln /mnt/stand/crunch /mnt/stand/$${i}; \
+ done
+ rm /mnt/stand/crunch
+ # Install the MIB files
+ cp mibs/*.txt /mnt/usr/local/share/snmp/mibs/
+
+
+.include <bsd.prog.mk>
diff --git a/release/picobsd/net/crunch1/crunch.conf b/release/picobsd/net/crunch1/crunch.conf
new file mode 100644
index 0000000..0cfa3b5
--- /dev/null
+++ b/release/picobsd/net/crunch1/crunch.conf
@@ -0,0 +1,56 @@
+#
+# $Id: crunch.conf,v 1.3 1998/08/02 12:23:45 abial Exp $
+#
+# NOTE: the string "/usr/src" will be automatically replaced with the
+# correct value set in 'build' script - you should change it there
+
+# sources for kget & vm
+srcdirs ../../tinyware
+# sources for ucd-snmp - they must be already patched & configured!
+# The necessary steps are given below:
+# * you have to symlink subdirectory agent -> snmpd
+# * you have to properly construct an OBJS variable in snmpd/Makefile:
+# OBJS=${MIBOBJS} ${AGENTOBJS}
+# * we install a special version of MIB files - stripped of comments and
+# descriptions. These MIBs are included here to save you the stripping.
+srcdirs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1
+# other sources
+srcdirs /usr/src/bin
+srcdirs /usr/src/sbin/i386
+srcdirs /usr/src/sbin
+srcdirs /usr/src/usr.bin
+srcdirs /usr/src/gnu/usr.bin
+srcdirs /usr/src/usr.sbin
+srcdirs /usr/src/libexec
+
+progs ash test echo hostname ln login getty stty
+progs inetd telnetd w dmesg kget snmpd
+progs init ifconfig df sps ns vm cat
+progs cp rm mknod chmod chown mkdir ls syslogd
+progs sysctl route pwd_mkdb dev_mkdb
+progs mount mount_msdos umount
+progs kill mount_std natd
+
+progs pwd ppp telnet more
+progs passwd date
+progs mount_cd9660 mount_nfs ping traceroute routed ipfw
+
+ln mount_cd9660 cd9660
+ln mount_nfs nfs
+ln test [
+ln ash -sh
+ln ash sh
+# XXX Why? Some bug in crunchgen?
+#ln newfs mfs
+ln mount_msdos msdos
+ln mount_std procfs
+ln mount_std mount_procfs
+ln sps ps
+ln ns netstat
+ln chown chgrp
+
+# For snmpd
+libs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1/snmplib/libsnmp.a
+libs -lncurses -lmytinfo -lipx -lz -lpcap -lalias
+libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm
+libs -lgnuregex -ltelnet
diff --git a/release/picobsd/net/crunch1/login.diff b/release/picobsd/net/crunch1/login.diff
new file mode 100644
index 0000000..98af18b
--- /dev/null
+++ b/release/picobsd/net/crunch1/login.diff
@@ -0,0 +1,33 @@
+*** Makefile.orig Sat Aug 1 20:35:53 1998
+--- Makefile Sat Aug 1 20:36:50 1998
+***************
+*** 9,22 ****
+ #Uncomment to activate login_auth
+ #Warning: requires src/libexec/login_* auth modules
+ #LC_AUTH=-DLOGIN_CAP_AUTH
+! CFLAGS+=-Wall -DSKEY -DLOGIN_ACCESS -DLOGALL -DLOGIN_CAP $(LC_AUTH)
+
+ .if defined(KLOGIN_PARANOID)
+ CFLAGS+=-DKLOGIN_PARANOID
+ .endif
+
+! DPADD= ${LIBUTIL} ${LIBSKEY} ${LIBMD} ${LIBCRYPT}
+! LDADD= -lutil -lskey -lmd -lcrypt
+
+ .if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(LC_AUTH)
+ CFLAGS+=-DKERBEROS
+--- 9,22 ----
+ #Uncomment to activate login_auth
+ #Warning: requires src/libexec/login_* auth modules
+ #LC_AUTH=-DLOGIN_CAP_AUTH
+! CFLAGS+=-Wall $(LC_AUTH)
+
+ .if defined(KLOGIN_PARANOID)
+ CFLAGS+=-DKLOGIN_PARANOID
+ .endif
+
+! DPADD= ${LIBUTIL} ${LIBMD} ${LIBCRYPT}
+! LDADD= -lutil -lmd -lcrypt
+
+ .if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4) && !defined(LC_AUTH)
+ CFLAGS+=-DKERBEROS
diff --git a/release/picobsd/net/crunch1/mibs/EtherLike-MIB.txt b/release/picobsd/net/crunch1/mibs/EtherLike-MIB.txt
new file mode 100644
index 0000000..82b19ac
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/EtherLike-MIB.txt
@@ -0,0 +1,318 @@
+EtherLike-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ ifEntry, ifIndex
+ FROM IF-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress, TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ transmission, mib-2, Integer32, Gauge32, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+etherMIB MODULE-IDENTITY
+ LAST-UPDATED "9402030400Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street
+ North Andover, MA 01845
+ US
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 35 }
+
+etherMIBObjects ::= { etherMIB 1 }
+
+dot3 ::= { transmission 7 }
+
+dot3StatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 2 }
+
+dot3StatsEntry OBJECT-TYPE
+ SYNTAX Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { dot3StatsIndex }
+ ::= { dot3StatsTable 1 }
+
+Dot3StatsEntry ::=
+ SEQUENCE {
+ dot3StatsIndex
+ INTEGER,
+
+ dot3StatsAlignmentErrors
+ Counter32,
+
+ dot3StatsFCSErrors
+ Counter32,
+
+ dot3StatsSingleCollisionFrames
+ Counter32,
+
+ dot3StatsMultipleCollisionFrames
+ Counter32,
+
+ dot3StatsSQETestErrors
+ Counter32,
+
+ dot3StatsDeferredTransmissions
+ Counter32,
+
+ dot3StatsLateCollisions
+ Counter32,
+
+ dot3StatsExcessiveCollisions
+ Counter32,
+
+ dot3StatsInternalMacTransmitErrors
+ Counter32,
+
+ dot3StatsCarrierSenseErrors
+ Counter32,
+
+ dot3StatsFrameTooLongs
+ Counter32,
+
+ dot3StatsInternalMacReceiveErrors
+ Counter32,
+
+ dot3StatsEtherChipSet
+ OBJECT IDENTIFIER
+ }
+
+dot3StatsIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 1 }
+
+dot3StatsAlignmentErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 2 }
+
+dot3StatsFCSErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 3 }
+
+dot3StatsSingleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 4 }
+
+dot3StatsMultipleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 5 }
+
+dot3StatsSQETestErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "ANSI/IEEE Std 802.3-1985 Carrier Sense
+ Multiple Access with Collision Detection Access
+ Method and Physical Layer Specifications"
+ ::= { dot3StatsEntry 6 }
+
+dot3StatsDeferredTransmissions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 7 }
+
+dot3StatsLateCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 8 }
+
+dot3StatsExcessiveCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 9 }
+
+dot3StatsInternalMacTransmitErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 10 }
+
+dot3StatsCarrierSenseErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 11 }
+
+dot3StatsFrameTooLongs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 13 }
+
+dot3StatsInternalMacReceiveErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 16 }
+
+dot3StatsEtherChipSet OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 17 }
+
+dot3CollTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 5 }
+
+dot3CollEntry OBJECT-TYPE
+ SYNTAX Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, dot3CollCount }
+ ::= { dot3CollTable 1 }
+
+Dot3CollEntry ::=
+ SEQUENCE {
+ dot3CollCount
+ INTEGER,
+
+ dot3CollFrequencies
+ Counter32
+ }
+
+dot3CollCount OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3CollEntry 2 }
+
+dot3CollFrequencies OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3CollEntry 3 }
+
+dot3Tests ::= { dot3 6 }
+
+dot3Errors ::= { dot3 7 }
+
+dot3TestTdr ::= { dot3Tests 1 }
+
+dot3TestLoopBack ::= { dot3Tests 2 }
+
+dot3ErrorInitError ::= { dot3Errors 1 }
+
+dot3ErrorLoopbackError ::= { dot3Errors 2 }
+
+dot3ChipSets ::= { dot3 8 }
+
+dot3ChipSetAMD ::= { dot3ChipSets 1 }
+
+dot3ChipSetAMD7990 ::= { dot3ChipSetAMD 1 }
+
+dot3ChipSetAMD79900 ::= { dot3ChipSetAMD 2 }
+
+dot3ChipSetAMD79C940 ::= { dot3ChipSetAMD 3 }
+
+dot3ChipSetIntel ::= { dot3ChipSets 2 }
+
+dot3ChipSetIntel82586 ::= { dot3ChipSetIntel 1 }
+
+dot3ChipSetIntel82596 ::= { dot3ChipSetIntel 2 }
+
+dot3ChipSetSeeq ::= { dot3ChipSets 3 }
+
+dot3ChipSetSeeq8003 ::= { dot3ChipSetSeeq 1 }
+
+dot3ChipSetNational ::= { dot3ChipSets 4 }
+
+dot3ChipSetNational8390 ::= { dot3ChipSetNational 1 }
+
+dot3ChipSetNationalSonic ::= { dot3ChipSetNational 2 }
+
+dot3ChipSetFujitsu ::= { dot3ChipSets 5 }
+
+dot3ChipSetFujitsu86950 ::= { dot3ChipSetFujitsu 1 }
+
+dot3ChipSetDigital ::= { dot3ChipSets 6 }
+
+dot3ChipSetDigitalDC21040 ::= { dot3ChipSetDigital 1 }
+
+etherConformance ::= { etherMIB 2 }
+
+etherGroups ::= { etherConformance 1 }
+
+etherCompliances ::= { etherConformance 2 }
+
+etherCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { etherStatsGroup }
+ GROUP etherCollisionTableGroup
+ ::= { etherCompliances 1 }
+
+etherStatsGroup OBJECT-GROUP
+ OBJECTS {
+ dot3StatsIndex,
+ dot3StatsAlignmentErrors,
+ dot3StatsFCSErrors,
+ dot3StatsSingleCollisionFrames,
+ dot3StatsMultipleCollisionFrames,
+ dot3StatsSQETestErrors,
+ dot3StatsDeferredTransmissions,
+ dot3StatsLateCollisions,
+ dot3StatsExcessiveCollisions,
+ dot3StatsInternalMacTransmitErrors,
+ dot3StatsCarrierSenseErrors,
+ dot3StatsFrameTooLongs,
+ dot3StatsInternalMacReceiveErrors,
+ dot3StatsEtherChipSet
+ }
+ STATUS current
+ ::= { etherGroups 1 }
+
+etherCollisionTableGroup OBJECT-GROUP
+ OBJECTS { dot3CollCount, dot3CollFrequencies }
+ STATUS current
+ ::= { etherGroups 2 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/HOST-RESOURCES-MIB.txt b/release/picobsd/net/crunch1/mibs/HOST-RESOURCES-MIB.txt
new file mode 100644
index 0000000..078dc02
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/HOST-RESOURCES-MIB.txt
@@ -0,0 +1,877 @@
+HOST-RESOURCES-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ Gauge, Counter, TimeTicks
+ FROM RFC1155-SMI
+ mib-2, DisplayString
+ FROM RFC1213-MIB
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+host ::= { mib-2 25 }
+
+hrSystem ::= { host 1 }
+
+hrStorage ::= { host 2 }
+
+hrDevice ::= { host 3 }
+
+hrSWRun ::= { host 4 }
+
+hrSWRunPerf ::= { host 5 }
+
+hrSWInstalled ::= { host 6 }
+
+Boolean ::=
+ INTEGER {
+ true(1),
+ false(2)
+ }
+
+KBytes ::=
+ INTEGER
+
+ProductID ::=
+ OBJECT IDENTIFIER
+
+DateAndTime ::=
+ OCTET STRING
+
+InternationalDisplayString ::=
+ OCTET STRING
+
+hrSystemUptime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 1 }
+
+hrSystemDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 2 }
+
+hrSystemInitialLoadDevice OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 3 }
+
+hrSystemInitialLoadParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 4 }
+
+hrSystemNumUsers OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 5 }
+
+hrSystemProcesses OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 6 }
+
+hrSystemMaxProcesses OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 7 }
+
+hrStorageTypes ::= { hrStorage 1 }
+
+hrStorageOther ::= { hrStorageTypes 1 }
+
+hrStorageRam ::= { hrStorageTypes 2 }
+
+hrStorageVirtualMemory ::= { hrStorageTypes 3 }
+
+hrStorageFixedDisk ::= { hrStorageTypes 4 }
+
+hrStorageRemovableDisk ::= { hrStorageTypes 5 }
+
+hrStorageFloppyDisk ::= { hrStorageTypes 6 }
+
+hrStorageCompactDisc ::= { hrStorageTypes 7 }
+
+hrStorageRamDisk ::= { hrStorageTypes 8 }
+
+hrMemorySize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorage 2 }
+
+hrStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrStorage 3 }
+
+hrStorageEntry OBJECT-TYPE
+ SYNTAX HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrStorageIndex }
+ ::= { hrStorageTable 1 }
+
+HrStorageEntry ::=
+ SEQUENCE {
+ hrStorageIndex
+ INTEGER,
+
+ hrStorageType
+ OBJECT IDENTIFIER,
+
+ hrStorageDescr
+ DisplayString,
+
+ hrStorageAllocationUnits
+ INTEGER,
+
+ hrStorageSize
+ INTEGER,
+
+ hrStorageUsed
+ INTEGER,
+
+ hrStorageAllocationFailures
+ Counter
+ }
+
+hrStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 1 }
+
+hrStorageType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 2 }
+
+hrStorageDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 3 }
+
+hrStorageAllocationUnits OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 4 }
+
+hrStorageSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrStorageEntry 5 }
+
+hrStorageUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 6 }
+
+hrStorageAllocationFailures OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 7 }
+
+hrDeviceTypes ::= { hrDevice 1 }
+
+hrDeviceOther ::= { hrDeviceTypes 1 }
+
+hrDeviceUnknown ::= { hrDeviceTypes 2 }
+
+hrDeviceProcessor ::= { hrDeviceTypes 3 }
+
+hrDeviceNetwork ::= { hrDeviceTypes 4 }
+
+hrDevicePrinter ::= { hrDeviceTypes 5 }
+
+hrDeviceDiskStorage ::= { hrDeviceTypes 6 }
+
+hrDeviceVideo ::= { hrDeviceTypes 10 }
+
+hrDeviceAudio ::= { hrDeviceTypes 11 }
+
+hrDeviceCoprocessor ::= { hrDeviceTypes 12 }
+
+hrDeviceKeyboard ::= { hrDeviceTypes 13 }
+
+hrDeviceModem ::= { hrDeviceTypes 14 }
+
+hrDeviceParallelPort ::= { hrDeviceTypes 15 }
+
+hrDevicePointing ::= { hrDeviceTypes 16 }
+
+hrDeviceSerialPort ::= { hrDeviceTypes 17 }
+
+hrDeviceTape ::= { hrDeviceTypes 18 }
+
+hrDeviceClock ::= { hrDeviceTypes 19 }
+
+hrDeviceVolatileMemory ::= { hrDeviceTypes 20 }
+
+hrDeviceNonVolatileMemory ::= { hrDeviceTypes 21 }
+
+hrDeviceTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 2 }
+
+hrDeviceEntry OBJECT-TYPE
+ SYNTAX HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDeviceTable 1 }
+
+HrDeviceEntry ::=
+ SEQUENCE {
+ hrDeviceIndex
+ INTEGER,
+
+ hrDeviceType
+ OBJECT IDENTIFIER,
+
+ hrDeviceDescr
+ DisplayString,
+
+ hrDeviceID
+ ProductID,
+
+ hrDeviceStatus
+ INTEGER,
+
+ hrDeviceErrors
+ Counter
+ }
+
+hrDeviceIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 1 }
+
+hrDeviceType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 2 }
+
+hrDeviceDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 3 }
+
+hrDeviceID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 4 }
+
+hrDeviceStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ running(2),
+ warning(3),
+ testing(4),
+ down(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 5 }
+
+hrDeviceErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 6 }
+
+hrProcessorTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 3 }
+
+hrProcessorEntry OBJECT-TYPE
+ SYNTAX HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrProcessorTable 1 }
+
+HrProcessorEntry ::=
+ SEQUENCE {
+ hrProcessorFrwID
+ ProductID,
+
+ hrProcessorLoad
+ INTEGER
+ }
+
+hrProcessorFrwID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 1 }
+
+hrProcessorLoad OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 2 }
+
+hrNetworkTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 4 }
+
+hrNetworkEntry OBJECT-TYPE
+ SYNTAX HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrNetworkTable 1 }
+
+HrNetworkEntry ::=
+ SEQUENCE {
+ hrNetworkIfIndex
+ INTEGER
+ }
+
+hrNetworkIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrNetworkEntry 1 }
+
+hrPrinterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 5 }
+
+hrPrinterEntry OBJECT-TYPE
+ SYNTAX HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrPrinterTable 1 }
+
+HrPrinterEntry ::=
+ SEQUENCE {
+ hrPrinterStatus
+ INTEGER,
+
+ hrPrinterDetectedErrorState
+ OCTET STRING
+ }
+
+hrPrinterStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ idle(3),
+ printing(4),
+ warmup(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 1 }
+
+hrPrinterDetectedErrorState OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 2 }
+
+hrDiskStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 6 }
+
+hrDiskStorageEntry OBJECT-TYPE
+ SYNTAX HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDiskStorageTable 1 }
+
+HrDiskStorageEntry ::=
+ SEQUENCE {
+ hrDiskStorageAccess
+ INTEGER,
+
+ hrDiskStorageMedia
+ INTEGER,
+
+ hrDiskStorageRemoveble
+ Boolean,
+
+ hrDiskStorageCapacity
+ KBytes
+ }
+
+hrDiskStorageAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 1 }
+
+hrDiskStorageMedia OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ hardDisk(3),
+ floppyDisk(4),
+ opticalDiskROM(5),
+ opticalDiskWORM(6),
+ opticalDiskRW(7),
+ ramDisk(8)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 2 }
+
+hrDiskStorageRemoveble OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 3 }
+
+hrDiskStorageCapacity OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 4 }
+
+hrPartitionTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 7 }
+
+hrPartitionEntry OBJECT-TYPE
+ SYNTAX HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex, hrPartitionIndex }
+ ::= { hrPartitionTable 1 }
+
+HrPartitionEntry ::=
+ SEQUENCE {
+ hrPartitionIndex
+ INTEGER,
+
+ hrPartitionLabel
+ InternationalDisplayString,
+
+ hrPartitionID
+ OCTET STRING,
+
+ hrPartitionSize
+ KBytes,
+
+ hrPartitionFSIndex
+ INTEGER
+ }
+
+hrPartitionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 1 }
+
+hrPartitionLabel OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 2 }
+
+hrPartitionID OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 3 }
+
+hrPartitionSize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 4 }
+
+hrPartitionFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 5 }
+
+hrFSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 8 }
+
+hrFSEntry OBJECT-TYPE
+ SYNTAX HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrFSIndex }
+ ::= { hrFSTable 1 }
+
+hrFSTypes ::= { hrDevice 9 }
+
+hrFSOther ::= { hrFSTypes 1 }
+
+hrFSUnknown ::= { hrFSTypes 2 }
+
+hrFSBerkeleyFFS ::= { hrFSTypes 3 }
+
+hrFSSys5FS ::= { hrFSTypes 4 }
+
+hrFSFat ::= { hrFSTypes 5 }
+
+hrFSHPFS ::= { hrFSTypes 6 }
+
+hrFSHFS ::= { hrFSTypes 7 }
+
+hrFSMFS ::= { hrFSTypes 8 }
+
+hrFSNTFS ::= { hrFSTypes 9 }
+
+hrFSVNode ::= { hrFSTypes 10 }
+
+hrFSJournaled ::= { hrFSTypes 11 }
+
+hrFSiso9660 ::= { hrFSTypes 12 }
+
+hrFSRockRidge ::= { hrFSTypes 13 }
+
+hrFSNFS ::= { hrFSTypes 14 }
+
+hrFSNetware ::= { hrFSTypes 15 }
+
+hrFSAFS ::= { hrFSTypes 16 }
+
+hrFSDFS ::= { hrFSTypes 17 }
+
+hrFSAppleshare ::= { hrFSTypes 18 }
+
+hrFSRFS ::= { hrFSTypes 19 }
+
+hrFSDGCFS ::= { hrFSTypes 20 }
+
+hrFSBFS ::= { hrFSTypes 21 }
+
+HrFSEntry ::=
+ SEQUENCE {
+ hrFSIndex
+ INTEGER,
+
+ hrFSMountPoint
+ InternationalDisplayString,
+
+ hrFSRemoteMountPoint
+ InternationalDisplayString,
+
+ hrFSType
+ OBJECT IDENTIFIER,
+
+ hrFSAccess
+ INTEGER,
+
+ hrFSBootable
+ Boolean,
+
+ hrFSStorageIndex
+ INTEGER,
+
+ hrFSLastFullBackupDate
+ DateAndTime,
+
+ hrFSLastPartialBackupDate
+ DateAndTime
+ }
+
+hrFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 1 }
+
+hrFSMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 2 }
+
+hrFSRemoteMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 3 }
+
+hrFSType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 4 }
+
+hrFSAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 5 }
+
+hrFSBootable OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 6 }
+
+hrFSStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 7 }
+
+hrFSLastFullBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 8 }
+
+hrFSLastPartialBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 9 }
+
+hrSWOSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRun 1 }
+
+hrSWRunTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRun 2 }
+
+hrSWRunEntry OBJECT-TYPE
+ SYNTAX HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunTable 1 }
+
+HrSWRunEntry ::=
+ SEQUENCE {
+ hrSWRunIndex
+ INTEGER,
+
+ hrSWRunName
+ InternationalDisplayString,
+
+ hrSWRunID
+ ProductID,
+
+ hrSWRunPath
+ InternationalDisplayString,
+
+ hrSWRunParameters
+ InternationalDisplayString,
+
+ hrSWRunType
+ INTEGER,
+
+ hrSWRunStatus
+ INTEGER
+ }
+
+hrSWRunIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 1 }
+
+hrSWRunName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 2 }
+
+hrSWRunID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 3 }
+
+hrSWRunPath OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 4 }
+
+hrSWRunParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 5 }
+
+hrSWRunType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 6 }
+
+hrSWRunStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ running(1),
+ runnable(2),
+ notRunnable(3),
+ invalid(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSWRunEntry 7 }
+
+hrSWRunPerfTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRunPerf 1 }
+
+hrSWRunPerfEntry OBJECT-TYPE
+ SYNTAX HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunPerfTable 1 }
+
+HrSWRunPerfEntry ::=
+ SEQUENCE {
+ hrSWRunPerfCPU
+ INTEGER,
+
+ hrSWRunPerfMem
+ KBytes
+ }
+
+hrSWRunPerfCPU OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 1 }
+
+hrSWRunPerfMem OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 2 }
+
+hrSWInstalledLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 1 }
+
+hrSWInstalledLastUpdateTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 2 }
+
+hrSWInstalledTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWInstalled 3 }
+
+hrSWInstalledEntry OBJECT-TYPE
+ SYNTAX HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWInstalledIndex }
+ ::= { hrSWInstalledTable 1 }
+
+HrSWInstalledEntry ::=
+ SEQUENCE {
+ hrSWInstalledIndex
+ INTEGER,
+
+ hrSWInstalledName
+ InternationalDisplayString,
+
+ hrSWInstalledID
+ ProductID,
+
+ hrSWInstalledType
+ INTEGER,
+
+ hrSWInstalledDate
+ DateAndTime
+ }
+
+hrSWInstalledIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 1 }
+
+hrSWInstalledName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 2 }
+
+hrSWInstalledID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 3 }
+
+hrSWInstalledType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 4 }
+
+hrSWInstalledDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 5 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/IANAifType-MIB.txt b/release/picobsd/net/crunch1/mibs/IANAifType-MIB.txt
new file mode 100644
index 0000000..2f3a4ec
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/IANAifType-MIB.txt
@@ -0,0 +1,81 @@
+IANAifType-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ mib-2, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ianaifType MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IANA"
+ CONTACT-INFO
+ "Internet Assigned Numbers Authority
+
+ Postal: USC/Information Sciences Institute
+ 4676 Admiralty Way, Marina del Rey, CA 90292
+
+ Tel: +1 310 822 1511
+ E-Mail: iana@isi.edu"
+ ::= { mib-2 30 }
+
+IANAifType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ regular1822(2),
+ hdh1822(3),
+ ddnX25(4),
+ rfc877x25(5),
+ ethernetCsmacd(6),
+ iso88023Csmacd(7),
+ iso88024TokenBus(8),
+ iso88025TokenRing(9),
+ iso88026Man(10),
+ starLan(11),
+ proteon10Mbit(12),
+ proteon80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ ds1(18),
+ e1(19),
+ basicISDN(20),
+ primaryISDN(21),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ eon(25),
+ ethernet3Mbit(26),
+ nsip(27),
+ slip(28),
+ ultra(29),
+ ds3(30),
+ sip(31),
+ frameRelay(32),
+ rs232(33),
+ para(34),
+ arcnet(35),
+ arcnetPlus(36),
+ atm(37),
+ miox25(38),
+ sonet(39),
+ x25ple(40),
+ iso88022llc(41),
+ localTalk(42),
+ smdsDxi(43),
+ frameRelayService(44),
+ v35(45),
+ hssi(46),
+ hippi(47),
+ modem(48),
+ aal5(49),
+ sonetPath(50),
+ sonetVT(51),
+ smdsIcip(52),
+ propVirtual(53),
+ propMultiplexor(54)
+ }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/IF-MIB.txt b/release/picobsd/net/crunch1/mibs/IF-MIB.txt
new file mode 100644
index 0000000..af9aab5
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/IF-MIB.txt
@@ -0,0 +1,822 @@
+IF-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ IANAifType
+ FROM IANAifType-MIB
+ snmpTraps
+ FROM SNMPv2-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TestAndIncr, AutonomousType, RowStatus, TruthValue, PhysAddress, DisplayString,
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ NOTIFICATION-TYPE, mib-2, Counter64, TimeTicks, Integer32, Gauge32, Counter32,
+ OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+interfaces ::= { mib-2 2 }
+
+ifMIB MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road, Mountain View, CA 94043
+
+ Tel: +1 415 966 7934
+ E-Mail: kzm@hls.com
+
+ Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street, North Andover, MA 01845
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 31 }
+
+ifMIBObjects ::= { ifMIB 1 }
+
+OwnerString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+InterfaceIndex ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "d"
+ STATUS current
+ SYNTAX Integer32
+
+ifNumber OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { interfaces 1 }
+
+ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { interfaces 2 }
+
+ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ InterfaceIndex,
+
+ ifDescr
+ DisplayString,
+
+ ifType
+ IANAifType,
+
+ ifMtu
+ Integer32,
+
+ ifSpeed
+ Gauge32,
+
+ ifPhysAddress
+ PhysAddress,
+
+ ifAdminStatus
+ INTEGER,
+
+ ifOperStatus
+ INTEGER,
+
+ ifLastChange
+ TimeTicks,
+
+ ifInOctets
+ Counter32,
+
+ ifInUcastPkts
+ Counter32,
+
+ ifInNUcastPkts
+ Counter32,
+
+ ifInDiscards
+ Counter32,
+
+ ifInErrors
+ Counter32,
+
+ ifInUnknownProtos
+ Counter32,
+
+ ifOutOctets
+ Counter32,
+
+ ifOutUcastPkts
+ Counter32,
+
+ ifOutNUcastPkts
+ Counter32,
+
+ ifOutDiscards
+ Counter32,
+
+ ifOutErrors
+ Counter32,
+
+ ifOutQLen
+ Gauge32,
+
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ifIndex OBJECT-TYPE
+ SYNTAX InterfaceIndex
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 1 }
+
+ifDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 2 }
+
+ifType OBJECT-TYPE
+ SYNTAX IANAifType
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 3 }
+
+ifMtu OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 4 }
+
+ifSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 5 }
+
+ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 6 }
+
+ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifEntry 7 }
+
+ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3),
+ unknown(4),
+ dormant(5)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 8 }
+
+ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 9 }
+
+ifInOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 10 }
+
+ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 11 }
+
+ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 12 }
+
+ifInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 13 }
+
+ifInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 14 }
+
+ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 15 }
+
+ifOutOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 16 }
+
+ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 17 }
+
+ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 18 }
+
+ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 19 }
+
+ifOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 20 }
+
+ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 21 }
+
+ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 22 }
+
+ifXTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 1 }
+
+ifXEntry OBJECT-TYPE
+ SYNTAX IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifXTable 1 }
+
+IfXEntry ::=
+ SEQUENCE {
+ ifName
+ DisplayString,
+
+ ifInMulticastPkts
+ Counter32,
+
+ ifInBroadcastPkts
+ Counter32,
+
+ ifOutMulticastPkts
+ Counter32,
+
+ ifOutBroadcastPkts
+ Counter32,
+
+ ifHCInOctets
+ Counter64,
+
+ ifHCInUcastPkts
+ Counter64,
+
+ ifHCInMulticastPkts
+ Counter64,
+
+ ifHCInBroadcastPkts
+ Counter64,
+
+ ifHCOutOctets
+ Counter64,
+
+ ifHCOutUcastPkts
+ Counter64,
+
+ ifHCOutMulticastPkts
+ Counter64,
+
+ ifHCOutBroadcastPkts
+ Counter64,
+
+ ifLinkUpDownTrapEnable
+ INTEGER,
+
+ ifHighSpeed
+ Gauge32,
+
+ ifPromiscuousMode
+ TruthValue,
+
+ ifConnectorPresent
+ TruthValue
+ }
+
+ifName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 1 }
+
+ifInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 2 }
+
+ifInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 3 }
+
+ifOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 4 }
+
+ifOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 5 }
+
+ifHCInOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 6 }
+
+ifHCInUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 7 }
+
+ifHCInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 8 }
+
+ifHCInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 9 }
+
+ifHCOutOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 10 }
+
+ifHCOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 11 }
+
+ifHCOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 12 }
+
+ifHCOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 13 }
+
+ifLinkUpDownTrapEnable OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 14 }
+
+ifHighSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 15 }
+
+ifPromiscuousMode OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 16 }
+
+ifConnectorPresent OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 17 }
+
+ifStackTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 2 }
+
+ifStackEntry OBJECT-TYPE
+ SYNTAX IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifStackHigherLayer, ifStackLowerLayer }
+ ::= { ifStackTable 1 }
+
+IfStackEntry ::=
+ SEQUENCE {
+ ifStackHigherLayer
+ Integer32,
+
+ ifStackLowerLayer
+ Integer32,
+
+ ifStackStatus
+ RowStatus
+ }
+
+ifStackHigherLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 1 }
+
+ifStackLowerLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 2 }
+
+ifStackStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifStackEntry 3 }
+
+ifTestTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 3 }
+
+ifTestEntry OBJECT-TYPE
+ SYNTAX IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifTestTable 1 }
+
+IfTestEntry ::=
+ SEQUENCE {
+ ifTestId
+ TestAndIncr,
+
+ ifTestStatus
+ INTEGER,
+
+ ifTestType
+ AutonomousType,
+
+ ifTestResult
+ INTEGER,
+
+ ifTestCode
+ OBJECT IDENTIFIER,
+
+ ifTestOwner
+ OwnerString
+ }
+
+ifTestId OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 1 }
+
+ifTestStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ notInUse(1),
+ inUse(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 2 }
+
+ifTestType OBJECT-TYPE
+ SYNTAX AutonomousType
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 3 }
+
+ifTestResult OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ success(2),
+ inProgress(3),
+ notSupported(4),
+ unAbleToRun(5),
+ aborted(6),
+ failed(7)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 4 }
+
+ifTestCode OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 5 }
+
+ifTestOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 6 }
+
+ifRcvAddressTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 4 }
+
+ifRcvAddressEntry OBJECT-TYPE
+ SYNTAX IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, ifRcvAddressAddress }
+ ::= { ifRcvAddressTable 1 }
+
+IfRcvAddressEntry ::=
+ SEQUENCE {
+ ifRcvAddressAddress
+ PhysAddress,
+
+ ifRcvAddressStatus
+ RowStatus,
+
+ ifRcvAddressType
+ INTEGER
+ }
+
+ifRcvAddressAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ifRcvAddressEntry 1 }
+
+ifRcvAddressStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifRcvAddressEntry 2 }
+
+ifRcvAddressType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { volatile }
+ ::= { ifRcvAddressEntry 3 }
+
+linkDown NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 3 }
+
+linkUp NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 4 }
+
+ifConformance ::= { ifMIB 2 }
+
+ifGroups ::= { ifConformance 1 }
+
+ifCompliances ::= { ifConformance 2 }
+
+ifCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ifGeneralGroup, ifStackGroup }
+ GROUP ifFixedLengthGroup
+
+ GROUP ifHCFixedLengthGroup
+
+ GROUP ifPacketGroup
+
+ GROUP ifHCPacketGroup
+
+ GROUP ifTestGroup
+
+ GROUP ifRcvAddressGroup
+
+ OBJECT ifLinkUpDownTrapEnable
+ MIN-ACCESS read-only
+
+ OBJECT ifPromiscuousMode
+ MIN-ACCESS read-only
+
+ OBJECT ifStackStatus
+ SYNTAX INTEGER {
+ active(1)
+ }
+ MIN-ACCESS read-only
+
+ OBJECT ifAdminStatus
+ SYNTAX INTEGER {
+ up(1),
+ down(2)
+ }
+ MIN-ACCESS read-only
+ ::= { ifCompliances 1 }
+
+ifGeneralGroup OBJECT-GROUP
+ OBJECTS {
+ ifDescr,
+ ifType,
+ ifSpeed,
+ ifPhysAddress,
+ ifAdminStatus,
+ ifOperStatus,
+ ifLastChange,
+ ifLinkUpDownTrapEnable,
+ ifConnectorPresent,
+ ifHighSpeed,
+ ifName
+ }
+ STATUS current
+ ::= { ifGroups 1 }
+
+ifFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 2 }
+
+ifHCFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 3 }
+
+ifPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 4 }
+
+ifHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 5 }
+
+ifVHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInUcastPkts,
+ ifHCInMulticastPkts,
+ ifHCInBroadcastPkts,
+ ifHCOutUcastPkts,
+ ifHCOutMulticastPkts,
+ ifHCOutBroadcastPkts,
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 6 }
+
+ifRcvAddressGroup OBJECT-GROUP
+ OBJECTS { ifRcvAddressStatus, ifRcvAddressType }
+ STATUS current
+ ::= { ifGroups 7 }
+
+ifTestGroup OBJECT-GROUP
+ OBJECTS {
+ ifTestId,
+ ifTestStatus,
+ ifTestType,
+ ifTestResult,
+ ifTestCode,
+ ifTestOwner
+ }
+ STATUS current
+ ::= { ifGroups 8 }
+
+ifStackGroup OBJECT-GROUP
+ OBJECTS { ifStackStatus }
+ STATUS current
+ ::= { ifGroups 9 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/IP-MIB.txt b/release/picobsd/net/crunch1/mibs/IP-MIB.txt
new file mode 100644
index 0000000..59118e7
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/IP-MIB.txt
@@ -0,0 +1,507 @@
+IP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress
+ FROM SNMPv2-TC
+ mib-2, IpAddress, Counter32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ipMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 48 }
+
+ip ::= { mib-2 4 }
+
+ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ forwarding(1),
+ notForwarding(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 1 }
+
+ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 2 }
+
+ipInReceives OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 3 }
+
+ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 4 }
+
+ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 5 }
+
+ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 6 }
+
+ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 7 }
+
+ipInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 8 }
+
+ipInDelivers OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 9 }
+
+ipOutRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 10 }
+
+ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 11 }
+
+ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 12 }
+
+ipReasmTimeout OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 13 }
+
+ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 14 }
+
+ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 15 }
+
+ipReasmFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 16 }
+
+ipFragOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 17 }
+
+ipFragFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 18 }
+
+ipFragCreates OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 19 }
+
+ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 20 }
+
+ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+
+ ipAdEntIfIndex
+ INTEGER,
+
+ ipAdEntNetMask
+ IpAddress,
+
+ ipAdEntBcastAddr
+ INTEGER,
+
+ ipAdEntReasmMaxSize
+ INTEGER
+ }
+
+ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 1 }
+
+ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 2 }
+
+ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 3 }
+
+ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 4 }
+
+ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 5 }
+
+ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 22 }
+
+ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipNetToMediaIfIndex, ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+
+ ipNetToMediaPhysAddress
+ PhysAddress,
+
+ ipNetToMediaNetAddress
+ IpAddress,
+
+ ipNetToMediaType
+ INTEGER
+ }
+
+ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 1 }
+
+ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 2 }
+
+ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 3 }
+
+ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ invalid(2),
+ dynamic(3),
+ static(4)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 4 }
+
+ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 23 }
+
+icmp ::= { mib-2 5 }
+
+icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 1 }
+
+icmpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 2 }
+
+icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 3 }
+
+icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 4 }
+
+icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 5 }
+
+icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 6 }
+
+icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 7 }
+
+icmpInEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 8 }
+
+icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 9 }
+
+icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 10 }
+
+icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 11 }
+
+icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 12 }
+
+icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 13 }
+
+icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 14 }
+
+icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 15 }
+
+icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 16 }
+
+icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 17 }
+
+icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 18 }
+
+icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 19 }
+
+icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 20 }
+
+icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 21 }
+
+icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 22 }
+
+icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 23 }
+
+icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 24 }
+
+icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 25 }
+
+icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 26 }
+
+ipMIBConformance ::= { ipMIB 2 }
+
+ipMIBCompliances ::= { ipMIBConformance 1 }
+
+ipMIBGroups ::= { ipMIBConformance 2 }
+
+ipMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ipGroup, icmpGroup }
+ ::= { ipMIBCompliances 1 }
+
+ipGroup OBJECT-GROUP
+ OBJECTS {
+ ipForwarding,
+ ipDefaultTTL,
+ ipInReceives,
+ ipInHdrErrors,
+ ipInAddrErrors,
+ ipForwDatagrams,
+ ipInUnknownProtos,
+ ipInDiscards,
+ ipInDelivers,
+ ipOutRequests,
+ ipOutDiscards,
+ ipOutNoRoutes,
+ ipReasmTimeout,
+ ipReasmReqds,
+ ipReasmOKs,
+ ipReasmFails,
+ ipFragOKs,
+ ipFragFails,
+ ipFragCreates,
+ ipAdEntAddr,
+ ipAdEntIfIndex,
+ ipAdEntNetMask,
+ ipAdEntBcastAddr,
+ ipAdEntReasmMaxSize,
+ ipNetToMediaIfIndex,
+ ipNetToMediaPhysAddress,
+ ipNetToMediaNetAddress,
+ ipNetToMediaType,
+ ipRoutingDiscards
+ }
+ STATUS current
+ ::= { ipMIBGroups 1 }
+
+icmpGroup OBJECT-GROUP
+ OBJECTS {
+ icmpInMsgs,
+ icmpInErrors,
+ icmpInDestUnreachs,
+ icmpInTimeExcds,
+ icmpInParmProbs,
+ icmpInSrcQuenchs,
+ icmpInRedirects,
+ icmpInEchos,
+ icmpInEchoReps,
+ icmpInTimestamps,
+ icmpInTimestampReps,
+ icmpInAddrMasks,
+ icmpInAddrMaskReps,
+ icmpOutMsgs,
+ icmpOutErrors,
+ icmpOutDestUnreachs,
+ icmpOutTimeExcds,
+ icmpOutParmProbs,
+ icmpOutSrcQuenchs,
+ icmpOutRedirects,
+ icmpOutEchos,
+ icmpOutEchoReps,
+ icmpOutTimestamps,
+ icmpOutTimestampReps,
+ icmpOutAddrMasks,
+ icmpOutAddrMaskReps
+ }
+ STATUS current
+ ::= { ipMIBGroups 2 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/RFC1155-SMI.txt b/release/picobsd/net/crunch1/mibs/RFC1155-SMI.txt
new file mode 100644
index 0000000..e59574e
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/RFC1155-SMI.txt
@@ -0,0 +1,9 @@
+RFC1155-SMI DEFINITIONS ::= BEGIN
+ nullOID OBJECT IDENTIFIER ::= { ccitt 0 }
+ internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
+ directory OBJECT IDENTIFIER ::= { internet 1 }
+ mgmt OBJECT IDENTIFIER ::= { internet 2 }
+ experimental OBJECT IDENTIFIER ::= { internet 3 }
+ private OBJECT IDENTIFIER ::= { internet 4 }
+ enterprises OBJECT IDENTIFIER ::= { private 1 }
+END
diff --git a/release/picobsd/net/crunch1/mibs/RFC1213-MIB.txt b/release/picobsd/net/crunch1/mibs/RFC1213-MIB.txt
new file mode 100644
index 0000000..1f1f253
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/RFC1213-MIB.txt
@@ -0,0 +1,1550 @@
+RFC1213-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ mgmt, NetworkAddress, IpAddress, Counter, Gauge,
+ TimeTicks
+ FROM RFC1155-SMI
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+
+
+ mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
+
+
+ DisplayString ::=
+ OCTET STRING
+
+
+
+ PhysAddress ::=
+ OCTET STRING
+
+
+ system OBJECT IDENTIFIER ::= { mib-2 1 }
+
+ interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
+
+ at OBJECT IDENTIFIER ::= { mib-2 3 }
+
+ ip OBJECT IDENTIFIER ::= { mib-2 4 }
+
+ icmp OBJECT IDENTIFIER ::= { mib-2 5 }
+
+ tcp OBJECT IDENTIFIER ::= { mib-2 6 }
+
+ udp OBJECT IDENTIFIER ::= { mib-2 7 }
+
+ egp OBJECT IDENTIFIER ::= { mib-2 8 }
+
+
+ transmission OBJECT IDENTIFIER ::= { mib-2 10 }
+
+ snmp OBJECT IDENTIFIER ::= { mib-2 11 }
+
+
+
+ sysDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { system 1 }
+
+ sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 2 }
+
+ sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 3 }
+
+ sysContact OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 4 }
+
+ sysName OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 5 }
+
+ sysLocation OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 6 }
+
+ sysServices OBJECT-TYPE
+ SYNTAX INTEGER (0..127)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 7 }
+
+
+
+
+ ifNumber OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { interfaces 1 }
+
+
+
+ ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { interfaces 2 }
+
+ ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+ IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ INTEGER,
+
+
+ ifDescr
+ DisplayString,
+ ifType
+ INTEGER,
+ ifMtu
+ INTEGER,
+ ifSpeed
+ Gauge,
+ ifPhysAddress
+ PhysAddress,
+ ifAdminStatus
+ INTEGER,
+ ifOperStatus
+ INTEGER,
+ ifLastChange
+ TimeTicks,
+ ifInOctets
+ Counter,
+ ifInUcastPkts
+ Counter,
+ ifInNUcastPkts
+ Counter,
+ ifInDiscards
+ Counter,
+ ifInErrors
+ Counter,
+ ifInUnknownProtos
+ Counter,
+ ifOutOctets
+ Counter,
+ ifOutUcastPkts
+ Counter,
+ ifOutNUcastPkts
+ Counter,
+ ifOutDiscards
+ Counter,
+ ifOutErrors
+ Counter,
+ ifOutQLen
+ Gauge,
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ ifIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ifEntry 1 }
+
+ ifDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 2 }
+
+ ifType OBJECT-TYPE
+ SYNTAX INTEGER {
+ regular1822(2),
+ hdh1822(3),
+ ddn-x25(4),
+ rfc877-x25(5),
+ ethernet-csmacd(6),
+ iso88023-csmacd(7),
+ iso88024-tokenBus(8),
+ iso88025-tokenRing(9),
+ iso88026-man(10),
+ starLan(11),
+ proteon-10Mbit(12),
+ proteon-80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ basicISDN(20),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ ethernet-3Mbit(26),
+
+
+ frame-relay(32)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 3 }
+
+ ifMtu OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 4 }
+
+ ifSpeed OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 5 }
+
+ ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 6 }
+
+ ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ifEntry 7 }
+
+ ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 8 }
+
+ ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 9 }
+
+ ifInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { ifEntry 10 }
+
+ ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 11 }
+
+ ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 12 }
+
+ ifInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 13 }
+
+ ifInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 14 }
+
+
+ ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 15 }
+
+ ifOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 16 }
+
+ ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 17 }
+
+ ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 18 }
+
+ ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 19 }
+
+ ifOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 20 }
+
+ ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 21 }
+
+ ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 22 }
+
+
+
+
+
+
+
+ atTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ ::= { at 1 }
+
+ atEntry OBJECT-TYPE
+ SYNTAX AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ INDEX { atIfIndex,
+ atNetAddress }
+ ::= { atTable 1 }
+
+ AtEntry ::=
+ SEQUENCE {
+ atIfIndex
+ INTEGER,
+
+
+ atPhysAddress
+ PhysAddress,
+ atNetAddress
+ NetworkAddress
+ }
+
+ atIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 1 }
+
+ atPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 2 }
+
+ atNetAddress OBJECT-TYPE
+ SYNTAX NetworkAddress
+ ACCESS read-write
+ STATUS deprecated
+
+
+ ::= { atEntry 3 }
+
+
+
+ ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 1 }
+
+ ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 2 }
+
+ ipInReceives OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 3 }
+
+ ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 4 }
+
+ ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 5 }
+
+ ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 6 }
+
+ ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 7 }
+
+ ipInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 8 }
+
+ ipInDelivers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 9 }
+
+ ipOutRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 10 }
+
+ ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 11 }
+
+ ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 12 }
+
+ ipReasmTimeout OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 13 }
+
+ ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 14 }
+
+ ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 15 }
+
+ ipReasmFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 16 }
+
+ ipFragOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 17 }
+
+ ipFragFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 18 }
+
+ ipFragCreates OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 19 }
+
+
+
+
+ ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 20 }
+
+ ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+ IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+ ipAdEntIfIndex
+ INTEGER,
+ ipAdEntNetMask
+ IpAddress,
+ ipAdEntBcastAddr
+ INTEGER,
+ ipAdEntReasmMaxSize
+ INTEGER (0..65535)
+ }
+
+ ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 1 }
+
+
+ ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 2 }
+
+ ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 3 }
+
+ ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 4 }
+
+ ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 5 }
+
+
+
+
+ ipRouteTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 21 }
+
+ ipRouteEntry OBJECT-TYPE
+ SYNTAX IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipRouteDest }
+ ::= { ipRouteTable 1 }
+
+ IpRouteEntry ::=
+ SEQUENCE {
+ ipRouteDest
+ IpAddress,
+ ipRouteIfIndex
+ INTEGER,
+ ipRouteMetric1
+ INTEGER,
+ ipRouteMetric2
+ INTEGER,
+ ipRouteMetric3
+ INTEGER,
+ ipRouteMetric4
+ INTEGER,
+ ipRouteNextHop
+ IpAddress,
+ ipRouteType
+ INTEGER,
+ ipRouteProto
+ INTEGER,
+ ipRouteAge
+ INTEGER,
+ ipRouteMask
+ IpAddress,
+ ipRouteMetric5
+ INTEGER,
+
+
+ ipRouteInfo
+ OBJECT IDENTIFIER
+ }
+
+ ipRouteDest OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 1 }
+
+ ipRouteIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 2 }
+
+ ipRouteMetric1 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 3 }
+
+ ipRouteMetric2 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 4 }
+
+ ipRouteMetric3 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 5 }
+
+ ipRouteMetric4 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 6 }
+
+ ipRouteNextHop OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 7 }
+
+ ipRouteType OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 8 }
+
+ ipRouteProto OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ egp(5),
+ ggp(6),
+
+
+ hello(7),
+ rip(8),
+ is-is(9),
+ es-is(10),
+ ciscoIgrp(11),
+ bbnSpfIgp(12),
+ ospf(13),
+ bgp(14)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 9 }
+
+ ipRouteAge OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 10 }
+
+ ipRouteMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 11 }
+
+ ipRouteMetric5 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 12 }
+
+ ipRouteInfo OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 13 }
+
+
+
+ ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+
+
+ ::= { ip 22 }
+
+ ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipNetToMediaIfIndex,
+ ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+ IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+ ipNetToMediaPhysAddress
+ PhysAddress,
+ ipNetToMediaNetAddress
+ IpAddress,
+ ipNetToMediaType
+ INTEGER
+ }
+
+ ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 1 }
+
+ ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 2 }
+
+
+ ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 3 }
+
+ ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ dynamic(3),
+ static(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 4 }
+
+
+ ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 23 }
+
+
+
+ icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 1 }
+
+ icmpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 2 }
+
+ icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 3 }
+
+ icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 4 }
+
+
+ icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 5 }
+
+ icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 6 }
+
+ icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 7 }
+
+ icmpInEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 8 }
+
+ icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 9 }
+
+ icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 10 }
+
+ icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 11 }
+
+ icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 12 }
+
+ icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 13 }
+
+ icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 14 }
+
+ icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 15 }
+
+ icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 16 }
+
+ icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 17 }
+
+ icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 18 }
+
+ icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 19 }
+
+ icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 20 }
+
+ icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 21 }
+
+ icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 22 }
+
+ icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 23 }
+
+ icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 24 }
+
+ icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 25 }
+
+
+ icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 26 }
+
+
+
+
+ tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 1 }
+
+ tcpRtoMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 2 }
+
+ tcpRtoMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 3 }
+
+ tcpMaxConn OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 4 }
+
+ tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 5 }
+
+ tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 6 }
+
+
+ tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 7 }
+
+ tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 8 }
+
+ tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 9 }
+
+ tcpInSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 10 }
+
+ tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 11 }
+
+ tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 12 }
+
+
+
+ tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { tcp 13 }
+
+ tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort }
+ ::= { tcpConnTable 1 }
+
+
+ TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+ tcpConnLocalAddress
+ IpAddress,
+ tcpConnLocalPort
+ INTEGER (0..65535),
+ tcpConnRemAddress
+ IpAddress,
+ tcpConnRemPort
+ INTEGER (0..65535)
+ }
+
+ tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { tcpConnEntry 1 }
+
+ tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 2 }
+
+ tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 3 }
+
+ tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 4 }
+
+ tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 5 }
+
+
+ tcpInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 14 }
+
+ tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 15 }
+
+
+
+ udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 1 }
+
+ udpNoPorts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 2 }
+
+ udpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 3 }
+
+
+ udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 4 }
+
+
+
+ udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { udp 5 }
+
+ udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+ UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+ udpLocalPort
+ INTEGER (0..65535)
+ }
+
+ udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 1 }
+
+ udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 2 }
+
+
+
+ egpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 1 }
+
+ egpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 2 }
+
+ egpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 3 }
+
+ egpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 4 }
+
+
+
+ egpNeighTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { egp 5 }
+
+ egpNeighEntry OBJECT-TYPE
+ SYNTAX EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { egpNeighAddr }
+ ::= { egpNeighTable 1 }
+
+ EgpNeighEntry ::=
+ SEQUENCE {
+ egpNeighState
+ INTEGER,
+ egpNeighAddr
+ IpAddress,
+ egpNeighAs
+ INTEGER,
+ egpNeighInMsgs
+ Counter,
+ egpNeighInErrs
+ Counter,
+ egpNeighOutMsgs
+ Counter,
+ egpNeighOutErrs
+ Counter,
+
+
+ egpNeighInErrMsgs
+ Counter,
+ egpNeighOutErrMsgs
+ Counter,
+ egpNeighStateUps
+ Counter,
+ egpNeighStateDowns
+ Counter,
+ egpNeighIntervalHello
+ INTEGER,
+ egpNeighIntervalPoll
+ INTEGER,
+ egpNeighMode
+ INTEGER,
+ egpNeighEventTrigger
+ INTEGER
+ }
+
+ egpNeighState OBJECT-TYPE
+ SYNTAX INTEGER {
+ idle(1),
+ acquisition(2),
+ down(3),
+ up(4),
+ cease(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 1 }
+
+ egpNeighAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 2 }
+
+ egpNeighAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 3 }
+
+ egpNeighInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 4 }
+
+ egpNeighInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 5 }
+
+ egpNeighOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 6 }
+
+ egpNeighOutErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 7 }
+
+ egpNeighInErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 8 }
+
+ egpNeighOutErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 9 }
+
+ egpNeighStateUps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 10 }
+
+ egpNeighStateDowns OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 11 }
+
+ egpNeighIntervalHello OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 12 }
+
+ egpNeighIntervalPoll OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 13 }
+
+ egpNeighMode OBJECT-TYPE
+ SYNTAX INTEGER { active(1), passive(2) }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 14 }
+
+ egpNeighEventTrigger OBJECT-TYPE
+ SYNTAX INTEGER { start(1), stop(2) }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { egpNeighEntry 15 }
+
+
+ egpAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 6 }
+
+
+
+
+
+
+
+
+ snmpInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 1 }
+
+ snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 2 }
+
+ snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 3 }
+
+ snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 4 }
+
+ snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 5 }
+
+ snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 6 }
+
+
+
+ snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 8 }
+
+ snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 9 }
+
+ snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 10 }
+
+ snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 11 }
+
+ snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 12 }
+
+ snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 13 }
+
+ snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 14 }
+
+ snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 15 }
+
+ snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 16 }
+
+ snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 17 }
+
+ snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 18 }
+
+ snmpInTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 19 }
+
+ snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 20 }
+
+
+ snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 21 }
+
+ snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 22 }
+
+
+ snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 24 }
+
+ snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 25 }
+
+ snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { snmp 26 }
+
+ snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 27 }
+
+ snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 28 }
+
+ snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 29 }
+
+ snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER { enabled(1), disabled(2) }
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { snmp 30 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/RFC1271-MIB.txt b/release/picobsd/net/crunch1/mibs/RFC1271-MIB.txt
new file mode 100644
index 0000000..1c85945
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/RFC1271-MIB.txt
@@ -0,0 +1,1633 @@
+RFC1271-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ Counter FROM RFC1155-SMI
+ DisplayString FROM RFC1158-MIB
+ mib-2 FROM RFC1213-MIB
+ OBJECT-TYPE FROM RFC-1212;
+
+
+
+ rmon OBJECT IDENTIFIER ::= { mib-2 16 }
+
+
+ OwnerString ::= OCTET STRING
+
+
+
+ EntryStatus ::= INTEGER
+ { valid(1),
+ createRequest(2),
+ underCreation(3),
+ invalid(4)
+ }
+
+
+
+
+ statistics OBJECT IDENTIFIER ::= { rmon 1 }
+ history OBJECT IDENTIFIER ::= { rmon 2 }
+ alarm OBJECT IDENTIFIER ::= { rmon 3 }
+ hosts OBJECT IDENTIFIER ::= { rmon 4 }
+ hostTopN OBJECT IDENTIFIER ::= { rmon 5 }
+ matrix OBJECT IDENTIFIER ::= { rmon 6 }
+ filter OBJECT IDENTIFIER ::= { rmon 7 }
+ capture OBJECT IDENTIFIER ::= { rmon 8 }
+ event OBJECT IDENTIFIER ::= { rmon 9 }
+
+
+ etherStatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { statistics 1 }
+
+
+ etherStatsEntry OBJECT-TYPE
+ SYNTAX EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherStatsIndex }
+ ::= { etherStatsTable 1 }
+
+ EtherStatsEntry ::= SEQUENCE {
+ etherStatsIndex INTEGER (1..65535),
+ etherStatsDataSource OBJECT IDENTIFIER,
+ etherStatsDropEvents Counter,
+ etherStatsOctets Counter,
+ etherStatsPkts Counter,
+ etherStatsBroadcastPkts Counter,
+ etherStatsMulticastPkts Counter,
+ etherStatsCRCAlignErrors Counter,
+ etherStatsUndersizePkts Counter,
+ etherStatsOversizePkts Counter,
+ etherStatsFragments Counter,
+ etherStatsJabbers Counter,
+ etherStatsCollisions Counter,
+ etherStatsPkts64Octets Counter,
+ etherStatsPkts65to127Octets Counter,
+ etherStatsPkts128to255Octets Counter,
+ etherStatsPkts256to511Octets Counter,
+ etherStatsPkts512to1023Octets Counter,
+ etherStatsPkts1024to1518Octets Counter,
+ etherStatsOwner OwnerString,
+ etherStatsStatus INTEGER
+ }
+
+ etherStatsIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 1 }
+
+ etherStatsDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 2 }
+
+ etherStatsDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 3 }
+
+ etherStatsOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 4 }
+
+ etherStatsPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 5 }
+
+
+ etherStatsBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 6 }
+
+ etherStatsMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 7 }
+
+ etherStatsCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 8 }
+
+ etherStatsUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 9 }
+
+ etherStatsOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 10 }
+
+ etherStatsFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 11 }
+
+ etherStatsJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 12 }
+
+ etherStatsCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 13 }
+
+ etherStatsPkts64Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 14 }
+
+ etherStatsPkts65to127Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 15 }
+
+ etherStatsPkts128to255Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 16 }
+
+ etherStatsPkts256to511Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 17 }
+
+ etherStatsPkts512to1023Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 18 }
+
+
+ etherStatsPkts1024to1518Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 19 }
+
+ etherStatsOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 20 }
+
+ etherStatsStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 21 }
+
+
+
+
+
+ historyControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 1 }
+
+ historyControlEntry OBJECT-TYPE
+ SYNTAX HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { historyControlIndex }
+ ::= { historyControlTable 1 }
+
+ HistoryControlEntry ::= SEQUENCE {
+ historyControlIndex INTEGER (1..65535),
+ historyControlDataSource OBJECT IDENTIFIER,
+ historyControlBucketsRequested INTEGER (1..65535),
+ historyControlBucketsGranted INTEGER (1..65535),
+ historyControlInterval INTEGER (1..3600),
+ historyControlOwner OwnerString,
+ historyControlStatus INTEGER
+ }
+
+ historyControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 1 }
+
+
+ historyControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 2 }
+
+ historyControlBucketsRequested OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 50 }
+ ::= { historyControlEntry 3 }
+
+ historyControlBucketsGranted OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 4 }
+
+ historyControlInterval OBJECT-TYPE
+ SYNTAX INTEGER (1..3600)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 1800 }
+ ::= { historyControlEntry 5 }
+
+ historyControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 6 }
+
+ historyControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 7 }
+
+
+ etherHistoryTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherHistoryEntry
+
+
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 2 }
+
+ etherHistoryEntry OBJECT-TYPE
+ SYNTAX EtherHistoryEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherHistoryIndex , etherHistorySampleIndex }
+ ::= { etherHistoryTable 1 }
+
+ EtherHistoryEntry ::= SEQUENCE {
+ etherHistoryIndex INTEGER (1..65535),
+ etherHistorySampleIndex INTEGER,
+ etherHistoryIntervalStart TimeTicks,
+ etherHistoryDropEvents Counter,
+ etherHistoryOctets Counter,
+ etherHistoryPkts Counter,
+ etherHistoryBroadcastPkts Counter,
+ etherHistoryMulticastPkts Counter,
+ etherHistoryCRCAlignErrors Counter,
+ etherHistoryUndersizePkts Counter,
+ etherHistoryOversizePkts Counter,
+ etherHistoryFragments Counter,
+ etherHistoryJabbers Counter,
+ etherHistoryCollisions Counter,
+ etherHistoryUtilization INTEGER (0..10000)
+ }
+
+ etherHistoryIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 1 }
+
+
+ etherHistorySampleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 2 }
+
+ etherHistoryIntervalStart OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 3 }
+
+ etherHistoryDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 4 }
+
+ etherHistoryOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 5 }
+
+ etherHistoryPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 6 }
+
+ etherHistoryBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 7 }
+
+ etherHistoryMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 8 }
+
+ etherHistoryCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 9 }
+
+
+ etherHistoryUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 10 }
+
+ etherHistoryOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 11 }
+
+ etherHistoryFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 12 }
+
+ etherHistoryJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 13 }
+
+
+ etherHistoryCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 14 }
+
+ etherHistoryUtilization OBJECT-TYPE
+ SYNTAX INTEGER (0..10000)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 15 }
+
+
+
+
+
+ alarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { alarm 1 }
+
+ alarmEntry OBJECT-TYPE
+ SYNTAX AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { alarmIndex }
+ ::= { alarmTable 1 }
+
+ AlarmEntry ::= SEQUENCE {
+ alarmIndex INTEGER (1..65535),
+ alarmInterval INTEGER,
+ alarmVariable OBJECT IDENTIFIER,
+ alarmSampleType INTEGER,
+ alarmValue INTEGER,
+ alarmStartupAlarm INTEGER,
+ alarmRisingThreshold INTEGER,
+ alarmFallingThreshold INTEGER,
+ alarmRisingEventIndex INTEGER (1..65535),
+ alarmFallingEventIndex INTEGER (1..65535),
+ alarmOwner OwnerString,
+ alarmStatus INTEGER
+ }
+
+ alarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 1 }
+
+
+ alarmInterval OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 2 }
+
+ alarmVariable OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 3 }
+
+
+ alarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 4 }
+
+ alarmValue OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 5 }
+
+ alarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 6 }
+
+ alarmRisingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 7 }
+
+ alarmFallingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 8 }
+
+ alarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 9 }
+
+ alarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { alarmEntry 10 }
+
+ alarmOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 11 }
+
+ alarmStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 12 }
+
+
+
+
+
+
+
+
+
+
+ hostControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 1 }
+
+
+ hostControlEntry OBJECT-TYPE
+ SYNTAX HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostControlIndex }
+ ::= { hostControlTable 1 }
+
+ HostControlEntry ::= SEQUENCE {
+ hostControlIndex INTEGER (1..65535),
+ hostControlDataSource OBJECT IDENTIFIER,
+ hostControlTableSize INTEGER,
+ hostControlLastDeleteTime TimeTicks,
+ hostControlOwner OwnerString,
+ hostControlStatus INTEGER
+ }
+
+ hostControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 1 }
+
+ hostControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 2 }
+
+ hostControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 3 }
+
+ hostControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 4 }
+
+ hostControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 5 }
+
+ hostControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 6 }
+
+
+ hostTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 2 }
+
+ hostEntry OBJECT-TYPE
+ SYNTAX HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostIndex, hostAddress }
+ ::= { hostTable 1 }
+
+ HostEntry ::= SEQUENCE {
+ hostAddress OCTET STRING,
+ hostCreationOrder INTEGER (1..65535),
+ hostIndex INTEGER (1..65535),
+ hostInPkts Counter,
+ hostOutPkts Counter,
+ hostInOctets Counter,
+ hostOutOctets Counter,
+ hostOutErrors Counter,
+ hostOutBroadcastPkts Counter,
+ hostOutMulticastPkts Counter
+ }
+
+ hostAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 1 }
+
+ hostCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 2 }
+
+ hostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 3 }
+
+ hostInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 4 }
+
+ hostOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { hostEntry 5 }
+
+ hostInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 6 }
+
+ hostOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 7 }
+
+ hostOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 8 }
+
+ hostOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 9 }
+
+ hostOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 10 }
+
+
+ hostTimeTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 3 }
+
+ hostTimeEntry OBJECT-TYPE
+ SYNTAX HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTimeIndex, hostTimeCreationOrder }
+ ::= { hostTimeTable 1 }
+
+ HostTimeEntry ::= SEQUENCE {
+ hostTimeAddress OCTET STRING,
+ hostTimeCreationOrder INTEGER (1..65535),
+ hostTimeIndex INTEGER (1..65535),
+ hostTimeInPkts Counter,
+ hostTimeOutPkts Counter,
+ hostTimeInOctets Counter,
+ hostTimeOutOctets Counter,
+ hostTimeOutErrors Counter,
+ hostTimeOutBroadcastPkts Counter,
+ hostTimeOutMulticastPkts Counter
+ }
+
+ hostTimeAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 1 }
+
+ hostTimeCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 2 }
+
+ hostTimeIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 3 }
+
+
+ hostTimeInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 4 }
+
+ hostTimeOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 5 }
+
+ hostTimeInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 6 }
+
+ hostTimeOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 7 }
+
+ hostTimeOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 8 }
+
+ hostTimeOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 9 }
+
+ hostTimeOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 10 }
+
+
+
+
+
+
+ hostTopNControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 1 }
+
+ hostTopNControlEntry OBJECT-TYPE
+ SYNTAX HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNControlIndex }
+ ::= { hostTopNControlTable 1 }
+
+ HostTopNControlEntry ::= SEQUENCE {
+ hostTopNControlIndex INTEGER (1..65535),
+ hostTopNHostIndex INTEGER (1..65535),
+ hostTopNRateBase INTEGER,
+ hostTopNTimeRemaining INTEGER,
+ hostTopNDuration INTEGER,
+ hostTopNRequestedSize INTEGER,
+ hostTopNGrantedSize INTEGER,
+ hostTopNStartTime TimeTicks,
+ hostTopNOwner OwnerString,
+ hostTopNStatus INTEGER
+ }
+
+ hostTopNControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 1 }
+
+ hostTopNHostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { hostTopNControlEntry 2 }
+
+ hostTopNRateBase OBJECT-TYPE
+ SYNTAX INTEGER {
+ hostTopNInPkts(1),
+ hostTopNOutPkts(2),
+ hostTopNInOctets(3),
+ hostTopNOutOctets(4),
+ hostTopNOutErrors(5),
+ hostTopNOutBroadcastPkts(6),
+ hostTopNOutMulticastPkts(7)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 3 }
+
+ hostTopNTimeRemaining OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 4 }
+
+ hostTopNDuration OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 5 }
+
+ hostTopNRequestedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 10 }
+ ::= { hostTopNControlEntry 6 }
+
+
+ hostTopNGrantedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 7 }
+
+ hostTopNStartTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 8 }
+
+ hostTopNOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 9 }
+
+ hostTopNStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 10 }
+
+ hostTopNTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 2 }
+
+ hostTopNEntry OBJECT-TYPE
+ SYNTAX HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNReport, hostTopNIndex }
+ ::= { hostTopNTable 1 }
+
+ HostTopNEntry ::= SEQUENCE {
+ hostTopNReport INTEGER (1..65535),
+ hostTopNIndex INTEGER (1..65535),
+ hostTopNAddress OCTET STRING,
+ hostTopNRate INTEGER
+ }
+
+ hostTopNReport OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 1 }
+
+ hostTopNIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 2 }
+
+ hostTopNAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 3 }
+
+ hostTopNRate OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 4 }
+
+
+
+ matrixControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixControlEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { matrix 1 }
+
+ matrixControlEntry OBJECT-TYPE
+ SYNTAX MatrixControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixControlIndex }
+ ::= { matrixControlTable 1 }
+
+ MatrixControlEntry ::= SEQUENCE {
+ matrixControlIndex INTEGER (1..65535),
+ matrixControlDataSource OBJECT IDENTIFIER,
+ matrixControlTableSize INTEGER,
+ matrixControlLastDeleteTime TimeTicks,
+ matrixControlOwner OwnerString,
+ matrixControlStatus INTEGER
+ }
+
+ matrixControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 1 }
+
+ matrixControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 2 }
+
+ matrixControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 3 }
+
+ matrixControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 4 }
+
+ matrixControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 5 }
+
+ matrixControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { matrixControlEntry 6 }
+
+ matrixSDTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 2 }
+
+ matrixSDEntry OBJECT-TYPE
+ SYNTAX MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixSDIndex,
+ matrixSDSourceAddress, matrixSDDestAddress }
+ ::= { matrixSDTable 1 }
+
+ MatrixSDEntry ::= SEQUENCE {
+ matrixSDSourceAddress OCTET STRING,
+ matrixSDDestAddress OCTET STRING,
+ matrixSDIndex INTEGER (1..65535),
+ matrixSDPkts Counter,
+ matrixSDOctets Counter,
+ matrixSDErrors Counter
+ }
+
+ matrixSDSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 1 }
+
+
+ matrixSDDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 2 }
+
+ matrixSDIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 3 }
+
+ matrixSDPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 4 }
+
+ matrixSDOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 5 }
+
+ matrixSDErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixSDEntry 6 }
+
+
+ matrixDSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 3 }
+
+ matrixDSEntry OBJECT-TYPE
+ SYNTAX MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixDSIndex,
+ matrixDSDestAddress, matrixDSSourceAddress }
+ ::= { matrixDSTable 1 }
+
+ MatrixDSEntry ::= SEQUENCE {
+ matrixDSSourceAddress OCTET STRING,
+ matrixDSDestAddress OCTET STRING,
+ matrixDSIndex INTEGER (1..65535),
+ matrixDSPkts Counter,
+ matrixDSOctets Counter,
+ matrixDSErrors Counter
+ }
+
+ matrixDSSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 1 }
+
+ matrixDSDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixDSEntry 2 }
+
+ matrixDSIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 3 }
+
+ matrixDSPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 4 }
+
+ matrixDSOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 5 }
+
+ matrixDSErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 6 }
+
+
+
+
+
+ filterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 1 }
+
+ filterEntry OBJECT-TYPE
+ SYNTAX FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { filterIndex }
+ ::= { filterTable 1 }
+
+ FilterEntry ::= SEQUENCE {
+ filterIndex INTEGER (1..65535),
+ filterChannelIndex INTEGER (1..65535),
+ filterPktDataOffset INTEGER,
+ filterPktData OCTET STRING,
+ filterPktDataMask OCTET STRING,
+ filterPktDataNotMask OCTET STRING,
+ filterPktStatus INTEGER,
+ filterPktStatusMask INTEGER,
+ filterPktStatusNotMask INTEGER,
+ filterOwner OwnerString,
+ filterStatus INTEGER
+
+
+ }
+
+ filterIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { filterEntry 1 }
+
+ filterChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 2 }
+
+ filterPktDataOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { filterEntry 3 }
+
+ filterPktData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 4 }
+
+ filterPktDataMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 5 }
+
+ filterPktDataNotMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 6 }
+
+ filterPktStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 7 }
+
+ filterPktStatusMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { filterEntry 8 }
+
+ filterPktStatusNotMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 9 }
+
+ filterOwner OBJECT-TYPE
+ SYNTAX OwnerString
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 10 }
+
+ filterStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 11 }
+
+ channelTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 2 }
+
+ channelEntry OBJECT-TYPE
+ SYNTAX ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { channelIndex }
+ ::= { channelTable 1 }
+
+ ChannelEntry ::= SEQUENCE {
+ channelIndex INTEGER (1..65535),
+ channelIfIndex INTEGER (1..65535),
+ channelAcceptType INTEGER,
+ channelDataControl INTEGER,
+ channelTurnOnEventIndex INTEGER (0..65535),
+ channelTurnOffEventIndex INTEGER (0..65535),
+ channelEventIndex INTEGER (0..65535),
+ channelEventStatus INTEGER,
+ channelMatches Counter,
+ channelDescription DisplayString (SIZE (0..127)),
+ channelOwner OwnerString,
+ channelStatus INTEGER
+ }
+
+
+ channelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 1 }
+
+ channelIfIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 2 }
+
+ channelAcceptType OBJECT-TYPE
+ SYNTAX INTEGER {
+ acceptMatched(1),
+ acceptFailed(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 3 }
+
+ channelDataControl OBJECT-TYPE
+ SYNTAX INTEGER {
+ on(1),
+ off(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { off }
+ ::= { channelEntry 4 }
+
+ channelTurnOnEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 5 }
+
+ channelTurnOffEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 6 }
+
+ channelEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 7 }
+
+ channelEventStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ eventReady(1),
+ eventFired(2),
+ eventAlwaysReady(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { eventReady }
+ ::= { channelEntry 8 }
+
+ channelMatches OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 9 }
+
+ channelDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 10 }
+
+ channelOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 11 }
+
+ channelStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 12 }
+
+
+
+ bufferControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { capture 1 }
+
+ bufferControlEntry OBJECT-TYPE
+ SYNTAX BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { bufferControlIndex }
+ ::= { bufferControlTable 1 }
+
+ BufferControlEntry ::= SEQUENCE {
+ bufferControlIndex INTEGER (1..65535),
+ bufferControlChannelIndex INTEGER (1..65535),
+ bufferControlFullStatus INTEGER,
+ bufferControlFullAction INTEGER,
+ bufferControlCaptureSliceSize INTEGER,
+ bufferControlDownloadSliceSize INTEGER,
+ bufferControlDownloadOffset INTEGER,
+ bufferControlMaxOctetsRequested INTEGER,
+ bufferControlMaxOctetsGranted INTEGER,
+ bufferControlCapturedPackets INTEGER,
+
+
+ bufferControlTurnOnTime TimeTicks,
+ bufferControlOwner OwnerString,
+ bufferControlStatus INTEGER
+ }
+
+ bufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 1 }
+
+ bufferControlChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 2 }
+
+ bufferControlFullStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ spaceAvailable(1),
+ full(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 3 }
+
+ bufferControlFullAction OBJECT-TYPE
+ SYNTAX INTEGER {
+ lockWhenFull(1),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 4 }
+
+ bufferControlCaptureSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 5 }
+
+
+ bufferControlDownloadSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 6 }
+
+ bufferControlDownloadOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { bufferControlEntry 7 }
+
+ bufferControlMaxOctetsRequested OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { -1 }
+ ::= { bufferControlEntry 8 }
+
+ bufferControlMaxOctetsGranted OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 9 }
+
+ bufferControlCapturedPackets OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 10 }
+
+ bufferControlTurnOnTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 11 }
+
+ bufferControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 12 }
+
+ bufferControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 13 }
+
+ captureBufferTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CaptureBufferEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { capture 2 }
+
+ captureBufferEntry OBJECT-TYPE
+ SYNTAX CaptureBufferEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { captureBufferControlIndex, captureBufferIndex }
+ ::= { captureBufferTable 1 }
+
+ CaptureBufferEntry ::= SEQUENCE {
+ captureBufferControlIndex INTEGER (1..65535),
+ captureBufferIndex INTEGER,
+ captureBufferPacketID INTEGER,
+ captureBufferPacketData OCTET STRING,
+ captureBufferPacketLength INTEGER,
+ captureBufferPacketTime INTEGER,
+ captureBufferPacketStatus INTEGER
+ }
+
+ captureBufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 1 }
+
+ captureBufferIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 2 }
+
+ captureBufferPacketID OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { captureBufferEntry 3 }
+
+ captureBufferPacketData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 4 }
+
+ captureBufferPacketLength OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 5 }
+
+ captureBufferPacketTime OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 6 }
+
+
+ captureBufferPacketStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 7 }
+
+
+
+
+
+ eventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 1 }
+
+ eventEntry OBJECT-TYPE
+ SYNTAX EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { eventIndex }
+ ::= { eventTable 1 }
+
+ EventEntry ::= SEQUENCE {
+ eventIndex INTEGER (1..65535),
+ eventDescription DisplayString (SIZE (0..127)),
+ eventType INTEGER,
+ eventCommunity OCTET STRING (SIZE (0..127)),
+ eventLastTimeSent TimeTicks,
+ eventOwner OwnerString,
+ eventStatus INTEGER
+ }
+
+ eventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 1 }
+
+ eventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 2 }
+
+ eventType OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ log(2),
+ log-and-trap(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 3 }
+
+ eventCommunity OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 4 }
+
+ eventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 5 }
+
+ eventOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 6 }
+
+ eventStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 7 }
+
+ logTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 2 }
+
+ logEntry OBJECT-TYPE
+ SYNTAX LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { logEventIndex, logIndex }
+
+
+ ::= { logTable 1 }
+
+ LogEntry ::= SEQUENCE {
+ logEventIndex INTEGER (1..65535),
+ logIndex INTEGER,
+ logTime TimeTicks,
+ logDescription DisplayString (SIZE (0..255))
+ }
+
+ logEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 1 }
+
+ logIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 2 }
+
+ logTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 3 }
+
+
+ logDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 4 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-CONF.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-CONF.txt
new file mode 100644
index 0000000..7533685
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-CONF.txt
@@ -0,0 +1,7 @@
+SNMPv2-CONF DEFINITIONS ::= BEGIN
+
+IMPORTS iso FROM SNMPv2-SMI;
+
+dummy ::= { iso 999 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-M2M-MIB.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-M2M-MIB.txt
new file mode 100644
index 0000000..3ec4719
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-M2M-MIB.txt
@@ -0,0 +1,371 @@
+SNMPv2-M2M-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ Integer32, Counter32, snmpModules
+ FROM SNMPv2-SMI
+ DisplayString, InstancePointer, RowStatus, TimeStamp
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF
+ contextIdentity
+ FROM SNMPv2-PARTY-MIB;
+
+ snmpM2M MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ " Steven Waldbusser
+
+ Postal: Carnegie Mellon University
+ 4910 Forbes Ave
+ Pittsburgh, PA 15213
+
+ Tel: +1 412 268 6628
+ Fax: +1 412 268 4987
+
+ E-mail: waldbusser@cmu.edu"
+ ::= { snmpModules 2 }
+
+ snmpM2MObjects OBJECT IDENTIFIER ::= { snmpM2M 1 }
+
+
+
+ snmpAlarm OBJECT IDENTIFIER ::= { snmpM2MObjects 1 }
+
+
+
+ snmpAlarmNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarm 1 }
+
+ snmpAlarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarm 2 }
+
+ snmpAlarmEntry OBJECT-TYPE
+ SYNTAX SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { contextIdentity, snmpAlarmIndex }
+ ::= { snmpAlarmTable 1 }
+
+
+ SnmpAlarmEntry ::= SEQUENCE {
+ snmpAlarmIndex INTEGER,
+ snmpAlarmVariable InstancePointer,
+ snmpAlarmInterval Integer32,
+ snmpAlarmSampleType INTEGER,
+ snmpAlarmValue Integer32,
+ snmpAlarmStartupAlarm INTEGER,
+ snmpAlarmRisingThreshold Integer32,
+ snmpAlarmFallingThreshold Integer32,
+ snmpAlarmRisingEventIndex INTEGER,
+ snmpAlarmFallingEventIndex INTEGER,
+ snmpAlarmUnavailableEventIndex INTEGER,
+ snmpAlarmStatus RowStatus
+ }
+
+ snmpAlarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarmEntry 1 }
+
+
+ snmpAlarmVariable OBJECT-TYPE
+ SYNTAX InstancePointer
+ MAX-ACCESS read-create
+ STATUS current
+
+
+ ::= { snmpAlarmEntry 2 }
+
+ snmpAlarmInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 3 }
+
+
+ snmpAlarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { deltaValue }
+ ::= { snmpAlarmEntry 4 }
+
+
+ snmpAlarmValue OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarmEntry 5 }
+
+
+ snmpAlarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { risingOrFallingAlarm }
+ ::= { snmpAlarmEntry 6 }
+
+
+ snmpAlarmRisingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 7 }
+
+
+ snmpAlarmFallingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 8 }
+
+
+ snmpAlarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 9 }
+
+
+ snmpAlarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 10 }
+
+ snmpAlarmUnavailableEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 11 }
+
+
+ snmpAlarmStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 12 }
+
+
+
+ snmpAlarmNotifications
+ OBJECT IDENTIFIER ::= { snmpAlarm 3 }
+
+ snmpRisingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmRisingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 1 }
+
+ snmpFallingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmFallingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 2 }
+
+ snmpObjectUnavailableAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable }
+ STATUS current
+ ::= { snmpAlarmNotifications 3 }
+
+
+
+ snmpEvent OBJECT IDENTIFIER ::= { snmpM2MObjects 2 }
+
+
+ snmpEventNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 1 }
+
+
+ snmpEventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 2 }
+
+ snmpEventEntry OBJECT-TYPE
+ SYNTAX SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex }
+ ::= { snmpEventTable 1 }
+
+ SnmpEventEntry ::= SEQUENCE {
+ snmpEventIndex INTEGER,
+ snmpEventID OBJECT IDENTIFIER,
+ snmpEventDescription DisplayString,
+ snmpEventEvents Counter32,
+ snmpEventLastTimeSent TimeStamp,
+ snmpEventStatus RowStatus
+ }
+
+ snmpEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEventEntry 1 }
+
+
+ snmpEventID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 2 }
+
+ snmpEventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 3 }
+
+ snmpEventEvents OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEventEntry 4 }
+
+
+ snmpEventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ DEFVAL { 0 }
+ ::= { snmpEventEntry 5 }
+
+ snmpEventStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 6 }
+
+
+ snmpEventNotifyMinInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 3 }
+
+ snmpEventNotifyMaxRetransmissions OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 4 }
+
+
+
+
+ snmpEventNotifyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 5 }
+
+ snmpEventNotifyEntry OBJECT-TYPE
+ SYNTAX SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex, contextIdentity }
+ ::= { snmpEventNotifyTable 1 }
+
+ SnmpEventNotifyEntry ::= SEQUENCE {
+ snmpEventNotifyIntervalRequested Integer32,
+ snmpEventNotifyRetransmissionsRequested Integer32,
+ snmpEventNotifyLifetime Integer32,
+ snmpEventNotifyStatus RowStatus
+ }
+
+
+ snmpEventNotifyIntervalRequested OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 30 }
+ ::= { snmpEventNotifyEntry 1 }
+
+ snmpEventNotifyRetransmissionsRequested OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 5 }
+ ::= { snmpEventNotifyEntry 2 }
+
+
+ snmpEventNotifyLifetime OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 86400 }
+ ::= { snmpEventNotifyEntry 3 }
+
+ snmpEventNotifyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventNotifyEntry 4 }
+
+
+
+ snmpM2MConformance
+ OBJECT IDENTIFIER ::= { snmpM2M 2 }
+
+ snmpM2MCompliances
+ OBJECT IDENTIFIER ::= { snmpM2MConformance 1 }
+ snmpM2MGroups OBJECT IDENTIFIER ::= { snmpM2MConformance 2 }
+
+
+ snmpM2MCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { snmpAlarmGroup, snmpEventGroup }
+ ::= { snmpM2MCompliances 1 }
+
+
+ snmpAlarmGroup OBJECT-GROUP
+ OBJECTS { snmpAlarmNextIndex,
+ snmpAlarmVariable, snmpAlarmInterval,
+ snmpAlarmSampleType, snmpAlarmValue,
+ snmpAlarmStartupAlarm, snmpAlarmRisingThreshold,
+ snmpAlarmFallingThreshold,
+ snmpAlarmRisingEventIndex,
+ snmpAlarmFallingEventIndex,
+ snmpAlarmUnavailableEventIndex,
+ snmpAlarmStatus }
+ STATUS current
+ ::= { snmpM2MGroups 1 }
+
+
+ snmpEventGroup OBJECT-GROUP
+ OBJECTS { snmpEventNextIndex,
+ snmpEventID, snmpEventDescription,
+ snmpEventEvents, snmpEventLastTimeSent,
+ snmpEventStatus, snmpEventNotifyMinInterval,
+ snmpEventNotifyMaxRetransmissions,
+ snmpEventNotifyIntervalRequested,
+ snmpEventNotifyRetransmissionsRequested,
+ snmpEventNotifyLifetime, snmpEventNotifyStatus }
+ STATUS current
+ ::= { snmpM2MGroups 2 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-MIB.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-MIB.txt
new file mode 100644
index 0000000..303ff9a
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-MIB.txt
@@ -0,0 +1,440 @@
+SNMPv2-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ NOTIFICATION-GROUP, OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TimeStamp, TestAndIncr, DisplayString
+ FROM SNMPv2-TC
+ mib-2, snmpModules, Counter32, TimeTicks, NOTIFICATION-TYPE, OBJECT-TYPE,
+ MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpMIB MODULE-IDENTITY
+ LAST-UPDATED "9511090000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Marshall T. Rose
+
+ Postal: Dover Beach Consulting, Inc.
+ 420 Whisman Court
+ Mountain View, CA 94043-2186
+ US
+
+ Tel: +1 415 968 1052
+
+ E-mail: mrose@dbc.mtview.ca.us"
+ REVISION "9304010000Z"
+ ::= { snmpModules 1 }
+
+snmpMIBObjects ::= { snmpMIB 1 }
+
+system ::= { mib-2 1 }
+
+sysDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 1 }
+
+sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 2 }
+
+sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 3 }
+
+sysContact OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 4 }
+
+sysName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 5 }
+
+sysLocation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 6 }
+
+sysServices OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 7 }
+
+sysORLastChange OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 8 }
+
+sysORTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { system 9 }
+
+sysOREntry OBJECT-TYPE
+ SYNTAX SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { sysORIndex }
+ ::= { sysORTable 1 }
+
+SysOREntry ::=
+ SEQUENCE {
+ sysORIndex
+ INTEGER,
+
+ sysORID
+ OBJECT IDENTIFIER,
+
+ sysORDescr
+ DisplayString,
+
+ sysORUpTime
+ TimeStamp
+ }
+
+sysORIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { sysOREntry 1 }
+
+sysORID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 2 }
+
+sysORDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 3 }
+
+sysORUpTime OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 4 }
+
+snmp ::= { mib-2 11 }
+
+snmpInPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 1 }
+
+snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 3 }
+
+snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 4 }
+
+snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 5 }
+
+snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 6 }
+
+snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmp 30 }
+
+snmpSilentDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 31 }
+
+snmpProxyDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 32 }
+
+snmpTrap ::= { snmpMIBObjects 4 }
+
+snmpTrapOID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 1 }
+
+snmpTrapEnterprise OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 3 }
+
+snmpTraps ::= { snmpMIBObjects 5 }
+
+coldStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 1 }
+
+warmStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 2 }
+
+authenticationFailure NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 5 }
+
+snmpSet ::= { snmpMIBObjects 6 }
+
+snmpSetSerialNo OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmpSet 1 }
+
+snmpMIBConformance ::= { snmpMIB 2 }
+
+snmpMIBCompliances ::= { snmpMIBConformance 1 }
+
+snmpMIBGroups ::= { snmpMIBConformance 2 }
+
+snmpBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS {
+ snmpGroup,
+ snmpSetGroup,
+ systemGroup,
+ snmpBasicNotificationsGroup
+ }
+ GROUP snmpCommunityGroup
+ ::= { snmpMIBCompliances 2 }
+
+snmpGroup OBJECT-GROUP
+ OBJECTS {
+ snmpInPkts,
+ snmpInBadVersions,
+ snmpInASNParseErrs,
+ snmpSilentDrops,
+ snmpProxyDrops,
+ snmpEnableAuthenTraps
+ }
+ STATUS current
+ ::= { snmpMIBGroups 8 }
+
+snmpCommunityGroup OBJECT-GROUP
+ OBJECTS { snmpInBadCommunityNames, snmpInBadCommunityUses }
+ STATUS current
+ ::= { snmpMIBGroups 9 }
+
+snmpSetGroup OBJECT-GROUP
+ OBJECTS { snmpSetSerialNo }
+ STATUS current
+ ::= { snmpMIBGroups 5 }
+
+systemGroup OBJECT-GROUP
+ OBJECTS {
+ sysDescr,
+ sysObjectID,
+ sysUpTime,
+ sysContact,
+ sysName,
+ sysLocation,
+ sysServices,
+ sysORLastChange,
+ sysORID,
+ sysORUpTime,
+ sysORDescr
+ }
+ STATUS current
+ ::= { snmpMIBGroups 6 }
+
+
+snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 2 }
+
+snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 8 }
+
+snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 9 }
+
+snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 10 }
+
+snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 11 }
+
+snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 12 }
+
+snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 13 }
+
+snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 14 }
+
+snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 15 }
+
+snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 16 }
+
+snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 17 }
+
+snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 18 }
+
+snmpInTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 19 }
+
+snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 20 }
+
+snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 21 }
+
+snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 22 }
+
+snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 24 }
+
+snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 25 }
+
+snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 26 }
+
+snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 27 }
+
+snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 28 }
+
+snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 29 }
+
+snmpObsoleteGroup OBJECT-GROUP
+ OBJECTS {
+ snmpOutPkts,
+ snmpInTooBigs,
+ snmpInNoSuchNames,
+ snmpInBadValues,
+ snmpInReadOnlys,
+ snmpInGenErrs,
+ snmpInTotalReqVars,
+ snmpInTotalSetVars,
+ snmpInGetRequests,
+ snmpInGetNexts,
+ snmpInSetRequests,
+ snmpInGetResponses,
+ snmpInTraps,
+ snmpOutTooBigs,
+ snmpOutNoSuchNames,
+ snmpOutBadValues,
+ snmpOutGenErrs,
+ snmpOutGetRequests,
+ snmpOutGetNexts,
+ snmpOutSetRequests,
+ snmpOutGetResponses,
+ snmpOutTraps
+ }
+ STATUS obsolete
+ ::= { snmpMIBGroups 10 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-PARTY-MIB.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-PARTY-MIB.txt
new file mode 100644
index 0000000..89ef486
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-PARTY-MIB.txt
@@ -0,0 +1,586 @@
+SNMPv2-PARTY-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, snmpModules,
+ UInteger32
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, RowStatus, TruthValue
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF;
+
+ partyMIB MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMP Security Working Group"
+ CONTACT-INFO
+ " Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road
+ Mountain View, CA 94043
+ US
+
+ Tel: +1 415 966 7934
+ Fax: +1 415 960 3738
+
+ E-mail: kzm@hls.com"
+ ::= { snmpModules 3 }
+
+
+
+ Party ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+ TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+
+ Clock ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX UInteger32
+
+ Context ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+
+ StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ }
+
+
+
+ partyAdmin OBJECT IDENTIFIER ::= { partyMIB 1 }
+
+
+ partyProtocols OBJECT IDENTIFIER ::= { partyAdmin 1 }
+
+ noAuth OBJECT IDENTIFIER ::= { partyProtocols 1 }
+
+ noPriv OBJECT IDENTIFIER ::= { partyProtocols 2 }
+
+ desPrivProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 3 }
+
+ v2md5AuthProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 4 }
+
+
+ temporalDomains
+ OBJECT IDENTIFIER ::= { partyAdmin 2 }
+
+ currentTime OBJECT IDENTIFIER ::= { temporalDomains 1 }
+
+ restartTime OBJECT IDENTIFIER ::= { temporalDomains 2 }
+
+ cacheTime OBJECT IDENTIFIER ::= { temporalDomains 3 }
+
+
+
+
+ initialPartyId OBJECT IDENTIFIER ::= { partyAdmin 3 }
+
+ initialContextId
+ OBJECT IDENTIFIER ::= { partyAdmin 4 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ partyMIBObjects
+ OBJECT IDENTIFIER ::= { partyMIB 2 }
+
+
+ snmpParties OBJECT IDENTIFIER ::= { partyMIBObjects 1 }
+
+ partyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpParties 1 }
+
+ partyEntry OBJECT-TYPE
+ SYNTAX PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED partyIdentity }
+ ::= { partyTable 1 }
+
+
+ PartyEntry ::=
+ SEQUENCE {
+ partyIdentity Party,
+ partyIndex INTEGER,
+ partyTDomain OBJECT IDENTIFIER,
+ partyTAddress TAddress,
+ partyMaxMessageSize INTEGER,
+ partyLocal TruthValue,
+ partyAuthProtocol OBJECT IDENTIFIER,
+ partyAuthClock Clock,
+ partyAuthPrivate OCTET STRING,
+ partyAuthPublic OCTET STRING,
+ partyAuthLifetime INTEGER,
+ partyPrivProtocol OBJECT IDENTIFIER,
+ partyPrivPrivate OCTET STRING,
+ partyPrivPublic OCTET STRING,
+ partyCloneFrom Party,
+ partyStorageType StorageType,
+ partyStatus RowStatus
+ }
+
+ partyIdentity OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { partyEntry 1 }
+
+ partyIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { partyEntry 2 }
+
+
+ partyTDomain OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { snmpUDPDomain }
+ ::= { partyEntry 3 }
+
+ partyTAddress OBJECT-TYPE
+ SYNTAX TAddress
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { '000000000000'H }
+ ::= { partyEntry 4 }
+
+ partyMaxMessageSize OBJECT-TYPE
+ SYNTAX INTEGER (484..65507)
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 484 }
+ ::= { partyEntry 5 }
+
+
+ partyLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { false }
+ ::= { partyEntry 6 }
+
+ partyAuthProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { v2md5AuthProtocol }
+ ::= { partyEntry 7 }
+
+
+ partyAuthClock OBJECT-TYPE
+ SYNTAX Clock
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 0 }
+ ::= { partyEntry 8 }
+
+
+ partyAuthPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 9 }
+
+
+ partyAuthPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 10 }
+
+
+ partyAuthLifetime OBJECT-TYPE
+ SYNTAX INTEGER (0..2147483647)
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 300 }
+ ::= { partyEntry 11 }
+
+ partyPrivProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { noPriv }
+ ::= { partyEntry 12 }
+
+
+ partyPrivPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 13 }
+
+
+ partyPrivPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 14 }
+
+
+ partyCloneFrom OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 15 }
+
+
+ partyStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { partyEntry 16 }
+
+ partyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 17 }
+
+
+
+ snmpContexts OBJECT IDENTIFIER ::= { partyMIBObjects 2 }
+
+ contextTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpContexts 1 }
+
+ contextEntry OBJECT-TYPE
+ SYNTAX ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED contextIdentity }
+ ::= { contextTable 1 }
+
+ ContextEntry ::=
+ SEQUENCE {
+ contextIdentity Context,
+ contextIndex INTEGER,
+ contextLocal TruthValue,
+ contextViewIndex INTEGER,
+ contextLocalEntity OCTET STRING,
+ contextLocalTime OBJECT IDENTIFIER,
+ contextProxyDstParty Party,
+ contextProxySrcParty Party,
+ contextProxyContext OBJECT IDENTIFIER,
+ contextStorageType StorageType,
+ contextStatus RowStatus
+ }
+
+
+ contextIdentity OBJECT-TYPE
+ SYNTAX Context
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { contextEntry 1 }
+
+ contextIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { contextEntry 2 }
+
+ contextLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { true }
+ ::= { contextEntry 3 }
+
+
+ contextViewIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 4 }
+
+
+ contextLocalEntity OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 5 }
+
+ contextLocalTime OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { currentTime }
+ ::= { contextEntry 6 }
+
+
+ contextProxyDstParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 7 }
+
+ contextProxySrcParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 8 }
+
+
+ contextProxyContext OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 9 }
+
+ contextStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { contextEntry 10 }
+
+
+ contextStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 11 }
+
+
+
+ snmpAccess OBJECT IDENTIFIER ::= { partyMIBObjects 3 }
+
+ aclTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAccess 1 }
+
+ aclEntry OBJECT-TYPE
+ SYNTAX AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { aclTarget, aclSubject, aclResources }
+ ::= { aclTable 1 }
+
+ AclEntry ::=
+ SEQUENCE {
+ aclTarget INTEGER,
+ aclSubject INTEGER,
+ aclResources INTEGER,
+ aclPrivileges INTEGER,
+ aclStorageType StorageType,
+ aclStatus RowStatus
+ }
+
+
+ aclTarget OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 1 }
+
+ aclSubject OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 2 }
+
+ aclResources OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 3 }
+
+
+ aclPrivileges OBJECT-TYPE
+ SYNTAX INTEGER (0..255)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 4 }
+
+ aclStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { aclEntry 5 }
+
+
+ aclStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 6 }
+
+
+
+ snmpViews OBJECT IDENTIFIER ::= { partyMIBObjects 4 }
+
+ viewTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpViews 1 }
+
+ viewEntry OBJECT-TYPE
+ SYNTAX ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { viewIndex, IMPLIED viewSubtree }
+ ::= { viewTable 1 }
+
+ ViewEntry ::=
+ SEQUENCE {
+ viewIndex INTEGER,
+ viewSubtree OBJECT IDENTIFIER,
+ viewMask OCTET STRING,
+ viewType INTEGER,
+ viewStorageType StorageType,
+ viewStatus RowStatus
+ }
+
+
+ viewIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 1 }
+
+ viewSubtree OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 2 }
+
+ viewMask OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..16))
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { ''H }
+ ::= { viewEntry 3 }
+
+
+ viewType OBJECT-TYPE
+ SYNTAX INTEGER {
+ included(1),
+ excluded(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { included }
+ ::= { viewEntry 4 }
+
+ viewStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { viewEntry 5 }
+
+ viewStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { viewEntry 6 }
+
+
+
+ partyMIBConformance
+ OBJECT IDENTIFIER ::= { partyMIB 3 }
+
+ partyMIBCompliances
+ OBJECT IDENTIFIER ::= { partyMIBConformance 1 }
+ partyMIBGroups
+ OBJECT IDENTIFIER ::= { partyMIBConformance 2 }
+
+
+ unSecurableCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 1 }
+
+ partyNoPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 2 }
+
+
+ partyPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 3 }
+
+
+ fullPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 4 }
+
+
+ partyMIBGroup OBJECT-GROUP
+ OBJECTS { partyIndex, partyTDomain, partyTAddress,
+ partyMaxMessageSize, partyLocal,
+ partyAuthProtocol, partyAuthClock,
+ partyAuthPrivate, partyAuthPublic,
+ partyAuthLifetime, partyPrivProtocol,
+ partyPrivPrivate, partyPrivPublic,
+ partyStorageType, partyStatus,
+ partyCloneFrom,
+ contextIndex, contextLocal,
+ contextViewIndex, contextLocalEntity,
+ contextLocalTime, contextStorageType,
+ contextStatus, aclTarget, aclSubject,
+ aclPrivileges, aclStorageType, aclStatus,
+ viewMask, viewType, viewStorageType, viewStatus }
+ STATUS current
+ ::= { partyMIBGroups 1 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-SMI.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-SMI.txt
new file mode 100644
index 0000000..58ca3c3
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-SMI.txt
@@ -0,0 +1,54 @@
+SNMPv2-SMI DEFINITIONS ::= BEGIN
+
+org ::= { iso 3 }
+
+dod ::= { org 6 }
+
+internet ::= { dod 1 }
+
+directory ::= { internet 1 }
+
+mgmt ::= { internet 2 }
+
+mib-2 ::= { mgmt 1 }
+
+transmission ::= { mib-2 10 }
+
+experimental ::= { internet 3 }
+
+private ::= { internet 4 }
+
+enterprises ::= { private 1 }
+
+security ::= { internet 5 }
+
+snmpV2 ::= { internet 6 }
+
+snmpDomains ::= { snmpV2 1 }
+
+snmpProxys ::= { snmpV2 2 }
+
+snmpModules ::= { snmpV2 3 }
+
+ObjectName ::=
+ OBJECT IDENTIFIER
+
+NotificationName ::=
+ OBJECT IDENTIFIER
+
+
+
+
+
+
+
+
+
+
+
+
+zeroDotZero OBJECT-IDENTITY
+ STATUS current
+ ::= { 0 0 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-TC.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-TC.txt
new file mode 100644
index 0000000..b95d086
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-TC.txt
@@ -0,0 +1,90 @@
+SNMPv2-TC DEFINITIONS ::= BEGIN
+
+IMPORTS
+ FROM SNMPv2-SMI;
+
+DisplayString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+PhysAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+MacAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+TruthValue ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ true(1),
+ false(2)
+ }
+
+TestAndIncr ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+AutonomousType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+InstancePointer ::= TEXTUAL-CONVENTION
+ STATUS obsolete
+ SYNTAX OBJECT IDENTIFIER
+
+VariablePointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowPointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowStatus ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ active(1),
+ notInService(2),
+ notReady(3),
+ createAndGo(4),
+ createAndWait(5),
+ destroy(6)
+ }
+
+TimeStamp ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX TimeTicks
+
+TimeInterval ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+DateAndTime ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3),
+ permanent(4),
+ readOnly(5)
+ }
+
+TDomain ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/SNMPv2-TM.txt b/release/picobsd/net/crunch1/mibs/SNMPv2-TM.txt
new file mode 100644
index 0000000..afd7d9f
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/SNMPv2-TM.txt
@@ -0,0 +1,54 @@
+SNMPv2-TM DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ snmpProxys, snmpDomains, OBJECT-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpUDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 1 }
+
+SnmpUDPAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1d.1d.1d.1d/2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpCLNSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 2 }
+
+snmpCONSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 3 }
+
+SnmpOSIAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "*1x:/1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpDDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 4 }
+
+SnmpNBPAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpIPXDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 5 }
+
+SnmpIPXAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "4x.1x:1x:1x:1x:1x:1x.2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+rfc1157Proxy ::= { snmpProxys 1 }
+
+rfc1157Domain OBJECT-IDENTITY
+ STATUS current
+ ::= { rfc1157Proxy 1 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/TCP-MIB.txt b/release/picobsd/net/crunch1/mibs/TCP-MIB.txt
new file mode 100644
index 0000000..b6b96c8
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/TCP-MIB.txt
@@ -0,0 +1,234 @@
+TCP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, Gauge32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+tcpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 49 }
+
+tcp ::= { mib-2 6 }
+
+tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ constant(2),
+ rsre(3),
+ vanj(4)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 1 }
+
+tcpRtoMin OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 2 }
+
+tcpRtoMax OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 3 }
+
+tcpMaxConn OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 4 }
+
+tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 5 }
+
+tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 6 }
+
+tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 7 }
+
+tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 8 }
+
+tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 9 }
+
+tcpInSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 10 }
+
+tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 11 }
+
+tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 12 }
+
+tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { tcp 13 }
+
+tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX {
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort
+ }
+ ::= { tcpConnTable 1 }
+
+TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+
+ tcpConnLocalAddress
+ IpAddress,
+
+ tcpConnLocalPort
+ INTEGER,
+
+ tcpConnRemAddress
+ IpAddress,
+
+ tcpConnRemPort
+ INTEGER
+ }
+
+tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { tcpConnEntry 1 }
+
+tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 2 }
+
+tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 3 }
+
+tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 4 }
+
+tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 5 }
+
+tcpInErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 14 }
+
+tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 15 }
+
+tcpMIBConformance ::= { tcpMIB 2 }
+
+tcpMIBCompliances ::= { tcpMIBConformance 1 }
+
+tcpMIBGroups ::= { tcpMIBConformance 2 }
+
+tcpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { tcpGroup }
+ ::= { tcpMIBCompliances 1 }
+
+tcpGroup OBJECT-GROUP
+ OBJECTS {
+ tcpRtoAlgorithm,
+ tcpRtoMin,
+ tcpRtoMax,
+ tcpMaxConn,
+ tcpActiveOpens,
+ tcpPassiveOpens,
+ tcpAttemptFails,
+ tcpEstabResets,
+ tcpCurrEstab,
+ tcpInSegs,
+ tcpOutSegs,
+ tcpRetransSegs,
+ tcpConnState,
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort,
+ tcpInErrs,
+ tcpOutRsts
+ }
+ STATUS current
+ ::= { tcpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/net/crunch1/mibs/UCD-SNMP-MIB.txt b/release/picobsd/net/crunch1/mibs/UCD-SNMP-MIB.txt
new file mode 100644
index 0000000..29277a6
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/UCD-SNMP-MIB.txt
@@ -0,0 +1,519 @@
+UCD-SNMP-MIB DEFINITIONS ::= BEGIN
+
+
+IMPORTS
+ enterprises, OBJECT-TYPE
+ FROM SNMPv2-SMI
+ DisplayString
+ FROM SNMPv2-TC;
+
+ucdavis OBJECT IDENTIFIER ::= { enterprises 2021 }
+
+
+ucdSnmpAgent OBJECT IDENTIFIER ::= { ucdavis 250 }
+hpux9 OBJECT IDENTIFIER ::= { ucdSnmpAgent 1 }
+hpux10 OBJECT IDENTIFIER ::= { ucdSnmpAgent 6 }
+sunos4 OBJECT IDENTIFIER ::= { ucdSnmpAgent 2 }
+solaris OBJECT IDENTIFIER ::= { ucdSnmpAgent 3 }
+osf OBJECT IDENTIFIER ::= { ucdSnmpAgent 4 }
+ultrix OBJECT IDENTIFIER ::= { ucdSnmpAgent 5 }
+netbsd1 OBJECT IDENTIFIER ::= { ucdSnmpAgent 7 }
+freebsd2 OBJECT IDENTIFIER ::= { ucdSnmpAgent 8 }
+irix OBJECT IDENTIFIER ::= { ucdSnmpAgent 9 }
+unknown OBJECT IDENTIFIER ::= { ucdSnmpAgent 255 }
+
+
+processes OBJECT-TYPE
+ SYNTAX Processes
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { processIndex }
+ ::= { ucdavis 1 }
+
+
+Processes ::= SEQUENCE {
+ processIndex INTEGER,
+ processNames DisplayString,
+ processMin INTEGER,
+ processMax INTEGER,
+ processCount INTEGER,
+ processErrorFlag INTEGER,
+ processErrMessage DisplayString,
+ processErrFix INTEGER
+}
+
+processIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 1 }
+
+processNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 2 }
+
+processMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 3 }
+
+processMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 4 }
+
+processCount OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 5 }
+
+processErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 100 }
+
+processErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 101 }
+
+processErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { processes 102 }
+
+extensible OBJECT-TYPE
+ SYNTAX Extensible
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { extensibleIndex }
+ ::= { ucdavis 3 }
+
+Extensible ::= SEQUENCE {
+ extensibleIndex INTEGER,
+ extensibleNames DisplayString,
+ extensibleCommand DisplayString,
+ extensibleResult INTEGER,
+ extensibleOutput DisplayString,
+ extensibleErrFix INTEGER
+}
+
+extensibleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 1 }
+
+extensibleNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 2 }
+
+extensibleCommand OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 3 }
+
+extensibleResult OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 100 }
+
+extensibleOutput OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 101 }
+
+extensibleErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { extensible 102 }
+
+memory OBJECT-TYPE
+ SYNTAX Memory
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ucdavis 4 }
+
+Memory ::= SEQUENCE {
+ memIndex INTEGER,
+ memErrorName DisplayString,
+ memTotalSwap INTEGER,
+ memAvailSwap INTEGER,
+ memTotalReal INTEGER,
+ memAvailReal INTEGER,
+ memTotalSwapTXT INTEGER,
+ memAvailSwapTXT INTEGER,
+ memTotalRealTXT INTEGER,
+ memAvailRealTXT INTEGER,
+ memTotalFree INTEGER,
+ memMinimumSwap INTEGER,
+ memSwapError DisplayString
+}
+memIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 1 }
+
+memErrorName OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 2 }
+
+memTotalSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 3 }
+
+memAvailSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 4 }
+
+memTotalReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 5 }
+
+memAvailReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 6 }
+
+memTotalSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 7 }
+
+memAvailSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 8 }
+
+memTotalRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 9 }
+
+memAvailRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 10 }
+
+memTotalFree OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 11 }
+
+memMinimumSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 12 }
+
+memSwapError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 100 }
+
+memSwapErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 101 }
+
+lockd OBJECT-TYPE
+ SYNTAX Lockd
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { lockdIndex }
+ ::= { ucdavis 5 }
+
+Lockd ::= SEQUENCE {
+ lockdIndex INTEGER,
+ lockdError INTEGER,
+ lockdErrorMsg DisplayString
+}
+
+lockdIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 1 }
+
+lockdError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 100 }
+
+lockdErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 101 }
+
+disk OBJECT-TYPE
+ SYNTAX Disk
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { diskIndex }
+ ::= { ucdavis 6 }
+
+Disk ::= SEQUENCE {
+ diskIndex INTEGER,
+ diskPath DisplayString,
+ diskDevice DisplayString,
+ diskMinimum INTEGER,
+ diskTotal INTEGER,
+ diskAvail INTEGER,
+ diskUsed INTEGER,
+ diskPercent INTEGER,
+ diskErrorFlag INTEGER,
+ diskErrorMsg DisplayString
+}
+
+diskIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 1 }
+
+diskPath OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 2 }
+
+diskDevice OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 3 }
+
+diskMinimum OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 4 }
+
+diskTotal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 5 }
+
+diskAvail OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 6 }
+
+diskUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 7 }
+
+diskPercent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 8 }
+
+diskErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 100 }
+
+diskErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 101 }
+
+loadaves OBJECT-TYPE
+ SYNTAX Loadaves
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { loadaveIndex }
+ ::= { ucdavis 7 }
+
+
+Loadaves ::= SEQUENCE {
+ loadaveIndex INTEGER,
+ loadaveNames DisplayString,
+ loadaveLoad DisplayString,
+ loadaveConfig DisplayString,
+ loadaveErrorFlag INTEGER,
+ loadaveErrMessage DisplayString
+}
+
+loadaveIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 1 }
+
+loadaveNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 2 }
+
+loadaveLoad OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 3 }
+
+loadaveConfig OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 4 }
+
+loadaveErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 100 }
+
+loadaveErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 101 }
+
+version OBJECT-TYPE
+ SYNTAX Version
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { versionIndex }
+ ::= { ucdavis 100 }
+
+Version ::= SEQUENCE {
+ versionIndex INTEGER,
+ versionTag DisplayString,
+ versionDate DisplayString,
+ versionCDate DisplayString,
+ versionIdent DisplayString,
+ versionClearCache INTEGER,
+ versionUpdateConfig INTEGER
+}
+
+versionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 1 }
+
+versionTag OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 2 }
+
+versionDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 3 }
+
+versionCDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 4 }
+
+versionIdent OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 5 }
+
+versionClearCache OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 10 }
+
+versionUpdateConfig OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 11 }
+
+versionRestartAgent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 12 }
+
+snmperrs OBJECT-TYPE
+ SYNTAX Snmperrs
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { snmperrIndex }
+ ::= { ucdavis 101 }
+
+
+Snmperrs ::= SEQUENCE {
+ snmperrIndex INTEGER,
+ snmperrNames DisplayString,
+ snmperrErrorFlag INTEGER,
+ snmperrErrMessage DisplayString
+}
+
+snmperrIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 1 }
+
+snmperrNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 2 }
+
+snmperrErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 100 }
+
+snmperrErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 101 }
+
+END
+
diff --git a/release/picobsd/net/crunch1/mibs/UDP-MIB.txt b/release/picobsd/net/crunch1/mibs/UDP-MIB.txt
new file mode 100644
index 0000000..a6288e8
--- /dev/null
+++ b/release/picobsd/net/crunch1/mibs/UDP-MIB.txt
@@ -0,0 +1,109 @@
+UDP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+udpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 50 }
+
+udp ::= { mib-2 7 }
+
+udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 1 }
+
+udpNoPorts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 2 }
+
+udpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 3 }
+
+udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 4 }
+
+udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { udp 5 }
+
+udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+
+ udpLocalPort
+ INTEGER
+ }
+
+udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 1 }
+
+udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 2 }
+
+udpMIBConformance ::= { udpMIB 2 }
+
+udpMIBCompliances ::= { udpMIBConformance 1 }
+
+udpMIBGroups ::= { udpMIBConformance 2 }
+
+udpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { udpGroup }
+ ::= { udpMIBCompliances 1 }
+
+udpGroup OBJECT-GROUP
+ OBJECTS {
+ udpInDatagrams,
+ udpNoPorts,
+ udpInErrors,
+ udpOutDatagrams,
+ udpLocalAddress,
+ udpLocalPort
+ }
+ STATUS current
+ ::= { udpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/net/crunch1/passwd.diff b/release/picobsd/net/crunch1/passwd.diff
new file mode 100644
index 0000000..aa356f7
--- /dev/null
+++ b/release/picobsd/net/crunch1/passwd.diff
@@ -0,0 +1,48 @@
+*** Makefile.orig Sat Aug 1 20:39:04 1998
+--- Makefile Sat Aug 1 20:40:38 1998
+***************
+*** 2,24 ****
+ # $Id: passwd.diff,v 1.2 1998/08/02 12:23:45 abial Exp $
+
+ PROG= passwd
+! SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c pw_yp.c \
+! yp_passwd.c ypxfr_misc.c ${GENSRCS}
+ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
+ yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
+ CFLAGS+=-Wall
+
+! DPADD= ${LIBCRYPT} ${LIBRPCSVC} ${LIBUTIL}
+! LDADD= -lcrypt -lrpcsvc -lutil
+ .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/vipw \
+! ${.CURDIR}/../rlogin ${.CURDIR}/../../libexec/ypxfr \
+! ${.CURDIR}/../../usr.sbin/rpc.yppasswdd
+
+! CFLAGS+= -DLOGIN_CAP -DCRYPT -DYP -I. -I${.CURDIR} \
+ -I${.CURDIR}/../../usr.sbin/vipw \
+ -I${.CURDIR}/../../usr.bin/chpass \
+- -I${.CURDIR}/../../libexec/ypxfr \
+- -I${.CURDIR}/../../usr.sbin/rpc.yppasswdd \
+ -Dyp_error=warnx -DLOGGING
+
+ CLEANFILES= ${GENSRCS}
+--- 2,21 ----
+ # $Id: passwd.diff,v 1.2 1998/08/02 12:23:45 abial Exp $
+
+ PROG= passwd
+! SRCS= local_passwd.c passwd.c pw_copy.c pw_util.c
+!
+ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_clnt.c \
+ yppasswd_private.h yppasswd_private_clnt.c yppasswd_private_xdr.c
+ CFLAGS+=-Wall
+
+! DPADD= ${LIBCRYPT} ${LIBUTIL}
+! LDADD= -lcrypt -lutil
+ .PATH: ${.CURDIR}/../../usr.bin/chpass ${.CURDIR}/../../usr.sbin/vipw \
+! ${.CURDIR}/../rlogin
+
+! CFLAGS+= -DLOGIN_CAP -DCRYPT -I. -I${.CURDIR} \
+ -I${.CURDIR}/../../usr.sbin/vipw \
+ -I${.CURDIR}/../../usr.bin/chpass \
+ -Dyp_error=warnx -DLOGGING
+
+ CLEANFILES= ${GENSRCS}
diff --git a/release/picobsd/net/crunch1/ppp.diff b/release/picobsd/net/crunch1/ppp.diff
new file mode 100644
index 0000000..238a1c2
--- /dev/null
+++ b/release/picobsd/net/crunch1/ppp.diff
@@ -0,0 +1,12 @@
+*** Makefile.orig Sat Jul 4 10:20:02 1998
+--- Makefile Sat Aug 1 20:43:49 1998
+***************
+*** 12,17 ****
+--- 12,18 ----
+ BINMODE=4554
+ BINOWN= root
+ BINGRP= network
++ NOSECURE=yes
+
+ OPSYS!= uname -s
+ .if (${OPSYS} == "OpenBSD")
diff --git a/release/picobsd/net/floppy.tree/boot.config b/release/picobsd/net/floppy.tree/boot.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/boot.config
diff --git a/release/picobsd/net/floppy.tree/etc/disktab b/release/picobsd/net/floppy.tree/etc/disktab
new file mode 100644
index 0000000..7575ba6
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/disktab
@@ -0,0 +1,87 @@
+#
+# Floppy formats:
+#
+# To make a filesystem on a floppy:
+# fdformat [-f <size>] fd<drive>[.<size>]
+# disklabel -B -r -w fd<drive>[.<size>] fd<size>
+# newfs <opts> fd<drive>[.<size>]
+#
+# with <opts>:
+# -t 2 - two heads
+# -u 9|15|18 - sectors per track
+# (using the default value of 1/4096 is not much useful for floppies)
+# -l 1 - interleave 1 (for most floppies)
+# -i 65536 - bytes of data per i-node
+# (the default -i value will render you with a floppy wasting way
+# too much space in i-node areas)
+#
+
+fd360:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\
+ :pa#720:oa#0:ba#4096:fa#512:\
+ :pb#720:ob#0:bb#4096:fb#512:\
+ :pc#720:oc#0:bc#4096:fc#512:
+
+fd720:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\
+ :pa#1440:oa#0:ba#4096:fa#512:\
+ :pb#1440:ob#0:bb#4096:fb#512:\
+ :pc#1440:oc#0:bc#4096:fc#512:
+
+fd1200|floppy5|5in|5.25in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\
+ :pa#2400:oa#0:ba#4096:fa#512:\
+ :pb#2400:ob#0:bb#4096:fb#512:\
+ :pc#2400:oc#0:bc#4096:fc#512:
+
+fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pb#2880:ob#0:bb#4096:fb#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+fd1024|floppy0|3.5in Special Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#16:nc#64:\
+ :pa#2048:oa#0:ba#4096:fa#512:\
+ :pb#2048:ob#0:bb#4096:fb#512:\
+ :pc#2048:oc#0:bc#4096:fc#512:
+
+# a == root
+# b == swap
+# c == d == whole disk
+# e == /var
+# f == scratch
+# h == /usr
+
+cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\
+ :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \
+ :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \
+ :pb#24288:ob#15840:tb=swap: \
+ :pc#202224:oc#0: \
+ :pd#202224:od#0: \
+ :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \
+ :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \
+ :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512:
+
+sony650|Sony 650 MB MOD|\
+ :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\
+ :pc#576600:oc#0:\
+ :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024:
+
+mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\
+ :ty=removeable:dt=SCSI:rm#3600:\
+ :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\
+ :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\
+ :pc#444384:oc#0:
+
+minimum:ty=mfs:se#512:nt#1:rm#300:\
+ :ns#2880:nc#1:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+zip100|zip 100:\
+ :ty=removable:se#512:nc#96:nt#64:ns#32:\
+ :pa#196608:oa#0:ba#4096:fa#512:\
+ :pb#196608:ob#0:bb#4096:fb#512:\
+ :pc#196608:oc#0:bc#4096:fc#512:
+
diff --git a/release/picobsd/net/floppy.tree/etc/fstab b/release/picobsd/net/floppy.tree/etc/fstab
new file mode 100644
index 0000000..ca519e8
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/fstab
@@ -0,0 +1,4 @@
+proc /proc procfs rw 0 0
+#/dev/fd0c /start_floppy ufs rw 1 1
+#/dev/wd0s1 /dos msdos rw 0 0
+#/dev/wcd0c /cdrom cd9660 ro,noauto 0 0
diff --git a/release/picobsd/net/floppy.tree/etc/gettytab b/release/picobsd/net/floppy.tree/etc/gettytab
new file mode 100644
index 0000000..90562ac
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/gettytab
@@ -0,0 +1,40 @@
+# from: @(#)gettytab 5.14 (Berkeley) 3/27/91
+#
+default:\
+ :cb:ce:ck:lc:fd#1000:cl:im=\r\nPicoBSD (%h) (%t)\r\n\r\n:sp#1200:
+
+P|Pc|Pc console:\
+ :ht:np:sp#115200:
+
+#
+# Fixed speed entries
+2|std.9600|9600-baud:\
+ :np:sp#9600:
+g|std.19200|19200-baud:\
+ :np:sp#19200:
+std.38400|38400-baud:\
+ :np:sp#38400:
+std.57600|57600-baud:\
+ :np:sp#57600:
+std.115200|115200-baud:\
+ :np:sp#115200:
+
+#
+# Entry specifying explicit device settings. See termios(4) and
+# /usr/include/termios.h, too. The entry forces the tty into
+# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control.
+#
+# cflags: CLOCAL | HUPCL | CREAD | CS8
+# oflags: OPOST | ONLCR | OXTABS
+# iflags: IXOFF | IXON | ICRNL | IGNPAR
+# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE
+#
+# The `0' flags don't have input enabled. The `1' flags don't echo.
+# (Echoing is done inside getty itself.)
+#
+local.9600|CLOCAL tty @ 9600 Bd:\
+ :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\
+ :o0#0x00000007:o1#0x00000002:o2#0x00000007:\
+ :i0#0x00000704:i1#0x00000000:i2#0x00000704:\
+ :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\
+ :sp#9600:
diff --git a/release/picobsd/net/floppy.tree/etc/group b/release/picobsd/net/floppy.tree/etc/group
new file mode 100644
index 0000000..abbd733
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/group
@@ -0,0 +1,19 @@
+wheel:*:0:root,user
+daemon:*:1:daemon
+kmem:*:2:root
+sys:*:3:root
+tty:*:4:root
+operator:*:5:root
+mail:*:6:
+bin:*:7:
+news:*:8:
+man:*:9:
+games:*:13:
+staff:*:20:root,user
+guest:*:31:root
+uucp:*:66:
+xten:*:67:xten
+dialer:*:68:
+network:*:69:
+nogroup:*:65533:
+nobody:*:65534:
diff --git a/release/picobsd/net/floppy.tree/etc/host.conf b/release/picobsd/net/floppy.tree/etc/host.conf
new file mode 100644
index 0000000..0776873
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/host.conf
@@ -0,0 +1,3 @@
+# $Id: host.conf,v 1.1.1.1 1998/07/14 07:30:49 abial Exp $
+hosts
+bind
diff --git a/release/picobsd/net/floppy.tree/etc/hosts b/release/picobsd/net/floppy.tree/etc/hosts
new file mode 100644
index 0000000..0487f3d
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/hosts
@@ -0,0 +1,5 @@
+# $Id: hosts,v 1.5 1998/08/19 07:06:30 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/net/floppy.tree/etc/inetd.conf b/release/picobsd/net/floppy.tree/etc/inetd.conf
new file mode 100644
index 0000000..599a962
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/inetd.conf
@@ -0,0 +1,23 @@
+#
+# Internet server configuration database
+#
+# @(#)inetd.conf 5.4 (Berkeley) 6/30/90
+#
+telnet stream tcp nowait root /usr/libexec/telnetd telnetd
+#tftp dgram udp wait nobody /usr/libexec/tftpd tftpd /tftpboot
+#bootps dgram udp wait root /usr/libexec/bootpd bootpd
+#
+# "Small servers" -- used to be standard on, but we're more conservative
+# about things due to Internet security concerns. Only turn on what you
+# need.
+#
+#daytime stream tcp nowait root internal
+#daytime dgram udp wait root internal
+#time stream tcp nowait root internal
+#time dgram udp wait root internal
+#echo stream tcp nowait root internal
+#echo dgram udp wait root internal
+#discard stream tcp nowait root internal
+#discard dgram udp wait root internal
+#chargen stream tcp nowait root internal
+#chargen dgram udp wait root internal
diff --git a/release/picobsd/net/floppy.tree/etc/login.conf b/release/picobsd/net/floppy.tree/etc/login.conf
new file mode 100644
index 0000000..bde6121
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/login.conf
@@ -0,0 +1,120 @@
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+#
+# $Id: login.conf,v 1.1.1.1 1998/07/14 07:30:49 abial Exp $
+#
+
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=passwd:
+
+auth-root-defaults:\
+ :auth-login=passwd:\
+ :auth-rlogin=passwd:\
+
+auth-ftp-defaults:\
+ :auth=passwd:
+
+# Example defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+
+#
+# standard - standard user defaults
+#
+standard:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,EDITOR=/usr/bin/ee:\
+ :path=~/bin /bin /usr/bin:\
+ :nologin=/etc/nologin:\
+ :cputime=1h30m:\
+ :datasize=8M:\
+ :stacksize=2M:\
+ :memorylocked=4M:\
+ :memoryuse=8M:\
+ :filesize=8M:\
+ :coredumpsize=8M:\
+ :openfiles=24:\
+ :maxproc=32:\
+ :priority=0:\
+ :requirehome:\
+ :passwordperiod=90d:\
+ :umask=002:\
+ :ignoretime@:\
+ :tc=default:
+#
+# Staff users - few restrictions and allow login anytime
+#
+staff:\
+ :ignorenologin:\
+ :ignoretime:\
+ :requirehome@:\
+ :accounted@:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :umask=022:\
+ :tc=standard:
+
+
+#
+# root - fallback for root logins
+#
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:\
+#
+# Settings used by /etc/rc
+#
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
+#
+# Polish Users Accounts. Setup proper environment variables.
+#
+polish:Polish Users Accounts:\
+ :lang=pl_pl.ISO-8859-2:\
+ :tc=default:
diff --git a/release/picobsd/net/floppy.tree/etc/master.passwd b/release/picobsd/net/floppy.tree/etc/master.passwd
new file mode 100644
index 0000000..9d85cdf
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/master.passwd
@@ -0,0 +1,7 @@
+root:$1$xOOaGnKU$U9QdsCI40XXcCUMBN.7Az.:0:0::0:0:Charlie &:/root:/bin/sh
+toor:*:0:0::0:0:Bourne-again Superuser:/root:
+daemon:*:1:1::0:0:Owner of many system processes:/root:/nonexistent
+operator:*:2:20::0:0:System &:/usr/guest/operator:/bin/csh
+bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/nonexistent
+nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/nonexistent
+user:$1$T9q8Coad$WatJttamwr2UAdbfKbWxj.:1002:1002:polish:0:0:user:/home/user:/bin/sh
diff --git a/release/picobsd/net/floppy.tree/etc/motd b/release/picobsd/net/floppy.tree/etc/motd
new file mode 100644
index 0000000..5a038d6
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/motd
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (NET) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/net/floppy.tree/etc/ppp/ppp.conf b/release/picobsd/net/floppy.tree/etc/ppp/ppp.conf
new file mode 100644
index 0000000..68f5f55
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/ppp/ppp.conf
@@ -0,0 +1,8 @@
+# $Id: ppp.conf,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+# PPP Sample Configuration File
+default:
+ set device /dev/cuaa1
+ set speed 38400
+ disable lqr
+ deny lqr
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
diff --git a/release/picobsd/net/floppy.tree/etc/ppp/ppp.deny b/release/picobsd/net/floppy.tree/etc/ppp/ppp.deny
new file mode 100644
index 0000000..51e1e9b
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/ppp/ppp.deny
@@ -0,0 +1,15 @@
+# list of users disallowed any pppd access via 'system
+# password login'.
+# read by pppd(8).
+root
+toor
+daemon
+operator
+bin
+games
+news
+man
+ftp
+uucp
+xten
+ingres
diff --git a/release/picobsd/net/floppy.tree/etc/ppp/ppp.linkup b/release/picobsd/net/floppy.tree/etc/ppp/ppp.linkup
new file mode 100644
index 0000000..05107c6
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/ppp/ppp.linkup
@@ -0,0 +1,10 @@
+# Example of ppp.linkup file
+#
+iij-demand:
+ delete ALL
+ add 0 0 HISADDR
+#
+# Otherwise, simply add peer as default gateway.
+#
+MYADDR:
+ add 0 0 HISADDR
diff --git a/release/picobsd/net/floppy.tree/etc/ppp/ppp.secret.sample b/release/picobsd/net/floppy.tree/etc/ppp/ppp.secret.sample
new file mode 100644
index 0000000..9fa02ad
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/ppp/ppp.secret.sample
@@ -0,0 +1,23 @@
+##################################################
+#
+# Example of ppp.secret file
+#
+# This file is used to authenticate incoming connections.
+# You must ``enable'' either PAP or CHAP in your ppp.conf file.
+# The peer may then use any of the Authname/Authkey pairs listed.
+# If an IP address is given, it will be assigned to the peer.
+#
+# If an entry exists for your local machine (as given by the
+# ``hostname -s'' command), the password specified will be
+# required for all server socket connections. Refer to the ppp(8)
+# and pppctl(8) man pages for further details.
+#
+# $Id: ppp.secret.sample,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+#
+##################################################
+
+# Authname Authkey Peer's IP address
+
+oscar OurSecretKey 192.244.184.34/24
+BigBird X4dWg9327 192.244.184.33/32
+tama localPasswdForControl
diff --git a/release/picobsd/net/floppy.tree/etc/profile b/release/picobsd/net/floppy.tree/etc/profile
new file mode 100644
index 0000000..b0aa3b2
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/profile
@@ -0,0 +1,4 @@
+# System-wide .profile file for sh(1).
+BLOCKSIZE=K; export BLOCKSIZE
+PATH=/stand:.; export PATH
+set -o emacs
diff --git a/release/picobsd/net/floppy.tree/etc/protocols b/release/picobsd/net/floppy.tree/etc/protocols
new file mode 100644
index 0000000..c80be39
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/protocols
@@ -0,0 +1,7 @@
+#
+# Internet (IP) protocols
+ip 0 IP # internet protocol, pseudo protocol number
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+tcp 6 TCP # transmission control protocol
+udp 17 UDP # user datagram protocol
diff --git a/release/picobsd/net/floppy.tree/etc/rc b/release/picobsd/net/floppy.tree/etc/rc
new file mode 100644
index 0000000..bff4fc9
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/rc
@@ -0,0 +1,62 @@
+#!/bin/sh
+# $Id: rc,v 1.5 1998/08/19 07:06:31 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Dodaje $swapfile jako dodatkowy swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+# clean up left-over files
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Uruchamiam inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Uruchamiam snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "UWAGA: brak swapu!"
+ echo "Nie uruchamiaj zbyt wielu programow na raz..."
+fi
+echo ''
+echo ''
+echo '+------------ PicoBSD 0.4 (NET) ---------------+'
+echo '| |'
+echo '| Zaloguj sie jako "root" (haslo "setup"). |'
+echo '| |'
+echo '| Ta wersja PicoBSD w pelni podlega |'
+echo '| licencji BSD. Po wiecej szczegolow zajrzyj |'
+echo '| na http://www.freebsd.org/~picobsd, lub |'
+echo '| skontaktuj sie z autorem. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/net/floppy.tree/etc/rc.conf b/release/picobsd/net/floppy.tree/etc/rc.conf
new file mode 100644
index 0000000..090cd3c
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/rc.conf
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf,v 1.5 1998/08/19 07:06:31 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/net/floppy.tree/etc/rc.firewall b/release/picobsd/net/floppy.tree/etc/rc.firewall
new file mode 100644
index 0000000..8a5055d
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/rc.firewall
@@ -0,0 +1,172 @@
+############
+# Setup system for firewall service.
+# $Id: rc.firewall,v 1.1.1.1 1998/07/14 07:30:49 abial Exp $
+
+############
+# Define the firewall type in /etc/rc.conf. Valid values are:
+# open - will allow anyone in
+# client - will try to protect just this machine
+# simple - will try to protect a whole network
+# closed - totally disables IP services except via lo0 interface
+# UNKNOWN - disables the loading of firewall rules.
+# filename - will load the rules in the given filename (full path required)
+#
+# For ``client'' and ``simple'' the entries below should be customized
+# appropriately.
+
+############
+#
+# If you don't know enough about packet filtering, we suggest that you
+# take time to read this book:
+#
+# Building Internet Firewalls
+# Brent Chapman and Elizabeth Zwicky
+#
+# O'Reilly & Associates, Inc
+# ISBN 1-56592-124-0
+# http://www.ora.com/
+#
+# For a more advanced treatment of Internet Security read:
+#
+# Firewalls & Internet Security
+# Repelling the wily hacker
+# William R. Cheswick, Steven M. Bellowin
+#
+# Addison-Wesley
+# ISBN 0-201-6337-4
+# http://www.awl.com/
+#
+
+if [ "x$1" != "x" ]; then
+ firewall_type=$1
+fi
+
+############
+# Set quiet mode if requested
+if [ "x$firewall_quiet" = "xYES" ]; then
+ fwcmd="/sbin/ipfw -q"
+else
+ fwcmd="/sbin/ipfw"
+fi
+
+############
+# Flush out the list before we begin.
+$fwcmd -f flush
+
+############
+# If you just configured ipfw in the kernel as a tool to solve network
+# problems or you just want to disallow some particular kinds of traffic
+# they you will want to change the default policy to open. You can also
+# do this as your only action by setting the firewall_type to ``open''.
+
+# $fwcmd add 65000 pass all from any to any
+
+############
+# Only in rare cases do you want to change these rules
+$fwcmd add 1000 pass all from any to any via lo0
+$fwcmd add 1010 deny all from 127.0.0.0/8 to 127.0.0.0/8
+
+
+# Prototype setups.
+if [ "${firewall_type}" = "open" -o "${firewall_type}" = "OPEN" ]; then
+
+ $fwcmd add 65000 pass all from any to any
+
+elif [ "${firewall_type}" = "client" ]; then
+
+ ############
+ # This is a prototype setup that will protect your system somewhat against
+ # people from outside your own network.
+ ############
+
+ # set these to your network and netmask and ip
+ net="192.168.4.0"
+ mask="255.255.255.0"
+ ip="192.168.4.17"
+
+ # Allow any traffic to or from my own net.
+ $fwcmd add pass all from ${ip} to ${net}:${mask}
+ $fwcmd add pass all from ${net}:${mask} to ${ip}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${ip} 25 setup
+
+ # Allow setup of outgoing TCP connections only
+ $fwcmd add pass tcp from ${ip} to any setup
+
+ # Disallow setup of all other TCP connections
+ $fwcmd add deny tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" = "simple" ]; then
+
+ ############
+ # This is a prototype setup for a simple firewall. Configure this machine
+ # as a named server and ntp server, and point all the machines on the inside
+ # at this machine for those services.
+ ############
+
+ # set these to your outside interface network and netmask and ip
+ oif="ed0"
+ onet="192.168.4.0"
+ omask="255.255.255.0"
+ oip="192.168.4.17"
+
+ # set these to your inside interface network and netmask and ip
+ iif="ed1"
+ inet="192.168.3.0"
+ imask="255.255.255.0"
+ iip="192.168.3.17"
+
+ # Stop spoofing
+ $fwcmd add deny all from ${inet}:${imask} to any in via ${oif}
+ $fwcmd add deny all from ${onet}:${omask} to any in via ${iif}
+
+ # Stop RFC1918 nets on the outside interface
+ $fwcmd add deny all from 192.168.0.0:255.255.0.0 to any via ${oif}
+ $fwcmd add deny all from 172.16.0.0:255.240.0.0 to any via ${oif}
+ $fwcmd add deny all from 10.0.0.0:255.0.0.0 to any via ${oif}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${oip} 25 setup
+
+ # Allow access to our DNS
+ $fwcmd add pass tcp from any to ${oip} 53 setup
+
+ # Allow access to our WWW
+ $fwcmd add pass tcp from any to ${oip} 80 setup
+
+ # Reject&Log all setup of incoming connections from the outside
+ $fwcmd add deny log tcp from any to any in via ${oif} setup
+
+ # Allow setup of any other TCP connection
+ $fwcmd add pass tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" != "UNKNOWN" -a -r "${firewall_type}" ]; then
+ $fwcmd ${firewall_type}
+fi
diff --git a/release/picobsd/net/floppy.tree/etc/rc.network b/release/picobsd/net/floppy.tree/etc/rc.network
new file mode 100644
index 0000000..87b0c8e
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/rc.network
@@ -0,0 +1,80 @@
+#!/bin/sh -
+# $Id: rc.network,v 1.5 1998/08/19 07:06:31 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Zaladowano reguly filtrujace do firewalla."
+ else
+ echo "UWAGA: system posiada wbudowany modul firewalla, ale zadne reguly"
+ echo " filtrujace nie zostaly zaladowane."
+ echo " Wszystkie rodzaje ruchu IP sa dozwolone."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/net/floppy.tree/etc/rc.serial b/release/picobsd/net/floppy.tree/etc/rc.serial
new file mode 100644
index 0000000..fe9491e
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/rc.serial
@@ -0,0 +1,127 @@
+#!/bin/sh
+# $Id: rc.serial,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+
+# Change some defaults for serial devices.
+# Standard defaults are:
+# dtrwait 300 drainwait 0
+# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
+# initial iflag, lflag and oflag all 0
+# speed 9600
+# special chars from <sys/ttydefaults.h>
+# nothing locked
+# except for serial consoles the initial iflag, lflag and oflag are from
+# <sys/ttydefaults.h> and clocal is locked on.
+
+default() {
+ # Reset everything changed by the other functions to initial defaults.
+
+ ci=$1; shift # call in device identifier
+ co=$1; shift # call out device identifier
+
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
+ stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
+ stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/cual$co$i -clocal -crtscts -hupcl 0
+ done
+}
+
+maybe() {
+ # Special settings.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Don't use ^R; it breaks bash's ^R when typed ahead.
+ stty </dev/ttyi$ci$i reprint undef
+ stty </dev/cuai$co$i reprint undef
+ # Lock clocal off on dialin device for security.
+ stty </dev/ttyl$ci$i clocal
+ # Lock the speeds to use old binaries that don't support them.
+ # Any legal speed works to lock the initial speed.
+ stty </dev/ttyl$ci$i 300
+ stty </dev/cual$co$i 300
+ done
+}
+
+modem() {
+ # Modem that supports CTS and perhaps RTS handshaking.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # may depend on modem
+ comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
+ # Lock crtscts on.
+ # Speed reasonable for V42bis.
+ stty </dev/ttyi$ci$i crtscts 57600
+ stty </dev/ttyl$ci$i crtscts
+ stty </dev/cuai$co$i crtscts 57600
+ stty </dev/cual$co$i crtscts
+ done
+}
+
+mouse() {
+ # Mouse on either callin or callout port.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Lock clocal on, hupcl off.
+ # Standard speed for Microsoft mouse.
+ stty </dev/ttyi$ci$i clocal -hupcl 1200
+ stty </dev/ttyl$ci$i clocal hupcl
+ stty </dev/cuai$co$i clocal -hupcl 1200
+ stty </dev/cual$co$i clocal hupcl
+ done
+}
+
+terminal() {
+ # Terminal that supports CTS and perhaps RTS handshaking
+ # with the cable or terminal arranged so that DCD is on
+ # at least while the terminal is on.
+ # Also works for bidirectional communications to another pc
+ # provided at most one side runs getty.
+ # Same as modem() except we want a faster speed and no dtrwait.
+
+ ci=$1; shift
+ co=$1; shift
+
+ modem $ci $co $*
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 0
+ stty </dev/ttyi$ci$i 115200
+ stty </dev/cuai$co$i 115200
+ done
+}
+
+# Don't use anything from this file unless you have some buggy programs
+# that require it.
+
+# Edit the functions and the examples to suit your system.
+# $1 is the call in device identifier, $2 is the call out device identifier
+# and the remainder of the line lists the device numbers.
+
+# Initialize assorted 8250-16550 (sio) ports.
+# maybe d a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v
+# mouse d a 2
+# modem d a 1
+# terminal d a 0
+
+# Initialize all ports on a Cyclades-8yo.
+# modem c c 00 01 02 03 04 05 06 07
+
+# Initialize all ports on a Cyclades-16ye.
+# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
+
+# Initialize all ports on a Digiboard 8.
+# modem D D 00 01 02 03 04 05 06 07
diff --git a/release/picobsd/net/floppy.tree/etc/remote b/release/picobsd/net/floppy.tree/etc/remote
new file mode 100644
index 0000000..6f9fcaf
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/remote
@@ -0,0 +1,50 @@
+# @(#)remote 5.2 (Berkeley) 6/30/90
+#
+# remote -- remote host description file
+# see tip(1), remote(5)
+#
+# dv device to use for the tty
+# el EOL marks (default is NULL)
+# du make a call flag (dial up)
+# pn phone numbers (@ =>'s search phones file; possibly taken from
+# PHONES environment variable)
+# at ACU type
+# ie input EOF marks (default is NULL)
+# oe output EOF string (default is NULL)
+# cu call unit (default is dv)
+# br baud rate (defaults to 300)
+# fs frame size (default is BUFSIZ) -- used in buffering writes on
+# receive operations
+# tc to continue a capability
+
+# Systems definitions
+netcom|Netcom Unix Access:\
+ :pn=\@:tc=unix1200:
+omen|Omen BBS:\
+ :pn=\@:tc=dos1200:
+
+# UNIX system definitions
+unix1200|1200 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200:
+unix300|300 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300:
+
+# DOS system definitions
+dos1200|1200 Baud dial-out to a DOS system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^Z:pa=none:tc=dial1200:
+
+# General dialer definitions used below
+#
+# COURIER switch settings:
+# switch: 1 2 3 4 5 6 7 8 9 10
+# setting: D U D U D D U D U U
+# Rackmount: U U D U D U D D U D
+#
+dial2400|2400 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#2400:cu=/dev/cuaa0:at=hayes:du:
+dial1200|1200 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#1200:cu=/dev/cuaa0:at=hayes:du:
+
+# Hardwired line
+cuaa0b|cua0b:dv=/dev/cuaa0:br#2400
+cuaa0c|cua0c:dv=/dev/cuaa0:br#9600
diff --git a/release/picobsd/net/floppy.tree/etc/resolv.conf b/release/picobsd/net/floppy.tree/etc/resolv.conf
new file mode 100644
index 0000000..7e3a7f5
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/resolv.conf
@@ -0,0 +1,3 @@
+# $Id: resolv.conf,v 1.5 1998/08/19 07:06:31 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/net/floppy.tree/etc/services b/release/picobsd/net/floppy.tree/etc/services
new file mode 100644
index 0000000..817b6d3
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/services
@@ -0,0 +1,93 @@
+echo 4/ddp
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+systat 11/tcp
+systat 11/udp
+daytime 13/tcp
+daytime 13/udp
+qotd 17/tcp
+qotd 17/udp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp-data 20/udp
+ftp 21/tcp
+ftp 21/udp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+telnet 23/udp
+smtp 25/tcp
+smtp 25/udp
+time 37/tcp
+time 37/udp
+domain 53/tcp
+domain 53/udp
+tacacs-ds 65/tcp
+tacacs-ds 65/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/tcp
+tftp 69/udp
+gopher 70/tcp
+gopher 70/udp
+finger 79/tcp
+finger 79/udp
+http 80/tcp
+http 80/udp
+pop2 109/tcp
+pop2 109/udp
+pop3 110/tcp
+pop3 110/udp
+uucp-path 117/tcp
+uucp-path 117/udp
+nntp 119/tcp
+nntp 119/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap 143/tcp
+imap 143/udp
+snmp 161/tcp
+snmp 161/udp
+snmptrap 162/tcp
+snmptrap 162/udp
+bgp 179/tcp
+bgp 179/udp
+irc 194/tcp
+irc 194/udp
+ipx 213/tcp
+ipx 213/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+netware-ip 396/tcp
+netware-ip 396/udp
+https 443/tcp
+https 443/udp
+exec 512/tcp
+biff 512/udp
+login 513/tcp
+who 513/udp
+cmd 514/tcp
+syslog 514/udp
+printer 515/tcp
+printer 515/udp
+talk 517/tcp
+talk 517/udp
+ntalk 518/tcp
+ntalk 518/udp
+timed 525/tcp
+timed 525/udp
+uucp 540/tcp
+uucp 540/udp
+uucp-rlogin 541/tcp
+uucp-rlogin 541/udp
diff --git a/release/picobsd/net/floppy.tree/etc/shells b/release/picobsd/net/floppy.tree/etc/shells
new file mode 100644
index 0000000..df377f1
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/shells
@@ -0,0 +1,6 @@
+# List of acceptable shells for chpass(1).
+# Ftpd will not allow users to connect who are not using
+# one of these shells.
+
+/bin/sh
+/bin/csh
diff --git a/release/picobsd/net/floppy.tree/etc/snmpd.conf b/release/picobsd/net/floppy.tree/etc/snmpd.conf
new file mode 100644
index 0000000..59a2ad6
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/snmpd.conf
@@ -0,0 +1,45 @@
+# $Id: snmpd.conf,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+#
+# Read-only (1) and read-write (2) communities
+community 1 public
+community 2 private
+# Process checks.
+#
+# The following are examples of how to use the agent to check for
+# processes running on the host. The syntax looks something like:
+#
+# proc NAME [MAX=0] [MIN=0]
+#
+# NAME: the name of the process to check for. It must match
+# exactly (ie, http will not find httpd processes).
+# MAX: the maximum number allowed to be running. Defaults to 0.
+# MIN: the minimum number to be running. Defaults to 0.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.1
+proc inetd
+proc snmpd
+# ----------------------------------------------------------------------
+# disk checks
+# The agent can check the amount of available disk space, and make
+# sure it is above a set limit.
+#
+# disk PATH [MIN= 100000]
+#
+# PATH: mount path to the disk in question.
+# MIN: Disks with space below this value will have the Mib's errorFlag set.
+# Default value = 100000.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.6
+#disk /dos 10
+# ----------------------------------------------------------------------
+# load average checks
+#
+# load [1MAX= 12.0] [5MAX= 12.0] [15MAX= 12.0]
+# 1MAX: If the 1 minute load average is above this limit at query
+# time, the errorFlag will be set.
+# 5MAX: Similar, but for 5 min average.
+# 15MAX: Similar, but for 15 min average.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.7
+load 5 5 5
+#
+# ----------------------------------------------------------------------
+#syslocation Right here, right now.
+#syscontact Me <me@somewhere.org>
diff --git a/release/picobsd/net/floppy.tree/etc/termcap b/release/picobsd/net/floppy.tree/etc/termcap
new file mode 100644
index 0000000..5a9316a
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/termcap
@@ -0,0 +1,123 @@
+# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
+# All rights reserved.
+# @(#)termcap.src 5.88 (Berkeley) 4/30/91
+#
+#
+# for syscons
+# common entry without semigraphics
+cons25w|ansiw|ansi80x25-raw:\
+ :al=\E[L:am:bs:NP:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:co#80:\
+ :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:cb=\E[1K:\
+ :ms:nd=\E[C:pt:rs=\E[x\E[m\Ec:so=\E[7m:se=\E[m:up=\E[A:\
+ :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[37;40m:\
+ :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\
+ :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\
+ :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:eo:sf=\E[S:sr=\E[T:\
+ :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\E[K:kB=\E[Z:\
+ :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\
+ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:bw:\
+ :mb=\E[5m:md=\E[1m:mh=\E[30;1m:mr=\E[7m:me=\E[m:bl=^G:ut:it#8:
+cons25|ansis|ansi80x25:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :tc=cons25w:
+cons25-m|ansis-mono|ansi80x25-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25:
+cons50|ansil|ansi80x50:\
+ :li#50:tc=cons25:
+cons50-m|ansil-mono|ansi80x50-mono:\
+ :li#50:tc=cons25-m:
+# 80x25 ISO 8859-1 FreeBSD console
+cons25l1|cons25-iso8859-1:\
+ :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237.^Y-^X+\253,\273I\247y\232z\233:\
+ :tc=cons25w:
+cons25l1-m|cons25-iso8859-1-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25l1:
+# 80x50 ISO 8859-1 FreeBSD console
+cons50l1|cons50-iso8859-1:\
+ :li#50:tc=cons25l1:
+cons50l1-m|cons50-iso8859-1-mono:\
+ :li#50:tc=cons25l1-m:
+dosansi|ANSI.SYS standard crt|ansi:\
+ :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\
+ :do=\E[B:li#25:mi:nd=\E[C:\
+ :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\
+ :md=\E[1m:mh=\E[m:mb=\E[5m:me=\E[m:\
+ :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\
+ :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\
+ :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED:
+
+# Note: this entry describes the "native"
+# capabilities of the PC monochrome display, without ANY emulation; most
+# communications packages (but NOT PC/IX connect) do some kind of emulation.
+pc|ibmpc|ibm pc PC/IX:\
+ :li#24:co#80:am:bs:bw:eo:\
+ :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\
+ :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:
+pc3mono|IBM PC 386BSD Console with monochrome monitor:\
+ :so=\E[0;1r\E[m:tc=pc3:
+pc3|ibmpc3|IBM PC 386BSD Console:\
+ :Co#8:\
+ :DO=\E[%dB:\
+ :F1=\E[W:\
+ :F2=\E[X:\
+ :K1=\E[H:\
+ :K2=\E[I:\
+ :K3=\E[E:\
+ :K4=\E[F:\
+ :K5=\E[G:\
+ :LE=\E[%dD:\
+ :RI=\E[%dC:\
+ :Sb=\E[1;%dx:\
+ :Sf=\E[2;%dx:\
+ :UP=\E[%dA:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :am:\
+ :bl=^G:\
+ :bs:\
+ :cb=\E[1K:\
+ :cd=\E[J:\
+ :ce=\E[K:\
+ :cl=\E[H\E[J:\
+ :cm=\E[%i%d;%dH:\
+ :co#80:\
+ :cr=^M:\
+ :do=\E[B:\
+ :ho=\E[H:\
+ :is=\E[m:\
+ :it#8:\
+ :k;=\E[V:\
+ :k1=\E[M:\
+ :k2=\E[N:\
+ :k3=\E[O:\
+ :k4=\E[P:\
+ :k5=\E[Q:\
+ :k6=\E[R:\
+ :k7=\E[S:\
+ :k8=\E[T:\
+ :k9=\E[U:\
+ :kD=\177:\
+ :@7=\E[F:\
+ :kN=\E[G:\
+ :kP=\E[I:\
+ :kb=\177:\
+ :kd=\E[B:\
+ :kh=\E[H:\
+ :kl=\E[D:\
+ :kr=\E[C:\
+ :ku=\E[A:\
+ :le=^H:\
+ :li#25:\
+ :ms:\
+ :nd=\E[C:\
+ :op=\E[x:\
+ :pa#64:\
+ :rs=\E[m:\
+ :se=\E[m:\
+ :sf=\E[S:\
+ :so=\E[7;1r\E[7m:\
+ :sr=\E[T:\
+ :ta=^I:\
+ :te=\E[m:\
+ :ti=\E[m:\
+ :up=\E[A:\
+ :ut:
diff --git a/release/picobsd/net/floppy.tree/etc/ttys b/release/picobsd/net/floppy.tree/etc/ttys
new file mode 100644
index 0000000..8ef5e6e
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/etc/ttys
@@ -0,0 +1,32 @@
+#
+# @(#)ttys 5.1 (Berkeley) 4/17/89
+#
+# name getty type status comments
+#
+# This entry needed for asking password when init goes to single-user mode
+# If you want to be asked for password, change "secure" to "insecure" here
+#console none unknown off secure
+vga none cons25 off secure
+#
+ttyv0 "/usr/libexec/getty Pc" cons25 on secure
+# Virtual terminals
+ttyv1 "/usr/libexec/getty Pc" cons25 on secure
+ttyv2 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv3 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv4 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv5 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv6 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv7 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv8 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv9 "/usr/libexec/getty Pc" cons25 on secure
+# Pseudo terminals
+ttyp0 none network secure
+ttyp1 none network secure
+ttyp2 none network secure
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
diff --git a/release/picobsd/net/floppy.tree/kernel.config b/release/picobsd/net/floppy.tree/kernel.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/net/floppy.tree/kernel.config
diff --git a/release/picobsd/net/lang/README.en b/release/picobsd/net/lang/README.en
new file mode 100644
index 0000000..4b42920
--- /dev/null
+++ b/release/picobsd/net/lang/README.en
@@ -0,0 +1,41 @@
+1998.07.12, Warsaw, Poland
+
+ PicoBSD 0.4 (NET)
+ -----------------
+
+
+What is PicoBSD?
+----------------
+
+It's a one floppy version of FreeBSD (please see http://www.freebsd.org),
+configured mainly for networking applications. It can be used as a router or
+firewall, or kind of a fixit floppy (or all of them).
+
+You can find more information on the home page of this project at:
+
+ http://www.freebsd.org/~picobsd/
+
+What are minimal requirements?
+------------------------------
+
+* 386SX CPU or better (there is an FPU emulator in kernel)
+* 10MB RAM - the more the better. If you have an HDD, you can make a
+ swap partition or swap file (using vnode driver and vnconfig). Then you
+ probably will be able to run with ca. 6MB only. But RAM is cheap...
+* Modem sitting on COM1-COM4 (default is to use COM2), if you want to have
+ a PPP connection.
+* Network card: compatible with NE2000, PCI Intel, 3Com 3c509 or with DEC
+ chipsets (ed, ep, fxp and de drivers). The kernel supports two of them
+ (i.e. 7 total) plus two PPP connections (tun interfaces). So you can
+ easily build something like router with as many as 9 outlets :-)
+
+For detailed description and list of supported hardware see the original
+documentation, or:
+
+ http://www.freebsd.org/~picobsd/picobsd.html
+
+I'll be glad hearing from you about your experiences with PicoBSD. Thanks.
+
+Have fun!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/net/lang/README.pl b/release/picobsd/net/lang/README.pl
new file mode 100644
index 0000000..6ae3777
--- /dev/null
+++ b/release/picobsd/net/lang/README.pl
@@ -0,0 +1,56 @@
+1998.07.12, Warszawa
+
+ PicoBSD 0.4 (wersja NET)
+ ------------------------
+
+Co to jest PicoBSD?
+-------------------
+
+Jest to jednodyskietkowa wersja FreeBSD skonfigurowana glownie pod katem
+zastosowania jako klient/serwer uslug sieciowych (takich jak routing,
+firewall, NFS). W celu zapoznania sie z pelnym systemem zajrzyj na
+http://www.freebsd.org. Oficjalna strona tego projektu znajduje sie na
+http://www.freebsd.org/~picobsd.
+
+Jakie sa minimalne wymagania?
+-----------------------------
+
+* Procesor 386SX lub lepszy (jadro posiada emulator FPU)
+* 10MB pamieci - jest to absolutnie nieprzekraczalne minimum. Oczywiscie im
+ wiecej, tym lepiej - ograniczenie jest glownie spowodowane brakiem swapu. Po
+ zapoznaniu sie z systemem mozesz sobie skonfigurowac tzw. swap-file na dysku
+ twardym, np. na partycji DOS-owej. Wowczas prawdopodobnie wystarczy 6MB
+ pamieci.
+* Modem, skonfigurowany na COM1-COM4 (standardowo system wykorzystuje COM2),
+ jesli bedzie wykorzystywany dostep przez PPP.
+* Karta sieciowa: kompatybilna z NE2000, niektore typy 3Com, lub wersje PCI z
+ chipsetem DEC21040 (drivery ed, ep, fxp i de). Jadro jest skonfigurowane
+ tak, zeby moc obsluzyc po dwie karty ed, ep, i de (czyli w sumie siedem)
+ oraz dwa polaczenia PPP rownoczesnie. Mozna wiec zbudowac router z 9
+ interfejsami... :-)
+
+Jakie sa roznice w stosunku do poprzedniej wersji?
+--------------------------------------------------
+
+* Poszerzony zestaw sterownikow w jadrze systemu
+* dodana obsluga CD-ROM
+* agent SNMP (pelna wersja ucd-snmp, pozwalajaca na monitorowanie procesow i
+ zdalne uruchamianie skryptow)
+* brak ssh, ftp i edytora ee (oznacza to, ze musisz edytowac pliki
+ konfiguracyjne montujac dyskietke na normalnym systemie)
+* dodany inetd, telnetd, routed, tftpd, bootpd, ps, kill, netstat,
+ ping, traceroute
+* brak vnconfig i vn(4): w przypadku routera powinien on miec tyle pamieci
+ RAM, zeby nie potrzebowac swapu, lub miec normalny swap.
+* dodana obsluga hasel (passwd(1))
+* dodana obsluga NFS (klient)
+* sa dwaj uzytkownicy: root (haslo 'setup') i user (haslo 'PicoBSD'). Ze
+ wzgledu na skomplikowana sprawe z prawami dostepu, user praktycznie moze
+ jedynie zrobic te rzeczy, ktore nie wymagaja praw roota (czyli np. telnet).
+* dodany skrypt 'update', ktory powoduje uaktualnienie zawartosci katalogu
+ /etc na dyskietce w stosunku do tego, co znajduje sie na MFS.
+
+
+Milej zabawy!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/net/lang/boot.help.en b/release/picobsd/net/lang/boot.help.en
new file mode 100644
index 0000000..7cbce13
--- /dev/null
+++ b/release/picobsd/net/lang/boot.help.en
@@ -0,0 +1,18 @@
+Usage: bios_drive:interface(unit,partition)kernel_name options
+ bios_drive 0, 1, ...
+ interface fd, wd or sd
+ unit 0, 1, ...
+ partition a, c, ...
+ kernel_name name of kernel, or ? for list of files in root directory
+ options -a (ask name) -C (cdrom) -c (userconfig) -D (dual consoles)
+ -d (debug early) -g (gdb) -h (serial console) -P (probe kbd)
+ -r (default root) -s (single user) -v (verbose)
+Examples:
+ 1:sd(0,a)mykernel boot `mykernel' on the first SCSI drive when one IDE
+ drive is present
+ 1:wd(2,a) boot from the second (secondary master) IDE drive
+ 1:sd(0,a)? list the files in the root directory on the specified
+ drive/unit/partition, and set the default bios_drive,
+ interface, unit and partition
+ -cv boot with the defaults, then run UserConfig to modify
+ hardware parameters (c), and print verbose messages (v)
diff --git a/release/picobsd/net/lang/boot.help.pl b/release/picobsd/net/lang/boot.help.pl
new file mode 100644
index 0000000..bb5b422
--- /dev/null
+++ b/release/picobsd/net/lang/boot.help.pl
@@ -0,0 +1,16 @@
+Opcje: dysk_bios:kontroler(dysk,partycja)nazwa_kernela opcje
+ dysk_bios 0, 1, ...
+ kontroler fd (dyskietka), wd (dysk IDE) lub sd (dysk SCSI)
+ dysk 0, 1, ... (numer dysku w kontrolerze)
+ partycja a, c, e, f ... (wedlug nazewnictwa BSD)
+ nazwa_kernela nazwa pliku kernela, lub ? zeby dostac liste plikow
+ opcje -a (pytaj o rootdev) -C (cdrom) -c (userconf.) -D (podwojna konsola)
+ -d (uruchom debugger) -g (gdb) -h (konsola szeregowa)
+ -P (probkuj klawiature) -r (domyslny rootdev) -s (tryb single user)
+ -v (verbose - szczegolowe komunikaty)
+Np: 1:sd(0,a)mykernel startuj `mykernel' z 1 dysku SCSI gdy jest tez 1 dysk
+ IDE, i jednoczesnie ustaw go jako domyslny dysk_bios,
+ kontroler, dysk i partycje
+ -cv startuj z parametrami domyslnymi, potem uruchom
+ konfiguracje param. sprzetowych (-c), i podawaj
+ szczegolowe komunikaty w trakcie bootowania (-v).
diff --git a/release/picobsd/net/lang/hosts.en b/release/picobsd/net/lang/hosts.en
new file mode 100644
index 0000000..761d36c
--- /dev/null
+++ b/release/picobsd/net/lang/hosts.en
@@ -0,0 +1,5 @@
+# $Id: hosts.en,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.edu
+127.0.0.1 pico.mydomain.edu
diff --git a/release/picobsd/net/lang/hosts.pl b/release/picobsd/net/lang/hosts.pl
new file mode 100644
index 0000000..0d9b81e
--- /dev/null
+++ b/release/picobsd/net/lang/hosts.pl
@@ -0,0 +1,5 @@
+# $Id: hosts.pl,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/net/lang/m.en b/release/picobsd/net/lang/m.en
new file mode 100644
index 0000000..f6df223
--- /dev/null
+++ b/release/picobsd/net/lang/m.en
@@ -0,0 +1,11 @@
+
+PicoBSD 0.35 (NET)
+
+Welcome to PicoBSD!
+
+You can find a short description of the
+system in file /README. You can view it using
+"more /README".
+
+For more info contact the author (abial@nask.pl).
+
diff --git a/release/picobsd/net/lang/m.pl b/release/picobsd/net/lang/m.pl
new file mode 100644
index 0000000..ff39857
--- /dev/null
+++ b/release/picobsd/net/lang/m.pl
@@ -0,0 +1,11 @@
+
+PicoBSD 0.35 (NET)
+
+Witamy w PicoBSD!
+
+W glownym katalogu w pliku README znajdziesz
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/net/lang/mfs.rc.en b/release/picobsd/net/lang/mfs.rc.en
new file mode 100644
index 0000000..c13166e
--- /dev/null
+++ b/release/picobsd/net/lang/mfs.rc.en
@@ -0,0 +1,33 @@
+#!/bin/sh
+# $Id: mfs.rc.en,v 1.3 1998/08/10 19:17:10 abial Exp $
+# System startup script run by init on autoboot
+# or after single-user.
+
+stty status '^T'
+
+trap : 2
+trap : 3 # shouldn't be needed
+
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+
+trap "echo 'Reboot interrupted'; exit 1" 3
+
+### Special setup for one floppy PICOBSD ###
+echo ""
+echo "-------------------------------------------"
+echo " Please wait. The system is coming up..."
+echo "-------------------------------------------"
+echo ""
+echo "Reading /etc from startup floppy..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+pwd_mkdb -p ./master.passwd
+umount /start_floppy
+echo "Ok. (Now you may remove floppy if you like)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/net/lang/mfs.rc.pl b/release/picobsd/net/lang/mfs.rc.pl
new file mode 100644
index 0000000..f5e0a53
--- /dev/null
+++ b/release/picobsd/net/lang/mfs.rc.pl
@@ -0,0 +1,35 @@
+#!/bin/sh
+# $Id: mfs.rc.pl,v 1.3 1998/08/10 19:17:10 abial Exp $
+# System startup script run by init on autoboot
+# or after single-user.
+
+stty status '^T'
+
+trap : 2
+trap : 3 # shouldn't be needed
+
+HOME=/; export HOME
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+export PATH
+
+trap "echo 'Reboot zostal przerwany'; exit 1" 3
+
+############################################
+### Special setup for one floppy PICOBSD ###
+############################################
+echo ""
+echo "-----------------------------------------------"
+echo " Prosze czekac. Trwa uruchamianie systemu..."
+echo "-----------------------------------------------"
+echo ""
+echo "Wczytuje konfiguracje /etc z dyskietki..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc/
+cd /etc
+pwd_mkdb -p ./master.passwd
+umount /dev/fd0a
+echo "Ok. (Jesli chcesz, mozesz juz wyjac dyskietke)"
+echo ""
+. rc
+exit 0
diff --git a/release/picobsd/net/lang/motd.en b/release/picobsd/net/lang/motd.en
new file mode 100644
index 0000000..2a1b7b5
--- /dev/null
+++ b/release/picobsd/net/lang/motd.en
@@ -0,0 +1,12 @@
+==================================================
+ )\_)\
+PicoBSD 0.4 (NET) (o,o)
+ __ \~/
+Welcome to PicoBSD! -->====\
+ ~~ d d
+You can find a short description of the pico
+system in file /README. You can view it using
+"more /README".
+
+For more info contact the author (abial@nask.pl).
+
diff --git a/release/picobsd/net/lang/motd.pl b/release/picobsd/net/lang/motd.pl
new file mode 100644
index 0000000..5a038d6
--- /dev/null
+++ b/release/picobsd/net/lang/motd.pl
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (NET) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/net/lang/rc.conf.en b/release/picobsd/net/lang/rc.conf.en
new file mode 100644
index 0000000..03d2bc6
--- /dev/null
+++ b/release/picobsd/net/lang/rc.conf.en
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf.en,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.edu" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/net/lang/rc.conf.pl b/release/picobsd/net/lang/rc.conf.pl
new file mode 100644
index 0000000..61c4066
--- /dev/null
+++ b/release/picobsd/net/lang/rc.conf.pl
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf.pl,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/net/lang/rc.en b/release/picobsd/net/lang/rc.en
new file mode 100644
index 0000000..a35ae7c
--- /dev/null
+++ b/release/picobsd/net/lang/rc.en
@@ -0,0 +1,64 @@
+#!/bin/sh
+# $Id: rc.en,v 1.3 1998/08/10 19:17:11 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Adding $swapfile as additional swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+chmod 666 /dev/tty[pqrsPQRS]*
+# clean up left-over files
+rm -f /etc/nologin
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Starting inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Starting snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "WARNING: no swap partition!"
+ echo "Don't run too many programs at the same time..."
+fi
+echo ''
+echo ''
+echo '+----------- PicoBSD 0.4 (NET) ----------------+'
+echo '| |'
+echo '| Log in as "root" (password "setup"). |'
+echo '| |'
+echo '| This version of PicoBSD is fully under |'
+echo '| BSD license. For more details see |'
+echo '| http://www.freebsd.org/~picobsd, or contact |'
+echo '| the author. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/net/lang/rc.network.en b/release/picobsd/net/lang/rc.network.en
new file mode 100644
index 0000000..b6ffb66
--- /dev/null
+++ b/release/picobsd/net/lang/rc.network.en
@@ -0,0 +1,79 @@
+#!/bin/sh -
+# $Id: rc.network.en,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+network_pass1() {
+ echo -n 'Doing initial network setup:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Firewall rules loaded."
+ else
+ echo "Warning: kernel has firewall functionality, but firewall rules weren't loaded."
+ echo " All ip services are ENABLED by default."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Additional routing options:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' turning on ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/net/lang/rc.network.pl b/release/picobsd/net/lang/rc.network.pl
new file mode 100644
index 0000000..9c0fab6
--- /dev/null
+++ b/release/picobsd/net/lang/rc.network.pl
@@ -0,0 +1,80 @@
+#!/bin/sh -
+# $Id: rc.network.pl,v 1.1.1.1 1998/07/14 07:30:50 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Zaladowano reguly filtrujace do firewalla."
+ else
+ echo "UWAGA: system posiada wbudowany modul firewalla, ale zadne reguly"
+ echo " filtrujace nie zostaly zaladowane."
+ echo " Wszystkie rodzaje ruchu IP sa dozwolone."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/net/lang/rc.pl b/release/picobsd/net/lang/rc.pl
new file mode 100644
index 0000000..b0d05cb
--- /dev/null
+++ b/release/picobsd/net/lang/rc.pl
@@ -0,0 +1,62 @@
+#!/bin/sh
+# $Id: rc.pl,v 1.3 1998/08/10 19:17:11 abial Exp $
+############################################
+### Special setup for one floppy PICOBSD ###
+### THIS IS NOT THE NORMAL /etc/rc !!!!! ###
+############################################
+mount -a -t nonfs
+if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+rm -f /var/run/*
+if [ "x$swapfile" != "xNO" -a -w "$swapfile" -a -b /dev/vn0b ]; then
+ echo "Dodaje $swapfile jako dodatkowy swap."
+ vnconfig /dev/vn0b $swapfile && swapon /dev/vn0b
+fi
+# configure serial devices
+if [ -f /etc/rc.serial ]; then
+ . /etc/rc.serial
+fi
+# start up the initial network configuration.
+if [ -f /etc/rc.network ]; then
+ . /etc/rc.network
+ network_pass1
+fi
+mount -a -t nfs
+# clean up left-over files
+(cd /var/run && { cp /dev/null utmp; chmod 644 utmp; })
+if [ -n "$network_pass1_done" ]; then
+ network_pass2
+fi
+if [ -n "$network_pass2_done" ]; then
+ network_pass3
+fi
+if [ "X${inetd_enable}" = X"YES" ]; then
+ echo "Uruchamiam inetd."; inetd ${inetd_flags}
+fi
+if [ "X${snmpd_enable}" = X"YES" ]; then
+ echo "Uruchamiam snmpd."; snmpd ${snmpd_flags}
+fi
+
+dev_mkdb
+
+echo ''
+if [ "x$swapfile" = "xNO" ]; then
+ echo "UWAGA: brak swapu!"
+ echo "Nie uruchamiaj zbyt wielu programow na raz..."
+fi
+echo ''
+echo ''
+echo '+------------ PicoBSD 0.4 (NET) ---------------+'
+echo '| |'
+echo '| Zaloguj sie jako "root" (haslo "setup"). |'
+echo '| |'
+echo '| Ta wersja PicoBSD w pelni podlega |'
+echo '| licencji BSD. Po wiecej szczegolow zajrzyj |'
+echo '| na http://www.freebsd.org/~picobsd, lub |'
+echo '| skontaktuj sie z autorem. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+exit 0
diff --git a/release/picobsd/net/lang/reboot.en b/release/picobsd/net/lang/reboot.en
new file mode 100755
index 0000000..4601bb8
--- /dev/null
+++ b/release/picobsd/net/lang/reboot.en
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Press Ctrl-Alt-Del instead of $0"
diff --git a/release/picobsd/net/lang/reboot.pl b/release/picobsd/net/lang/reboot.pl
new file mode 100755
index 0000000..8181ced
--- /dev/null
+++ b/release/picobsd/net/lang/reboot.pl
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Zamiast $0 nacisnij Ctrl-Alt-Del"
diff --git a/release/picobsd/net/lang/resolv.conf.en b/release/picobsd/net/lang/resolv.conf.en
new file mode 100644
index 0000000..1a7acfd
--- /dev/null
+++ b/release/picobsd/net/lang/resolv.conf.en
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.en,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $
+domain mydomain.edu
+nameserver 192.33.4.12
diff --git a/release/picobsd/net/lang/resolv.conf.pl b/release/picobsd/net/lang/resolv.conf.pl
new file mode 100644
index 0000000..b2cb6499
--- /dev/null
+++ b/release/picobsd/net/lang/resolv.conf.pl
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.pl,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/net/lang/update.en b/release/picobsd/net/lang/update.en
new file mode 100755
index 0000000..012cbaa
--- /dev/null
+++ b/release/picobsd/net/lang/update.en
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: update.en,v 1.3 1998/08/10 19:17:11 abial Exp $
+pwd=`pwd`
+echo -n "Updating /etc contents on startup floppy... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "Cannot mount the floppy read-write!"
+ echo "Check the write-protection..."
+ exit 1
+fi
+cd /etc
+rm *.db
+rm passwd
+cp -Rp . /start_floppy/etc/
+pwd_mkdb master.passwd
+echo " Done."
+echo -n "Updating kernel parameters... "
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd ${pwd}
+echo " Done."
diff --git a/release/picobsd/net/lang/update.pl b/release/picobsd/net/lang/update.pl
new file mode 100755
index 0000000..c1bf95b
--- /dev/null
+++ b/release/picobsd/net/lang/update.pl
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: update.pl,v 1.3 1998/08/10 19:17:11 abial Exp $
+pwd=`pwd`
+echo -n "Uaktualniam katalog /etc na dyskietce... "
+mount /dev/fd0a /start_floppy
+if [ "X$?" != "X0" ]
+then
+ echo ""
+ echo "Blad podczas montowania read/write dyskietki!"
+ echo "Sprawdz, czy nie jest zabezpieczona przed zapisem..."
+ exit 1
+fi
+cd /etc
+rm *.db
+rm passwd
+cp -Rp . /start_floppy/etc/
+pwd_mkdb master.passwd
+echo " Zrobione."
+echo -n "Uaktualniam parametry jadra..."
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+cd ${pwd}
+echo " Zrobione."
diff --git a/release/picobsd/net/mfs.tree/MAKEDEV b/release/picobsd/net/mfs.tree/MAKEDEV
new file mode 100755
index 0000000..6e8560f
--- /dev/null
+++ b/release/picobsd/net/mfs.tree/MAKEDEV
@@ -0,0 +1,1167 @@
+#!/bin/sh -
+#
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
+#
+# Written and contributed by W. Jolitz 12/90
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
+#
+# Device "make" file. Valid arguments:
+# all makes all known devices, standard number of units (or close)
+# std standard devices
+# local configuration specific devices
+# mach-4 mach4&lites+devices for Mach's XFree86 distribution
+# (see http://www.cs.hut.fi/lites.html for more info on LITES)
+#
+# Tapes:
+# wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape
+# st* "NEW type scsi tapes" (old driver uses the
+# block devices of the disks to get access)
+# ft* QIC-40/QIC-80 3M cartridge tape (interfaced
+# via the floppy disk controller)
+#
+# Disks:
+# wd* "Winchester" disk drives (ST506,IDE,ESDI,RLL,...)
+# wfd* "IDE floppy" disk drives (LS-120)
+# fd* "floppy" disk drives (3 1/2", 5 1/4")
+# sd* "SCSI disks"
+# cd* "SCSI CD-ROM disks"
+# mcd* "Mitsumi CD-ROM disks"
+# scd* "Sony CD-ROM disks"
+# matcd* "Matsushita (Panasonic) CD-ROM disks"
+# wcd* "IDE CD-ROM disks"
+# vn* "vnode disks"
+# od* "optical disks"
+#
+# Console ports:
+# vty* virtual console devices for syscons/pcvt/codrv
+#
+# Pointing devices:
+# mse* Logitech and ATI Inport bus mouse
+# psm* PS/2 mouse
+# sysmouse Mousesystems mouse emulator for syscons
+#
+# Time devices:
+# refclock-* serial ports used by xntpd parse refclocks
+#
+# Terminal ports:
+# tty* general purpose serial ports
+# cua* dialout serial ports
+# ttyA* Specialix SI/XIO dialin ports ('*' = number of devices)
+# cuaA* Specialix SI/XIO dialout ports
+# ttyD* Digiboard - 16 dialin ports
+# cuaD* Digiboard - 16 dialout ports
+# ttyR* Rocketport dialin ports
+# cuaR* Rocketport dialout ports
+#
+# Pseudo terminals:
+# pty* set of 32 master and slave pseudo terminals
+# vty* virtual terminals using syscons/pcvt/codrv console
+#
+# Printers:
+# lpt* stock lp
+#
+# SCSI devices (other than CD-ROM, tape and disk):
+# ssc The ``super scsi'' device
+# uk* "unknown" device (supports ioctl calls only)
+# worm* WORM driver
+# pt* Processor Type (HP scanner, as one example)
+#
+# PC-CARD (previously called PCMCIA) support
+# card* PC-CARD slots
+#
+# Special purpose devices:
+# apm Advanced Power Management BIOS
+# bpf* packet filter
+# speaker pc speaker
+# tw* xten power controller
+# snd* various sound cards
+# pcaudio PCM audio driver
+# socksys iBCS2 socket system driver
+# vat VAT compatibility audio driver (requires snd*)
+# gsc Genius GS-4500 hand scanner
+# joy pc joystick
+# tun* Tunneling IP device
+# snp* tty snoop devices
+# spigot Video Spigot video acquisition card
+# ctx* Cortex-I video acquisition card
+# meteor* Matrox Meteor video acquisition card (pci)
+# bktr* Bt848 based video acquisition card (pci)
+# labpc* National Instrument's Lab-PC and LAB-PC+
+# perfmon CPU performance-monitoring counters
+# pci PCI configuration-space access from user mode
+# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
+#
+# $Id: MAKEDEV,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $
+#
+
+PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
+umask 77
+
+# Usage: die exitcode msg
+die() {
+ echo $2
+ exit $1
+}
+
+# Convert integer to partition name
+dkitop() {
+ local p
+
+ case $1 in
+ 0) p=a;; 1) p=b;; 2) p=c;; 3) p=d;; 4) p=e;; 5) p=f;; 6) p=g;; 7) p=h;;
+ *) p="?";;
+ esac
+ echo $p
+}
+
+# Convert integer to slice name
+dkitos() {
+ local s
+
+ case $1 in
+ 0) s="";;
+ 1) s="";;
+ *) s=s$(($1-1));;
+ esac
+ echo $s
+}
+
+# Convert disk (type, unit, slice, partition) to minor number
+dkminor()
+{
+ echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
+}
+
+# Override mknod(2) to add extra handling to it.
+mknod() {
+ rm -f "$1" || exit 1
+ /sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
+ chown root.wheel "$1" || exit 1
+}
+
+# Convert the last character of a tty name to a minor number.
+ttyminor()
+{
+ case $unit in
+ [0-9]) m=$unit;;
+ a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
+ h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
+ o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
+ v) m=31;;
+ *) m="?";;
+ esac
+ echo $m
+}
+
+# Raw partition for disks
+dkrawpart=2
+
+# Compatibility slice for disks
+dkcompatslice=0
+
+# Raw slice for disks
+dkrawslice=1
+
+# Control bit for SCSI
+scsictl=$((1 << 29))
+
+# Standard umasks
+disk_umask=037 # allow group operator to read disks
+tape_umask=017 # allow group operator to read/write tapes
+
+for i in $*; do
+case $i in
+
+all)
+ sh MAKEDEV std # standard
+ sh MAKEDEV fd0 fd1 # bdev, floppy disk
+ sh MAKEDEV sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 # bdev, ordinary disk
+ sh MAKEDEV od0 # bdev, optical disk
+ sh MAKEDEV wfd0 # bdev, LS-120 floppy
+ sh MAKEDEV vn0 # bdev, virtual disk
+ sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
+ sh MAKEDEV ft0 st0 wt0 # bdev, tape
+ sh MAKEDEV vty4 # cdev, virtual tty
+ sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
+ sh MAKEDEV pty0 # cdev, pseudo tty
+ sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3 # cdev, serial tty
+ sh MAKEDEV mse0 psm0 sysmouse # cdev, mouse
+ sh MAKEDEV pcaudio speaker # cdev, noise
+ sh MAKEDEV lpt0 lpt1 lpt2 # cdev, printer
+ sh MAKEDEV bpf0 ipl tun0 # cdev, network
+ sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
+ sh MAKEDEV apm card0 card1 # cdev, laptop
+ ;;
+std)
+ mknod console c 0 0; chmod 600 console
+ mknod drum c 4 0; chmod 640 drum; chgrp kmem drum
+ mknod kmem c 2 1; chmod 640 kmem; chgrp kmem kmem
+ mknod mem c 2 0; chmod 640 mem; chgrp kmem mem
+ mknod null c 2 2; chmod 666 null
+ mknod random c 2 3; chmod 644 random
+ mknod urandom c 2 4; chmod 644 urandom
+ mknod zero c 2 12; chmod 666 zero
+ mknod io c 2 14; chmod 600 io
+ mknod tty c 1 0; chmod 666 tty
+ mknod klog c 7 0; chmod 600 klog
+ mknod stdin c 22 0; chmod 666 stdin
+ mknod stdout c 22 1; chmod 666 stdout
+ mknod stderr c 22 2; chmod 666 stderr
+ mknod lkm c 32 0; chmod 644 lkm
+ mknod pci c 78 0; chmod 644 pci
+ mkdir -p fd
+ (cd fd && eval `echo "" | awk ' BEGIN { \
+ for (i = 0; i < 64; i++) \
+ printf("mknod %d c 22 %d;", i, i)}'`)
+ chown -R bin.bin fd
+ chmod 555 fd
+ chmod 666 fd/*
+ ;;
+
+mach-4)
+ mknod iopl c 22 0
+ mknod kbd c 23 0
+ mknod mouse c 24 0
+ mknod time c 25 0
+ mknod timezone c 26 0
+ ;;
+
+# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
+wt*)
+ umask $tape_umask
+ u=`expr $i : '..\(.*\)'`
+ if [ x$u = x ]; then u=0; fi
+ mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
+ mknod nrwt${u} c 10 `expr 4 + $u`
+# mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks
+# mknod nrWt${u} c 10 `expr 68 + $u`
+ mknod rwt${u}b c 10 `expr 16 + $u` # 60 megabytes
+ mknod nrwt${u}b c 10 `expr 20 + $u`
+ mknod rwt${u}c c 10 `expr 24 + $u` # 120 megabytes
+ mknod nrwt${u}c c 10 `expr 28 + $u`
+ mknod rwt${u}d c 10 `expr 32 + $u` # 150 megabytes
+ mknod nrwt${u}d c 10 `expr 36 + $u`
+# mknod rwt${u}e c 10 `expr 40 + $u` # 300 megabytes?
+# mknod nrwt${u}e c 10 `expr 44 + $u`
+# mknod rwt${u}f c 10 `expr 48 + $u` # 600 megabytes?
+# mknod nrwt${u}f c 10 `expr 52 + $u`
+ chgrp operator r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
+ umask 77
+ ;;
+
+# Individual slices.
+od*s*|sd*s*|vn*s*|wd*s*|wfd*s*)
+ umask $disk_umask
+ case $i in
+ od*s*) name=od; blk=20; chr=70;;
+ sd*s*) name=sd; blk=4; chr=13;;
+ wd*s*) name=wd; blk=0; chr=3;;
+ vn*s*) name=vn; blk=15; chr=43;;
+ wfd*s*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*s*)
+ unit=`expr $i : '...\([0-9]*\)s'`
+ slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\([0-9]*\)s'`
+ slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ case $slice in
+ [0-9]|[1-2][0-9]|30)
+ oldslice=$slice
+ slice=$(($slice+1))
+ slicename=`dkitos $slice`
+ minor=`dkminor 0 $unit $slice $dkrawpart`
+ mknod $name$unit$slicename b $blk $minor
+ mknod r$name$unit$slicename c $chr $minor
+ case $part in
+ [a-h])
+ case $oldslice in
+ 0) slice=$oldslice ;;
+ esac
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit $slice $part`
+ partname=`dkitop $part`
+ mknod $name$unit$slicename$partname \
+ b $blk $minor
+ mknod r$name$unit$slicename$partname \
+ c $chr $minor
+ done
+ ;;
+ "")
+ ;;
+ *)
+ echo bad partition for disk in: $i
+ ;;
+ esac
+ chgrp operator $name$unit$slicename* \
+ r$name$unit$slicename*
+ ;;
+ *)
+ echo bad slice for disk in: $i
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
+ ;;
+ esac
+ umask 77
+ ;;
+
+fd*)
+ umask $disk_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=fd; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64`
+ # Fake BSD partitions
+ for i in a b c d e f g h
+ do
+ ln ${name}${unit} ${name}${unit}$i
+ ln r${name}${unit} r${name}${unit}$i
+ done
+ # User-readable and programmer-readable name sets
+
+ mknod ${name}${unit}.1720 b $blk `expr $unit '*' 64 + 1`
+ mknod r${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1`
+ # ln ${name}${unit}.1720 ${name}${unit}135hs21
+ # ln r${name}${unit}.1720 r${name}${unit}135hs21
+
+ mknod ${name}${unit}.1480 b $blk `expr $unit '*' 64 + 2`
+ mknod r${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2`
+ # ln ${name}${unit}.1480 ${name}${unit}135hs18
+ # ln r${name}${unit}.1480 r${name}${unit}135hs18
+ # ln ${name}${unit}.1480 ${name}${unit}96hs18
+ # ln r${name}${unit}.1480 r${name}${unit}96hs18
+
+ mknod ${name}${unit}.1440 b $blk `expr $unit '*' 64 + 3`
+ mknod r${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3`
+ # ln ${name}${unit}.1440 ${name}${unit}135
+ # ln r${name}${unit}.1440 r${name}${unit}135
+ # ln ${name}${unit}.1440 ${name}${unit}135ds18
+ # ln r${name}${unit}.1440 r${name}${unit}135ds18
+ # ln ${name}${unit}.1440 ${name}${unit}96ds18
+ # ln r${name}${unit}.1440 r${name}${unit}96ds18
+
+ mknod ${name}${unit}.1200 b $blk `expr $unit '*' 64 + 4`
+ mknod r${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4`
+ # ln ${name}${unit}.1200 ${name}${unit}96
+ # ln r${name}${unit}.1200 r${name}${unit}96
+ # ln ${name}${unit}.1200 ${name}${unit}96ds15
+ # ln r${name}${unit}.1200 r${name}${unit}96ds15
+ # ln ${name}${unit}.1200 ${name}${unit}135ds15
+ # ln r${name}${unit}.1200 r${name}${unit}135ds15
+
+ mknod ${name}${unit}.820 b $blk `expr $unit '*' 64 + 5`
+ mknod r${name}${unit}.820 c $chr `expr $unit '*' 64 + 5`
+ # ln ${name}${unit}.820 ${name}${unit}96hs10
+ # ln r${name}${unit}.820 r${name}${unit}96hs10
+ # ln ${name}${unit}.820 ${name}${unit}135hs10
+ # ln r${name}${unit}.820 r${name}${unit}135hs10
+
+ mknod ${name}${unit}.800 b $blk `expr $unit '*' 64 + 6`
+ mknod r${name}${unit}.800 c $chr `expr $unit '*' 64 + 6`
+ # ln ${name}${unit}.800 ${name}${unit}96ds10
+ # ln r${name}${unit}.800 r${name}${unit}96ds10
+ # ln ${name}${unit}.800 ${name}${unit}135ds10
+ # ln r${name}${unit}.800 r${name}${unit}135ds10
+
+ mknod ${name}${unit}.720 b $blk `expr $unit '*' 64 + 7`
+ mknod r${name}${unit}.720 c $chr `expr $unit '*' 64 + 7`
+ # ln ${name}${unit}.720 ${name}${unit}96ds9
+ # ln r${name}${unit}.720 r${name}${unit}96ds9
+ # ln ${name}${unit}.720 ${name}${unit}135ds9
+ # ln r${name}${unit}.720 r${name}${unit}135ds9
+
+ mknod ${name}${unit}.360 b $blk `expr $unit '*' 64 + 8`
+ mknod r${name}${unit}.360 c $chr `expr $unit '*' 64 + 8`
+ # ln ${name}${unit}.360 ${name}${unit}48
+ # ln r${name}${unit}.360 r${name}${unit}48
+ # ln ${name}${unit}.360 ${name}${unit}48ds9
+ # ln r${name}${unit}.360 r${name}${unit}48ds9
+
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ft*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=ft; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64 + 32`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64 + 32`
+ ln ${name}${unit} ${name}${unit}a
+ ln r${name}${unit} r${name}${unit}a
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+od*|sd*|vn*|wd*|wfd*)
+ umask $disk_umask
+ case $i in
+ od*) name=od; blk=20; chr=70;;
+ sd*) name=sd; blk=4; chr=13;;
+ vn*) name=vn; blk=15; chr=43;;
+ wd*) name=wd; blk=0; chr=3;;
+ wfd*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*)
+ unit=`expr $i : '...\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for slicepartname in s0h s1 s2 s3 s4
+ do
+ sh MAKEDEV $name$unit$slicepartname
+ done
+ case $name in
+ od|sd)
+ minor=`dkminor 0 $unit 0 0`
+ mknod r${name}${unit}.ctl c $chr $(($minor | $scsictl))
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ccd*)
+ umask $disk_umask
+ name=ccd
+ blk=21; chr=74
+ unit=`expr $i : '...\(.*\)'`
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit 0 $part`
+ partname=`dkitop $part`
+ mknod $name$unit$partname b $blk $minor
+ mknod r$name$unit$partname c $chr $minor
+ done
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ssc*)
+ mknod ssc c 49 0
+ ;;
+
+uk*)
+ unit=`expr $i : 'uk\(.*\)'`
+ mknod uk$unit c 31 $unit
+ ;;
+
+worm*)
+ umask $disk_umask
+ unit=`expr $i : 'worm\(.*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ chr=62
+ blk=23
+ name=worm
+ mknod ${name}${unit} b $blk ${unit}
+ mknod r${name}${unit} c $chr ${unit}
+ chgrp operator ${name}${unit} r${name}${unit}
+ umask 077
+ mknod r${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+# SCSI processor type driver
+pt[0-9]*)
+ chr=61
+ name=pt
+ unit=`expr $i : 'pt\([0-9][0-9]*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ unit=`expr $unit + 1 - 1`
+ mknod ${name}${unit} c $chr $unit
+ mknod ${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+pty*)
+ class=`expr $i : 'pty\(.*\)'`
+ case $class in
+ 0) offset=0 name=p;;
+ 1) offset=32 name=q;;
+ 2) offset=64 name=r;;
+ 3) offset=96 name=s;;
+# Note that xterm (at least) only look at p-s.
+ 4) offset=128 name=P;;
+ 5) offset=160 name=Q;;
+ 6) offset=192 name=R;;
+ 7) offset=224 name=S;;
+ # This still leaves [tuTU].
+ *) echo bad unit for pty in: $i;;
+ esac
+ case $class in
+ 0|1|2|3|4|5|6|7)
+ umask 0
+ eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
+ for (i = 0; i < 32; i++) {
+ c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
+ printf("mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d;", \
+ n, c, b+i, \
+ n, c, b+i); \
+ } \
+ }'`
+ umask 77
+ ;;
+ esac
+ ;;
+
+st*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ chr=14
+
+ case $unit in
+ 0|1|2|3|4|5|6)
+ for mode in 0 1 2 3
+ do
+ mknod rst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 0`
+ mknod nrst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 1`
+ mknod erst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 2`
+ mknod st${unit}ctl.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 3`
+ chgrp operator rst${unit}.${mode}\
+ nrst${unit}.${mode} \
+ erst${unit}.${mode} \
+ st${unit}ctl.${mode}
+ chmod 600 st${unit}ctl.${mode}
+ done
+ mknod rst${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 rst${unit}.ctl
+
+ ln rst${unit}.0 rst${unit}
+ ln nrst${unit}.0 nrst${unit}
+ ln erst${unit}.0 erst${unit}
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ch*)
+ umask 37
+ unit=`expr $i : '..\(.*\)'`
+ case $i in
+ ch*) name=ch; chr=17;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit} c $chr `expr $unit '*' 16 + 0`
+ chgrp operator ${name}${unit}
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ *)
+ echo bad unit for media changer in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+cd*|mcd*|scd*)
+ umask $disk_umask
+ case $i in
+ cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
+ mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
+ scd*) unit=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ case $name in
+ cd)
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+matcd*)
+ umask 2
+ case $i in
+ matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
+
+ mknod ${name}${unit}la b $blk `expr $unit '*' 8 + 128`
+ mknod ${name}${unit}lc b $blk `expr $unit '*' 8 + 130`
+ mknod r${name}${unit}la c $chr `expr $unit '*' 8 + 128`
+ mknod r${name}${unit}lc c $chr `expr $unit '*' 8 + 130`
+ chgrp operator ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ chmod 640 ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+wcd*)
+ umask 2 ;
+ unit=`expr $i : '...\(.*\)'`
+ blk=19
+ chr=69
+ case $unit in
+ 0|1|2|3)
+ mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
+ chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+lpt*)
+ unit=`expr $i : 'lpt\(.*\)'`
+ mknod lpt$unit c 16 $unit
+ mknod lpctl$unit c 16 `expr $unit + 128`
+ ;;
+
+tw*)
+ unit=`expr $i : 'tw\(.*\)'`
+ mknod tw$unit c 19 $unit
+ chgrp operator tw$unit
+ ;;
+
+# Use this to create virtual consoles for syscons, pcvt or codrv
+# ttyv0-b
+# use as MAKEDEV vtyNN to create NN entries
+vty*)
+ chr=12
+ units=`expr $i : 'vty\(.*\)'`
+ eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
+ for (i = 0; i < n; i++)
+ printf("mknod ttyv%01x c %d %d;", i, c, i); }'`
+ ln -fs ttyv0 vga # XXX X still needs this pccons relic
+ ;;
+
+bpf*)
+ unit=`expr $i : 'bpf\(.*\)'`
+ mknod bpf$unit c 23 $unit
+ ;;
+
+speaker)
+ mknod speaker c 26 0
+ ;;
+
+cuaa?|cua?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuaa$unit c 28 `expr $m + 128`
+ mknod cuaia$unit c 28 `expr $m + 32 + 128`
+ mknod cuala$unit c 28 `expr $m + 64 + 128`
+ chown uucp.dialer cua*a$unit
+ umask 77
+ ;;
+
+tty0?|ttyd?|tty?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttyd$unit c 28 $m
+ mknod ttyid$unit c 28 `expr $m + 32`
+ mknod ttyld$unit c 28 `expr $m + 64`
+ ;;
+
+cuac?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuac$name c $major `expr $minor + 128`
+ mknod cuaic$name c $major `expr $minor + 32 + 128`
+ mknod cualc$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cuac$name cuaic$name cualc$name
+ done
+ umask 77
+ ;;
+
+ttyc?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyc$name c $major $minor
+ mknod ttyic$name c $major `expr $minor + 32`
+ mknod ttylc$name c $major `expr $minor + 64`
+ done
+ ;;
+
+# RISCom8 'rc' driver entries
+
+cuam?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuam$unit c 63 `expr $m + 128`
+ chown uucp.dialer cuam$unit
+ umask 77
+ ;;
+
+ttym?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttym$unit c 63 $m
+ ;;
+
+# Specialix SI/XIO.
+# Note: these are 'base 1' to match the numbers on the panels, and to match
+# the manual that comes with the system.
+ttyA*)
+ major=68
+ nports=`expr $i : 'ttyA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod ttyA$name c $major $minor
+ mknod ttyiA$name c $major `expr $minor + 65536`
+ mknod ttylA$name c $major `expr $minor + 131072`
+ port=`expr $port + 1`
+ done
+ # For the user-mode control program, 'sicontrol'
+ mknod si_control c 68 262144
+ ;;
+
+cuaA*)
+ umask 7
+ major=68
+ nports=`expr $i : 'cuaA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod cuaA$name c $major `expr $minor + 128`
+ mknod cuaiA$name c $major `expr $minor + 128 + 65536`
+ mknod cualA$name c $major `expr $minor + 128 + 131072`
+ chown uucp.dialer cuaA$name cuaiA$name cualA$name
+ port=`expr $port + 1`
+ done
+ umask 77
+ ;;
+
+# Digiboard PC/?? 16 port card.
+# The current scheme of minor numbering is:
+#
+# unused{14} CARD{2} major{8} CALLOUT{1} LOCK{1} INIT{1} PORT{5}
+#
+# CARD bitfield in future versions may be extended to 3 bits.
+#
+# See dgb(4)
+#
+ttyD?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyD$name c $major $minor
+ mknod ttyiD$name c $major `expr $minor + 32`
+ mknod ttylD$name c $major `expr $minor + 64`
+ done
+ ;;
+
+cuaD?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuaD$name c $major `expr $minor + 128`
+ mknod cuaiD$name c $major `expr $minor + 32 + 128`
+ mknod cualD$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cua*D$name
+ done
+ umask 77
+ ;;
+
+ttyR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/ttyR*; rm -f /dev/ttyiR*; rm -f /dev/ttylR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/ttyR$Rnum c $major $MINOR
+ mknod /dev/ttylR$Rnum c $major `expr $MINOR + 32`
+ mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ ;;
+
+cuaR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/cuaR*; rm -f /dev/cuaiR*; rm -f /dev/cualR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/cuaR$Rnum c $major `expr $MINOR + 128`
+ mknod /dev/cualR$Rnum c $major `expr $MINOR + 128 + 32`
+ mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ chown uucp.dialer /dev/cuaR*
+ ;;
+
+mse*)
+ unit=`expr $i : 'mse\(.*\)'`
+ chr=27
+ mknod mse$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+psm*)
+ unit=`expr $i : 'psm\(.*\)'`
+ chr=21
+ mknod psm$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+mouse*)
+ name=`expr $i : 'mouse\(.*\)'`
+ if [ ! -c $name ]; then
+ $0 $name # make the appropriate device
+ fi
+ ln -fs $name mouse
+ ;;
+
+pcaudio)
+ mknod pcaudio c 24 0
+ mknod pcaudioctl c 24 128
+ ;;
+
+socksys)
+ mknod socksys c 41 0
+ mknod spx c 41 1
+ ln -fs socksys nfsd
+ chmod 666 socksys nfsd spx
+ ;;
+
+snd*)
+#
+# changes from Linux voxware
+# minor Linux FreeBSD
+# 8 sequencer2 (aka music0) music0
+# 17 patmgr0 sequencer1
+# 33 patmgr1 sequencer2
+#
+
+ unit=`expr $i : 'snd\(.*\)'`
+ chr=30
+
+ # XXX write this less verbosely, like std
+ snd_security_hole=0 # XXX
+ umask $snd_security_hole
+
+ if [ $unit = "0" ] ; then
+ ln -fs mixer$unit mixer
+ ln -fs sequencer$unit sequencer
+ ln -fs dsp$unit dsp
+ ln -fs audio$unit audio
+ ln -fs dspW$unit dspW
+ ln -fs music$unit music
+ ln -fs pss$unit pss
+ fi
+
+ mknod mixer$unit c $chr `expr $unit '*' 16 + 0`
+ mknod sequencer$unit c $chr `expr $unit '*' 16 + 1`
+ mknod midi$unit c $chr `expr $unit '*' 16 + 2`
+ mknod dsp$unit c $chr `expr $unit '*' 16 + 3`
+ mknod audio$unit c $chr `expr $unit '*' 16 + 4`
+ mknod dspW$unit c $chr `expr $unit '*' 16 + 5`
+ mknod sndstat c $chr 6
+ # minor number 7 is unused
+ mknod music$unit c $chr `expr $unit '*' 16 + 8`
+ mknod pss$unit c $chr `expr $unit '*' 16 + 9`
+ # minor numbers 10-15 are unused
+ umask 77
+ ;;
+
+vat)
+ mknod vatio c 25 128
+ chmod 660 vatio
+ ;;
+
+gsc*)
+ unit=`expr $i : 'gsc\(.*\)'`
+ mknod gsc${unit} c 47 $unit
+ mknod gsc${unit}p c 47 $(($unit + 8))
+ mknod gsc${unit}d c 47 $(($unit + 32))
+ mknod gsc${unit}pd c 47 $(($unit + 40))
+ chmod 666 gsc${unit}*
+ ;;
+
+apm*)
+ chr=39
+ mknod apm c $chr 0
+ chgrp operator apm
+ chmod 660 apm
+ ;;
+
+card*)
+ unit=`expr $i : 'card\(.*\)'`
+ chr=50
+ mknod card$unit c $chr $unit
+ chmod 644 card$unit
+ ;;
+
+ttyx?|ttyy?|ttyz?)
+ case $i in
+ *0) unit=0;; *1) unit=1;; *2) unit=2;; *3) unit=3;;
+ *4) unit=4;; *5) unit=5;; *6) unit=6;; *7) unit=7;;
+ *8) unit=8;; *9) unit=9;; *a) unit=10;; *b) unit=11;;
+ *c) unit=12;; *d) unit=13;; *e) unit=14;; *f) unit=15;;
+ esac
+ case $i in
+ ttyy?) unit=`expr $unit \+ 16`;;
+ ttyz?) unit=`expr $unit \+ 32`;;
+ esac
+ mknod $i c 42 $unit
+ chown uucp.wheel $i
+ ;;
+
+cronyx)
+ mknod cronyx c 42 63
+ ;;
+
+joy)
+ mknod joy0 c 51 0
+ mknod joy1 c 51 1
+ chgrp operator joy0 joy1
+ chmod 640 joy0 joy1
+ ;;
+
+spigot)
+ mknod spigot c 11 0
+ chmod 444 spigot
+ ;;
+
+ctx?)
+ unit=`expr $i : 'ctx\(.*\)'`
+ mknod ctx$unit c 40 $unit
+ chmod 444 ctx$unit
+ ;;
+
+meteor?)
+ unit=`expr $i : 'meteor\(.*\)'`
+ mknod meteor$unit c 67 $unit
+ chmod 444 meteor$unit
+ ;;
+
+bktr?)
+ unit=`expr $i : 'bktr\(.*\)'`
+ mknod bktr$unit c 92 $unit
+ mknod tuner$unit c 92 $((16 + $unit ))
+ chmod 444 bktr$unit tuner$unit
+ ;;
+
+tun*)
+ ntun=`expr $i : 'tun\(.*\)$'`
+ unit=0
+ while [ $unit -le $ntun ]; do
+ mknod tun$unit c 52 $unit
+ chown uucp.dialer tun$unit
+ unit=`expr $unit + 1`
+ done
+ ;;
+
+sysmouse)
+ mknod sysmouse c 12 128
+ mknod consolectl c 12 255
+ ;;
+
+snp?)
+ unit=`expr $i : 'snp\(.*\)'`
+ mknod snp$unit c 53 $unit
+ ;;
+
+# dufault@hda.com: If I do much more work on other A-D boards
+# then eventually we'll have a "ad" and "dio" interface and some of these
+# "labpcaio" ones will be gone.
+# labpcaio: D-A and A-D.
+# labpcdio: Digital in and Digital out.
+#
+labpc*)
+ umask 7
+ case $i in
+ labpcaio*)
+ name=labpcaio
+ unit=`expr $i : 'labpcaio\(.*\)'`
+ all="0 1 2 3 4 5 6 7"
+ offset=0
+ ;;
+ labpcdio*)
+ name=labpcdio
+ unit=`expr $i : 'labpcdio\(.*\)'`
+ all="0 1 2 3"
+ offset=8
+ ;;
+ *)
+ die 3 "Don't know LabPC type $i"
+ ;;
+ esac
+ if [ "X${unit}" = "X" ]; then
+ unit=all
+ fi
+ case $unit in
+ 0|1|2|3|4|5|6|7)
+ mknod $name$unit c 66 `expr $offset + $unit `
+ ;;
+ all)
+ for i in $all
+ do
+ mknod $name$i c 66 `expr $offset + $i `
+ done
+ ;;
+ *)
+ echo "No such LabPC unit: $unit"
+ ;;
+ esac
+ umask 77
+ ;;
+
+perfmon)
+ mknod perfmon c 2 32
+ chgrp kmem perfmon
+ chmod 640 perfmon
+ ;;
+
+ipl)
+ mknod ipl c 79 0
+ mknod ipnat c 79 1
+ mknod ipstate c 79 2
+ mknod ipauth c 79 3
+ ;;
+
+local)
+ umask 0 # XXX should be elsewhere
+ sh MAKEDEV.local
+ umask 77
+ ;;
+
+*)
+ echo $i - no such device name
+ ;;
+
+esac
+done
diff --git a/release/picobsd/net/mfs.tree/Makefile b/release/picobsd/net/mfs.tree/Makefile
new file mode 100644
index 0000000..2014780
--- /dev/null
+++ b/release/picobsd/net/mfs.tree/Makefile
@@ -0,0 +1,38 @@
+#
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:51 abial Exp $
+#
+
+DESTDIR?=/mnt
+
+STAND_LINKS= bin sbin
+USR_LINKS= bin sbin libexec
+PL_LOCALE_LINKS= pl polish
+
+all: tree links
+
+tree:
+ mtree -deU -f mfs.mtree -p ${DESTDIR}
+
+links: tree
+ (cd ${DESTDIR}; \
+ for i in ${STAND_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd var/run; \
+ ln -s /dev/null log; \
+ cd ../../usr; \
+ for i in ${USR_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd share/misc;\
+ ln -s /etc/termcap termcap; )
+
+
+# We don't do it under 'all' because it's needed only on non-DEVFS systems
+devnodes: tree
+ (cp MAKEDEV ${DESTDIR}/dev/; \
+ cd ${DESTDIR}/dev; \
+ ./MAKEDEV std tun2 vty10 fd0 wd0 wd0s1h pty0 vn0; \
+ rm MAKEDEV;)
diff --git a/release/picobsd/net/mfs.tree/mfs.mtree b/release/picobsd/net/mfs.tree/mfs.mtree
new file mode 100644
index 0000000..74e7f8b
--- /dev/null
+++ b/release/picobsd/net/mfs.tree/mfs.mtree
@@ -0,0 +1,58 @@
+#
+# $Id: mfs.mtree,v 1.2 1998/08/02 12:24:38 abial Exp $
+#
+/set type=dir uname=root gname=wheel mode=0755
+.
+ dev
+ ..
+ dos
+ ..
+ etc
+ ..
+ home
+ user
+ ..
+ ..
+ mnt
+ ..
+ mnt1
+ ..
+ mnt2
+ ..
+ proc
+ ..
+ root
+ ..
+ stand
+ ..
+ start_floppy
+ ..
+ tftpboot
+ ..
+ tmp
+ ..
+ usr
+ local
+ share
+ snmp
+ mibs
+ ..
+ ..
+ ..
+ ..
+ share
+ misc
+ ..
+ ..
+ ..
+ var
+ db
+ ..
+ run
+ ..
+ spool
+ lock
+ ..
+ ..
+ ..
+..
diff --git a/release/picobsd/router/BAD_DOCS!!! b/release/picobsd/router/BAD_DOCS!!!
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/router/BAD_DOCS!!!
diff --git a/release/picobsd/router/conf/PICOBSD b/release/picobsd/router/conf/PICOBSD
new file mode 100644
index 0000000..c03dc33
--- /dev/null
+++ b/release/picobsd/router/conf/PICOBSD
@@ -0,0 +1,97 @@
+#
+# $Id: PICOBSD,v 1.2 1998/08/10 19:17:42 abial Exp $
+#
+
+machine "i386"
+cpu "I386_CPU"
+cpu "I486_CPU"
+cpu "I586_CPU"
+cpu "I686_CPU"
+ident PICOBSD
+maxusers 10
+
+#options MATH_EMULATE #Support for x87 emulation
+options INET #InterNETworking
+options FFS #Berkeley Fast Filesystem
+#options NFS #Network Filesystem
+options MFS
+#options MSDOSFS #MSDOS Filesystem
+#options "CD9660" #ISO 9660 Filesystem
+#options PROCFS #Process filesystem
+options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
+options USERCONFIG #boot -c editor
+#options USERCONFIG_BOOT #imply -c and parse info area
+#options VISUAL_USERCONFIG #visual boot -c editor
+options IPFIREWALL
+options IPFIREWALL_DEFAULT_TO_ACCEPT
+options IPDIVERT
+options PCI_QUIET
+options DEVFS
+options SLICE
+options NO_SWAPPING
+
+config kernel root on fd0
+
+controller isa0
+controller pci0
+
+controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
+disk fd0 at fdc0 drive 0
+#disk fd1 at fdc0 drive 1
+
+#options "CMD640" # work around CMD640 chip deficiency
+#controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr
+#disk wd0 at wdc0 drive 0
+#disk wd1 at wdc0 drive 1
+
+#controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr
+#disk wd2 at wdc1 drive 0
+#disk wd3 at wdc1 drive 1
+
+#options ATAPI #Enable ATAPI support for IDE bus
+#options ATAPI_STATIC #Don't do it as an LKM
+#device wcd0 #IDE CD-ROM
+
+# syscons is the default console driver, resembling an SCO console
+device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
+
+device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
+
+device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr
+device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
+device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr
+device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr
+
+#device lpt0 at isa? port? tty irq 7 vector lptintr
+
+# Order is important here due to intrusive probes, do *not* alphabetize
+# this list of network interfaces until the probes have been fixed.
+# Right now it appears that the ie0 must be probed before ep0. See
+# revision 1.20 of this file.
+device de0
+device de1
+device fxp0
+device fxp1
+
+device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr
+device ed1 at isa? port 0x300 net irq 5 iomem 0xd0000 vector edintr
+device ie0 at isa? port 0x280 net irq 10 iomem 0xd0000 vector ieintr
+device ie1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector ieintr
+device ep0 at isa? port 0x300 net irq 10 vector epintr
+device ep1 at isa? port 0x280 net irq 5 vector epintr
+#device ex0 at isa? port? net irq? vector exintr
+#device fe0 at isa? port 0x300 net irq ? vector feintr
+#device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
+#device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
+#device ze0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zeintr
+#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
+
+pseudo-device loop
+pseudo-device ether
+#pseudo-device tun 4
+#pseudo-device vn
+#pseudo-device bpfilter 4
+pseudo-device ppp 4
+pseudo-device pty 16
+pseudo-device gzip # Exec gzipped a.out's
diff --git a/release/picobsd/router/crunch1/Makefile b/release/picobsd/router/crunch1/Makefile
new file mode 100644
index 0000000..046ddac
--- /dev/null
+++ b/release/picobsd/router/crunch1/Makefile
@@ -0,0 +1,36 @@
+#
+# $Id: Makefile,v 1.2 1998/08/10 19:39:36 abial Exp $
+#
+SRC?=/usr/src
+
+all: crunch
+
+crunch:
+ @cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
+ @crunchgen ./crunch1.conf
+ @${MAKE} -f crunch1.mk all \
+ "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY -DNOSECURE -DNOCRYPT" 2>&1 >/dev/null
+
+clean:
+ rm -f *.o *.stub *.lo *_stub.c *.mk \
+ crunch.cache \
+ crunch.mk \
+ crunch.c \
+ crunch1* \
+ crunch \
+ .tmp_* \
+ *.gz
+
+install:
+ cp crunch1 /mnt/stand/crunch
+ chmod 555 /mnt/stand/crunch
+ for i in `crunchgen -l crunch1.conf` ; \
+ do \
+ ln /mnt/stand/crunch /mnt/stand/$${i}; \
+ done
+ rm /mnt/stand/crunch
+ # Install the MIB files
+ #cp mibs/*.txt /mnt/usr/local/share/snmp/mibs/
+
+
+.include <bsd.prog.mk>
diff --git a/release/picobsd/router/crunch1/crunch.conf b/release/picobsd/router/crunch1/crunch.conf
new file mode 100644
index 0000000..fe6b67f
--- /dev/null
+++ b/release/picobsd/router/crunch1/crunch.conf
@@ -0,0 +1,55 @@
+#
+# $Id: crunch.conf,v 1.3 1998/08/12 13:04:54 abial Exp $
+#
+# NOTE: the string "/usr/src" will be automatically replaced with the
+# correct value set in 'build' script - you should change it there
+
+# sources for kget & vm
+srcdirs ../../tinyware
+# sources for ucd-snmp - they must be already patched & configured!
+# The necessary steps are given below:
+# * you have to symlink subdirectory agent -> snmpd
+# * you have to properly construct an OBJS variable in snmpd/Makefile:
+# OBJS=${MIBOBJS} ${AGENTOBJS}
+# * we install a special version of MIB files - stripped of comments and
+# descriptions. These MIBs are included here to save you the stripping.
+#srcdirs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1
+# other sources
+srcdirs /usr/src/bin
+srcdirs /usr/src/sbin/i386
+srcdirs /usr/src/sbin
+srcdirs /usr/src/usr.bin
+srcdirs /usr/src/gnu/usr.bin
+srcdirs /usr/src/usr.sbin
+srcdirs /usr/src/libexec
+
+progs hostname cat kget
+progs oinit ifconfig df sps ns vm
+progs cp rm ls #syslogd
+progs sysctl route
+progs mount umount
+progs kill natd
+#progs mount_std snmpd
+
+progs pppd more
+progs ping traceroute routed ipfw
+
+#ln mount_cd9660 cd9660
+#ln mount_nfs nfs
+#ln test [
+#ln ash -sh
+#ln ash sh
+# XXX Why? Some bug in crunchgen?
+#ln newfs mfs
+#ln mount_msdos msdos
+#ln mount_std procfs
+#ln mount_std mount_procfs
+ln sps ps
+ln ns netstat
+#ln chown chgrp
+
+# For snmpd
+#libs /usr/ports/net/ucd-snmp/work/ucd-snmp-3.3.1/snmplib/libsnmp.a
+libs -lncurses -lmytinfo -lipx -lz -lpcap -lalias
+libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm
+libs -lgnuregex -ltelnet
diff --git a/release/picobsd/router/crunch1/mibs/EtherLike-MIB.txt b/release/picobsd/router/crunch1/mibs/EtherLike-MIB.txt
new file mode 100644
index 0000000..82b19ac
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/EtherLike-MIB.txt
@@ -0,0 +1,318 @@
+EtherLike-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ ifEntry, ifIndex
+ FROM IF-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress, TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ transmission, mib-2, Integer32, Gauge32, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+etherMIB MODULE-IDENTITY
+ LAST-UPDATED "9402030400Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street
+ North Andover, MA 01845
+ US
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 35 }
+
+etherMIBObjects ::= { etherMIB 1 }
+
+dot3 ::= { transmission 7 }
+
+dot3StatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 2 }
+
+dot3StatsEntry OBJECT-TYPE
+ SYNTAX Dot3StatsEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { dot3StatsIndex }
+ ::= { dot3StatsTable 1 }
+
+Dot3StatsEntry ::=
+ SEQUENCE {
+ dot3StatsIndex
+ INTEGER,
+
+ dot3StatsAlignmentErrors
+ Counter32,
+
+ dot3StatsFCSErrors
+ Counter32,
+
+ dot3StatsSingleCollisionFrames
+ Counter32,
+
+ dot3StatsMultipleCollisionFrames
+ Counter32,
+
+ dot3StatsSQETestErrors
+ Counter32,
+
+ dot3StatsDeferredTransmissions
+ Counter32,
+
+ dot3StatsLateCollisions
+ Counter32,
+
+ dot3StatsExcessiveCollisions
+ Counter32,
+
+ dot3StatsInternalMacTransmitErrors
+ Counter32,
+
+ dot3StatsCarrierSenseErrors
+ Counter32,
+
+ dot3StatsFrameTooLongs
+ Counter32,
+
+ dot3StatsInternalMacReceiveErrors
+ Counter32,
+
+ dot3StatsEtherChipSet
+ OBJECT IDENTIFIER
+ }
+
+dot3StatsIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 1 }
+
+dot3StatsAlignmentErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 2 }
+
+dot3StatsFCSErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 3 }
+
+dot3StatsSingleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 4 }
+
+dot3StatsMultipleCollisionFrames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 5 }
+
+dot3StatsSQETestErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "ANSI/IEEE Std 802.3-1985 Carrier Sense
+ Multiple Access with Collision Detection Access
+ Method and Physical Layer Specifications"
+ ::= { dot3StatsEntry 6 }
+
+dot3StatsDeferredTransmissions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 7 }
+
+dot3StatsLateCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 8 }
+
+dot3StatsExcessiveCollisions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 9 }
+
+dot3StatsInternalMacTransmitErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 10 }
+
+dot3StatsCarrierSenseErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 11 }
+
+dot3StatsFrameTooLongs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 13 }
+
+dot3StatsInternalMacReceiveErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ REFERENCE
+ "IEEE 802.3 Layer Management"
+ ::= { dot3StatsEntry 16 }
+
+dot3StatsEtherChipSet OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3StatsEntry 17 }
+
+dot3CollTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3 5 }
+
+dot3CollEntry OBJECT-TYPE
+ SYNTAX Dot3CollEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, dot3CollCount }
+ ::= { dot3CollTable 1 }
+
+Dot3CollEntry ::=
+ SEQUENCE {
+ dot3CollCount
+ INTEGER,
+
+ dot3CollFrequencies
+ Counter32
+ }
+
+dot3CollCount OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { dot3CollEntry 2 }
+
+dot3CollFrequencies OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { dot3CollEntry 3 }
+
+dot3Tests ::= { dot3 6 }
+
+dot3Errors ::= { dot3 7 }
+
+dot3TestTdr ::= { dot3Tests 1 }
+
+dot3TestLoopBack ::= { dot3Tests 2 }
+
+dot3ErrorInitError ::= { dot3Errors 1 }
+
+dot3ErrorLoopbackError ::= { dot3Errors 2 }
+
+dot3ChipSets ::= { dot3 8 }
+
+dot3ChipSetAMD ::= { dot3ChipSets 1 }
+
+dot3ChipSetAMD7990 ::= { dot3ChipSetAMD 1 }
+
+dot3ChipSetAMD79900 ::= { dot3ChipSetAMD 2 }
+
+dot3ChipSetAMD79C940 ::= { dot3ChipSetAMD 3 }
+
+dot3ChipSetIntel ::= { dot3ChipSets 2 }
+
+dot3ChipSetIntel82586 ::= { dot3ChipSetIntel 1 }
+
+dot3ChipSetIntel82596 ::= { dot3ChipSetIntel 2 }
+
+dot3ChipSetSeeq ::= { dot3ChipSets 3 }
+
+dot3ChipSetSeeq8003 ::= { dot3ChipSetSeeq 1 }
+
+dot3ChipSetNational ::= { dot3ChipSets 4 }
+
+dot3ChipSetNational8390 ::= { dot3ChipSetNational 1 }
+
+dot3ChipSetNationalSonic ::= { dot3ChipSetNational 2 }
+
+dot3ChipSetFujitsu ::= { dot3ChipSets 5 }
+
+dot3ChipSetFujitsu86950 ::= { dot3ChipSetFujitsu 1 }
+
+dot3ChipSetDigital ::= { dot3ChipSets 6 }
+
+dot3ChipSetDigitalDC21040 ::= { dot3ChipSetDigital 1 }
+
+etherConformance ::= { etherMIB 2 }
+
+etherGroups ::= { etherConformance 1 }
+
+etherCompliances ::= { etherConformance 2 }
+
+etherCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { etherStatsGroup }
+ GROUP etherCollisionTableGroup
+ ::= { etherCompliances 1 }
+
+etherStatsGroup OBJECT-GROUP
+ OBJECTS {
+ dot3StatsIndex,
+ dot3StatsAlignmentErrors,
+ dot3StatsFCSErrors,
+ dot3StatsSingleCollisionFrames,
+ dot3StatsMultipleCollisionFrames,
+ dot3StatsSQETestErrors,
+ dot3StatsDeferredTransmissions,
+ dot3StatsLateCollisions,
+ dot3StatsExcessiveCollisions,
+ dot3StatsInternalMacTransmitErrors,
+ dot3StatsCarrierSenseErrors,
+ dot3StatsFrameTooLongs,
+ dot3StatsInternalMacReceiveErrors,
+ dot3StatsEtherChipSet
+ }
+ STATUS current
+ ::= { etherGroups 1 }
+
+etherCollisionTableGroup OBJECT-GROUP
+ OBJECTS { dot3CollCount, dot3CollFrequencies }
+ STATUS current
+ ::= { etherGroups 2 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/HOST-RESOURCES-MIB.txt b/release/picobsd/router/crunch1/mibs/HOST-RESOURCES-MIB.txt
new file mode 100644
index 0000000..078dc02
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/HOST-RESOURCES-MIB.txt
@@ -0,0 +1,877 @@
+HOST-RESOURCES-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ Gauge, Counter, TimeTicks
+ FROM RFC1155-SMI
+ mib-2, DisplayString
+ FROM RFC1213-MIB
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+host ::= { mib-2 25 }
+
+hrSystem ::= { host 1 }
+
+hrStorage ::= { host 2 }
+
+hrDevice ::= { host 3 }
+
+hrSWRun ::= { host 4 }
+
+hrSWRunPerf ::= { host 5 }
+
+hrSWInstalled ::= { host 6 }
+
+Boolean ::=
+ INTEGER {
+ true(1),
+ false(2)
+ }
+
+KBytes ::=
+ INTEGER
+
+ProductID ::=
+ OBJECT IDENTIFIER
+
+DateAndTime ::=
+ OCTET STRING
+
+InternationalDisplayString ::=
+ OCTET STRING
+
+hrSystemUptime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 1 }
+
+hrSystemDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 2 }
+
+hrSystemInitialLoadDevice OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 3 }
+
+hrSystemInitialLoadParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSystem 4 }
+
+hrSystemNumUsers OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 5 }
+
+hrSystemProcesses OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 6 }
+
+hrSystemMaxProcesses OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSystem 7 }
+
+hrStorageTypes ::= { hrStorage 1 }
+
+hrStorageOther ::= { hrStorageTypes 1 }
+
+hrStorageRam ::= { hrStorageTypes 2 }
+
+hrStorageVirtualMemory ::= { hrStorageTypes 3 }
+
+hrStorageFixedDisk ::= { hrStorageTypes 4 }
+
+hrStorageRemovableDisk ::= { hrStorageTypes 5 }
+
+hrStorageFloppyDisk ::= { hrStorageTypes 6 }
+
+hrStorageCompactDisc ::= { hrStorageTypes 7 }
+
+hrStorageRamDisk ::= { hrStorageTypes 8 }
+
+hrMemorySize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorage 2 }
+
+hrStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrStorage 3 }
+
+hrStorageEntry OBJECT-TYPE
+ SYNTAX HrStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrStorageIndex }
+ ::= { hrStorageTable 1 }
+
+HrStorageEntry ::=
+ SEQUENCE {
+ hrStorageIndex
+ INTEGER,
+
+ hrStorageType
+ OBJECT IDENTIFIER,
+
+ hrStorageDescr
+ DisplayString,
+
+ hrStorageAllocationUnits
+ INTEGER,
+
+ hrStorageSize
+ INTEGER,
+
+ hrStorageUsed
+ INTEGER,
+
+ hrStorageAllocationFailures
+ Counter
+ }
+
+hrStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 1 }
+
+hrStorageType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 2 }
+
+hrStorageDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 3 }
+
+hrStorageAllocationUnits OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 4 }
+
+hrStorageSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrStorageEntry 5 }
+
+hrStorageUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 6 }
+
+hrStorageAllocationFailures OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrStorageEntry 7 }
+
+hrDeviceTypes ::= { hrDevice 1 }
+
+hrDeviceOther ::= { hrDeviceTypes 1 }
+
+hrDeviceUnknown ::= { hrDeviceTypes 2 }
+
+hrDeviceProcessor ::= { hrDeviceTypes 3 }
+
+hrDeviceNetwork ::= { hrDeviceTypes 4 }
+
+hrDevicePrinter ::= { hrDeviceTypes 5 }
+
+hrDeviceDiskStorage ::= { hrDeviceTypes 6 }
+
+hrDeviceVideo ::= { hrDeviceTypes 10 }
+
+hrDeviceAudio ::= { hrDeviceTypes 11 }
+
+hrDeviceCoprocessor ::= { hrDeviceTypes 12 }
+
+hrDeviceKeyboard ::= { hrDeviceTypes 13 }
+
+hrDeviceModem ::= { hrDeviceTypes 14 }
+
+hrDeviceParallelPort ::= { hrDeviceTypes 15 }
+
+hrDevicePointing ::= { hrDeviceTypes 16 }
+
+hrDeviceSerialPort ::= { hrDeviceTypes 17 }
+
+hrDeviceTape ::= { hrDeviceTypes 18 }
+
+hrDeviceClock ::= { hrDeviceTypes 19 }
+
+hrDeviceVolatileMemory ::= { hrDeviceTypes 20 }
+
+hrDeviceNonVolatileMemory ::= { hrDeviceTypes 21 }
+
+hrDeviceTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 2 }
+
+hrDeviceEntry OBJECT-TYPE
+ SYNTAX HrDeviceEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDeviceTable 1 }
+
+HrDeviceEntry ::=
+ SEQUENCE {
+ hrDeviceIndex
+ INTEGER,
+
+ hrDeviceType
+ OBJECT IDENTIFIER,
+
+ hrDeviceDescr
+ DisplayString,
+
+ hrDeviceID
+ ProductID,
+
+ hrDeviceStatus
+ INTEGER,
+
+ hrDeviceErrors
+ Counter
+ }
+
+hrDeviceIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 1 }
+
+hrDeviceType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 2 }
+
+hrDeviceDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 3 }
+
+hrDeviceID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 4 }
+
+hrDeviceStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ running(2),
+ warning(3),
+ testing(4),
+ down(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 5 }
+
+hrDeviceErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDeviceEntry 6 }
+
+hrProcessorTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 3 }
+
+hrProcessorEntry OBJECT-TYPE
+ SYNTAX HrProcessorEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrProcessorTable 1 }
+
+HrProcessorEntry ::=
+ SEQUENCE {
+ hrProcessorFrwID
+ ProductID,
+
+ hrProcessorLoad
+ INTEGER
+ }
+
+hrProcessorFrwID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 1 }
+
+hrProcessorLoad OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrProcessorEntry 2 }
+
+hrNetworkTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 4 }
+
+hrNetworkEntry OBJECT-TYPE
+ SYNTAX HrNetworkEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrNetworkTable 1 }
+
+HrNetworkEntry ::=
+ SEQUENCE {
+ hrNetworkIfIndex
+ INTEGER
+ }
+
+hrNetworkIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrNetworkEntry 1 }
+
+hrPrinterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 5 }
+
+hrPrinterEntry OBJECT-TYPE
+ SYNTAX HrPrinterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrPrinterTable 1 }
+
+HrPrinterEntry ::=
+ SEQUENCE {
+ hrPrinterStatus
+ INTEGER,
+
+ hrPrinterDetectedErrorState
+ OCTET STRING
+ }
+
+hrPrinterStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ idle(3),
+ printing(4),
+ warmup(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 1 }
+
+hrPrinterDetectedErrorState OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPrinterEntry 2 }
+
+hrDiskStorageTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 6 }
+
+hrDiskStorageEntry OBJECT-TYPE
+ SYNTAX HrDiskStorageEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex }
+ ::= { hrDiskStorageTable 1 }
+
+HrDiskStorageEntry ::=
+ SEQUENCE {
+ hrDiskStorageAccess
+ INTEGER,
+
+ hrDiskStorageMedia
+ INTEGER,
+
+ hrDiskStorageRemoveble
+ Boolean,
+
+ hrDiskStorageCapacity
+ KBytes
+ }
+
+hrDiskStorageAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 1 }
+
+hrDiskStorageMedia OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ unknown(2),
+ hardDisk(3),
+ floppyDisk(4),
+ opticalDiskROM(5),
+ opticalDiskWORM(6),
+ opticalDiskRW(7),
+ ramDisk(8)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 2 }
+
+hrDiskStorageRemoveble OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 3 }
+
+hrDiskStorageCapacity OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrDiskStorageEntry 4 }
+
+hrPartitionTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 7 }
+
+hrPartitionEntry OBJECT-TYPE
+ SYNTAX HrPartitionEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrDeviceIndex, hrPartitionIndex }
+ ::= { hrPartitionTable 1 }
+
+HrPartitionEntry ::=
+ SEQUENCE {
+ hrPartitionIndex
+ INTEGER,
+
+ hrPartitionLabel
+ InternationalDisplayString,
+
+ hrPartitionID
+ OCTET STRING,
+
+ hrPartitionSize
+ KBytes,
+
+ hrPartitionFSIndex
+ INTEGER
+ }
+
+hrPartitionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 1 }
+
+hrPartitionLabel OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 2 }
+
+hrPartitionID OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 3 }
+
+hrPartitionSize OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 4 }
+
+hrPartitionFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrPartitionEntry 5 }
+
+hrFSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrDevice 8 }
+
+hrFSEntry OBJECT-TYPE
+ SYNTAX HrFSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrFSIndex }
+ ::= { hrFSTable 1 }
+
+hrFSTypes ::= { hrDevice 9 }
+
+hrFSOther ::= { hrFSTypes 1 }
+
+hrFSUnknown ::= { hrFSTypes 2 }
+
+hrFSBerkeleyFFS ::= { hrFSTypes 3 }
+
+hrFSSys5FS ::= { hrFSTypes 4 }
+
+hrFSFat ::= { hrFSTypes 5 }
+
+hrFSHPFS ::= { hrFSTypes 6 }
+
+hrFSHFS ::= { hrFSTypes 7 }
+
+hrFSMFS ::= { hrFSTypes 8 }
+
+hrFSNTFS ::= { hrFSTypes 9 }
+
+hrFSVNode ::= { hrFSTypes 10 }
+
+hrFSJournaled ::= { hrFSTypes 11 }
+
+hrFSiso9660 ::= { hrFSTypes 12 }
+
+hrFSRockRidge ::= { hrFSTypes 13 }
+
+hrFSNFS ::= { hrFSTypes 14 }
+
+hrFSNetware ::= { hrFSTypes 15 }
+
+hrFSAFS ::= { hrFSTypes 16 }
+
+hrFSDFS ::= { hrFSTypes 17 }
+
+hrFSAppleshare ::= { hrFSTypes 18 }
+
+hrFSRFS ::= { hrFSTypes 19 }
+
+hrFSDGCFS ::= { hrFSTypes 20 }
+
+hrFSBFS ::= { hrFSTypes 21 }
+
+HrFSEntry ::=
+ SEQUENCE {
+ hrFSIndex
+ INTEGER,
+
+ hrFSMountPoint
+ InternationalDisplayString,
+
+ hrFSRemoteMountPoint
+ InternationalDisplayString,
+
+ hrFSType
+ OBJECT IDENTIFIER,
+
+ hrFSAccess
+ INTEGER,
+
+ hrFSBootable
+ Boolean,
+
+ hrFSStorageIndex
+ INTEGER,
+
+ hrFSLastFullBackupDate
+ DateAndTime,
+
+ hrFSLastPartialBackupDate
+ DateAndTime
+ }
+
+hrFSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 1 }
+
+hrFSMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 2 }
+
+hrFSRemoteMountPoint OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 3 }
+
+hrFSType OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 4 }
+
+hrFSAccess OBJECT-TYPE
+ SYNTAX INTEGER {
+ readWrite(1),
+ readOnly(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 5 }
+
+hrFSBootable OBJECT-TYPE
+ SYNTAX Boolean
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 6 }
+
+hrFSStorageIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrFSEntry 7 }
+
+hrFSLastFullBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 8 }
+
+hrFSLastPartialBackupDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrFSEntry 9 }
+
+hrSWOSIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRun 1 }
+
+hrSWRunTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRun 2 }
+
+hrSWRunEntry OBJECT-TYPE
+ SYNTAX HrSWRunEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunTable 1 }
+
+HrSWRunEntry ::=
+ SEQUENCE {
+ hrSWRunIndex
+ INTEGER,
+
+ hrSWRunName
+ InternationalDisplayString,
+
+ hrSWRunID
+ ProductID,
+
+ hrSWRunPath
+ InternationalDisplayString,
+
+ hrSWRunParameters
+ InternationalDisplayString,
+
+ hrSWRunType
+ INTEGER,
+
+ hrSWRunStatus
+ INTEGER
+ }
+
+hrSWRunIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 1 }
+
+hrSWRunName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 2 }
+
+hrSWRunID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 3 }
+
+hrSWRunPath OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 4 }
+
+hrSWRunParameters OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 5 }
+
+hrSWRunType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunEntry 6 }
+
+hrSWRunStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ running(1),
+ runnable(2),
+ notRunnable(3),
+ invalid(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hrSWRunEntry 7 }
+
+hrSWRunPerfTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWRunPerf 1 }
+
+hrSWRunPerfEntry OBJECT-TYPE
+ SYNTAX HrSWRunPerfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWRunIndex }
+ ::= { hrSWRunPerfTable 1 }
+
+HrSWRunPerfEntry ::=
+ SEQUENCE {
+ hrSWRunPerfCPU
+ INTEGER,
+
+ hrSWRunPerfMem
+ KBytes
+ }
+
+hrSWRunPerfCPU OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 1 }
+
+hrSWRunPerfMem OBJECT-TYPE
+ SYNTAX KBytes
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWRunPerfEntry 2 }
+
+hrSWInstalledLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 1 }
+
+hrSWInstalledLastUpdateTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalled 2 }
+
+hrSWInstalledTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hrSWInstalled 3 }
+
+hrSWInstalledEntry OBJECT-TYPE
+ SYNTAX HrSWInstalledEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hrSWInstalledIndex }
+ ::= { hrSWInstalledTable 1 }
+
+HrSWInstalledEntry ::=
+ SEQUENCE {
+ hrSWInstalledIndex
+ INTEGER,
+
+ hrSWInstalledName
+ InternationalDisplayString,
+
+ hrSWInstalledID
+ ProductID,
+
+ hrSWInstalledType
+ INTEGER,
+
+ hrSWInstalledDate
+ DateAndTime
+ }
+
+hrSWInstalledIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 1 }
+
+hrSWInstalledName OBJECT-TYPE
+ SYNTAX InternationalDisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 2 }
+
+hrSWInstalledID OBJECT-TYPE
+ SYNTAX ProductID
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 3 }
+
+hrSWInstalledType OBJECT-TYPE
+ SYNTAX INTEGER {
+ unknown(1),
+ operatingSystem(2),
+ deviceDriver(3),
+ application(4)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 4 }
+
+hrSWInstalledDate OBJECT-TYPE
+ SYNTAX DateAndTime
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hrSWInstalledEntry 5 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/IANAifType-MIB.txt b/release/picobsd/router/crunch1/mibs/IANAifType-MIB.txt
new file mode 100644
index 0000000..2f3a4ec
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/IANAifType-MIB.txt
@@ -0,0 +1,81 @@
+IANAifType-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ mib-2, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ianaifType MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IANA"
+ CONTACT-INFO
+ "Internet Assigned Numbers Authority
+
+ Postal: USC/Information Sciences Institute
+ 4676 Admiralty Way, Marina del Rey, CA 90292
+
+ Tel: +1 310 822 1511
+ E-Mail: iana@isi.edu"
+ ::= { mib-2 30 }
+
+IANAifType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ regular1822(2),
+ hdh1822(3),
+ ddnX25(4),
+ rfc877x25(5),
+ ethernetCsmacd(6),
+ iso88023Csmacd(7),
+ iso88024TokenBus(8),
+ iso88025TokenRing(9),
+ iso88026Man(10),
+ starLan(11),
+ proteon10Mbit(12),
+ proteon80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ ds1(18),
+ e1(19),
+ basicISDN(20),
+ primaryISDN(21),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ eon(25),
+ ethernet3Mbit(26),
+ nsip(27),
+ slip(28),
+ ultra(29),
+ ds3(30),
+ sip(31),
+ frameRelay(32),
+ rs232(33),
+ para(34),
+ arcnet(35),
+ arcnetPlus(36),
+ atm(37),
+ miox25(38),
+ sonet(39),
+ x25ple(40),
+ iso88022llc(41),
+ localTalk(42),
+ smdsDxi(43),
+ frameRelayService(44),
+ v35(45),
+ hssi(46),
+ hippi(47),
+ modem(48),
+ aal5(49),
+ sonetPath(50),
+ sonetVT(51),
+ smdsIcip(52),
+ propVirtual(53),
+ propMultiplexor(54)
+ }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/IF-MIB.txt b/release/picobsd/router/crunch1/mibs/IF-MIB.txt
new file mode 100644
index 0000000..af9aab5
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/IF-MIB.txt
@@ -0,0 +1,822 @@
+IF-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ IANAifType
+ FROM IANAifType-MIB
+ snmpTraps
+ FROM SNMPv2-MIB
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TestAndIncr, AutonomousType, RowStatus, TruthValue, PhysAddress, DisplayString,
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ NOTIFICATION-TYPE, mib-2, Counter64, TimeTicks, Integer32, Gauge32, Counter32,
+ OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+interfaces ::= { mib-2 2 }
+
+ifMIB MODULE-IDENTITY
+ LAST-UPDATED "9311082155Z"
+ ORGANIZATION "IETF Interfaces MIB Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road, Mountain View, CA 94043
+
+ Tel: +1 415 966 7934
+ E-Mail: kzm@hls.com
+
+ Frank Kastenholz
+
+ Postal: FTP Software
+ 2 High Street, North Andover, MA 01845
+
+ Tel: +1 508 685 4000
+ E-Mail: kasten@ftp.com"
+ ::= { mib-2 31 }
+
+ifMIBObjects ::= { ifMIB 1 }
+
+OwnerString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+InterfaceIndex ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "d"
+ STATUS current
+ SYNTAX Integer32
+
+ifNumber OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { interfaces 1 }
+
+ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { interfaces 2 }
+
+ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ InterfaceIndex,
+
+ ifDescr
+ DisplayString,
+
+ ifType
+ IANAifType,
+
+ ifMtu
+ Integer32,
+
+ ifSpeed
+ Gauge32,
+
+ ifPhysAddress
+ PhysAddress,
+
+ ifAdminStatus
+ INTEGER,
+
+ ifOperStatus
+ INTEGER,
+
+ ifLastChange
+ TimeTicks,
+
+ ifInOctets
+ Counter32,
+
+ ifInUcastPkts
+ Counter32,
+
+ ifInNUcastPkts
+ Counter32,
+
+ ifInDiscards
+ Counter32,
+
+ ifInErrors
+ Counter32,
+
+ ifInUnknownProtos
+ Counter32,
+
+ ifOutOctets
+ Counter32,
+
+ ifOutUcastPkts
+ Counter32,
+
+ ifOutNUcastPkts
+ Counter32,
+
+ ifOutDiscards
+ Counter32,
+
+ ifOutErrors
+ Counter32,
+
+ ifOutQLen
+ Gauge32,
+
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ifIndex OBJECT-TYPE
+ SYNTAX InterfaceIndex
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 1 }
+
+ifDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 2 }
+
+ifType OBJECT-TYPE
+ SYNTAX IANAifType
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 3 }
+
+ifMtu OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 4 }
+
+ifSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 5 }
+
+ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 6 }
+
+ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifEntry 7 }
+
+ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ up(1),
+ down(2),
+ testing(3),
+ unknown(4),
+ dormant(5)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 8 }
+
+ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 9 }
+
+ifInOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 10 }
+
+ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 11 }
+
+ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 12 }
+
+ifInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 13 }
+
+ifInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 14 }
+
+ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 15 }
+
+ifOutOctets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 16 }
+
+ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 17 }
+
+ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 18 }
+
+ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 19 }
+
+ifOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifEntry 20 }
+
+ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 21 }
+
+ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS deprecated
+ ::= { ifEntry 22 }
+
+ifXTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 1 }
+
+ifXEntry OBJECT-TYPE
+ SYNTAX IfXEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifXTable 1 }
+
+IfXEntry ::=
+ SEQUENCE {
+ ifName
+ DisplayString,
+
+ ifInMulticastPkts
+ Counter32,
+
+ ifInBroadcastPkts
+ Counter32,
+
+ ifOutMulticastPkts
+ Counter32,
+
+ ifOutBroadcastPkts
+ Counter32,
+
+ ifHCInOctets
+ Counter64,
+
+ ifHCInUcastPkts
+ Counter64,
+
+ ifHCInMulticastPkts
+ Counter64,
+
+ ifHCInBroadcastPkts
+ Counter64,
+
+ ifHCOutOctets
+ Counter64,
+
+ ifHCOutUcastPkts
+ Counter64,
+
+ ifHCOutMulticastPkts
+ Counter64,
+
+ ifHCOutBroadcastPkts
+ Counter64,
+
+ ifLinkUpDownTrapEnable
+ INTEGER,
+
+ ifHighSpeed
+ Gauge32,
+
+ ifPromiscuousMode
+ TruthValue,
+
+ ifConnectorPresent
+ TruthValue
+ }
+
+ifName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 1 }
+
+ifInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 2 }
+
+ifInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 3 }
+
+ifOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 4 }
+
+ifOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 5 }
+
+ifHCInOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 6 }
+
+ifHCInUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 7 }
+
+ifHCInMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 8 }
+
+ifHCInBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 9 }
+
+ifHCOutOctets OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 10 }
+
+ifHCOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 11 }
+
+ifHCOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 12 }
+
+ifHCOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 13 }
+
+ifLinkUpDownTrapEnable OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 14 }
+
+ifHighSpeed OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 15 }
+
+ifPromiscuousMode OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifXEntry 16 }
+
+ifConnectorPresent OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifXEntry 17 }
+
+ifStackTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 2 }
+
+ifStackEntry OBJECT-TYPE
+ SYNTAX IfStackEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifStackHigherLayer, ifStackLowerLayer }
+ ::= { ifStackTable 1 }
+
+IfStackEntry ::=
+ SEQUENCE {
+ ifStackHigherLayer
+ Integer32,
+
+ ifStackLowerLayer
+ Integer32,
+
+ ifStackStatus
+ RowStatus
+ }
+
+ifStackHigherLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 1 }
+
+ifStackLowerLayer OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifStackEntry 2 }
+
+ifStackStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifStackEntry 3 }
+
+ifTestTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 3 }
+
+ifTestEntry OBJECT-TYPE
+ SYNTAX IfTestEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ AUGMENTS { ifEntry }
+ ::= { ifTestTable 1 }
+
+IfTestEntry ::=
+ SEQUENCE {
+ ifTestId
+ TestAndIncr,
+
+ ifTestStatus
+ INTEGER,
+
+ ifTestType
+ AutonomousType,
+
+ ifTestResult
+ INTEGER,
+
+ ifTestCode
+ OBJECT IDENTIFIER,
+
+ ifTestOwner
+ OwnerString
+ }
+
+ifTestId OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 1 }
+
+ifTestStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ notInUse(1),
+ inUse(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 2 }
+
+ifTestType OBJECT-TYPE
+ SYNTAX AutonomousType
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 3 }
+
+ifTestResult OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ success(2),
+ inProgress(3),
+ notSupported(4),
+ unAbleToRun(5),
+ aborted(6),
+ failed(7)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 4 }
+
+ifTestCode OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ifTestEntry 5 }
+
+ifTestOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifTestEntry 6 }
+
+ifRcvAddressTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ifMIBObjects 4 }
+
+ifRcvAddressEntry OBJECT-TYPE
+ SYNTAX IfRcvAddressEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ifIndex, ifRcvAddressAddress }
+ ::= { ifRcvAddressTable 1 }
+
+IfRcvAddressEntry ::=
+ SEQUENCE {
+ ifRcvAddressAddress
+ PhysAddress,
+
+ ifRcvAddressStatus
+ RowStatus,
+
+ ifRcvAddressType
+ INTEGER
+ }
+
+ifRcvAddressAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ifRcvAddressEntry 1 }
+
+ifRcvAddressStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ifRcvAddressEntry 2 }
+
+ifRcvAddressType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { volatile }
+ ::= { ifRcvAddressEntry 3 }
+
+linkDown NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 3 }
+
+linkUp NOTIFICATION-TYPE
+ STATUS current
+ OBJECTS {
+ ifIndex,
+ ifAdminStatus,
+ ifOperStatus
+ }
+ ::= { snmpTraps 4 }
+
+ifConformance ::= { ifMIB 2 }
+
+ifGroups ::= { ifConformance 1 }
+
+ifCompliances ::= { ifConformance 2 }
+
+ifCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ifGeneralGroup, ifStackGroup }
+ GROUP ifFixedLengthGroup
+
+ GROUP ifHCFixedLengthGroup
+
+ GROUP ifPacketGroup
+
+ GROUP ifHCPacketGroup
+
+ GROUP ifTestGroup
+
+ GROUP ifRcvAddressGroup
+
+ OBJECT ifLinkUpDownTrapEnable
+ MIN-ACCESS read-only
+
+ OBJECT ifPromiscuousMode
+ MIN-ACCESS read-only
+
+ OBJECT ifStackStatus
+ SYNTAX INTEGER {
+ active(1)
+ }
+ MIN-ACCESS read-only
+
+ OBJECT ifAdminStatus
+ SYNTAX INTEGER {
+ up(1),
+ down(2)
+ }
+ MIN-ACCESS read-only
+ ::= { ifCompliances 1 }
+
+ifGeneralGroup OBJECT-GROUP
+ OBJECTS {
+ ifDescr,
+ ifType,
+ ifSpeed,
+ ifPhysAddress,
+ ifAdminStatus,
+ ifOperStatus,
+ ifLastChange,
+ ifLinkUpDownTrapEnable,
+ ifConnectorPresent,
+ ifHighSpeed,
+ ifName
+ }
+ STATUS current
+ ::= { ifGroups 1 }
+
+ifFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 2 }
+
+ifHCFixedLengthGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors
+ }
+ STATUS current
+ ::= { ifGroups 3 }
+
+ifPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 4 }
+
+ifHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 5 }
+
+ifVHCPacketGroup OBJECT-GROUP
+ OBJECTS {
+ ifHCInUcastPkts,
+ ifHCInMulticastPkts,
+ ifHCInBroadcastPkts,
+ ifHCOutUcastPkts,
+ ifHCOutMulticastPkts,
+ ifHCOutBroadcastPkts,
+ ifHCInOctets,
+ ifHCOutOctets,
+ ifInOctets,
+ ifOutOctets,
+ ifInUnknownProtos,
+ ifInErrors,
+ ifOutErrors,
+ ifMtu,
+ ifInUcastPkts,
+ ifInMulticastPkts,
+ ifInBroadcastPkts,
+ ifInDiscards,
+ ifOutUcastPkts,
+ ifOutMulticastPkts,
+ ifOutBroadcastPkts,
+ ifOutDiscards,
+ ifPromiscuousMode
+ }
+ STATUS current
+ ::= { ifGroups 6 }
+
+ifRcvAddressGroup OBJECT-GROUP
+ OBJECTS { ifRcvAddressStatus, ifRcvAddressType }
+ STATUS current
+ ::= { ifGroups 7 }
+
+ifTestGroup OBJECT-GROUP
+ OBJECTS {
+ ifTestId,
+ ifTestStatus,
+ ifTestType,
+ ifTestResult,
+ ifTestCode,
+ ifTestOwner
+ }
+ STATUS current
+ ::= { ifGroups 8 }
+
+ifStackGroup OBJECT-GROUP
+ OBJECTS { ifStackStatus }
+ STATUS current
+ ::= { ifGroups 9 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/IP-MIB.txt b/release/picobsd/router/crunch1/mibs/IP-MIB.txt
new file mode 100644
index 0000000..59118e7
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/IP-MIB.txt
@@ -0,0 +1,507 @@
+IP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ PhysAddress
+ FROM SNMPv2-TC
+ mib-2, IpAddress, Counter32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+ipMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 48 }
+
+ip ::= { mib-2 4 }
+
+ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ forwarding(1),
+ notForwarding(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 1 }
+
+ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { ip 2 }
+
+ipInReceives OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 3 }
+
+ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 4 }
+
+ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 5 }
+
+ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 6 }
+
+ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 7 }
+
+ipInDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 8 }
+
+ipInDelivers OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 9 }
+
+ipOutRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 10 }
+
+ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 11 }
+
+ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 12 }
+
+ipReasmTimeout OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 13 }
+
+ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 14 }
+
+ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 15 }
+
+ipReasmFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 16 }
+
+ipFragOKs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 17 }
+
+ipFragFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 18 }
+
+ipFragCreates OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 19 }
+
+ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 20 }
+
+ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+
+ ipAdEntIfIndex
+ INTEGER,
+
+ ipAdEntNetMask
+ IpAddress,
+
+ ipAdEntBcastAddr
+ INTEGER,
+
+ ipAdEntReasmMaxSize
+ INTEGER
+ }
+
+ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 1 }
+
+ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 2 }
+
+ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 3 }
+
+ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 4 }
+
+ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ipAddrEntry 5 }
+
+ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { ip 22 }
+
+ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { ipNetToMediaIfIndex, ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+
+ ipNetToMediaPhysAddress
+ PhysAddress,
+
+ ipNetToMediaNetAddress
+ IpAddress,
+
+ ipNetToMediaType
+ INTEGER
+ }
+
+ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 1 }
+
+ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 2 }
+
+ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 3 }
+
+ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ invalid(2),
+ dynamic(3),
+ static(4)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { ipNetToMediaEntry 4 }
+
+ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { ip 23 }
+
+icmp ::= { mib-2 5 }
+
+icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 1 }
+
+icmpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 2 }
+
+icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 3 }
+
+icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 4 }
+
+icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 5 }
+
+icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 6 }
+
+icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 7 }
+
+icmpInEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 8 }
+
+icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 9 }
+
+icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 10 }
+
+icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 11 }
+
+icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 12 }
+
+icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 13 }
+
+icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 14 }
+
+icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 15 }
+
+icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 16 }
+
+icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 17 }
+
+icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 18 }
+
+icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 19 }
+
+icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 20 }
+
+icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 21 }
+
+icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 22 }
+
+icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 23 }
+
+icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 24 }
+
+icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 25 }
+
+icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { icmp 26 }
+
+ipMIBConformance ::= { ipMIB 2 }
+
+ipMIBCompliances ::= { ipMIBConformance 1 }
+
+ipMIBGroups ::= { ipMIBConformance 2 }
+
+ipMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { ipGroup, icmpGroup }
+ ::= { ipMIBCompliances 1 }
+
+ipGroup OBJECT-GROUP
+ OBJECTS {
+ ipForwarding,
+ ipDefaultTTL,
+ ipInReceives,
+ ipInHdrErrors,
+ ipInAddrErrors,
+ ipForwDatagrams,
+ ipInUnknownProtos,
+ ipInDiscards,
+ ipInDelivers,
+ ipOutRequests,
+ ipOutDiscards,
+ ipOutNoRoutes,
+ ipReasmTimeout,
+ ipReasmReqds,
+ ipReasmOKs,
+ ipReasmFails,
+ ipFragOKs,
+ ipFragFails,
+ ipFragCreates,
+ ipAdEntAddr,
+ ipAdEntIfIndex,
+ ipAdEntNetMask,
+ ipAdEntBcastAddr,
+ ipAdEntReasmMaxSize,
+ ipNetToMediaIfIndex,
+ ipNetToMediaPhysAddress,
+ ipNetToMediaNetAddress,
+ ipNetToMediaType,
+ ipRoutingDiscards
+ }
+ STATUS current
+ ::= { ipMIBGroups 1 }
+
+icmpGroup OBJECT-GROUP
+ OBJECTS {
+ icmpInMsgs,
+ icmpInErrors,
+ icmpInDestUnreachs,
+ icmpInTimeExcds,
+ icmpInParmProbs,
+ icmpInSrcQuenchs,
+ icmpInRedirects,
+ icmpInEchos,
+ icmpInEchoReps,
+ icmpInTimestamps,
+ icmpInTimestampReps,
+ icmpInAddrMasks,
+ icmpInAddrMaskReps,
+ icmpOutMsgs,
+ icmpOutErrors,
+ icmpOutDestUnreachs,
+ icmpOutTimeExcds,
+ icmpOutParmProbs,
+ icmpOutSrcQuenchs,
+ icmpOutRedirects,
+ icmpOutEchos,
+ icmpOutEchoReps,
+ icmpOutTimestamps,
+ icmpOutTimestampReps,
+ icmpOutAddrMasks,
+ icmpOutAddrMaskReps
+ }
+ STATUS current
+ ::= { ipMIBGroups 2 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/RFC1155-SMI.txt b/release/picobsd/router/crunch1/mibs/RFC1155-SMI.txt
new file mode 100644
index 0000000..e59574e
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/RFC1155-SMI.txt
@@ -0,0 +1,9 @@
+RFC1155-SMI DEFINITIONS ::= BEGIN
+ nullOID OBJECT IDENTIFIER ::= { ccitt 0 }
+ internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
+ directory OBJECT IDENTIFIER ::= { internet 1 }
+ mgmt OBJECT IDENTIFIER ::= { internet 2 }
+ experimental OBJECT IDENTIFIER ::= { internet 3 }
+ private OBJECT IDENTIFIER ::= { internet 4 }
+ enterprises OBJECT IDENTIFIER ::= { private 1 }
+END
diff --git a/release/picobsd/router/crunch1/mibs/RFC1213-MIB.txt b/release/picobsd/router/crunch1/mibs/RFC1213-MIB.txt
new file mode 100644
index 0000000..1f1f253
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/RFC1213-MIB.txt
@@ -0,0 +1,1550 @@
+RFC1213-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ mgmt, NetworkAddress, IpAddress, Counter, Gauge,
+ TimeTicks
+ FROM RFC1155-SMI
+ OBJECT-TYPE
+ FROM RFC-1212;
+
+
+
+ mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
+
+
+ DisplayString ::=
+ OCTET STRING
+
+
+
+ PhysAddress ::=
+ OCTET STRING
+
+
+ system OBJECT IDENTIFIER ::= { mib-2 1 }
+
+ interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
+
+ at OBJECT IDENTIFIER ::= { mib-2 3 }
+
+ ip OBJECT IDENTIFIER ::= { mib-2 4 }
+
+ icmp OBJECT IDENTIFIER ::= { mib-2 5 }
+
+ tcp OBJECT IDENTIFIER ::= { mib-2 6 }
+
+ udp OBJECT IDENTIFIER ::= { mib-2 7 }
+
+ egp OBJECT IDENTIFIER ::= { mib-2 8 }
+
+
+ transmission OBJECT IDENTIFIER ::= { mib-2 10 }
+
+ snmp OBJECT IDENTIFIER ::= { mib-2 11 }
+
+
+
+ sysDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { system 1 }
+
+ sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 2 }
+
+ sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 3 }
+
+ sysContact OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 4 }
+
+ sysName OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 5 }
+
+ sysLocation OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { system 6 }
+
+ sysServices OBJECT-TYPE
+ SYNTAX INTEGER (0..127)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { system 7 }
+
+
+
+
+ ifNumber OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { interfaces 1 }
+
+
+
+ ifTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { interfaces 2 }
+
+ ifEntry OBJECT-TYPE
+ SYNTAX IfEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ifIndex }
+ ::= { ifTable 1 }
+
+ IfEntry ::=
+ SEQUENCE {
+ ifIndex
+ INTEGER,
+
+
+ ifDescr
+ DisplayString,
+ ifType
+ INTEGER,
+ ifMtu
+ INTEGER,
+ ifSpeed
+ Gauge,
+ ifPhysAddress
+ PhysAddress,
+ ifAdminStatus
+ INTEGER,
+ ifOperStatus
+ INTEGER,
+ ifLastChange
+ TimeTicks,
+ ifInOctets
+ Counter,
+ ifInUcastPkts
+ Counter,
+ ifInNUcastPkts
+ Counter,
+ ifInDiscards
+ Counter,
+ ifInErrors
+ Counter,
+ ifInUnknownProtos
+ Counter,
+ ifOutOctets
+ Counter,
+ ifOutUcastPkts
+ Counter,
+ ifOutNUcastPkts
+ Counter,
+ ifOutDiscards
+ Counter,
+ ifOutErrors
+ Counter,
+ ifOutQLen
+ Gauge,
+ ifSpecific
+ OBJECT IDENTIFIER
+ }
+
+ ifIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ifEntry 1 }
+
+ ifDescr OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 2 }
+
+ ifType OBJECT-TYPE
+ SYNTAX INTEGER {
+ regular1822(2),
+ hdh1822(3),
+ ddn-x25(4),
+ rfc877-x25(5),
+ ethernet-csmacd(6),
+ iso88023-csmacd(7),
+ iso88024-tokenBus(8),
+ iso88025-tokenRing(9),
+ iso88026-man(10),
+ starLan(11),
+ proteon-10Mbit(12),
+ proteon-80Mbit(13),
+ hyperchannel(14),
+ fddi(15),
+ lapb(16),
+ sdlc(17),
+ basicISDN(20),
+ propPointToPointSerial(22),
+ ppp(23),
+ softwareLoopback(24),
+ ethernet-3Mbit(26),
+
+
+ frame-relay(32)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 3 }
+
+ ifMtu OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 4 }
+
+ ifSpeed OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 5 }
+
+ ifPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 6 }
+
+ ifAdminStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ifEntry 7 }
+
+ ifOperStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ down(2),
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 8 }
+
+ ifLastChange OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 9 }
+
+ ifInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { ifEntry 10 }
+
+ ifInUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 11 }
+
+ ifInNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 12 }
+
+ ifInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 13 }
+
+ ifInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 14 }
+
+
+ ifInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 15 }
+
+ ifOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 16 }
+
+ ifOutUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 17 }
+
+ ifOutNUcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 18 }
+
+ ifOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 19 }
+
+ ifOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 20 }
+
+ ifOutQLen OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 21 }
+
+ ifSpecific OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ifEntry 22 }
+
+
+
+
+
+
+
+ atTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ ::= { at 1 }
+
+ atEntry OBJECT-TYPE
+ SYNTAX AtEntry
+ ACCESS not-accessible
+ STATUS deprecated
+ INDEX { atIfIndex,
+ atNetAddress }
+ ::= { atTable 1 }
+
+ AtEntry ::=
+ SEQUENCE {
+ atIfIndex
+ INTEGER,
+
+
+ atPhysAddress
+ PhysAddress,
+ atNetAddress
+ NetworkAddress
+ }
+
+ atIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 1 }
+
+ atPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS deprecated
+ ::= { atEntry 2 }
+
+ atNetAddress OBJECT-TYPE
+ SYNTAX NetworkAddress
+ ACCESS read-write
+ STATUS deprecated
+
+
+ ::= { atEntry 3 }
+
+
+
+ ipForwarding OBJECT-TYPE
+ SYNTAX INTEGER {
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 1 }
+
+ ipDefaultTTL OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ip 2 }
+
+ ipInReceives OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 3 }
+
+ ipInHdrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 4 }
+
+ ipInAddrErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 5 }
+
+ ipForwDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 6 }
+
+ ipInUnknownProtos OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 7 }
+
+ ipInDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 8 }
+
+ ipInDelivers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 9 }
+
+ ipOutRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 10 }
+
+ ipOutDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 11 }
+
+ ipOutNoRoutes OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 12 }
+
+ ipReasmTimeout OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 13 }
+
+ ipReasmReqds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 14 }
+
+ ipReasmOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { ip 15 }
+
+ ipReasmFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 16 }
+
+ ipFragOKs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 17 }
+
+ ipFragFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 18 }
+
+ ipFragCreates OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 19 }
+
+
+
+
+ ipAddrTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 20 }
+
+ ipAddrEntry OBJECT-TYPE
+ SYNTAX IpAddrEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipAdEntAddr }
+ ::= { ipAddrTable 1 }
+
+ IpAddrEntry ::=
+ SEQUENCE {
+ ipAdEntAddr
+ IpAddress,
+ ipAdEntIfIndex
+ INTEGER,
+ ipAdEntNetMask
+ IpAddress,
+ ipAdEntBcastAddr
+ INTEGER,
+ ipAdEntReasmMaxSize
+ INTEGER (0..65535)
+ }
+
+ ipAdEntAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 1 }
+
+
+ ipAdEntIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 2 }
+
+ ipAdEntNetMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 3 }
+
+ ipAdEntBcastAddr OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 4 }
+
+ ipAdEntReasmMaxSize OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipAddrEntry 5 }
+
+
+
+
+ ipRouteTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ip 21 }
+
+ ipRouteEntry OBJECT-TYPE
+ SYNTAX IpRouteEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipRouteDest }
+ ::= { ipRouteTable 1 }
+
+ IpRouteEntry ::=
+ SEQUENCE {
+ ipRouteDest
+ IpAddress,
+ ipRouteIfIndex
+ INTEGER,
+ ipRouteMetric1
+ INTEGER,
+ ipRouteMetric2
+ INTEGER,
+ ipRouteMetric3
+ INTEGER,
+ ipRouteMetric4
+ INTEGER,
+ ipRouteNextHop
+ IpAddress,
+ ipRouteType
+ INTEGER,
+ ipRouteProto
+ INTEGER,
+ ipRouteAge
+ INTEGER,
+ ipRouteMask
+ IpAddress,
+ ipRouteMetric5
+ INTEGER,
+
+
+ ipRouteInfo
+ OBJECT IDENTIFIER
+ }
+
+ ipRouteDest OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 1 }
+
+ ipRouteIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 2 }
+
+ ipRouteMetric1 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 3 }
+
+ ipRouteMetric2 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 4 }
+
+ ipRouteMetric3 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 5 }
+
+ ipRouteMetric4 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 6 }
+
+ ipRouteNextHop OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 7 }
+
+ ipRouteType OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 8 }
+
+ ipRouteProto OBJECT-TYPE
+ SYNTAX INTEGER {
+
+
+
+
+ egp(5),
+ ggp(6),
+
+
+ hello(7),
+ rip(8),
+ is-is(9),
+ es-is(10),
+ ciscoIgrp(11),
+ bbnSpfIgp(12),
+ ospf(13),
+ bgp(14)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 9 }
+
+ ipRouteAge OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 10 }
+
+ ipRouteMask OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 11 }
+
+ ipRouteMetric5 OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipRouteEntry 12 }
+
+ ipRouteInfo OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ipRouteEntry 13 }
+
+
+
+ ipNetToMediaTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+
+
+ ::= { ip 22 }
+
+ ipNetToMediaEntry OBJECT-TYPE
+ SYNTAX IpNetToMediaEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { ipNetToMediaIfIndex,
+ ipNetToMediaNetAddress }
+ ::= { ipNetToMediaTable 1 }
+
+ IpNetToMediaEntry ::=
+ SEQUENCE {
+ ipNetToMediaIfIndex
+ INTEGER,
+ ipNetToMediaPhysAddress
+ PhysAddress,
+ ipNetToMediaNetAddress
+ IpAddress,
+ ipNetToMediaType
+ INTEGER
+ }
+
+ ipNetToMediaIfIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 1 }
+
+ ipNetToMediaPhysAddress OBJECT-TYPE
+ SYNTAX PhysAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 2 }
+
+
+ ipNetToMediaNetAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 3 }
+
+ ipNetToMediaType OBJECT-TYPE
+ SYNTAX INTEGER {
+ dynamic(3),
+ static(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { ipNetToMediaEntry 4 }
+
+
+ ipRoutingDiscards OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { ip 23 }
+
+
+
+ icmpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 1 }
+
+ icmpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 2 }
+
+ icmpInDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 3 }
+
+ icmpInTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 4 }
+
+
+ icmpInParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 5 }
+
+ icmpInSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 6 }
+
+ icmpInRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 7 }
+
+ icmpInEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 8 }
+
+ icmpInEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 9 }
+
+ icmpInTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 10 }
+
+ icmpInTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 11 }
+
+ icmpInAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 12 }
+
+ icmpInAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 13 }
+
+ icmpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 14 }
+
+ icmpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 15 }
+
+ icmpOutDestUnreachs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 16 }
+
+ icmpOutTimeExcds OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 17 }
+
+ icmpOutParmProbs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 18 }
+
+ icmpOutSrcQuenchs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 19 }
+
+ icmpOutRedirects OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 20 }
+
+ icmpOutEchos OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 21 }
+
+ icmpOutEchoReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 22 }
+
+ icmpOutTimestamps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 23 }
+
+ icmpOutTimestampReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 24 }
+
+ icmpOutAddrMasks OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 25 }
+
+
+ icmpOutAddrMaskReps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { icmp 26 }
+
+
+
+
+ tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 1 }
+
+ tcpRtoMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 2 }
+
+ tcpRtoMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 3 }
+
+ tcpMaxConn OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 4 }
+
+ tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 5 }
+
+ tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 6 }
+
+
+ tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 7 }
+
+ tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 8 }
+
+ tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 9 }
+
+ tcpInSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 10 }
+
+ tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 11 }
+
+ tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 12 }
+
+
+
+ tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { tcp 13 }
+
+ tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort }
+ ::= { tcpConnTable 1 }
+
+
+ TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+ tcpConnLocalAddress
+ IpAddress,
+ tcpConnLocalPort
+ INTEGER (0..65535),
+ tcpConnRemAddress
+ IpAddress,
+ tcpConnRemPort
+ INTEGER (0..65535)
+ }
+
+ tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { tcpConnEntry 1 }
+
+ tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 2 }
+
+ tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 3 }
+
+ tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 4 }
+
+ tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcpConnEntry 5 }
+
+
+ tcpInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { tcp 14 }
+
+ tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { tcp 15 }
+
+
+
+ udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 1 }
+
+ udpNoPorts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 2 }
+
+ udpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 3 }
+
+
+ udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udp 4 }
+
+
+
+ udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { udp 5 }
+
+ udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+ UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+ udpLocalPort
+ INTEGER (0..65535)
+ }
+
+ udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 1 }
+
+ udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { udpEntry 2 }
+
+
+
+ egpInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 1 }
+
+ egpInErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 2 }
+
+ egpOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 3 }
+
+ egpOutErrors OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 4 }
+
+
+
+ egpNeighTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { egp 5 }
+
+ egpNeighEntry OBJECT-TYPE
+ SYNTAX EgpNeighEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { egpNeighAddr }
+ ::= { egpNeighTable 1 }
+
+ EgpNeighEntry ::=
+ SEQUENCE {
+ egpNeighState
+ INTEGER,
+ egpNeighAddr
+ IpAddress,
+ egpNeighAs
+ INTEGER,
+ egpNeighInMsgs
+ Counter,
+ egpNeighInErrs
+ Counter,
+ egpNeighOutMsgs
+ Counter,
+ egpNeighOutErrs
+ Counter,
+
+
+ egpNeighInErrMsgs
+ Counter,
+ egpNeighOutErrMsgs
+ Counter,
+ egpNeighStateUps
+ Counter,
+ egpNeighStateDowns
+ Counter,
+ egpNeighIntervalHello
+ INTEGER,
+ egpNeighIntervalPoll
+ INTEGER,
+ egpNeighMode
+ INTEGER,
+ egpNeighEventTrigger
+ INTEGER
+ }
+
+ egpNeighState OBJECT-TYPE
+ SYNTAX INTEGER {
+ idle(1),
+ acquisition(2),
+ down(3),
+ up(4),
+ cease(5)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 1 }
+
+ egpNeighAddr OBJECT-TYPE
+ SYNTAX IpAddress
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 2 }
+
+ egpNeighAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 3 }
+
+ egpNeighInMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 4 }
+
+ egpNeighInErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 5 }
+
+ egpNeighOutMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 6 }
+
+ egpNeighOutErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 7 }
+
+ egpNeighInErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { egpNeighEntry 8 }
+
+ egpNeighOutErrMsgs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 9 }
+
+ egpNeighStateUps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 10 }
+
+ egpNeighStateDowns OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 11 }
+
+ egpNeighIntervalHello OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 12 }
+
+ egpNeighIntervalPoll OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 13 }
+
+ egpNeighMode OBJECT-TYPE
+ SYNTAX INTEGER { active(1), passive(2) }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egpNeighEntry 14 }
+
+ egpNeighEventTrigger OBJECT-TYPE
+ SYNTAX INTEGER { start(1), stop(2) }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { egpNeighEntry 15 }
+
+
+ egpAs OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { egp 6 }
+
+
+
+
+
+
+
+
+ snmpInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 1 }
+
+ snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 2 }
+
+ snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 3 }
+
+ snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 4 }
+
+ snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 5 }
+
+ snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 6 }
+
+
+
+ snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 8 }
+
+ snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 9 }
+
+ snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 10 }
+
+ snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 11 }
+
+ snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 12 }
+
+ snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 13 }
+
+ snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 14 }
+
+ snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 15 }
+
+ snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter
+
+
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 16 }
+
+ snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 17 }
+
+ snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 18 }
+
+ snmpInTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 19 }
+
+ snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 20 }
+
+
+ snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 21 }
+
+ snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 22 }
+
+
+ snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 24 }
+
+ snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 25 }
+
+ snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { snmp 26 }
+
+ snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 27 }
+
+ snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 28 }
+
+ snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmp 29 }
+
+ snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER { enabled(1), disabled(2) }
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { snmp 30 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/RFC1271-MIB.txt b/release/picobsd/router/crunch1/mibs/RFC1271-MIB.txt
new file mode 100644
index 0000000..1c85945
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/RFC1271-MIB.txt
@@ -0,0 +1,1633 @@
+RFC1271-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ Counter FROM RFC1155-SMI
+ DisplayString FROM RFC1158-MIB
+ mib-2 FROM RFC1213-MIB
+ OBJECT-TYPE FROM RFC-1212;
+
+
+
+ rmon OBJECT IDENTIFIER ::= { mib-2 16 }
+
+
+ OwnerString ::= OCTET STRING
+
+
+
+ EntryStatus ::= INTEGER
+ { valid(1),
+ createRequest(2),
+ underCreation(3),
+ invalid(4)
+ }
+
+
+
+
+ statistics OBJECT IDENTIFIER ::= { rmon 1 }
+ history OBJECT IDENTIFIER ::= { rmon 2 }
+ alarm OBJECT IDENTIFIER ::= { rmon 3 }
+ hosts OBJECT IDENTIFIER ::= { rmon 4 }
+ hostTopN OBJECT IDENTIFIER ::= { rmon 5 }
+ matrix OBJECT IDENTIFIER ::= { rmon 6 }
+ filter OBJECT IDENTIFIER ::= { rmon 7 }
+ capture OBJECT IDENTIFIER ::= { rmon 8 }
+ event OBJECT IDENTIFIER ::= { rmon 9 }
+
+
+ etherStatsTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { statistics 1 }
+
+
+ etherStatsEntry OBJECT-TYPE
+ SYNTAX EtherStatsEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherStatsIndex }
+ ::= { etherStatsTable 1 }
+
+ EtherStatsEntry ::= SEQUENCE {
+ etherStatsIndex INTEGER (1..65535),
+ etherStatsDataSource OBJECT IDENTIFIER,
+ etherStatsDropEvents Counter,
+ etherStatsOctets Counter,
+ etherStatsPkts Counter,
+ etherStatsBroadcastPkts Counter,
+ etherStatsMulticastPkts Counter,
+ etherStatsCRCAlignErrors Counter,
+ etherStatsUndersizePkts Counter,
+ etherStatsOversizePkts Counter,
+ etherStatsFragments Counter,
+ etherStatsJabbers Counter,
+ etherStatsCollisions Counter,
+ etherStatsPkts64Octets Counter,
+ etherStatsPkts65to127Octets Counter,
+ etherStatsPkts128to255Octets Counter,
+ etherStatsPkts256to511Octets Counter,
+ etherStatsPkts512to1023Octets Counter,
+ etherStatsPkts1024to1518Octets Counter,
+ etherStatsOwner OwnerString,
+ etherStatsStatus INTEGER
+ }
+
+ etherStatsIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 1 }
+
+ etherStatsDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 2 }
+
+ etherStatsDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 3 }
+
+ etherStatsOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 4 }
+
+ etherStatsPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 5 }
+
+
+ etherStatsBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 6 }
+
+ etherStatsMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 7 }
+
+ etherStatsCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 8 }
+
+ etherStatsUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 9 }
+
+ etherStatsOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 10 }
+
+ etherStatsFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 11 }
+
+ etherStatsJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 12 }
+
+ etherStatsCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 13 }
+
+ etherStatsPkts64Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { etherStatsEntry 14 }
+
+ etherStatsPkts65to127Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 15 }
+
+ etherStatsPkts128to255Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 16 }
+
+ etherStatsPkts256to511Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 17 }
+
+ etherStatsPkts512to1023Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 18 }
+
+
+ etherStatsPkts1024to1518Octets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherStatsEntry 19 }
+
+ etherStatsOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 20 }
+
+ etherStatsStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { etherStatsEntry 21 }
+
+
+
+
+
+ historyControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 1 }
+
+ historyControlEntry OBJECT-TYPE
+ SYNTAX HistoryControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { historyControlIndex }
+ ::= { historyControlTable 1 }
+
+ HistoryControlEntry ::= SEQUENCE {
+ historyControlIndex INTEGER (1..65535),
+ historyControlDataSource OBJECT IDENTIFIER,
+ historyControlBucketsRequested INTEGER (1..65535),
+ historyControlBucketsGranted INTEGER (1..65535),
+ historyControlInterval INTEGER (1..3600),
+ historyControlOwner OwnerString,
+ historyControlStatus INTEGER
+ }
+
+ historyControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 1 }
+
+
+ historyControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 2 }
+
+ historyControlBucketsRequested OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 50 }
+ ::= { historyControlEntry 3 }
+
+ historyControlBucketsGranted OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { historyControlEntry 4 }
+
+ historyControlInterval OBJECT-TYPE
+ SYNTAX INTEGER (1..3600)
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 1800 }
+ ::= { historyControlEntry 5 }
+
+ historyControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 6 }
+
+ historyControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { historyControlEntry 7 }
+
+
+ etherHistoryTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EtherHistoryEntry
+
+
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { history 2 }
+
+ etherHistoryEntry OBJECT-TYPE
+ SYNTAX EtherHistoryEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { etherHistoryIndex , etherHistorySampleIndex }
+ ::= { etherHistoryTable 1 }
+
+ EtherHistoryEntry ::= SEQUENCE {
+ etherHistoryIndex INTEGER (1..65535),
+ etherHistorySampleIndex INTEGER,
+ etherHistoryIntervalStart TimeTicks,
+ etherHistoryDropEvents Counter,
+ etherHistoryOctets Counter,
+ etherHistoryPkts Counter,
+ etherHistoryBroadcastPkts Counter,
+ etherHistoryMulticastPkts Counter,
+ etherHistoryCRCAlignErrors Counter,
+ etherHistoryUndersizePkts Counter,
+ etherHistoryOversizePkts Counter,
+ etherHistoryFragments Counter,
+ etherHistoryJabbers Counter,
+ etherHistoryCollisions Counter,
+ etherHistoryUtilization INTEGER (0..10000)
+ }
+
+ etherHistoryIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 1 }
+
+
+ etherHistorySampleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 2 }
+
+ etherHistoryIntervalStart OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 3 }
+
+ etherHistoryDropEvents OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 4 }
+
+ etherHistoryOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 5 }
+
+ etherHistoryPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 6 }
+
+ etherHistoryBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 7 }
+
+ etherHistoryMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 8 }
+
+ etherHistoryCRCAlignErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 9 }
+
+
+ etherHistoryUndersizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 10 }
+
+ etherHistoryOversizePkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 11 }
+
+ etherHistoryFragments OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 12 }
+
+ etherHistoryJabbers OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 13 }
+
+
+ etherHistoryCollisions OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 14 }
+
+ etherHistoryUtilization OBJECT-TYPE
+ SYNTAX INTEGER (0..10000)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { etherHistoryEntry 15 }
+
+
+
+
+
+ alarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { alarm 1 }
+
+ alarmEntry OBJECT-TYPE
+ SYNTAX AlarmEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { alarmIndex }
+ ::= { alarmTable 1 }
+
+ AlarmEntry ::= SEQUENCE {
+ alarmIndex INTEGER (1..65535),
+ alarmInterval INTEGER,
+ alarmVariable OBJECT IDENTIFIER,
+ alarmSampleType INTEGER,
+ alarmValue INTEGER,
+ alarmStartupAlarm INTEGER,
+ alarmRisingThreshold INTEGER,
+ alarmFallingThreshold INTEGER,
+ alarmRisingEventIndex INTEGER (1..65535),
+ alarmFallingEventIndex INTEGER (1..65535),
+ alarmOwner OwnerString,
+ alarmStatus INTEGER
+ }
+
+ alarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 1 }
+
+
+ alarmInterval OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 2 }
+
+ alarmVariable OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 3 }
+
+
+ alarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 4 }
+
+ alarmValue OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { alarmEntry 5 }
+
+ alarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 6 }
+
+ alarmRisingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 7 }
+
+ alarmFallingThreshold OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 8 }
+
+ alarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 9 }
+
+ alarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+
+
+ ::= { alarmEntry 10 }
+
+ alarmOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 11 }
+
+ alarmStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { alarmEntry 12 }
+
+
+
+
+
+
+
+
+
+
+ hostControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 1 }
+
+
+ hostControlEntry OBJECT-TYPE
+ SYNTAX HostControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostControlIndex }
+ ::= { hostControlTable 1 }
+
+ HostControlEntry ::= SEQUENCE {
+ hostControlIndex INTEGER (1..65535),
+ hostControlDataSource OBJECT IDENTIFIER,
+ hostControlTableSize INTEGER,
+ hostControlLastDeleteTime TimeTicks,
+ hostControlOwner OwnerString,
+ hostControlStatus INTEGER
+ }
+
+ hostControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 1 }
+
+ hostControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 2 }
+
+ hostControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 3 }
+
+ hostControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostControlEntry 4 }
+
+ hostControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 5 }
+
+ hostControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostControlEntry 6 }
+
+
+ hostTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 2 }
+
+ hostEntry OBJECT-TYPE
+ SYNTAX HostEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostIndex, hostAddress }
+ ::= { hostTable 1 }
+
+ HostEntry ::= SEQUENCE {
+ hostAddress OCTET STRING,
+ hostCreationOrder INTEGER (1..65535),
+ hostIndex INTEGER (1..65535),
+ hostInPkts Counter,
+ hostOutPkts Counter,
+ hostInOctets Counter,
+ hostOutOctets Counter,
+ hostOutErrors Counter,
+ hostOutBroadcastPkts Counter,
+ hostOutMulticastPkts Counter
+ }
+
+ hostAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 1 }
+
+ hostCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 2 }
+
+ hostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 3 }
+
+ hostInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 4 }
+
+ hostOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { hostEntry 5 }
+
+ hostInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 6 }
+
+ hostOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 7 }
+
+ hostOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 8 }
+
+ hostOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 9 }
+
+ hostOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostEntry 10 }
+
+
+ hostTimeTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hosts 3 }
+
+ hostTimeEntry OBJECT-TYPE
+ SYNTAX HostTimeEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTimeIndex, hostTimeCreationOrder }
+ ::= { hostTimeTable 1 }
+
+ HostTimeEntry ::= SEQUENCE {
+ hostTimeAddress OCTET STRING,
+ hostTimeCreationOrder INTEGER (1..65535),
+ hostTimeIndex INTEGER (1..65535),
+ hostTimeInPkts Counter,
+ hostTimeOutPkts Counter,
+ hostTimeInOctets Counter,
+ hostTimeOutOctets Counter,
+ hostTimeOutErrors Counter,
+ hostTimeOutBroadcastPkts Counter,
+ hostTimeOutMulticastPkts Counter
+ }
+
+ hostTimeAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 1 }
+
+ hostTimeCreationOrder OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 2 }
+
+ hostTimeIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 3 }
+
+
+ hostTimeInPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 4 }
+
+ hostTimeOutPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 5 }
+
+ hostTimeInOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 6 }
+
+ hostTimeOutOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 7 }
+
+ hostTimeOutErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 8 }
+
+ hostTimeOutBroadcastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 9 }
+
+ hostTimeOutMulticastPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTimeEntry 10 }
+
+
+
+
+
+
+ hostTopNControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 1 }
+
+ hostTopNControlEntry OBJECT-TYPE
+ SYNTAX HostTopNControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNControlIndex }
+ ::= { hostTopNControlTable 1 }
+
+ HostTopNControlEntry ::= SEQUENCE {
+ hostTopNControlIndex INTEGER (1..65535),
+ hostTopNHostIndex INTEGER (1..65535),
+ hostTopNRateBase INTEGER,
+ hostTopNTimeRemaining INTEGER,
+ hostTopNDuration INTEGER,
+ hostTopNRequestedSize INTEGER,
+ hostTopNGrantedSize INTEGER,
+ hostTopNStartTime TimeTicks,
+ hostTopNOwner OwnerString,
+ hostTopNStatus INTEGER
+ }
+
+ hostTopNControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 1 }
+
+ hostTopNHostIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { hostTopNControlEntry 2 }
+
+ hostTopNRateBase OBJECT-TYPE
+ SYNTAX INTEGER {
+ hostTopNInPkts(1),
+ hostTopNOutPkts(2),
+ hostTopNInOctets(3),
+ hostTopNOutOctets(4),
+ hostTopNOutErrors(5),
+ hostTopNOutBroadcastPkts(6),
+ hostTopNOutMulticastPkts(7)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 3 }
+
+ hostTopNTimeRemaining OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 4 }
+
+ hostTopNDuration OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { hostTopNControlEntry 5 }
+
+ hostTopNRequestedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 10 }
+ ::= { hostTopNControlEntry 6 }
+
+
+ hostTopNGrantedSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 7 }
+
+ hostTopNStartTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNControlEntry 8 }
+
+ hostTopNOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 9 }
+
+ hostTopNStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { hostTopNControlEntry 10 }
+
+ hostTopNTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { hostTopN 2 }
+
+ hostTopNEntry OBJECT-TYPE
+ SYNTAX HostTopNEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { hostTopNReport, hostTopNIndex }
+ ::= { hostTopNTable 1 }
+
+ HostTopNEntry ::= SEQUENCE {
+ hostTopNReport INTEGER (1..65535),
+ hostTopNIndex INTEGER (1..65535),
+ hostTopNAddress OCTET STRING,
+ hostTopNRate INTEGER
+ }
+
+ hostTopNReport OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 1 }
+
+ hostTopNIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 2 }
+
+ hostTopNAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 3 }
+
+ hostTopNRate OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { hostTopNEntry 4 }
+
+
+
+ matrixControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixControlEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { matrix 1 }
+
+ matrixControlEntry OBJECT-TYPE
+ SYNTAX MatrixControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixControlIndex }
+ ::= { matrixControlTable 1 }
+
+ MatrixControlEntry ::= SEQUENCE {
+ matrixControlIndex INTEGER (1..65535),
+ matrixControlDataSource OBJECT IDENTIFIER,
+ matrixControlTableSize INTEGER,
+ matrixControlLastDeleteTime TimeTicks,
+ matrixControlOwner OwnerString,
+ matrixControlStatus INTEGER
+ }
+
+ matrixControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 1 }
+
+ matrixControlDataSource OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 2 }
+
+ matrixControlTableSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 3 }
+
+ matrixControlLastDeleteTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixControlEntry 4 }
+
+ matrixControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { matrixControlEntry 5 }
+
+ matrixControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { matrixControlEntry 6 }
+
+ matrixSDTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 2 }
+
+ matrixSDEntry OBJECT-TYPE
+ SYNTAX MatrixSDEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixSDIndex,
+ matrixSDSourceAddress, matrixSDDestAddress }
+ ::= { matrixSDTable 1 }
+
+ MatrixSDEntry ::= SEQUENCE {
+ matrixSDSourceAddress OCTET STRING,
+ matrixSDDestAddress OCTET STRING,
+ matrixSDIndex INTEGER (1..65535),
+ matrixSDPkts Counter,
+ matrixSDOctets Counter,
+ matrixSDErrors Counter
+ }
+
+ matrixSDSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 1 }
+
+
+ matrixSDDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 2 }
+
+ matrixSDIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 3 }
+
+ matrixSDPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 4 }
+
+ matrixSDOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixSDEntry 5 }
+
+ matrixSDErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixSDEntry 6 }
+
+
+ matrixDSTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { matrix 3 }
+
+ matrixDSEntry OBJECT-TYPE
+ SYNTAX MatrixDSEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { matrixDSIndex,
+ matrixDSDestAddress, matrixDSSourceAddress }
+ ::= { matrixDSTable 1 }
+
+ MatrixDSEntry ::= SEQUENCE {
+ matrixDSSourceAddress OCTET STRING,
+ matrixDSDestAddress OCTET STRING,
+ matrixDSIndex INTEGER (1..65535),
+ matrixDSPkts Counter,
+ matrixDSOctets Counter,
+ matrixDSErrors Counter
+ }
+
+ matrixDSSourceAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 1 }
+
+ matrixDSDestAddress OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+
+
+ ::= { matrixDSEntry 2 }
+
+ matrixDSIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 3 }
+
+ matrixDSPkts OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 4 }
+
+ matrixDSOctets OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 5 }
+
+ matrixDSErrors OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { matrixDSEntry 6 }
+
+
+
+
+
+ filterTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 1 }
+
+ filterEntry OBJECT-TYPE
+ SYNTAX FilterEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { filterIndex }
+ ::= { filterTable 1 }
+
+ FilterEntry ::= SEQUENCE {
+ filterIndex INTEGER (1..65535),
+ filterChannelIndex INTEGER (1..65535),
+ filterPktDataOffset INTEGER,
+ filterPktData OCTET STRING,
+ filterPktDataMask OCTET STRING,
+ filterPktDataNotMask OCTET STRING,
+ filterPktStatus INTEGER,
+ filterPktStatusMask INTEGER,
+ filterPktStatusNotMask INTEGER,
+ filterOwner OwnerString,
+ filterStatus INTEGER
+
+
+ }
+
+ filterIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { filterEntry 1 }
+
+ filterChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 2 }
+
+ filterPktDataOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { filterEntry 3 }
+
+ filterPktData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 4 }
+
+ filterPktDataMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 5 }
+
+ filterPktDataNotMask OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 6 }
+
+ filterPktStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 7 }
+
+ filterPktStatusMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+
+
+ STATUS mandatory
+ ::= { filterEntry 8 }
+
+ filterPktStatusNotMask OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 9 }
+
+ filterOwner OBJECT-TYPE
+ SYNTAX OwnerString
+
+
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 10 }
+
+ filterStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { filterEntry 11 }
+
+ channelTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { filter 2 }
+
+ channelEntry OBJECT-TYPE
+ SYNTAX ChannelEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { channelIndex }
+ ::= { channelTable 1 }
+
+ ChannelEntry ::= SEQUENCE {
+ channelIndex INTEGER (1..65535),
+ channelIfIndex INTEGER (1..65535),
+ channelAcceptType INTEGER,
+ channelDataControl INTEGER,
+ channelTurnOnEventIndex INTEGER (0..65535),
+ channelTurnOffEventIndex INTEGER (0..65535),
+ channelEventIndex INTEGER (0..65535),
+ channelEventStatus INTEGER,
+ channelMatches Counter,
+ channelDescription DisplayString (SIZE (0..127)),
+ channelOwner OwnerString,
+ channelStatus INTEGER
+ }
+
+
+ channelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 1 }
+
+ channelIfIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 2 }
+
+ channelAcceptType OBJECT-TYPE
+ SYNTAX INTEGER {
+ acceptMatched(1),
+ acceptFailed(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 3 }
+
+ channelDataControl OBJECT-TYPE
+ SYNTAX INTEGER {
+ on(1),
+ off(2)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { off }
+ ::= { channelEntry 4 }
+
+ channelTurnOnEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 5 }
+
+ channelTurnOffEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 6 }
+
+ channelEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 7 }
+
+ channelEventStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ eventReady(1),
+ eventFired(2),
+ eventAlwaysReady(3)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { eventReady }
+ ::= { channelEntry 8 }
+
+ channelMatches OBJECT-TYPE
+ SYNTAX Counter
+ ACCESS read-only
+ STATUS mandatory
+ ::= { channelEntry 9 }
+
+ channelDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 10 }
+
+ channelOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 11 }
+
+ channelStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { channelEntry 12 }
+
+
+
+ bufferControlTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { capture 1 }
+
+ bufferControlEntry OBJECT-TYPE
+ SYNTAX BufferControlEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { bufferControlIndex }
+ ::= { bufferControlTable 1 }
+
+ BufferControlEntry ::= SEQUENCE {
+ bufferControlIndex INTEGER (1..65535),
+ bufferControlChannelIndex INTEGER (1..65535),
+ bufferControlFullStatus INTEGER,
+ bufferControlFullAction INTEGER,
+ bufferControlCaptureSliceSize INTEGER,
+ bufferControlDownloadSliceSize INTEGER,
+ bufferControlDownloadOffset INTEGER,
+ bufferControlMaxOctetsRequested INTEGER,
+ bufferControlMaxOctetsGranted INTEGER,
+ bufferControlCapturedPackets INTEGER,
+
+
+ bufferControlTurnOnTime TimeTicks,
+ bufferControlOwner OwnerString,
+ bufferControlStatus INTEGER
+ }
+
+ bufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 1 }
+
+ bufferControlChannelIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 2 }
+
+ bufferControlFullStatus OBJECT-TYPE
+ SYNTAX INTEGER {
+ spaceAvailable(1),
+ full(2)
+ }
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 3 }
+
+ bufferControlFullAction OBJECT-TYPE
+ SYNTAX INTEGER {
+ lockWhenFull(1),
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 4 }
+
+ bufferControlCaptureSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 5 }
+
+
+ bufferControlDownloadSliceSize OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 100 }
+ ::= { bufferControlEntry 6 }
+
+ bufferControlDownloadOffset OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { 0 }
+ ::= { bufferControlEntry 7 }
+
+ bufferControlMaxOctetsRequested OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ DEFVAL { -1 }
+ ::= { bufferControlEntry 8 }
+
+ bufferControlMaxOctetsGranted OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 9 }
+
+ bufferControlCapturedPackets OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 10 }
+
+ bufferControlTurnOnTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { bufferControlEntry 11 }
+
+ bufferControlOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 12 }
+
+ bufferControlStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { bufferControlEntry 13 }
+
+ captureBufferTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF CaptureBufferEntry
+ ACCESS not-accessible
+
+
+ STATUS mandatory
+ ::= { capture 2 }
+
+ captureBufferEntry OBJECT-TYPE
+ SYNTAX CaptureBufferEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { captureBufferControlIndex, captureBufferIndex }
+ ::= { captureBufferTable 1 }
+
+ CaptureBufferEntry ::= SEQUENCE {
+ captureBufferControlIndex INTEGER (1..65535),
+ captureBufferIndex INTEGER,
+ captureBufferPacketID INTEGER,
+ captureBufferPacketData OCTET STRING,
+ captureBufferPacketLength INTEGER,
+ captureBufferPacketTime INTEGER,
+ captureBufferPacketStatus INTEGER
+ }
+
+ captureBufferControlIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 1 }
+
+ captureBufferIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 2 }
+
+ captureBufferPacketID OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+
+
+ STATUS mandatory
+ ::= { captureBufferEntry 3 }
+
+ captureBufferPacketData OBJECT-TYPE
+ SYNTAX OCTET STRING
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 4 }
+
+ captureBufferPacketLength OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 5 }
+
+ captureBufferPacketTime OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 6 }
+
+
+ captureBufferPacketStatus OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { captureBufferEntry 7 }
+
+
+
+
+
+ eventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 1 }
+
+ eventEntry OBJECT-TYPE
+ SYNTAX EventEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { eventIndex }
+ ::= { eventTable 1 }
+
+ EventEntry ::= SEQUENCE {
+ eventIndex INTEGER (1..65535),
+ eventDescription DisplayString (SIZE (0..127)),
+ eventType INTEGER,
+ eventCommunity OCTET STRING (SIZE (0..127)),
+ eventLastTimeSent TimeTicks,
+ eventOwner OwnerString,
+ eventStatus INTEGER
+ }
+
+ eventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 1 }
+
+ eventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 2 }
+
+ eventType OBJECT-TYPE
+ SYNTAX INTEGER {
+ none(1),
+ log(2),
+ log-and-trap(4)
+ }
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 3 }
+
+ eventCommunity OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..127))
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 4 }
+
+ eventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { eventEntry 5 }
+
+ eventOwner OBJECT-TYPE
+ SYNTAX OwnerString
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 6 }
+
+ eventStatus OBJECT-TYPE
+ SYNTAX EntryStatus
+ ACCESS read-write
+ STATUS mandatory
+ ::= { eventEntry 7 }
+
+ logTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { event 2 }
+
+ logEntry OBJECT-TYPE
+ SYNTAX LogEntry
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { logEventIndex, logIndex }
+
+
+ ::= { logTable 1 }
+
+ LogEntry ::= SEQUENCE {
+ logEventIndex INTEGER (1..65535),
+ logIndex INTEGER,
+ logTime TimeTicks,
+ logDescription DisplayString (SIZE (0..255))
+ }
+
+ logEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 1 }
+
+ logIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 2 }
+
+ logTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 3 }
+
+
+ logDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { logEntry 4 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-CONF.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-CONF.txt
new file mode 100644
index 0000000..7533685
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-CONF.txt
@@ -0,0 +1,7 @@
+SNMPv2-CONF DEFINITIONS ::= BEGIN
+
+IMPORTS iso FROM SNMPv2-SMI;
+
+dummy ::= { iso 999 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-M2M-MIB.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-M2M-MIB.txt
new file mode 100644
index 0000000..3ec4719
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-M2M-MIB.txt
@@ -0,0 +1,371 @@
+SNMPv2-M2M-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
+ Integer32, Counter32, snmpModules
+ FROM SNMPv2-SMI
+ DisplayString, InstancePointer, RowStatus, TimeStamp
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF
+ contextIdentity
+ FROM SNMPv2-PARTY-MIB;
+
+ snmpM2M MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ " Steven Waldbusser
+
+ Postal: Carnegie Mellon University
+ 4910 Forbes Ave
+ Pittsburgh, PA 15213
+
+ Tel: +1 412 268 6628
+ Fax: +1 412 268 4987
+
+ E-mail: waldbusser@cmu.edu"
+ ::= { snmpModules 2 }
+
+ snmpM2MObjects OBJECT IDENTIFIER ::= { snmpM2M 1 }
+
+
+
+ snmpAlarm OBJECT IDENTIFIER ::= { snmpM2MObjects 1 }
+
+
+
+ snmpAlarmNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarm 1 }
+
+ snmpAlarmTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarm 2 }
+
+ snmpAlarmEntry OBJECT-TYPE
+ SYNTAX SnmpAlarmEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { contextIdentity, snmpAlarmIndex }
+ ::= { snmpAlarmTable 1 }
+
+
+ SnmpAlarmEntry ::= SEQUENCE {
+ snmpAlarmIndex INTEGER,
+ snmpAlarmVariable InstancePointer,
+ snmpAlarmInterval Integer32,
+ snmpAlarmSampleType INTEGER,
+ snmpAlarmValue Integer32,
+ snmpAlarmStartupAlarm INTEGER,
+ snmpAlarmRisingThreshold Integer32,
+ snmpAlarmFallingThreshold Integer32,
+ snmpAlarmRisingEventIndex INTEGER,
+ snmpAlarmFallingEventIndex INTEGER,
+ snmpAlarmUnavailableEventIndex INTEGER,
+ snmpAlarmStatus RowStatus
+ }
+
+ snmpAlarmIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAlarmEntry 1 }
+
+
+ snmpAlarmVariable OBJECT-TYPE
+ SYNTAX InstancePointer
+ MAX-ACCESS read-create
+ STATUS current
+
+
+ ::= { snmpAlarmEntry 2 }
+
+ snmpAlarmInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 3 }
+
+
+ snmpAlarmSampleType OBJECT-TYPE
+ SYNTAX INTEGER {
+ absoluteValue(1),
+ deltaValue(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { deltaValue }
+ ::= { snmpAlarmEntry 4 }
+
+
+ snmpAlarmValue OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpAlarmEntry 5 }
+
+
+ snmpAlarmStartupAlarm OBJECT-TYPE
+ SYNTAX INTEGER {
+ risingAlarm(1),
+ fallingAlarm(2),
+ risingOrFallingAlarm(3)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { risingOrFallingAlarm }
+ ::= { snmpAlarmEntry 6 }
+
+
+ snmpAlarmRisingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 7 }
+
+
+ snmpAlarmFallingThreshold OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 8 }
+
+
+ snmpAlarmRisingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 9 }
+
+
+ snmpAlarmFallingEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 10 }
+
+ snmpAlarmUnavailableEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 11 }
+
+
+ snmpAlarmStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpAlarmEntry 12 }
+
+
+
+ snmpAlarmNotifications
+ OBJECT IDENTIFIER ::= { snmpAlarm 3 }
+
+ snmpRisingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmRisingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 1 }
+
+ snmpFallingAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable, snmpAlarmSampleType,
+ snmpAlarmValue, snmpAlarmFallingThreshold }
+ STATUS current
+ ::= { snmpAlarmNotifications 2 }
+
+ snmpObjectUnavailableAlarm NOTIFICATION-TYPE
+ OBJECTS { snmpAlarmVariable }
+ STATUS current
+ ::= { snmpAlarmNotifications 3 }
+
+
+
+ snmpEvent OBJECT IDENTIFIER ::= { snmpM2MObjects 2 }
+
+
+ snmpEventNextIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 1 }
+
+
+ snmpEventTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 2 }
+
+ snmpEventEntry OBJECT-TYPE
+ SYNTAX SnmpEventEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex }
+ ::= { snmpEventTable 1 }
+
+ SnmpEventEntry ::= SEQUENCE {
+ snmpEventIndex INTEGER,
+ snmpEventID OBJECT IDENTIFIER,
+ snmpEventDescription DisplayString,
+ snmpEventEvents Counter32,
+ snmpEventLastTimeSent TimeStamp,
+ snmpEventStatus RowStatus
+ }
+
+ snmpEventIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEventEntry 1 }
+
+
+ snmpEventID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 2 }
+
+ snmpEventDescription OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..127))
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 3 }
+
+ snmpEventEvents OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEventEntry 4 }
+
+
+ snmpEventLastTimeSent OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ DEFVAL { 0 }
+ ::= { snmpEventEntry 5 }
+
+ snmpEventStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventEntry 6 }
+
+
+ snmpEventNotifyMinInterval OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 3 }
+
+ snmpEventNotifyMaxRetransmissions OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmpEvent 4 }
+
+
+
+
+ snmpEventNotifyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpEvent 5 }
+
+ snmpEventNotifyEntry OBJECT-TYPE
+ SYNTAX SnmpEventNotifyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { snmpEventIndex, contextIdentity }
+ ::= { snmpEventNotifyTable 1 }
+
+ SnmpEventNotifyEntry ::= SEQUENCE {
+ snmpEventNotifyIntervalRequested Integer32,
+ snmpEventNotifyRetransmissionsRequested Integer32,
+ snmpEventNotifyLifetime Integer32,
+ snmpEventNotifyStatus RowStatus
+ }
+
+
+ snmpEventNotifyIntervalRequested OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 30 }
+ ::= { snmpEventNotifyEntry 1 }
+
+ snmpEventNotifyRetransmissionsRequested OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 5 }
+ ::= { snmpEventNotifyEntry 2 }
+
+
+ snmpEventNotifyLifetime OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 86400 }
+ ::= { snmpEventNotifyEntry 3 }
+
+ snmpEventNotifyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { snmpEventNotifyEntry 4 }
+
+
+
+ snmpM2MConformance
+ OBJECT IDENTIFIER ::= { snmpM2M 2 }
+
+ snmpM2MCompliances
+ OBJECT IDENTIFIER ::= { snmpM2MConformance 1 }
+ snmpM2MGroups OBJECT IDENTIFIER ::= { snmpM2MConformance 2 }
+
+
+ snmpM2MCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { snmpAlarmGroup, snmpEventGroup }
+ ::= { snmpM2MCompliances 1 }
+
+
+ snmpAlarmGroup OBJECT-GROUP
+ OBJECTS { snmpAlarmNextIndex,
+ snmpAlarmVariable, snmpAlarmInterval,
+ snmpAlarmSampleType, snmpAlarmValue,
+ snmpAlarmStartupAlarm, snmpAlarmRisingThreshold,
+ snmpAlarmFallingThreshold,
+ snmpAlarmRisingEventIndex,
+ snmpAlarmFallingEventIndex,
+ snmpAlarmUnavailableEventIndex,
+ snmpAlarmStatus }
+ STATUS current
+ ::= { snmpM2MGroups 1 }
+
+
+ snmpEventGroup OBJECT-GROUP
+ OBJECTS { snmpEventNextIndex,
+ snmpEventID, snmpEventDescription,
+ snmpEventEvents, snmpEventLastTimeSent,
+ snmpEventStatus, snmpEventNotifyMinInterval,
+ snmpEventNotifyMaxRetransmissions,
+ snmpEventNotifyIntervalRequested,
+ snmpEventNotifyRetransmissionsRequested,
+ snmpEventNotifyLifetime, snmpEventNotifyStatus }
+ STATUS current
+ ::= { snmpM2MGroups 2 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-MIB.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-MIB.txt
new file mode 100644
index 0000000..303ff9a
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-MIB.txt
@@ -0,0 +1,440 @@
+SNMPv2-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ NOTIFICATION-GROUP, OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ TimeStamp, TestAndIncr, DisplayString
+ FROM SNMPv2-TC
+ mib-2, snmpModules, Counter32, TimeTicks, NOTIFICATION-TYPE, OBJECT-TYPE,
+ MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpMIB MODULE-IDENTITY
+ LAST-UPDATED "9511090000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Marshall T. Rose
+
+ Postal: Dover Beach Consulting, Inc.
+ 420 Whisman Court
+ Mountain View, CA 94043-2186
+ US
+
+ Tel: +1 415 968 1052
+
+ E-mail: mrose@dbc.mtview.ca.us"
+ REVISION "9304010000Z"
+ ::= { snmpModules 1 }
+
+snmpMIBObjects ::= { snmpMIB 1 }
+
+system ::= { mib-2 1 }
+
+sysDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 1 }
+
+sysObjectID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 2 }
+
+sysUpTime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 3 }
+
+sysContact OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 4 }
+
+sysName OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 5 }
+
+sysLocation OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { system 6 }
+
+sysServices OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 7 }
+
+sysORLastChange OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { system 8 }
+
+sysORTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { system 9 }
+
+sysOREntry OBJECT-TYPE
+ SYNTAX SysOREntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { sysORIndex }
+ ::= { sysORTable 1 }
+
+SysOREntry ::=
+ SEQUENCE {
+ sysORIndex
+ INTEGER,
+
+ sysORID
+ OBJECT IDENTIFIER,
+
+ sysORDescr
+ DisplayString,
+
+ sysORUpTime
+ TimeStamp
+ }
+
+sysORIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { sysOREntry 1 }
+
+sysORID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 2 }
+
+sysORDescr OBJECT-TYPE
+ SYNTAX DisplayString
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 3 }
+
+sysORUpTime OBJECT-TYPE
+ SYNTAX TimeStamp
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { sysOREntry 4 }
+
+snmp ::= { mib-2 11 }
+
+snmpInPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 1 }
+
+snmpInBadVersions OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 3 }
+
+snmpInBadCommunityNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 4 }
+
+snmpInBadCommunityUses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 5 }
+
+snmpInASNParseErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 6 }
+
+snmpEnableAuthenTraps OBJECT-TYPE
+ SYNTAX INTEGER {
+ enabled(1),
+ disabled(2)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmp 30 }
+
+snmpSilentDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 31 }
+
+snmpProxyDrops OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { snmp 32 }
+
+snmpTrap ::= { snmpMIBObjects 4 }
+
+snmpTrapOID OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 1 }
+
+snmpTrapEnterprise OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS accessible-for-notify
+ STATUS current
+ ::= { snmpTrap 3 }
+
+snmpTraps ::= { snmpMIBObjects 5 }
+
+coldStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 1 }
+
+warmStart NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 2 }
+
+authenticationFailure NOTIFICATION-TYPE
+ STATUS current
+ ::= { snmpTraps 5 }
+
+snmpSet ::= { snmpMIBObjects 6 }
+
+snmpSetSerialNo OBJECT-TYPE
+ SYNTAX TestAndIncr
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { snmpSet 1 }
+
+snmpMIBConformance ::= { snmpMIB 2 }
+
+snmpMIBCompliances ::= { snmpMIBConformance 1 }
+
+snmpMIBGroups ::= { snmpMIBConformance 2 }
+
+snmpBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS {
+ snmpGroup,
+ snmpSetGroup,
+ systemGroup,
+ snmpBasicNotificationsGroup
+ }
+ GROUP snmpCommunityGroup
+ ::= { snmpMIBCompliances 2 }
+
+snmpGroup OBJECT-GROUP
+ OBJECTS {
+ snmpInPkts,
+ snmpInBadVersions,
+ snmpInASNParseErrs,
+ snmpSilentDrops,
+ snmpProxyDrops,
+ snmpEnableAuthenTraps
+ }
+ STATUS current
+ ::= { snmpMIBGroups 8 }
+
+snmpCommunityGroup OBJECT-GROUP
+ OBJECTS { snmpInBadCommunityNames, snmpInBadCommunityUses }
+ STATUS current
+ ::= { snmpMIBGroups 9 }
+
+snmpSetGroup OBJECT-GROUP
+ OBJECTS { snmpSetSerialNo }
+ STATUS current
+ ::= { snmpMIBGroups 5 }
+
+systemGroup OBJECT-GROUP
+ OBJECTS {
+ sysDescr,
+ sysObjectID,
+ sysUpTime,
+ sysContact,
+ sysName,
+ sysLocation,
+ sysServices,
+ sysORLastChange,
+ sysORID,
+ sysORUpTime,
+ sysORDescr
+ }
+ STATUS current
+ ::= { snmpMIBGroups 6 }
+
+
+snmpOutPkts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 2 }
+
+snmpInTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 8 }
+
+snmpInNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 9 }
+
+snmpInBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 10 }
+
+snmpInReadOnlys OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 11 }
+
+snmpInGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 12 }
+
+snmpInTotalReqVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 13 }
+
+snmpInTotalSetVars OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 14 }
+
+snmpInGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 15 }
+
+snmpInGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 16 }
+
+snmpInSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 17 }
+
+snmpInGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 18 }
+
+snmpInTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 19 }
+
+snmpOutTooBigs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 20 }
+
+snmpOutNoSuchNames OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 21 }
+
+snmpOutBadValues OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 22 }
+
+snmpOutGenErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 24 }
+
+snmpOutGetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 25 }
+
+snmpOutGetNexts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 26 }
+
+snmpOutSetRequests OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 27 }
+
+snmpOutGetResponses OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 28 }
+
+snmpOutTraps OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS obsolete
+ ::= { snmp 29 }
+
+snmpObsoleteGroup OBJECT-GROUP
+ OBJECTS {
+ snmpOutPkts,
+ snmpInTooBigs,
+ snmpInNoSuchNames,
+ snmpInBadValues,
+ snmpInReadOnlys,
+ snmpInGenErrs,
+ snmpInTotalReqVars,
+ snmpInTotalSetVars,
+ snmpInGetRequests,
+ snmpInGetNexts,
+ snmpInSetRequests,
+ snmpInGetResponses,
+ snmpInTraps,
+ snmpOutTooBigs,
+ snmpOutNoSuchNames,
+ snmpOutBadValues,
+ snmpOutGenErrs,
+ snmpOutGetRequests,
+ snmpOutGetNexts,
+ snmpOutSetRequests,
+ snmpOutGetResponses,
+ snmpOutTraps
+ }
+ STATUS obsolete
+ ::= { snmpMIBGroups 10 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-PARTY-MIB.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-PARTY-MIB.txt
new file mode 100644
index 0000000..89ef486
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-PARTY-MIB.txt
@@ -0,0 +1,586 @@
+SNMPv2-PARTY-MIB DEFINITIONS ::= BEGIN
+
+ IMPORTS
+ MODULE-IDENTITY, OBJECT-TYPE, snmpModules,
+ UInteger32
+ FROM SNMPv2-SMI
+ TEXTUAL-CONVENTION, RowStatus, TruthValue
+ FROM SNMPv2-TC
+ MODULE-COMPLIANCE, OBJECT-GROUP
+ FROM SNMPv2-CONF;
+
+ partyMIB MODULE-IDENTITY
+ LAST-UPDATED "9304010000Z"
+ ORGANIZATION "IETF SNMP Security Working Group"
+ CONTACT-INFO
+ " Keith McCloghrie
+
+ Postal: Hughes LAN Systems
+ 1225 Charleston Road
+ Mountain View, CA 94043
+ US
+
+ Tel: +1 415 966 7934
+ Fax: +1 415 960 3738
+
+ E-mail: kzm@hls.com"
+ ::= { snmpModules 3 }
+
+
+
+ Party ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+ TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+
+ Clock ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX UInteger32
+
+ Context ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+
+ StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ }
+
+
+
+ partyAdmin OBJECT IDENTIFIER ::= { partyMIB 1 }
+
+
+ partyProtocols OBJECT IDENTIFIER ::= { partyAdmin 1 }
+
+ noAuth OBJECT IDENTIFIER ::= { partyProtocols 1 }
+
+ noPriv OBJECT IDENTIFIER ::= { partyProtocols 2 }
+
+ desPrivProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 3 }
+
+ v2md5AuthProtocol
+ OBJECT IDENTIFIER ::= { partyProtocols 4 }
+
+
+ temporalDomains
+ OBJECT IDENTIFIER ::= { partyAdmin 2 }
+
+ currentTime OBJECT IDENTIFIER ::= { temporalDomains 1 }
+
+ restartTime OBJECT IDENTIFIER ::= { temporalDomains 2 }
+
+ cacheTime OBJECT IDENTIFIER ::= { temporalDomains 3 }
+
+
+
+
+ initialPartyId OBJECT IDENTIFIER ::= { partyAdmin 3 }
+
+ initialContextId
+ OBJECT IDENTIFIER ::= { partyAdmin 4 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ partyMIBObjects
+ OBJECT IDENTIFIER ::= { partyMIB 2 }
+
+
+ snmpParties OBJECT IDENTIFIER ::= { partyMIBObjects 1 }
+
+ partyTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpParties 1 }
+
+ partyEntry OBJECT-TYPE
+ SYNTAX PartyEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED partyIdentity }
+ ::= { partyTable 1 }
+
+
+ PartyEntry ::=
+ SEQUENCE {
+ partyIdentity Party,
+ partyIndex INTEGER,
+ partyTDomain OBJECT IDENTIFIER,
+ partyTAddress TAddress,
+ partyMaxMessageSize INTEGER,
+ partyLocal TruthValue,
+ partyAuthProtocol OBJECT IDENTIFIER,
+ partyAuthClock Clock,
+ partyAuthPrivate OCTET STRING,
+ partyAuthPublic OCTET STRING,
+ partyAuthLifetime INTEGER,
+ partyPrivProtocol OBJECT IDENTIFIER,
+ partyPrivPrivate OCTET STRING,
+ partyPrivPublic OCTET STRING,
+ partyCloneFrom Party,
+ partyStorageType StorageType,
+ partyStatus RowStatus
+ }
+
+ partyIdentity OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { partyEntry 1 }
+
+ partyIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { partyEntry 2 }
+
+
+ partyTDomain OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { snmpUDPDomain }
+ ::= { partyEntry 3 }
+
+ partyTAddress OBJECT-TYPE
+ SYNTAX TAddress
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { '000000000000'H }
+ ::= { partyEntry 4 }
+
+ partyMaxMessageSize OBJECT-TYPE
+ SYNTAX INTEGER (484..65507)
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 484 }
+ ::= { partyEntry 5 }
+
+
+ partyLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { false }
+ ::= { partyEntry 6 }
+
+ partyAuthProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { v2md5AuthProtocol }
+ ::= { partyEntry 7 }
+
+
+ partyAuthClock OBJECT-TYPE
+ SYNTAX Clock
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 0 }
+ ::= { partyEntry 8 }
+
+
+ partyAuthPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 9 }
+
+
+ partyAuthPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 10 }
+
+
+ partyAuthLifetime OBJECT-TYPE
+ SYNTAX INTEGER (0..2147483647)
+ UNITS "seconds"
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { 300 }
+ ::= { partyEntry 11 }
+
+ partyPrivProtocol OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { noPriv }
+ ::= { partyEntry 12 }
+
+
+ partyPrivPrivate OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 13 }
+
+
+ partyPrivPublic OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 14 }
+
+
+ partyCloneFrom OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 15 }
+
+
+ partyStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { partyEntry 16 }
+
+ partyStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { partyEntry 17 }
+
+
+
+ snmpContexts OBJECT IDENTIFIER ::= { partyMIBObjects 2 }
+
+ contextTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpContexts 1 }
+
+ contextEntry OBJECT-TYPE
+ SYNTAX ContextEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { IMPLIED contextIdentity }
+ ::= { contextTable 1 }
+
+ ContextEntry ::=
+ SEQUENCE {
+ contextIdentity Context,
+ contextIndex INTEGER,
+ contextLocal TruthValue,
+ contextViewIndex INTEGER,
+ contextLocalEntity OCTET STRING,
+ contextLocalTime OBJECT IDENTIFIER,
+ contextProxyDstParty Party,
+ contextProxySrcParty Party,
+ contextProxyContext OBJECT IDENTIFIER,
+ contextStorageType StorageType,
+ contextStatus RowStatus
+ }
+
+
+ contextIdentity OBJECT-TYPE
+ SYNTAX Context
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { contextEntry 1 }
+
+ contextIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { contextEntry 2 }
+
+ contextLocal OBJECT-TYPE
+ SYNTAX TruthValue
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { true }
+ ::= { contextEntry 3 }
+
+
+ contextViewIndex OBJECT-TYPE
+ SYNTAX INTEGER (0..65535)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 4 }
+
+
+ contextLocalEntity OBJECT-TYPE
+ SYNTAX OCTET STRING
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 5 }
+
+ contextLocalTime OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { currentTime }
+ ::= { contextEntry 6 }
+
+
+ contextProxyDstParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 7 }
+
+ contextProxySrcParty OBJECT-TYPE
+ SYNTAX Party
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 8 }
+
+
+ contextProxyContext OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 9 }
+
+ contextStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { contextEntry 10 }
+
+
+ contextStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { contextEntry 11 }
+
+
+
+ snmpAccess OBJECT IDENTIFIER ::= { partyMIBObjects 3 }
+
+ aclTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpAccess 1 }
+
+ aclEntry OBJECT-TYPE
+ SYNTAX AclEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { aclTarget, aclSubject, aclResources }
+ ::= { aclTable 1 }
+
+ AclEntry ::=
+ SEQUENCE {
+ aclTarget INTEGER,
+ aclSubject INTEGER,
+ aclResources INTEGER,
+ aclPrivileges INTEGER,
+ aclStorageType StorageType,
+ aclStatus RowStatus
+ }
+
+
+ aclTarget OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 1 }
+
+ aclSubject OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 2 }
+
+ aclResources OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { aclEntry 3 }
+
+
+ aclPrivileges OBJECT-TYPE
+ SYNTAX INTEGER (0..255)
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 4 }
+
+ aclStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { aclEntry 5 }
+
+
+ aclStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { aclEntry 6 }
+
+
+
+ snmpViews OBJECT IDENTIFIER ::= { partyMIBObjects 4 }
+
+ viewTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { snmpViews 1 }
+
+ viewEntry OBJECT-TYPE
+ SYNTAX ViewEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { viewIndex, IMPLIED viewSubtree }
+ ::= { viewTable 1 }
+
+ ViewEntry ::=
+ SEQUENCE {
+ viewIndex INTEGER,
+ viewSubtree OBJECT IDENTIFIER,
+ viewMask OCTET STRING,
+ viewType INTEGER,
+ viewStorageType StorageType,
+ viewStatus RowStatus
+ }
+
+
+ viewIndex OBJECT-TYPE
+ SYNTAX INTEGER (1..65535)
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 1 }
+
+ viewSubtree OBJECT-TYPE
+ SYNTAX OBJECT IDENTIFIER
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { viewEntry 2 }
+
+ viewMask OBJECT-TYPE
+ SYNTAX OCTET STRING (SIZE (0..16))
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { ''H }
+ ::= { viewEntry 3 }
+
+
+ viewType OBJECT-TYPE
+ SYNTAX INTEGER {
+ included(1),
+ excluded(2)
+ }
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { included }
+ ::= { viewEntry 4 }
+
+ viewStorageType OBJECT-TYPE
+ SYNTAX StorageType
+ MAX-ACCESS read-create
+ STATUS current
+ DEFVAL { nonVolatile }
+ ::= { viewEntry 5 }
+
+ viewStatus OBJECT-TYPE
+ SYNTAX RowStatus
+ MAX-ACCESS read-create
+ STATUS current
+ ::= { viewEntry 6 }
+
+
+
+ partyMIBConformance
+ OBJECT IDENTIFIER ::= { partyMIB 3 }
+
+ partyMIBCompliances
+ OBJECT IDENTIFIER ::= { partyMIBConformance 1 }
+ partyMIBGroups
+ OBJECT IDENTIFIER ::= { partyMIBConformance 2 }
+
+
+ unSecurableCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 1 }
+
+ partyNoPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 2 }
+
+
+ partyPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 3 }
+
+
+ fullPrivacyCompliance MODULE-COMPLIANCE
+ STATUS current
+ MANDATORY-GROUPS { partyMIBGroup }
+ ::= { partyMIBCompliances 4 }
+
+
+ partyMIBGroup OBJECT-GROUP
+ OBJECTS { partyIndex, partyTDomain, partyTAddress,
+ partyMaxMessageSize, partyLocal,
+ partyAuthProtocol, partyAuthClock,
+ partyAuthPrivate, partyAuthPublic,
+ partyAuthLifetime, partyPrivProtocol,
+ partyPrivPrivate, partyPrivPublic,
+ partyStorageType, partyStatus,
+ partyCloneFrom,
+ contextIndex, contextLocal,
+ contextViewIndex, contextLocalEntity,
+ contextLocalTime, contextStorageType,
+ contextStatus, aclTarget, aclSubject,
+ aclPrivileges, aclStorageType, aclStatus,
+ viewMask, viewType, viewStorageType, viewStatus }
+ STATUS current
+ ::= { partyMIBGroups 1 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-SMI.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-SMI.txt
new file mode 100644
index 0000000..58ca3c3
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-SMI.txt
@@ -0,0 +1,54 @@
+SNMPv2-SMI DEFINITIONS ::= BEGIN
+
+org ::= { iso 3 }
+
+dod ::= { org 6 }
+
+internet ::= { dod 1 }
+
+directory ::= { internet 1 }
+
+mgmt ::= { internet 2 }
+
+mib-2 ::= { mgmt 1 }
+
+transmission ::= { mib-2 10 }
+
+experimental ::= { internet 3 }
+
+private ::= { internet 4 }
+
+enterprises ::= { private 1 }
+
+security ::= { internet 5 }
+
+snmpV2 ::= { internet 6 }
+
+snmpDomains ::= { snmpV2 1 }
+
+snmpProxys ::= { snmpV2 2 }
+
+snmpModules ::= { snmpV2 3 }
+
+ObjectName ::=
+ OBJECT IDENTIFIER
+
+NotificationName ::=
+ OBJECT IDENTIFIER
+
+
+
+
+
+
+
+
+
+
+
+
+zeroDotZero OBJECT-IDENTITY
+ STATUS current
+ ::= { 0 0 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-TC.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-TC.txt
new file mode 100644
index 0000000..b95d086
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-TC.txt
@@ -0,0 +1,90 @@
+SNMPv2-TC DEFINITIONS ::= BEGIN
+
+IMPORTS
+ FROM SNMPv2-SMI;
+
+DisplayString ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "255a"
+ STATUS current
+ SYNTAX OCTET STRING
+
+PhysAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+MacAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+TruthValue ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ true(1),
+ false(2)
+ }
+
+TestAndIncr ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+AutonomousType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+InstancePointer ::= TEXTUAL-CONVENTION
+ STATUS obsolete
+ SYNTAX OBJECT IDENTIFIER
+
+VariablePointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowPointer ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+RowStatus ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ active(1),
+ notInService(2),
+ notReady(3),
+ createAndGo(4),
+ createAndWait(5),
+ destroy(6)
+ }
+
+TimeStamp ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX TimeTicks
+
+TimeInterval ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER
+
+DateAndTime ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+StorageType ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX INTEGER {
+ other(1),
+ volatile(2),
+ nonVolatile(3),
+ permanent(4),
+ readOnly(5)
+ }
+
+TDomain ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OBJECT IDENTIFIER
+
+TAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/SNMPv2-TM.txt b/release/picobsd/router/crunch1/mibs/SNMPv2-TM.txt
new file mode 100644
index 0000000..afd7d9f
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/SNMPv2-TM.txt
@@ -0,0 +1,54 @@
+SNMPv2-TM DEFINITIONS ::= BEGIN
+
+IMPORTS
+ TEXTUAL-CONVENTION
+ FROM SNMPv2-TC
+ snmpProxys, snmpDomains, OBJECT-IDENTITY
+ FROM SNMPv2-SMI;
+
+snmpUDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 1 }
+
+SnmpUDPAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "1d.1d.1d.1d/2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpCLNSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 2 }
+
+snmpCONSDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 3 }
+
+SnmpOSIAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "*1x:/1x:"
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpDDPDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 4 }
+
+SnmpNBPAddress ::= TEXTUAL-CONVENTION
+ STATUS current
+ SYNTAX OCTET STRING
+
+snmpIPXDomain OBJECT-IDENTITY
+ STATUS current
+ ::= { snmpDomains 5 }
+
+SnmpIPXAddress ::= TEXTUAL-CONVENTION
+ DISPLAY-HINT "4x.1x:1x:1x:1x:1x:1x.2d"
+ STATUS current
+ SYNTAX OCTET STRING
+
+rfc1157Proxy ::= { snmpProxys 1 }
+
+rfc1157Domain OBJECT-IDENTITY
+ STATUS current
+ ::= { rfc1157Proxy 1 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/TCP-MIB.txt b/release/picobsd/router/crunch1/mibs/TCP-MIB.txt
new file mode 100644
index 0000000..b6b96c8
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/TCP-MIB.txt
@@ -0,0 +1,234 @@
+TCP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, Gauge32, Integer32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+tcpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 49 }
+
+tcp ::= { mib-2 6 }
+
+tcpRtoAlgorithm OBJECT-TYPE
+ SYNTAX INTEGER {
+ other(1),
+ constant(2),
+ rsre(3),
+ vanj(4)
+ }
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 1 }
+
+tcpRtoMin OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 2 }
+
+tcpRtoMax OBJECT-TYPE
+ SYNTAX Integer32
+ UNITS "milliseconds"
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 3 }
+
+tcpMaxConn OBJECT-TYPE
+ SYNTAX Integer32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 4 }
+
+tcpActiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 5 }
+
+tcpPassiveOpens OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 6 }
+
+tcpAttemptFails OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 7 }
+
+tcpEstabResets OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 8 }
+
+tcpCurrEstab OBJECT-TYPE
+ SYNTAX Gauge32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 9 }
+
+tcpInSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 10 }
+
+tcpOutSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 11 }
+
+tcpRetransSegs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 12 }
+
+tcpConnTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { tcp 13 }
+
+tcpConnEntry OBJECT-TYPE
+ SYNTAX TcpConnEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX {
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort
+ }
+ ::= { tcpConnTable 1 }
+
+TcpConnEntry ::=
+ SEQUENCE {
+ tcpConnState
+ INTEGER,
+
+ tcpConnLocalAddress
+ IpAddress,
+
+ tcpConnLocalPort
+ INTEGER,
+
+ tcpConnRemAddress
+ IpAddress,
+
+ tcpConnRemPort
+ INTEGER
+ }
+
+tcpConnState OBJECT-TYPE
+ SYNTAX INTEGER {
+ closed(1),
+ listen(2),
+ synSent(3),
+ synReceived(4),
+ established(5),
+ finWait1(6),
+ finWait2(7),
+ closeWait(8),
+ lastAck(9),
+ closing(10),
+ timeWait(11),
+ deleteTCB(12)
+ }
+ MAX-ACCESS read-write
+ STATUS current
+ ::= { tcpConnEntry 1 }
+
+tcpConnLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 2 }
+
+tcpConnLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 3 }
+
+tcpConnRemAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 4 }
+
+tcpConnRemPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcpConnEntry 5 }
+
+tcpInErrs OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 14 }
+
+tcpOutRsts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { tcp 15 }
+
+tcpMIBConformance ::= { tcpMIB 2 }
+
+tcpMIBCompliances ::= { tcpMIBConformance 1 }
+
+tcpMIBGroups ::= { tcpMIBConformance 2 }
+
+tcpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { tcpGroup }
+ ::= { tcpMIBCompliances 1 }
+
+tcpGroup OBJECT-GROUP
+ OBJECTS {
+ tcpRtoAlgorithm,
+ tcpRtoMin,
+ tcpRtoMax,
+ tcpMaxConn,
+ tcpActiveOpens,
+ tcpPassiveOpens,
+ tcpAttemptFails,
+ tcpEstabResets,
+ tcpCurrEstab,
+ tcpInSegs,
+ tcpOutSegs,
+ tcpRetransSegs,
+ tcpConnState,
+ tcpConnLocalAddress,
+ tcpConnLocalPort,
+ tcpConnRemAddress,
+ tcpConnRemPort,
+ tcpInErrs,
+ tcpOutRsts
+ }
+ STATUS current
+ ::= { tcpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/router/crunch1/mibs/UCD-SNMP-MIB.txt b/release/picobsd/router/crunch1/mibs/UCD-SNMP-MIB.txt
new file mode 100644
index 0000000..29277a6
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/UCD-SNMP-MIB.txt
@@ -0,0 +1,519 @@
+UCD-SNMP-MIB DEFINITIONS ::= BEGIN
+
+
+IMPORTS
+ enterprises, OBJECT-TYPE
+ FROM SNMPv2-SMI
+ DisplayString
+ FROM SNMPv2-TC;
+
+ucdavis OBJECT IDENTIFIER ::= { enterprises 2021 }
+
+
+ucdSnmpAgent OBJECT IDENTIFIER ::= { ucdavis 250 }
+hpux9 OBJECT IDENTIFIER ::= { ucdSnmpAgent 1 }
+hpux10 OBJECT IDENTIFIER ::= { ucdSnmpAgent 6 }
+sunos4 OBJECT IDENTIFIER ::= { ucdSnmpAgent 2 }
+solaris OBJECT IDENTIFIER ::= { ucdSnmpAgent 3 }
+osf OBJECT IDENTIFIER ::= { ucdSnmpAgent 4 }
+ultrix OBJECT IDENTIFIER ::= { ucdSnmpAgent 5 }
+netbsd1 OBJECT IDENTIFIER ::= { ucdSnmpAgent 7 }
+freebsd2 OBJECT IDENTIFIER ::= { ucdSnmpAgent 8 }
+irix OBJECT IDENTIFIER ::= { ucdSnmpAgent 9 }
+unknown OBJECT IDENTIFIER ::= { ucdSnmpAgent 255 }
+
+
+processes OBJECT-TYPE
+ SYNTAX Processes
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { processIndex }
+ ::= { ucdavis 1 }
+
+
+Processes ::= SEQUENCE {
+ processIndex INTEGER,
+ processNames DisplayString,
+ processMin INTEGER,
+ processMax INTEGER,
+ processCount INTEGER,
+ processErrorFlag INTEGER,
+ processErrMessage DisplayString,
+ processErrFix INTEGER
+}
+
+processIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 1 }
+
+processNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 2 }
+
+processMin OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 3 }
+
+processMax OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 4 }
+
+processCount OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 5 }
+
+processErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 100 }
+
+processErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { processes 101 }
+
+processErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { processes 102 }
+
+extensible OBJECT-TYPE
+ SYNTAX Extensible
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { extensibleIndex }
+ ::= { ucdavis 3 }
+
+Extensible ::= SEQUENCE {
+ extensibleIndex INTEGER,
+ extensibleNames DisplayString,
+ extensibleCommand DisplayString,
+ extensibleResult INTEGER,
+ extensibleOutput DisplayString,
+ extensibleErrFix INTEGER
+}
+
+extensibleIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 1 }
+
+extensibleNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 2 }
+
+extensibleCommand OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 3 }
+
+extensibleResult OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 100 }
+
+extensibleOutput OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { extensible 101 }
+
+extensibleErrFix OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { extensible 102 }
+
+memory OBJECT-TYPE
+ SYNTAX Memory
+ ACCESS not-accessible
+ STATUS mandatory
+ ::= { ucdavis 4 }
+
+Memory ::= SEQUENCE {
+ memIndex INTEGER,
+ memErrorName DisplayString,
+ memTotalSwap INTEGER,
+ memAvailSwap INTEGER,
+ memTotalReal INTEGER,
+ memAvailReal INTEGER,
+ memTotalSwapTXT INTEGER,
+ memAvailSwapTXT INTEGER,
+ memTotalRealTXT INTEGER,
+ memAvailRealTXT INTEGER,
+ memTotalFree INTEGER,
+ memMinimumSwap INTEGER,
+ memSwapError DisplayString
+}
+memIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 1 }
+
+memErrorName OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 2 }
+
+memTotalSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 3 }
+
+memAvailSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 4 }
+
+memTotalReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 5 }
+
+memAvailReal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 6 }
+
+memTotalSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 7 }
+
+memAvailSwapTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 8 }
+
+memTotalRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 9 }
+
+memAvailRealTXT OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 10 }
+
+memTotalFree OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 11 }
+
+memMinimumSwap OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 12 }
+
+memSwapError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 100 }
+
+memSwapErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { memory 101 }
+
+lockd OBJECT-TYPE
+ SYNTAX Lockd
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { lockdIndex }
+ ::= { ucdavis 5 }
+
+Lockd ::= SEQUENCE {
+ lockdIndex INTEGER,
+ lockdError INTEGER,
+ lockdErrorMsg DisplayString
+}
+
+lockdIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 1 }
+
+lockdError OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 100 }
+
+lockdErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { lockd 101 }
+
+disk OBJECT-TYPE
+ SYNTAX Disk
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { diskIndex }
+ ::= { ucdavis 6 }
+
+Disk ::= SEQUENCE {
+ diskIndex INTEGER,
+ diskPath DisplayString,
+ diskDevice DisplayString,
+ diskMinimum INTEGER,
+ diskTotal INTEGER,
+ diskAvail INTEGER,
+ diskUsed INTEGER,
+ diskPercent INTEGER,
+ diskErrorFlag INTEGER,
+ diskErrorMsg DisplayString
+}
+
+diskIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 1 }
+
+diskPath OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 2 }
+
+diskDevice OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 3 }
+
+diskMinimum OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 4 }
+
+diskTotal OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 5 }
+
+diskAvail OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 6 }
+
+diskUsed OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 7 }
+
+diskPercent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 8 }
+
+diskErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 100 }
+
+diskErrorMsg OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { disk 101 }
+
+loadaves OBJECT-TYPE
+ SYNTAX Loadaves
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { loadaveIndex }
+ ::= { ucdavis 7 }
+
+
+Loadaves ::= SEQUENCE {
+ loadaveIndex INTEGER,
+ loadaveNames DisplayString,
+ loadaveLoad DisplayString,
+ loadaveConfig DisplayString,
+ loadaveErrorFlag INTEGER,
+ loadaveErrMessage DisplayString
+}
+
+loadaveIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 1 }
+
+loadaveNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 2 }
+
+loadaveLoad OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 3 }
+
+loadaveConfig OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 4 }
+
+loadaveErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 100 }
+
+loadaveErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { loadaves 101 }
+
+version OBJECT-TYPE
+ SYNTAX Version
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { versionIndex }
+ ::= { ucdavis 100 }
+
+Version ::= SEQUENCE {
+ versionIndex INTEGER,
+ versionTag DisplayString,
+ versionDate DisplayString,
+ versionCDate DisplayString,
+ versionIdent DisplayString,
+ versionClearCache INTEGER,
+ versionUpdateConfig INTEGER
+}
+
+versionIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 1 }
+
+versionTag OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 2 }
+
+versionDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 3 }
+
+versionCDate OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 4 }
+
+versionIdent OBJECT-TYPE
+ SYNTAX DisplayString
+ ACCESS read-only
+ STATUS mandatory
+ ::= { version 5 }
+
+versionClearCache OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 10 }
+
+versionUpdateConfig OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 11 }
+
+versionRestartAgent OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-write
+ STATUS mandatory
+ ::= { version 12 }
+
+snmperrs OBJECT-TYPE
+ SYNTAX Snmperrs
+ ACCESS not-accessible
+ STATUS mandatory
+ INDEX { snmperrIndex }
+ ::= { ucdavis 101 }
+
+
+Snmperrs ::= SEQUENCE {
+ snmperrIndex INTEGER,
+ snmperrNames DisplayString,
+ snmperrErrorFlag INTEGER,
+ snmperrErrMessage DisplayString
+}
+
+snmperrIndex OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 1 }
+
+snmperrNames OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 2 }
+
+snmperrErrorFlag OBJECT-TYPE
+ SYNTAX INTEGER
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 100 }
+
+snmperrErrMessage OBJECT-TYPE
+ SYNTAX DisplayString (SIZE (0..255))
+ ACCESS read-only
+ STATUS mandatory
+ ::= { snmperrs 101 }
+
+END
+
diff --git a/release/picobsd/router/crunch1/mibs/UDP-MIB.txt b/release/picobsd/router/crunch1/mibs/UDP-MIB.txt
new file mode 100644
index 0000000..a6288e8
--- /dev/null
+++ b/release/picobsd/router/crunch1/mibs/UDP-MIB.txt
@@ -0,0 +1,109 @@
+UDP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+ OBJECT-GROUP, MODULE-COMPLIANCE
+ FROM SNMPv2-CONF
+ mib-2, IpAddress, Counter32, OBJECT-TYPE, MODULE-IDENTITY
+ FROM SNMPv2-SMI;
+
+udpMIB MODULE-IDENTITY
+ LAST-UPDATED "9411010000Z"
+ ORGANIZATION "IETF SNMPv2 Working Group"
+ CONTACT-INFO
+ "Keith McCloghrie
+
+ Postal: Cisco Systems, Inc.
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ US
+
+ Phone: +1 408 526 5260
+ Email: kzm@cisco.com"
+ REVISION "9103310000Z"
+ ::= { mib-2 50 }
+
+udp ::= { mib-2 7 }
+
+udpInDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 1 }
+
+udpNoPorts OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 2 }
+
+udpInErrors OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 3 }
+
+udpOutDatagrams OBJECT-TYPE
+ SYNTAX Counter32
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udp 4 }
+
+udpTable OBJECT-TYPE
+ SYNTAX SEQUENCE OF UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ ::= { udp 5 }
+
+udpEntry OBJECT-TYPE
+ SYNTAX UdpEntry
+ MAX-ACCESS not-accessible
+ STATUS current
+ INDEX { udpLocalAddress, udpLocalPort }
+ ::= { udpTable 1 }
+
+UdpEntry ::=
+ SEQUENCE {
+ udpLocalAddress
+ IpAddress,
+
+ udpLocalPort
+ INTEGER
+ }
+
+udpLocalAddress OBJECT-TYPE
+ SYNTAX IpAddress
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 1 }
+
+udpLocalPort OBJECT-TYPE
+ SYNTAX INTEGER
+ MAX-ACCESS read-only
+ STATUS current
+ ::= { udpEntry 2 }
+
+udpMIBConformance ::= { udpMIB 2 }
+
+udpMIBCompliances ::= { udpMIBConformance 1 }
+
+udpMIBGroups ::= { udpMIBConformance 2 }
+
+udpMIBCompliance MODULE-COMPLIANCE
+ STATUS current
+
+ MANDATORY-GROUPS { udpGroup }
+ ::= { udpMIBCompliances 1 }
+
+udpGroup OBJECT-GROUP
+ OBJECTS {
+ udpInDatagrams,
+ udpNoPorts,
+ udpInErrors,
+ udpOutDatagrams,
+ udpLocalAddress,
+ udpLocalPort
+ }
+ STATUS current
+ ::= { udpMIBGroups 1 }
+
+END
diff --git a/release/picobsd/router/floppy.tree/boot.config b/release/picobsd/router/floppy.tree/boot.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/boot.config
diff --git a/release/picobsd/router/floppy.tree/etc/disktab b/release/picobsd/router/floppy.tree/etc/disktab
new file mode 100644
index 0000000..7575ba6
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/disktab
@@ -0,0 +1,87 @@
+#
+# Floppy formats:
+#
+# To make a filesystem on a floppy:
+# fdformat [-f <size>] fd<drive>[.<size>]
+# disklabel -B -r -w fd<drive>[.<size>] fd<size>
+# newfs <opts> fd<drive>[.<size>]
+#
+# with <opts>:
+# -t 2 - two heads
+# -u 9|15|18 - sectors per track
+# (using the default value of 1/4096 is not much useful for floppies)
+# -l 1 - interleave 1 (for most floppies)
+# -i 65536 - bytes of data per i-node
+# (the default -i value will render you with a floppy wasting way
+# too much space in i-node areas)
+#
+
+fd360:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\
+ :pa#720:oa#0:ba#4096:fa#512:\
+ :pb#720:ob#0:bb#4096:fb#512:\
+ :pc#720:oc#0:bc#4096:fc#512:
+
+fd720:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\
+ :pa#1440:oa#0:ba#4096:fa#512:\
+ :pb#1440:ob#0:bb#4096:fb#512:\
+ :pc#1440:oc#0:bc#4096:fc#512:
+
+fd1200|floppy5|5in|5.25in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\
+ :pa#2400:oa#0:ba#4096:fa#512:\
+ :pb#2400:ob#0:bb#4096:fb#512:\
+ :pc#2400:oc#0:bc#4096:fc#512:
+
+fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pb#2880:ob#0:bb#4096:fb#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+fd1024|floppy0|3.5in Special Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#16:nc#64:\
+ :pa#2048:oa#0:ba#4096:fa#512:\
+ :pb#2048:ob#0:bb#4096:fb#512:\
+ :pc#2048:oc#0:bc#4096:fc#512:
+
+# a == root
+# b == swap
+# c == d == whole disk
+# e == /var
+# f == scratch
+# h == /usr
+
+cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\
+ :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \
+ :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \
+ :pb#24288:ob#15840:tb=swap: \
+ :pc#202224:oc#0: \
+ :pd#202224:od#0: \
+ :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \
+ :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \
+ :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512:
+
+sony650|Sony 650 MB MOD|\
+ :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\
+ :pc#576600:oc#0:\
+ :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024:
+
+mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\
+ :ty=removeable:dt=SCSI:rm#3600:\
+ :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\
+ :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\
+ :pc#444384:oc#0:
+
+minimum:ty=mfs:se#512:nt#1:rm#300:\
+ :ns#2880:nc#1:\
+ :pa#2880:oa#0:ba#4096:fa#512:\
+ :pc#2880:oc#0:bc#4096:fc#512:
+
+zip100|zip 100:\
+ :ty=removable:se#512:nc#96:nt#64:ns#32:\
+ :pa#196608:oa#0:ba#4096:fa#512:\
+ :pb#196608:ob#0:bb#4096:fb#512:\
+ :pc#196608:oc#0:bc#4096:fc#512:
+
diff --git a/release/picobsd/router/floppy.tree/etc/fstab b/release/picobsd/router/floppy.tree/etc/fstab
new file mode 100644
index 0000000..ca519e8
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/fstab
@@ -0,0 +1,4 @@
+proc /proc procfs rw 0 0
+#/dev/fd0c /start_floppy ufs rw 1 1
+#/dev/wd0s1 /dos msdos rw 0 0
+#/dev/wcd0c /cdrom cd9660 ro,noauto 0 0
diff --git a/release/picobsd/router/floppy.tree/etc/gettytab b/release/picobsd/router/floppy.tree/etc/gettytab
new file mode 100644
index 0000000..90562ac
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/gettytab
@@ -0,0 +1,40 @@
+# from: @(#)gettytab 5.14 (Berkeley) 3/27/91
+#
+default:\
+ :cb:ce:ck:lc:fd#1000:cl:im=\r\nPicoBSD (%h) (%t)\r\n\r\n:sp#1200:
+
+P|Pc|Pc console:\
+ :ht:np:sp#115200:
+
+#
+# Fixed speed entries
+2|std.9600|9600-baud:\
+ :np:sp#9600:
+g|std.19200|19200-baud:\
+ :np:sp#19200:
+std.38400|38400-baud:\
+ :np:sp#38400:
+std.57600|57600-baud:\
+ :np:sp#57600:
+std.115200|115200-baud:\
+ :np:sp#115200:
+
+#
+# Entry specifying explicit device settings. See termios(4) and
+# /usr/include/termios.h, too. The entry forces the tty into
+# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control.
+#
+# cflags: CLOCAL | HUPCL | CREAD | CS8
+# oflags: OPOST | ONLCR | OXTABS
+# iflags: IXOFF | IXON | ICRNL | IGNPAR
+# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE
+#
+# The `0' flags don't have input enabled. The `1' flags don't echo.
+# (Echoing is done inside getty itself.)
+#
+local.9600|CLOCAL tty @ 9600 Bd:\
+ :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\
+ :o0#0x00000007:o1#0x00000002:o2#0x00000007:\
+ :i0#0x00000704:i1#0x00000000:i2#0x00000704:\
+ :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\
+ :sp#9600:
diff --git a/release/picobsd/router/floppy.tree/etc/group b/release/picobsd/router/floppy.tree/etc/group
new file mode 100644
index 0000000..abbd733
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/group
@@ -0,0 +1,19 @@
+wheel:*:0:root,user
+daemon:*:1:daemon
+kmem:*:2:root
+sys:*:3:root
+tty:*:4:root
+operator:*:5:root
+mail:*:6:
+bin:*:7:
+news:*:8:
+man:*:9:
+games:*:13:
+staff:*:20:root,user
+guest:*:31:root
+uucp:*:66:
+xten:*:67:xten
+dialer:*:68:
+network:*:69:
+nogroup:*:65533:
+nobody:*:65534:
diff --git a/release/picobsd/router/floppy.tree/etc/host.conf b/release/picobsd/router/floppy.tree/etc/host.conf
new file mode 100644
index 0000000..cf4c538
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/host.conf
@@ -0,0 +1,3 @@
+# $Id: host.conf,v 1.1 1998/08/02 13:03:30 abial Exp $
+hosts
+bind
diff --git a/release/picobsd/router/floppy.tree/etc/hosts b/release/picobsd/router/floppy.tree/etc/hosts
new file mode 100644
index 0000000..0797e55
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/hosts
@@ -0,0 +1,5 @@
+# $Id: hosts,v 1.4 1998/08/19 07:06:33 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/router/floppy.tree/etc/login.conf b/release/picobsd/router/floppy.tree/etc/login.conf
new file mode 100644
index 0000000..d6a8d95
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/login.conf
@@ -0,0 +1,120 @@
+# This file controls resource limits, accounting limits and
+# default user environment settings.
+#
+# $Id: login.conf,v 1.1 1998/08/02 13:03:30 abial Exp $
+#
+
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=passwd:
+
+auth-root-defaults:\
+ :auth-login=passwd:\
+ :auth-rlogin=passwd:\
+
+auth-ftp-defaults:\
+ :auth=passwd:
+
+# Example defaults
+# These settings are used by login(1) by default for classless users
+# Note that entries like "cputime" set both "cputime-cur" and "cputime-max"
+
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+
+#
+# standard - standard user defaults
+#
+standard:\
+ :copyright=/etc/COPYRIGHT:\
+ :welcome=/etc/motd:\
+ :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,EDITOR=/usr/bin/ee:\
+ :path=~/bin /bin /usr/bin:\
+ :nologin=/etc/nologin:\
+ :cputime=1h30m:\
+ :datasize=8M:\
+ :stacksize=2M:\
+ :memorylocked=4M:\
+ :memoryuse=8M:\
+ :filesize=8M:\
+ :coredumpsize=8M:\
+ :openfiles=24:\
+ :maxproc=32:\
+ :priority=0:\
+ :requirehome:\
+ :passwordperiod=90d:\
+ :umask=002:\
+ :ignoretime@:\
+ :tc=default:
+#
+# Staff users - few restrictions and allow login anytime
+#
+staff:\
+ :ignorenologin:\
+ :ignoretime:\
+ :requirehome@:\
+ :accounted@:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :umask=022:\
+ :tc=standard:
+
+
+#
+# root - fallback for root logins
+#
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:\
+#
+# Settings used by /etc/rc
+#
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
+#
+# Polish Users Accounts. Setup proper environment variables.
+#
+polish:Polish Users Accounts:\
+ :lang=pl_pl.ISO-8859-2:\
+ :tc=default:
diff --git a/release/picobsd/router/floppy.tree/etc/motd b/release/picobsd/router/floppy.tree/etc/motd
new file mode 100644
index 0000000..d0c694a
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/motd
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (ROUTER) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/router/floppy.tree/etc/ppp/ppp.conf b/release/picobsd/router/floppy.tree/etc/ppp/ppp.conf
new file mode 100644
index 0000000..12e130a
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/ppp/ppp.conf
@@ -0,0 +1,8 @@
+# $Id: ppp.conf,v 1.1 1998/08/02 13:03:31 abial Exp $
+# PPP Sample Configuration File
+default:
+ set device /dev/cuaa1
+ set speed 38400
+ disable lqr
+ deny lqr
+ set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDT\\T TIMEOUT 40 CONNECT"
diff --git a/release/picobsd/router/floppy.tree/etc/ppp/ppp.deny b/release/picobsd/router/floppy.tree/etc/ppp/ppp.deny
new file mode 100644
index 0000000..51e1e9b
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/ppp/ppp.deny
@@ -0,0 +1,15 @@
+# list of users disallowed any pppd access via 'system
+# password login'.
+# read by pppd(8).
+root
+toor
+daemon
+operator
+bin
+games
+news
+man
+ftp
+uucp
+xten
+ingres
diff --git a/release/picobsd/router/floppy.tree/etc/ppp/ppp.linkup b/release/picobsd/router/floppy.tree/etc/ppp/ppp.linkup
new file mode 100644
index 0000000..05107c6
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/ppp/ppp.linkup
@@ -0,0 +1,10 @@
+# Example of ppp.linkup file
+#
+iij-demand:
+ delete ALL
+ add 0 0 HISADDR
+#
+# Otherwise, simply add peer as default gateway.
+#
+MYADDR:
+ add 0 0 HISADDR
diff --git a/release/picobsd/router/floppy.tree/etc/ppp/ppp.secret.sample b/release/picobsd/router/floppy.tree/etc/ppp/ppp.secret.sample
new file mode 100644
index 0000000..0db9589
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/ppp/ppp.secret.sample
@@ -0,0 +1,23 @@
+##################################################
+#
+# Example of ppp.secret file
+#
+# This file is used to authenticate incoming connections.
+# You must ``enable'' either PAP or CHAP in your ppp.conf file.
+# The peer may then use any of the Authname/Authkey pairs listed.
+# If an IP address is given, it will be assigned to the peer.
+#
+# If an entry exists for your local machine (as given by the
+# ``hostname -s'' command), the password specified will be
+# required for all server socket connections. Refer to the ppp(8)
+# and pppctl(8) man pages for further details.
+#
+# $Id: ppp.secret.sample,v 1.1 1998/08/02 13:03:31 abial Exp $
+#
+##################################################
+
+# Authname Authkey Peer's IP address
+
+oscar OurSecretKey 192.244.184.34/24
+BigBird X4dWg9327 192.244.184.33/32
+tama localPasswdForControl
diff --git a/release/picobsd/router/floppy.tree/etc/profile b/release/picobsd/router/floppy.tree/etc/profile
new file mode 100644
index 0000000..b0aa3b2
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/profile
@@ -0,0 +1,4 @@
+# System-wide .profile file for sh(1).
+BLOCKSIZE=K; export BLOCKSIZE
+PATH=/stand:.; export PATH
+set -o emacs
diff --git a/release/picobsd/router/floppy.tree/etc/protocols b/release/picobsd/router/floppy.tree/etc/protocols
new file mode 100644
index 0000000..c80be39
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/protocols
@@ -0,0 +1,7 @@
+#
+# Internet (IP) protocols
+ip 0 IP # internet protocol, pseudo protocol number
+icmp 1 ICMP # internet control message protocol
+igmp 2 IGMP # Internet Group Management
+tcp 6 TCP # transmission control protocol
+udp 17 UDP # user datagram protocol
diff --git a/release/picobsd/router/floppy.tree/etc/rc b/release/picobsd/router/floppy.tree/etc/rc
new file mode 100644
index 0000000..6fb9321
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/rc
@@ -0,0 +1,18 @@
+#!/bin/sh
+# $Id: rc,v 1.4 1998/08/19 07:06:33 abial Exp $
+### Special setup for one floppy PICOBSD ###
+ifconfig lo0 inet 127.0.0.1 netmask 0xffffff00
+hostname pico
+echo ""
+echo ""
+echo '+----------- PicoBSD 0.4 (ROUTER) -------------+'
+echo '| |'
+echo '| Ta wersja PicoBSD podlega w pelni licencji |'
+echo '| BSD. Wiecej informacji mozna znalezc na |'
+echo '| http://www.freebsd.org/~picobsd, lub u |'
+echo '| autora. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+echo ""
diff --git a/release/picobsd/router/floppy.tree/etc/rc.conf b/release/picobsd/router/floppy.tree/etc/rc.conf
new file mode 100644
index 0000000..84e6fc9
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/rc.conf
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $Id: rc.conf,v 1.2 1998/08/10 19:17:49 abial Exp $
+swapfile="NO" # Set to name of swapfile if aux swapfile desired.
+### Network configuration sub-section ######################
+### Basic network options: ###
+hostname="pico.mydomain.org.pl" # Set this!
+firewall="NO" # firewall type (see /etc/rc.firewall) or NO
+tcp_extensions="NO" # Allow RFC1323 & RFC1644 extensions (or NO).
+network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
+ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
+#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+### Network daemons options: ###
+inetd_enable="YES" # Run the network daemon dispatcher (or NO)
+inetd_flags="" # Optional flags to inetd
+snmpd_enable="YES" # Run the SNMP daemon (or NO)
+snmpd_flags="-C -c /etc/snmpd.conf" # Optional flags to snmpd
+### Network routing options: ###
+defaultrouter="NO" # Set to default gateway (or NO).
+static_routes="" # Set to static route list (or leave empty).
+gateway_enable="NO" # Set to YES if this host will be a gateway.
+arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
+### Allow local configuration override at the very end here ##
+if [ -f /etc/rc.conf.local ]; then
+ . /etc/rc.conf.local
+fi
diff --git a/release/picobsd/router/floppy.tree/etc/rc.firewall b/release/picobsd/router/floppy.tree/etc/rc.firewall
new file mode 100644
index 0000000..0a3e3d2
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/rc.firewall
@@ -0,0 +1,172 @@
+############
+# Setup system for firewall service.
+# $Id: rc.firewall,v 1.1 1998/08/02 13:03:31 abial Exp $
+
+############
+# Define the firewall type in /etc/rc.conf. Valid values are:
+# open - will allow anyone in
+# client - will try to protect just this machine
+# simple - will try to protect a whole network
+# closed - totally disables IP services except via lo0 interface
+# UNKNOWN - disables the loading of firewall rules.
+# filename - will load the rules in the given filename (full path required)
+#
+# For ``client'' and ``simple'' the entries below should be customized
+# appropriately.
+
+############
+#
+# If you don't know enough about packet filtering, we suggest that you
+# take time to read this book:
+#
+# Building Internet Firewalls
+# Brent Chapman and Elizabeth Zwicky
+#
+# O'Reilly & Associates, Inc
+# ISBN 1-56592-124-0
+# http://www.ora.com/
+#
+# For a more advanced treatment of Internet Security read:
+#
+# Firewalls & Internet Security
+# Repelling the wily hacker
+# William R. Cheswick, Steven M. Bellowin
+#
+# Addison-Wesley
+# ISBN 0-201-6337-4
+# http://www.awl.com/
+#
+
+if [ "x$1" != "x" ]; then
+ firewall_type=$1
+fi
+
+############
+# Set quiet mode if requested
+if [ "x$firewall_quiet" = "xYES" ]; then
+ fwcmd="/sbin/ipfw -q"
+else
+ fwcmd="/sbin/ipfw"
+fi
+
+############
+# Flush out the list before we begin.
+$fwcmd -f flush
+
+############
+# If you just configured ipfw in the kernel as a tool to solve network
+# problems or you just want to disallow some particular kinds of traffic
+# they you will want to change the default policy to open. You can also
+# do this as your only action by setting the firewall_type to ``open''.
+
+# $fwcmd add 65000 pass all from any to any
+
+############
+# Only in rare cases do you want to change these rules
+$fwcmd add 1000 pass all from any to any via lo0
+$fwcmd add 1010 deny all from 127.0.0.0/8 to 127.0.0.0/8
+
+
+# Prototype setups.
+if [ "${firewall_type}" = "open" -o "${firewall_type}" = "OPEN" ]; then
+
+ $fwcmd add 65000 pass all from any to any
+
+elif [ "${firewall_type}" = "client" ]; then
+
+ ############
+ # This is a prototype setup that will protect your system somewhat against
+ # people from outside your own network.
+ ############
+
+ # set these to your network and netmask and ip
+ net="192.168.4.0"
+ mask="255.255.255.0"
+ ip="192.168.4.17"
+
+ # Allow any traffic to or from my own net.
+ $fwcmd add pass all from ${ip} to ${net}:${mask}
+ $fwcmd add pass all from ${net}:${mask} to ${ip}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${ip} 25 setup
+
+ # Allow setup of outgoing TCP connections only
+ $fwcmd add pass tcp from ${ip} to any setup
+
+ # Disallow setup of all other TCP connections
+ $fwcmd add deny tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${ip}
+ $fwcmd add pass udp from ${ip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" = "simple" ]; then
+
+ ############
+ # This is a prototype setup for a simple firewall. Configure this machine
+ # as a named server and ntp server, and point all the machines on the inside
+ # at this machine for those services.
+ ############
+
+ # set these to your outside interface network and netmask and ip
+ oif="ed0"
+ onet="192.168.4.0"
+ omask="255.255.255.0"
+ oip="192.168.4.17"
+
+ # set these to your inside interface network and netmask and ip
+ iif="ed1"
+ inet="192.168.3.0"
+ imask="255.255.255.0"
+ iip="192.168.3.17"
+
+ # Stop spoofing
+ $fwcmd add deny all from ${inet}:${imask} to any in via ${oif}
+ $fwcmd add deny all from ${onet}:${omask} to any in via ${iif}
+
+ # Stop RFC1918 nets on the outside interface
+ $fwcmd add deny all from 192.168.0.0:255.255.0.0 to any via ${oif}
+ $fwcmd add deny all from 172.16.0.0:255.240.0.0 to any via ${oif}
+ $fwcmd add deny all from 10.0.0.0:255.0.0.0 to any via ${oif}
+
+ # Allow TCP through if setup succeeded
+ $fwcmd add pass tcp from any to any established
+
+ # Allow setup of incoming email
+ $fwcmd add pass tcp from any to ${oip} 25 setup
+
+ # Allow access to our DNS
+ $fwcmd add pass tcp from any to ${oip} 53 setup
+
+ # Allow access to our WWW
+ $fwcmd add pass tcp from any to ${oip} 80 setup
+
+ # Reject&Log all setup of incoming connections from the outside
+ $fwcmd add deny log tcp from any to any in via ${oif} setup
+
+ # Allow setup of any other TCP connection
+ $fwcmd add pass tcp from any to any setup
+
+ # Allow DNS queries out in the world
+ $fwcmd add pass udp from any 53 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 53
+
+ # Allow NTP queries out in the world
+ $fwcmd add pass udp from any 123 to ${oip}
+ $fwcmd add pass udp from ${oip} to any 123
+
+ # Everything else is denied as default.
+
+elif [ "${firewall_type}" != "UNKNOWN" -a -r "${firewall_type}" ]; then
+ $fwcmd ${firewall_type}
+fi
diff --git a/release/picobsd/router/floppy.tree/etc/rc.network b/release/picobsd/router/floppy.tree/etc/rc.network
new file mode 100644
index 0000000..7c2abf4
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/rc.network
@@ -0,0 +1,80 @@
+#!/bin/sh -
+# $Id: rc.network,v 1.2 1998/08/10 19:17:49 abial Exp $
+network_pass1() {
+ echo -n 'Wstepna konfiguracja sieci:'
+ # Set the host name if it is not already set
+ if [ -z "`hostname -s`" ] ; then
+ hostname $hostname
+ echo ' hostname'
+ fi
+ # Set up all the network interfaces, calling startup scripts if needed
+ for ifn in ${network_interfaces}; do
+ if [ -e /etc/start_if.${ifn} ]; then
+ . /etc/start_if.${ifn}
+ fi
+ # Do the primary ifconfig if specified
+ eval ifconfig_args=\$ifconfig_${ifn}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
+ ifconfig ${ifn}
+ done
+ # Load the filters if required
+ if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \
+ "x$firewall_enable" = "xYES" ] ; then
+ . /etc/rc.firewall
+ echo "Zaladowano reguly filtrujace do firewalla."
+ else
+ echo "UWAGA: system posiada wbudowany modul firewalla, ale zadne reguly"
+ echo " filtrujace nie zostaly zaladowane."
+ echo " Wszystkie rodzaje ruchu IP sa dozwolone."
+ fi
+ # Configure routing
+ if [ "x$defaultrouter" != "xNO" ] ; then
+ static_routes="default ${static_routes}"
+ route_default="default ${defaultrouter}"
+ fi
+ # Set up any static routes. This should be done before router discovery.
+ if [ "x${static_routes}" != "x" ]; then
+ for i in ${static_routes}; do
+ eval route_args=\$route_${i}
+ route add ${route_args}
+ done
+ fi
+ echo -n 'Dodatkowe opcje routingu:'
+ if [ -n "$tcp_extensions" -a "x$tcp_extensions" != "xYES" ] ; then
+ echo -n ' tcp_extensions=NO'
+ sysctl -w net.inet.tcp.rfc1323=0 >/dev/null 2>&1
+ sysctl -w net.inet.tcp.rfc1644=0 >/dev/null 2>&1
+ fi
+ if [ "X$gateway_enable" = X"YES" ]; then
+ echo -n ' IP_gateway=YES'
+ sysctl -w net.inet.ip.forwarding=1 >/dev/null 2>&1
+ fi
+ if [ "X$arpproxy_all" = X"YES" ]; then
+ echo -n ' wlaczam ARP_PROXY_ALL: '
+ sysctl -w net.link.ether.inet.proxyall=1 2>&1
+ fi
+ echo '.'
+ network_pass1_done=YES # Let future generations know we made it.
+}
+
+network_pass2() {
+ network_pass2_done=YES
+}
+
+network_pass3() {
+ network_pass3_done=YES
+}
diff --git a/release/picobsd/router/floppy.tree/etc/rc.serial b/release/picobsd/router/floppy.tree/etc/rc.serial
new file mode 100644
index 0000000..8e3f726
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/rc.serial
@@ -0,0 +1,127 @@
+#!/bin/sh
+# $Id: rc.serial,v 1.1 1998/08/02 13:03:31 abial Exp $
+
+# Change some defaults for serial devices.
+# Standard defaults are:
+# dtrwait 300 drainwait 0
+# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
+# initial iflag, lflag and oflag all 0
+# speed 9600
+# special chars from <sys/ttydefaults.h>
+# nothing locked
+# except for serial consoles the initial iflag, lflag and oflag are from
+# <sys/ttydefaults.h> and clocal is locked on.
+
+default() {
+ # Reset everything changed by the other functions to initial defaults.
+
+ ci=$1; shift # call in device identifier
+ co=$1; shift # call out device identifier
+
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
+ stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
+ stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
+ stty </dev/cual$co$i -clocal -crtscts -hupcl 0
+ done
+}
+
+maybe() {
+ # Special settings.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Don't use ^R; it breaks bash's ^R when typed ahead.
+ stty </dev/ttyi$ci$i reprint undef
+ stty </dev/cuai$co$i reprint undef
+ # Lock clocal off on dialin device for security.
+ stty </dev/ttyl$ci$i clocal
+ # Lock the speeds to use old binaries that don't support them.
+ # Any legal speed works to lock the initial speed.
+ stty </dev/ttyl$ci$i 300
+ stty </dev/cual$co$i 300
+ done
+}
+
+modem() {
+ # Modem that supports CTS and perhaps RTS handshaking.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # may depend on modem
+ comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
+ # Lock crtscts on.
+ # Speed reasonable for V42bis.
+ stty </dev/ttyi$ci$i crtscts 57600
+ stty </dev/ttyl$ci$i crtscts
+ stty </dev/cuai$co$i crtscts 57600
+ stty </dev/cual$co$i crtscts
+ done
+}
+
+mouse() {
+ # Mouse on either callin or callout port.
+
+ ci=$1; shift
+ co=$1; shift
+
+ for i in $*
+ do
+ # Lock clocal on, hupcl off.
+ # Standard speed for Microsoft mouse.
+ stty </dev/ttyi$ci$i clocal -hupcl 1200
+ stty </dev/ttyl$ci$i clocal hupcl
+ stty </dev/cuai$co$i clocal -hupcl 1200
+ stty </dev/cual$co$i clocal hupcl
+ done
+}
+
+terminal() {
+ # Terminal that supports CTS and perhaps RTS handshaking
+ # with the cable or terminal arranged so that DCD is on
+ # at least while the terminal is on.
+ # Also works for bidirectional communications to another pc
+ # provided at most one side runs getty.
+ # Same as modem() except we want a faster speed and no dtrwait.
+
+ ci=$1; shift
+ co=$1; shift
+
+ modem $ci $co $*
+ for i in $*
+ do
+ comcontrol /dev/tty$ci$i dtrwait 0
+ stty </dev/ttyi$ci$i 115200
+ stty </dev/cuai$co$i 115200
+ done
+}
+
+# Don't use anything from this file unless you have some buggy programs
+# that require it.
+
+# Edit the functions and the examples to suit your system.
+# $1 is the call in device identifier, $2 is the call out device identifier
+# and the remainder of the line lists the device numbers.
+
+# Initialize assorted 8250-16550 (sio) ports.
+# maybe d a 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v
+# mouse d a 2
+# modem d a 1
+# terminal d a 0
+
+# Initialize all ports on a Cyclades-8yo.
+# modem c c 00 01 02 03 04 05 06 07
+
+# Initialize all ports on a Cyclades-16ye.
+# modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
+
+# Initialize all ports on a Digiboard 8.
+# modem D D 00 01 02 03 04 05 06 07
diff --git a/release/picobsd/router/floppy.tree/etc/remote b/release/picobsd/router/floppy.tree/etc/remote
new file mode 100644
index 0000000..6f9fcaf
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/remote
@@ -0,0 +1,50 @@
+# @(#)remote 5.2 (Berkeley) 6/30/90
+#
+# remote -- remote host description file
+# see tip(1), remote(5)
+#
+# dv device to use for the tty
+# el EOL marks (default is NULL)
+# du make a call flag (dial up)
+# pn phone numbers (@ =>'s search phones file; possibly taken from
+# PHONES environment variable)
+# at ACU type
+# ie input EOF marks (default is NULL)
+# oe output EOF string (default is NULL)
+# cu call unit (default is dv)
+# br baud rate (defaults to 300)
+# fs frame size (default is BUFSIZ) -- used in buffering writes on
+# receive operations
+# tc to continue a capability
+
+# Systems definitions
+netcom|Netcom Unix Access:\
+ :pn=\@:tc=unix1200:
+omen|Omen BBS:\
+ :pn=\@:tc=dos1200:
+
+# UNIX system definitions
+unix1200|1200 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200:
+unix300|300 Baud dial-out to a UNIX system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300:
+
+# DOS system definitions
+dos1200|1200 Baud dial-out to a DOS system:\
+ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^Z:pa=none:tc=dial1200:
+
+# General dialer definitions used below
+#
+# COURIER switch settings:
+# switch: 1 2 3 4 5 6 7 8 9 10
+# setting: D U D U D D U D U U
+# Rackmount: U U D U D U D D U D
+#
+dial2400|2400 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#2400:cu=/dev/cuaa0:at=hayes:du:
+dial1200|1200 Baud Hayes attributes:\
+ :dv=/dev/cuaa0:br#1200:cu=/dev/cuaa0:at=hayes:du:
+
+# Hardwired line
+cuaa0b|cua0b:dv=/dev/cuaa0:br#2400
+cuaa0c|cua0c:dv=/dev/cuaa0:br#9600
diff --git a/release/picobsd/router/floppy.tree/etc/resolv.conf b/release/picobsd/router/floppy.tree/etc/resolv.conf
new file mode 100644
index 0000000..cc7ef44
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/resolv.conf
@@ -0,0 +1,3 @@
+# $Id: resolv.conf,v 1.4 1998/08/19 07:06:33 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/router/floppy.tree/etc/services b/release/picobsd/router/floppy.tree/etc/services
new file mode 100644
index 0000000..817b6d3
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/services
@@ -0,0 +1,93 @@
+echo 4/ddp
+echo 7/tcp
+echo 7/udp
+discard 9/tcp
+discard 9/udp
+systat 11/tcp
+systat 11/udp
+daytime 13/tcp
+daytime 13/udp
+qotd 17/tcp
+qotd 17/udp
+chargen 19/tcp
+chargen 19/udp
+ftp-data 20/tcp
+ftp-data 20/udp
+ftp 21/tcp
+ftp 21/udp
+ssh 22/tcp
+ssh 22/udp
+telnet 23/tcp
+telnet 23/udp
+smtp 25/tcp
+smtp 25/udp
+time 37/tcp
+time 37/udp
+domain 53/tcp
+domain 53/udp
+tacacs-ds 65/tcp
+tacacs-ds 65/udp
+bootps 67/tcp
+bootps 67/udp
+bootpc 68/tcp
+bootpc 68/udp
+tftp 69/tcp
+tftp 69/udp
+gopher 70/tcp
+gopher 70/udp
+finger 79/tcp
+finger 79/udp
+http 80/tcp
+http 80/udp
+pop2 109/tcp
+pop2 109/udp
+pop3 110/tcp
+pop3 110/udp
+uucp-path 117/tcp
+uucp-path 117/udp
+nntp 119/tcp
+nntp 119/udp
+netbios-ns 137/tcp
+netbios-ns 137/udp
+netbios-dgm 138/tcp
+netbios-dgm 138/udp
+netbios-ssn 139/tcp
+netbios-ssn 139/udp
+imap 143/tcp
+imap 143/udp
+snmp 161/tcp
+snmp 161/udp
+snmptrap 162/tcp
+snmptrap 162/udp
+bgp 179/tcp
+bgp 179/udp
+irc 194/tcp
+irc 194/udp
+ipx 213/tcp
+ipx 213/udp
+imap3 220/tcp
+imap3 220/udp
+ldap 389/tcp
+ldap 389/udp
+netware-ip 396/tcp
+netware-ip 396/udp
+https 443/tcp
+https 443/udp
+exec 512/tcp
+biff 512/udp
+login 513/tcp
+who 513/udp
+cmd 514/tcp
+syslog 514/udp
+printer 515/tcp
+printer 515/udp
+talk 517/tcp
+talk 517/udp
+ntalk 518/tcp
+ntalk 518/udp
+timed 525/tcp
+timed 525/udp
+uucp 540/tcp
+uucp 540/udp
+uucp-rlogin 541/tcp
+uucp-rlogin 541/udp
diff --git a/release/picobsd/router/floppy.tree/etc/shells b/release/picobsd/router/floppy.tree/etc/shells
new file mode 100644
index 0000000..df377f1
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/shells
@@ -0,0 +1,6 @@
+# List of acceptable shells for chpass(1).
+# Ftpd will not allow users to connect who are not using
+# one of these shells.
+
+/bin/sh
+/bin/csh
diff --git a/release/picobsd/router/floppy.tree/etc/snmpd.conf b/release/picobsd/router/floppy.tree/etc/snmpd.conf
new file mode 100644
index 0000000..3ba46b1
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/snmpd.conf
@@ -0,0 +1,45 @@
+# $Id: snmpd.conf,v 1.1 1998/08/02 13:03:31 abial Exp $
+#
+# Read-only (1) and read-write (2) communities
+community 1 public
+community 2 private
+# Process checks.
+#
+# The following are examples of how to use the agent to check for
+# processes running on the host. The syntax looks something like:
+#
+# proc NAME [MAX=0] [MIN=0]
+#
+# NAME: the name of the process to check for. It must match
+# exactly (ie, http will not find httpd processes).
+# MAX: the maximum number allowed to be running. Defaults to 0.
+# MIN: the minimum number to be running. Defaults to 0.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.1
+proc inetd
+proc snmpd
+# ----------------------------------------------------------------------
+# disk checks
+# The agent can check the amount of available disk space, and make
+# sure it is above a set limit.
+#
+# disk PATH [MIN= 100000]
+#
+# PATH: mount path to the disk in question.
+# MIN: Disks with space below this value will have the Mib's errorFlag set.
+# Default value = 100000.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.6
+#disk /dos 10
+# ----------------------------------------------------------------------
+# load average checks
+#
+# load [1MAX= 12.0] [5MAX= 12.0] [15MAX= 12.0]
+# 1MAX: If the 1 minute load average is above this limit at query
+# time, the errorFlag will be set.
+# 5MAX: Similar, but for 5 min average.
+# 15MAX: Similar, but for 15 min average.
+# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.7
+load 5 5 5
+#
+# ----------------------------------------------------------------------
+#syslocation Right here, right now.
+#syscontact Me <me@somewhere.org>
diff --git a/release/picobsd/router/floppy.tree/etc/termcap b/release/picobsd/router/floppy.tree/etc/termcap
new file mode 100644
index 0000000..5a9316a
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/termcap
@@ -0,0 +1,123 @@
+# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
+# All rights reserved.
+# @(#)termcap.src 5.88 (Berkeley) 4/30/91
+#
+#
+# for syscons
+# common entry without semigraphics
+cons25w|ansiw|ansi80x25-raw:\
+ :al=\E[L:am:bs:NP:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:co#80:\
+ :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:li#25:cb=\E[1K:\
+ :ms:nd=\E[C:pt:rs=\E[x\E[m\Ec:so=\E[7m:se=\E[m:up=\E[A:\
+ :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[37;40m:\
+ :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\
+ :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\
+ :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:eo:sf=\E[S:sr=\E[T:\
+ :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\E[K:kB=\E[Z:\
+ :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\
+ :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:bw:\
+ :mb=\E[5m:md=\E[1m:mh=\E[30;1m:mr=\E[7m:me=\E[m:bl=^G:ut:it#8:
+cons25|ansis|ansi80x25:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :tc=cons25w:
+cons25-m|ansis-mono|ansi80x25-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25:
+cons50|ansil|ansi80x50:\
+ :li#50:tc=cons25:
+cons50-m|ansil-mono|ansi80x50-mono:\
+ :li#50:tc=cons25-m:
+# 80x25 ISO 8859-1 FreeBSD console
+cons25l1|cons25-iso8859-1:\
+ :ac=l\215m\216k\214j\213u\226t\225v\227w\230q\222x\231n\217o\220s\224p\221r\223`\201a\202f\207g\210~\237.^Y-^X+\253,\273I\247y\232z\233:\
+ :tc=cons25w:
+cons25l1-m|cons25-iso8859-1-mono:\
+ :pa@:Co@:Sf@:Sb@:op@:us=\E[4m:ue=\E[m:md@:mh@:tc=cons25l1:
+# 80x50 ISO 8859-1 FreeBSD console
+cons50l1|cons50-iso8859-1:\
+ :li#50:tc=cons25l1:
+cons50l1-m|cons50-iso8859-1-mono:\
+ :li#50:tc=cons25l1-m:
+dosansi|ANSI.SYS standard crt|ansi:\
+ :am:bs:ce=\E[K:cl=\E[2J:cm=\E[%i%d;%dH:co#80:\
+ :do=\E[B:li#25:mi:nd=\E[C:\
+ :se=\E[m:so=\E[7m:up=\E[A:us=\E[4m:ue=\E[m:\
+ :md=\E[1m:mh=\E[m:mb=\E[5m:me=\E[m:\
+ :kh=\EG:kb=^h:ku=\EH:kd=\EP:kl=\EK:kr=\EM:\
+ :k1=\E;:k2=\E<:k3=\E=:k4=\E>:k5=\E?:\
+ :k6=\E@:k7=\EA:k8=\EB:k9=\EC:k0=\ED:
+
+# Note: this entry describes the "native"
+# capabilities of the PC monochrome display, without ANY emulation; most
+# communications packages (but NOT PC/IX connect) do some kind of emulation.
+pc|ibmpc|ibm pc PC/IX:\
+ :li#24:co#80:am:bs:bw:eo:\
+ :cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\
+ :nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:
+pc3mono|IBM PC 386BSD Console with monochrome monitor:\
+ :so=\E[0;1r\E[m:tc=pc3:
+pc3|ibmpc3|IBM PC 386BSD Console:\
+ :Co#8:\
+ :DO=\E[%dB:\
+ :F1=\E[W:\
+ :F2=\E[X:\
+ :K1=\E[H:\
+ :K2=\E[I:\
+ :K3=\E[E:\
+ :K4=\E[F:\
+ :K5=\E[G:\
+ :LE=\E[%dD:\
+ :RI=\E[%dC:\
+ :Sb=\E[1;%dx:\
+ :Sf=\E[2;%dx:\
+ :UP=\E[%dA:\
+ :ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+ :am:\
+ :bl=^G:\
+ :bs:\
+ :cb=\E[1K:\
+ :cd=\E[J:\
+ :ce=\E[K:\
+ :cl=\E[H\E[J:\
+ :cm=\E[%i%d;%dH:\
+ :co#80:\
+ :cr=^M:\
+ :do=\E[B:\
+ :ho=\E[H:\
+ :is=\E[m:\
+ :it#8:\
+ :k;=\E[V:\
+ :k1=\E[M:\
+ :k2=\E[N:\
+ :k3=\E[O:\
+ :k4=\E[P:\
+ :k5=\E[Q:\
+ :k6=\E[R:\
+ :k7=\E[S:\
+ :k8=\E[T:\
+ :k9=\E[U:\
+ :kD=\177:\
+ :@7=\E[F:\
+ :kN=\E[G:\
+ :kP=\E[I:\
+ :kb=\177:\
+ :kd=\E[B:\
+ :kh=\E[H:\
+ :kl=\E[D:\
+ :kr=\E[C:\
+ :ku=\E[A:\
+ :le=^H:\
+ :li#25:\
+ :ms:\
+ :nd=\E[C:\
+ :op=\E[x:\
+ :pa#64:\
+ :rs=\E[m:\
+ :se=\E[m:\
+ :sf=\E[S:\
+ :so=\E[7;1r\E[7m:\
+ :sr=\E[T:\
+ :ta=^I:\
+ :te=\E[m:\
+ :ti=\E[m:\
+ :up=\E[A:\
+ :ut:
diff --git a/release/picobsd/router/floppy.tree/etc/ttys b/release/picobsd/router/floppy.tree/etc/ttys
new file mode 100644
index 0000000..8ef5e6e
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/etc/ttys
@@ -0,0 +1,32 @@
+#
+# @(#)ttys 5.1 (Berkeley) 4/17/89
+#
+# name getty type status comments
+#
+# This entry needed for asking password when init goes to single-user mode
+# If you want to be asked for password, change "secure" to "insecure" here
+#console none unknown off secure
+vga none cons25 off secure
+#
+ttyv0 "/usr/libexec/getty Pc" cons25 on secure
+# Virtual terminals
+ttyv1 "/usr/libexec/getty Pc" cons25 on secure
+ttyv2 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv3 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv4 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv5 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv6 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv7 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv8 "/usr/libexec/getty Pc" cons25 on secure
+#ttyv9 "/usr/libexec/getty Pc" cons25 on secure
+# Pseudo terminals
+ttyp0 none network secure
+ttyp1 none network secure
+ttyp2 none network secure
+ttyp3 none network
+ttyp4 none network
+ttyp5 none network
+ttyp6 none network
+ttyp7 none network
+ttyp8 none network
+ttyp9 none network
diff --git a/release/picobsd/router/floppy.tree/kernel.config b/release/picobsd/router/floppy.tree/kernel.config
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/router/floppy.tree/kernel.config
diff --git a/release/picobsd/router/lang/BAD_DOCS!!! b/release/picobsd/router/lang/BAD_DOCS!!!
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/release/picobsd/router/lang/BAD_DOCS!!!
diff --git a/release/picobsd/router/lang/README.en b/release/picobsd/router/lang/README.en
new file mode 100644
index 0000000..c1976a6
--- /dev/null
+++ b/release/picobsd/router/lang/README.en
@@ -0,0 +1,40 @@
+1998.07.12, Warsaw, Poland
+
+ PicoBSD 0.4 (ROUTER)
+ ------------------
+
+
+What is PicoBSD?
+----------------
+
+It's a one floppy version of FreeBSD (please see http://www.freebsd.org),
+configured as a stand-alone router. It offers also IP Firewall capabilities.
+
+You can find more information on the home page of this project at:
+
+ http://www.freebsd.org/~picobsd/
+
+What are minimal requirements?
+------------------------------
+
+* 386SX CPU or better (there is an FPU emulator in kernel)
+* 4MB RAM - the more the better. The system will run a couple of small
+ processes in 4MB - enough to configure static routes and IP Firewall. If
+ you want to run routed(8), you'll need at least 6MB.
+* Modem sitting on COM1-COM4 (default is to use COM2), if you want to have
+ a PPP connection.
+* Network card: compatible with NE2000, PCI Intel, 3Com 3c509 or with DEC
+ chipsets (ed, ep, fxp and de drivers). The kernel supports two of them
+ (i.e. 7 total) plus two PPP connections (tun interfaces). So you can
+ easily build something like router with as many as 9 outlets :-)
+
+For detailed description and list of supported hardware see the original
+documentation, or:
+
+ http://www.freebsd.org/~picobsd/picobsd.html
+
+I'll be glad hearing from you about your experiences with PicoBSD. Thanks.
+
+Have fun!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/router/lang/README.pl b/release/picobsd/router/lang/README.pl
new file mode 100644
index 0000000..bda42f4
--- /dev/null
+++ b/release/picobsd/router/lang/README.pl
@@ -0,0 +1,39 @@
+1998.07.12, Warszawa
+
+ PicoBSD 0.4 (wersja ROUTER)
+ -------------------------
+
+Co to jest PicoBSD?
+-------------------
+
+Jest to jednodyskietkowa wersja FreeBSD skonfigurowana pod katem
+zastosowania jako router, oferuje rowniez modul IP Firewall i translacje
+adresow (NAT).
+
+W celu zapoznania sie z pelnym systemem zajrzyj na http://www.freebsd.org.
+Oficjalna strona tego projektu znajduje sie na
+
+ http://www.freebsd.org/~picobsd.
+
+Jakie sa minimalne wymagania?
+-----------------------------
+
+* Procesor 386SX lub lepszy (jadro posiada emulator FPU)
+* 4MB pamieci - jest to absolutnie nieprzekraczalne minimum. Oczywiscie im
+ wiecej, tym lepiej - przy tej ilosci mozliwe jest skonfigurowanie
+ statycznego routingu oraz IP Firewalla; jesli potrzebujesz rowniez
+ daemona routed i translacji adresow, wymagane jest minimum 6MB.
+* Modem, skonfigurowany na COM1-COM4 (standardowo system wykorzystuje COM2),
+ jesli bedzie wykorzystywany dostep przez PPP.
+* Karta sieciowa: kompatybilna z NE2000, niektore typy 3Com, lub wersje PCI z
+ chipsetem DEC21040 (drivery ed, ep, fxp i de). Jadro jest skonfigurowane
+ tak, zeby moc obsluzyc po dwie karty ed, ep, i de (czyli w sumie siedem)
+ oraz dwa polaczenia PPP rownoczesnie. Mozna wiec zbudowac router z 9
+ interfejsami... :-)
+
+Po dalsze szczegoly zajrzyj do oryginalnej dokumentacji.
+
+
+Milej zabawy!
+
+Andrzej Bialecki <abial@nask.pl>
diff --git a/release/picobsd/router/lang/boot.help.en b/release/picobsd/router/lang/boot.help.en
new file mode 100644
index 0000000..7cbce13
--- /dev/null
+++ b/release/picobsd/router/lang/boot.help.en
@@ -0,0 +1,18 @@
+Usage: bios_drive:interface(unit,partition)kernel_name options
+ bios_drive 0, 1, ...
+ interface fd, wd or sd
+ unit 0, 1, ...
+ partition a, c, ...
+ kernel_name name of kernel, or ? for list of files in root directory
+ options -a (ask name) -C (cdrom) -c (userconfig) -D (dual consoles)
+ -d (debug early) -g (gdb) -h (serial console) -P (probe kbd)
+ -r (default root) -s (single user) -v (verbose)
+Examples:
+ 1:sd(0,a)mykernel boot `mykernel' on the first SCSI drive when one IDE
+ drive is present
+ 1:wd(2,a) boot from the second (secondary master) IDE drive
+ 1:sd(0,a)? list the files in the root directory on the specified
+ drive/unit/partition, and set the default bios_drive,
+ interface, unit and partition
+ -cv boot with the defaults, then run UserConfig to modify
+ hardware parameters (c), and print verbose messages (v)
diff --git a/release/picobsd/router/lang/boot.help.pl b/release/picobsd/router/lang/boot.help.pl
new file mode 100644
index 0000000..bb5b422
--- /dev/null
+++ b/release/picobsd/router/lang/boot.help.pl
@@ -0,0 +1,16 @@
+Opcje: dysk_bios:kontroler(dysk,partycja)nazwa_kernela opcje
+ dysk_bios 0, 1, ...
+ kontroler fd (dyskietka), wd (dysk IDE) lub sd (dysk SCSI)
+ dysk 0, 1, ... (numer dysku w kontrolerze)
+ partycja a, c, e, f ... (wedlug nazewnictwa BSD)
+ nazwa_kernela nazwa pliku kernela, lub ? zeby dostac liste plikow
+ opcje -a (pytaj o rootdev) -C (cdrom) -c (userconf.) -D (podwojna konsola)
+ -d (uruchom debugger) -g (gdb) -h (konsola szeregowa)
+ -P (probkuj klawiature) -r (domyslny rootdev) -s (tryb single user)
+ -v (verbose - szczegolowe komunikaty)
+Np: 1:sd(0,a)mykernel startuj `mykernel' z 1 dysku SCSI gdy jest tez 1 dysk
+ IDE, i jednoczesnie ustaw go jako domyslny dysk_bios,
+ kontroler, dysk i partycje
+ -cv startuj z parametrami domyslnymi, potem uruchom
+ konfiguracje param. sprzetowych (-c), i podawaj
+ szczegolowe komunikaty w trakcie bootowania (-v).
diff --git a/release/picobsd/router/lang/hosts.en b/release/picobsd/router/lang/hosts.en
new file mode 100644
index 0000000..6b7d0ff
--- /dev/null
+++ b/release/picobsd/router/lang/hosts.en
@@ -0,0 +1,5 @@
+# $Id: hosts.en,v 1.1 1998/08/02 13:03:32 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.edu
+127.0.0.1 pico.mydomain.edu
diff --git a/release/picobsd/router/lang/hosts.pl b/release/picobsd/router/lang/hosts.pl
new file mode 100644
index 0000000..eef83a1
--- /dev/null
+++ b/release/picobsd/router/lang/hosts.pl
@@ -0,0 +1,5 @@
+# $Id: hosts.pl,v 1.1 1998/08/02 13:03:32 abial Exp $
+# This file should contain the addresses and aliases
+# for local hosts that share this file.
+127.0.0.1 localhost localhost.mydomain.org.pl
+127.0.0.1 pico.mydomain.org.pl
diff --git a/release/picobsd/router/lang/mfs.rc.en b/release/picobsd/router/lang/mfs.rc.en
new file mode 100644
index 0000000..f130c3f
--- /dev/null
+++ b/release/picobsd/router/lang/mfs.rc.en
@@ -0,0 +1,25 @@
+# $Id: mfs.rc.en,v 1.2 1998/08/10 19:17:53 abial Exp $
+# This file is interpreted by oinit(8)
+#
+ncons 2
+motd /etc/motd
+set HOME=/
+set PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+
+sysctl -w vm.defer_swapspace_pageouts=1 vm.disable_swapspace_pageouts=1
+
+### Special setup for one floppy PICOBSD ###
+echo
+echo "-------------------------------------------"
+echo " Please wait. The system is coming up..."
+echo "-------------------------------------------"
+echo
+echo "Reading /etc from startup floppy..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc
+cd /etc
+umount /dev/fd0a
+echo "Ok. (Now you may remove floppy if you like)"
+echo
+. rc
diff --git a/release/picobsd/router/lang/mfs.rc.pl b/release/picobsd/router/lang/mfs.rc.pl
new file mode 100644
index 0000000..7f6ecc6
--- /dev/null
+++ b/release/picobsd/router/lang/mfs.rc.pl
@@ -0,0 +1,25 @@
+# $Id: mfs.rc.pl,v 1.2 1998/08/10 19:17:54 abial Exp $
+# This file is interpreted by oinit(8)
+#
+ncons 2
+motd /etc/motd
+set HOME=/
+set PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
+
+sysctl -w vm.defer_swapspace_pageouts=1 vm.disable_swapspace_pageouts=1
+
+### Special setup for one floppy PICOBSD ###
+echo
+echo "----------------------------------------------"
+echo " Prosze czekac. Trwa uruchamianie systemu..."
+echo "----------------------------------------------"
+echo
+echo "Wczytuje konfiguracje z /etc z dyskietki..."
+mount -o rdonly /dev/fd0a /start_floppy
+cd /start_floppy/etc
+cp -Rp . /etc
+cd /etc
+umount /dev/fd0a
+echo "Ok. (Jesli chcesz, mozesz juz wyjac dyskietke)"
+echo
+. rc
diff --git a/release/picobsd/router/lang/motd.en b/release/picobsd/router/lang/motd.en
new file mode 100644
index 0000000..8054666
--- /dev/null
+++ b/release/picobsd/router/lang/motd.en
@@ -0,0 +1,12 @@
+==================================================
+ )\_)\
+PicoBSD 0.4 (ROUTER) (o,o)
+ __ \~/
+Welcome to PicoBSD! -->====\
+ ~~ d d
+You can find a short description of the pico
+system in file /README. You can view it using
+"more /README".
+
+For more info contact the author (abial@nask.pl).
+
diff --git a/release/picobsd/router/lang/motd.pl b/release/picobsd/router/lang/motd.pl
new file mode 100644
index 0000000..d0c694a
--- /dev/null
+++ b/release/picobsd/router/lang/motd.pl
@@ -0,0 +1,12 @@
+=======================================================
+ )\_)\
+PicoBSD 0.4 (ROUTER) (o,o)
+ __ \~/
+Witamy w PicoBSD! -->====\
+ ~~ d d
+W glownym katalogu w pliku README znajdziesz pico
+krotki opis systemu. Mozesz go obejrzec przy pomocy
+"more /README".
+
+Wiecej informacji znajdziesz u autora (abial@nask.pl).
+
diff --git a/release/picobsd/router/lang/rc.en b/release/picobsd/router/lang/rc.en
new file mode 100644
index 0000000..23b01ae
--- /dev/null
+++ b/release/picobsd/router/lang/rc.en
@@ -0,0 +1,18 @@
+#!/bin/sh
+# $Id: rc.en,v 1.2 1998/08/10 19:17:54 abial Exp $
+### Special setup for one floppy PICOBSD ###
+ifconfig lo0 inet 127.0.0.1 netmask 0xffffff00
+hostname pico
+echo ""
+echo ""
+echo '+----------- PicoBSD 0.4 (ROUTER) -------------+'
+echo '| |'
+echo '| This version of PicoBSD is fully under |'
+echo '| BSD license. For more details see |'
+echo '| http://www.freebsd.org/~picobsd, or contact |'
+echo '| the author. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+echo ""
diff --git a/release/picobsd/router/lang/rc.pl b/release/picobsd/router/lang/rc.pl
new file mode 100644
index 0000000..39759bd
--- /dev/null
+++ b/release/picobsd/router/lang/rc.pl
@@ -0,0 +1,18 @@
+#!/bin/sh
+# $Id: rc.pl,v 1.2 1998/08/10 19:17:55 abial Exp $
+### Special setup for one floppy PICOBSD ###
+ifconfig lo0 inet 127.0.0.1 netmask 0xffffff00
+hostname pico
+echo ""
+echo ""
+echo '+----------- PicoBSD 0.4 (ROUTER) -------------+'
+echo '| |'
+echo '| Ta wersja PicoBSD podlega w pelni licencji |'
+echo '| BSD. Wiecej informacji mozna znalezc na |'
+echo '| http://www.freebsd.org/~picobsd, lub u |'
+echo '| autora. |'
+echo '| |'
+echo '| abial@nask.pl |'
+echo '| |'
+echo '+----------------------------------------------+'
+echo ""
diff --git a/release/picobsd/router/lang/reboot.en b/release/picobsd/router/lang/reboot.en
new file mode 100755
index 0000000..4601bb8
--- /dev/null
+++ b/release/picobsd/router/lang/reboot.en
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Press Ctrl-Alt-Del instead of $0"
diff --git a/release/picobsd/router/lang/reboot.pl b/release/picobsd/router/lang/reboot.pl
new file mode 100755
index 0000000..8181ced
--- /dev/null
+++ b/release/picobsd/router/lang/reboot.pl
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/echo "Zamiast $0 nacisnij Ctrl-Alt-Del"
diff --git a/release/picobsd/router/lang/resolv.conf.en b/release/picobsd/router/lang/resolv.conf.en
new file mode 100644
index 0000000..1f316ae
--- /dev/null
+++ b/release/picobsd/router/lang/resolv.conf.en
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.en,v 1.1 1998/08/02 13:03:32 abial Exp $
+domain mydomain.edu
+nameserver 192.33.4.12
diff --git a/release/picobsd/router/lang/resolv.conf.pl b/release/picobsd/router/lang/resolv.conf.pl
new file mode 100644
index 0000000..2955a7d
--- /dev/null
+++ b/release/picobsd/router/lang/resolv.conf.pl
@@ -0,0 +1,3 @@
+# $Id: resolv.conf.pl,v 1.1 1998/08/02 13:03:32 abial Exp $
+domain mydomain.org.pl
+nameserver 148.81.16.51
diff --git a/release/picobsd/router/lang/update.en b/release/picobsd/router/lang/update.en
new file mode 100755
index 0000000..552840c
--- /dev/null
+++ b/release/picobsd/router/lang/update.en
@@ -0,0 +1,10 @@
+# $Id: update.en,v 1.2 1998/08/10 19:17:55 abial Exp $
+echo -n "Updating /etc contents on startup floppy... "
+mount /dev/fd0a /start_floppy
+cd /etc
+cp -Rp . /start_floppy/etc/
+echo " Done."
+echo -n "Updating kernel parameters... "
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+echo " Done."
diff --git a/release/picobsd/router/lang/update.pl b/release/picobsd/router/lang/update.pl
new file mode 100755
index 0000000..5790eb61
--- /dev/null
+++ b/release/picobsd/router/lang/update.pl
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: update.pl,v 1.2 1998/08/10 19:17:55 abial Exp $
+echo -n "Uaktualniam katalog /etc na dyskietce... "
+mount /dev/fd0a /start_floppy
+cd /etc
+cp -Rp . /start_floppy/etc/
+echo " Zrobione."
+echo -n "Uaktualniam parametry jadra..."
+kget -incore /start_floppy/kernel.config /stand/vanilla
+umount /dev/fd0a
+echo " Zrobione."
diff --git a/release/picobsd/router/mfs.tree/MAKEDEV b/release/picobsd/router/mfs.tree/MAKEDEV
new file mode 100755
index 0000000..dcda647
--- /dev/null
+++ b/release/picobsd/router/mfs.tree/MAKEDEV
@@ -0,0 +1,1167 @@
+#!/bin/sh -
+#
+# Copyright (c) 1990 The Regents of the University of California.
+# All rights reserved.
+#
+# Written and contributed by W. Jolitz 12/90
+#
+# Redistribution and use in source and binary forms are permitted provided
+# that: (1) source distributions retain this entire copyright notice and
+# comment, and (2) distributions including binaries display the following
+# acknowledgement: ``This product includes software developed by the
+# University of California, Berkeley and its contributors'' in the
+# documentation or other materials provided with the distribution and in
+# all advertising materials mentioning features or use of this software.
+# 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
+#
+# Device "make" file. Valid arguments:
+# all makes all known devices, standard number of units (or close)
+# std standard devices
+# local configuration specific devices
+# mach-4 mach4&lites+devices for Mach's XFree86 distribution
+# (see http://www.cs.hut.fi/lites.html for more info on LITES)
+#
+# Tapes:
+# wt* QIC-interfaced (e.g. not SCSI) 3M cartridge tape
+# st* "NEW type scsi tapes" (old driver uses the
+# block devices of the disks to get access)
+# ft* QIC-40/QIC-80 3M cartridge tape (interfaced
+# via the floppy disk controller)
+#
+# Disks:
+# wd* "Winchester" disk drives (ST506,IDE,ESDI,RLL,...)
+# wfd* "IDE floppy" disk drives (LS-120)
+# fd* "floppy" disk drives (3 1/2", 5 1/4")
+# sd* "SCSI disks"
+# cd* "SCSI CD-ROM disks"
+# mcd* "Mitsumi CD-ROM disks"
+# scd* "Sony CD-ROM disks"
+# matcd* "Matsushita (Panasonic) CD-ROM disks"
+# wcd* "IDE CD-ROM disks"
+# vn* "vnode disks"
+# od* "optical disks"
+#
+# Console ports:
+# vty* virtual console devices for syscons/pcvt/codrv
+#
+# Pointing devices:
+# mse* Logitech and ATI Inport bus mouse
+# psm* PS/2 mouse
+# sysmouse Mousesystems mouse emulator for syscons
+#
+# Time devices:
+# refclock-* serial ports used by xntpd parse refclocks
+#
+# Terminal ports:
+# tty* general purpose serial ports
+# cua* dialout serial ports
+# ttyA* Specialix SI/XIO dialin ports ('*' = number of devices)
+# cuaA* Specialix SI/XIO dialout ports
+# ttyD* Digiboard - 16 dialin ports
+# cuaD* Digiboard - 16 dialout ports
+# ttyR* Rocketport dialin ports
+# cuaR* Rocketport dialout ports
+#
+# Pseudo terminals:
+# pty* set of 32 master and slave pseudo terminals
+# vty* virtual terminals using syscons/pcvt/codrv console
+#
+# Printers:
+# lpt* stock lp
+#
+# SCSI devices (other than CD-ROM, tape and disk):
+# ssc The ``super scsi'' device
+# uk* "unknown" device (supports ioctl calls only)
+# worm* WORM driver
+# pt* Processor Type (HP scanner, as one example)
+#
+# PC-CARD (previously called PCMCIA) support
+# card* PC-CARD slots
+#
+# Special purpose devices:
+# apm Advanced Power Management BIOS
+# bpf* packet filter
+# speaker pc speaker
+# tw* xten power controller
+# snd* various sound cards
+# pcaudio PCM audio driver
+# socksys iBCS2 socket system driver
+# vat VAT compatibility audio driver (requires snd*)
+# gsc Genius GS-4500 hand scanner
+# joy pc joystick
+# tun* Tunneling IP device
+# snp* tty snoop devices
+# spigot Video Spigot video acquisition card
+# ctx* Cortex-I video acquisition card
+# meteor* Matrox Meteor video acquisition card (pci)
+# bktr* Bt848 based video acquisition card (pci)
+# labpc* National Instrument's Lab-PC and LAB-PC+
+# perfmon CPU performance-monitoring counters
+# pci PCI configuration-space access from user mode
+# ipl ipfilter control devices (ipl, ipnat, ipstate, ipauth)
+#
+# $Id: MAKEDEV,v 1.1 1998/08/02 13:03:32 abial Exp $
+#
+
+PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
+umask 77
+
+# Usage: die exitcode msg
+die() {
+ echo $2
+ exit $1
+}
+
+# Convert integer to partition name
+dkitop() {
+ local p
+
+ case $1 in
+ 0) p=a;; 1) p=b;; 2) p=c;; 3) p=d;; 4) p=e;; 5) p=f;; 6) p=g;; 7) p=h;;
+ *) p="?";;
+ esac
+ echo $p
+}
+
+# Convert integer to slice name
+dkitos() {
+ local s
+
+ case $1 in
+ 0) s="";;
+ 1) s="";;
+ *) s=s$(($1-1));;
+ esac
+ echo $s
+}
+
+# Convert disk (type, unit, slice, partition) to minor number
+dkminor()
+{
+ echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
+}
+
+# Override mknod(2) to add extra handling to it.
+mknod() {
+ rm -f "$1" || exit 1
+ /sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
+ chown root.wheel "$1" || exit 1
+}
+
+# Convert the last character of a tty name to a minor number.
+ttyminor()
+{
+ case $unit in
+ [0-9]) m=$unit;;
+ a) m=10;; b) m=11;; c) m=12;; d) m=13;; e) m=14;; f) m=15;; g) m=16;;
+ h) m=17;; i) m=18;; j) m=19;; k) m=20;; l) m=21;; m) m=22;; n) m=23;;
+ o) m=24;; p) m=25;; q) m=26;; r) m=27;; s) m=28;; t) m=29;; u) m=30;;
+ v) m=31;;
+ *) m="?";;
+ esac
+ echo $m
+}
+
+# Raw partition for disks
+dkrawpart=2
+
+# Compatibility slice for disks
+dkcompatslice=0
+
+# Raw slice for disks
+dkrawslice=1
+
+# Control bit for SCSI
+scsictl=$((1 << 29))
+
+# Standard umasks
+disk_umask=037 # allow group operator to read disks
+tape_umask=017 # allow group operator to read/write tapes
+
+for i in $*; do
+case $i in
+
+all)
+ sh MAKEDEV std # standard
+ sh MAKEDEV fd0 fd1 # bdev, floppy disk
+ sh MAKEDEV sd0 sd1 sd2 sd3 wd0 wd1 wd2 wd3 # bdev, ordinary disk
+ sh MAKEDEV od0 # bdev, optical disk
+ sh MAKEDEV wfd0 # bdev, LS-120 floppy
+ sh MAKEDEV vn0 # bdev, virtual disk
+ sh MAKEDEV cd0 matcd0 mcd0 scd0 wcd0 # bdev, cdrom
+ sh MAKEDEV ft0 st0 wt0 # bdev, tape
+ sh MAKEDEV vty4 # cdev, virtual tty
+ sh MAKEDEV cuaa0 cuaa1 cuaa2 cuaa3 # cdev, serial tty
+ sh MAKEDEV pty0 # cdev, pseudo tty
+ sh MAKEDEV ttyd0 ttyd1 ttyd2 ttyd3 # cdev, serial tty
+ sh MAKEDEV mse0 psm0 sysmouse # cdev, mouse
+ sh MAKEDEV pcaudio speaker # cdev, noise
+ sh MAKEDEV lpt0 lpt1 lpt2 # cdev, printer
+ sh MAKEDEV bpf0 ipl tun0 # cdev, network
+ sh MAKEDEV ch0 perfmon tw0 # cdev, miscellaneous
+ sh MAKEDEV apm card0 card1 # cdev, laptop
+ ;;
+std)
+ mknod console c 0 0; chmod 600 console
+ mknod drum c 4 0; chmod 640 drum; chgrp kmem drum
+ mknod kmem c 2 1; chmod 640 kmem; chgrp kmem kmem
+ mknod mem c 2 0; chmod 640 mem; chgrp kmem mem
+ mknod null c 2 2; chmod 666 null
+ mknod random c 2 3; chmod 644 random
+ mknod urandom c 2 4; chmod 644 urandom
+ mknod zero c 2 12; chmod 666 zero
+ mknod io c 2 14; chmod 600 io
+ mknod tty c 1 0; chmod 666 tty
+ mknod klog c 7 0; chmod 600 klog
+ mknod stdin c 22 0; chmod 666 stdin
+ mknod stdout c 22 1; chmod 666 stdout
+ mknod stderr c 22 2; chmod 666 stderr
+ mknod lkm c 32 0; chmod 644 lkm
+ mknod pci c 78 0; chmod 644 pci
+ mkdir -p fd
+ (cd fd && eval `echo "" | awk ' BEGIN { \
+ for (i = 0; i < 64; i++) \
+ printf("mknod %d c 22 %d;", i, i)}'`)
+ chown -R bin.bin fd
+ chmod 555 fd
+ chmod 666 fd/*
+ ;;
+
+mach-4)
+ mknod iopl c 22 0
+ mknod kbd c 23 0
+ mknod mouse c 24 0
+ mknod time c 25 0
+ mknod timezone c 26 0
+ ;;
+
+# Create device files for new Archive/Wangtek QIC-02 tape driver (vak)
+wt*)
+ umask $tape_umask
+ u=`expr $i : '..\(.*\)'`
+ if [ x$u = x ]; then u=0; fi
+ mknod rwt${u} c 10 `expr 0 + $u` # default density, 512b blocks
+ mknod nrwt${u} c 10 `expr 4 + $u`
+# mknod rWt${u} c 10 `expr 64 + $u` # default density, 1024b blocks
+# mknod nrWt${u} c 10 `expr 68 + $u`
+ mknod rwt${u}b c 10 `expr 16 + $u` # 60 megabytes
+ mknod nrwt${u}b c 10 `expr 20 + $u`
+ mknod rwt${u}c c 10 `expr 24 + $u` # 120 megabytes
+ mknod nrwt${u}c c 10 `expr 28 + $u`
+ mknod rwt${u}d c 10 `expr 32 + $u` # 150 megabytes
+ mknod nrwt${u}d c 10 `expr 36 + $u`
+# mknod rwt${u}e c 10 `expr 40 + $u` # 300 megabytes?
+# mknod nrwt${u}e c 10 `expr 44 + $u`
+# mknod rwt${u}f c 10 `expr 48 + $u` # 600 megabytes?
+# mknod nrwt${u}f c 10 `expr 52 + $u`
+ chgrp operator r[Ww]t$u nr[Ww]t$u r[Ww]t$u[a-f] nr[Ww]t$u[a-f]
+ umask 77
+ ;;
+
+# Individual slices.
+od*s*|sd*s*|vn*s*|wd*s*|wfd*s*)
+ umask $disk_umask
+ case $i in
+ od*s*) name=od; blk=20; chr=70;;
+ sd*s*) name=sd; blk=4; chr=13;;
+ wd*s*) name=wd; blk=0; chr=3;;
+ vn*s*) name=vn; blk=15; chr=43;;
+ wfd*s*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*s*)
+ unit=`expr $i : '...\([0-9]*\)s'`
+ slice=`expr $i : '...[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '...[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\([0-9]*\)s'`
+ slice=`expr $i : '..[0-9]*s\([0-9]*\)'`
+ part=`expr $i : '..[0-9]*s[0-9]*\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ case $slice in
+ [0-9]|[1-2][0-9]|30)
+ oldslice=$slice
+ slice=$(($slice+1))
+ slicename=`dkitos $slice`
+ minor=`dkminor 0 $unit $slice $dkrawpart`
+ mknod $name$unit$slicename b $blk $minor
+ mknod r$name$unit$slicename c $chr $minor
+ case $part in
+ [a-h])
+ case $oldslice in
+ 0) slice=$oldslice ;;
+ esac
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit $slice $part`
+ partname=`dkitop $part`
+ mknod $name$unit$slicename$partname \
+ b $blk $minor
+ mknod r$name$unit$slicename$partname \
+ c $chr $minor
+ done
+ ;;
+ "")
+ ;;
+ *)
+ echo bad partition for disk in: $i
+ ;;
+ esac
+ chgrp operator $name$unit$slicename* \
+ r$name$unit$slicename*
+ ;;
+ *)
+ echo bad slice for disk in: $i
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i "(unit=$unit, slice=$slice, part=$part)"
+ ;;
+ esac
+ umask 77
+ ;;
+
+fd*)
+ umask $disk_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=fd; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64`
+ # Fake BSD partitions
+ for i in a b c d e f g h
+ do
+ ln ${name}${unit} ${name}${unit}$i
+ ln r${name}${unit} r${name}${unit}$i
+ done
+ # User-readable and programmer-readable name sets
+
+ mknod ${name}${unit}.1720 b $blk `expr $unit '*' 64 + 1`
+ mknod r${name}${unit}.1720 c $chr `expr $unit '*' 64 + 1`
+ # ln ${name}${unit}.1720 ${name}${unit}135hs21
+ # ln r${name}${unit}.1720 r${name}${unit}135hs21
+
+ mknod ${name}${unit}.1480 b $blk `expr $unit '*' 64 + 2`
+ mknod r${name}${unit}.1480 c $chr `expr $unit '*' 64 + 2`
+ # ln ${name}${unit}.1480 ${name}${unit}135hs18
+ # ln r${name}${unit}.1480 r${name}${unit}135hs18
+ # ln ${name}${unit}.1480 ${name}${unit}96hs18
+ # ln r${name}${unit}.1480 r${name}${unit}96hs18
+
+ mknod ${name}${unit}.1440 b $blk `expr $unit '*' 64 + 3`
+ mknod r${name}${unit}.1440 c $chr `expr $unit '*' 64 + 3`
+ # ln ${name}${unit}.1440 ${name}${unit}135
+ # ln r${name}${unit}.1440 r${name}${unit}135
+ # ln ${name}${unit}.1440 ${name}${unit}135ds18
+ # ln r${name}${unit}.1440 r${name}${unit}135ds18
+ # ln ${name}${unit}.1440 ${name}${unit}96ds18
+ # ln r${name}${unit}.1440 r${name}${unit}96ds18
+
+ mknod ${name}${unit}.1200 b $blk `expr $unit '*' 64 + 4`
+ mknod r${name}${unit}.1200 c $chr `expr $unit '*' 64 + 4`
+ # ln ${name}${unit}.1200 ${name}${unit}96
+ # ln r${name}${unit}.1200 r${name}${unit}96
+ # ln ${name}${unit}.1200 ${name}${unit}96ds15
+ # ln r${name}${unit}.1200 r${name}${unit}96ds15
+ # ln ${name}${unit}.1200 ${name}${unit}135ds15
+ # ln r${name}${unit}.1200 r${name}${unit}135ds15
+
+ mknod ${name}${unit}.820 b $blk `expr $unit '*' 64 + 5`
+ mknod r${name}${unit}.820 c $chr `expr $unit '*' 64 + 5`
+ # ln ${name}${unit}.820 ${name}${unit}96hs10
+ # ln r${name}${unit}.820 r${name}${unit}96hs10
+ # ln ${name}${unit}.820 ${name}${unit}135hs10
+ # ln r${name}${unit}.820 r${name}${unit}135hs10
+
+ mknod ${name}${unit}.800 b $blk `expr $unit '*' 64 + 6`
+ mknod r${name}${unit}.800 c $chr `expr $unit '*' 64 + 6`
+ # ln ${name}${unit}.800 ${name}${unit}96ds10
+ # ln r${name}${unit}.800 r${name}${unit}96ds10
+ # ln ${name}${unit}.800 ${name}${unit}135ds10
+ # ln r${name}${unit}.800 r${name}${unit}135ds10
+
+ mknod ${name}${unit}.720 b $blk `expr $unit '*' 64 + 7`
+ mknod r${name}${unit}.720 c $chr `expr $unit '*' 64 + 7`
+ # ln ${name}${unit}.720 ${name}${unit}96ds9
+ # ln r${name}${unit}.720 r${name}${unit}96ds9
+ # ln ${name}${unit}.720 ${name}${unit}135ds9
+ # ln r${name}${unit}.720 r${name}${unit}135ds9
+
+ mknod ${name}${unit}.360 b $blk `expr $unit '*' 64 + 8`
+ mknod r${name}${unit}.360 c $chr `expr $unit '*' 64 + 8`
+ # ln ${name}${unit}.360 ${name}${unit}48
+ # ln r${name}${unit}.360 r${name}${unit}48
+ # ln ${name}${unit}.360 ${name}${unit}48ds9
+ # ln r${name}${unit}.360 r${name}${unit}48ds9
+
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ft*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ name=ft; blk=2; chr=9
+ case $unit in
+ 0|1|2|3)
+ mknod ${name}${unit} b $blk `expr $unit '*' 64 + 32`
+ mknod r${name}${unit} c $chr `expr $unit '*' 64 + 32`
+ ln ${name}${unit} ${name}${unit}a
+ ln r${name}${unit} r${name}${unit}a
+ chgrp operator ${name}${unit}* r${name}${unit}*
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+od*|sd*|vn*|wd*|wfd*)
+ umask $disk_umask
+ case $i in
+ od*) name=od; blk=20; chr=70;;
+ sd*) name=sd; blk=4; chr=13;;
+ vn*) name=vn; blk=15; chr=43;;
+ wd*) name=wd; blk=0; chr=3;;
+ wfd*) name=wfd; blk=1; chr=87;;
+ esac
+ case $i in
+ wfd*)
+ unit=`expr $i : '...\(.*\)'`
+ ;;
+ *)
+ unit=`expr $i : '..\(.*\)'`
+ ;;
+ esac
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for slicepartname in s0h s1 s2 s3 s4
+ do
+ sh MAKEDEV $name$unit$slicepartname
+ done
+ case $name in
+ od|sd)
+ minor=`dkminor 0 $unit 0 0`
+ mknod r${name}${unit}.ctl c $chr $(($minor | $scsictl))
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ccd*)
+ umask $disk_umask
+ name=ccd
+ blk=21; chr=74
+ unit=`expr $i : '...\(.*\)'`
+ case $unit in
+ [0-9]|[0-9][0-9]|[0-4][0-9][0-9]|50[0-9]|51[0-1])
+ for part in 0 1 2 3 4 5 6 7
+ do
+ minor=`dkminor 0 $unit 0 $part`
+ partname=`dkitop $part`
+ mknod $name$unit$partname b $blk $minor
+ mknod r$name$unit$partname c $chr $minor
+ done
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ssc*)
+ mknod ssc c 49 0
+ ;;
+
+uk*)
+ unit=`expr $i : 'uk\(.*\)'`
+ mknod uk$unit c 31 $unit
+ ;;
+
+worm*)
+ umask $disk_umask
+ unit=`expr $i : 'worm\(.*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ chr=62
+ blk=23
+ name=worm
+ mknod ${name}${unit} b $blk ${unit}
+ mknod r${name}${unit} c $chr ${unit}
+ chgrp operator ${name}${unit} r${name}${unit}
+ umask 077
+ mknod r${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+# SCSI processor type driver
+pt[0-9]*)
+ chr=61
+ name=pt
+ unit=`expr $i : 'pt\([0-9][0-9]*\)'`
+ if [ "X${unit}" = "X" ]; then
+ unit=0
+ fi
+ unit=`expr $unit + 1 - 1`
+ mknod ${name}${unit} c $chr $unit
+ mknod ${name}${unit}.ctl c $chr `expr $unit + $scsictl `
+ ;;
+
+pty*)
+ class=`expr $i : 'pty\(.*\)'`
+ case $class in
+ 0) offset=0 name=p;;
+ 1) offset=32 name=q;;
+ 2) offset=64 name=r;;
+ 3) offset=96 name=s;;
+# Note that xterm (at least) only look at p-s.
+ 4) offset=128 name=P;;
+ 5) offset=160 name=Q;;
+ 6) offset=192 name=R;;
+ 7) offset=224 name=S;;
+ # This still leaves [tuTU].
+ *) echo bad unit for pty in: $i;;
+ esac
+ case $class in
+ 0|1|2|3|4|5|6|7)
+ umask 0
+ eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
+ for (i = 0; i < 32; i++) {
+ c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
+ printf("mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d;", \
+ n, c, b+i, \
+ n, c, b+i); \
+ } \
+ }'`
+ umask 77
+ ;;
+ esac
+ ;;
+
+st*)
+ umask $tape_umask
+ unit=`expr $i : '..\(.*\)'`
+ chr=14
+
+ case $unit in
+ 0|1|2|3|4|5|6)
+ for mode in 0 1 2 3
+ do
+ mknod rst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 0`
+ mknod nrst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 1`
+ mknod erst${unit}.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 2`
+ mknod st${unit}ctl.${mode} c $chr `expr $unit '*' 16 + $mode '*' 4 + 3`
+ chgrp operator rst${unit}.${mode}\
+ nrst${unit}.${mode} \
+ erst${unit}.${mode} \
+ st${unit}ctl.${mode}
+ chmod 600 st${unit}ctl.${mode}
+ done
+ mknod rst${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 rst${unit}.ctl
+
+ ln rst${unit}.0 rst${unit}
+ ln nrst${unit}.0 nrst${unit}
+ ln erst${unit}.0 erst${unit}
+ ;;
+ *)
+ echo bad unit for tape in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+ch*)
+ umask 37
+ unit=`expr $i : '..\(.*\)'`
+ case $i in
+ ch*) name=ch; chr=17;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit} c $chr `expr $unit '*' 16 + 0`
+ chgrp operator ${name}${unit}
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 16 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ *)
+ echo bad unit for media changer in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+cd*|mcd*|scd*)
+ umask $disk_umask
+ case $i in
+ cd*) unit=`expr $i : '..\(.*\)'`; name=cd; blk=6; chr=15;;
+ mcd*) unit=`expr $i : '...\(.*\)'`; name=mcd; blk=7; chr=29;;
+ scd*) unit=`expr $i : '...\(.*\)'`; name=scd; blk=16; chr=45;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ case $name in
+ cd)
+ mknod r${name}${unit}.ctl c $chr `expr $unit '*' 8 + $scsictl `
+ chmod 600 r${name}${unit}.ctl
+ ;;
+ esac
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+matcd*)
+ umask 2
+ case $i in
+ matcd*) unit=`expr $i : '.....\(.*\)'`; name=matcd; blk=17; chr=46;;
+ esac
+ case $unit in
+ 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)
+ mknod ${name}${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod ${name}${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod r${name}${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod r${name}${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator ${name}${unit}[a-h] r${name}${unit}[a-h]
+ chmod 640 ${name}${unit}[a-h] r${name}${unit}[a-h]
+
+ mknod ${name}${unit}la b $blk `expr $unit '*' 8 + 128`
+ mknod ${name}${unit}lc b $blk `expr $unit '*' 8 + 130`
+ mknod r${name}${unit}la c $chr `expr $unit '*' 8 + 128`
+ mknod r${name}${unit}lc c $chr `expr $unit '*' 8 + 130`
+ chgrp operator ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ chmod 640 ${name}${unit}l[a-h] r${name}${unit}l[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+wcd*)
+ umask 2 ;
+ unit=`expr $i : '...\(.*\)'`
+ blk=19
+ chr=69
+ case $unit in
+ 0|1|2|3)
+ mknod wcd${unit}a b $blk `expr $unit '*' 8 + 0`
+ mknod rwcd${unit}a c $chr `expr $unit '*' 8 + 0`
+ mknod wcd${unit}c b $blk `expr $unit '*' 8 + 2`
+ mknod rwcd${unit}c c $chr `expr $unit '*' 8 + 2`
+ chgrp operator wcd${unit}[a-h] rwcd${unit}[a-h]
+ chmod 640 wcd${unit}[a-h] rwcd${unit}[a-h]
+ ;;
+ *)
+ echo bad unit for disk in: $i
+ ;;
+ esac
+ umask 77
+ ;;
+
+lpt*)
+ unit=`expr $i : 'lpt\(.*\)'`
+ mknod lpt$unit c 16 $unit
+ mknod lpctl$unit c 16 `expr $unit + 128`
+ ;;
+
+tw*)
+ unit=`expr $i : 'tw\(.*\)'`
+ mknod tw$unit c 19 $unit
+ chgrp operator tw$unit
+ ;;
+
+# Use this to create virtual consoles for syscons, pcvt or codrv
+# ttyv0-b
+# use as MAKEDEV vtyNN to create NN entries
+vty*)
+ chr=12
+ units=`expr $i : 'vty\(.*\)'`
+ eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
+ for (i = 0; i < n; i++)
+ printf("mknod ttyv%01x c %d %d;", i, c, i); }'`
+ ln -fs ttyv0 vga # XXX X still needs this pccons relic
+ ;;
+
+bpf*)
+ unit=`expr $i : 'bpf\(.*\)'`
+ mknod bpf$unit c 23 $unit
+ ;;
+
+speaker)
+ mknod speaker c 26 0
+ ;;
+
+cuaa?|cua?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuaa$unit c 28 `expr $m + 128`
+ mknod cuaia$unit c 28 `expr $m + 32 + 128`
+ mknod cuala$unit c 28 `expr $m + 64 + 128`
+ chown uucp.dialer cua*a$unit
+ umask 77
+ ;;
+
+tty0?|ttyd?|tty?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttyd$unit c 28 $m
+ mknod ttyid$unit c 28 `expr $m + 32`
+ mknod ttyld$unit c 28 `expr $m + 64`
+ ;;
+
+cuac?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuac$name c $major `expr $minor + 128`
+ mknod cuaic$name c $major `expr $minor + 32 + 128`
+ mknod cualc$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cuac$name cuaic$name cualc$name
+ done
+ umask 77
+ ;;
+
+ttyc?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f
+ g h i j k l m n o p q r s t u v"
+ major=48
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyc$name c $major $minor
+ mknod ttyic$name c $major `expr $minor + 32`
+ mknod ttylc$name c $major `expr $minor + 64`
+ done
+ ;;
+
+# RISCom8 'rc' driver entries
+
+cuam?)
+ umask 7
+ unit=`expr $i : 'cua.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod cuam$unit c 63 `expr $m + 128`
+ chown uucp.dialer cuam$unit
+ umask 77
+ ;;
+
+ttym?)
+ unit=`expr $i : 'tty.*\(.\)$'`
+ m=`ttyminor $unit`
+ mknod ttym$unit c 63 $m
+ ;;
+
+# Specialix SI/XIO.
+# Note: these are 'base 1' to match the numbers on the panels, and to match
+# the manual that comes with the system.
+ttyA*)
+ major=68
+ nports=`expr $i : 'ttyA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod ttyA$name c $major $minor
+ mknod ttyiA$name c $major `expr $minor + 65536`
+ mknod ttylA$name c $major `expr $minor + 131072`
+ port=`expr $port + 1`
+ done
+ # For the user-mode control program, 'sicontrol'
+ mknod si_control c 68 262144
+ ;;
+
+cuaA*)
+ umask 7
+ major=68
+ nports=`expr $i : 'cuaA\(.*\)$'`
+ port=1
+ while [ $port -le $nports ]; do
+ minor=`expr $port - 1`
+ name=`expr $port + 1000 | cut -c 3-4`
+ mknod cuaA$name c $major `expr $minor + 128`
+ mknod cuaiA$name c $major `expr $minor + 128 + 65536`
+ mknod cualA$name c $major `expr $minor + 128 + 131072`
+ chown uucp.dialer cuaA$name cuaiA$name cualA$name
+ port=`expr $port + 1`
+ done
+ umask 77
+ ;;
+
+# Digiboard PC/?? 16 port card.
+# The current scheme of minor numbering is:
+#
+# unused{14} CARD{2} major{8} CALLOUT{1} LOCK{1} INIT{1} PORT{5}
+#
+# CARD bitfield in future versions may be extended to 3 bits.
+#
+# See dgb(4)
+#
+ttyD?)
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'tty.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod ttyD$name c $major $minor
+ mknod ttyiD$name c $major `expr $minor + 32`
+ mknod ttylD$name c $major `expr $minor + 64`
+ done
+ ;;
+
+cuaD?)
+ umask 7
+ portlist="0 1 2 3 4 5 6 7 8 9 a b c d e f"
+ major=58
+ card=`expr $i : 'cua.*\(.\)$'`
+ for unit in $portlist
+ do
+ minor=`ttyminor $unit`
+ minor=`expr $card \* 65536 + $minor`
+ name=$card$unit
+ mknod cuaD$name c $major `expr $minor + 128`
+ mknod cuaiD$name c $major `expr $minor + 32 + 128`
+ mknod cualD$name c $major `expr $minor + 64 + 128`
+ chown uucp.dialer cua*D$name
+ done
+ umask 77
+ ;;
+
+ttyR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/ttyR*; rm -f /dev/ttyiR*; rm -f /dev/ttylR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/ttyR$Rnum c $major $MINOR
+ mknod /dev/ttylR$Rnum c $major `expr $MINOR + 32`
+ mknod /dev/ttyiR$Rnum c $major `expr $MINOR + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ ;;
+
+cuaR?)
+ major=81
+ BOARD=1; MINOR=65536; Rnum=0
+ MINOR=`expr $BOARD \* 65536`
+ dmesg | grep ^RocketPort[0-4] > /tmp/rp_list
+ controllers=`awk '{print $1}' < /tmp/rp_list`
+ rm -f /dev/cuaR*; rm -f /dev/cuaiR*; rm -f /dev/cualR*
+ for i in $controllers;do
+ ndevices=`grep ^$i /tmp/rp_list | sed -e 's/.* \([0-9]*\) ports/\1/'`
+ echo -n "Creating $ndevices devices for $i: "
+ for dev in `jot $ndevices 0`;do
+ mknod /dev/cuaR$Rnum c $major `expr $MINOR + 128`
+ mknod /dev/cualR$Rnum c $major `expr $MINOR + 128 + 32`
+ mknod /dev/cuaiR$Rnum c $major `expr $MINOR + 128 + 64`
+ Rnum=`expr $Rnum + 1`
+ MINOR=`expr $MINOR + 1`
+ done
+ BOARD=`expr $BOARD + 1`
+ MINOR=`expr $BOARD \* 65536`
+ echo " "
+ done
+ chown uucp.dialer /dev/cuaR*
+ ;;
+
+mse*)
+ unit=`expr $i : 'mse\(.*\)'`
+ chr=27
+ mknod mse$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+psm*)
+ unit=`expr $i : 'psm\(.*\)'`
+ chr=21
+ mknod psm$unit c $chr `expr $unit '*' 2 + 1` # non-blocking for X11
+ ;;
+
+mouse*)
+ name=`expr $i : 'mouse\(.*\)'`
+ if [ ! -c $name ]; then
+ $0 $name # make the appropriate device
+ fi
+ ln -fs $name mouse
+ ;;
+
+pcaudio)
+ mknod pcaudio c 24 0
+ mknod pcaudioctl c 24 128
+ ;;
+
+socksys)
+ mknod socksys c 41 0
+ mknod spx c 41 1
+ ln -fs socksys nfsd
+ chmod 666 socksys nfsd spx
+ ;;
+
+snd*)
+#
+# changes from Linux voxware
+# minor Linux FreeBSD
+# 8 sequencer2 (aka music0) music0
+# 17 patmgr0 sequencer1
+# 33 patmgr1 sequencer2
+#
+
+ unit=`expr $i : 'snd\(.*\)'`
+ chr=30
+
+ # XXX write this less verbosely, like std
+ snd_security_hole=0 # XXX
+ umask $snd_security_hole
+
+ if [ $unit = "0" ] ; then
+ ln -fs mixer$unit mixer
+ ln -fs sequencer$unit sequencer
+ ln -fs dsp$unit dsp
+ ln -fs audio$unit audio
+ ln -fs dspW$unit dspW
+ ln -fs music$unit music
+ ln -fs pss$unit pss
+ fi
+
+ mknod mixer$unit c $chr `expr $unit '*' 16 + 0`
+ mknod sequencer$unit c $chr `expr $unit '*' 16 + 1`
+ mknod midi$unit c $chr `expr $unit '*' 16 + 2`
+ mknod dsp$unit c $chr `expr $unit '*' 16 + 3`
+ mknod audio$unit c $chr `expr $unit '*' 16 + 4`
+ mknod dspW$unit c $chr `expr $unit '*' 16 + 5`
+ mknod sndstat c $chr 6
+ # minor number 7 is unused
+ mknod music$unit c $chr `expr $unit '*' 16 + 8`
+ mknod pss$unit c $chr `expr $unit '*' 16 + 9`
+ # minor numbers 10-15 are unused
+ umask 77
+ ;;
+
+vat)
+ mknod vatio c 25 128
+ chmod 660 vatio
+ ;;
+
+gsc*)
+ unit=`expr $i : 'gsc\(.*\)'`
+ mknod gsc${unit} c 47 $unit
+ mknod gsc${unit}p c 47 $(($unit + 8))
+ mknod gsc${unit}d c 47 $(($unit + 32))
+ mknod gsc${unit}pd c 47 $(($unit + 40))
+ chmod 666 gsc${unit}*
+ ;;
+
+apm*)
+ chr=39
+ mknod apm c $chr 0
+ chgrp operator apm
+ chmod 660 apm
+ ;;
+
+card*)
+ unit=`expr $i : 'card\(.*\)'`
+ chr=50
+ mknod card$unit c $chr $unit
+ chmod 644 card$unit
+ ;;
+
+ttyx?|ttyy?|ttyz?)
+ case $i in
+ *0) unit=0;; *1) unit=1;; *2) unit=2;; *3) unit=3;;
+ *4) unit=4;; *5) unit=5;; *6) unit=6;; *7) unit=7;;
+ *8) unit=8;; *9) unit=9;; *a) unit=10;; *b) unit=11;;
+ *c) unit=12;; *d) unit=13;; *e) unit=14;; *f) unit=15;;
+ esac
+ case $i in
+ ttyy?) unit=`expr $unit \+ 16`;;
+ ttyz?) unit=`expr $unit \+ 32`;;
+ esac
+ mknod $i c 42 $unit
+ chown uucp.wheel $i
+ ;;
+
+cronyx)
+ mknod cronyx c 42 63
+ ;;
+
+joy)
+ mknod joy0 c 51 0
+ mknod joy1 c 51 1
+ chgrp operator joy0 joy1
+ chmod 640 joy0 joy1
+ ;;
+
+spigot)
+ mknod spigot c 11 0
+ chmod 444 spigot
+ ;;
+
+ctx?)
+ unit=`expr $i : 'ctx\(.*\)'`
+ mknod ctx$unit c 40 $unit
+ chmod 444 ctx$unit
+ ;;
+
+meteor?)
+ unit=`expr $i : 'meteor\(.*\)'`
+ mknod meteor$unit c 67 $unit
+ chmod 444 meteor$unit
+ ;;
+
+bktr?)
+ unit=`expr $i : 'bktr\(.*\)'`
+ mknod bktr$unit c 92 $unit
+ mknod tuner$unit c 92 $((16 + $unit ))
+ chmod 444 bktr$unit tuner$unit
+ ;;
+
+tun*)
+ ntun=`expr $i : 'tun\(.*\)$'`
+ unit=0
+ while [ $unit -le $ntun ]; do
+ mknod tun$unit c 52 $unit
+ chown uucp.dialer tun$unit
+ unit=`expr $unit + 1`
+ done
+ ;;
+
+sysmouse)
+ mknod sysmouse c 12 128
+ mknod consolectl c 12 255
+ ;;
+
+snp?)
+ unit=`expr $i : 'snp\(.*\)'`
+ mknod snp$unit c 53 $unit
+ ;;
+
+# dufault@hda.com: If I do much more work on other A-D boards
+# then eventually we'll have a "ad" and "dio" interface and some of these
+# "labpcaio" ones will be gone.
+# labpcaio: D-A and A-D.
+# labpcdio: Digital in and Digital out.
+#
+labpc*)
+ umask 7
+ case $i in
+ labpcaio*)
+ name=labpcaio
+ unit=`expr $i : 'labpcaio\(.*\)'`
+ all="0 1 2 3 4 5 6 7"
+ offset=0
+ ;;
+ labpcdio*)
+ name=labpcdio
+ unit=`expr $i : 'labpcdio\(.*\)'`
+ all="0 1 2 3"
+ offset=8
+ ;;
+ *)
+ die 3 "Don't know LabPC type $i"
+ ;;
+ esac
+ if [ "X${unit}" = "X" ]; then
+ unit=all
+ fi
+ case $unit in
+ 0|1|2|3|4|5|6|7)
+ mknod $name$unit c 66 `expr $offset + $unit `
+ ;;
+ all)
+ for i in $all
+ do
+ mknod $name$i c 66 `expr $offset + $i `
+ done
+ ;;
+ *)
+ echo "No such LabPC unit: $unit"
+ ;;
+ esac
+ umask 77
+ ;;
+
+perfmon)
+ mknod perfmon c 2 32
+ chgrp kmem perfmon
+ chmod 640 perfmon
+ ;;
+
+ipl)
+ mknod ipl c 79 0
+ mknod ipnat c 79 1
+ mknod ipstate c 79 2
+ mknod ipauth c 79 3
+ ;;
+
+local)
+ umask 0 # XXX should be elsewhere
+ sh MAKEDEV.local
+ umask 77
+ ;;
+
+*)
+ echo $i - no such device name
+ ;;
+
+esac
+done
diff --git a/release/picobsd/router/mfs.tree/Makefile b/release/picobsd/router/mfs.tree/Makefile
new file mode 100644
index 0000000..54f3ee7
--- /dev/null
+++ b/release/picobsd/router/mfs.tree/Makefile
@@ -0,0 +1,38 @@
+#
+# $Id: Makefile,v 1.1 1998/08/02 13:03:32 abial Exp $
+#
+
+DESTDIR?=/mnt
+
+STAND_LINKS= bin sbin
+USR_LINKS= bin sbin libexec
+PL_LOCALE_LINKS= pl polish
+
+all: tree links
+
+tree:
+ mtree -deU -f mfs.mtree -p ${DESTDIR}
+
+links: tree
+ (cd ${DESTDIR}; \
+ for i in ${STAND_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd var/run; \
+ ln -s /dev/null log; \
+ cd ../../usr; \
+ for i in ${USR_LINKS}; \
+ do \
+ ln -s /stand $${i}; \
+ done; \
+ cd share/misc;\
+ ln -s /etc/termcap termcap; )
+
+
+# We don't do it under 'all' because it's needed only on non-DEVFS systems
+devnodes: tree
+ (cp MAKEDEV ${DESTDIR}/dev/; \
+ cd ${DESTDIR}/dev; \
+ ./MAKEDEV std tun2 vty10 fd0 wd0 wd0s1h pty0 vn0; \
+ rm MAKEDEV;)
diff --git a/release/picobsd/router/mfs.tree/login.conf b/release/picobsd/router/mfs.tree/login.conf
new file mode 100644
index 0000000..664d03c
--- /dev/null
+++ b/release/picobsd/router/mfs.tree/login.conf
@@ -0,0 +1,62 @@
+# $Id: login.conf,v 1.1 1998/08/02 13:03:33 abial Exp $
+
+# Authentication methods
+
+auth-defaults:\
+ :auth=krb_skey_or_passwd,passwd,kerberos,skey:
+
+auth-root-defaults:\
+ :auth-login=krb_skey_or_passwd,passwd,kerberos,skey:\
+ :auth-rlogin=krb_or_skey,kerberos,skey:
+auth-ftp-defaults:\
+ :auth=skey_or_pwd,passwd,skey:
+# Example defaults
+default:\
+ :cputime=infinity:\
+ :datasize-cur=22M:\
+ :stacksize-cur=8M:\
+ :memorylocked-cur=10M:\
+ :memoryuse-cur=30M:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :maxproc-cur=64:\
+ :openfiles-cur=64:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-defaults:
+
+# root - fallback for root logins
+root:\
+ :path=~/bin /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin:\
+ :cputime=infinity:\
+ :datasize=infinity:\
+ :stacksize=infinity:\
+ :memorylocked=infinity:\
+ :memoryuse=infinity:\
+ :filesize=infinity:\
+ :coredumpsize=infinity:\
+ :openfiles=infinity:\
+ :maxproc=infinity:\
+ :memoryuse-cur=32M:\
+ :maxproc-cur=64:\
+ :openfiles-cur=1024:\
+ :priority=0:\
+ :requirehome@:\
+ :umask=022:\
+ :tc=auth-root-defaults:
+# Settings used by /etc/rc
+daemon:\
+ :coredumpsize@:\
+ :coredumpsize-cur=0:\
+ :datasize=infinity:\
+ :datasize-cur@:\
+ :maxproc=512:\
+ :maxproc-cur@:\
+ :memoryuse-cur=64M:\
+ :memorylocked-cur=64M:\
+ :openfiles=1024:\
+ :openfiles-cur@:\
+ :stacksize=16M:\
+ :stacksize-cur@:\
+ :tc=default:
diff --git a/release/picobsd/router/mfs.tree/mfs.mtree b/release/picobsd/router/mfs.tree/mfs.mtree
new file mode 100644
index 0000000..8fd9af3
--- /dev/null
+++ b/release/picobsd/router/mfs.tree/mfs.mtree
@@ -0,0 +1,44 @@
+#
+# $Id: mfs.mtree,v 1.2 1998/08/10 19:17:57 abial Exp $
+#
+/set type=dir uname=root gname=wheel mode=0755
+.
+ dev
+ ..
+ etc
+ ..
+ mnt
+ ..
+ stand
+ ..
+ start_floppy
+ ..
+ tftpboot
+ ..
+ tmp
+ ..
+ usr
+ local
+ share
+ snmp
+ mibs
+ ..
+ ..
+ ..
+ ..
+ share
+ misc
+ ..
+ ..
+ ..
+ var
+ db
+ ..
+ run
+ ..
+ spool
+ lock
+ ..
+ ..
+ ..
+..
diff --git a/release/picobsd/tinyware/aps/Makefile b/release/picobsd/tinyware/aps/Makefile
new file mode 100644
index 0000000..b76b456
--- /dev/null
+++ b/release/picobsd/tinyware/aps/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:52 abial Exp $
+#
+PROG=ps
+SRCS+=main.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/aps/README b/release/picobsd/tinyware/aps/README
new file mode 100644
index 0000000..2664c44
--- /dev/null
+++ b/release/picobsd/tinyware/aps/README
@@ -0,0 +1,19 @@
+1998.07.12
+
+This is a small 'ps' replacement, which uses information available via
+procfs(5) interface. It's primitive, but gives you the most important
+informations, i.e. how many processes are running and on which vty, and the
+pid number to kill some of them. :-)
+
+When I have some time, I'll add usual switches and other functions that normal
+'ps' has...
+
+Also, what I'm now inclined to think is that it should be reworked to use
+more general (and less complicated) sysctl(3).
+
+<abial@nask.pl>
+
+(As of 1998.07.31 this program is no longer used in PicoBSD. See sps(1) in
+TinyWare collection).
+
+$Id: README,v 1.2 1998/07/31 20:57:42 abial Exp $
diff --git a/release/picobsd/tinyware/aps/main.c b/release/picobsd/tinyware/aps/main.c
new file mode 100644
index 0000000..bbd2cce
--- /dev/null
+++ b/release/picobsd/tinyware/aps/main.c
@@ -0,0 +1,101 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: main.c,v 1.1.1.1 1998/07/14 07:30:53 abial Exp $
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+/*
+ * Ok, I could extract almost anything from /proc, but I'm too lazy...
+ * I think it will suffice for now.
+ */
+
+int
+main(int argc, char *argv[])
+{
+ DIR *d;
+ struct dirent *e;
+ FILE *fd;
+ char buf[100];
+ char *tok, *sep=" ", *sep1=",";
+ char *name, *pid, *ppid, *uid, *gid;
+ char *pgid, *sid, *tty, *cred;
+ char *major, *minor;
+ char con[10];
+
+ d=opendir("/proc");
+ printf(" PID PPID TTY COMMAND\n");
+ while((e=readdir(d))!=NULL) {
+ /* Skip '.' and '..' */
+ if(e->d_name[0]=='.') continue;
+ /* Skip 'curproc' - it's us */
+ if(e->d_name[0]=='c') continue;
+ sprintf(buf,"/proc/%s/status",e->d_name);
+ fd=fopen(buf,"r");
+ fgets(buf,99,fd);
+ fclose(fd);
+ name=strtok(buf,sep);
+ pid=strtok(NULL,sep);
+ ppid=strtok(NULL,sep);
+ pgid=strtok(NULL,sep);
+ sid=strtok(NULL,sep);
+ tty=strtok(NULL,sep);
+ tok=strtok(NULL,sep); /* flags */
+ tok=strtok(NULL,sep); /* start */
+ tok=strtok(NULL,sep); /* user time */
+ tok=strtok(NULL,sep); /* system time */
+ tok=strtok(NULL,sep); /* wchan */
+ cred=strtok(NULL,sep); /* credentials */
+ major=strtok(tty,sep1);
+ minor=strtok(NULL,sep1);
+ if(strcmp(minor,"-1")==0) {
+ minor="?";
+ }
+ if(strcmp(major,"-1")==0) {
+ major="?";
+ } else if(strcmp(major,"12")==0) {
+ major="v";
+ } else if(strcmp(major,"0")==0) {
+ major="con";
+ minor="-";
+ } else if(strcmp(major,"5")==0) {
+ major="p";
+ } else major="x";
+ if((strcmp(major,"v")==0) && (strcmp(minor,"255")==0)) {
+ major="con";
+ minor="-";
+ }
+ sprintf(con,"%s%s",major,minor);
+ printf("%5s %5s %4s (%s)\n",pid,ppid,con,name);
+
+ }
+ closedir(d);
+ exit(0);
+}
diff --git a/release/picobsd/tinyware/ash/Makefile b/release/picobsd/tinyware/ash/Makefile
new file mode 100644
index 0000000..f8032aa
--- /dev/null
+++ b/release/picobsd/tinyware/ash/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.33 1997/07/04 21:40:55 christos Exp $
+# @(#)Makefile 8.4 (Berkeley) 5/5/95
+
+WARNS= 1
+PROG= sh
+SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
+ histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
+ mystring.c options.c parser.c redir.c show.c trap.c output.c var.c
+GENSRCS=arith.c arith_lex.c builtins.c builtins.h init.c nodes.c nodes.h \
+ syntax.c syntax.h token.h
+SRCS= ${SHSRCS} ${GENSRCS}
+
+LDADD+= -ll -ledit -ltermcap
+DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
+
+LFLAGS= -8 # 8-bit lex scanner for arithmetic
+
+CFLAGS+=-DSHELL -I. -I${.CURDIR}
+
+
+.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
+
+CLEANFILES+= mkinit mknodes mksyntax
+CLEANFILES+= mkinit.o mknodes.o mksyntax.o
+CLEANFILES+= ${GENSRCS} y.tab.h
+
+token.h: mktokens
+ sh ${.CURDIR}/mktokens
+
+builtins.c builtins.h: mkbuiltins builtins.def
+ cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
+
+init.c: mkinit ${SHSRCS}
+ ./mkinit ${.ALLSRC:S/^mkinit$//}
+
+nodes.c nodes.h: mknodes nodetypes nodes.c.pat
+ ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
+
+syntax.c syntax.h: mksyntax
+ ./mksyntax
+
+.include <bsd.prog.mk>
+
+${OBJS}: builtins.h nodes.h syntax.h token.h
diff --git a/release/picobsd/tinyware/ash/TOUR b/release/picobsd/tinyware/ash/TOUR
new file mode 100644
index 0000000..f5c00c4
--- /dev/null
+++ b/release/picobsd/tinyware/ash/TOUR
@@ -0,0 +1,357 @@
+# $NetBSD: TOUR,v 1.8 1996/10/16 14:24:56 christos Exp $
+# @(#)TOUR 8.1 (Berkeley) 5/31/93
+
+NOTE -- This is the original TOUR paper distributed with ash and
+does not represent the current state of the shell. It is provided anyway
+since it provides helpful information for how the shell is structured,
+but be warned that things have changed -- the current shell is
+still under development.
+
+================================================================
+
+ A Tour through Ash
+
+ Copyright 1989 by Kenneth Almquist.
+
+
+DIRECTORIES: The subdirectory bltin contains commands which can
+be compiled stand-alone. The rest of the source is in the main
+ash directory.
+
+SOURCE CODE GENERATORS: Files whose names begin with "mk" are
+programs that generate source code. A complete list of these
+programs is:
+
+ program intput files generates
+ ------- ------------ ---------
+ mkbuiltins builtins builtins.h builtins.c
+ mkinit *.c init.c
+ mknodes nodetypes nodes.h nodes.c
+ mksignames - signames.h signames.c
+ mksyntax - syntax.h syntax.c
+ mktokens - token.h
+ bltin/mkexpr unary_op binary_op operators.h operators.c
+
+There are undoubtedly too many of these. Mkinit searches all the
+C source files for entries looking like:
+
+ INIT {
+ x = 1; /* executed during initialization */
+ }
+
+ RESET {
+ x = 2; /* executed when the shell does a longjmp
+ back to the main command loop */
+ }
+
+ SHELLPROC {
+ x = 3; /* executed when the shell runs a shell procedure */
+ }
+
+It pulls this code out into routines which are when particular
+events occur. The intent is to improve modularity by isolating
+the information about which modules need to be explicitly
+initialized/reset within the modules themselves.
+
+Mkinit recognizes several constructs for placing declarations in
+the init.c file.
+ INCLUDE "file.h"
+includes a file. The storage class MKINIT makes a declaration
+available in the init.c file, for example:
+ MKINIT int funcnest; /* depth of function calls */
+MKINIT alone on a line introduces a structure or union declara-
+tion:
+ MKINIT
+ struct redirtab {
+ short renamed[10];
+ };
+Preprocessor #define statements are copied to init.c without any
+special action to request this.
+
+INDENTATION: The ash source is indented in multiples of six
+spaces. The only study that I have heard of on the subject con-
+cluded that the optimal amount to indent is in the range of four
+to six spaces. I use six spaces since it is not too big a jump
+from the widely used eight spaces. If you really hate six space
+indentation, use the adjind (source included) program to change
+it to something else.
+
+EXCEPTIONS: Code for dealing with exceptions appears in
+exceptions.c. The C language doesn't include exception handling,
+so I implement it using setjmp and longjmp. The global variable
+exception contains the type of exception. EXERROR is raised by
+calling error. EXINT is an interrupt. EXSHELLPROC is an excep-
+tion which is raised when a shell procedure is invoked. The pur-
+pose of EXSHELLPROC is to perform the cleanup actions associated
+with other exceptions. After these cleanup actions, the shell
+can interpret a shell procedure itself without exec'ing a new
+copy of the shell.
+
+INTERRUPTS: In an interactive shell, an interrupt will cause an
+EXINT exception to return to the main command loop. (Exception:
+EXINT is not raised if the user traps interrupts using the trap
+command.) The INTOFF and INTON macros (defined in exception.h)
+provide uninterruptable critical sections. Between the execution
+of INTOFF and the execution of INTON, interrupt signals will be
+held for later delivery. INTOFF and INTON can be nested.
+
+MEMALLOC.C: Memalloc.c defines versions of malloc and realloc
+which call error when there is no memory left. It also defines a
+stack oriented memory allocation scheme. Allocating off a stack
+is probably more efficient than allocation using malloc, but the
+big advantage is that when an exception occurs all we have to do
+to free up the memory in use at the time of the exception is to
+restore the stack pointer. The stack is implemented using a
+linked list of blocks.
+
+STPUTC: If the stack were contiguous, it would be easy to store
+strings on the stack without knowing in advance how long the
+string was going to be:
+ p = stackptr;
+ *p++ = c; /* repeated as many times as needed */
+ stackptr = p;
+The folloing three macros (defined in memalloc.h) perform these
+operations, but grow the stack if you run off the end:
+ STARTSTACKSTR(p);
+ STPUTC(c, p); /* repeated as many times as needed */
+ grabstackstr(p);
+
+We now start a top-down look at the code:
+
+MAIN.C: The main routine performs some initialization, executes
+the user's profile if necessary, and calls cmdloop. Cmdloop is
+repeatedly parses and executes commands.
+
+OPTIONS.C: This file contains the option processing code. It is
+called from main to parse the shell arguments when the shell is
+invoked, and it also contains the set builtin. The -i and -j op-
+tions (the latter turns on job control) require changes in signal
+handling. The routines setjobctl (in jobs.c) and setinteractive
+(in trap.c) are called to handle changes to these options.
+
+PARSING: The parser code is all in parser.c. A recursive des-
+cent parser is used. Syntax tables (generated by mksyntax) are
+used to classify characters during lexical analysis. There are
+three tables: one for normal use, one for use when inside single
+quotes, and one for use when inside double quotes. The tables
+are machine dependent because they are indexed by character vari-
+ables and the range of a char varies from machine to machine.
+
+PARSE OUTPUT: The output of the parser consists of a tree of
+nodes. The various types of nodes are defined in the file node-
+types.
+
+Nodes of type NARG are used to represent both words and the con-
+tents of here documents. An early version of ash kept the con-
+tents of here documents in temporary files, but keeping here do-
+cuments in memory typically results in significantly better per-
+formance. It would have been nice to make it an option to use
+temporary files for here documents, for the benefit of small
+machines, but the code to keep track of when to delete the tem-
+porary files was complex and I never fixed all the bugs in it.
+(AT&T has been maintaining the Bourne shell for more than ten
+years, and to the best of my knowledge they still haven't gotten
+it to handle temporary files correctly in obscure cases.)
+
+The text field of a NARG structure points to the text of the
+word. The text consists of ordinary characters and a number of
+special codes defined in parser.h. The special codes are:
+
+ CTLVAR Variable substitution
+ CTLENDVAR End of variable substitution
+ CTLBACKQ Command substitution
+ CTLBACKQ|CTLQUOTE Command substitution inside double quotes
+ CTLESC Escape next character
+
+A variable substitution contains the following elements:
+
+ CTLVAR type name '=' [ alternative-text CTLENDVAR ]
+
+The type field is a single character specifying the type of sub-
+stitution. The possible types are:
+
+ VSNORMAL $var
+ VSMINUS ${var-text}
+ VSMINUS|VSNUL ${var:-text}
+ VSPLUS ${var+text}
+ VSPLUS|VSNUL ${var:+text}
+ VSQUESTION ${var?text}
+ VSQUESTION|VSNUL ${var:?text}
+ VSASSIGN ${var=text}
+ VSASSIGN|VSNUL ${var=text}
+
+In addition, the type field will have the VSQUOTE flag set if the
+variable is enclosed in double quotes. The name of the variable
+comes next, terminated by an equals sign. If the type is not
+VSNORMAL, then the text field in the substitution follows, ter-
+minated by a CTLENDVAR byte.
+
+Commands in back quotes are parsed and stored in a linked list.
+The locations of these commands in the string are indicated by
+CTLBACKQ and CTLBACKQ+CTLQUOTE characters, depending upon whether
+the back quotes were enclosed in double quotes.
+
+The character CTLESC escapes the next character, so that in case
+any of the CTL characters mentioned above appear in the input,
+they can be passed through transparently. CTLESC is also used to
+escape '*', '?', '[', and '!' characters which were quoted by the
+user and thus should not be used for file name generation.
+
+CTLESC characters have proved to be particularly tricky to get
+right. In the case of here documents which are not subject to
+variable and command substitution, the parser doesn't insert any
+CTLESC characters to begin with (so the contents of the text
+field can be written without any processing). Other here docu-
+ments, and words which are not subject to splitting and file name
+generation, have the CTLESC characters removed during the vari-
+able and command substitution phase. Words which are subject
+splitting and file name generation have the CTLESC characters re-
+moved as part of the file name phase.
+
+EXECUTION: Command execution is handled by the following files:
+ eval.c The top level routines.
+ redir.c Code to handle redirection of input and output.
+ jobs.c Code to handle forking, waiting, and job control.
+ exec.c Code to to path searches and the actual exec sys call.
+ expand.c Code to evaluate arguments.
+ var.c Maintains the variable symbol table. Called from expand.c.
+
+EVAL.C: Evaltree recursively executes a parse tree. The exit
+status is returned in the global variable exitstatus. The alter-
+native entry evalbackcmd is called to evaluate commands in back
+quotes. It saves the result in memory if the command is a buil-
+tin; otherwise it forks off a child to execute the command and
+connects the standard output of the child to a pipe.
+
+JOBS.C: To create a process, you call makejob to return a job
+structure, and then call forkshell (passing the job structure as
+an argument) to create the process. Waitforjob waits for a job
+to complete. These routines take care of process groups if job
+control is defined.
+
+REDIR.C: Ash allows file descriptors to be redirected and then
+restored without forking off a child process. This is accom-
+plished by duplicating the original file descriptors. The redir-
+tab structure records where the file descriptors have be dupli-
+cated to.
+
+EXEC.C: The routine find_command locates a command, and enters
+the command in the hash table if it is not already there. The
+third argument specifies whether it is to print an error message
+if the command is not found. (When a pipeline is set up,
+find_command is called for all the commands in the pipeline be-
+fore any forking is done, so to get the commands into the hash
+table of the parent process. But to make command hashing as
+transparent as possible, we silently ignore errors at that point
+and only print error messages if the command cannot be found
+later.)
+
+The routine shellexec is the interface to the exec system call.
+
+EXPAND.C: Arguments are processed in three passes. The first
+(performed by the routine argstr) performs variable and command
+substitution. The second (ifsbreakup) performs word splitting
+and the third (expandmeta) performs file name generation. If the
+"/u" directory is simulated, then when "/u/username" is replaced
+by the user's home directory, the flag "didudir" is set. This
+tells the cd command that it should print out the directory name,
+just as it would if the "/u" directory were implemented using
+symbolic links.
+
+VAR.C: Variables are stored in a hash table. Probably we should
+switch to extensible hashing. The variable name is stored in the
+same string as the value (using the format "name=value") so that
+no string copying is needed to create the environment of a com-
+mand. Variables which the shell references internally are preal-
+located so that the shell can reference the values of these vari-
+ables without doing a lookup.
+
+When a program is run, the code in eval.c sticks any environment
+variables which precede the command (as in "PATH=xxx command") in
+the variable table as the simplest way to strip duplicates, and
+then calls "environment" to get the value of the environment.
+There are two consequences of this. First, if an assignment to
+PATH precedes the command, the value of PATH before the assign-
+ment must be remembered and passed to shellexec. Second, if the
+program turns out to be a shell procedure, the strings from the
+environment variables which preceded the command must be pulled
+out of the table and replaced with strings obtained from malloc,
+since the former will automatically be freed when the stack (see
+the entry on memalloc.c) is emptied.
+
+BUILTIN COMMANDS: The procedures for handling these are scat-
+tered throughout the code, depending on which location appears
+most appropriate. They can be recognized because their names al-
+ways end in "cmd". The mapping from names to procedures is
+specified in the file builtins, which is processed by the mkbuil-
+tins command.
+
+A builtin command is invoked with argc and argv set up like a
+normal program. A builtin command is allowed to overwrite its
+arguments. Builtin routines can call nextopt to do option pars-
+ing. This is kind of like getopt, but you don't pass argc and
+argv to it. Builtin routines can also call error. This routine
+normally terminates the shell (or returns to the main command
+loop if the shell is interactive), but when called from a builtin
+command it causes the builtin command to terminate with an exit
+status of 2.
+
+The directory bltins contains commands which can be compiled in-
+dependently but can also be built into the shell for efficiency
+reasons. The makefile in this directory compiles these programs
+in the normal fashion (so that they can be run regardless of
+whether the invoker is ash), but also creates a library named
+bltinlib.a which can be linked with ash. The header file bltin.h
+takes care of most of the differences between the ash and the
+stand-alone environment. The user should call the main routine
+"main", and #define main to be the name of the routine to use
+when the program is linked into ash. This #define should appear
+before bltin.h is included; bltin.h will #undef main if the pro-
+gram is to be compiled stand-alone.
+
+CD.C: This file defines the cd and pwd builtins. The pwd com-
+mand runs /bin/pwd the first time it is invoked (unless the user
+has already done a cd to an absolute pathname), but then
+remembers the current directory and updates it when the cd com-
+mand is run, so subsequent pwd commands run very fast. The main
+complication in the cd command is in the docd command, which
+resolves symbolic links into actual names and informs the user
+where the user ended up if he crossed a symbolic link.
+
+SIGNALS: Trap.c implements the trap command. The routine set-
+signal figures out what action should be taken when a signal is
+received and invokes the signal system call to set the signal ac-
+tion appropriately. When a signal that a user has set a trap for
+is caught, the routine "onsig" sets a flag. The routine dotrap
+is called at appropriate points to actually handle the signal.
+When an interrupt is caught and no trap has been set for that
+signal, the routine "onint" in error.c is called.
+
+OUTPUT: Ash uses it's own output routines. There are three out-
+put structures allocated. "Output" represents the standard out-
+put, "errout" the standard error, and "memout" contains output
+which is to be stored in memory. This last is used when a buil-
+tin command appears in backquotes, to allow its output to be col-
+lected without doing any I/O through the UNIX operating system.
+The variables out1 and out2 normally point to output and errout,
+respectively, but they are set to point to memout when appropri-
+ate inside backquotes.
+
+INPUT: The basic input routine is pgetc, which reads from the
+current input file. There is a stack of input files; the current
+input file is the top file on this stack. The code allows the
+input to come from a string rather than a file. (This is for the
+-c option and the "." and eval builtin commands.) The global
+variable plinno is saved and restored when files are pushed and
+popped from the stack. The parser routines store the number of
+the current line in this variable.
+
+DEBUGGING: If DEBUG is defined in shell.h, then the shell will
+write debugging information to the file $HOME/trace. Most of
+this is done using the TRACE macro, which takes a set of printf
+arguments inside two sets of parenthesis. Example:
+"TRACE(("n=%d0, n))". The double parenthesis are necessary be-
+cause the preprocessor can't handle functions with a variable
+number of arguments. Defining DEBUG also causes the shell to
+generate a core dump if it is sent a quit signal. The tracing
+code is in show.c.
diff --git a/release/picobsd/tinyware/ash/alias.c b/release/picobsd/tinyware/ash/alias.c
new file mode 100644
index 0000000..80626cd
--- /dev/null
+++ b/release/picobsd/tinyware/ash/alias.c
@@ -0,0 +1,267 @@
+/* $NetBSD: alias.c,v 1.9 1997/07/04 21:01:48 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: alias.c,v 1.9 1997/07/04 21:01:48 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <stdlib.h>
+#include "shell.h"
+#include "input.h"
+#include "output.h"
+#include "error.h"
+#include "memalloc.h"
+#include "mystring.h"
+#include "alias.h"
+#include "options.h" /* XXX for argptr (should remove?) */
+
+#define ATABSIZE 39
+
+struct alias *atab[ATABSIZE];
+
+STATIC void setalias __P((char *, char *));
+STATIC int unalias __P((char *));
+STATIC struct alias **hashalias __P((char *));
+
+STATIC
+void
+setalias(name, val)
+ char *name, *val;
+{
+ struct alias *ap, **app;
+
+ app = hashalias(name);
+ for (ap = *app; ap; ap = ap->next) {
+ if (equal(name, ap->name)) {
+ INTOFF;
+ ckfree(ap->val);
+ ap->val = savestr(val);
+ INTON;
+ return;
+ }
+ }
+ /* not found */
+ INTOFF;
+ ap = ckmalloc(sizeof (struct alias));
+ ap->name = savestr(name);
+ /*
+ * XXX - HACK: in order that the parser will not finish reading the
+ * alias value off the input before processing the next alias, we
+ * dummy up an extra space at the end of the alias. This is a crock
+ * and should be re-thought. The idea (if you feel inclined to help)
+ * is to avoid alias recursions. The mechanism used is: when
+ * expanding an alias, the value of the alias is pushed back on the
+ * input as a string and a pointer to the alias is stored with the
+ * string. The alias is marked as being in use. When the input
+ * routine finishes reading the string, it markes the alias not
+ * in use. The problem is synchronization with the parser. Since
+ * it reads ahead, the alias is marked not in use before the
+ * resulting token(s) is next checked for further alias sub. The
+ * H A C K is that we add a little fluff after the alias value
+ * so that the string will not be exhausted. This is a good
+ * idea ------- ***NOT***
+ */
+#ifdef notyet
+ ap->val = savestr(val);
+#else /* hack */
+ {
+ int len = strlen(val);
+ ap->val = ckmalloc(len + 2);
+ memcpy(ap->val, val, len);
+ ap->val[len] = ' '; /* fluff */
+ ap->val[len+1] = '\0';
+ }
+#endif
+ ap->next = *app;
+ *app = ap;
+ INTON;
+}
+
+STATIC int
+unalias(name)
+ char *name;
+ {
+ struct alias *ap, **app;
+
+ app = hashalias(name);
+
+ for (ap = *app; ap; app = &(ap->next), ap = ap->next) {
+ if (equal(name, ap->name)) {
+ /*
+ * if the alias is currently in use (i.e. its
+ * buffer is being used by the input routine) we
+ * just null out the name instead of freeing it.
+ * We could clear it out later, but this situation
+ * is so rare that it hardly seems worth it.
+ */
+ if (ap->flag & ALIASINUSE)
+ *ap->name = '\0';
+ else {
+ INTOFF;
+ *app = ap->next;
+ ckfree(ap->name);
+ ckfree(ap->val);
+ ckfree(ap);
+ INTON;
+ }
+ return (0);
+ }
+ }
+
+ return (1);
+}
+
+#ifdef mkinit
+MKINIT void rmaliases __P((void));
+
+SHELLPROC {
+ rmaliases();
+}
+#endif
+
+void
+rmaliases() {
+ struct alias *ap, *tmp;
+ int i;
+
+ INTOFF;
+ for (i = 0; i < ATABSIZE; i++) {
+ ap = atab[i];
+ atab[i] = NULL;
+ while (ap) {
+ ckfree(ap->name);
+ ckfree(ap->val);
+ tmp = ap;
+ ap = ap->next;
+ ckfree(tmp);
+ }
+ }
+ INTON;
+}
+
+struct alias *
+lookupalias(name, check)
+ char *name;
+ int check;
+{
+ struct alias *ap = *hashalias(name);
+
+ for (; ap; ap = ap->next) {
+ if (equal(name, ap->name)) {
+ if (check && (ap->flag & ALIASINUSE))
+ return (NULL);
+ return (ap);
+ }
+ }
+
+ return (NULL);
+}
+
+/*
+ * TODO - sort output
+ */
+int
+aliascmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *n, *v;
+ int ret = 0;
+ struct alias *ap;
+
+ if (argc == 1) {
+ int i;
+
+ for (i = 0; i < ATABSIZE; i++)
+ for (ap = atab[i]; ap; ap = ap->next) {
+ if (*ap->name != '\0')
+ out1fmt("alias %s=%s\n", ap->name, ap->val);
+ }
+ return (0);
+ }
+ while ((n = *++argv) != NULL) {
+ if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */
+ if ((ap = lookupalias(n, 0)) == NULL) {
+ outfmt(out2, "alias: %s not found\n", n);
+ ret = 1;
+ } else
+ out1fmt("alias %s=%s\n", n, ap->val);
+ else {
+ *v++ = '\0';
+ setalias(n, v);
+ }
+ }
+
+ return (ret);
+}
+
+int
+unaliascmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int i;
+
+ while ((i = nextopt("a")) != '\0') {
+ if (i == 'a') {
+ rmaliases();
+ return (0);
+ }
+ }
+ for (i = 0; *argptr; argptr++)
+ i = unalias(*argptr);
+
+ return (i);
+}
+
+STATIC struct alias **
+hashalias(p)
+ char *p;
+ {
+ unsigned int hashval;
+
+ hashval = *p << 4;
+ while (*p)
+ hashval+= *p++;
+ return &atab[hashval % ATABSIZE];
+}
diff --git a/release/picobsd/tinyware/ash/alias.h b/release/picobsd/tinyware/ash/alias.h
new file mode 100644
index 0000000..85bdbad
--- /dev/null
+++ b/release/picobsd/tinyware/ash/alias.h
@@ -0,0 +1,53 @@
+/* $NetBSD: alias.h,v 1.4 1995/05/11 21:28:42 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)alias.h 8.2 (Berkeley) 5/4/95
+ */
+
+#define ALIASINUSE 1
+
+struct alias {
+ struct alias *next;
+ char *name;
+ char *val;
+ int flag;
+};
+
+struct alias *lookupalias __P((char *, int));
+int aliascmd __P((int, char **));
+int unaliascmd __P((int, char **));
+void rmaliases __P((void));
diff --git a/release/picobsd/tinyware/ash/arith.h b/release/picobsd/tinyware/ash/arith.h
new file mode 100644
index 0000000..d40e14b
--- /dev/null
+++ b/release/picobsd/tinyware/ash/arith.h
@@ -0,0 +1,41 @@
+/* $NetBSD: arith.h,v 1.2 1997/07/04 21:01:49 christos Exp $ */
+
+/*-
+ * Copyright (c) 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#)arith.h 1.1 (Berkeley) 5/4/95
+ */
+
+int arith __P((char *));
+int expcmd __P((int , char **));
+void arith_lex_reset __P((void));
+int yylex __P((void));
diff --git a/release/picobsd/tinyware/ash/arith.y b/release/picobsd/tinyware/ash/arith.y
new file mode 100644
index 0000000..9785014
--- /dev/null
+++ b/release/picobsd/tinyware/ash/arith.y
@@ -0,0 +1,201 @@
+%{
+/* $NetBSD: arith.y,v 1.8 1997/07/04 21:01:50 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: arith.y,v 1.8 1997/07/04 21:01:50 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include "arith.h"
+#include "shell.h"
+#include "error.h"
+#include "output.h"
+#include "memalloc.h"
+
+char *arith_buf, *arith_startbuf;
+
+void yyerror __P((char *));
+int yyparse __P((void));
+#ifdef TESTARITH
+int main __P((int , char *[]));
+int error __P((char *));
+#endif
+
+int
+arith(s)
+ char *s;
+{
+ long result;
+
+ arith_buf = arith_startbuf = s;
+
+ INTOFF;
+ result = yyparse();
+ arith_lex_reset(); /* reprime lex */
+ INTON;
+
+ return (result);
+}
+
+
+/*
+ * The exp(1) builtin.
+ */
+int
+expcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *p;
+ char *concat;
+ char **ap;
+ long i;
+
+ if (argc > 1) {
+ p = argv[1];
+ if (argc > 2) {
+ /*
+ * concatenate arguments
+ */
+ STARTSTACKSTR(concat);
+ ap = argv + 2;
+ for (;;) {
+ while (*p)
+ STPUTC(*p++, concat);
+ if ((p = *ap++) == NULL)
+ break;
+ STPUTC(' ', concat);
+ }
+ STPUTC('\0', concat);
+ p = grabstackstr(concat);
+ }
+ } else
+ p = "";
+
+ i = arith(p);
+
+ out1fmt("%d\n", i);
+ return (! i);
+}
+
+/*************************/
+#ifdef TEST_ARITH
+#include <stdio.h>
+main(argc, argv)
+ char *argv[];
+{
+ printf("%d\n", exp(argv[1]));
+}
+error(s)
+ char *s;
+{
+ fprintf(stderr, "exp: %s\n", s);
+ exit(1);
+}
+#endif
+%}
+%token ARITH_NUM ARITH_LPAREN ARITH_RPAREN
+
+%left ARITH_OR
+%left ARITH_AND
+%left ARITH_BOR
+%left ARITH_BXOR
+%left ARITH_BAND
+%left ARITH_EQ ARITH_NE
+%left ARITH_LT ARITH_GT ARITH_GE ARITH_LE
+%left ARITH_LSHIFT ARITH_RSHIFT
+%left ARITH_ADD ARITH_SUB
+%left ARITH_MUL ARITH_DIV ARITH_REM
+%left ARITH_UNARYMINUS ARITH_UNARYPLUS ARITH_NOT ARITH_BNOT
+%%
+
+exp: expr = {
+ return ($1);
+ }
+ ;
+
+
+expr: ARITH_LPAREN expr ARITH_RPAREN = { $$ = $2; }
+ | expr ARITH_OR expr = { $$ = $1 ? $1 : $3 ? $3 : 0; }
+ | expr ARITH_AND expr = { $$ = $1 ? ( $3 ? $3 : 0 ) : 0; }
+ | expr ARITH_BOR expr = { $$ = $1 | $3; }
+ | expr ARITH_BXOR expr = { $$ = $1 ^ $3; }
+ | expr ARITH_BAND expr = { $$ = $1 & $3; }
+ | expr ARITH_EQ expr = { $$ = $1 == $3; }
+ | expr ARITH_GT expr = { $$ = $1 > $3; }
+ | expr ARITH_GE expr = { $$ = $1 >= $3; }
+ | expr ARITH_LT expr = { $$ = $1 < $3; }
+ | expr ARITH_LE expr = { $$ = $1 <= $3; }
+ | expr ARITH_NE expr = { $$ = $1 != $3; }
+ | expr ARITH_LSHIFT expr = { $$ = $1 << $3; }
+ | expr ARITH_RSHIFT expr = { $$ = $1 >> $3; }
+ | expr ARITH_ADD expr = { $$ = $1 + $3; }
+ | expr ARITH_SUB expr = { $$ = $1 - $3; }
+ | expr ARITH_MUL expr = { $$ = $1 * $3; }
+ | expr ARITH_DIV expr = {
+ if ($3 == 0)
+ yyerror("division by zero");
+ $$ = $1 / $3;
+ }
+ | expr ARITH_REM expr = {
+ if ($3 == 0)
+ yyerror("division by zero");
+ $$ = $1 % $3;
+ }
+ | ARITH_NOT expr = { $$ = !($2); }
+ | ARITH_BNOT expr = { $$ = ~($2); }
+ | ARITH_SUB expr %prec ARITH_UNARYMINUS = { $$ = -($2); }
+ | ARITH_ADD expr %prec ARITH_UNARYPLUS = { $$ = $2; }
+ | ARITH_NUM
+ ;
+%%
+void
+yyerror(s)
+ char *s;
+{
+
+ yyerrok;
+ yyclearin;
+ arith_lex_reset(); /* reprime lex */
+ error("arithmetic expression: %s: \"%s\"", s, arith_startbuf);
+}
diff --git a/release/picobsd/tinyware/ash/arith_lex.l b/release/picobsd/tinyware/ash/arith_lex.l
new file mode 100644
index 0000000..e3c18c6
--- /dev/null
+++ b/release/picobsd/tinyware/ash/arith_lex.l
@@ -0,0 +1,93 @@
+%{
+/* $NetBSD: arith_lex.l,v 1.7 1997/07/04 21:01:51 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: arith_lex.l,v 1.7 1997/07/04 21:01:51 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <unistd.h>
+#include "y.tab.h"
+#include "error.h"
+#include "arith.h"
+
+extern yylval;
+extern char *arith_buf, *arith_startbuf;
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max) \
+ result = (*buf = *arith_buf++) ? 1 : YY_NULL;
+#define YY_NO_UNPUT
+%}
+
+%%
+[ \t\n] { ; }
+[0-9]+ { yylval = atol(yytext); return(ARITH_NUM); }
+"(" { return(ARITH_LPAREN); }
+")" { return(ARITH_RPAREN); }
+"||" { return(ARITH_OR); }
+"&&" { return(ARITH_AND); }
+"|" { return(ARITH_BOR); }
+"^" { return(ARITH_BXOR); }
+"&" { return(ARITH_BAND); }
+"==" { return(ARITH_EQ); }
+"!=" { return(ARITH_NE); }
+">" { return(ARITH_GT); }
+">=" { return(ARITH_GE); }
+"<" { return(ARITH_LT); }
+"<=" { return(ARITH_LE); }
+"<<" { return(ARITH_LSHIFT); }
+">>" { return(ARITH_RSHIFT); }
+"*" { return(ARITH_MUL); }
+"/" { return(ARITH_DIV); }
+"%" { return(ARITH_REM); }
+"+" { return(ARITH_ADD); }
+"-" { return(ARITH_SUB); }
+"~" { return(ARITH_BNOT); }
+"!" { return(ARITH_NOT); }
+. { error("arith: syntax error: \"%s\"\n", arith_startbuf); }
+%%
+
+void
+arith_lex_reset() {
+ YY_NEW_FILE;
+}
diff --git a/release/picobsd/tinyware/ash/bltin/bltin.h b/release/picobsd/tinyware/ash/bltin/bltin.h
new file mode 100644
index 0000000..991de81
--- /dev/null
+++ b/release/picobsd/tinyware/ash/bltin/bltin.h
@@ -0,0 +1,78 @@
+/* $NetBSD: bltin.h,v 1.9 1997/07/04 21:02:29 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)bltin.h 8.1 (Berkeley) 5/31/93
+ */
+
+/*
+ * This file is included by programs which are optionally built into the
+ * shell. If SHELL is defined, we try to map the standard UNIX library
+ * routines to ash routines using defines.
+ */
+
+#include "../shell.h"
+#include "../mystring.h"
+#ifdef SHELL
+#include "../output.h"
+#define stdout out1
+#define stderr out2
+#define printf out1fmt
+#define putc(c, file) outc(c, file)
+#define putchar(c) out1c(c)
+#define fprintf outfmt
+#define fputs outstr
+#define fflush flushout
+#define INITARGS(argv)
+#define warnx(a, b, c) { \
+ char buf[64]; \
+ (void)snprintf(buf, sizeof(buf), a, b, c); \
+ error("%s", buf); \
+}
+
+#else
+#undef NULL
+#include <stdio.h>
+#undef main
+#define INITARGS(argv) if ((commandname = argv[0]) == NULL) {fputs("Argc is zero\n", stderr); exit(2);} else
+#endif
+
+pointer stalloc __P((int));
+void error __P((char *, ...));
+int echocmd __P((int, char **));
+
+
+extern char *commandname;
diff --git a/release/picobsd/tinyware/ash/bltin/echo.1 b/release/picobsd/tinyware/ash/bltin/echo.1
new file mode 100644
index 0000000..202ad6f
--- /dev/null
+++ b/release/picobsd/tinyware/ash/bltin/echo.1
@@ -0,0 +1,113 @@
+.\" $NetBSD: echo.1,v 1.8 1996/10/16 15:27:03 christos Exp $
+.\"
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Kenneth Almquist.
+.\" Copyright 1989 by Kenneth Almquist
+.\"
+.\" 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.
+.\"
+.\" @(#)echo.1 8.1 (Berkeley) 5/31/93
+.\"
+.Dd May 31, 1993
+.Dt ECHO 1
+.Os BSD 4.4
+.Sh NAME
+.Nm echo
+.Nd produce message in a shell script
+.Sh SYNOPSIS
+.Nm
+.Op Fl n | Fl e
+.Ar args...
+.Sh DESCRIPTION
+.Nm
+prints its arguments on the standard output, separated by spaces.
+Unless the
+.Fl n
+option is present, a newline is output following the arguments.
+The
+.Fl e
+option causes
+.Nm
+to treat the escape sequences specially, as described in the following
+paragraph.
+The
+.Fl e
+option is the default, and is provided solely for compatibility with
+other systems.
+Only one of the options
+.Fl n
+and
+.Fl e
+may be given.
+.Pp
+If any of the following sequences of characters is encountered during
+output, the sequence is not output. Instead, the specified action is
+performed:
+.Bl -tag -width indent
+.It Li \eb
+A backspace character is output.
+.It Li \ec
+Subsequent output is suppressed. This is normally used at the end of the
+last argument to suppress the trailing newline that
+.Nm
+would otherwise output.
+.It Li \ef
+Output a form feed.
+.It Li \en
+Output a newline character.
+.It Li \er
+Output a carriage return.
+.It Li \et
+Output a (horizontal) tab character.
+.It Li \ev
+Output a vertical tab.
+.It Li \e0 Ns Ar digits
+Output the character whose value is given by zero to three digits.
+If there are zero digits, a nul character is output.
+.It Li \e\e
+Output a backslash.
+.El
+.Sh HINTS
+Remember that backslash is special to the shell and needs to be escaped.
+To output a message to standard error, say
+.Pp
+.D1 echo message >&2
+.Sh BUGS
+The octal character escape mechanism
+.Pq Li \e0 Ns Ar digits
+differs from the
+C language mechanism.
+.Pp
+There is no way to force
+.Nm
+to treat its arguments literally, rather than interpreting them as
+options and escape sequences.
diff --git a/release/picobsd/tinyware/ash/bltin/echo.c b/release/picobsd/tinyware/ash/bltin/echo.c
new file mode 100644
index 0000000..726346e
--- /dev/null
+++ b/release/picobsd/tinyware/ash/bltin/echo.c
@@ -0,0 +1,107 @@
+/* $NetBSD: echo.c,v 1.8 1996/11/02 18:26:06 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)echo.c 8.1 (Berkeley) 5/31/93
+ */
+
+/*
+ * Echo command.
+ */
+
+#define main echocmd
+
+#include "bltin.h"
+
+/* #define eflag 1 */
+
+int
+main(argc, argv) char **argv; {
+ register char **ap;
+ register char *p;
+ register char c;
+ int count;
+ int nflag = 0;
+#ifndef eflag
+ int eflag = 0;
+#endif
+
+ ap = argv;
+ if (argc)
+ ap++;
+ if ((p = *ap) != NULL) {
+ if (equal(p, "-n")) {
+ nflag++;
+ ap++;
+ } else if (equal(p, "-e")) {
+#ifndef eflag
+ eflag++;
+#endif
+ ap++;
+ }
+ }
+ while ((p = *ap++) != NULL) {
+ while ((c = *p++) != '\0') {
+ if (c == '\\' && eflag) {
+ switch (*p++) {
+ case 'b': c = '\b'; break;
+ case 'c': return 0; /* exit */
+ case 'f': c = '\f'; break;
+ case 'n': c = '\n'; break;
+ case 'r': c = '\r'; break;
+ case 't': c = '\t'; break;
+ case 'v': c = '\v'; break;
+ case '\\': break; /* c = '\\' */
+ case '0':
+ c = 0;
+ count = 3;
+ while (--count >= 0 && (unsigned)(*p - '0') < 8)
+ c = (c << 3) + (*p++ - '0');
+ break;
+ default:
+ p--;
+ break;
+ }
+ }
+ putchar(c);
+ }
+ if (*ap)
+ putchar(' ');
+ }
+ if (! nflag)
+ putchar('\n');
+ return 0;
+}
diff --git a/release/picobsd/tinyware/ash/builtins.def b/release/picobsd/tinyware/ash/builtins.def
new file mode 100644
index 0000000..61ec759
--- /dev/null
+++ b/release/picobsd/tinyware/ash/builtins.def
@@ -0,0 +1,92 @@
+#!/bin/sh -
+# $NetBSD: builtins.def,v 1.14 1997/03/14 01:42:18 christos Exp $
+#
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)builtins.def 8.4 (Berkeley) 5/4/95
+
+#
+# This file lists all the builtin commands. The first column is the name
+# of a C routine. The -j flag, if present, specifies that this command
+# is to be excluded from systems without job control, and the -h flag,
+# if present specifies that this command is to be excluded from systems
+# based on the SMALL compile-time symbol. The rest of the line
+# specifies the command name or names used to run the command. The entry
+# for bltincmd, which is run when the user does not specify a command, must
+# come first.
+#
+# NOTE: bltincmd must come first!
+
+bltincmd command
+#alloccmd alloc
+bgcmd -j bg
+breakcmd break continue
+#catfcmd catf
+cdcmd cd chdir
+dotcmd .
+echocmd echo
+evalcmd eval
+execcmd exec
+exitcmd exit
+expcmd exp let
+exportcmd export readonly
+#exprcmd expr test [
+falsecmd false
+histcmd -h fc
+fgcmd -j fg
+getoptscmd getopts
+hashcmd hash
+jobidcmd jobid
+jobscmd jobs
+#linecmd line
+localcmd local
+#nlechocmd nlecho
+#printfcmd printf
+pwdcmd pwd
+readcmd read
+returncmd return
+setcmd set
+setvarcmd setvar
+shiftcmd shift
+trapcmd trap
+truecmd : true
+typecmd type
+umaskcmd umask
+unaliascmd unalias
+unsetcmd unset
+waitcmd wait
+#foocmd foo
+aliascmd alias
+ulimitcmd ulimit
diff --git a/release/picobsd/tinyware/ash/cd.c b/release/picobsd/tinyware/ash/cd.c
new file mode 100644
index 0000000..b029045
--- /dev/null
+++ b/release/picobsd/tinyware/ash/cd.c
@@ -0,0 +1,383 @@
+/* $NetBSD: cd.c,v 1.23 1997/07/04 20:59:40 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: cd.c,v 1.23 1997/07/04 20:59:40 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+/*
+ * The cd and pwd commands.
+ */
+
+#include "shell.h"
+#include "var.h"
+#include "nodes.h" /* for jobs.h */
+#include "jobs.h"
+#include "options.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "exec.h"
+#include "redir.h"
+#include "mystring.h"
+#include "show.h"
+#include "cd.h"
+
+STATIC int docd __P((char *, int));
+STATIC char *getcomponent __P((void));
+STATIC void updatepwd __P((char *));
+
+char *curdir = NULL; /* current working directory */
+char *prevdir; /* previous working directory */
+STATIC char *cdcomppath;
+
+int
+cdcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *dest;
+ char *path;
+ char *p;
+ struct stat statb;
+ int print = 0;
+
+ nextopt(nullstr);
+ if ((dest = *argptr) == NULL && (dest = bltinlookup("HOME", 1)) == NULL)
+ error("HOME not set");
+ if (*dest == '\0')
+ dest = ".";
+ if (dest[0] == '-' && dest[1] == '\0') {
+ dest = prevdir ? prevdir : curdir;
+ print = 1;
+ if (dest)
+ print = 1;
+ else
+ dest = ".";
+ }
+ if (*dest == '/' || (path = bltinlookup("CDPATH", 1)) == NULL)
+ path = nullstr;
+ while ((p = padvance(&path, dest)) != NULL) {
+ if (stat(p, &statb) >= 0 && S_ISDIR(statb.st_mode)) {
+ if (!print) {
+ /*
+ * XXX - rethink
+ */
+ if (p[0] == '.' && p[1] == '/')
+ p += 2;
+ print = strcmp(p, dest);
+ }
+ if (docd(p, print) >= 0)
+ return 0;
+
+ }
+ }
+ error("can't cd to %s", dest);
+ /*NOTREACHED*/
+ return 0;
+}
+
+
+/*
+ * Actually do the chdir. In an interactive shell, print the
+ * directory name if "print" is nonzero.
+ */
+
+STATIC int
+docd(dest, print)
+ char *dest;
+ int print;
+{
+ char *p;
+ char *q;
+ char *component;
+ struct stat statb;
+ int first;
+ int badstat;
+
+ TRACE(("docd(\"%s\", %d) called\n", dest, print));
+
+ /*
+ * Check each component of the path. If we find a symlink or
+ * something we can't stat, clear curdir to force a getcwd()
+ * next time we get the value of the current directory.
+ */
+ badstat = 0;
+ cdcomppath = stalloc(strlen(dest) + 1);
+ scopy(dest, cdcomppath);
+ STARTSTACKSTR(p);
+ if (*dest == '/') {
+ STPUTC('/', p);
+ cdcomppath++;
+ }
+ first = 1;
+ while ((q = getcomponent()) != NULL) {
+ if (q[0] == '\0' || (q[0] == '.' && q[1] == '\0'))
+ continue;
+ if (! first)
+ STPUTC('/', p);
+ first = 0;
+ component = q;
+ while (*q)
+ STPUTC(*q++, p);
+ if (equal(component, ".."))
+ continue;
+ STACKSTRNUL(p);
+ if ((lstat(stackblock(), &statb) < 0)
+ || (S_ISLNK(statb.st_mode))) {
+ /* print = 1; */
+ badstat = 1;
+ break;
+ }
+ }
+
+ INTOFF;
+ if (chdir(dest) < 0) {
+ INTON;
+ return -1;
+ }
+ updatepwd(badstat ? NULL : dest);
+ INTON;
+ if (print && iflag && curdir)
+ out1fmt("%s\n", curdir);
+ return 0;
+}
+
+
+/*
+ * Get the next component of the path name pointed to by cdcomppath.
+ * This routine overwrites the string pointed to by cdcomppath.
+ */
+
+STATIC char *
+getcomponent() {
+ char *p;
+ char *start;
+
+ if ((p = cdcomppath) == NULL)
+ return NULL;
+ start = cdcomppath;
+ while (*p != '/' && *p != '\0')
+ p++;
+ if (*p == '\0') {
+ cdcomppath = NULL;
+ } else {
+ *p++ = '\0';
+ cdcomppath = p;
+ }
+ return start;
+}
+
+
+
+/*
+ * Update curdir (the name of the current directory) in response to a
+ * cd command. We also call hashcd to let the routines in exec.c know
+ * that the current directory has changed.
+ */
+
+STATIC void
+updatepwd(dir)
+ char *dir;
+ {
+ char *new;
+ char *p;
+
+ hashcd(); /* update command hash table */
+
+ /*
+ * If our argument is NULL, we don't know the current directory
+ * any more because we traversed a symbolic link or something
+ * we couldn't stat().
+ */
+ if (dir == NULL) {
+ if (prevdir)
+ ckfree(prevdir);
+ INTOFF;
+ prevdir = curdir;
+ curdir = NULL;
+ getpwd();
+ INTON;
+ return;
+ }
+
+ cdcomppath = stalloc(strlen(dir) + 1);
+ scopy(dir, cdcomppath);
+ STARTSTACKSTR(new);
+ if (*dir != '/') {
+ if (curdir == NULL)
+ return;
+ p = curdir;
+ while (*p)
+ STPUTC(*p++, new);
+ if (p[-1] == '/')
+ STUNPUTC(new);
+ }
+ while ((p = getcomponent()) != NULL) {
+ if (equal(p, "..")) {
+ while (new > stackblock() && (STUNPUTC(new), *new) != '/');
+ } else if (*p != '\0' && ! equal(p, ".")) {
+ STPUTC('/', new);
+ while (*p)
+ STPUTC(*p++, new);
+ }
+ }
+ if (new == stackblock())
+ STPUTC('/', new);
+ STACKSTRNUL(new);
+ INTOFF;
+ if (prevdir)
+ ckfree(prevdir);
+ prevdir = curdir;
+ curdir = savestr(stackblock());
+ setvar("PWD", curdir, VEXPORT|VTEXTFIXED);
+ INTON;
+}
+
+
+
+int
+pwdcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ getpwd();
+ out1str(curdir);
+ out1c('\n');
+ return 0;
+}
+
+
+
+
+#define MAXPWD 256
+
+/*
+ * Find out what the current directory is. If we already know the current
+ * directory, this routine returns immediately.
+ */
+void
+getpwd()
+{
+ char buf[MAXPWD];
+
+ if (curdir)
+ return;
+ /*
+ * Things are a bit complicated here; we could have just used
+ * getcwd, but traditionally getcwd is implemented using popen
+ * to /bin/pwd. This creates a problem for us, since we cannot
+ * keep track of the job if it is being ran behind our backs.
+ * So we re-implement getcwd(), and we suppress interrupts
+ * throughout the process. This is not completely safe, since
+ * the user can still break out of it by killing the pwd program.
+ * We still try to use getcwd for systems that we know have a
+ * c implementation of getcwd, that does not open a pipe to
+ * /bin/pwd.
+ */
+#if defined(__NetBSD__) || defined(__SVR4)
+
+ if (getcwd(buf, sizeof(buf)) == NULL) {
+ char *pwd = getenv("PWD");
+ struct stat stdot, stpwd;
+
+ if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
+ stat(pwd, &stpwd) != -1 &&
+ stdot.st_dev == stpwd.st_dev &&
+ stdot.st_ino == stpwd.st_ino) {
+ curdir = savestr(pwd);
+ return;
+ }
+ error("getcwd() failed: %s", strerror(errno));
+ }
+ curdir = savestr(buf);
+#else
+ {
+ char *p;
+ int i;
+ int status;
+ struct job *jp;
+ int pip[2];
+
+ INTOFF;
+ if (pipe(pip) < 0)
+ error("Pipe call failed");
+ jp = makejob((union node *)NULL, 1);
+ if (forkshell(jp, (union node *)NULL, FORK_NOJOB) == 0) {
+ (void) close(pip[0]);
+ if (pip[1] != 1) {
+ close(1);
+ copyfd(pip[1], 1);
+ close(pip[1]);
+ }
+ (void) execl("/bin/pwd", "pwd", (char *)0);
+ error("Cannot exec /bin/pwd");
+ }
+ (void) close(pip[1]);
+ pip[1] = -1;
+ p = buf;
+ while ((i = read(pip[0], p, buf + MAXPWD - p)) > 0
+ || (i == -1 && errno == EINTR)) {
+ if (i > 0)
+ p += i;
+ }
+ (void) close(pip[0]);
+ pip[0] = -1;
+ status = waitforjob(jp);
+ if (status != 0)
+ error((char *)0);
+ if (i < 0 || p == buf || p[-1] != '\n')
+ error("pwd command failed");
+ p[-1] = '\0';
+ }
+ curdir = savestr(buf);
+ INTON;
+#endif
+}
diff --git a/release/picobsd/tinyware/ash/cd.h b/release/picobsd/tinyware/ash/cd.h
new file mode 100644
index 0000000..29937c1
--- /dev/null
+++ b/release/picobsd/tinyware/ash/cd.h
@@ -0,0 +1,39 @@
+/* $NetBSD: cd.h,v 1.2 1997/07/04 21:01:52 christos Exp $ */
+
+/*-
+ * Copyright (c) 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ */
+
+void getpwd __P((void));
+int cdcmd __P((int, char **));
+int pwdcmd __P((int, char **));
diff --git a/release/picobsd/tinyware/ash/error.c b/release/picobsd/tinyware/ash/error.c
new file mode 100644
index 0000000..22e44d2
--- /dev/null
+++ b/release/picobsd/tinyware/ash/error.c
@@ -0,0 +1,291 @@
+/* $NetBSD: error.c,v 1.17 1997/07/04 21:01:54 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)error.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: error.c,v 1.17 1997/07/04 21:01:54 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * Errors and exceptions.
+ */
+
+#include "shell.h"
+#include "main.h"
+#include "options.h"
+#include "output.h"
+#include "error.h"
+#include "show.h"
+#include <signal.h>
+#include <unistd.h>
+#include <errno.h>
+
+
+/*
+ * Code to handle exceptions in C.
+ */
+
+struct jmploc *handler;
+int exception;
+volatile int suppressint;
+volatile int intpending;
+char *commandname;
+
+
+static void exverror __P((int, char *, va_list)) __attribute__((__noreturn__));
+
+/*
+ * Called to raise an exception. Since C doesn't include exceptions, we
+ * just do a longjmp to the exception handler. The type of exception is
+ * stored in the global variable "exception".
+ */
+
+void
+exraise(e)
+ int e;
+{
+ if (handler == NULL)
+ abort();
+ exception = e;
+ longjmp(handler->loc, 1);
+}
+
+
+/*
+ * Called from trap.c when a SIGINT is received. (If the user specifies
+ * that SIGINT is to be trapped or ignored using the trap builtin, then
+ * this routine is not called.) Suppressint is nonzero when interrupts
+ * are held using the INTOFF macro. The call to _exit is necessary because
+ * there is a short period after a fork before the signal handlers are
+ * set to the appropriate value for the child. (The test for iflag is
+ * just defensive programming.)
+ */
+
+void
+onint() {
+ sigset_t sigset;
+
+ if (suppressint) {
+ intpending++;
+ return;
+ }
+ intpending = 0;
+ sigemptyset(&sigset);
+ sigprocmask(SIG_SETMASK, &sigset, NULL);
+ if (rootshell && iflag)
+ exraise(EXINT);
+ else
+ _exit(128 + SIGINT);
+}
+
+
+/*
+ * Exverror is called to raise the error exception. If the first argument
+ * is not NULL then error prints an error message using printf style
+ * formatting. It then raises the error exception.
+ */
+static void
+exverror(cond, msg, ap)
+ int cond;
+ char *msg;
+ va_list ap;
+{
+ CLEAR_PENDING_INT;
+ INTOFF;
+
+#ifdef DEBUG
+ if (msg)
+ TRACE(("exverror(%d, \"%s\") pid=%d\n", cond, msg, getpid()));
+ else
+ TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid()));
+#endif
+ if (msg) {
+ if (commandname)
+ outfmt(&errout, "%s: ", commandname);
+ doformat(&errout, msg, ap);
+ out2c('\n');
+ }
+ flushall();
+ exraise(cond);
+}
+
+
+#ifdef __STDC__
+void
+error(char *msg, ...)
+#else
+void
+error(va_alist)
+ va_dcl
+#endif
+{
+#ifndef __STDC__
+ char *msg;
+#endif
+ va_list ap;
+#ifdef __STDC__
+ va_start(ap, msg);
+#else
+ va_start(ap);
+ msg = va_arg(ap, char *);
+#endif
+ exverror(EXERROR, msg, ap);
+ va_end(ap);
+}
+
+
+#ifdef __STDC__
+void
+exerror(int cond, char *msg, ...)
+#else
+void
+exerror(va_alist)
+ va_dcl
+#endif
+{
+#ifndef __STDC__
+ int cond;
+ char *msg;
+#endif
+ va_list ap;
+#ifdef __STDC__
+ va_start(ap, msg);
+#else
+ va_start(ap);
+ cond = va_arg(ap, int);
+ msg = va_arg(ap, char *);
+#endif
+ exverror(cond, msg, ap);
+ va_end(ap);
+}
+
+
+
+/*
+ * Table of error messages.
+ */
+
+struct errname {
+ short errcode; /* error number */
+ short action; /* operation which encountered the error */
+ char *msg; /* text describing the error */
+};
+
+
+#define ALL (E_OPEN|E_CREAT|E_EXEC)
+
+STATIC const struct errname errormsg[] = {
+ { EINTR, ALL, "interrupted" },
+ { EACCES, ALL, "permission denied" },
+ { EIO, ALL, "I/O error" },
+ { ENOENT, E_OPEN, "no such file" },
+ { ENOENT, E_CREAT,"directory nonexistent" },
+ { ENOENT, E_EXEC, "not found" },
+ { ENOTDIR, E_OPEN, "no such file" },
+ { ENOTDIR, E_CREAT,"directory nonexistent" },
+ { ENOTDIR, E_EXEC, "not found" },
+ { EISDIR, ALL, "is a directory" },
+#ifdef notdef
+ { EMFILE, ALL, "too many open files" },
+#endif
+ { ENFILE, ALL, "file table overflow" },
+ { ENOSPC, ALL, "file system full" },
+#ifdef EDQUOT
+ { EDQUOT, ALL, "disk quota exceeded" },
+#endif
+#ifdef ENOSR
+ { ENOSR, ALL, "no streams resources" },
+#endif
+ { ENXIO, ALL, "no such device or address" },
+ { EROFS, ALL, "read-only file system" },
+ { ETXTBSY, ALL, "text busy" },
+#ifdef SYSV
+ { EAGAIN, E_EXEC, "not enough memory" },
+#endif
+ { ENOMEM, ALL, "not enough memory" },
+#ifdef ENOLINK
+ { ENOLINK, ALL, "remote access failed" },
+#endif
+#ifdef EMULTIHOP
+ { EMULTIHOP, ALL, "remote access failed" },
+#endif
+#ifdef ECOMM
+ { ECOMM, ALL, "remote access failed" },
+#endif
+#ifdef ESTALE
+ { ESTALE, ALL, "remote access failed" },
+#endif
+#ifdef ETIMEDOUT
+ { ETIMEDOUT, ALL, "remote access failed" },
+#endif
+#ifdef ELOOP
+ { ELOOP, ALL, "symbolic link loop" },
+#endif
+ { E2BIG, E_EXEC, "argument list too long" },
+#ifdef ELIBACC
+ { ELIBACC, E_EXEC, "shared library missing" },
+#endif
+ { 0, 0, NULL },
+};
+
+
+/*
+ * Return a string describing an error. The returned string may be a
+ * pointer to a static buffer that will be overwritten on the next call.
+ * Action describes the operation that got the error.
+ */
+
+char *
+errmsg(e, action)
+ int e;
+ int action;
+{
+ struct errname const *ep;
+ static char buf[12];
+
+ for (ep = errormsg ; ep->errcode ; ep++) {
+ if (ep->errcode == e && (ep->action & action) != 0)
+ return ep->msg;
+ }
+ fmtstr(buf, sizeof buf, "error %d", e);
+ return buf;
+}
diff --git a/release/picobsd/tinyware/ash/error.h b/release/picobsd/tinyware/ash/error.h
new file mode 100644
index 0000000..d54ce6a
--- /dev/null
+++ b/release/picobsd/tinyware/ash/error.h
@@ -0,0 +1,108 @@
+/* $NetBSD: error.h,v 1.10 1997/07/04 21:01:55 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)error.h 8.2 (Berkeley) 5/4/95
+ */
+
+/*
+ * Types of operations (passed to the errmsg routine).
+ */
+
+#define E_OPEN 01 /* opening a file */
+#define E_CREAT 02 /* creating a file */
+#define E_EXEC 04 /* executing a program */
+
+
+/*
+ * We enclose jmp_buf in a structure so that we can declare pointers to
+ * jump locations. The global variable handler contains the location to
+ * jump to when an exception occurs, and the global variable exception
+ * contains a code identifying the exeception. To implement nested
+ * exception handlers, the user should save the value of handler on entry
+ * to an inner scope, set handler to point to a jmploc structure for the
+ * inner scope, and restore handler on exit from the scope.
+ */
+
+#include <setjmp.h>
+
+struct jmploc {
+ jmp_buf loc;
+};
+
+extern struct jmploc *handler;
+extern int exception;
+
+/* exceptions */
+#define EXINT 0 /* SIGINT received */
+#define EXERROR 1 /* a generic error */
+#define EXSHELLPROC 2 /* execute a shell procedure */
+#define EXEXEC 3 /* command execution failed */
+
+
+/*
+ * These macros allow the user to suspend the handling of interrupt signals
+ * over a period of time. This is similar to SIGHOLD to or sigblock, but
+ * much more efficient and portable. (But hacking the kernel is so much
+ * more fun than worrying about efficiency and portability. :-))
+ */
+
+extern volatile int suppressint;
+extern volatile int intpending;
+extern char *commandname; /* name of command--printed on error */
+
+#define INTOFF suppressint++
+#define INTON { if (--suppressint == 0 && intpending) onint(); }
+#define FORCEINTON {suppressint = 0; if (intpending) onint();}
+#define CLEAR_PENDING_INT intpending = 0
+#define int_pending() intpending
+
+void exraise __P((int)) __attribute__((__noreturn__));
+void onint __P((void));
+void error __P((char *, ...)) __attribute__((__noreturn__));
+void exerror __P((int, char *, ...));
+char *errmsg __P((int, int));
+
+
+/*
+ * BSD setjmp saves the signal mask, which violates ANSI C and takes time,
+ * so we use _setjmp instead.
+ */
+
+#ifdef BSD
+#define setjmp(jmploc) _setjmp(jmploc)
+#define longjmp(jmploc, val) _longjmp(jmploc, val)
+#endif
diff --git a/release/picobsd/tinyware/ash/eval.c b/release/picobsd/tinyware/ash/eval.c
new file mode 100644
index 0000000..8f69649
--- /dev/null
+++ b/release/picobsd/tinyware/ash/eval.c
@@ -0,0 +1,1012 @@
+/* $NetBSD: eval.c,v 1.36 1997/07/04 21:01:56 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
+#else
+__RCSID("$NetBSD: eval.c,v 1.36 1997/07/04 21:01:56 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <signal.h>
+#include <unistd.h>
+
+/*
+ * Evaluate a command.
+ */
+
+#include "shell.h"
+#include "nodes.h"
+#include "syntax.h"
+#include "expand.h"
+#include "parser.h"
+#include "jobs.h"
+#include "eval.h"
+#include "builtins.h"
+#include "options.h"
+#include "exec.h"
+#include "redir.h"
+#include "input.h"
+#include "output.h"
+#include "trap.h"
+#include "var.h"
+#include "memalloc.h"
+#include "error.h"
+#include "show.h"
+#include "mystring.h"
+#ifndef SMALL
+#include "myhistedit.h"
+#endif
+
+
+/* flags in argument to evaltree */
+#define EV_EXIT 01 /* exit after evaluating tree */
+#define EV_TESTED 02 /* exit status is checked; ignore -e flag */
+#define EV_BACKCMD 04 /* command executing within back quotes */
+
+MKINIT int evalskip; /* set if we are skipping commands */
+STATIC int skipcount; /* number of levels to skip */
+MKINIT int loopnest; /* current loop nesting level */
+int funcnest; /* depth of function calls */
+
+
+char *commandname;
+struct strlist *cmdenviron;
+int exitstatus; /* exit status of last command */
+int oexitstatus; /* saved exit status */
+
+
+STATIC void evalloop __P((union node *));
+STATIC void evalfor __P((union node *));
+STATIC void evalcase __P((union node *, int));
+STATIC void evalsubshell __P((union node *, int));
+STATIC void expredir __P((union node *));
+STATIC void evalpipe __P((union node *));
+STATIC void evalcommand __P((union node *, int, struct backcmd *));
+STATIC void prehash __P((union node *));
+
+
+/*
+ * Called to reset things after an exception.
+ */
+
+#ifdef mkinit
+INCLUDE "eval.h"
+
+RESET {
+ evalskip = 0;
+ loopnest = 0;
+ funcnest = 0;
+}
+
+SHELLPROC {
+ exitstatus = 0;
+}
+#endif
+
+
+
+/*
+ * The eval commmand.
+ */
+
+int
+evalcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *p;
+ char *concat;
+ char **ap;
+
+ if (argc > 1) {
+ p = argv[1];
+ if (argc > 2) {
+ STARTSTACKSTR(concat);
+ ap = argv + 2;
+ for (;;) {
+ while (*p)
+ STPUTC(*p++, concat);
+ if ((p = *ap++) == NULL)
+ break;
+ STPUTC(' ', concat);
+ }
+ STPUTC('\0', concat);
+ p = grabstackstr(concat);
+ }
+ evalstring(p);
+ }
+ return exitstatus;
+}
+
+
+/*
+ * Execute a command or commands contained in a string.
+ */
+
+void
+evalstring(s)
+ char *s;
+ {
+ union node *n;
+ struct stackmark smark;
+
+ setstackmark(&smark);
+ setinputstring(s, 1);
+ while ((n = parsecmd(0)) != NEOF) {
+ evaltree(n, 0);
+ popstackmark(&smark);
+ }
+ popfile();
+ popstackmark(&smark);
+}
+
+
+
+/*
+ * Evaluate a parse tree. The value is left in the global variable
+ * exitstatus.
+ */
+
+void
+evaltree(n, flags)
+ union node *n;
+ int flags;
+{
+ if (n == NULL) {
+ TRACE(("evaltree(NULL) called\n"));
+ exitstatus = 0;
+ goto out;
+ }
+#ifndef SMALL
+ displayhist = 1; /* show history substitutions done with fc */
+#endif
+ TRACE(("evaltree(0x%lx: %d) called\n", (long)n, n->type));
+ switch (n->type) {
+ case NSEMI:
+ evaltree(n->nbinary.ch1, 0);
+ if (evalskip)
+ goto out;
+ evaltree(n->nbinary.ch2, flags);
+ break;
+ case NAND:
+ evaltree(n->nbinary.ch1, EV_TESTED);
+ if (evalskip || exitstatus != 0) {
+ /* don't bomb out on "set -e; false && true" */
+ flags |= EV_TESTED;
+ goto out;
+ }
+ evaltree(n->nbinary.ch2, flags);
+ break;
+ case NOR:
+ evaltree(n->nbinary.ch1, EV_TESTED);
+ if (evalskip || exitstatus == 0)
+ goto out;
+ evaltree(n->nbinary.ch2, flags);
+ break;
+ case NREDIR:
+ expredir(n->nredir.redirect);
+ redirect(n->nredir.redirect, REDIR_PUSH);
+ evaltree(n->nredir.n, flags);
+ popredir();
+ break;
+ case NSUBSHELL:
+ evalsubshell(n, flags);
+ break;
+ case NBACKGND:
+ evalsubshell(n, flags);
+ break;
+ case NIF: {
+ evaltree(n->nif.test, EV_TESTED);
+ if (evalskip)
+ goto out;
+ if (exitstatus == 0)
+ evaltree(n->nif.ifpart, flags);
+ else if (n->nif.elsepart)
+ evaltree(n->nif.elsepart, flags);
+ else
+ exitstatus = 0;
+ break;
+ }
+ case NWHILE:
+ case NUNTIL:
+ evalloop(n);
+ break;
+ case NFOR:
+ evalfor(n);
+ break;
+ case NCASE:
+ evalcase(n, flags);
+ break;
+ case NDEFUN:
+ defun(n->narg.text, n->narg.next);
+ exitstatus = 0;
+ break;
+ case NNOT:
+ evaltree(n->nnot.com, EV_TESTED);
+ exitstatus = !exitstatus;
+ break;
+
+ case NPIPE:
+ evalpipe(n);
+ break;
+ case NCMD:
+ evalcommand(n, flags, (struct backcmd *)NULL);
+ break;
+ default:
+ out1fmt("Node type = %d\n", n->type);
+ flushout(&output);
+ break;
+ }
+out:
+ if (pendingsigs)
+ dotrap();
+ if ((flags & EV_EXIT) || (eflag && exitstatus && !(flags & EV_TESTED)))
+ exitshell(exitstatus);
+}
+
+
+STATIC void
+evalloop(n)
+ union node *n;
+{
+ int status;
+
+ loopnest++;
+ status = 0;
+ for (;;) {
+ evaltree(n->nbinary.ch1, EV_TESTED);
+ if (evalskip) {
+skipping: if (evalskip == SKIPCONT && --skipcount <= 0) {
+ evalskip = 0;
+ continue;
+ }
+ if (evalskip == SKIPBREAK && --skipcount <= 0)
+ evalskip = 0;
+ break;
+ }
+ if (n->type == NWHILE) {
+ if (exitstatus != 0)
+ break;
+ } else {
+ if (exitstatus == 0)
+ break;
+ }
+ evaltree(n->nbinary.ch2, 0);
+ status = exitstatus;
+ if (evalskip)
+ goto skipping;
+ }
+ loopnest--;
+ exitstatus = status;
+}
+
+
+
+STATIC void
+evalfor(n)
+ union node *n;
+{
+ struct arglist arglist;
+ union node *argp;
+ struct strlist *sp;
+ struct stackmark smark;
+
+ setstackmark(&smark);
+ arglist.lastp = &arglist.list;
+ for (argp = n->nfor.args ; argp ; argp = argp->narg.next) {
+ oexitstatus = exitstatus;
+ expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
+ if (evalskip)
+ goto out;
+ }
+ *arglist.lastp = NULL;
+
+ exitstatus = 0;
+ loopnest++;
+ for (sp = arglist.list ; sp ; sp = sp->next) {
+ setvar(n->nfor.var, sp->text, 0);
+ evaltree(n->nfor.body, 0);
+ if (evalskip) {
+ if (evalskip == SKIPCONT && --skipcount <= 0) {
+ evalskip = 0;
+ continue;
+ }
+ if (evalskip == SKIPBREAK && --skipcount <= 0)
+ evalskip = 0;
+ break;
+ }
+ }
+ loopnest--;
+out:
+ popstackmark(&smark);
+}
+
+
+
+STATIC void
+evalcase(n, flags)
+ union node *n;
+ int flags;
+{
+ union node *cp;
+ union node *patp;
+ struct arglist arglist;
+ struct stackmark smark;
+
+ setstackmark(&smark);
+ arglist.lastp = &arglist.list;
+ oexitstatus = exitstatus;
+ expandarg(n->ncase.expr, &arglist, EXP_TILDE);
+ for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
+ for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
+ if (casematch(patp, arglist.list->text)) {
+ if (evalskip == 0) {
+ evaltree(cp->nclist.body, flags);
+ }
+ goto out;
+ }
+ }
+ }
+out:
+ popstackmark(&smark);
+}
+
+
+
+/*
+ * Kick off a subshell to evaluate a tree.
+ */
+
+STATIC void
+evalsubshell(n, flags)
+ union node *n;
+ int flags;
+{
+ struct job *jp;
+ int backgnd = (n->type == NBACKGND);
+
+ expredir(n->nredir.redirect);
+ jp = makejob(n, 1);
+ if (forkshell(jp, n, backgnd) == 0) {
+ if (backgnd)
+ flags &=~ EV_TESTED;
+ redirect(n->nredir.redirect, 0);
+ evaltree(n->nredir.n, flags | EV_EXIT); /* never returns */
+ }
+ if (! backgnd) {
+ INTOFF;
+ exitstatus = waitforjob(jp);
+ INTON;
+ }
+}
+
+
+
+/*
+ * Compute the names of the files in a redirection list.
+ */
+
+STATIC void
+expredir(n)
+ union node *n;
+{
+ union node *redir;
+
+ for (redir = n ; redir ; redir = redir->nfile.next) {
+ struct arglist fn;
+ fn.lastp = &fn.list;
+ oexitstatus = exitstatus;
+ switch (redir->type) {
+ case NFROM:
+ case NTO:
+ case NAPPEND:
+ expandarg(redir->nfile.fname, &fn, EXP_TILDE | EXP_REDIR);
+ redir->nfile.expfname = fn.list->text;
+ break;
+ case NFROMFD:
+ case NTOFD:
+ if (redir->ndup.vname) {
+ expandarg(redir->ndup.vname, &fn, EXP_FULL | EXP_TILDE);
+ fixredir(redir, fn.list->text, 1);
+ }
+ break;
+ }
+ }
+}
+
+
+
+/*
+ * Evaluate a pipeline. All the processes in the pipeline are children
+ * of the process creating the pipeline. (This differs from some versions
+ * of the shell, which make the last process in a pipeline the parent
+ * of all the rest.)
+ */
+
+STATIC void
+evalpipe(n)
+ union node *n;
+{
+ struct job *jp;
+ struct nodelist *lp;
+ int pipelen;
+ int prevfd;
+ int pip[2];
+
+ TRACE(("evalpipe(0x%lx) called\n", (long)n));
+ pipelen = 0;
+ for (lp = n->npipe.cmdlist ; lp ; lp = lp->next)
+ pipelen++;
+ INTOFF;
+ jp = makejob(n, pipelen);
+ prevfd = -1;
+ for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
+ prehash(lp->n);
+ pip[1] = -1;
+ if (lp->next) {
+ if (pipe(pip) < 0) {
+ close(prevfd);
+ error("Pipe call failed");
+ }
+ }
+ if (forkshell(jp, lp->n, n->npipe.backgnd) == 0) {
+ INTON;
+ if (prevfd > 0) {
+ close(0);
+ copyfd(prevfd, 0);
+ close(prevfd);
+ }
+ if (pip[1] >= 0) {
+ close(pip[0]);
+ if (pip[1] != 1) {
+ close(1);
+ copyfd(pip[1], 1);
+ close(pip[1]);
+ }
+ }
+ evaltree(lp->n, EV_EXIT);
+ }
+ if (prevfd >= 0)
+ close(prevfd);
+ prevfd = pip[0];
+ close(pip[1]);
+ }
+ INTON;
+ if (n->npipe.backgnd == 0) {
+ INTOFF;
+ exitstatus = waitforjob(jp);
+ TRACE(("evalpipe: job done exit status %d\n", exitstatus));
+ INTON;
+ }
+}
+
+
+
+/*
+ * Execute a command inside back quotes. If it's a builtin command, we
+ * want to save its output in a block obtained from malloc. Otherwise
+ * we fork off a subprocess and get the output of the command via a pipe.
+ * Should be called with interrupts off.
+ */
+
+void
+evalbackcmd(n, result)
+ union node *n;
+ struct backcmd *result;
+{
+ int pip[2];
+ struct job *jp;
+ struct stackmark smark; /* unnecessary */
+
+ setstackmark(&smark);
+ result->fd = -1;
+ result->buf = NULL;
+ result->nleft = 0;
+ result->jp = NULL;
+ if (n == NULL) {
+ exitstatus = 0;
+ goto out;
+ }
+ if (n->type == NCMD) {
+ exitstatus = oexitstatus;
+ evalcommand(n, EV_BACKCMD, result);
+ } else {
+ exitstatus = 0;
+ if (pipe(pip) < 0)
+ error("Pipe call failed");
+ jp = makejob(n, 1);
+ if (forkshell(jp, n, FORK_NOJOB) == 0) {
+ FORCEINTON;
+ close(pip[0]);
+ if (pip[1] != 1) {
+ close(1);
+ copyfd(pip[1], 1);
+ close(pip[1]);
+ }
+ evaltree(n, EV_EXIT);
+ }
+ close(pip[1]);
+ result->fd = pip[0];
+ result->jp = jp;
+ }
+out:
+ popstackmark(&smark);
+ TRACE(("evalbackcmd done: fd=%d buf=0x%x nleft=%d jp=0x%x\n",
+ result->fd, result->buf, result->nleft, result->jp));
+}
+
+
+
+/*
+ * Execute a simple command.
+ */
+
+STATIC void
+evalcommand(cmd, flags, backcmd)
+ union node *cmd;
+ int flags;
+ struct backcmd *backcmd;
+{
+ struct stackmark smark;
+ union node *argp;
+ struct arglist arglist;
+ struct arglist varlist;
+ char **argv;
+ int argc;
+ char **envp;
+ int varflag;
+ struct strlist *sp;
+ int mode;
+ int pip[2];
+ struct cmdentry cmdentry;
+ struct job *jp;
+ struct jmploc jmploc;
+ struct jmploc *volatile savehandler;
+ char *volatile savecmdname;
+ volatile struct shparam saveparam;
+ struct localvar *volatile savelocalvars;
+ volatile int e;
+ char *lastarg;
+#if __GNUC__
+ /* Avoid longjmp clobbering */
+ (void) &argv;
+ (void) &argc;
+ (void) &lastarg;
+ (void) &flags;
+#endif
+
+ /* First expand the arguments. */
+ TRACE(("evalcommand(0x%lx, %d) called\n", (long)cmd, flags));
+ setstackmark(&smark);
+ arglist.lastp = &arglist.list;
+ varlist.lastp = &varlist.list;
+ varflag = 1;
+ oexitstatus = exitstatus;
+ exitstatus = 0;
+ for (argp = cmd->ncmd.args ; argp ; argp = argp->narg.next) {
+ char *p = argp->narg.text;
+ if (varflag && is_name(*p)) {
+ do {
+ p++;
+ } while (is_in_name(*p));
+ if (*p == '=') {
+ expandarg(argp, &varlist, EXP_VARTILDE);
+ continue;
+ }
+ }
+ expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
+ varflag = 0;
+ }
+ *arglist.lastp = NULL;
+ *varlist.lastp = NULL;
+ expredir(cmd->ncmd.redirect);
+ argc = 0;
+ for (sp = arglist.list ; sp ; sp = sp->next)
+ argc++;
+ argv = stalloc(sizeof (char *) * (argc + 1));
+
+ for (sp = arglist.list ; sp ; sp = sp->next) {
+ TRACE(("evalcommand arg: %s\n", sp->text));
+ *argv++ = sp->text;
+ }
+ *argv = NULL;
+ lastarg = NULL;
+ if (iflag && funcnest == 0 && argc > 0)
+ lastarg = argv[-1];
+ argv -= argc;
+
+ /* Print the command if xflag is set. */
+ if (xflag) {
+ outc('+', &errout);
+ for (sp = varlist.list ; sp ; sp = sp->next) {
+ outc(' ', &errout);
+ out2str(sp->text);
+ }
+ for (sp = arglist.list ; sp ; sp = sp->next) {
+ outc(' ', &errout);
+ out2str(sp->text);
+ }
+ outc('\n', &errout);
+ flushout(&errout);
+ }
+
+ /* Now locate the command. */
+ if (argc == 0) {
+ cmdentry.cmdtype = CMDBUILTIN;
+ cmdentry.u.index = BLTINCMD;
+ } else {
+ static const char PATH[] = "PATH=";
+ char *path = pathval();
+
+ /*
+ * Modify the command lookup path, if a PATH= assignment
+ * is present
+ */
+ for (sp = varlist.list ; sp ; sp = sp->next)
+ if (strncmp(sp->text, PATH, sizeof(PATH) - 1) == 0)
+ path = sp->text + sizeof(PATH) - 1;
+
+ find_command(argv[0], &cmdentry, 1, path);
+ if (cmdentry.cmdtype == CMDUNKNOWN) { /* command not found */
+ exitstatus = 127;
+ flushout(&errout);
+ return;
+ }
+ /* implement the bltin builtin here */
+ if (cmdentry.cmdtype == CMDBUILTIN && cmdentry.u.index == BLTINCMD) {
+ for (;;) {
+ argv++;
+ if (--argc == 0)
+ break;
+ if ((cmdentry.u.index = find_builtin(*argv)) < 0) {
+ outfmt(&errout, "%s: not found\n", *argv);
+ exitstatus = 127;
+ flushout(&errout);
+ return;
+ }
+ if (cmdentry.u.index != BLTINCMD)
+ break;
+ }
+ }
+ }
+
+ /* Fork off a child process if necessary. */
+ if (cmd->ncmd.backgnd
+ || (cmdentry.cmdtype == CMDNORMAL && (flags & EV_EXIT) == 0)
+ || ((flags & EV_BACKCMD) != 0
+ && (cmdentry.cmdtype != CMDBUILTIN
+ || cmdentry.u.index == DOTCMD
+ || cmdentry.u.index == EVALCMD))) {
+ jp = makejob(cmd, 1);
+ mode = cmd->ncmd.backgnd;
+ if (flags & EV_BACKCMD) {
+ mode = FORK_NOJOB;
+ if (pipe(pip) < 0)
+ error("Pipe call failed");
+ }
+ if (forkshell(jp, cmd, mode) != 0)
+ goto parent; /* at end of routine */
+ if (flags & EV_BACKCMD) {
+ FORCEINTON;
+ close(pip[0]);
+ if (pip[1] != 1) {
+ close(1);
+ copyfd(pip[1], 1);
+ close(pip[1]);
+ }
+ }
+ flags |= EV_EXIT;
+ }
+
+ /* This is the child process if a fork occurred. */
+ /* Execute the command. */
+ if (cmdentry.cmdtype == CMDFUNCTION) {
+#ifdef DEBUG
+ trputs("Shell function: "); trargs(argv);
+#endif
+ redirect(cmd->ncmd.redirect, REDIR_PUSH);
+ saveparam = shellparam;
+ shellparam.malloc = 0;
+ shellparam.reset = 1;
+ shellparam.nparam = argc - 1;
+ shellparam.p = argv + 1;
+ shellparam.optnext = NULL;
+ INTOFF;
+ savelocalvars = localvars;
+ localvars = NULL;
+ INTON;
+ if (setjmp(jmploc.loc)) {
+ if (exception == EXSHELLPROC)
+ freeparam((struct shparam *)&saveparam);
+ else {
+ freeparam(&shellparam);
+ shellparam = saveparam;
+ }
+ poplocalvars();
+ localvars = savelocalvars;
+ handler = savehandler;
+ longjmp(handler->loc, 1);
+ }
+ savehandler = handler;
+ handler = &jmploc;
+ for (sp = varlist.list ; sp ; sp = sp->next)
+ mklocal(sp->text);
+ funcnest++;
+ evaltree(cmdentry.u.func, 0);
+ funcnest--;
+ INTOFF;
+ poplocalvars();
+ localvars = savelocalvars;
+ freeparam(&shellparam);
+ shellparam = saveparam;
+ handler = savehandler;
+ popredir();
+ INTON;
+ if (evalskip == SKIPFUNC) {
+ evalskip = 0;
+ skipcount = 0;
+ }
+ if (flags & EV_EXIT)
+ exitshell(exitstatus);
+ } else if (cmdentry.cmdtype == CMDBUILTIN) {
+#ifdef DEBUG
+ trputs("builtin command: "); trargs(argv);
+#endif
+ mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH;
+ if (flags == EV_BACKCMD) {
+ memout.nleft = 0;
+ memout.nextc = memout.buf;
+ memout.bufsize = 64;
+ mode |= REDIR_BACKQ;
+ }
+ redirect(cmd->ncmd.redirect, mode);
+ savecmdname = commandname;
+ cmdenviron = varlist.list;
+ e = -1;
+ if (setjmp(jmploc.loc)) {
+ e = exception;
+ exitstatus = (e == EXINT)? SIGINT+128 : 2;
+ goto cmddone;
+ }
+ savehandler = handler;
+ handler = &jmploc;
+ commandname = argv[0];
+ argptr = argv + 1;
+ optptr = NULL; /* initialize nextopt */
+ exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
+ flushall();
+cmddone:
+ out1 = &output;
+ out2 = &errout;
+ freestdout();
+ if (e != EXSHELLPROC) {
+ commandname = savecmdname;
+ if (flags & EV_EXIT) {
+ exitshell(exitstatus);
+ }
+ }
+ handler = savehandler;
+ if (e != -1) {
+ if ((e != EXERROR && e != EXEXEC)
+ || cmdentry.u.index == BLTINCMD
+ || cmdentry.u.index == DOTCMD
+ || cmdentry.u.index == EVALCMD
+#ifndef SMALL
+ || cmdentry.u.index == HISTCMD
+#endif
+ || cmdentry.u.index == EXECCMD)
+ exraise(e);
+ FORCEINTON;
+ }
+ if (cmdentry.u.index != EXECCMD)
+ popredir();
+ if (flags == EV_BACKCMD) {
+ backcmd->buf = memout.buf;
+ backcmd->nleft = memout.nextc - memout.buf;
+ memout.buf = NULL;
+ }
+ } else {
+#ifdef DEBUG
+ trputs("normal command: "); trargs(argv);
+#endif
+ clearredir();
+ redirect(cmd->ncmd.redirect, 0);
+ for (sp = varlist.list ; sp ; sp = sp->next)
+ setvareq(sp->text, VEXPORT|VSTACK);
+ envp = environment();
+ shellexec(argv, envp, pathval(), cmdentry.u.index);
+ /*NOTREACHED*/
+ }
+ goto out;
+
+parent: /* parent process gets here (if we forked) */
+ if (mode == 0) { /* argument to fork */
+ INTOFF;
+ exitstatus = waitforjob(jp);
+ INTON;
+ } else if (mode == 2) {
+ backcmd->fd = pip[0];
+ close(pip[1]);
+ backcmd->jp = jp;
+ }
+
+out:
+ if (lastarg)
+ setvar("_", lastarg, 0);
+ popstackmark(&smark);
+}
+
+
+
+/*
+ * Search for a command. This is called before we fork so that the
+ * location of the command will be available in the parent as well as
+ * the child. The check for "goodname" is an overly conservative
+ * check that the name will not be subject to expansion.
+ */
+
+STATIC void
+prehash(n)
+ union node *n;
+{
+ struct cmdentry entry;
+
+ if (n->type == NCMD && n->ncmd.args)
+ if (goodname(n->ncmd.args->narg.text))
+ find_command(n->ncmd.args->narg.text, &entry, 0,
+ pathval());
+}
+
+
+
+/*
+ * Builtin commands. Builtin commands whose functions are closely
+ * tied to evaluation are implemented here.
+ */
+
+/*
+ * No command given, or a bltin command with no arguments. Set the
+ * specified variables.
+ */
+
+int
+bltincmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ listsetvar(cmdenviron);
+ /*
+ * Preserve exitstatus of a previous possible redirection
+ * as POSIX mandates
+ */
+ return exitstatus;
+}
+
+
+/*
+ * Handle break and continue commands. Break, continue, and return are
+ * all handled by setting the evalskip flag. The evaluation routines
+ * above all check this flag, and if it is set they start skipping
+ * commands rather than executing them. The variable skipcount is
+ * the number of loops to break/continue, or the number of function
+ * levels to return. (The latter is always 1.) It should probably
+ * be an error to break out of more loops than exist, but it isn't
+ * in the standard shell so we don't make it one here.
+ */
+
+int
+breakcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int n = argc > 1 ? number(argv[1]) : 1;
+
+ if (n > loopnest)
+ n = loopnest;
+ if (n > 0) {
+ evalskip = (**argv == 'c')? SKIPCONT : SKIPBREAK;
+ skipcount = n;
+ }
+ return 0;
+}
+
+
+/*
+ * The return command.
+ */
+
+int
+returncmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int ret = argc > 1 ? number(argv[1]) : oexitstatus;
+
+ if (funcnest) {
+ evalskip = SKIPFUNC;
+ skipcount = 1;
+ return ret;
+ }
+ else {
+ /* Do what ksh does; skip the rest of the file */
+ evalskip = SKIPFILE;
+ skipcount = 1;
+ return ret;
+ }
+}
+
+
+int
+falsecmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ return 1;
+}
+
+
+int
+truecmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ return 0;
+}
+
+
+int
+execcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ if (argc > 1) {
+ struct strlist *sp;
+
+ iflag = 0; /* exit on error */
+ mflag = 0;
+ optschanged();
+ for (sp = cmdenviron; sp ; sp = sp->next)
+ setvareq(sp->text, VEXPORT|VSTACK);
+ shellexec(argv + 1, environment(), pathval(), 0);
+
+ }
+ return 0;
+}
diff --git a/release/picobsd/tinyware/ash/eval.h b/release/picobsd/tinyware/ash/eval.h
new file mode 100644
index 0000000..58b0580
--- /dev/null
+++ b/release/picobsd/tinyware/ash/eval.h
@@ -0,0 +1,74 @@
+/* $NetBSD: eval.h,v 1.9 1995/09/11 17:05:43 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)eval.h 8.2 (Berkeley) 5/4/95
+ */
+
+extern char *commandname; /* currently executing command */
+extern int exitstatus; /* exit status of last command */
+extern struct strlist *cmdenviron; /* environment for builtin command */
+
+
+struct backcmd { /* result of evalbackcmd */
+ int fd; /* file descriptor to read from */
+ char *buf; /* buffer */
+ int nleft; /* number of chars in buffer */
+ struct job *jp; /* job structure for command */
+};
+
+int evalcmd __P((int, char **));
+void evalstring __P((char *));
+union node; /* BLETCH for ansi C */
+void evaltree __P((union node *, int));
+void evalbackcmd __P((union node *, struct backcmd *));
+int bltincmd __P((int, char **));
+int breakcmd __P((int, char **));
+int returncmd __P((int, char **));
+int falsecmd __P((int, char **));
+int truecmd __P((int, char **));
+int execcmd __P((int, char **));
+
+/* in_function returns nonzero if we are currently evaluating a function */
+#define in_function() funcnest
+extern int funcnest;
+extern int evalskip;
+
+/* reasons for skipping commands (see comment on breakcmd routine) */
+#define SKIPBREAK 1
+#define SKIPCONT 2
+#define SKIPFUNC 3
+#define SKIPFILE 4
diff --git a/release/picobsd/tinyware/ash/exec.c b/release/picobsd/tinyware/ash/exec.c
new file mode 100644
index 0000000..b04653d
--- /dev/null
+++ b/release/picobsd/tinyware/ash/exec.c
@@ -0,0 +1,921 @@
+/* $NetBSD: exec.c,v 1.23 1997/07/04 21:01:59 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95";
+#else
+__RCSID("$NetBSD: exec.c,v 1.23 1997/07/04 21:01:59 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/*
+ * When commands are first encountered, they are entered in a hash table.
+ * This ensures that a full path search will not have to be done for them
+ * on each invocation.
+ *
+ * We should investigate converting to a linear search, even though that
+ * would make the command name "hash" a misnomer.
+ */
+
+#include "shell.h"
+#include "main.h"
+#include "nodes.h"
+#include "parser.h"
+#include "redir.h"
+#include "eval.h"
+#include "exec.h"
+#include "builtins.h"
+#include "var.h"
+#include "options.h"
+#include "input.h"
+#include "output.h"
+#include "syntax.h"
+#include "memalloc.h"
+#include "error.h"
+#include "init.h"
+#include "mystring.h"
+#include "show.h"
+#include "jobs.h"
+#include "alias.h"
+
+
+#define CMDTABLESIZE 31 /* should be prime */
+#define ARB 1 /* actual size determined at run time */
+
+
+
+struct tblentry {
+ struct tblentry *next; /* next entry in hash chain */
+ union param param; /* definition of builtin function */
+ short cmdtype; /* index identifying command */
+ char rehash; /* if set, cd done since entry created */
+ char cmdname[ARB]; /* name of command */
+};
+
+
+STATIC struct tblentry *cmdtable[CMDTABLESIZE];
+STATIC int builtinloc = -1; /* index in path of %builtin, or -1 */
+int exerrno = 0; /* Last exec error */
+
+
+STATIC void tryexec __P((char *, char **, char **));
+STATIC void execinterp __P((char **, char **));
+STATIC void printentry __P((struct tblentry *, int));
+STATIC void clearcmdentry __P((int));
+STATIC struct tblentry *cmdlookup __P((char *, int));
+STATIC void delete_cmd_entry __P((void));
+
+
+
+/*
+ * Exec a program. Never returns. If you change this routine, you may
+ * have to change the find_command routine as well.
+ */
+
+void
+shellexec(argv, envp, path, index)
+ char **argv, **envp;
+ char *path;
+ int index;
+{
+ char *cmdname;
+ int e;
+
+ if (strchr(argv[0], '/') != NULL) {
+ tryexec(argv[0], argv, envp);
+ e = errno;
+ } else {
+ e = ENOENT;
+ while ((cmdname = padvance(&path, argv[0])) != NULL) {
+ if (--index < 0 && pathopt == NULL) {
+ tryexec(cmdname, argv, envp);
+ if (errno != ENOENT && errno != ENOTDIR)
+ e = errno;
+ }
+ stunalloc(cmdname);
+ }
+ }
+
+ /* Map to POSIX errors */
+ switch (e) {
+ case EACCES:
+ exerrno = 126;
+ break;
+ case ENOENT:
+ exerrno = 127;
+ break;
+ default:
+ exerrno = 2;
+ break;
+ }
+ exerror(EXEXEC, "%s: %s", argv[0], errmsg(e, E_EXEC));
+}
+
+
+STATIC void
+tryexec(cmd, argv, envp)
+ char *cmd;
+ char **argv;
+ char **envp;
+ {
+ int e;
+#ifndef BSD
+ char *p;
+#endif
+
+#ifdef SYSV
+ do {
+ execve(cmd, argv, envp);
+ } while (errno == EINTR);
+#else
+ execve(cmd, argv, envp);
+#endif
+ e = errno;
+ if (e == ENOEXEC) {
+ initshellproc();
+ setinputfile(cmd, 0);
+ commandname = arg0 = savestr(argv[0]);
+#ifndef BSD
+ pgetc(); pungetc(); /* fill up input buffer */
+ p = parsenextc;
+ if (parsenleft > 2 && p[0] == '#' && p[1] == '!') {
+ argv[0] = cmd;
+ execinterp(argv, envp);
+ }
+#endif
+ setparam(argv + 1);
+ exraise(EXSHELLPROC);
+ /*NOTREACHED*/
+ }
+ errno = e;
+}
+
+
+#ifndef BSD
+/*
+ * Execute an interpreter introduced by "#!", for systems where this
+ * feature has not been built into the kernel. If the interpreter is
+ * the shell, return (effectively ignoring the "#!"). If the execution
+ * of the interpreter fails, exit.
+ *
+ * This code peeks inside the input buffer in order to avoid actually
+ * reading any input. It would benefit from a rewrite.
+ */
+
+#define NEWARGS 5
+
+STATIC void
+execinterp(argv, envp)
+ char **argv, **envp;
+ {
+ int n;
+ char *inp;
+ char *outp;
+ char c;
+ char *p;
+ char **ap;
+ char *newargs[NEWARGS];
+ int i;
+ char **ap2;
+ char **new;
+
+ n = parsenleft - 2;
+ inp = parsenextc + 2;
+ ap = newargs;
+ for (;;) {
+ while (--n >= 0 && (*inp == ' ' || *inp == '\t'))
+ inp++;
+ if (n < 0)
+ goto bad;
+ if ((c = *inp++) == '\n')
+ break;
+ if (ap == &newargs[NEWARGS])
+bad: error("Bad #! line");
+ STARTSTACKSTR(outp);
+ do {
+ STPUTC(c, outp);
+ } while (--n >= 0 && (c = *inp++) != ' ' && c != '\t' && c != '\n');
+ STPUTC('\0', outp);
+ n++, inp--;
+ *ap++ = grabstackstr(outp);
+ }
+ if (ap == newargs + 1) { /* if no args, maybe no exec is needed */
+ p = newargs[0];
+ for (;;) {
+ if (equal(p, "sh") || equal(p, "ash")) {
+ return;
+ }
+ while (*p != '/') {
+ if (*p == '\0')
+ goto break2;
+ p++;
+ }
+ p++;
+ }
+break2:;
+ }
+ i = (char *)ap - (char *)newargs; /* size in bytes */
+ if (i == 0)
+ error("Bad #! line");
+ for (ap2 = argv ; *ap2++ != NULL ; );
+ new = ckmalloc(i + ((char *)ap2 - (char *)argv));
+ ap = newargs, ap2 = new;
+ while ((i -= sizeof (char **)) >= 0)
+ *ap2++ = *ap++;
+ ap = argv;
+ while (*ap2++ = *ap++);
+ shellexec(new, envp, pathval(), 0);
+}
+#endif
+
+
+
+/*
+ * Do a path search. The variable path (passed by reference) should be
+ * set to the start of the path before the first call; padvance will update
+ * this value as it proceeds. Successive calls to padvance will return
+ * the possible path expansions in sequence. If an option (indicated by
+ * a percent sign) appears in the path entry then the global variable
+ * pathopt will be set to point to it; otherwise pathopt will be set to
+ * NULL.
+ */
+
+char *pathopt;
+
+char *
+padvance(path, name)
+ char **path;
+ char *name;
+ {
+ char *p, *q;
+ char *start;
+ int len;
+
+ if (*path == NULL)
+ return NULL;
+ start = *path;
+ for (p = start ; *p && *p != ':' && *p != '%' ; p++);
+ len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */
+ while (stackblocksize() < len)
+ growstackblock();
+ q = stackblock();
+ if (p != start) {
+ memcpy(q, start, p - start);
+ q += p - start;
+ *q++ = '/';
+ }
+ strcpy(q, name);
+ pathopt = NULL;
+ if (*p == '%') {
+ pathopt = ++p;
+ while (*p && *p != ':') p++;
+ }
+ if (*p == ':')
+ *path = p + 1;
+ else
+ *path = NULL;
+ return stalloc(len);
+}
+
+
+
+/*** Command hashing code ***/
+
+
+int
+hashcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct tblentry **pp;
+ struct tblentry *cmdp;
+ int c;
+ int verbose;
+ struct cmdentry entry;
+ char *name;
+
+ verbose = 0;
+ while ((c = nextopt("rv")) != '\0') {
+ if (c == 'r') {
+ clearcmdentry(0);
+ } else if (c == 'v') {
+ verbose++;
+ }
+ }
+ if (*argptr == NULL) {
+ for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) {
+ for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
+ printentry(cmdp, verbose);
+ }
+ }
+ return 0;
+ }
+ while ((name = *argptr) != NULL) {
+ if ((cmdp = cmdlookup(name, 0)) != NULL
+ && (cmdp->cmdtype == CMDNORMAL
+ || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0)))
+ delete_cmd_entry();
+ find_command(name, &entry, 1, pathval());
+ if (verbose) {
+ if (entry.cmdtype != CMDUNKNOWN) { /* if no error msg */
+ cmdp = cmdlookup(name, 0);
+ printentry(cmdp, verbose);
+ }
+ flushall();
+ }
+ argptr++;
+ }
+ return 0;
+}
+
+
+STATIC void
+printentry(cmdp, verbose)
+ struct tblentry *cmdp;
+ int verbose;
+ {
+ int index;
+ char *path;
+ char *name;
+
+ if (cmdp->cmdtype == CMDNORMAL) {
+ index = cmdp->param.index;
+ path = pathval();
+ do {
+ name = padvance(&path, cmdp->cmdname);
+ stunalloc(name);
+ } while (--index >= 0);
+ out1str(name);
+ } else if (cmdp->cmdtype == CMDBUILTIN) {
+ out1fmt("builtin %s", cmdp->cmdname);
+ } else if (cmdp->cmdtype == CMDFUNCTION) {
+ out1fmt("function %s", cmdp->cmdname);
+ if (verbose) {
+ INTOFF;
+ name = commandtext(cmdp->param.func);
+ out1c(' ');
+ out1str(name);
+ ckfree(name);
+ INTON;
+ }
+#ifdef DEBUG
+ } else {
+ error("internal error: cmdtype %d", cmdp->cmdtype);
+#endif
+ }
+ if (cmdp->rehash)
+ out1c('*');
+ out1c('\n');
+}
+
+
+
+/*
+ * Resolve a command name. If you change this routine, you may have to
+ * change the shellexec routine as well.
+ */
+
+void
+find_command(name, entry, printerr, path)
+ char *name;
+ struct cmdentry *entry;
+ int printerr;
+ char *path;
+{
+ struct tblentry *cmdp;
+ int index;
+ int prev;
+ char *fullname;
+ struct stat statb;
+ int e;
+ int i;
+
+ /* If name contains a slash, don't use the hash table */
+ if (strchr(name, '/') != NULL) {
+ entry->cmdtype = CMDNORMAL;
+ entry->u.index = 0;
+ return;
+ }
+
+ /* If name is in the table, and not invalidated by cd, we're done */
+ if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->rehash == 0)
+ goto success;
+
+ /* If %builtin not in path, check for builtin next */
+ if (builtinloc < 0 && (i = find_builtin(name)) >= 0) {
+ INTOFF;
+ cmdp = cmdlookup(name, 1);
+ cmdp->cmdtype = CMDBUILTIN;
+ cmdp->param.index = i;
+ INTON;
+ goto success;
+ }
+
+ /* We have to search path. */
+ prev = -1; /* where to start */
+ if (cmdp) { /* doing a rehash */
+ if (cmdp->cmdtype == CMDBUILTIN)
+ prev = builtinloc;
+ else
+ prev = cmdp->param.index;
+ }
+
+ e = ENOENT;
+ index = -1;
+loop:
+ while ((fullname = padvance(&path, name)) != NULL) {
+ stunalloc(fullname);
+ index++;
+ if (pathopt) {
+ if (prefix("builtin", pathopt)) {
+ if ((i = find_builtin(name)) < 0)
+ goto loop;
+ INTOFF;
+ cmdp = cmdlookup(name, 1);
+ cmdp->cmdtype = CMDBUILTIN;
+ cmdp->param.index = i;
+ INTON;
+ goto success;
+ } else if (prefix("func", pathopt)) {
+ /* handled below */
+ } else {
+ goto loop; /* ignore unimplemented options */
+ }
+ }
+ /* if rehash, don't redo absolute path names */
+ if (fullname[0] == '/' && index <= prev) {
+ if (index < prev)
+ goto loop;
+ TRACE(("searchexec \"%s\": no change\n", name));
+ goto success;
+ }
+ while (stat(fullname, &statb) < 0) {
+#ifdef SYSV
+ if (errno == EINTR)
+ continue;
+#endif
+ if (errno != ENOENT && errno != ENOTDIR)
+ e = errno;
+ goto loop;
+ }
+ e = EACCES; /* if we fail, this will be the error */
+ if (!S_ISREG(statb.st_mode))
+ goto loop;
+ if (pathopt) { /* this is a %func directory */
+ stalloc(strlen(fullname) + 1);
+ readcmdfile(fullname);
+ if ((cmdp = cmdlookup(name, 0)) == NULL || cmdp->cmdtype != CMDFUNCTION)
+ error("%s not defined in %s", name, fullname);
+ stunalloc(fullname);
+ goto success;
+ }
+#ifdef notdef
+ if (statb.st_uid == geteuid()) {
+ if ((statb.st_mode & 0100) == 0)
+ goto loop;
+ } else if (statb.st_gid == getegid()) {
+ if ((statb.st_mode & 010) == 0)
+ goto loop;
+ } else {
+ if ((statb.st_mode & 01) == 0)
+ goto loop;
+ }
+#endif
+ TRACE(("searchexec \"%s\" returns \"%s\"\n", name, fullname));
+ INTOFF;
+ cmdp = cmdlookup(name, 1);
+ cmdp->cmdtype = CMDNORMAL;
+ cmdp->param.index = index;
+ INTON;
+ goto success;
+ }
+
+ /* We failed. If there was an entry for this command, delete it */
+ if (cmdp)
+ delete_cmd_entry();
+ if (printerr)
+ outfmt(out2, "%s: %s\n", name, errmsg(e, E_EXEC));
+ entry->cmdtype = CMDUNKNOWN;
+ return;
+
+success:
+ cmdp->rehash = 0;
+ entry->cmdtype = cmdp->cmdtype;
+ entry->u = cmdp->param;
+}
+
+
+
+/*
+ * Search the table of builtin commands.
+ */
+
+int
+find_builtin(name)
+ char *name;
+{
+ const struct builtincmd *bp;
+
+ for (bp = builtincmd ; bp->name ; bp++) {
+ if (*bp->name == *name && equal(bp->name, name))
+ return bp->code;
+ }
+ return -1;
+}
+
+
+
+/*
+ * Called when a cd is done. Marks all commands so the next time they
+ * are executed they will be rehashed.
+ */
+
+void
+hashcd() {
+ struct tblentry **pp;
+ struct tblentry *cmdp;
+
+ for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) {
+ for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
+ if (cmdp->cmdtype == CMDNORMAL
+ || (cmdp->cmdtype == CMDBUILTIN && builtinloc >= 0))
+ cmdp->rehash = 1;
+ }
+ }
+}
+
+
+
+/*
+ * Called before PATH is changed. The argument is the new value of PATH;
+ * pathval() still returns the old value at this point. Called with
+ * interrupts off.
+ */
+
+void
+changepath(newval)
+ const char *newval;
+{
+ const char *old, *new;
+ int index;
+ int firstchange;
+ int bltin;
+
+ old = pathval();
+ new = newval;
+ firstchange = 9999; /* assume no change */
+ index = 0;
+ bltin = -1;
+ for (;;) {
+ if (*old != *new) {
+ firstchange = index;
+ if ((*old == '\0' && *new == ':')
+ || (*old == ':' && *new == '\0'))
+ firstchange++;
+ old = new; /* ignore subsequent differences */
+ }
+ if (*new == '\0')
+ break;
+ if (*new == '%' && bltin < 0 && prefix("builtin", new + 1))
+ bltin = index;
+ if (*new == ':') {
+ index++;
+ }
+ new++, old++;
+ }
+ if (builtinloc < 0 && bltin >= 0)
+ builtinloc = bltin; /* zap builtins */
+ if (builtinloc >= 0 && bltin < 0)
+ firstchange = 0;
+ clearcmdentry(firstchange);
+ builtinloc = bltin;
+}
+
+
+/*
+ * Clear out command entries. The argument specifies the first entry in
+ * PATH which has changed.
+ */
+
+STATIC void
+clearcmdentry(firstchange)
+ int firstchange;
+{
+ struct tblentry **tblp;
+ struct tblentry **pp;
+ struct tblentry *cmdp;
+
+ INTOFF;
+ for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) {
+ pp = tblp;
+ while ((cmdp = *pp) != NULL) {
+ if ((cmdp->cmdtype == CMDNORMAL &&
+ cmdp->param.index >= firstchange)
+ || (cmdp->cmdtype == CMDBUILTIN &&
+ builtinloc >= firstchange)) {
+ *pp = cmdp->next;
+ ckfree(cmdp);
+ } else {
+ pp = &cmdp->next;
+ }
+ }
+ }
+ INTON;
+}
+
+
+/*
+ * Delete all functions.
+ */
+
+#ifdef mkinit
+MKINIT void deletefuncs __P((void));
+
+SHELLPROC {
+ deletefuncs();
+}
+#endif
+
+void
+deletefuncs() {
+ struct tblentry **tblp;
+ struct tblentry **pp;
+ struct tblentry *cmdp;
+
+ INTOFF;
+ for (tblp = cmdtable ; tblp < &cmdtable[CMDTABLESIZE] ; tblp++) {
+ pp = tblp;
+ while ((cmdp = *pp) != NULL) {
+ if (cmdp->cmdtype == CMDFUNCTION) {
+ *pp = cmdp->next;
+ freefunc(cmdp->param.func);
+ ckfree(cmdp);
+ } else {
+ pp = &cmdp->next;
+ }
+ }
+ }
+ INTON;
+}
+
+
+
+/*
+ * Locate a command in the command hash table. If "add" is nonzero,
+ * add the command to the table if it is not already present. The
+ * variable "lastcmdentry" is set to point to the address of the link
+ * pointing to the entry, so that delete_cmd_entry can delete the
+ * entry.
+ */
+
+struct tblentry **lastcmdentry;
+
+
+STATIC struct tblentry *
+cmdlookup(name, add)
+ char *name;
+ int add;
+{
+ int hashval;
+ char *p;
+ struct tblentry *cmdp;
+ struct tblentry **pp;
+
+ p = name;
+ hashval = *p << 4;
+ while (*p)
+ hashval += *p++;
+ hashval &= 0x7FFF;
+ pp = &cmdtable[hashval % CMDTABLESIZE];
+ for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) {
+ if (equal(cmdp->cmdname, name))
+ break;
+ pp = &cmdp->next;
+ }
+ if (add && cmdp == NULL) {
+ INTOFF;
+ cmdp = *pp = ckmalloc(sizeof (struct tblentry) - ARB
+ + strlen(name) + 1);
+ cmdp->next = NULL;
+ cmdp->cmdtype = CMDUNKNOWN;
+ cmdp->rehash = 0;
+ strcpy(cmdp->cmdname, name);
+ INTON;
+ }
+ lastcmdentry = pp;
+ return cmdp;
+}
+
+/*
+ * Delete the command entry returned on the last lookup.
+ */
+
+STATIC void
+delete_cmd_entry() {
+ struct tblentry *cmdp;
+
+ INTOFF;
+ cmdp = *lastcmdentry;
+ *lastcmdentry = cmdp->next;
+ ckfree(cmdp);
+ INTON;
+}
+
+
+
+#ifdef notdef
+void
+getcmdentry(name, entry)
+ char *name;
+ struct cmdentry *entry;
+ {
+ struct tblentry *cmdp = cmdlookup(name, 0);
+
+ if (cmdp) {
+ entry->u = cmdp->param;
+ entry->cmdtype = cmdp->cmdtype;
+ } else {
+ entry->cmdtype = CMDUNKNOWN;
+ entry->u.index = 0;
+ }
+}
+#endif
+
+
+/*
+ * Add a new command entry, replacing any existing command entry for
+ * the same name.
+ */
+
+void
+addcmdentry(name, entry)
+ char *name;
+ struct cmdentry *entry;
+ {
+ struct tblentry *cmdp;
+
+ INTOFF;
+ cmdp = cmdlookup(name, 1);
+ if (cmdp->cmdtype == CMDFUNCTION) {
+ freefunc(cmdp->param.func);
+ }
+ cmdp->cmdtype = entry->cmdtype;
+ cmdp->param = entry->u;
+ INTON;
+}
+
+
+/*
+ * Define a shell function.
+ */
+
+void
+defun(name, func)
+ char *name;
+ union node *func;
+ {
+ struct cmdentry entry;
+
+ INTOFF;
+ entry.cmdtype = CMDFUNCTION;
+ entry.u.func = copyfunc(func);
+ addcmdentry(name, &entry);
+ INTON;
+}
+
+
+/*
+ * Delete a function if it exists.
+ */
+
+int
+unsetfunc(name)
+ char *name;
+ {
+ struct tblentry *cmdp;
+
+ if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->cmdtype == CMDFUNCTION) {
+ freefunc(cmdp->param.func);
+ delete_cmd_entry();
+ return (0);
+ }
+ return (1);
+}
+
+/*
+ * Locate and print what a word is...
+ */
+
+int
+typecmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct cmdentry entry;
+ struct tblentry *cmdp;
+ char **pp;
+ struct alias *ap;
+ int i;
+ int error = 0;
+ extern char *const parsekwd[];
+
+ for (i = 1; i < argc; i++) {
+ out1str(argv[i]);
+ /* First look at the keywords */
+ for (pp = (char **)parsekwd; *pp; pp++)
+ if (**pp == *argv[i] && equal(*pp, argv[i]))
+ break;
+
+ if (*pp) {
+ out1str(" is a shell keyword\n");
+ continue;
+ }
+
+ /* Then look at the aliases */
+ if ((ap = lookupalias(argv[i], 1)) != NULL) {
+ out1fmt(" is an alias for %s\n", ap->val);
+ continue;
+ }
+
+ /* Then check if it is a tracked alias */
+ if ((cmdp = cmdlookup(argv[i], 0)) != NULL) {
+ entry.cmdtype = cmdp->cmdtype;
+ entry.u = cmdp->param;
+ }
+ else {
+ /* Finally use brute force */
+ find_command(argv[i], &entry, 0, pathval());
+ }
+
+ switch (entry.cmdtype) {
+ case CMDNORMAL: {
+ int j = entry.u.index;
+ char *path = pathval(), *name;
+ do {
+ name = padvance(&path, argv[i]);
+ stunalloc(name);
+ } while (--j >= 0);
+ out1fmt(" is%s %s\n",
+ cmdp ? " a tracked alias for" : "", name);
+ break;
+ }
+ case CMDFUNCTION:
+ out1str(" is a shell function\n");
+ break;
+
+ case CMDBUILTIN:
+ out1str(" is a shell builtin\n");
+ break;
+
+ default:
+ out1str(" not found\n");
+ error |= 127;
+ break;
+ }
+ }
+ return error;
+}
diff --git a/release/picobsd/tinyware/ash/exec.h b/release/picobsd/tinyware/ash/exec.h
new file mode 100644
index 0000000..9c03616
--- /dev/null
+++ b/release/picobsd/tinyware/ash/exec.h
@@ -0,0 +1,72 @@
+/* $NetBSD: exec.h,v 1.12 1997/02/06 23:24:53 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)exec.h 8.3 (Berkeley) 6/8/95
+ */
+
+/* values of cmdtype */
+#define CMDUNKNOWN -1 /* no entry in table for command */
+#define CMDNORMAL 0 /* command is an executable program */
+#define CMDBUILTIN 1 /* command is a shell builtin */
+#define CMDFUNCTION 2 /* command is a shell function */
+
+
+struct cmdentry {
+ int cmdtype;
+ union param {
+ int index;
+ union node *func;
+ } u;
+};
+
+
+extern char *pathopt; /* set by padvance */
+extern int exerrno; /* last exec error */
+
+void shellexec __P((char **, char **, char *, int));
+char *padvance __P((char **, char *));
+int hashcmd __P((int, char **));
+void find_command __P((char *, struct cmdentry *, int, char *));
+int find_builtin __P((char *));
+void hashcd __P((void));
+void changepath __P((const char *));
+void deletefuncs __P((void));
+void getcmdentry __P((char *, struct cmdentry *));
+void addcmdentry __P((char *, struct cmdentry *));
+void defun __P((char *, union node *));
+int unsetfunc __P((char *));
+int typecmd __P((int, char **));
diff --git a/release/picobsd/tinyware/ash/expand.c b/release/picobsd/tinyware/ash/expand.c
new file mode 100644
index 0000000..9d444d0
--- /dev/null
+++ b/release/picobsd/tinyware/ash/expand.c
@@ -0,0 +1,1385 @@
+/* $NetBSD: expand.c,v 1.31 1997/07/07 20:41:10 phil Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
+#else
+__RCSID("$NetBSD: expand.c,v 1.31 1997/07/07 20:41:10 phil Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <dirent.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <stdlib.h>
+
+/*
+ * Routines to expand arguments to commands. We have to deal with
+ * backquotes, shell variables, and file metacharacters.
+ */
+
+#include "shell.h"
+#include "main.h"
+#include "nodes.h"
+#include "eval.h"
+#include "expand.h"
+#include "syntax.h"
+#include "parser.h"
+#include "jobs.h"
+#include "options.h"
+#include "var.h"
+#include "input.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "mystring.h"
+#include "arith.h"
+#include "show.h"
+
+/*
+ * Structure specifying which parts of the string should be searched
+ * for IFS characters.
+ */
+
+struct ifsregion {
+ struct ifsregion *next; /* next region in list */
+ int begoff; /* offset of start of region */
+ int endoff; /* offset of end of region */
+ int nulonly; /* search for nul bytes only */
+};
+
+
+char *expdest; /* output of current string */
+struct nodelist *argbackq; /* list of back quote expressions */
+struct ifsregion ifsfirst; /* first struct in list of ifs regions */
+struct ifsregion *ifslastp; /* last struct in list */
+struct arglist exparg; /* holds expanded arg list */
+
+STATIC void argstr __P((char *, int));
+STATIC char *exptilde __P((char *, int));
+STATIC void expbackq __P((union node *, int, int));
+STATIC int subevalvar __P((char *, char *, int, int, int, int));
+STATIC char *evalvar __P((char *, int));
+STATIC int varisset __P((char *, int));
+STATIC void varvalue __P((char *, int, int));
+STATIC void recordregion __P((int, int, int));
+STATIC void ifsbreakup __P((char *, struct arglist *));
+STATIC void expandmeta __P((struct strlist *, int));
+STATIC void expmeta __P((char *, char *));
+STATIC void addfname __P((char *));
+STATIC struct strlist *expsort __P((struct strlist *));
+STATIC struct strlist *msort __P((struct strlist *, int));
+STATIC int pmatch __P((char *, char *));
+STATIC char *cvtnum __P((int, char *));
+
+/*
+ * Expand shell variables and backquotes inside a here document.
+ */
+
+void
+expandhere(arg, fd)
+ union node *arg; /* the document */
+ int fd; /* where to write the expanded version */
+ {
+ herefd = fd;
+ expandarg(arg, (struct arglist *)NULL, 0);
+ xwrite(fd, stackblock(), expdest - stackblock());
+}
+
+
+/*
+ * Perform variable substitution and command substitution on an argument,
+ * placing the resulting list of arguments in arglist. If EXP_FULL is true,
+ * perform splitting and file name expansion. When arglist is NULL, perform
+ * here document expansion.
+ */
+
+void
+expandarg(arg, arglist, flag)
+ union node *arg;
+ struct arglist *arglist;
+ int flag;
+{
+ struct strlist *sp;
+ char *p;
+
+ argbackq = arg->narg.backquote;
+ STARTSTACKSTR(expdest);
+ ifsfirst.next = NULL;
+ ifslastp = NULL;
+ argstr(arg->narg.text, flag);
+ if (arglist == NULL) {
+ return; /* here document expanded */
+ }
+ STPUTC('\0', expdest);
+ p = grabstackstr(expdest);
+ exparg.lastp = &exparg.list;
+ /*
+ * TODO - EXP_REDIR
+ */
+ if (flag & EXP_FULL) {
+ ifsbreakup(p, &exparg);
+ *exparg.lastp = NULL;
+ exparg.lastp = &exparg.list;
+ expandmeta(exparg.list, flag);
+ } else {
+ if (flag & EXP_REDIR) /*XXX - for now, just remove escapes */
+ rmescapes(p);
+ sp = (struct strlist *)stalloc(sizeof (struct strlist));
+ sp->text = p;
+ *exparg.lastp = sp;
+ exparg.lastp = &sp->next;
+ }
+ while (ifsfirst.next != NULL) {
+ struct ifsregion *ifsp;
+ INTOFF;
+ ifsp = ifsfirst.next->next;
+ ckfree(ifsfirst.next);
+ ifsfirst.next = ifsp;
+ INTON;
+ }
+ *exparg.lastp = NULL;
+ if (exparg.list) {
+ *arglist->lastp = exparg.list;
+ arglist->lastp = exparg.lastp;
+ }
+}
+
+
+
+/*
+ * Perform variable and command substitution. If EXP_FULL is set, output CTLESC
+ * characters to allow for further processing. Otherwise treat
+ * $@ like $* since no splitting will be performed.
+ */
+
+STATIC void
+argstr(p, flag)
+ char *p;
+ int flag;
+{
+ char c;
+ int quotes = flag & (EXP_FULL | EXP_CASE); /* do CTLESC */
+ int firsteq = 1;
+
+ if (*p == '~' && (flag & (EXP_TILDE | EXP_VARTILDE)))
+ p = exptilde(p, flag);
+ for (;;) {
+ switch (c = *p++) {
+ case '\0':
+ case CTLENDVAR: /* ??? */
+ goto breakloop;
+ case CTLESC:
+ if (quotes)
+ STPUTC(c, expdest);
+ c = *p++;
+ STPUTC(c, expdest);
+ break;
+ case CTLVAR:
+ p = evalvar(p, flag);
+ break;
+ case CTLBACKQ:
+ case CTLBACKQ|CTLQUOTE:
+ expbackq(argbackq->n, c & CTLQUOTE, flag);
+ argbackq = argbackq->next;
+ break;
+ case CTLENDARI:
+ expari(flag);
+ break;
+ case ':':
+ case '=':
+ /*
+ * sort of a hack - expand tildes in variable
+ * assignments (after the first '=' and after ':'s).
+ */
+ STPUTC(c, expdest);
+ if (flag & EXP_VARTILDE && *p == '~') {
+ if (c == '=') {
+ if (firsteq)
+ firsteq = 0;
+ else
+ break;
+ }
+ p = exptilde(p, flag);
+ }
+ break;
+ default:
+ STPUTC(c, expdest);
+ }
+ }
+breakloop:;
+}
+
+STATIC char *
+exptilde(p, flag)
+ char *p;
+ int flag;
+{
+ char c, *startp = p;
+ struct passwd *pw;
+ char *home;
+ int quotes = flag & (EXP_FULL | EXP_CASE);
+
+ while ((c = *p) != '\0') {
+ switch(c) {
+ case CTLESC:
+ return (startp);
+ case ':':
+ if (flag & EXP_VARTILDE)
+ goto done;
+ break;
+ case '/':
+ goto done;
+ }
+ p++;
+ }
+done:
+ *p = '\0';
+ if (*(startp+1) == '\0') {
+ if ((home = lookupvar("HOME")) == NULL)
+ goto lose;
+ } else {
+ if ((pw = getpwnam(startp+1)) == NULL)
+ goto lose;
+ home = pw->pw_dir;
+ }
+ if (*home == '\0')
+ goto lose;
+ *p = c;
+ while ((c = *home++) != '\0') {
+ if (quotes && SQSYNTAX[c] == CCTL)
+ STPUTC(CTLESC, expdest);
+ STPUTC(c, expdest);
+ }
+ return (p);
+lose:
+ *p = c;
+ return (startp);
+}
+
+
+/*
+ * Expand arithmetic expression. Backup to start of expression,
+ * evaluate, place result in (backed up) result, adjust string position.
+ */
+void
+expari(flag)
+ int flag;
+{
+ char *p, *start;
+ int result;
+ int quotes = flag & (EXP_FULL | EXP_CASE);
+
+ while (ifsfirst.next != NULL) {
+ struct ifsregion *ifsp;
+ INTOFF;
+ ifsp = ifsfirst.next->next;
+ ckfree(ifsfirst.next);
+ ifsfirst.next = ifsp;
+ INTON;
+ }
+ ifslastp = NULL;
+
+ /*
+ * This routine is slightly over-compilcated for
+ * efficiency. First we make sure there is
+ * enough space for the result, which may be bigger
+ * than the expression if we add exponentation. Next we
+ * scan backwards looking for the start of arithmetic. If the
+ * next previous character is a CTLESC character, then we
+ * have to rescan starting from the beginning since CTLESC
+ * characters have to be processed left to right.
+ */
+ CHECKSTRSPACE(8, expdest);
+ USTPUTC('\0', expdest);
+ start = stackblock();
+ p = expdest;
+ while (*p != CTLARI && p >= start)
+ --p;
+ if (*p != CTLARI)
+ error("missing CTLARI (shouldn't happen)");
+ if (p > start && *(p-1) == CTLESC)
+ for (p = start; *p != CTLARI; p++)
+ if (*p == CTLESC)
+ p++;
+ if (quotes)
+ rmescapes(p+1);
+ result = arith(p+1);
+ fmtstr(p, 10, "%d", result);
+
+ while (*p++)
+ ;
+
+ result = expdest - p + 1;
+ STADJUST(-result, expdest);
+}
+
+
+/*
+ * Expand stuff in backwards quotes.
+ */
+
+STATIC void
+expbackq(cmd, quoted, flag)
+ union node *cmd;
+ int quoted;
+ int flag;
+{
+ struct backcmd in;
+ int i;
+ char buf[128];
+ char *p;
+ char *dest = expdest;
+ struct ifsregion saveifs, *savelastp;
+ struct nodelist *saveargbackq;
+ char lastc;
+ int startloc = dest - stackblock();
+ char const *syntax = quoted? DQSYNTAX : BASESYNTAX;
+ int saveherefd;
+ int quotes = flag & (EXP_FULL | EXP_CASE);
+
+ INTOFF;
+ saveifs = ifsfirst;
+ savelastp = ifslastp;
+ saveargbackq = argbackq;
+ saveherefd = herefd;
+ herefd = -1;
+ p = grabstackstr(dest);
+ evalbackcmd(cmd, &in);
+ ungrabstackstr(p, dest);
+ ifsfirst = saveifs;
+ ifslastp = savelastp;
+ argbackq = saveargbackq;
+ herefd = saveherefd;
+
+ p = in.buf;
+ lastc = '\0';
+ for (;;) {
+ if (--in.nleft < 0) {
+ if (in.fd < 0)
+ break;
+ while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR);
+ TRACE(("expbackq: read returns %d\n", i));
+ if (i <= 0)
+ break;
+ p = buf;
+ in.nleft = i - 1;
+ }
+ lastc = *p++;
+ if (lastc != '\0') {
+ if (quotes && syntax[lastc] == CCTL)
+ STPUTC(CTLESC, dest);
+ STPUTC(lastc, dest);
+ }
+ }
+
+ /* Eat all trailing newlines */
+ for (p--; lastc == '\n'; lastc = *--p)
+ STUNPUTC(dest);
+
+ if (in.fd >= 0)
+ close(in.fd);
+ if (in.buf)
+ ckfree(in.buf);
+ if (in.jp)
+ exitstatus = waitforjob(in.jp);
+ if (quoted == 0)
+ recordregion(startloc, dest - stackblock(), 0);
+ TRACE(("evalbackq: size=%d: \"%.*s\"\n",
+ (dest - stackblock()) - startloc,
+ (dest - stackblock()) - startloc,
+ stackblock() + startloc));
+ expdest = dest;
+ INTON;
+}
+
+
+
+STATIC int
+subevalvar(p, str, strloc, subtype, startloc, varflags)
+ char *p;
+ char *str;
+ int strloc;
+ int subtype;
+ int startloc;
+ int varflags;
+{
+ char *startp;
+ char *loc = NULL;
+ int c = 0;
+ int saveherefd = herefd;
+ struct nodelist *saveargbackq = argbackq;
+ int amount;
+
+ herefd = -1;
+ argstr(p, 0);
+ STACKSTRNUL(expdest);
+ herefd = saveherefd;
+ argbackq = saveargbackq;
+ startp = stackblock() + startloc;
+ if (str == NULL)
+ str = stackblock() + strloc;
+
+ switch (subtype) {
+ case VSASSIGN:
+ setvar(str, startp, 0);
+ amount = startp - expdest;
+ STADJUST(amount, expdest);
+ varflags &= ~VSNUL;
+ if (c != 0)
+ *loc = c;
+ return 1;
+
+ case VSQUESTION:
+ if (*p != CTLENDVAR) {
+ outfmt(&errout, "%s\n", startp);
+ error((char *)NULL);
+ }
+ error("%.*s: parameter %snot set", p - str - 1,
+ str, (varflags & VSNUL) ? "null or "
+ : nullstr);
+ return 0;
+
+ case VSTRIMLEFT:
+ for (loc = startp; loc < str; loc++) {
+ c = *loc;
+ *loc = '\0';
+ if (patmatch(str, startp)) {
+ *loc = c;
+ goto recordleft;
+ }
+ *loc = c;
+ }
+ return 0;
+
+ case VSTRIMLEFTMAX:
+ for (loc = str - 1; loc >= startp; loc--) {
+ c = *loc;
+ *loc = '\0';
+ if (patmatch(str, startp)) {
+ *loc = c;
+ goto recordleft;
+ }
+ *loc = c;
+ }
+ return 0;
+
+ case VSTRIMRIGHT:
+ for (loc = str - 1; loc >= startp; loc--) {
+ if (patmatch(str, loc)) {
+ amount = loc - expdest;
+ STADJUST(amount, expdest);
+ return 1;
+ }
+ }
+ return 0;
+
+ case VSTRIMRIGHTMAX:
+ for (loc = startp; loc < str - 1; loc++) {
+ if (patmatch(str, loc)) {
+ amount = loc - expdest;
+ STADJUST(amount, expdest);
+ return 1;
+ }
+ }
+ return 0;
+
+
+ default:
+ abort();
+ }
+
+recordleft:
+ amount = ((str - 1) - (loc - startp)) - expdest;
+ STADJUST(amount, expdest);
+ while (loc != str - 1)
+ *startp++ = *loc++;
+ return 1;
+}
+
+
+/*
+ * Expand a variable, and return a pointer to the next character in the
+ * input string.
+ */
+
+STATIC char *
+evalvar(p, flag)
+ char *p;
+ int flag;
+{
+ int subtype;
+ int varflags;
+ char *var;
+ char *val;
+ char *pat;
+ int c;
+ int set;
+ int special;
+ int startloc;
+ int varlen;
+ int easy;
+ int quotes = flag & (EXP_FULL | EXP_CASE);
+
+ varflags = *p++;
+ subtype = varflags & VSTYPE;
+ var = p;
+ special = 0;
+ if (! is_name(*p))
+ special = 1;
+ p = strchr(p, '=') + 1;
+again: /* jump here after setting a variable with ${var=text} */
+ if (special) {
+ set = varisset(var, varflags & VSNUL);
+ val = NULL;
+ } else {
+ val = lookupvar(var);
+ if (val == NULL || ((varflags & VSNUL) && val[0] == '\0')) {
+ val = NULL;
+ set = 0;
+ } else
+ set = 1;
+ }
+ varlen = 0;
+ startloc = expdest - stackblock();
+ if (set && subtype != VSPLUS) {
+ /* insert the value of the variable */
+ if (special) {
+ varvalue(var, varflags & VSQUOTE, flag & EXP_FULL);
+ if (subtype == VSLENGTH) {
+ varlen = expdest - stackblock() - startloc;
+ STADJUST(-varlen, expdest);
+ }
+ } else {
+ char const *syntax = (varflags & VSQUOTE) ? DQSYNTAX
+ : BASESYNTAX;
+
+ if (subtype == VSLENGTH) {
+ for (;*val; val++)
+ varlen++;
+ }
+ else {
+ while (*val) {
+ if (quotes && syntax[*val] == CCTL)
+ STPUTC(CTLESC, expdest);
+ STPUTC(*val++, expdest);
+ }
+
+ }
+ }
+ }
+
+ if (subtype == VSPLUS)
+ set = ! set;
+
+ easy = ((varflags & VSQUOTE) == 0 ||
+ (*var == '@' && shellparam.nparam != 1));
+
+
+ switch (subtype) {
+ case VSLENGTH:
+ expdest = cvtnum(varlen, expdest);
+ goto record;
+
+ case VSNORMAL:
+ if (!easy)
+ break;
+record:
+ recordregion(startloc, expdest - stackblock(),
+ varflags & VSQUOTE);
+ break;
+
+ case VSPLUS:
+ case VSMINUS:
+ if (!set) {
+ argstr(p, flag);
+ break;
+ }
+ if (easy)
+ goto record;
+ break;
+
+ case VSTRIMLEFT:
+ case VSTRIMLEFTMAX:
+ case VSTRIMRIGHT:
+ case VSTRIMRIGHTMAX:
+ if (!set)
+ break;
+ /*
+ * Terminate the string and start recording the pattern
+ * right after it
+ */
+ STPUTC('\0', expdest);
+ pat = expdest;
+ if (subevalvar(p, NULL, expdest - stackblock(), subtype,
+ startloc, varflags))
+ goto record;
+ else {
+ int amount = (expdest - pat) + 1;
+ STADJUST(-amount, expdest);
+ }
+ break;
+
+ case VSASSIGN:
+ case VSQUESTION:
+ if (!set) {
+ if (subevalvar(p, var, 0, subtype, startloc, varflags)) {
+ varflags &= ~VSNUL;
+ goto again;
+ }
+ break;
+ }
+ if (easy)
+ goto record;
+ break;
+
+ default:
+ abort();
+ }
+
+ if (subtype != VSNORMAL) { /* skip to end of alternative */
+ int nesting = 1;
+ for (;;) {
+ if ((c = *p++) == CTLESC)
+ p++;
+ else if (c == CTLBACKQ || c == (CTLBACKQ|CTLQUOTE)) {
+ if (set)
+ argbackq = argbackq->next;
+ } else if (c == CTLVAR) {
+ if ((*p++ & VSTYPE) != VSNORMAL)
+ nesting++;
+ } else if (c == CTLENDVAR) {
+ if (--nesting == 0)
+ break;
+ }
+ }
+ }
+ return p;
+}
+
+
+
+/*
+ * Test whether a specialized variable is set.
+ */
+
+STATIC int
+varisset(name, nulok)
+ char *name;
+ int nulok;
+{
+ if (*name == '!')
+ return backgndpid != -1;
+ else if (*name == '@' || *name == '*') {
+ if (*shellparam.p == NULL)
+ return 0;
+
+ if (nulok) {
+ char **av;
+
+ for (av = shellparam.p; *av; av++)
+ if (**av != '\0')
+ return 1;
+ return 0;
+ }
+ } else if (is_digit(*name)) {
+ char *ap;
+ int num = atoi(name);
+
+ if (num > shellparam.nparam)
+ return 0;
+
+ if (num == 0)
+ ap = arg0;
+ else
+ ap = shellparam.p[num - 1];
+
+ if (nulok && (ap == NULL || *ap == '\0'))
+ return 0;
+ }
+ return 1;
+}
+
+
+
+/*
+ * Add the value of a specialized variable to the stack string.
+ */
+
+STATIC void
+varvalue(name, quoted, allow_split)
+ char *name;
+ int quoted;
+ int allow_split;
+{
+ int num;
+ char *p;
+ int i;
+ extern int oexitstatus;
+ char sep;
+ char **ap;
+ char const *syntax;
+
+#define STRTODEST(p) \
+ do {\
+ if (allow_split) { \
+ syntax = quoted? DQSYNTAX : BASESYNTAX; \
+ while (*p) { \
+ if (syntax[*p] == CCTL) \
+ STPUTC(CTLESC, expdest); \
+ STPUTC(*p++, expdest); \
+ } \
+ } else \
+ while (*p) \
+ STPUTC(*p++, expdest); \
+ } while (0)
+
+
+ switch (*name) {
+ case '$':
+ num = rootpid;
+ goto numvar;
+ case '?':
+ num = oexitstatus;
+ goto numvar;
+ case '#':
+ num = shellparam.nparam;
+ goto numvar;
+ case '!':
+ num = backgndpid;
+numvar:
+ expdest = cvtnum(num, expdest);
+ break;
+ case '-':
+ for (i = 0 ; i < NOPTS ; i++) {
+ if (optlist[i].val)
+ STPUTC(optlist[i].letter, expdest);
+ }
+ break;
+ case '@':
+ if (allow_split) {
+ sep = '\0';
+ goto allargs;
+ }
+ /* fall through */
+ case '*':
+ sep = ((p=bltinlookup("IFS", 1)) == NULL || p[0] == '\0')
+ ? ' ' : p[0];
+
+allargs:
+ for (ap = shellparam.p ; (p = *ap++) != NULL ; ) {
+ STRTODEST(p);
+ if (*ap)
+ STPUTC(sep, expdest);
+ }
+ break;
+ case '0':
+ p = arg0;
+ STRTODEST(p);
+ break;
+ default:
+ if (is_digit(*name)) {
+ num = atoi(name);
+ if (num > 0 && num <= shellparam.nparam) {
+ p = shellparam.p[num - 1];
+ STRTODEST(p);
+ }
+ }
+ break;
+ }
+}
+
+
+
+/*
+ * Record the the fact that we have to scan this region of the
+ * string for IFS characters.
+ */
+
+STATIC void
+recordregion(start, end, nulonly)
+ int start;
+ int end;
+ int nulonly;
+{
+ struct ifsregion *ifsp;
+
+ if (ifslastp == NULL) {
+ ifsp = &ifsfirst;
+ } else {
+ ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion));
+ ifslastp->next = ifsp;
+ }
+ ifslastp = ifsp;
+ ifslastp->next = NULL;
+ ifslastp->begoff = start;
+ ifslastp->endoff = end;
+ ifslastp->nulonly = nulonly;
+}
+
+
+
+/*
+ * Break the argument string into pieces based upon IFS and add the
+ * strings to the argument list. The regions of the string to be
+ * searched for IFS characters have been stored by recordregion.
+ */
+STATIC void
+ifsbreakup(string, arglist)
+ char *string;
+ struct arglist *arglist;
+ {
+ struct ifsregion *ifsp;
+ struct strlist *sp;
+ char *start;
+ char *p;
+ char *q;
+ char *ifs;
+ int ifsspc;
+
+
+ start = string;
+ if (ifslastp != NULL) {
+ ifsp = &ifsfirst;
+ do {
+ p = string + ifsp->begoff;
+ ifs = ifsp->nulonly? nullstr : ifsval();
+ ifsspc = strchr(ifs, ' ') != NULL;
+ while (p < string + ifsp->endoff) {
+ q = p;
+ if (*p == CTLESC)
+ p++;
+ if (strchr(ifs, *p++)) {
+ if (q > start || !ifsspc) {
+ *q = '\0';
+ sp = (struct strlist *)stalloc(sizeof *sp);
+ sp->text = start;
+ *arglist->lastp = sp;
+ arglist->lastp = &sp->next;
+ }
+ if (ifsspc) {
+ for (;;) {
+ if (p >= string + ifsp->endoff)
+ break;
+ q = p;
+ if (*p == CTLESC)
+ p++;
+ if (strchr(ifs, *p++) == NULL) {
+ p = q;
+ break;
+ }
+ }
+ }
+ start = p;
+ }
+ }
+ } while ((ifsp = ifsp->next) != NULL);
+ if (*start || (!ifsspc && start > string)) {
+ sp = (struct strlist *)stalloc(sizeof *sp);
+ sp->text = start;
+ *arglist->lastp = sp;
+ arglist->lastp = &sp->next;
+ }
+ } else {
+ sp = (struct strlist *)stalloc(sizeof *sp);
+ sp->text = start;
+ *arglist->lastp = sp;
+ arglist->lastp = &sp->next;
+ }
+}
+
+
+
+/*
+ * Expand shell metacharacters. At this point, the only control characters
+ * should be escapes. The results are stored in the list exparg.
+ */
+
+char *expdir;
+
+
+STATIC void
+expandmeta(str, flag)
+ struct strlist *str;
+ int flag;
+{
+ char *p;
+ struct strlist **savelastp;
+ struct strlist *sp;
+ char c;
+ /* TODO - EXP_REDIR */
+
+ while (str) {
+ if (fflag)
+ goto nometa;
+ p = str->text;
+ for (;;) { /* fast check for meta chars */
+ if ((c = *p++) == '\0')
+ goto nometa;
+ if (c == '*' || c == '?' || c == '[' || c == '!')
+ break;
+ }
+ savelastp = exparg.lastp;
+ INTOFF;
+ if (expdir == NULL) {
+ int i = strlen(str->text);
+ expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */
+ }
+
+ expmeta(expdir, str->text);
+ ckfree(expdir);
+ expdir = NULL;
+ INTON;
+ if (exparg.lastp == savelastp) {
+ /*
+ * no matches
+ */
+nometa:
+ *exparg.lastp = str;
+ rmescapes(str->text);
+ exparg.lastp = &str->next;
+ } else {
+ *exparg.lastp = NULL;
+ *savelastp = sp = expsort(*savelastp);
+ while (sp->next != NULL)
+ sp = sp->next;
+ exparg.lastp = &sp->next;
+ }
+ str = str->next;
+ }
+}
+
+
+/*
+ * Do metacharacter (i.e. *, ?, [...]) expansion.
+ */
+
+STATIC void
+expmeta(enddir, name)
+ char *enddir;
+ char *name;
+ {
+ char *p;
+ char *q;
+ char *start;
+ char *endname;
+ int metaflag;
+ struct stat statb;
+ DIR *dirp;
+ struct dirent *dp;
+ int atend;
+ int matchdot;
+
+ metaflag = 0;
+ start = name;
+ for (p = name ; ; p++) {
+ if (*p == '*' || *p == '?')
+ metaflag = 1;
+ else if (*p == '[') {
+ q = p + 1;
+ if (*q == '!')
+ q++;
+ for (;;) {
+ if (*q == CTLESC)
+ q++;
+ if (*q == '/' || *q == '\0')
+ break;
+ if (*++q == ']') {
+ metaflag = 1;
+ break;
+ }
+ }
+ } else if (*p == '!' && p[1] == '!' && (p == name || p[-1] == '/')) {
+ metaflag = 1;
+ } else if (*p == '\0')
+ break;
+ else if (*p == CTLESC)
+ p++;
+ if (*p == '/') {
+ if (metaflag)
+ break;
+ start = p + 1;
+ }
+ }
+ if (metaflag == 0) { /* we've reached the end of the file name */
+ if (enddir != expdir)
+ metaflag++;
+ for (p = name ; ; p++) {
+ if (*p == CTLESC)
+ p++;
+ *enddir++ = *p;
+ if (*p == '\0')
+ break;
+ }
+ if (metaflag == 0 || stat(expdir, &statb) >= 0)
+ addfname(expdir);
+ return;
+ }
+ endname = p;
+ if (start != name) {
+ p = name;
+ while (p < start) {
+ if (*p == CTLESC)
+ p++;
+ *enddir++ = *p++;
+ }
+ }
+ if (enddir == expdir) {
+ p = ".";
+ } else if (enddir == expdir + 1 && *expdir == '/') {
+ p = "/";
+ } else {
+ p = expdir;
+ enddir[-1] = '\0';
+ }
+ if ((dirp = opendir(p)) == NULL)
+ return;
+ if (enddir != expdir)
+ enddir[-1] = '/';
+ if (*endname == 0) {
+ atend = 1;
+ } else {
+ atend = 0;
+ *endname++ = '\0';
+ }
+ matchdot = 0;
+ if (start[0] == '.' || (start[0] == CTLESC && start[1] == '.'))
+ matchdot++;
+ while (! int_pending() && (dp = readdir(dirp)) != NULL) {
+ if (dp->d_name[0] == '.' && ! matchdot)
+ continue;
+ if (patmatch(start, dp->d_name)) {
+ if (atend) {
+ scopy(dp->d_name, enddir);
+ addfname(expdir);
+ } else {
+ char *q;
+ for (p = enddir, q = dp->d_name;
+ (*p++ = *q++) != '\0';)
+ continue;
+ p[-1] = '/';
+ expmeta(p, endname);
+ }
+ }
+ }
+ closedir(dirp);
+ if (! atend)
+ endname[-1] = '/';
+}
+
+
+/*
+ * Add a file name to the list.
+ */
+
+STATIC void
+addfname(name)
+ char *name;
+ {
+ char *p;
+ struct strlist *sp;
+
+ p = stalloc(strlen(name) + 1);
+ scopy(name, p);
+ sp = (struct strlist *)stalloc(sizeof *sp);
+ sp->text = p;
+ *exparg.lastp = sp;
+ exparg.lastp = &sp->next;
+}
+
+
+/*
+ * Sort the results of file name expansion. It calculates the number of
+ * strings to sort and then calls msort (short for merge sort) to do the
+ * work.
+ */
+
+STATIC struct strlist *
+expsort(str)
+ struct strlist *str;
+ {
+ int len;
+ struct strlist *sp;
+
+ len = 0;
+ for (sp = str ; sp ; sp = sp->next)
+ len++;
+ return msort(str, len);
+}
+
+
+STATIC struct strlist *
+msort(list, len)
+ struct strlist *list;
+ int len;
+{
+ struct strlist *p, *q = NULL;
+ struct strlist **lpp;
+ int half;
+ int n;
+
+ if (len <= 1)
+ return list;
+ half = len >> 1;
+ p = list;
+ for (n = half ; --n >= 0 ; ) {
+ q = p;
+ p = p->next;
+ }
+ q->next = NULL; /* terminate first half of list */
+ q = msort(list, half); /* sort first half of list */
+ p = msort(p, len - half); /* sort second half */
+ lpp = &list;
+ for (;;) {
+ if (strcmp(p->text, q->text) < 0) {
+ *lpp = p;
+ lpp = &p->next;
+ if ((p = *lpp) == NULL) {
+ *lpp = q;
+ break;
+ }
+ } else {
+ *lpp = q;
+ lpp = &q->next;
+ if ((q = *lpp) == NULL) {
+ *lpp = p;
+ break;
+ }
+ }
+ }
+ return list;
+}
+
+
+
+/*
+ * Returns true if the pattern matches the string.
+ */
+
+int
+patmatch(pattern, string)
+ char *pattern;
+ char *string;
+ {
+#ifdef notdef
+ if (pattern[0] == '!' && pattern[1] == '!')
+ return 1 - pmatch(pattern + 2, string);
+ else
+#endif
+ return pmatch(pattern, string);
+}
+
+
+STATIC int
+pmatch(pattern, string)
+ char *pattern;
+ char *string;
+ {
+ char *p, *q;
+ char c;
+
+ p = pattern;
+ q = string;
+ for (;;) {
+ switch (c = *p++) {
+ case '\0':
+ goto breakloop;
+ case CTLESC:
+ if (*q++ != *p++)
+ return 0;
+ break;
+ case '?':
+ if (*q++ == '\0')
+ return 0;
+ break;
+ case '*':
+ c = *p;
+ if (c != CTLESC && c != '?' && c != '*' && c != '[') {
+ while (*q != c) {
+ if (*q == '\0')
+ return 0;
+ q++;
+ }
+ }
+ do {
+ if (pmatch(p, q))
+ return 1;
+ } while (*q++ != '\0');
+ return 0;
+ case '[': {
+ char *endp;
+ int invert, found;
+ char chr;
+
+ endp = p;
+ if (*endp == '!')
+ endp++;
+ for (;;) {
+ if (*endp == '\0')
+ goto dft; /* no matching ] */
+ if (*endp == CTLESC)
+ endp++;
+ if (*++endp == ']')
+ break;
+ }
+ invert = 0;
+ if (*p == '!') {
+ invert++;
+ p++;
+ }
+ found = 0;
+ chr = *q++;
+ if (chr == '\0')
+ return 0;
+ c = *p++;
+ do {
+ if (c == CTLESC)
+ c = *p++;
+ if (*p == '-' && p[1] != ']') {
+ p++;
+ if (*p == CTLESC)
+ p++;
+ if (chr >= c && chr <= *p)
+ found = 1;
+ p++;
+ } else {
+ if (chr == c)
+ found = 1;
+ }
+ } while ((c = *p++) != ']');
+ if (found == invert)
+ return 0;
+ break;
+ }
+dft: default:
+ if (*q++ != c)
+ return 0;
+ break;
+ }
+ }
+breakloop:
+ if (*q != '\0')
+ return 0;
+ return 1;
+}
+
+
+
+/*
+ * Remove any CTLESC characters from a string.
+ */
+
+void
+rmescapes(str)
+ char *str;
+ {
+ char *p, *q;
+
+ p = str;
+ while (*p != CTLESC) {
+ if (*p++ == '\0')
+ return;
+ }
+ q = p;
+ while (*p) {
+ if (*p == CTLESC)
+ p++;
+ *q++ = *p++;
+ }
+ *q = '\0';
+}
+
+
+
+/*
+ * See if a pattern matches in a case statement.
+ */
+
+int
+casematch(pattern, val)
+ union node *pattern;
+ char *val;
+ {
+ struct stackmark smark;
+ int result;
+ char *p;
+
+ setstackmark(&smark);
+ argbackq = pattern->narg.backquote;
+ STARTSTACKSTR(expdest);
+ ifslastp = NULL;
+ argstr(pattern->narg.text, EXP_TILDE | EXP_CASE);
+ STPUTC('\0', expdest);
+ p = grabstackstr(expdest);
+ result = patmatch(p, val);
+ popstackmark(&smark);
+ return result;
+}
+
+/*
+ * Our own itoa().
+ */
+
+STATIC char *
+cvtnum(num, buf)
+ int num;
+ char *buf;
+ {
+ char temp[32];
+ int neg = num < 0;
+ char *p = temp + 31;
+
+ temp[31] = '\0';
+
+ do {
+ *--p = num % 10 + '0';
+ } while ((num /= 10) != 0);
+
+ if (neg)
+ *--p = '-';
+
+ while (*p)
+ STPUTC(*p++, buf);
+ return buf;
+}
diff --git a/release/picobsd/tinyware/ash/expand.h b/release/picobsd/tinyware/ash/expand.h
new file mode 100644
index 0000000..a4dde98
--- /dev/null
+++ b/release/picobsd/tinyware/ash/expand.h
@@ -0,0 +1,68 @@
+/* $NetBSD: expand.h,v 1.8 1995/05/11 21:29:08 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)expand.h 8.2 (Berkeley) 5/4/95
+ */
+
+struct strlist {
+ struct strlist *next;
+ char *text;
+};
+
+
+struct arglist {
+ struct strlist *list;
+ struct strlist **lastp;
+};
+
+/*
+ * expandarg() flags
+ */
+#define EXP_FULL 0x1 /* perform word splitting & file globbing */
+#define EXP_TILDE 0x2 /* do normal tilde expansion */
+#define EXP_VARTILDE 0x4 /* expand tildes in an assignment */
+#define EXP_REDIR 0x8 /* file glob for a redirection (1 match only) */
+#define EXP_CASE 0x10 /* keeps quotes around for CASE pattern */
+
+
+union node;
+void expandhere __P((union node *, int));
+void expandarg __P((union node *, struct arglist *, int));
+void expari __P((int));
+int patmatch __P((char *, char *));
+void rmescapes __P((char *));
+int casematch __P((union node *, char *));
diff --git a/release/picobsd/tinyware/ash/funcs/cmv b/release/picobsd/tinyware/ash/funcs/cmv
new file mode 100644
index 0000000..667f846
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/cmv
@@ -0,0 +1,50 @@
+# $NetBSD: cmv,v 1.7 1995/05/11 21:31:05 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)cmv 8.2 (Berkeley) 5/4/95
+
+# Conditional move--don't replace an existing file.
+
+cmv() {
+ if test $# != 2
+ then echo "cmv: arg count"
+ return 2
+ fi
+ if test -f "$2" -o -w "$2"
+ then echo "$2 exists"
+ return 2
+ fi
+ /bin/mv "$1" "$2"
+}
diff --git a/release/picobsd/tinyware/ash/funcs/dirs b/release/picobsd/tinyware/ash/funcs/dirs
new file mode 100644
index 0000000..68bb317
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/dirs
@@ -0,0 +1,74 @@
+# $NetBSD: dirs,v 1.7 1995/05/11 21:31:08 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)dirs 8.2 (Berkeley) 5/4/95
+
+# pushd, popd, and dirs --- written by Chris Bertin
+# Pixel Computer Inc. ...!wjh12!pixel!pixutl!chris
+# as modified by Patrick Elam of GTRI and Kenneth Almquist at UW
+
+pushd () {
+ SAVE=`pwd`
+ if [ "$1" = "" ]
+ then if [ "$DSTACK" = "" ]
+ then echo "pushd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1 || return
+ shift 1
+ DSTACK="$*"
+ else cd $1 > /dev/null || return
+ fi
+ DSTACK="$SAVE $DSTACK"
+ dirs
+}
+
+popd () {
+ if [ "$DSTACK" = "" ]
+ then echo "popd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1
+ shift
+ DSTACK=$*
+ dirs
+}
+
+dirs () {
+ echo "`pwd` $DSTACK"
+ return 0
+}
diff --git a/release/picobsd/tinyware/ash/funcs/kill b/release/picobsd/tinyware/ash/funcs/kill
new file mode 100644
index 0000000..75b0180
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/kill
@@ -0,0 +1,50 @@
+# $NetBSD: kill,v 1.7 1995/05/11 21:31:10 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)kill 8.2 (Berkeley) 5/4/95
+
+# Convert job names to process ids and then run /bin/kill.
+
+kill() {
+ local args x
+ args=
+ for x in "$@"
+ do case $x in
+ %*) x=`jobid "$x"` ;;
+ esac
+ args="$args $x"
+ done
+ /bin/kill $args
+}
diff --git a/release/picobsd/tinyware/ash/funcs/login b/release/picobsd/tinyware/ash/funcs/login
new file mode 100644
index 0000000..7ae08b2
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/login
@@ -0,0 +1,39 @@
+# $NetBSD: login,v 1.7 1995/05/11 21:31:11 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)login 8.2 (Berkeley) 5/4/95
+
+# replaces the login builtin in the BSD shell
+login () exec login "$@"
diff --git a/release/picobsd/tinyware/ash/funcs/newgrp b/release/picobsd/tinyware/ash/funcs/newgrp
new file mode 100644
index 0000000..796a4f1
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/newgrp
@@ -0,0 +1,38 @@
+# $NetBSD: newgrp,v 1.7 1995/05/11 21:31:12 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)newgrp 8.2 (Berkeley) 5/4/95
+
+newgrp() exec newgrp "$@"
diff --git a/release/picobsd/tinyware/ash/funcs/popd b/release/picobsd/tinyware/ash/funcs/popd
new file mode 100644
index 0000000..b2b65d5
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/popd
@@ -0,0 +1,74 @@
+# $NetBSD: popd,v 1.7 1995/05/11 21:31:13 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)popd 8.2 (Berkeley) 5/4/95
+
+# pushd, popd, and dirs --- written by Chris Bertin
+# Pixel Computer Inc. ...!wjh12!pixel!pixutl!chris
+# as modified by Patrick Elam of GTRI and Kenneth Almquist at UW
+
+pushd () {
+ SAVE=`pwd`
+ if [ "$1" = "" ]
+ then if [ "$DSTACK" = "" ]
+ then echo "pushd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1 || return
+ shift 1
+ DSTACK="$*"
+ else cd $1 > /dev/null || return
+ fi
+ DSTACK="$SAVE $DSTACK"
+ dirs
+}
+
+popd () {
+ if [ "$DSTACK" = "" ]
+ then echo "popd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1
+ shift
+ DSTACK=$*
+ dirs
+}
+
+dirs () {
+ echo "`pwd` $DSTACK"
+ return 0
+}
diff --git a/release/picobsd/tinyware/ash/funcs/pushd b/release/picobsd/tinyware/ash/funcs/pushd
new file mode 100644
index 0000000..b393038
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/pushd
@@ -0,0 +1,74 @@
+# $NetBSD: pushd,v 1.7 1995/05/11 21:31:15 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)pushd 8.2 (Berkeley) 5/4/95
+
+# pushd, popd, and dirs --- written by Chris Bertin
+# Pixel Computer Inc. ...!wjh12!pixel!pixutl!chris
+# as modified by Patrick Elam of GTRI and Kenneth Almquist at UW
+
+pushd () {
+ SAVE=`pwd`
+ if [ "$1" = "" ]
+ then if [ "$DSTACK" = "" ]
+ then echo "pushd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1 || return
+ shift 1
+ DSTACK="$*"
+ else cd $1 > /dev/null || return
+ fi
+ DSTACK="$SAVE $DSTACK"
+ dirs
+}
+
+popd () {
+ if [ "$DSTACK" = "" ]
+ then echo "popd: directory stack empty."
+ return 1
+ fi
+ set $DSTACK
+ cd $1
+ shift
+ DSTACK=$*
+ dirs
+}
+
+dirs () {
+ echo "`pwd` $DSTACK"
+ return 0
+}
diff --git a/release/picobsd/tinyware/ash/funcs/suspend b/release/picobsd/tinyware/ash/funcs/suspend
new file mode 100644
index 0000000..8a4197d
--- /dev/null
+++ b/release/picobsd/tinyware/ash/funcs/suspend
@@ -0,0 +1,42 @@
+# $NetBSD: suspend,v 1.7 1995/05/11 21:31:17 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)suspend 8.2 (Berkeley) 5/4/95
+
+suspend() {
+ local -
+ set +j
+ kill -TSTP 0
+}
diff --git a/release/picobsd/tinyware/ash/histedit.c b/release/picobsd/tinyware/ash/histedit.c
new file mode 100644
index 0000000..73883c6
--- /dev/null
+++ b/release/picobsd/tinyware/ash/histedit.c
@@ -0,0 +1,501 @@
+/* $NetBSD: histedit.c,v 1.14 1997/07/04 21:02:02 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: histedit.c,v 1.14 1997/07/04 21:02:02 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/param.h>
+#include <paths.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+/*
+ * Editline and history functions (and glue).
+ */
+#include "shell.h"
+#include "parser.h"
+#include "var.h"
+#include "options.h"
+#include "main.h"
+#include "output.h"
+#include "mystring.h"
+#ifndef SMALL
+#include "myhistedit.h"
+#include "error.h"
+#include "eval.h"
+#include "memalloc.h"
+
+#define MAXHISTLOOPS 4 /* max recursions through fc */
+#define DEFEDITOR "ed" /* default editor *should* be $EDITOR */
+
+History *hist; /* history cookie */
+EditLine *el; /* editline cookie */
+int displayhist;
+static FILE *el_in, *el_out;
+
+STATIC char *fc_replace __P((const char *, char *, char *));
+
+/*
+ * Set history and editing status. Called whenever the status may
+ * have changed (figures out what to do).
+ */
+void
+histedit()
+{
+
+#define editing (Eflag || Vflag)
+
+ if (iflag) {
+ if (!hist) {
+ /*
+ * turn history on
+ */
+ INTOFF;
+ hist = history_init();
+ INTON;
+
+ if (hist != NULL)
+ sethistsize(histsizeval());
+ else
+ out2str("sh: can't initialize history\n");
+ }
+ if (editing && !el && isatty(0)) { /* && isatty(2) ??? */
+ /*
+ * turn editing on
+ */
+ INTOFF;
+ if (el_in == NULL)
+ el_in = fdopen(0, "r");
+ if (el_out == NULL)
+ el_out = fdopen(2, "w");
+ if (el_in == NULL || el_out == NULL)
+ goto bad;
+ el = el_init(arg0, el_in, el_out);
+ if (el != NULL) {
+ if (hist)
+ el_set(el, EL_HIST, history, hist);
+ el_set(el, EL_PROMPT, getprompt);
+ } else {
+bad:
+ out2str("sh: can't initialize editing\n");
+ }
+ INTON;
+ } else if (!editing && el) {
+ INTOFF;
+ el_end(el);
+ el = NULL;
+ INTON;
+ }
+ if (el) {
+ if (Vflag)
+ el_set(el, EL_EDITOR, "vi");
+ else if (Eflag)
+ el_set(el, EL_EDITOR, "emacs");
+ }
+ } else {
+ INTOFF;
+ if (el) { /* no editing if not interactive */
+ el_end(el);
+ el = NULL;
+ }
+ if (hist) {
+ history_end(hist);
+ hist = NULL;
+ }
+ INTON;
+ }
+}
+
+
+void
+sethistsize(hs)
+ const char *hs;
+{
+ int histsize;
+
+ if (hist != NULL) {
+ if (hs == NULL || *hs == '\0' ||
+ (histsize = atoi(hs)) < 0)
+ histsize = 100;
+ history(hist, H_EVENT, histsize);
+ }
+}
+
+void
+setterm(term)
+ const char *term;
+{
+ if (el != NULL && term != NULL)
+ if (el_set(el, EL_TERMINAL, term) != 0) {
+ outfmt(out2, "sh: Can't set terminal type %s\n", term);
+ outfmt(out2, "sh: Using dumb terminal settings.\n");
+ }
+}
+
+/*
+ * This command is provided since POSIX decided to standardize
+ * the Korn shell fc command. Oh well...
+ */
+int
+histcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ extern char *optarg;
+ extern int optind, optopt, optreset;
+ int ch;
+ char *editor = NULL;
+ const HistEvent *he;
+ int lflg = 0, nflg = 0, rflg = 0, sflg = 0;
+ int i;
+ char *firststr, *laststr;
+ int first, last, direction;
+ char *pat = NULL, *repl; /* ksh "fc old=new" crap */
+ static int active = 0;
+ struct jmploc jmploc;
+ struct jmploc *volatile savehandler;
+ char editfile[MAXPATHLEN + 1];
+ FILE *efp;
+#ifdef __GNUC__
+ /* Avoid longjmp clobbering */
+ (void) &editor;
+ (void) &lflg;
+ (void) &nflg;
+ (void) &rflg;
+ (void) &sflg;
+ (void) &firststr;
+ (void) &laststr;
+ (void) &pat;
+ (void) &repl;
+ (void) &efp;
+ (void) &argc;
+ (void) &argv;
+#endif
+
+ if (hist == NULL)
+ error("history not active");
+
+ if (argc == 1)
+ error("missing history argument");
+
+ optreset = 1; optind = 1; /* initialize getopt */
+ while (not_fcnumber(argv[optind]) &&
+ (ch = getopt(argc, argv, ":e:lnrs")) != EOF)
+ switch ((char)ch) {
+ case 'e':
+ editor = optarg;
+ break;
+ case 'l':
+ lflg = 1;
+ break;
+ case 'n':
+ nflg = 1;
+ break;
+ case 'r':
+ rflg = 1;
+ break;
+ case 's':
+ sflg = 1;
+ break;
+ case ':':
+ error("option -%c expects argument", optopt);
+ case '?':
+ default:
+ error("unknown option: -%c", optopt);
+ }
+ argc -= optind, argv += optind;
+
+ /*
+ * If executing...
+ */
+ if (lflg == 0 || editor || sflg) {
+ lflg = 0; /* ignore */
+ editfile[0] = '\0';
+ /*
+ * Catch interrupts to reset active counter and
+ * cleanup temp files.
+ */
+ if (setjmp(jmploc.loc)) {
+ active = 0;
+ if (*editfile)
+ unlink(editfile);
+ handler = savehandler;
+ longjmp(handler->loc, 1);
+ }
+ savehandler = handler;
+ handler = &jmploc;
+ if (++active > MAXHISTLOOPS) {
+ active = 0;
+ displayhist = 0;
+ error("called recursively too many times");
+ }
+ /*
+ * Set editor.
+ */
+ if (sflg == 0) {
+ if (editor == NULL &&
+ (editor = bltinlookup("FCEDIT", 1)) == NULL &&
+ (editor = bltinlookup("EDITOR", 1)) == NULL)
+ editor = DEFEDITOR;
+ if (editor[0] == '-' && editor[1] == '\0') {
+ sflg = 1; /* no edit */
+ editor = NULL;
+ }
+ }
+ }
+
+ /*
+ * If executing, parse [old=new] now
+ */
+ if (lflg == 0 && argc > 0 &&
+ ((repl = strchr(argv[0], '=')) != NULL)) {
+ pat = argv[0];
+ *repl++ = '\0';
+ argc--, argv++;
+ }
+ /*
+ * determine [first] and [last]
+ */
+ switch (argc) {
+ case 0:
+ firststr = lflg ? "-16" : "-1";
+ laststr = "-1";
+ break;
+ case 1:
+ firststr = argv[0];
+ laststr = lflg ? "-1" : argv[0];
+ break;
+ case 2:
+ firststr = argv[0];
+ laststr = argv[1];
+ break;
+ default:
+ error("too many args");
+ }
+ /*
+ * Turn into event numbers.
+ */
+ first = str_to_event(firststr, 0);
+ last = str_to_event(laststr, 1);
+
+ if (rflg) {
+ i = last;
+ last = first;
+ first = i;
+ }
+ /*
+ * XXX - this should not depend on the event numbers
+ * always increasing. Add sequence numbers or offset
+ * to the history element in next (diskbased) release.
+ */
+ direction = first < last ? H_PREV : H_NEXT;
+
+ /*
+ * If editing, grab a temp file.
+ */
+ if (editor) {
+ int fd;
+ INTOFF; /* easier */
+ sprintf(editfile, "%s/_shXXXXXX", _PATH_TMP);
+ if ((fd = mkstemp(editfile)) < 0)
+ error("can't create temporary file %s", editfile);
+ if ((efp = fdopen(fd, "w")) == NULL) {
+ close(fd);
+ error("can't allocate stdio buffer for temp");
+ }
+ }
+
+ /*
+ * Loop through selected history events. If listing or executing,
+ * do it now. Otherwise, put into temp file and call the editor
+ * after.
+ *
+ * The history interface needs rethinking, as the following
+ * convolutions will demonstrate.
+ */
+ history(hist, H_FIRST);
+ he = history(hist, H_NEXT_EVENT, first);
+ for (;he != NULL; he = history(hist, direction)) {
+ if (lflg) {
+ if (!nflg)
+ out1fmt("%5d ", he->num);
+ out1str(he->str);
+ } else {
+ char *s = pat ?
+ fc_replace(he->str, pat, repl) : (char *)he->str;
+
+ if (sflg) {
+ if (displayhist) {
+ out2str(s);
+ }
+ evalstring(s);
+ if (displayhist && hist) {
+ /*
+ * XXX what about recursive and
+ * relative histnums.
+ */
+ history(hist, H_ENTER, s);
+ }
+ } else
+ fputs(s, efp);
+ }
+ /*
+ * At end? (if we were to loose last, we'd sure be
+ * messed up).
+ */
+ if (he->num == last)
+ break;
+ }
+ if (editor) {
+ char *editcmd;
+
+ fclose(efp);
+ editcmd = stalloc(strlen(editor) + strlen(editfile) + 2);
+ sprintf(editcmd, "%s %s", editor, editfile);
+ evalstring(editcmd); /* XXX - should use no JC command */
+ INTON;
+ readcmdfile(editfile); /* XXX - should read back - quick tst */
+ unlink(editfile);
+ }
+
+ if (lflg == 0 && active > 0)
+ --active;
+ if (displayhist)
+ displayhist = 0;
+ return 0;
+}
+
+STATIC char *
+fc_replace(s, p, r)
+ const char *s;
+ char *p, *r;
+{
+ char *dest;
+ int plen = strlen(p);
+
+ STARTSTACKSTR(dest);
+ while (*s) {
+ if (*s == *p && strncmp(s, p, plen) == 0) {
+ while (*r)
+ STPUTC(*r++, dest);
+ s += plen;
+ *p = '\0'; /* so no more matches */
+ } else
+ STPUTC(*s++, dest);
+ }
+ STACKSTRNUL(dest);
+ dest = grabstackstr(dest);
+
+ return (dest);
+}
+
+int
+not_fcnumber(s)
+ char *s;
+{
+ if (s == NULL)
+ return 0;
+ if (*s == '-')
+ s++;
+ return (!is_number(s));
+}
+
+int
+str_to_event(str, last)
+ char *str;
+ int last;
+{
+ const HistEvent *he;
+ char *s = str;
+ int relative = 0;
+ int i;
+
+ he = history(hist, H_FIRST);
+ switch (*s) {
+ case '-':
+ relative = 1;
+ /*FALLTHROUGH*/
+ case '+':
+ s++;
+ }
+ if (is_number(s)) {
+ i = atoi(s);
+ if (relative) {
+ while (he != NULL && i--) {
+ he = history(hist, H_NEXT);
+ }
+ if (he == NULL)
+ he = history(hist, H_LAST);
+ } else {
+ he = history(hist, H_NEXT_EVENT, i);
+ if (he == NULL) {
+ /*
+ * the notion of first and last is
+ * backwards to that of the history package
+ */
+ he = history(hist, last ? H_FIRST : H_LAST);
+ }
+ }
+ if (he == NULL)
+ error("history number %s not found (internal error)",
+ str);
+ } else {
+ /*
+ * pattern
+ */
+ he = history(hist, H_PREV_STR, str);
+ if (he == NULL)
+ error("history pattern not found: %s", str);
+ }
+ return (he->num);
+}
+#else
+int
+histcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ error("not compiled with history support");
+}
+#endif
diff --git a/release/picobsd/tinyware/ash/init.h b/release/picobsd/tinyware/ash/init.h
new file mode 100644
index 0000000..3252aec
--- /dev/null
+++ b/release/picobsd/tinyware/ash/init.h
@@ -0,0 +1,43 @@
+/* $NetBSD: init.h,v 1.8 1995/05/11 21:29:14 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)init.h 8.2 (Berkeley) 5/4/95
+ */
+
+void init __P((void));
+void reset __P((void));
+void initshellproc __P((void));
diff --git a/release/picobsd/tinyware/ash/input.c b/release/picobsd/tinyware/ash/input.c
new file mode 100644
index 0000000..84c5fb8
--- /dev/null
+++ b/release/picobsd/tinyware/ash/input.c
@@ -0,0 +1,516 @@
+/* $NetBSD: input.c,v 1.27 1997/07/04 21:02:03 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)input.c 8.3 (Berkeley) 6/9/95";
+#else
+__RCSID("$NetBSD: input.c,v 1.27 1997/07/04 21:02:03 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <stdio.h> /* defines BUFSIZ */
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*
+ * This file implements the input routines used by the parser.
+ */
+
+#include "shell.h"
+#include "redir.h"
+#include "syntax.h"
+#include "input.h"
+#include "output.h"
+#include "options.h"
+#include "memalloc.h"
+#include "error.h"
+#include "alias.h"
+#include "parser.h"
+#include "myhistedit.h"
+
+#define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */
+
+MKINIT
+struct strpush {
+ struct strpush *prev; /* preceding string on stack */
+ char *prevstring;
+ int prevnleft;
+ int prevlleft;
+ struct alias *ap; /* if push was associated with an alias */
+};
+
+/*
+ * The parsefile structure pointed to by the global variable parsefile
+ * contains information about the current file being read.
+ */
+
+MKINIT
+struct parsefile {
+ struct parsefile *prev; /* preceding file on stack */
+ int linno; /* current line */
+ int fd; /* file descriptor (or -1 if string) */
+ int nleft; /* number of chars left in this line */
+ int lleft; /* number of chars left in this buffer */
+ char *nextc; /* next char in buffer */
+ char *buf; /* input buffer */
+ struct strpush *strpush; /* for pushing strings at this level */
+ struct strpush basestrpush; /* so pushing one is fast */
+};
+
+
+int plinno = 1; /* input line number */
+MKINIT int parsenleft; /* copy of parsefile->nleft */
+MKINIT int parselleft; /* copy of parsefile->lleft */
+char *parsenextc; /* copy of parsefile->nextc */
+MKINIT struct parsefile basepf; /* top level input file */
+char basebuf[BUFSIZ]; /* buffer for top level input file */
+struct parsefile *parsefile = &basepf; /* current input file */
+int init_editline = 0; /* editline library initialized? */
+int whichprompt; /* 1 == PS1, 2 == PS2 */
+
+EditLine *el; /* cookie for editline package */
+
+STATIC void pushfile __P((void));
+static int preadfd __P((void));
+
+#ifdef mkinit
+INCLUDE "input.h"
+INCLUDE "error.h"
+
+INIT {
+ extern char basebuf[];
+
+ basepf.nextc = basepf.buf = basebuf;
+}
+
+RESET {
+ if (exception != EXSHELLPROC)
+ parselleft = parsenleft = 0; /* clear input buffer */
+ popallfiles();
+}
+
+SHELLPROC {
+ popallfiles();
+}
+#endif
+
+
+/*
+ * Read a line from the script.
+ */
+
+char *
+pfgets(line, len)
+ char *line;
+ int len;
+{
+ char *p = line;
+ int nleft = len;
+ int c;
+
+ while (--nleft > 0) {
+ c = pgetc_macro();
+ if (c == PEOF) {
+ if (p == line)
+ return NULL;
+ break;
+ }
+ *p++ = c;
+ if (c == '\n')
+ break;
+ }
+ *p = '\0';
+ return line;
+}
+
+
+
+/*
+ * Read a character from the script, returning PEOF on end of file.
+ * Nul characters in the input are silently discarded.
+ */
+
+int
+pgetc()
+{
+ return pgetc_macro();
+}
+
+
+static int
+preadfd()
+{
+ int nr;
+ parsenextc = parsefile->buf;
+
+retry:
+#ifndef SMALL
+ if (parsefile->fd == 0 && el) {
+ const char *rl_cp;
+
+ rl_cp = el_gets(el, &nr);
+ if (rl_cp == NULL)
+ nr = 0;
+ else {
+ /* XXX - BUFSIZE should redesign so not necessary */
+ (void) strcpy(parsenextc, rl_cp);
+ }
+ } else
+#endif
+ nr = read(parsefile->fd, parsenextc, BUFSIZ - 1);
+
+
+ if (nr <= 0) {
+ if (nr < 0) {
+ if (errno == EINTR)
+ goto retry;
+ if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
+ int flags = fcntl(0, F_GETFL, 0);
+ if (flags >= 0 && flags & O_NONBLOCK) {
+ flags &=~ O_NONBLOCK;
+ if (fcntl(0, F_SETFL, flags) >= 0) {
+ out2str("sh: turning off NDELAY mode\n");
+ goto retry;
+ }
+ }
+ }
+ }
+ nr = -1;
+ }
+ return nr;
+}
+
+/*
+ * Refill the input buffer and return the next input character:
+ *
+ * 1) If a string was pushed back on the input, pop it;
+ * 2) If an EOF was pushed back (parsenleft == EOF_NLEFT) or we are reading
+ * from a string so we can't refill the buffer, return EOF.
+ * 3) If the is more stuff in this buffer, use it else call read to fill it.
+ * 4) Process input up to the next newline, deleting nul characters.
+ */
+
+int
+preadbuffer()
+{
+ char *p, *q;
+ int more;
+ int something;
+ extern EditLine *el;
+ char savec;
+
+ if (parsefile->strpush) {
+ popstring();
+ if (--parsenleft >= 0)
+ return (*parsenextc++);
+ }
+ if (parsenleft == EOF_NLEFT || parsefile->buf == NULL)
+ return PEOF;
+ flushout(&output);
+ flushout(&errout);
+
+again:
+ if (parselleft <= 0) {
+ if ((parselleft = preadfd()) == -1) {
+ parselleft = parsenleft = EOF_NLEFT;
+ return PEOF;
+ }
+ }
+
+ q = p = parsenextc;
+
+ /* delete nul characters */
+ something = 0;
+ for (more = 1; more;) {
+ switch (*p) {
+ case '\0':
+ p++; /* Skip nul */
+ goto check;
+
+ case '\t':
+ case ' ':
+ break;
+
+ case '\n':
+ parsenleft = q - parsenextc;
+ more = 0; /* Stop processing here */
+ break;
+
+ default:
+ something = 1;
+ break;
+ }
+
+ *q++ = *p++;
+check:
+ if (--parselleft <= 0) {
+ parsenleft = q - parsenextc - 1;
+ if (parsenleft < 0)
+ goto again;
+ *q = '\0';
+ more = 0;
+ }
+ }
+
+ savec = *q;
+ *q = '\0';
+
+#ifndef SMALL
+ if (parsefile->fd == 0 && hist && something) {
+ INTOFF;
+ history(hist, whichprompt == 1 ? H_ENTER : H_ADD, parsenextc);
+ INTON;
+ }
+#endif
+
+ if (vflag) {
+ out2str(parsenextc);
+ flushout(out2);
+ }
+
+ *q = savec;
+
+ return *parsenextc++;
+}
+
+/*
+ * Undo the last call to pgetc. Only one character may be pushed back.
+ * PEOF may be pushed back.
+ */
+
+void
+pungetc() {
+ parsenleft++;
+ parsenextc--;
+}
+
+/*
+ * Push a string back onto the input at this current parsefile level.
+ * We handle aliases this way.
+ */
+void
+pushstring(s, len, ap)
+ char *s;
+ int len;
+ void *ap;
+ {
+ struct strpush *sp;
+
+ INTOFF;
+/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
+ if (parsefile->strpush) {
+ sp = ckmalloc(sizeof (struct strpush));
+ sp->prev = parsefile->strpush;
+ parsefile->strpush = sp;
+ } else
+ sp = parsefile->strpush = &(parsefile->basestrpush);
+ sp->prevstring = parsenextc;
+ sp->prevnleft = parsenleft;
+ sp->prevlleft = parselleft;
+ sp->ap = (struct alias *)ap;
+ if (ap)
+ ((struct alias *)ap)->flag |= ALIASINUSE;
+ parsenextc = s;
+ parsenleft = len;
+ INTON;
+}
+
+void
+popstring()
+{
+ struct strpush *sp = parsefile->strpush;
+
+ INTOFF;
+ parsenextc = sp->prevstring;
+ parsenleft = sp->prevnleft;
+ parselleft = sp->prevlleft;
+/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
+ if (sp->ap)
+ sp->ap->flag &= ~ALIASINUSE;
+ parsefile->strpush = sp->prev;
+ if (sp != &(parsefile->basestrpush))
+ ckfree(sp);
+ INTON;
+}
+
+/*
+ * Set the input to take input from a file. If push is set, push the
+ * old input onto the stack first.
+ */
+
+void
+setinputfile(fname, push)
+ char *fname;
+ int push;
+{
+ int fd;
+ int fd2;
+
+ INTOFF;
+ if ((fd = open(fname, O_RDONLY)) < 0)
+ error("Can't open %s", fname);
+ if (fd < 10) {
+ fd2 = copyfd(fd, 10);
+ close(fd);
+ if (fd2 < 0)
+ error("Out of file descriptors");
+ fd = fd2;
+ }
+ setinputfd(fd, push);
+ INTON;
+}
+
+
+/*
+ * Like setinputfile, but takes an open file descriptor. Call this with
+ * interrupts off.
+ */
+
+void
+setinputfd(fd, push)
+ int fd, push;
+{
+ (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
+ if (push) {
+ pushfile();
+ parsefile->buf = ckmalloc(BUFSIZ);
+ }
+ if (parsefile->fd > 0)
+ close(parsefile->fd);
+ parsefile->fd = fd;
+ if (parsefile->buf == NULL)
+ parsefile->buf = ckmalloc(BUFSIZ);
+ parselleft = parsenleft = 0;
+ plinno = 1;
+}
+
+
+/*
+ * Like setinputfile, but takes input from a string.
+ */
+
+void
+setinputstring(string, push)
+ char *string;
+ int push;
+ {
+ INTOFF;
+ if (push)
+ pushfile();
+ parsenextc = string;
+ parselleft = parsenleft = strlen(string);
+ parsefile->buf = NULL;
+ plinno = 1;
+ INTON;
+}
+
+
+
+/*
+ * To handle the "." command, a stack of input files is used. Pushfile
+ * adds a new entry to the stack and popfile restores the previous level.
+ */
+
+STATIC void
+pushfile() {
+ struct parsefile *pf;
+
+ parsefile->nleft = parsenleft;
+ parsefile->lleft = parselleft;
+ parsefile->nextc = parsenextc;
+ parsefile->linno = plinno;
+ pf = (struct parsefile *)ckmalloc(sizeof (struct parsefile));
+ pf->prev = parsefile;
+ pf->fd = -1;
+ pf->strpush = NULL;
+ pf->basestrpush.prev = NULL;
+ parsefile = pf;
+}
+
+
+void
+popfile() {
+ struct parsefile *pf = parsefile;
+
+ INTOFF;
+ if (pf->fd >= 0)
+ close(pf->fd);
+ if (pf->buf)
+ ckfree(pf->buf);
+ while (pf->strpush)
+ popstring();
+ parsefile = pf->prev;
+ ckfree(pf);
+ parsenleft = parsefile->nleft;
+ parselleft = parsefile->lleft;
+ parsenextc = parsefile->nextc;
+ plinno = parsefile->linno;
+ INTON;
+}
+
+
+/*
+ * Return to top level.
+ */
+
+void
+popallfiles() {
+ while (parsefile != &basepf)
+ popfile();
+}
+
+
+
+/*
+ * Close the file(s) that the shell is reading commands from. Called
+ * after a fork is done.
+ */
+
+void
+closescript() {
+ popallfiles();
+ if (parsefile->fd > 0) {
+ close(parsefile->fd);
+ parsefile->fd = 0;
+ }
+}
diff --git a/release/picobsd/tinyware/ash/input.h b/release/picobsd/tinyware/ash/input.h
new file mode 100644
index 0000000..99a5a2c
--- /dev/null
+++ b/release/picobsd/tinyware/ash/input.h
@@ -0,0 +1,66 @@
+/* $NetBSD: input.h,v 1.9 1996/10/16 15:45:09 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)input.h 8.2 (Berkeley) 5/4/95
+ */
+
+/* PEOF (the end of file marker) is defined in syntax.h */
+
+/*
+ * The input line number. Input.c just defines this variable, and saves
+ * and restores it when files are pushed and popped. The user of this
+ * package must set its value.
+ */
+extern int plinno;
+extern int parsenleft; /* number of characters left in input buffer */
+extern char *parsenextc; /* next character in input buffer */
+extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */
+
+char *pfgets __P((char *, int));
+int pgetc __P((void));
+int preadbuffer __P((void));
+void pungetc __P((void));
+void pushstring __P((char *, int, void *));
+void popstring __P((void));
+void setinputfile __P((char *, int));
+void setinputfd __P((int, int));
+void setinputstring __P((char *, int));
+void popfile __P((void));
+void popallfiles __P((void));
+void closescript __P((void));
+
+#define pgetc_macro() (--parsenleft >= 0? *parsenextc++ : preadbuffer())
diff --git a/release/picobsd/tinyware/ash/jobs.c b/release/picobsd/tinyware/ash/jobs.c
new file mode 100644
index 0000000..885fa9e
--- /dev/null
+++ b/release/picobsd/tinyware/ash/jobs.c
@@ -0,0 +1,1115 @@
+/* $NetBSD: jobs.c,v 1.22 1997/07/04 21:02:04 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: jobs.c,v 1.22 1997/07/04 21:02:04 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <fcntl.h>
+#include <signal.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#ifdef BSD
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+#include <sys/ioctl.h>
+
+#include "shell.h"
+#if JOBS
+#if OLD_TTY_DRIVER
+#include "sgtty.h"
+#else
+#include <termios.h>
+#endif
+#undef CEOF /* syntax.h redefines this */
+#endif
+#include "redir.h"
+#include "show.h"
+#include "main.h"
+#include "parser.h"
+#include "nodes.h"
+#include "jobs.h"
+#include "options.h"
+#include "trap.h"
+#include "syntax.h"
+#include "input.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "mystring.h"
+
+
+struct job *jobtab; /* array of jobs */
+int njobs; /* size of array */
+MKINIT short backgndpid = -1; /* pid of last background process */
+#if JOBS
+int initialpgrp; /* pgrp of shell on invocation */
+short curjob; /* current job */
+#endif
+
+STATIC void restartjob __P((struct job *));
+STATIC void freejob __P((struct job *));
+STATIC struct job *getjob __P((char *));
+STATIC int dowait __P((int, struct job *));
+STATIC int onsigchild __P((void));
+STATIC int waitproc __P((int, int *));
+STATIC void cmdtxt __P((union node *));
+STATIC void cmdputs __P((char *));
+
+
+/*
+ * Turn job control on and off.
+ *
+ * Note: This code assumes that the third arg to ioctl is a character
+ * pointer, which is true on Berkeley systems but not System V. Since
+ * System V doesn't have job control yet, this isn't a problem now.
+ */
+
+MKINIT int jobctl;
+
+void
+setjobctl(on)
+ int on;
+{
+#ifdef OLD_TTY_DRIVER
+ int ldisc;
+#endif
+
+ if (on == jobctl || rootshell == 0)
+ return;
+ if (on) {
+ do { /* while we are in the background */
+#ifdef OLD_TTY_DRIVER
+ if (ioctl(2, TIOCGPGRP, (char *)&initialpgrp) < 0) {
+#else
+ initialpgrp = tcgetpgrp(2);
+ if (initialpgrp < 0) {
+#endif
+ out2str("sh: can't access tty; job control turned off\n");
+ mflag = 0;
+ return;
+ }
+ if (initialpgrp == -1)
+ initialpgrp = getpgrp();
+ else if (initialpgrp != getpgrp()) {
+ killpg(initialpgrp, SIGTTIN);
+ continue;
+ }
+ } while (0);
+#ifdef OLD_TTY_DRIVER
+ if (ioctl(2, TIOCGETD, (char *)&ldisc) < 0 || ldisc != NTTYDISC) {
+ out2str("sh: need new tty driver to run job control; job control turned off\n");
+ mflag = 0;
+ return;
+ }
+#endif
+ setsignal(SIGTSTP);
+ setsignal(SIGTTOU);
+ setsignal(SIGTTIN);
+ setpgid(0, rootpid);
+#ifdef OLD_TTY_DRIVER
+ ioctl(2, TIOCSPGRP, (char *)&rootpid);
+#else
+ tcsetpgrp(2, rootpid);
+#endif
+ } else { /* turning job control off */
+ setpgid(0, initialpgrp);
+#ifdef OLD_TTY_DRIVER
+ ioctl(2, TIOCSPGRP, (char *)&initialpgrp);
+#else
+ tcsetpgrp(2, initialpgrp);
+#endif
+ setsignal(SIGTSTP);
+ setsignal(SIGTTOU);
+ setsignal(SIGTTIN);
+ }
+ jobctl = on;
+}
+
+
+#ifdef mkinit
+INCLUDE <stdlib.h>
+
+SHELLPROC {
+ backgndpid = -1;
+#if JOBS
+ jobctl = 0;
+#endif
+}
+
+#endif
+
+
+
+#if JOBS
+int
+fgcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct job *jp;
+ int pgrp;
+ int status;
+
+ jp = getjob(argv[1]);
+ if (jp->jobctl == 0)
+ error("job not created under job control");
+ pgrp = jp->ps[0].pid;
+#ifdef OLD_TTY_DRIVER
+ ioctl(2, TIOCSPGRP, (char *)&pgrp);
+#else
+ tcsetpgrp(2, pgrp);
+#endif
+ restartjob(jp);
+ INTOFF;
+ status = waitforjob(jp);
+ INTON;
+ return status;
+}
+
+
+int
+bgcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct job *jp;
+
+ do {
+ jp = getjob(*++argv);
+ if (jp->jobctl == 0)
+ error("job not created under job control");
+ restartjob(jp);
+ } while (--argc > 1);
+ return 0;
+}
+
+
+STATIC void
+restartjob(jp)
+ struct job *jp;
+{
+ struct procstat *ps;
+ int i;
+
+ if (jp->state == JOBDONE)
+ return;
+ INTOFF;
+ killpg(jp->ps[0].pid, SIGCONT);
+ for (ps = jp->ps, i = jp->nprocs ; --i >= 0 ; ps++) {
+ if ((ps->status & 0377) == 0177) {
+ ps->status = -1;
+ jp->state = 0;
+ }
+ }
+ INTON;
+}
+#endif
+
+
+int
+jobscmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ showjobs(0);
+ return 0;
+}
+
+
+/*
+ * Print a list of jobs. If "change" is nonzero, only print jobs whose
+ * statuses have changed since the last call to showjobs.
+ *
+ * If the shell is interrupted in the process of creating a job, the
+ * result may be a job structure containing zero processes. Such structures
+ * will be freed here.
+ */
+
+void
+showjobs(change)
+ int change;
+{
+ int jobno;
+ int procno;
+ int i;
+ struct job *jp;
+ struct procstat *ps;
+ int col;
+ char s[64];
+
+ TRACE(("showjobs(%d) called\n", change));
+ while (dowait(0, (struct job *)NULL) > 0);
+ for (jobno = 1, jp = jobtab ; jobno <= njobs ; jobno++, jp++) {
+ if (! jp->used)
+ continue;
+ if (jp->nprocs == 0) {
+ freejob(jp);
+ continue;
+ }
+ if (change && ! jp->changed)
+ continue;
+ procno = jp->nprocs;
+ for (ps = jp->ps ; ; ps++) { /* for each process */
+ if (ps == jp->ps)
+ fmtstr(s, 64, "[%d] %d ", jobno, ps->pid);
+ else
+ fmtstr(s, 64, " %d ", ps->pid);
+ out1str(s);
+ col = strlen(s);
+ s[0] = '\0';
+ if (ps->status == -1) {
+ /* don't print anything */
+ } else if ((ps->status & 0xFF) == 0) {
+ fmtstr(s, 64, "Exit %d", ps->status >> 8);
+ } else {
+ i = ps->status;
+#if JOBS
+ if ((i & 0xFF) == 0177)
+ i >>= 8;
+#endif
+ if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F])
+ scopy(sys_siglist[i & 0x7F], s);
+ else
+ fmtstr(s, 64, "Signal %d", i & 0x7F);
+ if (i & 0x80)
+ strcat(s, " (core dumped)");
+ }
+ out1str(s);
+ col += strlen(s);
+ do {
+ out1c(' ');
+ col++;
+ } while (col < 30);
+ out1str(ps->cmd);
+ out1c('\n');
+ if (--procno <= 0)
+ break;
+ }
+ jp->changed = 0;
+ if (jp->state == JOBDONE) {
+ freejob(jp);
+ }
+ }
+}
+
+
+/*
+ * Mark a job structure as unused.
+ */
+
+STATIC void
+freejob(jp)
+ struct job *jp;
+ {
+ struct procstat *ps;
+ int i;
+
+ INTOFF;
+ for (i = jp->nprocs, ps = jp->ps ; --i >= 0 ; ps++) {
+ if (ps->cmd != nullstr)
+ ckfree(ps->cmd);
+ }
+ if (jp->ps != &jp->ps0)
+ ckfree(jp->ps);
+ jp->used = 0;
+#if JOBS
+ if (curjob == jp - jobtab + 1)
+ curjob = 0;
+#endif
+ INTON;
+}
+
+
+
+int
+waitcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct job *job;
+ int status;
+ struct job *jp;
+
+ if (argc > 1) {
+ job = getjob(argv[1]);
+ } else {
+ job = NULL;
+ }
+ for (;;) { /* loop until process terminated or stopped */
+ if (job != NULL) {
+ if (job->state) {
+ status = job->ps[job->nprocs - 1].status;
+ if ((status & 0xFF) == 0)
+ status = status >> 8 & 0xFF;
+#if JOBS
+ else if ((status & 0xFF) == 0177)
+ status = (status >> 8 & 0x7F) + 128;
+#endif
+ else
+ status = (status & 0x7F) + 128;
+ if (! iflag)
+ freejob(job);
+ return status;
+ }
+ } else {
+ for (jp = jobtab ; ; jp++) {
+ if (jp >= jobtab + njobs) { /* no running procs */
+ return 0;
+ }
+ if (jp->used && jp->state == 0)
+ break;
+ }
+ }
+ dowait(1, (struct job *)NULL);
+ }
+}
+
+
+
+int
+jobidcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct job *jp;
+ int i;
+
+ jp = getjob(argv[1]);
+ for (i = 0 ; i < jp->nprocs ; ) {
+ out1fmt("%d", jp->ps[i].pid);
+ out1c(++i < jp->nprocs? ' ' : '\n');
+ }
+ return 0;
+}
+
+
+
+/*
+ * Convert a job name to a job structure.
+ */
+
+STATIC struct job *
+getjob(name)
+ char *name;
+ {
+ int jobno;
+ struct job *jp;
+ int pid;
+ int i;
+
+ if (name == NULL) {
+#if JOBS
+currentjob:
+ if ((jobno = curjob) == 0 || jobtab[jobno - 1].used == 0)
+ error("No current job");
+ return &jobtab[jobno - 1];
+#else
+ error("No current job");
+#endif
+ } else if (name[0] == '%') {
+ if (is_digit(name[1])) {
+ jobno = number(name + 1);
+ if (jobno > 0 && jobno <= njobs
+ && jobtab[jobno - 1].used != 0)
+ return &jobtab[jobno - 1];
+#if JOBS
+ } else if (name[1] == '%' && name[2] == '\0') {
+ goto currentjob;
+#endif
+ } else {
+ struct job *found = NULL;
+ for (jp = jobtab, i = njobs ; --i >= 0 ; jp++) {
+ if (jp->used && jp->nprocs > 0
+ && prefix(name + 1, jp->ps[0].cmd)) {
+ if (found)
+ error("%s: ambiguous", name);
+ found = jp;
+ }
+ }
+ if (found)
+ return found;
+ }
+ } else if (is_number(name)) {
+ pid = number(name);
+ for (jp = jobtab, i = njobs ; --i >= 0 ; jp++) {
+ if (jp->used && jp->nprocs > 0
+ && jp->ps[jp->nprocs - 1].pid == pid)
+ return jp;
+ }
+ }
+ error("No such job: %s", name);
+ /*NOTREACHED*/
+ return NULL;
+}
+
+
+
+/*
+ * Return a new job structure,
+ */
+
+struct job *
+makejob(node, nprocs)
+ union node *node;
+ int nprocs;
+{
+ int i;
+ struct job *jp;
+
+ for (i = njobs, jp = jobtab ; ; jp++) {
+ if (--i < 0) {
+ INTOFF;
+ if (njobs == 0) {
+ jobtab = ckmalloc(4 * sizeof jobtab[0]);
+ } else {
+ jp = ckmalloc((njobs + 4) * sizeof jobtab[0]);
+ memcpy(jp, jobtab, njobs * sizeof jp[0]);
+ /* Relocate `ps' pointers */
+ for (i = 0; i < njobs; i++)
+ if (jp[i].ps == &jobtab[i].ps0)
+ jp[i].ps = &jp[i].ps0;
+ ckfree(jobtab);
+ jobtab = jp;
+ }
+ jp = jobtab + njobs;
+ for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0);
+ INTON;
+ break;
+ }
+ if (jp->used == 0)
+ break;
+ }
+ INTOFF;
+ jp->state = 0;
+ jp->used = 1;
+ jp->changed = 0;
+ jp->nprocs = 0;
+#if JOBS
+ jp->jobctl = jobctl;
+#endif
+ if (nprocs > 1) {
+ jp->ps = ckmalloc(nprocs * sizeof (struct procstat));
+ } else {
+ jp->ps = &jp->ps0;
+ }
+ INTON;
+ TRACE(("makejob(0x%lx, %d) returns %%%d\n", (long)node, nprocs,
+ jp - jobtab + 1));
+ return jp;
+}
+
+
+/*
+ * Fork of a subshell. If we are doing job control, give the subshell its
+ * own process group. Jp is a job structure that the job is to be added to.
+ * N is the command that will be evaluated by the child. Both jp and n may
+ * be NULL. The mode parameter can be one of the following:
+ * FORK_FG - Fork off a foreground process.
+ * FORK_BG - Fork off a background process.
+ * FORK_NOJOB - Like FORK_FG, but don't give the process its own
+ * process group even if job control is on.
+ *
+ * When job control is turned off, background processes have their standard
+ * input redirected to /dev/null (except for the second and later processes
+ * in a pipeline).
+ */
+
+int
+forkshell(jp, n, mode)
+ union node *n;
+ struct job *jp;
+ int mode;
+{
+ int pid;
+ int pgrp;
+
+ TRACE(("forkshell(%%%d, 0x%lx, %d) called\n", jp - jobtab, (long)n,
+ mode));
+ INTOFF;
+ pid = fork();
+ if (pid == -1) {
+ TRACE(("Fork failed, errno=%d\n", errno));
+ INTON;
+ error("Cannot fork");
+ }
+ if (pid == 0) {
+ struct job *p;
+ int wasroot;
+ int i;
+
+ TRACE(("Child shell %d\n", getpid()));
+ wasroot = rootshell;
+ rootshell = 0;
+ for (i = njobs, p = jobtab ; --i >= 0 ; p++)
+ if (p->used)
+ freejob(p);
+ closescript();
+ INTON;
+ clear_traps();
+#if JOBS
+ jobctl = 0; /* do job control only in root shell */
+ if (wasroot && mode != FORK_NOJOB && mflag) {
+ if (jp == NULL || jp->nprocs == 0)
+ pgrp = getpid();
+ else
+ pgrp = jp->ps[0].pid;
+ setpgid(0, pgrp);
+ if (mode == FORK_FG) {
+ /*** this causes superfluous TIOCSPGRPS ***/
+#ifdef OLD_TTY_DRIVER
+ if (ioctl(2, TIOCSPGRP, (char *)&pgrp) < 0)
+ error("TIOCSPGRP failed, errno=%d", errno);
+#else
+ if (tcsetpgrp(2, pgrp) < 0)
+ error("tcsetpgrp failed, errno=%d", errno);
+#endif
+ }
+ setsignal(SIGTSTP);
+ setsignal(SIGTTOU);
+ } else if (mode == FORK_BG) {
+ ignoresig(SIGINT);
+ ignoresig(SIGQUIT);
+ if ((jp == NULL || jp->nprocs == 0) &&
+ ! fd0_redirected_p ()) {
+ close(0);
+ if (open("/dev/null", O_RDONLY) != 0)
+ error("Can't open /dev/null");
+ }
+ }
+#else
+ if (mode == FORK_BG) {
+ ignoresig(SIGINT);
+ ignoresig(SIGQUIT);
+ if ((jp == NULL || jp->nprocs == 0) &&
+ ! fd0_redirected_p ()) {
+ close(0);
+ if (open("/dev/null", O_RDONLY) != 0)
+ error("Can't open /dev/null");
+ }
+ }
+#endif
+ if (wasroot && iflag) {
+ setsignal(SIGINT);
+ setsignal(SIGQUIT);
+ setsignal(SIGTERM);
+ }
+ return pid;
+ }
+ if (rootshell && mode != FORK_NOJOB && mflag) {
+ if (jp == NULL || jp->nprocs == 0)
+ pgrp = pid;
+ else
+ pgrp = jp->ps[0].pid;
+ setpgid(pid, pgrp);
+ }
+ if (mode == FORK_BG)
+ backgndpid = pid; /* set $! */
+ if (jp) {
+ struct procstat *ps = &jp->ps[jp->nprocs++];
+ ps->pid = pid;
+ ps->status = -1;
+ ps->cmd = nullstr;
+ if (iflag && rootshell && n)
+ ps->cmd = commandtext(n);
+ }
+ INTON;
+ TRACE(("In parent shell: child = %d\n", pid));
+ return pid;
+}
+
+
+
+/*
+ * Wait for job to finish.
+ *
+ * Under job control we have the problem that while a child process is
+ * running interrupts generated by the user are sent to the child but not
+ * to the shell. This means that an infinite loop started by an inter-
+ * active user may be hard to kill. With job control turned off, an
+ * interactive user may place an interactive program inside a loop. If
+ * the interactive program catches interrupts, the user doesn't want
+ * these interrupts to also abort the loop. The approach we take here
+ * is to have the shell ignore interrupt signals while waiting for a
+ * forground process to terminate, and then send itself an interrupt
+ * signal if the child process was terminated by an interrupt signal.
+ * Unfortunately, some programs want to do a bit of cleanup and then
+ * exit on interrupt; unless these processes terminate themselves by
+ * sending a signal to themselves (instead of calling exit) they will
+ * confuse this approach.
+ */
+
+int
+waitforjob(jp)
+ struct job *jp;
+ {
+#if JOBS
+ int mypgrp = getpgrp();
+#endif
+ int status;
+ int st;
+
+ INTOFF;
+ TRACE(("waitforjob(%%%d) called\n", jp - jobtab + 1));
+ while (jp->state == 0) {
+ dowait(1, jp);
+ }
+#if JOBS
+ if (jp->jobctl) {
+#ifdef OLD_TTY_DRIVER
+ if (ioctl(2, TIOCSPGRP, (char *)&mypgrp) < 0)
+ error("TIOCSPGRP failed, errno=%d\n", errno);
+#else
+ if (tcsetpgrp(2, mypgrp) < 0)
+ error("tcsetpgrp failed, errno=%d\n", errno);
+#endif
+ }
+ if (jp->state == JOBSTOPPED)
+ curjob = jp - jobtab + 1;
+#endif
+ status = jp->ps[jp->nprocs - 1].status;
+ /* convert to 8 bits */
+ if ((status & 0xFF) == 0)
+ st = status >> 8 & 0xFF;
+#if JOBS
+ else if ((status & 0xFF) == 0177)
+ st = (status >> 8 & 0x7F) + 128;
+#endif
+ else
+ st = (status & 0x7F) + 128;
+ if (! JOBS || jp->state == JOBDONE)
+ freejob(jp);
+ CLEAR_PENDING_INT;
+ if ((status & 0x7F) == SIGINT)
+ kill(getpid(), SIGINT);
+ INTON;
+ return st;
+}
+
+
+
+/*
+ * Wait for a process to terminate.
+ */
+
+STATIC int
+dowait(block, job)
+ int block;
+ struct job *job;
+{
+ int pid;
+ int status;
+ struct procstat *sp;
+ struct job *jp;
+ struct job *thisjob;
+ int done;
+ int stopped;
+ int core;
+
+ TRACE(("dowait(%d) called\n", block));
+ do {
+ pid = waitproc(block, &status);
+ TRACE(("wait returns %d, status=%d\n", pid, status));
+ } while (pid == -1 && errno == EINTR);
+ if (pid <= 0)
+ return pid;
+ INTOFF;
+ thisjob = NULL;
+ for (jp = jobtab ; jp < jobtab + njobs ; jp++) {
+ if (jp->used) {
+ done = 1;
+ stopped = 1;
+ for (sp = jp->ps ; sp < jp->ps + jp->nprocs ; sp++) {
+ if (sp->pid == -1)
+ continue;
+ if (sp->pid == pid) {
+ TRACE(("Changin status of proc %d from 0x%x to 0x%x\n", pid, sp->status, status));
+ sp->status = status;
+ thisjob = jp;
+ }
+ if (sp->status == -1)
+ stopped = 0;
+ else if ((sp->status & 0377) == 0177)
+ done = 0;
+ }
+ if (stopped) { /* stopped or done */
+ int state = done? JOBDONE : JOBSTOPPED;
+ if (jp->state != state) {
+ TRACE(("Job %d: changing state from %d to %d\n", jp - jobtab + 1, jp->state, state));
+ jp->state = state;
+#if JOBS
+ if (done && curjob == jp - jobtab + 1)
+ curjob = 0; /* no current job */
+#endif
+ }
+ }
+ }
+ }
+ INTON;
+ if (! rootshell || ! iflag || (job && thisjob == job)) {
+#if JOBS
+ if ((status & 0xFF) == 0177)
+ status >>= 8;
+#endif
+ core = status & 0x80;
+ status &= 0x7F;
+ if (status != 0 && status != SIGINT && status != SIGPIPE) {
+ if (thisjob != job)
+ outfmt(out2, "%d: ", pid);
+#if JOBS
+ if (status == SIGTSTP && rootshell && iflag)
+ outfmt(out2, "%%%d ", job - jobtab + 1);
+#endif
+ if (status < NSIG && sys_siglist[status])
+ out2str(sys_siglist[status]);
+ else
+ outfmt(out2, "Signal %d", status);
+ if (core)
+ out2str(" - core dumped");
+ out2c('\n');
+ flushout(&errout);
+ } else {
+ TRACE(("Not printing status: status=%d\n", status));
+ }
+ } else {
+ TRACE(("Not printing status, rootshell=%d, job=0x%x\n", rootshell, job));
+ if (thisjob)
+ thisjob->changed = 1;
+ }
+ return pid;
+}
+
+
+
+/*
+ * Do a wait system call. If job control is compiled in, we accept
+ * stopped processes. If block is zero, we return a value of zero
+ * rather than blocking.
+ *
+ * System V doesn't have a non-blocking wait system call. It does
+ * have a SIGCLD signal that is sent to a process when one of it's
+ * children dies. The obvious way to use SIGCLD would be to install
+ * a handler for SIGCLD which simply bumped a counter when a SIGCLD
+ * was received, and have waitproc bump another counter when it got
+ * the status of a process. Waitproc would then know that a wait
+ * system call would not block if the two counters were different.
+ * This approach doesn't work because if a process has children that
+ * have not been waited for, System V will send it a SIGCLD when it
+ * installs a signal handler for SIGCLD. What this means is that when
+ * a child exits, the shell will be sent SIGCLD signals continuously
+ * until is runs out of stack space, unless it does a wait call before
+ * restoring the signal handler. The code below takes advantage of
+ * this (mis)feature by installing a signal handler for SIGCLD and
+ * then checking to see whether it was called. If there are any
+ * children to be waited for, it will be.
+ *
+ * If neither SYSV nor BSD is defined, we don't implement nonblocking
+ * waits at all. In this case, the user will not be informed when
+ * a background process until the next time she runs a real program
+ * (as opposed to running a builtin command or just typing return),
+ * and the jobs command may give out of date information.
+ */
+
+#ifdef SYSV
+STATIC int gotsigchild;
+
+STATIC int onsigchild() {
+ gotsigchild = 1;
+}
+#endif
+
+
+STATIC int
+waitproc(block, status)
+ int block;
+ int *status;
+{
+#ifdef BSD
+ int flags;
+
+#if JOBS
+ flags = WUNTRACED;
+#else
+ flags = 0;
+#endif
+ if (block == 0)
+ flags |= WNOHANG;
+ return wait3(status, flags, (struct rusage *)NULL);
+#else
+#ifdef SYSV
+ int (*save)();
+
+ if (block == 0) {
+ gotsigchild = 0;
+ save = signal(SIGCLD, onsigchild);
+ signal(SIGCLD, save);
+ if (gotsigchild == 0)
+ return 0;
+ }
+ return wait(status);
+#else
+ if (block == 0)
+ return 0;
+ return wait(status);
+#endif
+#endif
+}
+
+/*
+ * return 1 if there are stopped jobs, otherwise 0
+ */
+int job_warning = 0;
+int
+stoppedjobs()
+{
+ int jobno;
+ struct job *jp;
+
+ if (job_warning)
+ return (0);
+ for (jobno = 1, jp = jobtab; jobno <= njobs; jobno++, jp++) {
+ if (jp->used == 0)
+ continue;
+ if (jp->state == JOBSTOPPED) {
+ out2str("You have stopped jobs.\n");
+ job_warning = 2;
+ return (1);
+ }
+ }
+
+ return (0);
+}
+
+/*
+ * Return a string identifying a command (to be printed by the
+ * jobs command.
+ */
+
+STATIC char *cmdnextc;
+STATIC int cmdnleft;
+#define MAXCMDTEXT 200
+
+char *
+commandtext(n)
+ union node *n;
+ {
+ char *name;
+
+ cmdnextc = name = ckmalloc(MAXCMDTEXT);
+ cmdnleft = MAXCMDTEXT - 4;
+ cmdtxt(n);
+ *cmdnextc = '\0';
+ return name;
+}
+
+
+STATIC void
+cmdtxt(n)
+ union node *n;
+ {
+ union node *np;
+ struct nodelist *lp;
+ char *p;
+ int i;
+ char s[2];
+
+ if (n == NULL)
+ return;
+ switch (n->type) {
+ case NSEMI:
+ cmdtxt(n->nbinary.ch1);
+ cmdputs("; ");
+ cmdtxt(n->nbinary.ch2);
+ break;
+ case NAND:
+ cmdtxt(n->nbinary.ch1);
+ cmdputs(" && ");
+ cmdtxt(n->nbinary.ch2);
+ break;
+ case NOR:
+ cmdtxt(n->nbinary.ch1);
+ cmdputs(" || ");
+ cmdtxt(n->nbinary.ch2);
+ break;
+ case NPIPE:
+ for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
+ cmdtxt(lp->n);
+ if (lp->next)
+ cmdputs(" | ");
+ }
+ break;
+ case NSUBSHELL:
+ cmdputs("(");
+ cmdtxt(n->nredir.n);
+ cmdputs(")");
+ break;
+ case NREDIR:
+ case NBACKGND:
+ cmdtxt(n->nredir.n);
+ break;
+ case NIF:
+ cmdputs("if ");
+ cmdtxt(n->nif.test);
+ cmdputs("; then ");
+ cmdtxt(n->nif.ifpart);
+ cmdputs("...");
+ break;
+ case NWHILE:
+ cmdputs("while ");
+ goto until;
+ case NUNTIL:
+ cmdputs("until ");
+until:
+ cmdtxt(n->nbinary.ch1);
+ cmdputs("; do ");
+ cmdtxt(n->nbinary.ch2);
+ cmdputs("; done");
+ break;
+ case NFOR:
+ cmdputs("for ");
+ cmdputs(n->nfor.var);
+ cmdputs(" in ...");
+ break;
+ case NCASE:
+ cmdputs("case ");
+ cmdputs(n->ncase.expr->narg.text);
+ cmdputs(" in ...");
+ break;
+ case NDEFUN:
+ cmdputs(n->narg.text);
+ cmdputs("() ...");
+ break;
+ case NCMD:
+ for (np = n->ncmd.args ; np ; np = np->narg.next) {
+ cmdtxt(np);
+ if (np->narg.next)
+ cmdputs(" ");
+ }
+ for (np = n->ncmd.redirect ; np ; np = np->nfile.next) {
+ cmdputs(" ");
+ cmdtxt(np);
+ }
+ break;
+ case NARG:
+ cmdputs(n->narg.text);
+ break;
+ case NTO:
+ p = ">"; i = 1; goto redir;
+ case NAPPEND:
+ p = ">>"; i = 1; goto redir;
+ case NTOFD:
+ p = ">&"; i = 1; goto redir;
+ case NFROM:
+ p = "<"; i = 0; goto redir;
+ case NFROMFD:
+ p = "<&"; i = 0; goto redir;
+redir:
+ if (n->nfile.fd != i) {
+ s[0] = n->nfile.fd + '0';
+ s[1] = '\0';
+ cmdputs(s);
+ }
+ cmdputs(p);
+ if (n->type == NTOFD || n->type == NFROMFD) {
+ s[0] = n->ndup.dupfd + '0';
+ s[1] = '\0';
+ cmdputs(s);
+ } else {
+ cmdtxt(n->nfile.fname);
+ }
+ break;
+ case NHERE:
+ case NXHERE:
+ cmdputs("<<...");
+ break;
+ default:
+ cmdputs("???");
+ break;
+ }
+}
+
+
+
+STATIC void
+cmdputs(s)
+ char *s;
+ {
+ char *p, *q;
+ char c;
+ int subtype = 0;
+
+ if (cmdnleft <= 0)
+ return;
+ p = s;
+ q = cmdnextc;
+ while ((c = *p++) != '\0') {
+ if (c == CTLESC)
+ *q++ = *p++;
+ else if (c == CTLVAR) {
+ *q++ = '$';
+ if (--cmdnleft > 0)
+ *q++ = '{';
+ subtype = *p++;
+ } else if (c == '=' && subtype != 0) {
+ *q++ = "}-+?="[(subtype & VSTYPE) - VSNORMAL];
+ subtype = 0;
+ } else if (c == CTLENDVAR) {
+ *q++ = '}';
+ } else if (c == CTLBACKQ || c == CTLBACKQ+CTLQUOTE)
+ cmdnleft++; /* ignore it */
+ else
+ *q++ = c;
+ if (--cmdnleft <= 0) {
+ *q++ = '.';
+ *q++ = '.';
+ *q++ = '.';
+ break;
+ }
+ }
+ cmdnextc = q;
+}
diff --git a/release/picobsd/tinyware/ash/jobs.h b/release/picobsd/tinyware/ash/jobs.h
new file mode 100644
index 0000000..940286f
--- /dev/null
+++ b/release/picobsd/tinyware/ash/jobs.h
@@ -0,0 +1,97 @@
+/* $NetBSD: jobs.h,v 1.8 1995/05/11 21:29:19 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)jobs.h 8.2 (Berkeley) 5/4/95
+ */
+
+/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */
+#define FORK_FG 0
+#define FORK_BG 1
+#define FORK_NOJOB 2
+
+
+/*
+ * A job structure contains information about a job. A job is either a
+ * single process or a set of processes contained in a pipeline. In the
+ * latter case, pidlist will be non-NULL, and will point to a -1 terminated
+ * array of pids.
+ */
+
+struct procstat {
+ short pid; /* process id */
+ short status; /* status flags (defined above) */
+ char *cmd; /* text of command being run */
+};
+
+
+/* states */
+#define JOBSTOPPED 1 /* all procs are stopped */
+#define JOBDONE 2 /* all procs are completed */
+
+
+struct job {
+ struct procstat ps0; /* status of process */
+ struct procstat *ps; /* status or processes when more than one */
+ short nprocs; /* number of processes */
+ short pgrp; /* process group of this job */
+ char state; /* true if job is finished */
+ char used; /* true if this entry is in used */
+ char changed; /* true if status has changed */
+#if JOBS
+ char jobctl; /* job running under job control */
+#endif
+};
+
+extern short backgndpid; /* pid of last background process */
+extern int job_warning; /* user was warned about stopped jobs */
+
+void setjobctl __P((int));
+int fgcmd __P((int, char **));
+int bgcmd __P((int, char **));
+int jobscmd __P((int, char **));
+void showjobs __P((int));
+int waitcmd __P((int, char **));
+int jobidcmd __P((int, char **));
+struct job *makejob __P((union node *, int));
+int forkshell __P((struct job *, union node *, int));
+int waitforjob __P((struct job *));
+int stoppedjobs __P((void));
+char *commandtext __P((union node *));
+
+#if ! JOBS
+#define setjobctl(on) /* do nothing */
+#endif
diff --git a/release/picobsd/tinyware/ash/machdep.h b/release/picobsd/tinyware/ash/machdep.h
new file mode 100644
index 0000000..c9452eb
--- /dev/null
+++ b/release/picobsd/tinyware/ash/machdep.h
@@ -0,0 +1,53 @@
+/* $NetBSD: machdep.h,v 1.8 1995/05/11 21:29:21 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)machdep.h 8.2 (Berkeley) 5/4/95
+ */
+
+/*
+ * Most machines require the value returned from malloc to be aligned
+ * in some way. The following macro will get this right on many machines.
+ */
+
+#ifndef ALIGN
+union align {
+ int i;
+ char *cp;
+};
+
+#define ALIGN(nbytes) (((nbytes) + sizeof(union align) - 1) & ~(sizeof(union align) - 1))
+#endif
diff --git a/release/picobsd/tinyware/ash/mail.c b/release/picobsd/tinyware/ash/mail.c
new file mode 100644
index 0000000..6b6b81d
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mail.c
@@ -0,0 +1,124 @@
+/* $NetBSD: mail.c,v 1.11 1997/07/04 21:02:06 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)mail.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: mail.c,v 1.11 1997/07/04 21:02:06 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * Routines to check for mail. (Perhaps make part of main.c?)
+ */
+
+#include "shell.h"
+#include "exec.h" /* defines padvance() */
+#include "var.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "mail.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+#define MAXMBOXES 10
+
+
+STATIC int nmboxes; /* number of mailboxes */
+STATIC time_t mailtime[MAXMBOXES]; /* times of mailboxes */
+
+
+
+/*
+ * Print appropriate message(s) if mail has arrived. If the argument is
+ * nozero, then the value of MAIL has changed, so we just update the
+ * values.
+ */
+
+void
+chkmail(silent)
+ int silent;
+{
+ int i;
+ char *mpath;
+ char *p;
+ char *q;
+ struct stackmark smark;
+ struct stat statb;
+
+ if (silent)
+ nmboxes = 10;
+ if (nmboxes == 0)
+ return;
+ setstackmark(&smark);
+ mpath = mpathset()? mpathval() : mailval();
+ for (i = 0 ; i < nmboxes ; i++) {
+ p = padvance(&mpath, nullstr);
+ if (p == NULL)
+ break;
+ if (*p == '\0')
+ continue;
+ for (q = p ; *q ; q++);
+ if (q[-1] != '/')
+ abort();
+ q[-1] = '\0'; /* delete trailing '/' */
+#ifdef notdef /* this is what the System V shell claims to do (it lies) */
+ if (stat(p, &statb) < 0)
+ statb.st_mtime = 0;
+ if (statb.st_mtime > mailtime[i] && ! silent) {
+ out2str(pathopt? pathopt : "you have mail");
+ out2c('\n');
+ }
+ mailtime[i] = statb.st_mtime;
+#else /* this is what it should do */
+ if (stat(p, &statb) < 0)
+ statb.st_size = 0;
+ if (statb.st_size > mailtime[i] && ! silent) {
+ out2str(pathopt? pathopt : "you have mail");
+ out2c('\n');
+ }
+ mailtime[i] = statb.st_size;
+#endif
+ }
+ nmboxes = i;
+ popstackmark(&smark);
+}
diff --git a/release/picobsd/tinyware/ash/mail.h b/release/picobsd/tinyware/ash/mail.h
new file mode 100644
index 0000000..e8df3cf
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mail.h
@@ -0,0 +1,41 @@
+/* $NetBSD: mail.h,v 1.8 1995/05/11 21:29:23 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)mail.h 8.2 (Berkeley) 5/4/95
+ */
+
+void chkmail __P((int));
diff --git a/release/picobsd/tinyware/ash/main.c b/release/picobsd/tinyware/ash/main.c
new file mode 100644
index 0000000..5bfbef3
--- /dev/null
+++ b/release/picobsd/tinyware/ash/main.c
@@ -0,0 +1,388 @@
+/* $NetBSD: main.c,v 1.26 1997/07/04 21:02:07 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
+#endif /* not lint */
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95";
+#else
+__RCSID("$NetBSD: main.c,v 1.26 1997/07/04 21:02:07 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <stdio.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+
+#include "shell.h"
+#include "main.h"
+#include "mail.h"
+#include "options.h"
+#include "output.h"
+#include "parser.h"
+#include "nodes.h"
+#include "expand.h"
+#include "eval.h"
+#include "jobs.h"
+#include "input.h"
+#include "trap.h"
+#include "var.h"
+#include "show.h"
+#include "memalloc.h"
+#include "error.h"
+#include "init.h"
+#include "mystring.h"
+#include "exec.h"
+#include "cd.h"
+
+#define PROFILE 0
+
+int rootpid;
+int rootshell;
+STATIC union node *curcmd;
+STATIC union node *prevcmd;
+extern int errno;
+#if PROFILE
+short profile_buf[16384];
+extern int etext();
+#endif
+
+STATIC void read_profile __P((char *));
+STATIC char *find_dot_file __P((char *));
+int main __P((int, char **));
+
+/*
+ * Main routine. We initialize things, parse the arguments, execute
+ * profiles if we're a login shell, and then call cmdloop to execute
+ * commands. The setjmp call sets up the location to jump to when an
+ * exception occurs. When an exception occurs the variable "state"
+ * is used to figure out how far we had gotten.
+ */
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct jmploc jmploc;
+ struct stackmark smark;
+ volatile int state;
+ char *shinit;
+
+#if PROFILE
+ monitor(4, etext, profile_buf, sizeof profile_buf, 50);
+#endif
+ state = 0;
+ if (setjmp(jmploc.loc)) {
+ /*
+ * When a shell procedure is executed, we raise the
+ * exception EXSHELLPROC to clean up before executing
+ * the shell procedure.
+ */
+ switch (exception) {
+ case EXSHELLPROC:
+ rootpid = getpid();
+ rootshell = 1;
+ minusc = NULL;
+ state = 3;
+ break;
+
+ case EXEXEC:
+ exitstatus = exerrno;
+ break;
+
+ case EXERROR:
+ exitstatus = 2;
+ break;
+
+ default:
+ break;
+ }
+
+ if (exception != EXSHELLPROC) {
+ if (state == 0 || iflag == 0 || ! rootshell)
+ exitshell(exitstatus);
+ }
+ reset();
+ if (exception == EXINT
+#if ATTY
+ && (! attyset() || equal(termval(), "emacs"))
+#endif
+ ) {
+ out2c('\n');
+ flushout(&errout);
+ }
+ popstackmark(&smark);
+ FORCEINTON; /* enable interrupts */
+ if (state == 1)
+ goto state1;
+ else if (state == 2)
+ goto state2;
+ else if (state == 3)
+ goto state3;
+ else
+ goto state4;
+ }
+ handler = &jmploc;
+#ifdef DEBUG
+ opentrace();
+ trputs("Shell args: "); trargs(argv);
+#endif
+ rootpid = getpid();
+ rootshell = 1;
+ init();
+ setstackmark(&smark);
+ procargs(argc, argv);
+ if (argv[0] && argv[0][0] == '-') {
+ state = 1;
+ read_profile("/etc/profile");
+state1:
+ state = 2;
+ read_profile(".profile");
+ }
+state2:
+ state = 3;
+ if (getuid() == geteuid() && getgid() == getegid()) {
+ if ((shinit = lookupvar("ENV")) != NULL && *shinit != '\0') {
+ state = 3;
+ read_profile(shinit);
+ }
+ }
+state3:
+ state = 4;
+ if (minusc) {
+ evalstring(minusc);
+ }
+ if (sflag || minusc == NULL) {
+state4: /* XXX ??? - why isn't this before the "if" statement */
+ cmdloop(1);
+ }
+#if PROFILE
+ monitor(0);
+#endif
+ exitshell(exitstatus);
+ /*NOTREACHED*/
+ return 0;
+}
+
+
+/*
+ * Read and execute commands. "Top" is nonzero for the top level command
+ * loop; it turns on prompting if the shell is interactive.
+ */
+
+void
+cmdloop(top)
+ int top;
+{
+ union node *n;
+ struct stackmark smark;
+ int inter;
+ int numeof = 0;
+
+ TRACE(("cmdloop(%d) called\n", top));
+ setstackmark(&smark);
+ for (;;) {
+ if (pendingsigs)
+ dotrap();
+ inter = 0;
+ if (iflag && top) {
+ inter++;
+ showjobs(1);
+ chkmail(0);
+ flushout(&output);
+ }
+ n = parsecmd(inter);
+ /* showtree(n); DEBUG */
+ if (n == NEOF) {
+ if (!top || numeof >= 50)
+ break;
+ if (!stoppedjobs()) {
+ if (!Iflag)
+ break;
+ out2str("\nUse \"exit\" to leave shell.\n");
+ }
+ numeof++;
+ } else if (n != NULL && nflag == 0) {
+ job_warning = (job_warning == 2) ? 1 : 0;
+ numeof = 0;
+ evaltree(n, 0);
+ }
+ popstackmark(&smark);
+ if (evalskip == SKIPFILE) {
+ evalskip = 0;
+ break;
+ }
+ }
+ popstackmark(&smark); /* unnecessary */
+}
+
+
+
+/*
+ * Read /etc/profile or .profile. Return on error.
+ */
+
+STATIC void
+read_profile(name)
+ char *name;
+ {
+ int fd;
+
+ INTOFF;
+ if ((fd = open(name, O_RDONLY)) >= 0)
+ setinputfd(fd, 1);
+ INTON;
+ if (fd < 0)
+ return;
+ cmdloop(0);
+ popfile();
+}
+
+
+
+/*
+ * Read a file containing shell functions.
+ */
+
+void
+readcmdfile(name)
+ char *name;
+{
+ int fd;
+
+ INTOFF;
+ if ((fd = open(name, O_RDONLY)) >= 0)
+ setinputfd(fd, 1);
+ else
+ error("Can't open %s", name);
+ INTON;
+ cmdloop(0);
+ popfile();
+}
+
+
+
+/*
+ * Take commands from a file. To be compatable we should do a path
+ * search for the file, which is necessary to find sub-commands.
+ */
+
+
+STATIC char *
+find_dot_file(basename)
+ char *basename;
+{
+ static char localname[FILENAME_MAX+1];
+ char *fullname;
+ char *path = pathval();
+ struct stat statb;
+
+ /* don't try this for absolute or relative paths */
+ if( strchr(basename, '/'))
+ return basename;
+
+ while ((fullname = padvance(&path, basename)) != NULL) {
+ strcpy(localname, fullname);
+ stunalloc(fullname);
+ if ((stat(fullname, &statb) == 0) && S_ISREG(statb.st_mode))
+ return localname;
+ }
+ return basename;
+}
+
+int
+dotcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct strlist *sp;
+ exitstatus = 0;
+
+ for (sp = cmdenviron; sp ; sp = sp->next)
+ setvareq(savestr(sp->text), VSTRFIXED|VTEXTFIXED);
+
+ if (argc >= 2) { /* That's what SVR2 does */
+ char *fullname = find_dot_file(argv[1]);
+
+ setinputfile(fullname, 1);
+ commandname = fullname;
+ cmdloop(0);
+ popfile();
+ }
+ return exitstatus;
+}
+
+
+int
+exitcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ extern int oexitstatus;
+
+ if (stoppedjobs())
+ return 0;
+ if (argc > 1)
+ exitstatus = number(argv[1]);
+ else
+ exitstatus = oexitstatus;
+ exitshell(exitstatus);
+ /*NOTREACHED*/
+ return 0;
+}
+
+
+#ifdef notdef
+/*
+ * Should never be called.
+ */
+
+void
+exit(exitstatus) {
+ _exit(exitstatus);
+}
+#endif
diff --git a/release/picobsd/tinyware/ash/main.h b/release/picobsd/tinyware/ash/main.h
new file mode 100644
index 0000000..bfe88be
--- /dev/null
+++ b/release/picobsd/tinyware/ash/main.h
@@ -0,0 +1,47 @@
+/* $NetBSD: main.h,v 1.8 1995/05/11 21:29:27 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)main.h 8.2 (Berkeley) 5/4/95
+ */
+
+extern int rootpid; /* pid of main shell */
+extern int rootshell; /* true if we aren't a child of the main shell */
+
+void readcmdfile __P((char *));
+void cmdloop __P((int));
+int dotcmd __P((int, char **));
+int exitcmd __P((int, char **));
diff --git a/release/picobsd/tinyware/ash/memalloc.c b/release/picobsd/tinyware/ash/memalloc.c
new file mode 100644
index 0000000..6533d4c
--- /dev/null
+++ b/release/picobsd/tinyware/ash/memalloc.c
@@ -0,0 +1,306 @@
+/* $NetBSD: memalloc.c,v 1.20 1997/07/04 21:02:08 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: memalloc.c,v 1.20 1997/07/04 21:02:08 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include "shell.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "machdep.h"
+#include "mystring.h"
+#include <stdlib.h>
+#include <unistd.h>
+
+/*
+ * Like malloc, but returns an error when out of space.
+ */
+
+pointer
+ckmalloc(nbytes)
+ int nbytes;
+{
+ pointer p;
+
+ if ((p = malloc(nbytes)) == NULL)
+ error("Out of space");
+ return p;
+}
+
+
+/*
+ * Same for realloc.
+ */
+
+pointer
+ckrealloc(p, nbytes)
+ pointer p;
+ int nbytes;
+{
+
+ if ((p = realloc(p, nbytes)) == NULL)
+ error("Out of space");
+ return p;
+}
+
+
+/*
+ * Make a copy of a string in safe storage.
+ */
+
+char *
+savestr(s)
+ char *s;
+ {
+ char *p;
+
+ p = ckmalloc(strlen(s) + 1);
+ scopy(s, p);
+ return p;
+}
+
+
+/*
+ * Parse trees for commands are allocated in lifo order, so we use a stack
+ * to make this more efficient, and also to avoid all sorts of exception
+ * handling code to handle interrupts in the middle of a parse.
+ *
+ * The size 504 was chosen because the Ultrix malloc handles that size
+ * well.
+ */
+
+#define MINSIZE 504 /* minimum size of a block */
+
+
+struct stack_block {
+ struct stack_block *prev;
+ char space[MINSIZE];
+};
+
+struct stack_block stackbase;
+struct stack_block *stackp = &stackbase;
+char *stacknxt = stackbase.space;
+int stacknleft = MINSIZE;
+int sstrnleft;
+int herefd = -1;
+
+
+
+pointer
+stalloc(nbytes)
+ int nbytes;
+{
+ char *p;
+
+ nbytes = ALIGN(nbytes);
+ if (nbytes > stacknleft) {
+ int blocksize;
+ struct stack_block *sp;
+
+ blocksize = nbytes;
+ if (blocksize < MINSIZE)
+ blocksize = MINSIZE;
+ INTOFF;
+ sp = ckmalloc(sizeof(struct stack_block) - MINSIZE + blocksize);
+ sp->prev = stackp;
+ stacknxt = sp->space;
+ stacknleft = blocksize;
+ stackp = sp;
+ INTON;
+ }
+ p = stacknxt;
+ stacknxt += nbytes;
+ stacknleft -= nbytes;
+ return p;
+}
+
+
+void
+stunalloc(p)
+ pointer p;
+ {
+ if (p == NULL) { /*DEBUG */
+ write(2, "stunalloc\n", 10);
+ abort();
+ }
+ stacknleft += stacknxt - (char *)p;
+ stacknxt = p;
+}
+
+
+
+void
+setstackmark(mark)
+ struct stackmark *mark;
+ {
+ mark->stackp = stackp;
+ mark->stacknxt = stacknxt;
+ mark->stacknleft = stacknleft;
+}
+
+
+void
+popstackmark(mark)
+ struct stackmark *mark;
+ {
+ struct stack_block *sp;
+
+ INTOFF;
+ while (stackp != mark->stackp) {
+ sp = stackp;
+ stackp = sp->prev;
+ ckfree(sp);
+ }
+ stacknxt = mark->stacknxt;
+ stacknleft = mark->stacknleft;
+ INTON;
+}
+
+
+/*
+ * When the parser reads in a string, it wants to stick the string on the
+ * stack and only adjust the stack pointer when it knows how big the
+ * string is. Stackblock (defined in stack.h) returns a pointer to a block
+ * of space on top of the stack and stackblocklen returns the length of
+ * this block. Growstackblock will grow this space by at least one byte,
+ * possibly moving it (like realloc). Grabstackblock actually allocates the
+ * part of the block that has been used.
+ */
+
+void
+growstackblock() {
+ char *p;
+ int newlen = ALIGN(stacknleft * 2 + 100);
+ char *oldspace = stacknxt;
+ int oldlen = stacknleft;
+ struct stack_block *sp;
+
+ if (stacknxt == stackp->space && stackp != &stackbase) {
+ INTOFF;
+ sp = stackp;
+ stackp = sp->prev;
+ sp = ckrealloc((pointer)sp, sizeof(struct stack_block) - MINSIZE + newlen);
+ sp->prev = stackp;
+ stackp = sp;
+ stacknxt = sp->space;
+ stacknleft = newlen;
+ INTON;
+ } else {
+ p = stalloc(newlen);
+ memcpy(p, oldspace, oldlen);
+ stacknxt = p; /* free the space */
+ stacknleft += newlen; /* we just allocated */
+ }
+}
+
+
+
+void
+grabstackblock(len)
+ int len;
+{
+ len = ALIGN(len);
+ stacknxt += len;
+ stacknleft -= len;
+}
+
+
+
+/*
+ * The following routines are somewhat easier to use that the above.
+ * The user declares a variable of type STACKSTR, which may be declared
+ * to be a register. The macro STARTSTACKSTR initializes things. Then
+ * the user uses the macro STPUTC to add characters to the string. In
+ * effect, STPUTC(c, p) is the same as *p++ = c except that the stack is
+ * grown as necessary. When the user is done, she can just leave the
+ * string there and refer to it using stackblock(). Or she can allocate
+ * the space for it using grabstackstr(). If it is necessary to allow
+ * someone else to use the stack temporarily and then continue to grow
+ * the string, the user should use grabstack to allocate the space, and
+ * then call ungrabstr(p) to return to the previous mode of operation.
+ *
+ * USTPUTC is like STPUTC except that it doesn't check for overflow.
+ * CHECKSTACKSPACE can be called before USTPUTC to ensure that there
+ * is space for at least one character.
+ */
+
+
+char *
+growstackstr() {
+ int len = stackblocksize();
+ if (herefd >= 0 && len >= 1024) {
+ xwrite(herefd, stackblock(), len);
+ sstrnleft = len - 1;
+ return stackblock();
+ }
+ growstackblock();
+ sstrnleft = stackblocksize() - len - 1;
+ return stackblock() + len;
+}
+
+
+/*
+ * Called from CHECKSTRSPACE.
+ */
+
+char *
+makestrspace() {
+ int len = stackblocksize() - sstrnleft;
+ growstackblock();
+ sstrnleft = stackblocksize() - len;
+ return stackblock() + len;
+}
+
+
+
+void
+ungrabstackstr(s, p)
+ char *s;
+ char *p;
+ {
+ stacknleft += stacknxt - s;
+ stacknxt = s;
+ sstrnleft = stacknleft - (p - s);
+}
diff --git a/release/picobsd/tinyware/ash/memalloc.h b/release/picobsd/tinyware/ash/memalloc.h
new file mode 100644
index 0000000..eb0abe4
--- /dev/null
+++ b/release/picobsd/tinyware/ash/memalloc.h
@@ -0,0 +1,80 @@
+/* $NetBSD: memalloc.h,v 1.10 1995/05/11 21:29:31 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)memalloc.h 8.2 (Berkeley) 5/4/95
+ */
+
+struct stackmark {
+ struct stack_block *stackp;
+ char *stacknxt;
+ int stacknleft;
+};
+
+
+extern char *stacknxt;
+extern int stacknleft;
+extern int sstrnleft;
+extern int herefd;
+
+pointer ckmalloc __P((int));
+pointer ckrealloc __P((pointer, int));
+char *savestr __P((char *));
+pointer stalloc __P((int));
+void stunalloc __P((pointer));
+void setstackmark __P((struct stackmark *));
+void popstackmark __P((struct stackmark *));
+void growstackblock __P((void));
+void grabstackblock __P((int));
+char *growstackstr __P((void));
+char *makestrspace __P((void));
+void ungrabstackstr __P((char *, char *));
+
+
+
+#define stackblock() stacknxt
+#define stackblocksize() stacknleft
+#define STARTSTACKSTR(p) p = stackblock(), sstrnleft = stackblocksize()
+#define STPUTC(c, p) (--sstrnleft >= 0? (*p++ = (c)) : (p = growstackstr(), *p++ = (c)))
+#define CHECKSTRSPACE(n, p) { if (sstrnleft < n) p = makestrspace(); }
+#define USTPUTC(c, p) (--sstrnleft, *p++ = (c))
+#define STACKSTRNUL(p) (sstrnleft == 0? (p = growstackstr(), *p = '\0') : (*p = '\0'))
+#define STUNPUTC(p) (++sstrnleft, --p)
+#define STTOPC(p) p[-1]
+#define STADJUST(amount, p) (p += (amount), sstrnleft -= (amount))
+#define grabstackstr(p) stalloc(stackblocksize() - sstrnleft)
+
+#define ckfree(p) free((pointer)(p))
diff --git a/release/picobsd/tinyware/ash/miscbltin.c b/release/picobsd/tinyware/ash/miscbltin.c
new file mode 100644
index 0000000..51881dbb
--- /dev/null
+++ b/release/picobsd/tinyware/ash/miscbltin.c
@@ -0,0 +1,402 @@
+/* $NetBSD: miscbltin.c,v 1.19 1997/07/04 21:02:09 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: miscbltin.c,v 1.19 1997/07/04 21:02:09 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * Miscelaneous builtins.
+ */
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <unistd.h>
+#include <ctype.h>
+
+#include "shell.h"
+#include "options.h"
+#include "var.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "miscbltin.h"
+#include "mystring.h"
+
+#undef eflag
+
+extern char **argptr; /* argument list for builtin command */
+
+
+/*
+ * The read builtin. The -e option causes backslashes to escape the
+ * following character.
+ *
+ * This uses unbuffered input, which may be avoidable in some cases.
+ */
+
+int
+readcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char **ap;
+ int backslash;
+ char c;
+ int eflag;
+ char *prompt;
+ char *ifs;
+ char *p;
+ int startword;
+ int status;
+ int i;
+
+ eflag = 0;
+ prompt = NULL;
+ while ((i = nextopt("ep:")) != '\0') {
+ if (i == 'p')
+ prompt = optarg;
+ else
+ eflag = 1;
+ }
+ if (prompt && isatty(0)) {
+ out2str(prompt);
+ flushall();
+ }
+ if (*(ap = argptr) == NULL)
+ error("arg count");
+ if ((ifs = bltinlookup("IFS", 1)) == NULL)
+ ifs = nullstr;
+ status = 0;
+ startword = 1;
+ backslash = 0;
+ STARTSTACKSTR(p);
+ for (;;) {
+ if (read(0, &c, 1) != 1) {
+ status = 1;
+ break;
+ }
+ if (c == '\0')
+ continue;
+ if (backslash) {
+ backslash = 0;
+ if (c != '\n')
+ STPUTC(c, p);
+ continue;
+ }
+ if (eflag && c == '\\') {
+ backslash++;
+ continue;
+ }
+ if (c == '\n')
+ break;
+ if (startword && *ifs == ' ' && strchr(ifs, c)) {
+ continue;
+ }
+ startword = 0;
+ if (backslash && c == '\\') {
+ if (read(0, &c, 1) != 1) {
+ status = 1;
+ break;
+ }
+ STPUTC(c, p);
+ } else if (ap[1] != NULL && strchr(ifs, c) != NULL) {
+ STACKSTRNUL(p);
+ setvar(*ap, stackblock(), 0);
+ ap++;
+ startword = 1;
+ STARTSTACKSTR(p);
+ } else {
+ STPUTC(c, p);
+ }
+ }
+ STACKSTRNUL(p);
+ setvar(*ap, stackblock(), 0);
+ while (*++ap != NULL)
+ setvar(*ap, nullstr, 0);
+ return status;
+}
+
+
+
+int
+umaskcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *ap;
+ int mask;
+ int i;
+ int symbolic_mode = 0;
+
+ while ((i = nextopt("S")) != '\0') {
+ symbolic_mode = 1;
+ }
+
+ INTOFF;
+ mask = umask(0);
+ umask(mask);
+ INTON;
+
+ if ((ap = *argptr) == NULL) {
+ if (symbolic_mode) {
+ char u[4], g[4], o[4];
+
+ i = 0;
+ if ((mask & S_IRUSR) == 0)
+ u[i++] = 'r';
+ if ((mask & S_IWUSR) == 0)
+ u[i++] = 'w';
+ if ((mask & S_IXUSR) == 0)
+ u[i++] = 'x';
+ u[i] = '\0';
+
+ i = 0;
+ if ((mask & S_IRGRP) == 0)
+ g[i++] = 'r';
+ if ((mask & S_IWGRP) == 0)
+ g[i++] = 'w';
+ if ((mask & S_IXGRP) == 0)
+ g[i++] = 'x';
+ g[i] = '\0';
+
+ i = 0;
+ if ((mask & S_IROTH) == 0)
+ o[i++] = 'r';
+ if ((mask & S_IWOTH) == 0)
+ o[i++] = 'w';
+ if ((mask & S_IXOTH) == 0)
+ o[i++] = 'x';
+ o[i] = '\0';
+
+ out1fmt("u=%s,g=%s,o=%s\n", u, g, o);
+ } else {
+ out1fmt("%.4o\n", mask);
+ }
+ } else {
+ if (isdigit(*ap)) {
+ mask = 0;
+ do {
+ if (*ap >= '8' || *ap < '0')
+ error("Illegal number: %s", argv[1]);
+ mask = (mask << 3) + (*ap - '0');
+ } while (*++ap != '\0');
+ umask(mask);
+ } else {
+ void *set;
+ if ((set = setmode (ap)) == 0)
+ error("Illegal number: %s", ap);
+
+ mask = getmode (set, ~mask & 0777);
+ umask(~mask & 0777);
+ }
+ }
+ return 0;
+}
+
+/*
+ * ulimit builtin
+ *
+ * This code, originally by Doug Gwyn, Doug Kingston, Eric Gisin, and
+ * Michael Rendell was ripped from pdksh 5.0.8 and hacked for use with
+ * ash by J.T. Conklin.
+ *
+ * Public domain.
+ */
+
+struct limits {
+ const char *name;
+ int cmd;
+ int factor; /* multiply by to get rlim_{cur,max} values */
+ char option;
+};
+
+static const struct limits limits[] = {
+#ifdef RLIMIT_CPU
+ { "time(seconds)", RLIMIT_CPU, 1, 't' },
+#endif
+#ifdef RLIMIT_FSIZE
+ { "file(blocks)", RLIMIT_FSIZE, 512, 'f' },
+#endif
+#ifdef RLIMIT_DATA
+ { "data(kbytes)", RLIMIT_DATA, 1024, 'd' },
+#endif
+#ifdef RLIMIT_STACK
+ { "stack(kbytes)", RLIMIT_STACK, 1024, 's' },
+#endif
+#ifdef RLIMIT_CORE
+ { "coredump(blocks)", RLIMIT_CORE, 512, 'c' },
+#endif
+#ifdef RLIMIT_RSS
+ { "memory(kbytes)", RLIMIT_RSS, 1024, 'm' },
+#endif
+#ifdef RLIMIT_MEMLOCK
+ { "locked memory(kbytes)", RLIMIT_MEMLOCK, 1024, 'l' },
+#endif
+#ifdef RLIMIT_NPROC
+ { "process(processes)", RLIMIT_NPROC, 1, 'p' },
+#endif
+#ifdef RLIMIT_NOFILE
+ { "nofiles(descriptors)", RLIMIT_NOFILE, 1, 'n' },
+#endif
+#ifdef RLIMIT_VMEM
+ { "vmemory(kbytes)", RLIMIT_VMEM, 1024, 'v' },
+#endif
+#ifdef RLIMIT_SWAP
+ { "swap(kbytes)", RLIMIT_SWAP, 1024, 'w' },
+#endif
+ { (char *) 0, 0, 0, '\0' }
+};
+
+int
+ulimitcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ rlim_t val = 0;
+ enum { SOFT = 0x1, HARD = 0x2 }
+ how = SOFT | HARD;
+ const struct limits *l;
+ int set, all = 0;
+ int optc, what;
+ struct rlimit limit;
+
+ what = 'f';
+ while ((optc = nextopt("HSatfdsmcnpl")) != '\0')
+ switch (optc) {
+ case 'H':
+ how = HARD;
+ break;
+ case 'S':
+ how = SOFT;
+ break;
+ case 'a':
+ all = 1;
+ break;
+ default:
+ what = optc;
+ }
+
+ for (l = limits; l->name && l->option != what; l++)
+ ;
+ if (!l->name)
+ error("ulimit: internal error (%c)\n", what);
+
+ set = *argptr ? 1 : 0;
+ if (set) {
+ char *p = *argptr;
+
+ if (all || argptr[1])
+ error("ulimit: too many arguments\n");
+ if (strcmp(p, "unlimited") == 0)
+ val = RLIM_INFINITY;
+ else {
+ val = (rlim_t) 0;
+
+ while ((c = *p++) >= '0' && c <= '9')
+ {
+ val = (val * 10) + (long)(c - '0');
+ if (val < (rlim_t) 0)
+ break;
+ }
+ if (c)
+ error("ulimit: bad number\n");
+ val *= l->factor;
+ }
+ }
+ if (all) {
+ for (l = limits; l->name; l++) {
+ getrlimit(l->cmd, &limit);
+ if (how & SOFT)
+ val = limit.rlim_cur;
+ else if (how & HARD)
+ val = limit.rlim_max;
+
+ out1fmt("%-20s ", l->name);
+ if (val == RLIM_INFINITY)
+ out1fmt("unlimited\n");
+ else
+ {
+ val /= l->factor;
+#ifdef BSD4_4
+ out1fmt("%qd\n", (quad_t) val);
+#else
+ out1fmt("%ld\n", (long) val);
+#endif
+ }
+ }
+ return 0;
+ }
+
+ getrlimit(l->cmd, &limit);
+ if (set) {
+ if (how & SOFT)
+ limit.rlim_cur = val;
+ if (how & HARD)
+ limit.rlim_max = val;
+ if (setrlimit(l->cmd, &limit) < 0)
+ error("ulimit: bad limit\n");
+ } else {
+ if (how & SOFT)
+ val = limit.rlim_cur;
+ else if (how & HARD)
+ val = limit.rlim_max;
+
+ if (val == RLIM_INFINITY)
+ out1fmt("unlimited\n");
+ else
+ {
+ val /= l->factor;
+#ifdef BSD4_4
+ out1fmt("%qd\n", (quad_t) val);
+#else
+ out1fmt("%ld\n", (long) val);
+#endif
+ }
+ }
+ return 0;
+}
diff --git a/release/picobsd/tinyware/ash/miscbltin.h b/release/picobsd/tinyware/ash/miscbltin.h
new file mode 100644
index 0000000..105fa93
--- /dev/null
+++ b/release/picobsd/tinyware/ash/miscbltin.h
@@ -0,0 +1,34 @@
+/* $NetBSD: miscbltin.h,v 1.1 1997/07/04 21:02:10 christos Exp $ */
+
+/*
+ * Copyright (c) 1997 Christos Zoulas. All rights reserved.
+ *
+ * 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 Christos Zoulas.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+int readcmd __P((int, char **));
+int umaskcmd __P((int, char **));
+int ulimitcmd __P((int, char **));
diff --git a/release/picobsd/tinyware/ash/mkbuiltins b/release/picobsd/tinyware/ash/mkbuiltins
new file mode 100644
index 0000000..61108f2
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mkbuiltins
@@ -0,0 +1,94 @@
+#!/bin/sh -
+# $NetBSD: mkbuiltins,v 1.13 1997/07/04 21:02:10 christos Exp $
+#
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)mkbuiltins 8.2 (Berkeley) 5/4/95
+
+temp=/tmp/ka$$
+havejobs=0
+if grep '^#define JOBS[ ]*1' shell.h > /dev/null
+then havejobs=1
+fi
+havehist=1
+if [ "X$1" = "X-h" ]; then
+ havehist=0
+ shift
+fi
+objdir=$1
+exec > ${objdir}/builtins.c
+cat <<\!
+/*
+ * This file was generated by the mkbuiltins program.
+ */
+
+#include "shell.h"
+#include "builtins.h"
+
+!
+awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
+ print $0}' builtins.def | sed 's/-j//' > $temp
+awk '{ printf "int %s __P((int, char **));\n", $1}' $temp
+echo '
+int (*const builtinfunc[]) __P((int, char **)) = {'
+awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
+echo '};
+
+const struct builtincmd builtincmd[] = {'
+awk '{ for (i = 2 ; i <= NF ; i++) {
+ printf "\t{ \"%s\", %d },\n", $i, NR-1
+ }}' $temp
+echo ' { NULL, 0 }
+};'
+
+exec > ${objdir}/builtins.h
+cat <<\!
+/*
+ * This file was generated by the mkbuiltins program.
+ */
+
+#include <sys/cdefs.h>
+!
+tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ < $temp |
+ awk '{ printf "#define %s %d\n", $1, NR-1}'
+echo '
+struct builtincmd {
+ char *name;
+ int code;
+};
+
+extern int (*const builtinfunc[]) __P((int, char **));
+extern const struct builtincmd builtincmd[];'
+rm -f $temp
diff --git a/release/picobsd/tinyware/ash/mkinit.c b/release/picobsd/tinyware/ash/mkinit.c
new file mode 100644
index 0000000..c7ed764
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mkinit.c
@@ -0,0 +1,523 @@
+/* $NetBSD: mkinit.c,v 1.17 1997/07/04 21:02:11 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
+#endif /* not lint */
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)mkinit.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: mkinit.c,v 1.17 1997/07/04 21:02:11 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * This program scans all the source files for code to handle various
+ * special events and combines this code into one file. This (allegedly)
+ * improves the structure of the program since there is no need for
+ * anyone outside of a module to know that that module performs special
+ * operations on particular events.
+ *
+ * Usage: mkinit sourcefile...
+ */
+
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+/*
+ * OUTFILE is the name of the output file. Output is initially written
+ * to the file OUTTEMP, which is then moved to OUTFILE.
+ */
+
+#define OUTFILE "init.c"
+#define OUTTEMP "init.c.new"
+
+
+/*
+ * A text structure is basicly just a string that grows as more characters
+ * are added onto the end of it. It is implemented as a linked list of
+ * blocks of characters. The routines addstr and addchar append a string
+ * or a single character, respectively, to a text structure. Writetext
+ * writes the contents of a text structure to a file.
+ */
+
+#define BLOCKSIZE 512
+
+struct text {
+ char *nextc;
+ int nleft;
+ struct block *start;
+ struct block *last;
+};
+
+struct block {
+ struct block *next;
+ char text[BLOCKSIZE];
+};
+
+
+/*
+ * There is one event structure for each event that mkinit handles.
+ */
+
+struct event {
+ char *name; /* name of event (e.g. INIT) */
+ char *routine; /* name of routine called on event */
+ char *comment; /* comment describing routine */
+ struct text code; /* code for handling event */
+};
+
+
+char writer[] = "\
+/*\n\
+ * This file was generated by the mkinit program.\n\
+ */\n\
+\n";
+
+char init[] = "\
+/*\n\
+ * Initialization code.\n\
+ */\n";
+
+char reset[] = "\
+/*\n\
+ * This routine is called when an error or an interrupt occurs in an\n\
+ * interactive shell and control is returned to the main command loop.\n\
+ */\n";
+
+char shellproc[] = "\
+/*\n\
+ * This routine is called to initialize the shell to run a shell procedure.\n\
+ */\n";
+
+
+struct event event[] = {
+ {"INIT", "init", init},
+ {"RESET", "reset", reset},
+ {"SHELLPROC", "initshellproc", shellproc},
+ {NULL, NULL}
+};
+
+
+char *curfile; /* current file */
+int linno; /* current line */
+char *header_files[200]; /* list of header files */
+struct text defines; /* #define statements */
+struct text decls; /* declarations */
+int amiddecls; /* for formatting */
+
+
+void readfile __P((char *));
+int match __P((char *, char *));
+int gooddefine __P((char *));
+void doevent __P((struct event *, FILE *, char *));
+void doinclude __P((char *));
+void dodecl __P((char *, FILE *));
+void output __P((void));
+void addstr __P((char *, struct text *));
+void addchar __P((int, struct text *));
+void writetext __P((struct text *, FILE *));
+FILE *ckfopen __P((char *, char *));
+void *ckmalloc __P((int));
+char *savestr __P((char *));
+void error __P((char *));
+int main __P((int, char **));
+
+#define equal(s1, s2) (strcmp(s1, s2) == 0)
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ char **ap;
+
+ header_files[0] = "\"shell.h\"";
+ header_files[1] = "\"mystring.h\"";
+ header_files[2] = "\"init.h\"";
+ for (ap = argv + 1 ; *ap ; ap++)
+ readfile(*ap);
+ output();
+ rename(OUTTEMP, OUTFILE);
+ exit(0);
+}
+
+
+/*
+ * Parse an input file.
+ */
+
+void
+readfile(fname)
+ char *fname;
+ {
+ FILE *fp;
+ char line[1024];
+ struct event *ep;
+
+ fp = ckfopen(fname, "r");
+ curfile = fname;
+ linno = 0;
+ amiddecls = 0;
+ while (fgets(line, sizeof line, fp) != NULL) {
+ linno++;
+ for (ep = event ; ep->name ; ep++) {
+ if (line[0] == ep->name[0] && match(ep->name, line)) {
+ doevent(ep, fp, fname);
+ break;
+ }
+ }
+ if (line[0] == 'I' && match("INCLUDE", line))
+ doinclude(line);
+ if (line[0] == 'M' && match("MKINIT", line))
+ dodecl(line, fp);
+ if (line[0] == '#' && gooddefine(line))
+ addstr(line, &defines);
+ if (line[0] == '#' && gooddefine(line)) {
+ char *cp;
+ char line2[1024];
+ static const char undef[] = "#undef ";
+
+ strcpy(line2, line);
+ memcpy(line2, undef, sizeof(undef) - 1);
+ cp = line2 + sizeof(undef) - 1;
+ while(*cp && (*cp == ' ' || *cp == '\t'))
+ cp++;
+ while(*cp && *cp != ' ' && *cp != '\t' && *cp != '\n')
+ cp++;
+ *cp++ = '\n'; *cp = '\0';
+ addstr(line2, &defines);
+ addstr(line, &defines);
+ }
+ }
+ fclose(fp);
+}
+
+
+int
+match(name, line)
+ char *name;
+ char *line;
+{
+ char *p, *q;
+
+ p = name, q = line;
+ while (*p) {
+ if (*p++ != *q++)
+ return 0;
+ }
+ if (*q != '{' && *q != ' ' && *q != '\t' && *q != '\n')
+ return 0;
+ return 1;
+}
+
+
+int
+gooddefine(line)
+ char *line;
+{
+ char *p;
+
+ if (! match("#define", line))
+ return 0; /* not a define */
+ p = line + 7;
+ while (*p == ' ' || *p == '\t')
+ p++;
+ while (*p != ' ' && *p != '\t') {
+ if (*p == '(')
+ return 0; /* macro definition */
+ p++;
+ }
+ while (*p != '\n' && *p != '\0')
+ p++;
+ if (p[-1] == '\\')
+ return 0; /* multi-line definition */
+ return 1;
+}
+
+
+void
+doevent(ep, fp, fname)
+ struct event *ep;
+ FILE *fp;
+ char *fname;
+ {
+ char line[1024];
+ int indent;
+ char *p;
+
+ sprintf(line, "\n /* from %s: */\n", fname);
+ addstr(line, &ep->code);
+ addstr(" {\n", &ep->code);
+ for (;;) {
+ linno++;
+ if (fgets(line, sizeof line, fp) == NULL)
+ error("Unexpected EOF");
+ if (equal(line, "}\n"))
+ break;
+ indent = 6;
+ for (p = line ; *p == '\t' ; p++)
+ indent += 8;
+ for ( ; *p == ' ' ; p++)
+ indent++;
+ if (*p == '\n' || *p == '#')
+ indent = 0;
+ while (indent >= 8) {
+ addchar('\t', &ep->code);
+ indent -= 8;
+ }
+ while (indent > 0) {
+ addchar(' ', &ep->code);
+ indent--;
+ }
+ addstr(p, &ep->code);
+ }
+ addstr(" }\n", &ep->code);
+}
+
+
+void
+doinclude(line)
+ char *line;
+ {
+ char *p;
+ char *name;
+ char **pp;
+
+ for (p = line ; *p != '"' && *p != '<' && *p != '\0' ; p++);
+ if (*p == '\0')
+ error("Expecting '\"' or '<'");
+ name = p;
+ while (*p != ' ' && *p != '\t' && *p != '\n')
+ p++;
+ if (p[-1] != '"' && p[-1] != '>')
+ error("Missing terminator");
+ *p = '\0';
+
+ /* name now contains the name of the include file */
+ for (pp = header_files ; *pp && ! equal(*pp, name) ; pp++);
+ if (*pp == NULL)
+ *pp = savestr(name);
+}
+
+
+void
+dodecl(line1, fp)
+ char *line1;
+ FILE *fp;
+ {
+ char line[1024];
+ char *p, *q;
+
+ if (strcmp(line1, "MKINIT\n") == 0) { /* start of struct/union decl */
+ addchar('\n', &decls);
+ do {
+ linno++;
+ if (fgets(line, sizeof line, fp) == NULL)
+ error("Unterminated structure declaration");
+ addstr(line, &decls);
+ } while (line[0] != '}');
+ amiddecls = 0;
+ } else {
+ if (! amiddecls)
+ addchar('\n', &decls);
+ q = NULL;
+ for (p = line1 + 6 ; *p && strchr("=/\n", *p) == NULL; p++)
+ continue;
+ if (*p == '=') { /* eliminate initialization */
+ for (q = p ; *q && *q != ';' ; q++);
+ if (*q == '\0')
+ q = NULL;
+ else {
+ while (p[-1] == ' ')
+ p--;
+ *p = '\0';
+ }
+ }
+ addstr("extern", &decls);
+ addstr(line1 + 6, &decls);
+ if (q != NULL)
+ addstr(q, &decls);
+ amiddecls = 1;
+ }
+}
+
+
+
+/*
+ * Write the output to the file OUTTEMP.
+ */
+
+void
+output() {
+ FILE *fp;
+ char **pp;
+ struct event *ep;
+
+ fp = ckfopen(OUTTEMP, "w");
+ fputs(writer, fp);
+ for (pp = header_files ; *pp ; pp++)
+ fprintf(fp, "#include %s\n", *pp);
+ fputs("\n\n\n", fp);
+ writetext(&defines, fp);
+ fputs("\n\n", fp);
+ writetext(&decls, fp);
+ for (ep = event ; ep->name ; ep++) {
+ fputs("\n\n\n", fp);
+ fputs(ep->comment, fp);
+ fprintf(fp, "\nvoid\n%s() {\n", ep->routine);
+ writetext(&ep->code, fp);
+ fprintf(fp, "}\n");
+ }
+ fclose(fp);
+}
+
+
+/*
+ * A text structure is simply a block of text that is kept in memory.
+ * Addstr appends a string to the text struct, and addchar appends a single
+ * character.
+ */
+
+void
+addstr(s, text)
+ char *s;
+ struct text *text;
+ {
+ while (*s) {
+ if (--text->nleft < 0)
+ addchar(*s++, text);
+ else
+ *text->nextc++ = *s++;
+ }
+}
+
+
+void
+addchar(c, text)
+ int c;
+ struct text *text;
+{
+ struct block *bp;
+
+ if (--text->nleft < 0) {
+ bp = ckmalloc(sizeof *bp);
+ if (text->start == NULL)
+ text->start = bp;
+ else
+ text->last->next = bp;
+ text->last = bp;
+ text->nextc = bp->text;
+ text->nleft = BLOCKSIZE - 1;
+ }
+ *text->nextc++ = c;
+}
+
+/*
+ * Write the contents of a text structure to a file.
+ */
+void
+writetext(text, fp)
+ struct text *text;
+ FILE *fp;
+ {
+ struct block *bp;
+
+ if (text->start != NULL) {
+ for (bp = text->start ; bp != text->last ; bp = bp->next)
+ fwrite(bp->text, sizeof (char), BLOCKSIZE, fp);
+ fwrite(bp->text, sizeof (char), BLOCKSIZE - text->nleft, fp);
+ }
+}
+
+FILE *
+ckfopen(file, mode)
+ char *file;
+ char *mode;
+ {
+ FILE *fp;
+
+ if ((fp = fopen(file, mode)) == NULL) {
+ fprintf(stderr, "Can't open %s\n", file);
+ exit(2);
+ }
+ return fp;
+}
+
+void *
+ckmalloc(nbytes)
+ int nbytes;
+{
+ char *p;
+
+ if ((p = malloc(nbytes)) == NULL)
+ error("Out of space");
+ return p;
+}
+
+char *
+savestr(s)
+ char *s;
+ {
+ char *p;
+
+ p = ckmalloc(strlen(s) + 1);
+ strcpy(p, s);
+ return p;
+}
+
+void
+error(msg)
+ char *msg;
+ {
+ if (curfile != NULL)
+ fprintf(stderr, "%s:%d: ", curfile, linno);
+ fprintf(stderr, "%s\n", msg);
+ exit(2);
+}
diff --git a/release/picobsd/tinyware/ash/mknodes.c b/release/picobsd/tinyware/ash/mknodes.c
new file mode 100644
index 0000000..9692a9a
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mknodes.c
@@ -0,0 +1,482 @@
+/* $NetBSD: mknodes.c,v 1.15 1997/07/04 21:02:12 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
+#endif /* not lint */
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)mknodes.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: mknodes.c,v 1.15 1997/07/04 21:02:12 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * This program reads the nodetypes file and nodes.c.pat file. It generates
+ * the files nodes.h and nodes.c.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+
+#define MAXTYPES 50 /* max number of node types */
+#define MAXFIELDS 20 /* max fields in a structure */
+#define BUFLEN 100 /* size of character buffers */
+
+/* field types */
+#define T_NODE 1 /* union node *field */
+#define T_NODELIST 2 /* struct nodelist *field */
+#define T_STRING 3
+#define T_INT 4 /* int field */
+#define T_OTHER 5 /* other */
+#define T_TEMP 6 /* don't copy this field */
+
+
+struct field { /* a structure field */
+ char *name; /* name of field */
+ int type; /* type of field */
+ char *decl; /* declaration of field */
+};
+
+
+struct str { /* struct representing a node structure */
+ char *tag; /* structure tag */
+ int nfields; /* number of fields in the structure */
+ struct field field[MAXFIELDS]; /* the fields of the structure */
+ int done; /* set if fully parsed */
+};
+
+
+static int ntypes; /* number of node types */
+static char *nodename[MAXTYPES]; /* names of the nodes */
+static struct str *nodestr[MAXTYPES]; /* type of structure used by the node */
+static int nstr; /* number of structures */
+static struct str str[MAXTYPES]; /* the structures */
+static struct str *curstr; /* current structure */
+static FILE *infp = stdin;
+static char line[1024];
+static int linno;
+static char *linep;
+
+static void parsenode __P((void));
+static void parsefield __P((void));
+static void output __P((char *));
+static void outsizes __P((FILE *));
+static void outfunc __P((FILE *, int));
+static void indent __P((int, FILE *));
+static int nextfield __P((char *));
+static void skipbl __P((void));
+static int readline __P((void));
+static void error __P((const char *, ...));
+static char *savestr __P((const char *));
+int main __P((int, char **));
+
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ if (argc != 3)
+ error("usage: mknodes file");
+ if ((infp = fopen(argv[1], "r")) == NULL)
+ error("Can't open %s", argv[1]);
+ while (readline()) {
+ if (line[0] == ' ' || line[0] == '\t')
+ parsefield();
+ else if (line[0] != '\0')
+ parsenode();
+ }
+ output(argv[2]);
+ exit(0);
+}
+
+
+
+static void
+parsenode()
+{
+ char name[BUFLEN];
+ char tag[BUFLEN];
+ struct str *sp;
+
+ if (curstr && curstr->nfields > 0)
+ curstr->done = 1;
+ nextfield(name);
+ if (! nextfield(tag))
+ error("Tag expected");
+ if (*linep != '\0')
+ error("Garbage at end of line");
+ nodename[ntypes] = savestr(name);
+ for (sp = str ; sp < str + nstr ; sp++) {
+ if (strcmp(sp->tag, tag) == 0)
+ break;
+ }
+ if (sp >= str + nstr) {
+ sp->tag = savestr(tag);
+ sp->nfields = 0;
+ curstr = sp;
+ nstr++;
+ }
+ nodestr[ntypes] = sp;
+ ntypes++;
+}
+
+
+static void
+parsefield()
+{
+ char name[BUFLEN];
+ char type[BUFLEN];
+ char decl[2 * BUFLEN];
+ struct field *fp;
+
+ if (curstr == NULL || curstr->done)
+ error("No current structure to add field to");
+ if (! nextfield(name))
+ error("No field name");
+ if (! nextfield(type))
+ error("No field type");
+ fp = &curstr->field[curstr->nfields];
+ fp->name = savestr(name);
+ if (strcmp(type, "nodeptr") == 0) {
+ fp->type = T_NODE;
+ sprintf(decl, "union node *%s", name);
+ } else if (strcmp(type, "nodelist") == 0) {
+ fp->type = T_NODELIST;
+ sprintf(decl, "struct nodelist *%s", name);
+ } else if (strcmp(type, "string") == 0) {
+ fp->type = T_STRING;
+ sprintf(decl, "char *%s", name);
+ } else if (strcmp(type, "int") == 0) {
+ fp->type = T_INT;
+ sprintf(decl, "int %s", name);
+ } else if (strcmp(type, "other") == 0) {
+ fp->type = T_OTHER;
+ } else if (strcmp(type, "temp") == 0) {
+ fp->type = T_TEMP;
+ } else {
+ error("Unknown type %s", type);
+ }
+ if (fp->type == T_OTHER || fp->type == T_TEMP) {
+ skipbl();
+ fp->decl = savestr(linep);
+ } else {
+ if (*linep)
+ error("Garbage at end of line");
+ fp->decl = savestr(decl);
+ }
+ curstr->nfields++;
+}
+
+
+char writer[] = "\
+/*\n\
+ * This file was generated by the mknodes program.\n\
+ */\n\
+\n";
+
+static void
+output(file)
+ char *file;
+{
+ FILE *hfile;
+ FILE *cfile;
+ FILE *patfile;
+ int i;
+ struct str *sp;
+ struct field *fp;
+ char *p;
+
+ if ((patfile = fopen(file, "r")) == NULL)
+ error("Can't open %s", file);
+ if ((hfile = fopen("nodes.h", "w")) == NULL)
+ error("Can't create nodes.h");
+ if ((cfile = fopen("nodes.c", "w")) == NULL)
+ error("Can't create nodes.c");
+ fputs(writer, hfile);
+ for (i = 0 ; i < ntypes ; i++)
+ fprintf(hfile, "#define %s %d\n", nodename[i], i);
+ fputs("\n\n\n", hfile);
+ for (sp = str ; sp < &str[nstr] ; sp++) {
+ fprintf(hfile, "struct %s {\n", sp->tag);
+ for (i = sp->nfields, fp = sp->field ; --i >= 0 ; fp++) {
+ fprintf(hfile, " %s;\n", fp->decl);
+ }
+ fputs("};\n\n\n", hfile);
+ }
+ fputs("union node {\n", hfile);
+ fprintf(hfile, " int type;\n");
+ for (sp = str ; sp < &str[nstr] ; sp++) {
+ fprintf(hfile, " struct %s %s;\n", sp->tag, sp->tag);
+ }
+ fputs("};\n\n\n", hfile);
+ fputs("struct nodelist {\n", hfile);
+ fputs("\tstruct nodelist *next;\n", hfile);
+ fputs("\tunion node *n;\n", hfile);
+ fputs("};\n\n\n", hfile);
+ fputs("#ifdef __STDC__\n", hfile);
+ fputs("union node *copyfunc(union node *);\n", hfile);
+ fputs("void freefunc(union node *);\n", hfile);
+ fputs("#else\n", hfile);
+ fputs("union node *copyfunc();\n", hfile);
+ fputs("void freefunc();\n", hfile);
+ fputs("#endif\n", hfile);
+
+ fputs(writer, cfile);
+ while (fgets(line, sizeof line, patfile) != NULL) {
+ for (p = line ; *p == ' ' || *p == '\t' ; p++);
+ if (strcmp(p, "%SIZES\n") == 0)
+ outsizes(cfile);
+ else if (strcmp(p, "%CALCSIZE\n") == 0)
+ outfunc(cfile, 1);
+ else if (strcmp(p, "%COPY\n") == 0)
+ outfunc(cfile, 0);
+ else
+ fputs(line, cfile);
+ }
+}
+
+
+
+static void
+outsizes(cfile)
+ FILE *cfile;
+{
+ int i;
+
+ fprintf(cfile, "static const short nodesize[%d] = {\n", ntypes);
+ for (i = 0 ; i < ntypes ; i++) {
+ fprintf(cfile, " ALIGN(sizeof (struct %s)),\n", nodestr[i]->tag);
+ }
+ fprintf(cfile, "};\n");
+}
+
+
+static void
+outfunc(cfile, calcsize)
+ FILE *cfile;
+ int calcsize;
+{
+ struct str *sp;
+ struct field *fp;
+ int i;
+
+ fputs(" if (n == NULL)\n", cfile);
+ if (calcsize)
+ fputs(" return;\n", cfile);
+ else
+ fputs(" return NULL;\n", cfile);
+ if (calcsize)
+ fputs(" funcblocksize += nodesize[n->type];\n", cfile);
+ else {
+ fputs(" new = funcblock;\n", cfile);
+ fputs(" funcblock = (char *) funcblock + nodesize[n->type];\n", cfile);
+ }
+ fputs(" switch (n->type) {\n", cfile);
+ for (sp = str ; sp < &str[nstr] ; sp++) {
+ for (i = 0 ; i < ntypes ; i++) {
+ if (nodestr[i] == sp)
+ fprintf(cfile, " case %s:\n", nodename[i]);
+ }
+ for (i = sp->nfields ; --i >= 1 ; ) {
+ fp = &sp->field[i];
+ switch (fp->type) {
+ case T_NODE:
+ if (calcsize) {
+ indent(12, cfile);
+ fprintf(cfile, "calcsize(n->%s.%s);\n",
+ sp->tag, fp->name);
+ } else {
+ indent(12, cfile);
+ fprintf(cfile, "new->%s.%s = copynode(n->%s.%s);\n",
+ sp->tag, fp->name, sp->tag, fp->name);
+ }
+ break;
+ case T_NODELIST:
+ if (calcsize) {
+ indent(12, cfile);
+ fprintf(cfile, "sizenodelist(n->%s.%s);\n",
+ sp->tag, fp->name);
+ } else {
+ indent(12, cfile);
+ fprintf(cfile, "new->%s.%s = copynodelist(n->%s.%s);\n",
+ sp->tag, fp->name, sp->tag, fp->name);
+ }
+ break;
+ case T_STRING:
+ if (calcsize) {
+ indent(12, cfile);
+ fprintf(cfile, "funcstringsize += strlen(n->%s.%s) + 1;\n",
+ sp->tag, fp->name);
+ } else {
+ indent(12, cfile);
+ fprintf(cfile, "new->%s.%s = nodesavestr(n->%s.%s);\n",
+ sp->tag, fp->name, sp->tag, fp->name);
+ }
+ break;
+ case T_INT:
+ case T_OTHER:
+ if (! calcsize) {
+ indent(12, cfile);
+ fprintf(cfile, "new->%s.%s = n->%s.%s;\n",
+ sp->tag, fp->name, sp->tag, fp->name);
+ }
+ break;
+ }
+ }
+ indent(12, cfile);
+ fputs("break;\n", cfile);
+ }
+ fputs(" };\n", cfile);
+ if (! calcsize)
+ fputs(" new->type = n->type;\n", cfile);
+}
+
+
+static void
+indent(amount, fp)
+ int amount;
+ FILE *fp;
+{
+ while (amount >= 8) {
+ putc('\t', fp);
+ amount -= 8;
+ }
+ while (--amount >= 0) {
+ putc(' ', fp);
+ }
+}
+
+
+static int
+nextfield(buf)
+ char *buf;
+{
+ char *p, *q;
+
+ p = linep;
+ while (*p == ' ' || *p == '\t')
+ p++;
+ q = buf;
+ while (*p != ' ' && *p != '\t' && *p != '\0')
+ *q++ = *p++;
+ *q = '\0';
+ linep = p;
+ return (q > buf);
+}
+
+
+static void
+skipbl()
+{
+ while (*linep == ' ' || *linep == '\t')
+ linep++;
+}
+
+
+static int
+readline()
+{
+ char *p;
+
+ if (fgets(line, 1024, infp) == NULL)
+ return 0;
+ for (p = line ; *p != '#' && *p != '\n' && *p != '\0' ; p++);
+ while (p > line && (p[-1] == ' ' || p[-1] == '\t'))
+ p--;
+ *p = '\0';
+ linep = line;
+ linno++;
+ if (p - line > BUFLEN)
+ error("Line too long");
+ return 1;
+}
+
+
+
+static void
+#ifdef __STDC__
+error(const char *msg, ...)
+#else
+error(va_alist)
+ va_dcl
+#endif
+{
+ va_list va;
+#ifdef __STDC__
+ va_start(va, msg);
+#else
+ char *msg;
+ va_start(va);
+ msg = va_arg(va, char *);
+#endif
+
+ (void) fprintf(stderr, "line %d: ", linno);
+ (void) vfprintf(stderr, msg, va);
+ (void) fputc('\n', stderr);
+
+ va_end(va);
+
+ exit(2);
+}
+
+
+
+static char *
+savestr(s)
+ const char *s;
+{
+ char *p;
+
+ if ((p = malloc(strlen(s) + 1)) == NULL)
+ error("Out of space");
+ (void) strcpy(p, s);
+ return p;
+}
diff --git a/release/picobsd/tinyware/ash/mksyntax.c b/release/picobsd/tinyware/ash/mksyntax.c
new file mode 100644
index 0000000..3030dda
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mksyntax.c
@@ -0,0 +1,407 @@
+/* $NetBSD: mksyntax.c,v 1.15 1997/07/05 21:25:09 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
+#endif /* not lint */
+
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: mksyntax.c,v 1.15 1997/07/05 21:25:09 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * This program creates syntax.h and syntax.c.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "parser.h"
+
+
+struct synclass {
+ char *name;
+ char *comment;
+};
+
+/* Syntax classes */
+struct synclass synclass[] = {
+ { "CWORD", "character is nothing special" },
+ { "CNL", "newline character" },
+ { "CBACK", "a backslash character" },
+ { "CSQUOTE", "single quote" },
+ { "CDQUOTE", "double quote" },
+ { "CENDQUOTE", "a terminating quote" },
+ { "CBQUOTE", "backwards single quote" },
+ { "CVAR", "a dollar sign" },
+ { "CENDVAR", "a '}' character" },
+ { "CLP", "a left paren in arithmetic" },
+ { "CRP", "a right paren in arithmetic" },
+ { "CEOF", "end of file" },
+ { "CCTL", "like CWORD, except it must be escaped" },
+ { "CSPCL", "these terminate a word" },
+ { NULL, NULL }
+};
+
+
+/*
+ * Syntax classes for is_ functions. Warning: if you add new classes
+ * you may have to change the definition of the is_in_name macro.
+ */
+struct synclass is_entry[] = {
+ { "ISDIGIT", "a digit" },
+ { "ISUPPER", "an upper case letter" },
+ { "ISLOWER", "a lower case letter" },
+ { "ISUNDER", "an underscore" },
+ { "ISSPECL", "the name of a special parameter" },
+ { NULL, NULL }
+};
+
+static char writer[] = "\
+/*\n\
+ * This file was generated by the mksyntax program.\n\
+ */\n\
+\n";
+
+
+static FILE *cfile;
+static FILE *hfile;
+static char *syntax[513];
+static int base;
+static int size; /* number of values which a char variable can have */
+static int nbits; /* number of bits in a character */
+static int digit_contig;/* true if digits are contiguous */
+
+static void filltable __P((char *));
+static void init __P((void));
+static void add __P((char *, char *));
+static void print __P((char *));
+static void output_type_macros __P((void));
+static void digit_convert __P((void));
+int main __P((int, char **));
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ char c;
+ char d;
+ int sign;
+ int i;
+ char buf[80];
+ int pos;
+ static char digit[] = "0123456789";
+
+ /* Create output files */
+ if ((cfile = fopen("syntax.c", "w")) == NULL) {
+ perror("syntax.c");
+ exit(2);
+ }
+ if ((hfile = fopen("syntax.h", "w")) == NULL) {
+ perror("syntax.h");
+ exit(2);
+ }
+ fputs(writer, hfile);
+ fputs(writer, cfile);
+
+ /* Determine the characteristics of chars. */
+ c = -1;
+ if (c <= 0)
+ sign = 1;
+ else
+ sign = 0;
+ for (nbits = 1 ; ; nbits++) {
+ d = (1 << nbits) - 1;
+ if (d == c)
+ break;
+ }
+ printf("%s %d bit chars\n", sign? "signed" : "unsigned", nbits);
+ if (nbits > 9) {
+ fputs("Characters can't have more than 9 bits\n", stderr);
+ exit(2);
+ }
+ size = (1 << nbits) + 1;
+ base = 1;
+ if (sign)
+ base += 1 << (nbits - 1);
+ digit_contig = 1;
+ for (i = 0 ; i < 10 ; i++) {
+ if (digit[i] != '0' + i)
+ digit_contig = 0;
+ }
+
+ fputs("#include <sys/cdefs.h>\n", hfile);
+ fputs("#include <ctype.h>\n", hfile);
+
+ /* Generate the #define statements in the header file */
+ fputs("/* Syntax classes */\n", hfile);
+ for (i = 0 ; synclass[i].name ; i++) {
+ sprintf(buf, "#define %s %d", synclass[i].name, i);
+ fputs(buf, hfile);
+ for (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
+ putc('\t', hfile);
+ fprintf(hfile, "/* %s */\n", synclass[i].comment);
+ }
+ putc('\n', hfile);
+ fputs("/* Syntax classes for is_ functions */\n", hfile);
+ for (i = 0 ; is_entry[i].name ; i++) {
+ sprintf(buf, "#define %s %#o", is_entry[i].name, 1 << i);
+ fputs(buf, hfile);
+ for (pos = strlen(buf) ; pos < 32 ; pos = (pos + 8) & ~07)
+ putc('\t', hfile);
+ fprintf(hfile, "/* %s */\n", is_entry[i].comment);
+ }
+ putc('\n', hfile);
+ fprintf(hfile, "#define SYNBASE %d\n", base);
+ fprintf(hfile, "#define PEOF %d\n\n", -base);
+ if (sign)
+ fprintf(hfile, "#define UPEOF %d\n\n", -base);
+ else
+ fprintf(hfile, "#define UPEOF ((unsigned char) %d)\n\n", -base);
+ putc('\n', hfile);
+ fputs("#define BASESYNTAX (basesyntax + SYNBASE)\n", hfile);
+ fputs("#define DQSYNTAX (dqsyntax + SYNBASE)\n", hfile);
+ fputs("#define SQSYNTAX (sqsyntax + SYNBASE)\n", hfile);
+ fputs("#define ARISYNTAX (arisyntax + SYNBASE)\n", hfile);
+ putc('\n', hfile);
+ output_type_macros(); /* is_digit, etc. */
+ putc('\n', hfile);
+
+ /* Generate the syntax tables. */
+ fputs("#include \"shell.h\"\n", cfile);
+ fputs("#include \"syntax.h\"\n\n", cfile);
+ init();
+ fputs("/* syntax table used when not in quotes */\n", cfile);
+ add("\n", "CNL");
+ add("\\", "CBACK");
+ add("'", "CSQUOTE");
+ add("\"", "CDQUOTE");
+ add("`", "CBQUOTE");
+ add("$", "CVAR");
+ add("}", "CENDVAR");
+ add("<>();&| \t", "CSPCL");
+ print("basesyntax");
+ init();
+ fputs("\n/* syntax table used when in double quotes */\n", cfile);
+ add("\n", "CNL");
+ add("\\", "CBACK");
+ add("\"", "CENDQUOTE");
+ add("`", "CBQUOTE");
+ add("$", "CVAR");
+ add("}", "CENDVAR");
+ /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */
+ add("!*?[=~:/-", "CCTL");
+ print("dqsyntax");
+ init();
+ fputs("\n/* syntax table used when in single quotes */\n", cfile);
+ add("\n", "CNL");
+ add("'", "CENDQUOTE");
+ /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */
+ add("!*?[=~:/-", "CCTL");
+ print("sqsyntax");
+ init();
+ fputs("\n/* syntax table used when in arithmetic */\n", cfile);
+ add("\n", "CNL");
+ add("\\", "CBACK");
+ add("`", "CBQUOTE");
+ add("'", "CSQUOTE");
+ add("\"", "CDQUOTE");
+ add("$", "CVAR");
+ add("}", "CENDVAR");
+ add("(", "CLP");
+ add(")", "CRP");
+ print("arisyntax");
+ filltable("0");
+ fputs("\n/* character classification table */\n", cfile);
+ add("0123456789", "ISDIGIT");
+ add("abcdefghijklmnopqrstucvwxyz", "ISLOWER");
+ add("ABCDEFGHIJKLMNOPQRSTUCVWXYZ", "ISUPPER");
+ add("_", "ISUNDER");
+ add("#?$!-*@", "ISSPECL");
+ print("is_type");
+ if (! digit_contig)
+ digit_convert();
+ exit(0);
+}
+
+
+
+/*
+ * Clear the syntax table.
+ */
+
+static void
+filltable(dftval)
+ char *dftval;
+{
+ int i;
+
+ for (i = 0 ; i < size ; i++)
+ syntax[i] = dftval;
+}
+
+
+/*
+ * Initialize the syntax table with default values.
+ */
+
+static void
+init()
+{
+ filltable("CWORD");
+ syntax[0] = "CEOF";
+ syntax[base + CTLESC] = "CCTL";
+ syntax[base + CTLVAR] = "CCTL";
+ syntax[base + CTLENDVAR] = "CCTL";
+ syntax[base + CTLBACKQ] = "CCTL";
+ syntax[base + CTLBACKQ + CTLQUOTE] = "CCTL";
+ syntax[base + CTLARI] = "CCTL";
+ syntax[base + CTLENDARI] = "CCTL";
+}
+
+
+/*
+ * Add entries to the syntax table.
+ */
+
+static void
+add(p, type)
+ char *p, *type;
+{
+ while (*p)
+ syntax[*p++ + base] = type;
+}
+
+
+
+/*
+ * Output the syntax table.
+ */
+
+static void
+print(name)
+ char *name;
+{
+ int i;
+ int col;
+
+ fprintf(hfile, "extern const char %s[];\n", name);
+ fprintf(cfile, "const char %s[%d] = {\n", name, size);
+ col = 0;
+ for (i = 0 ; i < size ; i++) {
+ if (i == 0) {
+ fputs(" ", cfile);
+ } else if ((i & 03) == 0) {
+ fputs(",\n ", cfile);
+ col = 0;
+ } else {
+ putc(',', cfile);
+ while (++col < 9 * (i & 03))
+ putc(' ', cfile);
+ }
+ fputs(syntax[i], cfile);
+ col += strlen(syntax[i]);
+ }
+ fputs("\n};\n", cfile);
+}
+
+
+
+/*
+ * Output character classification macros (e.g. is_digit). If digits are
+ * contiguous, we can test for them quickly.
+ */
+
+static char *macro[] = {
+ "#define is_digit(c)\t((is_type+SYNBASE)[c] & ISDIGIT)",
+ "#define is_alpha(c)\t((c) != UPEOF && ((c) < CTLESC || (c) > CTLENDARI) && isalpha((unsigned char) (c)))",
+ "#define is_name(c)\t((c) != UPEOF && ((c) < CTLESC || (c) > CTLENDARI) && ((c) == '_' || isalpha((unsigned char) (c))))",
+ "#define is_in_name(c)\t((c) != UPEOF && ((c) < CTLESC || (c) > CTLENDARI) && ((c) == '_' || isalnum((unsigned char) (c))))",
+ "#define is_special(c)\t((is_type+SYNBASE)[c] & (ISSPECL|ISDIGIT))",
+ NULL
+};
+
+static void
+output_type_macros()
+{
+ char **pp;
+
+ if (digit_contig)
+ macro[0] = "#define is_digit(c)\t((unsigned)((c) - '0') <= 9)";
+ for (pp = macro ; *pp ; pp++)
+ fprintf(hfile, "%s\n", *pp);
+ if (digit_contig)
+ fputs("#define digit_val(c)\t((c) - '0')\n", hfile);
+ else
+ fputs("#define digit_val(c)\t(digit_value[c])\n", hfile);
+}
+
+
+
+/*
+ * Output digit conversion table (if digits are not contiguous).
+ */
+
+static void
+digit_convert()
+{
+ int maxdigit;
+ static char digit[] = "0123456789";
+ char *p;
+ int i;
+
+ maxdigit = 0;
+ for (p = digit ; *p ; p++)
+ if (*p > maxdigit)
+ maxdigit = *p;
+ fputs("extern const char digit_value[];\n", hfile);
+ fputs("\n\nconst char digit_value[] = {\n", cfile);
+ for (i = 0 ; i <= maxdigit ; i++) {
+ for (p = digit ; *p && *p != i ; p++);
+ if (*p == '\0')
+ p = digit;
+ fprintf(cfile, " %d,\n", p - digit);
+ }
+ fputs("};\n", cfile);
+}
diff --git a/release/picobsd/tinyware/ash/mktokens b/release/picobsd/tinyware/ash/mktokens
new file mode 100644
index 0000000..b7c9e19
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mktokens
@@ -0,0 +1,95 @@
+#!/bin/sh -
+# $NetBSD: mktokens,v 1.8 1996/10/16 14:47:49 christos Exp $
+#
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)mktokens 8.1 (Berkeley) 5/31/93
+
+# The following is a list of tokens. The second column is nonzero if the
+# token marks the end of a list. The third column is the name to print in
+# error messages.
+
+cat > /tmp/ka$$ <<\!
+TEOF 1 end of file
+TNL 0 newline
+TSEMI 0 ";"
+TBACKGND 0 "&"
+TAND 0 "&&"
+TOR 0 "||"
+TPIPE 0 "|"
+TLP 0 "("
+TRP 1 ")"
+TENDCASE 1 ";;"
+TENDBQUOTE 1 "`"
+TREDIR 0 redirection
+TWORD 0 word
+TIF 0 "if"
+TTHEN 1 "then"
+TELSE 1 "else"
+TELIF 1 "elif"
+TFI 1 "fi"
+TWHILE 0 "while"
+TUNTIL 0 "until"
+TFOR 0 "for"
+TDO 1 "do"
+TDONE 1 "done"
+TBEGIN 0 "{"
+TEND 1 "}"
+TCASE 0 "case"
+TESAC 1 "esac"
+TNOT 0 "!"
+!
+nl=`wc -l /tmp/ka$$`
+exec > token.h
+awk '{print "#define " $1 " " NR-1}' /tmp/ka$$
+echo '
+/* Array indicating which tokens mark the end of a list */
+const char tokendlist[] = {'
+awk '{print "\t" $2 ","}' /tmp/ka$$
+echo '};
+
+char *const tokname[] = {'
+sed -e 's/"/\\"/g' \
+ -e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \
+ /tmp/ka$$
+echo '};
+'
+sed 's/"//g' /tmp/ka$$ | awk '
+/TIF/{print "#define KWDOFFSET " NR-1; print ""; print "char *const parsekwd[] = {"}
+/TIF/,/neverfound/{print " \"" $3 "\","}'
+echo ' 0
+};'
+
+rm /tmp/ka$$
diff --git a/release/picobsd/tinyware/ash/myhistedit.h b/release/picobsd/tinyware/ash/myhistedit.h
new file mode 100644
index 0000000..257b4a2
--- /dev/null
+++ b/release/picobsd/tinyware/ash/myhistedit.h
@@ -0,0 +1,50 @@
+/* $NetBSD: myhistedit.h,v 1.6 1997/04/11 22:45:40 christos Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#)myhistedit.h 8.2 (Berkeley) 5/4/95
+ */
+
+#include <histedit.h>
+
+extern History *hist;
+extern EditLine *el;
+extern int displayhist;
+
+void histedit __P((void));
+void sethistsize __P((const char *));
+void setterm __P((const char *));
+int histcmd __P((int, char **));
+int not_fcnumber __P((char *));
+int str_to_event __P((char *, int));
+
diff --git a/release/picobsd/tinyware/ash/mystring.c b/release/picobsd/tinyware/ash/mystring.c
new file mode 100644
index 0000000..2ca62bd
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mystring.c
@@ -0,0 +1,144 @@
+/* $NetBSD: mystring.c,v 1.13 1997/07/04 21:02:15 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)mystring.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: mystring.c,v 1.13 1997/07/04 21:02:15 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * String functions.
+ *
+ * equal(s1, s2) Return true if strings are equal.
+ * scopy(from, to) Copy a string.
+ * scopyn(from, to, n) Like scopy, but checks for overflow.
+ * number(s) Convert a string of digits to an integer.
+ * is_number(s) Return true if s is a string of digits.
+ */
+
+#include <stdlib.h>
+#include "shell.h"
+#include "syntax.h"
+#include "error.h"
+#include "mystring.h"
+
+
+char nullstr[1]; /* zero length string */
+
+/*
+ * equal - #defined in mystring.h
+ */
+
+/*
+ * scopy - #defined in mystring.h
+ */
+
+
+/*
+ * scopyn - copy a string from "from" to "to", truncating the string
+ * if necessary. "To" is always nul terminated, even if
+ * truncation is performed. "Size" is the size of "to".
+ */
+
+void
+scopyn(from, to, size)
+ char const *from;
+ char *to;
+ int size;
+ {
+
+ while (--size > 0) {
+ if ((*to++ = *from++) == '\0')
+ return;
+ }
+ *to = '\0';
+}
+
+
+/*
+ * prefix -- see if pfx is a prefix of string.
+ */
+
+int
+prefix(pfx, string)
+ char const *pfx;
+ char const *string;
+ {
+ while (*pfx) {
+ if (*pfx++ != *string++)
+ return 0;
+ }
+ return 1;
+}
+
+
+/*
+ * Convert a string of digits to an integer, printing an error message on
+ * failure.
+ */
+
+int
+number(s)
+ const char *s;
+ {
+
+ if (! is_number(s))
+ error("Illegal number: %s", (char *)s);
+ return atoi(s);
+}
+
+
+
+/*
+ * Check for a valid number. This should be elsewhere.
+ */
+
+int
+is_number(p)
+ const char *p;
+ {
+ do {
+ if (! is_digit(*p))
+ return 0;
+ } while (*++p != '\0');
+ return 1;
+}
diff --git a/release/picobsd/tinyware/ash/mystring.h b/release/picobsd/tinyware/ash/mystring.h
new file mode 100644
index 0000000..50e6741
--- /dev/null
+++ b/release/picobsd/tinyware/ash/mystring.h
@@ -0,0 +1,49 @@
+/* $NetBSD: mystring.h,v 1.9 1995/05/11 21:29:42 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)mystring.h 8.2 (Berkeley) 5/4/95
+ */
+
+#include <string.h>
+
+void scopyn __P((const char *, char *, int));
+int prefix __P((const char *, const char *));
+int number __P((const char *));
+int is_number __P((const char *));
+
+#define equal(s1, s2) (strcmp(s1, s2) == 0)
+#define scopy(s1, s2) ((void)strcpy(s2, s1))
diff --git a/release/picobsd/tinyware/ash/nodes.c.pat b/release/picobsd/tinyware/ash/nodes.c.pat
new file mode 100644
index 0000000..3b6c875
--- /dev/null
+++ b/release/picobsd/tinyware/ash/nodes.c.pat
@@ -0,0 +1,169 @@
+/* $NetBSD: nodes.c.pat,v 1.8 1997/04/11 23:03:09 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)nodes.c.pat 8.2 (Berkeley) 5/4/95
+ */
+
+#include <stdlib.h>
+/*
+ * Routine for dealing with parsed shell commands.
+ */
+
+#include "shell.h"
+#include "nodes.h"
+#include "memalloc.h"
+#include "machdep.h"
+#include "mystring.h"
+
+
+int funcblocksize; /* size of structures in function */
+int funcstringsize; /* size of strings in node */
+pointer funcblock; /* block to allocate function from */
+char *funcstring; /* block to allocate strings from */
+
+%SIZES
+
+
+STATIC void calcsize __P((union node *));
+STATIC void sizenodelist __P((struct nodelist *));
+STATIC union node *copynode __P((union node *));
+STATIC struct nodelist *copynodelist __P((struct nodelist *));
+STATIC char *nodesavestr __P((char *));
+
+
+
+/*
+ * Make a copy of a parse tree.
+ */
+
+union node *
+copyfunc(n)
+ union node *n;
+{
+ if (n == NULL)
+ return NULL;
+ funcblocksize = 0;
+ funcstringsize = 0;
+ calcsize(n);
+ funcblock = ckmalloc(funcblocksize + funcstringsize);
+ funcstring = (char *) funcblock + funcblocksize;
+ return copynode(n);
+}
+
+
+
+STATIC void
+calcsize(n)
+ union node *n;
+{
+ %CALCSIZE
+}
+
+
+
+STATIC void
+sizenodelist(lp)
+ struct nodelist *lp;
+{
+ while (lp) {
+ funcblocksize += ALIGN(sizeof(struct nodelist));
+ calcsize(lp->n);
+ lp = lp->next;
+ }
+}
+
+
+
+STATIC union node *
+copynode(n)
+ union node *n;
+{
+ union node *new;
+
+ %COPY
+ return new;
+}
+
+
+STATIC struct nodelist *
+copynodelist(lp)
+ struct nodelist *lp;
+{
+ struct nodelist *start;
+ struct nodelist **lpp;
+
+ lpp = &start;
+ while (lp) {
+ *lpp = funcblock;
+ funcblock = (char *) funcblock + ALIGN(sizeof(struct nodelist));
+ (*lpp)->n = copynode(lp->n);
+ lp = lp->next;
+ lpp = &(*lpp)->next;
+ }
+ *lpp = NULL;
+ return start;
+}
+
+
+
+STATIC char *
+nodesavestr(s)
+ char *s;
+{
+ register char *p = s;
+ register char *q = funcstring;
+ char *rtn = funcstring;
+
+ while ((*q++ = *p++) != '\0')
+ continue;
+ funcstring = q;
+ return rtn;
+}
+
+
+
+/*
+ * Free a parse tree.
+ */
+
+void
+freefunc(n)
+ union node *n;
+{
+ if (n)
+ ckfree(n);
+}
diff --git a/release/picobsd/tinyware/ash/nodetypes b/release/picobsd/tinyware/ash/nodetypes
new file mode 100644
index 0000000..cab5e02
--- /dev/null
+++ b/release/picobsd/tinyware/ash/nodetypes
@@ -0,0 +1,145 @@
+# $NetBSD: nodetypes,v 1.8 1995/05/11 21:29:44 christos Exp $
+# Copyright (c) 1991, 1993
+# The Regents of the University of California. All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Kenneth Almquist.
+#
+# 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.
+#
+# @(#)nodetypes 8.2 (Berkeley) 5/4/95
+
+# This file describes the nodes used in parse trees. Unindented lines
+# contain a node type followed by a structure tag. Subsequent indented
+# lines specify the fields of the structure. Several node types can share
+# the same structure, in which case the fields of the structure should be
+# specified only once.
+#
+# A field of a structure is described by the name of the field followed
+# by a type. The currently implemented types are:
+# nodeptr - a pointer to a node
+# nodelist - a pointer to a list of nodes
+# string - a pointer to a nul terminated string
+# int - an integer
+# other - any type that can be copied by assignment
+# temp - a field that doesn't have to be copied when the node is copied
+# The last two types should be followed by the text of a C declaration for
+# the field.
+
+NSEMI nbinary # two commands separated by a semicolon
+ type int
+ ch1 nodeptr # the first child
+ ch2 nodeptr # the second child
+
+NCMD ncmd # a simple command
+ type int
+ backgnd int # set to run command in background
+ args nodeptr # the arguments
+ redirect nodeptr # list of file redirections
+
+NPIPE npipe # a pipeline
+ type int
+ backgnd int # set to run pipeline in background
+ cmdlist nodelist # the commands in the pipeline
+
+NREDIR nredir # redirection (of a compex command)
+ type int
+ n nodeptr # the command
+ redirect nodeptr # list of file redirections
+
+NBACKGND nredir # run command in background
+NSUBSHELL nredir # run command in a subshell
+
+NAND nbinary # the && operator
+NOR nbinary # the || operator
+
+NIF nif # the if statement. Elif clauses are handled
+ type int # using multiple if nodes.
+ test nodeptr # if test
+ ifpart nodeptr # then ifpart
+ elsepart nodeptr # else elsepart
+
+NWHILE nbinary # the while statement. First child is the test
+NUNTIL nbinary # the until statement
+
+NFOR nfor # the for statement
+ type int
+ args nodeptr # for var in args
+ body nodeptr # do body; done
+ var string # the for variable
+
+NCASE ncase # a case statement
+ type int
+ expr nodeptr # the word to switch on
+ cases nodeptr # the list of cases (NCLIST nodes)
+
+NCLIST nclist # a case
+ type int
+ next nodeptr # the next case in list
+ pattern nodeptr # list of patterns for this case
+ body nodeptr # code to execute for this case
+
+
+NDEFUN narg # define a function. The "next" field contains
+ # the body of the function.
+
+NARG narg # represents a word
+ type int
+ next nodeptr # next word in list
+ text string # the text of the word
+ backquote nodelist # list of commands in back quotes
+
+NTO nfile # fd> fname
+NFROM nfile # fd< fname
+NAPPEND nfile # fd>> fname
+ type int
+ next nodeptr # next redirection in list
+ fd int # file descriptor being redirected
+ fname nodeptr # file name, in a NARG node
+ expfname temp char *expfname # actual file name
+
+NTOFD ndup # fd<&dupfd
+NFROMFD ndup # fd>&dupfd
+ type int
+ next nodeptr # next redirection in list
+ fd int # file descriptor being redirected
+ dupfd int # file descriptor to duplicate
+ vname nodeptr # file name if fd>&$var
+
+
+NHERE nhere # fd<<\!
+NXHERE nhere # fd<<!
+ type int
+ next nodeptr # next redirection in list
+ fd int # file descriptor being redirected
+ doc nodeptr # input to command (NARG node)
+
+NNOT nnot # ! command (actually pipeline)
+ type int
+ com nodeptr
diff --git a/release/picobsd/tinyware/ash/options.c b/release/picobsd/tinyware/ash/options.c
new file mode 100644
index 0000000..30acc3c
--- /dev/null
+++ b/release/picobsd/tinyware/ash/options.c
@@ -0,0 +1,541 @@
+/* $NetBSD: options.c,v 1.25 1997/07/04 21:02:16 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: options.c,v 1.25 1997/07/04 21:02:16 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "shell.h"
+#define DEFINE_OPTIONS
+#include "options.h"
+#undef DEFINE_OPTIONS
+#include "nodes.h" /* for other header files */
+#include "eval.h"
+#include "jobs.h"
+#include "input.h"
+#include "output.h"
+#include "trap.h"
+#include "var.h"
+#include "memalloc.h"
+#include "error.h"
+#include "mystring.h"
+#ifndef SMALL
+#include "myhistedit.h"
+#endif
+
+char *arg0; /* value of $0 */
+struct shparam shellparam; /* current positional parameters */
+char **argptr; /* argument list for builtin commands */
+char *optarg; /* set by nextopt (like getopt) */
+char *optptr; /* used by nextopt */
+
+char *minusc; /* argument to -c option */
+
+
+STATIC void options __P((int));
+STATIC void minus_o __P((char *, int));
+STATIC void setoption __P((int, int));
+STATIC int getopts __P((char *, char *, char **, char ***, char **));
+
+
+/*
+ * Process the shell command line arguments.
+ */
+
+void
+procargs(argc, argv)
+ int argc;
+ char **argv;
+{
+ int i;
+
+ argptr = argv;
+ if (argc > 0)
+ argptr++;
+ for (i = 0; i < NOPTS; i++)
+ optlist[i].val = 2;
+ options(1);
+ if (*argptr == NULL && minusc == NULL)
+ sflag = 1;
+ if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1))
+ iflag = 1;
+ if (mflag == 2)
+ mflag = iflag;
+ for (i = 0; i < NOPTS; i++)
+ if (optlist[i].val == 2)
+ optlist[i].val = 0;
+ arg0 = argv[0];
+ if (sflag == 0 && minusc == NULL) {
+ commandname = arg0 = *argptr++;
+ setinputfile(commandname, 0);
+ }
+ /* POSIX 1003.2: first arg after -c cmd is $0, remainder $1... */
+ if (argptr && minusc && *argptr)
+ arg0 = *argptr++;
+
+ shellparam.p = argptr;
+ shellparam.reset = 1;
+ /* assert(shellparam.malloc == 0 && shellparam.nparam == 0); */
+ while (*argptr) {
+ shellparam.nparam++;
+ argptr++;
+ }
+ optschanged();
+}
+
+
+void
+optschanged()
+{
+ setinteractive(iflag);
+#ifndef SMALL
+ histedit();
+#endif
+ setjobctl(mflag);
+}
+
+/*
+ * Process shell options. The global variable argptr contains a pointer
+ * to the argument list; we advance it past the options.
+ */
+
+STATIC void
+options(cmdline)
+ int cmdline;
+{
+ char *p;
+ int val;
+ int c;
+
+ if (cmdline)
+ minusc = NULL;
+ while ((p = *argptr) != NULL) {
+ argptr++;
+ if ((c = *p++) == '-') {
+ val = 1;
+ if (p[0] == '\0' || (p[0] == '-' && p[1] == '\0')) {
+ if (!cmdline) {
+ /* "-" means turn off -x and -v */
+ if (p[0] == '\0')
+ xflag = vflag = 0;
+ /* "--" means reset params */
+ else if (*argptr == NULL)
+ setparam(argptr);
+ }
+ break; /* "-" or "--" terminates options */
+ }
+ } else if (c == '+') {
+ val = 0;
+ } else {
+ argptr--;
+ break;
+ }
+ while ((c = *p++) != '\0') {
+ if (c == 'c' && cmdline) {
+ char *q;
+#ifdef NOHACK /* removing this code allows sh -ce 'foo' for compat */
+ if (*p == '\0')
+#endif
+ q = *argptr++;
+ if (q == NULL || minusc != NULL)
+ error("Bad -c option");
+ minusc = q;
+#ifdef NOHACK
+ break;
+#endif
+ } else if (c == 'o') {
+ minus_o(*argptr, val);
+ if (*argptr)
+ argptr++;
+ } else {
+ setoption(c, val);
+ }
+ }
+ }
+}
+
+STATIC void
+minus_o(name, val)
+ char *name;
+ int val;
+{
+ int i;
+
+ if (name == NULL) {
+ out1str("Current option settings\n");
+ for (i = 0; i < NOPTS; i++)
+ out1fmt("%-16s%s\n", optlist[i].name,
+ optlist[i].val ? "on" : "off");
+ } else {
+ for (i = 0; i < NOPTS; i++)
+ if (equal(name, optlist[i].name)) {
+ setoption(optlist[i].letter, val);
+ return;
+ }
+ error("Illegal option -o %s", name);
+ }
+}
+
+
+STATIC void
+setoption(flag, val)
+ char flag;
+ int val;
+ {
+ int i;
+
+ for (i = 0; i < NOPTS; i++)
+ if (optlist[i].letter == flag) {
+ optlist[i].val = val;
+ if (val) {
+ /* #%$ hack for ksh semantics */
+ if (flag == 'V')
+ Eflag = 0;
+ else if (flag == 'E')
+ Vflag = 0;
+ }
+ return;
+ }
+ error("Illegal option -%c", flag);
+}
+
+
+
+#ifdef mkinit
+INCLUDE "options.h"
+
+SHELLPROC {
+ int i;
+
+ for (i = 0; i < NOPTS; i++)
+ optlist[i].val = 0;
+ optschanged();
+
+}
+#endif
+
+
+/*
+ * Set the shell parameters.
+ */
+
+void
+setparam(argv)
+ char **argv;
+ {
+ char **newparam;
+ char **ap;
+ int nparam;
+
+ for (nparam = 0 ; argv[nparam] ; nparam++);
+ ap = newparam = ckmalloc((nparam + 1) * sizeof *ap);
+ while (*argv) {
+ *ap++ = savestr(*argv++);
+ }
+ *ap = NULL;
+ freeparam(&shellparam);
+ shellparam.malloc = 1;
+ shellparam.nparam = nparam;
+ shellparam.p = newparam;
+ shellparam.optnext = NULL;
+}
+
+
+/*
+ * Free the list of positional parameters.
+ */
+
+void
+freeparam(param)
+ struct shparam *param;
+ {
+ char **ap;
+
+ if (param->malloc) {
+ for (ap = param->p ; *ap ; ap++)
+ ckfree(*ap);
+ ckfree(param->p);
+ }
+}
+
+
+
+/*
+ * The shift builtin command.
+ */
+
+int
+shiftcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ int n;
+ char **ap1, **ap2;
+
+ n = 1;
+ if (argc > 1)
+ n = number(argv[1]);
+ if (n > shellparam.nparam)
+ error("can't shift that many");
+ INTOFF;
+ shellparam.nparam -= n;
+ for (ap1 = shellparam.p ; --n >= 0 ; ap1++) {
+ if (shellparam.malloc)
+ ckfree(*ap1);
+ }
+ ap2 = shellparam.p;
+ while ((*ap2++ = *ap1++) != NULL);
+ shellparam.optnext = NULL;
+ INTON;
+ return 0;
+}
+
+
+
+/*
+ * The set command builtin.
+ */
+
+int
+setcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ if (argc == 1)
+ return showvarscmd(argc, argv);
+ INTOFF;
+ options(0);
+ optschanged();
+ if (*argptr != NULL) {
+ setparam(argptr);
+ }
+ INTON;
+ return 0;
+}
+
+
+void
+getoptsreset(value)
+ const char *value;
+{
+ if (number(value) == 1) {
+ shellparam.optnext = NULL;
+ shellparam.reset = 1;
+ }
+}
+
+/*
+ * The getopts builtin. Shellparam.optnext points to the next argument
+ * to be processed. Shellparam.optptr points to the next character to
+ * be processed in the current argument. If shellparam.optnext is NULL,
+ * then it's the first time getopts has been called.
+ */
+
+int
+getoptscmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char **optbase;
+
+ if (argc < 3)
+ error("Usage: getopts optstring var [arg]");
+ else if (argc == 3)
+ optbase = shellparam.p;
+ else
+ optbase = &argv[3];
+
+ if (shellparam.reset == 1) {
+ shellparam.optnext = optbase;
+ shellparam.optptr = NULL;
+ shellparam.reset = 0;
+ }
+
+ return getopts(argv[1], argv[2], optbase, &shellparam.optnext,
+ &shellparam.optptr);
+}
+
+STATIC int
+getopts(optstr, optvar, optfirst, optnext, optptr)
+ char *optstr;
+ char *optvar;
+ char **optfirst;
+ char ***optnext;
+ char **optptr;
+{
+ char *p, *q;
+ char c = '?';
+ int done = 0;
+ int ind = 0;
+ int err = 0;
+ char s[10];
+
+ if ((p = *optptr) == NULL || *p == '\0') {
+ /* Current word is done, advance */
+ if (*optnext == NULL)
+ return 1;
+ p = **optnext;
+ if (p == NULL || *p != '-' || *++p == '\0') {
+atend:
+ ind = *optnext - optfirst + 1;
+ *optnext = NULL;
+ p = NULL;
+ done = 1;
+ goto out;
+ }
+ (*optnext)++;
+ if (p[0] == '-' && p[1] == '\0') /* check for "--" */
+ goto atend;
+ }
+
+ c = *p++;
+ for (q = optstr; *q != c; ) {
+ if (*q == '\0') {
+ if (optstr[0] == ':') {
+ s[0] = c;
+ s[1] = '\0';
+ err |= setvarsafe("OPTARG", s, 0);
+ }
+ else {
+ out1fmt("Illegal option -%c\n", c);
+ (void) unsetvar("OPTARG");
+ }
+ c = '?';
+ goto bad;
+ }
+ if (*++q == ':')
+ q++;
+ }
+
+ if (*++q == ':') {
+ if (*p == '\0' && (p = **optnext) == NULL) {
+ if (optstr[0] == ':') {
+ s[0] = c;
+ s[1] = '\0';
+ err |= setvarsafe("OPTARG", s, 0);
+ c = ':';
+ }
+ else {
+ out1fmt("No arg for -%c option\n", c);
+ (void) unsetvar("OPTARG");
+ c = '?';
+ }
+ goto bad;
+ }
+
+ if (p == **optnext)
+ (*optnext)++;
+ setvarsafe("OPTARG", p, 0);
+ p = NULL;
+ }
+ else
+ setvarsafe("OPTARG", "", 0);
+ ind = *optnext - optfirst + 1;
+ goto out;
+
+bad:
+ ind = 1;
+ *optnext = NULL;
+ p = NULL;
+out:
+ *optptr = p;
+ fmtstr(s, sizeof(s), "%d", ind);
+ err |= setvarsafe("OPTIND", s, VNOFUNC);
+ s[0] = c;
+ s[1] = '\0';
+ err |= setvarsafe(optvar, s, 0);
+ if (err) {
+ *optnext = NULL;
+ *optptr = NULL;
+ flushall();
+ exraise(EXERROR);
+ }
+ return done;
+}
+
+/*
+ * XXX - should get rid of. have all builtins use getopt(3). the
+ * library getopt must have the BSD extension static variable "optreset"
+ * otherwise it can't be used within the shell safely.
+ *
+ * Standard option processing (a la getopt) for builtin routines. The
+ * only argument that is passed to nextopt is the option string; the
+ * other arguments are unnecessary. It return the character, or '\0' on
+ * end of input.
+ */
+
+int
+nextopt(optstring)
+ char *optstring;
+ {
+ char *p, *q;
+ char c;
+
+ if ((p = optptr) == NULL || *p == '\0') {
+ p = *argptr;
+ if (p == NULL || *p != '-' || *++p == '\0')
+ return '\0';
+ argptr++;
+ if (p[0] == '-' && p[1] == '\0') /* check for "--" */
+ return '\0';
+ }
+ c = *p++;
+ for (q = optstring ; *q != c ; ) {
+ if (*q == '\0')
+ error("Illegal option -%c", c);
+ if (*++q == ':')
+ q++;
+ }
+ if (*++q == ':') {
+ if (*p == '\0' && (p = *argptr++) == NULL)
+ error("No arg for -%c option", c);
+ optarg = p;
+ p = NULL;
+ }
+ optptr = p;
+ return c;
+}
diff --git a/release/picobsd/tinyware/ash/options.h b/release/picobsd/tinyware/ash/options.h
new file mode 100644
index 0000000..5651b8e
--- /dev/null
+++ b/release/picobsd/tinyware/ash/options.h
@@ -0,0 +1,114 @@
+/* $NetBSD: options.h,v 1.11 1996/11/06 01:17:12 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)options.h 8.2 (Berkeley) 5/4/95
+ */
+
+struct shparam {
+ int nparam; /* # of positional parameters (without $0) */
+ unsigned char malloc; /* if parameter list dynamically allocated */
+ unsigned char reset; /* if getopts has been reset */
+ char **p; /* parameter list */
+ char **optnext; /* next parameter to be processed by getopts */
+ char *optptr; /* used by getopts */
+};
+
+
+
+#define eflag optlist[0].val
+#define fflag optlist[1].val
+#define Iflag optlist[2].val
+#define iflag optlist[3].val
+#define mflag optlist[4].val
+#define nflag optlist[5].val
+#define sflag optlist[6].val
+#define xflag optlist[7].val
+#define vflag optlist[8].val
+#define Vflag optlist[9].val
+#define Eflag optlist[10].val
+#define Cflag optlist[11].val
+#define aflag optlist[12].val
+#define bflag optlist[13].val
+#define uflag optlist[14].val
+
+#define NOPTS 15
+
+struct optent {
+ const char *name;
+ const char letter;
+ char val;
+};
+
+#ifdef DEFINE_OPTIONS
+struct optent optlist[NOPTS] = {
+ { "errexit", 'e', 0 },
+ { "noglob", 'f', 0 },
+ { "ignoreeof", 'I', 0 },
+ { "interactive",'i', 0 },
+ { "monitor", 'm', 0 },
+ { "noexec", 'n', 0 },
+ { "stdin", 's', 0 },
+ { "xtrace", 'x', 0 },
+ { "verbose", 'v', 0 },
+ { "vi", 'V', 0 },
+ { "emacs", 'E', 0 },
+ { "noclobber", 'C', 0 },
+ { "allexport", 'a', 0 },
+ { "notify", 'b', 0 },
+ { "nounset", 'u', 0 },
+};
+#else
+extern struct optent optlist[NOPTS];
+#endif
+
+
+extern char *minusc; /* argument to -c option */
+extern char *arg0; /* $0 */
+extern struct shparam shellparam; /* $@ */
+extern char **argptr; /* argument list for builtin commands */
+extern char *optarg; /* set by nextopt */
+extern char *optptr; /* used by nextopt */
+
+void procargs __P((int, char **));
+void optschanged __P((void));
+void setparam __P((char **));
+void freeparam __P((struct shparam *));
+int shiftcmd __P((int, char **));
+int setcmd __P((int, char **));
+int getoptscmd __P((int, char **));
+int nextopt __P((char *));
+void getoptsreset __P((const char *));
diff --git a/release/picobsd/tinyware/ash/output.c b/release/picobsd/tinyware/ash/output.c
new file mode 100644
index 0000000..f390a2d
--- /dev/null
+++ b/release/picobsd/tinyware/ash/output.c
@@ -0,0 +1,584 @@
+/* $NetBSD: output.c,v 1.19 1997/07/04 21:02:18 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)output.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: output.c,v 1.19 1997/07/04 21:02:18 christos Exp $");
+#endif
+#endif /* not lint */
+
+/*
+ * Shell output routines. We use our own output routines because:
+ * When a builtin command is interrupted we have to discard
+ * any pending output.
+ * When a builtin command appears in back quotes, we want to
+ * save the output of the command in a region obtained
+ * via malloc, rather than doing a fork and reading the
+ * output of the command via a pipe.
+ * Our output routines may be smaller than the stdio routines.
+ */
+
+#include <sys/types.h> /* quad_t */
+#include <sys/ioctl.h>
+
+#include <stdio.h> /* defines BUFSIZ */
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "shell.h"
+#include "syntax.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+
+
+#define OUTBUFSIZ BUFSIZ
+#define BLOCK_OUT -2 /* output to a fixed block of memory */
+#define MEM_OUT -3 /* output to dynamically allocated memory */
+#define OUTPUT_ERR 01 /* error occurred on output */
+
+
+struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
+struct output errout = {NULL, 0, NULL, 100, 2, 0};
+struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
+struct output *out1 = &output;
+struct output *out2 = &errout;
+
+
+
+#ifdef mkinit
+
+INCLUDE "output.h"
+INCLUDE "memalloc.h"
+
+RESET {
+ out1 = &output;
+ out2 = &errout;
+ if (memout.buf != NULL) {
+ ckfree(memout.buf);
+ memout.buf = NULL;
+ }
+}
+
+#endif
+
+
+#ifdef notdef /* no longer used */
+/*
+ * Set up an output file to write to memory rather than a file.
+ */
+
+void
+open_mem(block, length, file)
+ char *block;
+ int length;
+ struct output *file;
+ {
+ file->nextc = block;
+ file->nleft = --length;
+ file->fd = BLOCK_OUT;
+ file->flags = 0;
+}
+#endif
+
+
+void
+out1str(p)
+ const char *p;
+ {
+ outstr(p, out1);
+}
+
+
+void
+out2str(p)
+ const char *p;
+ {
+ outstr(p, out2);
+}
+
+
+void
+outstr(p, file)
+ const char *p;
+ struct output *file;
+ {
+ while (*p)
+ outc(*p++, file);
+ if (file == out2)
+ flushout(file);
+}
+
+
+char out_junk[16];
+
+
+void
+emptyoutbuf(dest)
+ struct output *dest;
+ {
+ int offset;
+
+ if (dest->fd == BLOCK_OUT) {
+ dest->nextc = out_junk;
+ dest->nleft = sizeof out_junk;
+ dest->flags |= OUTPUT_ERR;
+ } else if (dest->buf == NULL) {
+ INTOFF;
+ dest->buf = ckmalloc(dest->bufsize);
+ dest->nextc = dest->buf;
+ dest->nleft = dest->bufsize;
+ INTON;
+ } else if (dest->fd == MEM_OUT) {
+ offset = dest->bufsize;
+ INTOFF;
+ dest->bufsize <<= 1;
+ dest->buf = ckrealloc(dest->buf, dest->bufsize);
+ dest->nleft = dest->bufsize - offset;
+ dest->nextc = dest->buf + offset;
+ INTON;
+ } else {
+ flushout(dest);
+ }
+ dest->nleft--;
+}
+
+
+void
+flushall() {
+ flushout(&output);
+ flushout(&errout);
+}
+
+
+void
+flushout(dest)
+ struct output *dest;
+ {
+
+ if (dest->buf == NULL || dest->nextc == dest->buf || dest->fd < 0)
+ return;
+ if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
+ dest->flags |= OUTPUT_ERR;
+ dest->nextc = dest->buf;
+ dest->nleft = dest->bufsize;
+}
+
+
+void
+freestdout() {
+ INTOFF;
+ if (output.buf) {
+ ckfree(output.buf);
+ output.buf = NULL;
+ output.nleft = 0;
+ }
+ INTON;
+}
+
+
+#ifdef __STDC__
+void
+outfmt(struct output *file, char *fmt, ...) {
+ va_list ap;
+
+ va_start(ap, fmt);
+ doformat(file, fmt, ap);
+ va_end(ap);
+}
+
+
+void
+out1fmt(char *fmt, ...) {
+ va_list ap;
+
+ va_start(ap, fmt);
+ doformat(out1, fmt, ap);
+ va_end(ap);
+}
+
+void
+dprintf(char *fmt, ...) {
+ va_list ap;
+
+ va_start(ap, fmt);
+ doformat(out2, fmt, ap);
+ va_end(ap);
+ flushout(out2);
+}
+
+void
+fmtstr(char *outbuf, int length, char *fmt, ...) {
+ va_list ap;
+ struct output strout;
+
+ va_start(ap, fmt);
+ strout.nextc = outbuf;
+ strout.nleft = length;
+ strout.fd = BLOCK_OUT;
+ strout.flags = 0;
+ doformat(&strout, fmt, ap);
+ outc('\0', &strout);
+ if (strout.flags & OUTPUT_ERR)
+ outbuf[length - 1] = '\0';
+}
+
+#else /* not __STDC__ */
+
+void
+outfmt(va_alist)
+ va_dcl
+ {
+ va_list ap;
+ struct output *file;
+ char *fmt;
+
+ va_start(ap);
+ file = va_arg(ap, struct output *);
+ fmt = va_arg(ap, char *);
+ doformat(file, fmt, ap);
+ va_end(ap);
+}
+
+
+void
+out1fmt(va_alist)
+ va_dcl
+ {
+ va_list ap;
+ char *fmt;
+
+ va_start(ap);
+ fmt = va_arg(ap, char *);
+ doformat(out1, fmt, ap);
+ va_end(ap);
+}
+
+void
+dprintf(va_alist)
+ va_dcl
+ {
+ va_list ap;
+ char *fmt;
+
+ va_start(ap);
+ fmt = va_arg(ap, char *);
+ doformat(out2, fmt, ap);
+ va_end(ap);
+ flushout(out2);
+}
+
+void
+fmtstr(va_alist)
+ va_dcl
+ {
+ va_list ap;
+ struct output strout;
+ char *outbuf;
+ int length;
+ char *fmt;
+
+ va_start(ap);
+ outbuf = va_arg(ap, char *);
+ length = va_arg(ap, int);
+ fmt = va_arg(ap, char *);
+ strout.nextc = outbuf;
+ strout.nleft = length;
+ strout.fd = BLOCK_OUT;
+ strout.flags = 0;
+ doformat(&strout, fmt, ap);
+ outc('\0', &strout);
+ if (strout.flags & OUTPUT_ERR)
+ outbuf[length - 1] = '\0';
+}
+#endif /* __STDC__ */
+
+
+/*
+ * Formatted output. This routine handles a subset of the printf formats:
+ * - Formats supported: d, u, o, X, s, and c.
+ * - The x format is also accepted but is treated like X.
+ * - The l and q modifiers are accepted.
+ * - The - and # flags are accepted; # only works with the o format.
+ * - Width and precision may be specified with any format except c.
+ * - An * may be given for the width or precision.
+ * - The obsolete practice of preceding the width with a zero to get
+ * zero padding is not supported; use the precision field.
+ * - A % may be printed by writing %% in the format string.
+ */
+
+#define TEMPSIZE 24
+
+static const char digit[] = "0123456789ABCDEF";
+
+
+void
+doformat(dest, f, ap)
+ struct output *dest;
+ char *f; /* format string */
+ va_list ap;
+ {
+ char c;
+ char temp[TEMPSIZE];
+ int flushleft;
+ int sharp;
+ int width;
+ int prec;
+ int islong;
+ int isquad;
+ char *p;
+ int sign;
+#ifdef BSD4_4
+ quad_t l;
+ u_quad_t num;
+#else
+ long l;
+ u_long num;
+#endif
+ unsigned base;
+ int len;
+ int size;
+ int pad;
+
+ while ((c = *f++) != '\0') {
+ if (c != '%') {
+ outc(c, dest);
+ continue;
+ }
+ flushleft = 0;
+ sharp = 0;
+ width = 0;
+ prec = -1;
+ islong = 0;
+ isquad = 0;
+ for (;;) {
+ if (*f == '-')
+ flushleft++;
+ else if (*f == '#')
+ sharp++;
+ else
+ break;
+ f++;
+ }
+ if (*f == '*') {
+ width = va_arg(ap, int);
+ f++;
+ } else {
+ while (is_digit(*f)) {
+ width = 10 * width + digit_val(*f++);
+ }
+ }
+ if (*f == '.') {
+ if (*++f == '*') {
+ prec = va_arg(ap, int);
+ f++;
+ } else {
+ prec = 0;
+ while (is_digit(*f)) {
+ prec = 10 * prec + digit_val(*f++);
+ }
+ }
+ }
+ if (*f == 'l') {
+ islong++;
+ f++;
+ } else if (*f == 'q') {
+ isquad++;
+ f++;
+ }
+ switch (*f) {
+ case 'd':
+#ifdef BSD4_4
+ if (isquad)
+ l = va_arg(ap, quad_t);
+ else
+#endif
+ if (islong)
+ l = va_arg(ap, long);
+ else
+ l = va_arg(ap, int);
+ sign = 0;
+ num = l;
+ if (l < 0) {
+ num = -l;
+ sign = 1;
+ }
+ base = 10;
+ goto number;
+ case 'u':
+ base = 10;
+ goto uns_number;
+ case 'o':
+ base = 8;
+ goto uns_number;
+ case 'x':
+ /* we don't implement 'x'; treat like 'X' */
+ case 'X':
+ base = 16;
+uns_number: /* an unsigned number */
+ sign = 0;
+#ifdef BSD4_4
+ if (isquad)
+ num = va_arg(ap, u_quad_t);
+ else
+#endif
+ if (islong)
+ num = va_arg(ap, unsigned long);
+ else
+ num = va_arg(ap, unsigned int);
+number: /* process a number */
+ p = temp + TEMPSIZE - 1;
+ *p = '\0';
+ while (num) {
+ *--p = digit[num % base];
+ num /= base;
+ }
+ len = (temp + TEMPSIZE - 1) - p;
+ if (prec < 0)
+ prec = 1;
+ if (sharp && *f == 'o' && prec <= len)
+ prec = len + 1;
+ pad = 0;
+ if (width) {
+ size = len;
+ if (size < prec)
+ size = prec;
+ size += sign;
+ pad = width - size;
+ if (flushleft == 0) {
+ while (--pad >= 0)
+ outc(' ', dest);
+ }
+ }
+ if (sign)
+ outc('-', dest);
+ prec -= len;
+ while (--prec >= 0)
+ outc('0', dest);
+ while (*p)
+ outc(*p++, dest);
+ while (--pad >= 0)
+ outc(' ', dest);
+ break;
+ case 's':
+ p = va_arg(ap, char *);
+ pad = 0;
+ if (width) {
+ len = strlen(p);
+ if (prec >= 0 && len > prec)
+ len = prec;
+ pad = width - len;
+ if (flushleft == 0) {
+ while (--pad >= 0)
+ outc(' ', dest);
+ }
+ }
+ prec++;
+ while (--prec != 0 && *p)
+ outc(*p++, dest);
+ while (--pad >= 0)
+ outc(' ', dest);
+ break;
+ case 'c':
+ c = va_arg(ap, int);
+ outc(c, dest);
+ break;
+ default:
+ outc(*f, dest);
+ break;
+ }
+ f++;
+ }
+}
+
+
+
+/*
+ * Version of write which resumes after a signal is caught.
+ */
+
+int
+xwrite(fd, buf, nbytes)
+ int fd;
+ char *buf;
+ int nbytes;
+ {
+ int ntry;
+ int i;
+ int n;
+
+ n = nbytes;
+ ntry = 0;
+ for (;;) {
+ i = write(fd, buf, n);
+ if (i > 0) {
+ if ((n -= i) <= 0)
+ return nbytes;
+ buf += i;
+ ntry = 0;
+ } else if (i == 0) {
+ if (++ntry > 10)
+ return nbytes - n;
+ } else if (errno != EINTR) {
+ return -1;
+ }
+ }
+}
+
+
+/*
+ * Version of ioctl that retries after a signal is caught.
+ * XXX unused function
+ */
+
+int
+xioctl(fd, request, arg)
+ int fd;
+ unsigned long request;
+ char * arg;
+{
+ int i;
+
+ while ((i = ioctl(fd, request, arg)) == -1 && errno == EINTR);
+ return i;
+}
diff --git a/release/picobsd/tinyware/ash/output.h b/release/picobsd/tinyware/ash/output.h
new file mode 100644
index 0000000..44e7b3d
--- /dev/null
+++ b/release/picobsd/tinyware/ash/output.h
@@ -0,0 +1,85 @@
+/* $NetBSD: output.h,v 1.13 1997/04/11 23:08:40 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)output.h 8.2 (Berkeley) 5/4/95
+ */
+
+#ifndef OUTPUT_INCL
+
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+struct output {
+ char *nextc;
+ int nleft;
+ char *buf;
+ int bufsize;
+ short fd;
+ short flags;
+};
+
+extern struct output output;
+extern struct output errout;
+extern struct output memout;
+extern struct output *out1;
+extern struct output *out2;
+
+void open_mem __P((char *, int, struct output *));
+void out1str __P((const char *));
+void out2str __P((const char *));
+void outstr __P((const char *, struct output *));
+void emptyoutbuf __P((struct output *));
+void flushall __P((void));
+void flushout __P((struct output *));
+void freestdout __P((void));
+void outfmt __P((struct output *, char *, ...));
+void out1fmt __P((char *, ...));
+void dprintf __P((char *, ...));
+void fmtstr __P((char *, int, char *, ...));
+void doformat __P((struct output *, char *, va_list));
+int xwrite __P((int, char *, int));
+int xioctl __P((int, unsigned long, char *));
+
+#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
+#define out1c(c) outc(c, out1);
+#define out2c(c) outc(c, out2);
+
+#define OUTPUT_INCL
+#endif
diff --git a/release/picobsd/tinyware/ash/parser.c b/release/picobsd/tinyware/ash/parser.c
new file mode 100644
index 0000000..4727f0f
--- /dev/null
+++ b/release/picobsd/tinyware/ash/parser.c
@@ -0,0 +1,1542 @@
+/* $NetBSD: parser.c,v 1.36 1997/07/04 21:02:19 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
+#else
+__RCSID("$NetBSD: parser.c,v 1.36 1997/07/04 21:02:19 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <stdlib.h>
+
+#include "shell.h"
+#include "parser.h"
+#include "nodes.h"
+#include "expand.h" /* defines rmescapes() */
+#include "redir.h" /* defines copyfd() */
+#include "syntax.h"
+#include "options.h"
+#include "input.h"
+#include "output.h"
+#include "var.h"
+#include "error.h"
+#include "memalloc.h"
+#include "mystring.h"
+#include "alias.h"
+#include "show.h"
+#ifndef SMALL
+#include "myhistedit.h"
+#endif
+
+/*
+ * Shell command parser.
+ */
+
+#define EOFMARKLEN 79
+
+/* values returned by readtoken */
+#include "token.h"
+
+
+
+struct heredoc {
+ struct heredoc *next; /* next here document in list */
+ union node *here; /* redirection node */
+ char *eofmark; /* string indicating end of input */
+ int striptabs; /* if set, strip leading tabs */
+};
+
+
+
+struct heredoc *heredoclist; /* list of here documents to read */
+int parsebackquote; /* nonzero if we are inside backquotes */
+int doprompt; /* if set, prompt the user */
+int needprompt; /* true if interactive and at start of line */
+int lasttoken; /* last token read */
+MKINIT int tokpushback; /* last token pushed back */
+char *wordtext; /* text of last word returned by readtoken */
+MKINIT int checkkwd; /* 1 == check for kwds, 2 == also eat newlines */
+struct nodelist *backquotelist;
+union node *redirnode;
+struct heredoc *heredoc;
+int quoteflag; /* set if (part of) last token was quoted */
+int startlinno; /* line # where last token started */
+
+
+#define GDB_HACK 1 /* avoid local declarations which gdb can't handle */
+#ifdef GDB_HACK
+static const char argvars[5] = {CTLVAR, VSNORMAL|VSQUOTE, '@', '=', '\0'};
+static const char types[] = "}-+?=";
+#endif
+
+
+STATIC union node *list __P((int));
+STATIC union node *andor __P((void));
+STATIC union node *pipeline __P((void));
+STATIC union node *command __P((void));
+STATIC union node *simplecmd __P((union node **, union node *));
+STATIC union node *makename __P((void));
+STATIC void parsefname __P((void));
+STATIC void parseheredoc __P((void));
+STATIC int peektoken __P((void));
+STATIC int readtoken __P((void));
+STATIC int xxreadtoken __P((void));
+STATIC int readtoken1 __P((int, char const *, char *, int));
+STATIC int noexpand __P((char *));
+STATIC void synexpect __P((int));
+STATIC void synerror __P((char *));
+STATIC void setprompt __P((int));
+
+
+/*
+ * Read and parse a command. Returns NEOF on end of file. (NULL is a
+ * valid parse tree indicating a blank line.)
+ */
+
+union node *
+parsecmd(interact)
+ int interact;
+{
+ int t;
+
+ doprompt = interact;
+ if (doprompt)
+ setprompt(1);
+ else
+ setprompt(0);
+ needprompt = 0;
+ t = readtoken();
+ if (t == TEOF)
+ return NEOF;
+ if (t == TNL)
+ return NULL;
+ tokpushback++;
+ return list(1);
+}
+
+
+STATIC union node *
+list(nlflag)
+ int nlflag;
+{
+ union node *n1, *n2, *n3;
+ int tok;
+
+ checkkwd = 2;
+ if (nlflag == 0 && tokendlist[peektoken()])
+ return NULL;
+ n1 = NULL;
+ for (;;) {
+ n2 = andor();
+ tok = readtoken();
+ if (tok == TBACKGND) {
+ if (n2->type == NCMD || n2->type == NPIPE) {
+ n2->ncmd.backgnd = 1;
+ } else if (n2->type == NREDIR) {
+ n2->type = NBACKGND;
+ } else {
+ n3 = (union node *)stalloc(sizeof (struct nredir));
+ n3->type = NBACKGND;
+ n3->nredir.n = n2;
+ n3->nredir.redirect = NULL;
+ n2 = n3;
+ }
+ }
+ if (n1 == NULL) {
+ n1 = n2;
+ }
+ else {
+ n3 = (union node *)stalloc(sizeof (struct nbinary));
+ n3->type = NSEMI;
+ n3->nbinary.ch1 = n1;
+ n3->nbinary.ch2 = n2;
+ n1 = n3;
+ }
+ switch (tok) {
+ case TBACKGND:
+ case TSEMI:
+ tok = readtoken();
+ /* fall through */
+ case TNL:
+ if (tok == TNL) {
+ parseheredoc();
+ if (nlflag)
+ return n1;
+ } else {
+ tokpushback++;
+ }
+ checkkwd = 2;
+ if (tokendlist[peektoken()])
+ return n1;
+ break;
+ case TEOF:
+ if (heredoclist)
+ parseheredoc();
+ else
+ pungetc(); /* push back EOF on input */
+ return n1;
+ default:
+ if (nlflag)
+ synexpect(-1);
+ tokpushback++;
+ return n1;
+ }
+ }
+}
+
+
+
+STATIC union node *
+andor() {
+ union node *n1, *n2, *n3;
+ int t;
+
+ n1 = pipeline();
+ for (;;) {
+ if ((t = readtoken()) == TAND) {
+ t = NAND;
+ } else if (t == TOR) {
+ t = NOR;
+ } else {
+ tokpushback++;
+ return n1;
+ }
+ n2 = pipeline();
+ n3 = (union node *)stalloc(sizeof (struct nbinary));
+ n3->type = t;
+ n3->nbinary.ch1 = n1;
+ n3->nbinary.ch2 = n2;
+ n1 = n3;
+ }
+}
+
+
+
+STATIC union node *
+pipeline() {
+ union node *n1, *pipenode;
+ struct nodelist *lp, *prev;
+
+ TRACE(("pipeline: entered\n"));
+ n1 = command();
+ if (readtoken() == TPIPE) {
+ pipenode = (union node *)stalloc(sizeof (struct npipe));
+ pipenode->type = NPIPE;
+ pipenode->npipe.backgnd = 0;
+ lp = (struct nodelist *)stalloc(sizeof (struct nodelist));
+ pipenode->npipe.cmdlist = lp;
+ lp->n = n1;
+ do {
+ prev = lp;
+ lp = (struct nodelist *)stalloc(sizeof (struct nodelist));
+ lp->n = command();
+ prev->next = lp;
+ } while (readtoken() == TPIPE);
+ lp->next = NULL;
+ n1 = pipenode;
+ }
+ tokpushback++;
+ return n1;
+}
+
+
+
+STATIC union node *
+command() {
+ union node *n1, *n2;
+ union node *ap, **app;
+ union node *cp, **cpp;
+ union node *redir, **rpp;
+ int t, negate = 0;
+
+ checkkwd = 2;
+ redir = NULL;
+ n1 = NULL;
+ rpp = &redir;
+
+ /* Check for redirection which may precede command */
+ while (readtoken() == TREDIR) {
+ *rpp = n2 = redirnode;
+ rpp = &n2->nfile.next;
+ parsefname();
+ }
+ tokpushback++;
+
+ while (readtoken() == TNOT) {
+ TRACE(("command: TNOT recognized\n"));
+ negate = !negate;
+ }
+ tokpushback++;
+
+ switch (readtoken()) {
+ case TIF:
+ n1 = (union node *)stalloc(sizeof (struct nif));
+ n1->type = NIF;
+ n1->nif.test = list(0);
+ if (readtoken() != TTHEN)
+ synexpect(TTHEN);
+ n1->nif.ifpart = list(0);
+ n2 = n1;
+ while (readtoken() == TELIF) {
+ n2->nif.elsepart = (union node *)stalloc(sizeof (struct nif));
+ n2 = n2->nif.elsepart;
+ n2->type = NIF;
+ n2->nif.test = list(0);
+ if (readtoken() != TTHEN)
+ synexpect(TTHEN);
+ n2->nif.ifpart = list(0);
+ }
+ if (lasttoken == TELSE)
+ n2->nif.elsepart = list(0);
+ else {
+ n2->nif.elsepart = NULL;
+ tokpushback++;
+ }
+ if (readtoken() != TFI)
+ synexpect(TFI);
+ checkkwd = 1;
+ break;
+ case TWHILE:
+ case TUNTIL: {
+ int got;
+ n1 = (union node *)stalloc(sizeof (struct nbinary));
+ n1->type = (lasttoken == TWHILE)? NWHILE : NUNTIL;
+ n1->nbinary.ch1 = list(0);
+ if ((got=readtoken()) != TDO) {
+TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
+ synexpect(TDO);
+ }
+ n1->nbinary.ch2 = list(0);
+ if (readtoken() != TDONE)
+ synexpect(TDONE);
+ checkkwd = 1;
+ break;
+ }
+ case TFOR:
+ if (readtoken() != TWORD || quoteflag || ! goodname(wordtext))
+ synerror("Bad for loop variable");
+ n1 = (union node *)stalloc(sizeof (struct nfor));
+ n1->type = NFOR;
+ n1->nfor.var = wordtext;
+ if (readtoken() == TWORD && ! quoteflag && equal(wordtext, "in")) {
+ app = &ap;
+ while (readtoken() == TWORD) {
+ n2 = (union node *)stalloc(sizeof (struct narg));
+ n2->type = NARG;
+ n2->narg.text = wordtext;
+ n2->narg.backquote = backquotelist;
+ *app = n2;
+ app = &n2->narg.next;
+ }
+ *app = NULL;
+ n1->nfor.args = ap;
+ if (lasttoken != TNL && lasttoken != TSEMI)
+ synexpect(-1);
+ } else {
+#ifndef GDB_HACK
+ static const char argvars[5] = {CTLVAR, VSNORMAL|VSQUOTE,
+ '@', '=', '\0'};
+#endif
+ n2 = (union node *)stalloc(sizeof (struct narg));
+ n2->type = NARG;
+ n2->narg.text = (char *)argvars;
+ n2->narg.backquote = NULL;
+ n2->narg.next = NULL;
+ n1->nfor.args = n2;
+ /*
+ * Newline or semicolon here is optional (but note
+ * that the original Bourne shell only allowed NL).
+ */
+ if (lasttoken != TNL && lasttoken != TSEMI)
+ tokpushback++;
+ }
+ checkkwd = 2;
+ if ((t = readtoken()) == TDO)
+ t = TDONE;
+ else if (t == TBEGIN)
+ t = TEND;
+ else
+ synexpect(-1);
+ n1->nfor.body = list(0);
+ if (readtoken() != t)
+ synexpect(t);
+ checkkwd = 1;
+ break;
+ case TCASE:
+ n1 = (union node *)stalloc(sizeof (struct ncase));
+ n1->type = NCASE;
+ if (readtoken() != TWORD)
+ synexpect(TWORD);
+ n1->ncase.expr = n2 = (union node *)stalloc(sizeof (struct narg));
+ n2->type = NARG;
+ n2->narg.text = wordtext;
+ n2->narg.backquote = backquotelist;
+ n2->narg.next = NULL;
+ while (readtoken() == TNL);
+ if (lasttoken != TWORD || ! equal(wordtext, "in"))
+ synerror("expecting \"in\"");
+ cpp = &n1->ncase.cases;
+ checkkwd = 2, readtoken();
+ do {
+ *cpp = cp = (union node *)stalloc(sizeof (struct nclist));
+ cp->type = NCLIST;
+ app = &cp->nclist.pattern;
+ for (;;) {
+ *app = ap = (union node *)stalloc(sizeof (struct narg));
+ ap->type = NARG;
+ ap->narg.text = wordtext;
+ ap->narg.backquote = backquotelist;
+ if (checkkwd = 2, readtoken() != TPIPE)
+ break;
+ app = &ap->narg.next;
+ readtoken();
+ }
+ ap->narg.next = NULL;
+ if (lasttoken != TRP)
+ synexpect(TRP);
+ cp->nclist.body = list(0);
+
+ checkkwd = 2;
+ if ((t = readtoken()) != TESAC) {
+ if (t != TENDCASE)
+ synexpect(TENDCASE);
+ else
+ checkkwd = 2, readtoken();
+ }
+ cpp = &cp->nclist.next;
+ } while(lasttoken != TESAC);
+ *cpp = NULL;
+ checkkwd = 1;
+ break;
+ case TLP:
+ n1 = (union node *)stalloc(sizeof (struct nredir));
+ n1->type = NSUBSHELL;
+ n1->nredir.n = list(0);
+ n1->nredir.redirect = NULL;
+ if (readtoken() != TRP)
+ synexpect(TRP);
+ checkkwd = 1;
+ break;
+ case TBEGIN:
+ n1 = list(0);
+ if (readtoken() != TEND)
+ synexpect(TEND);
+ checkkwd = 1;
+ break;
+ /* Handle an empty command like other simple commands. */
+ case TSEMI:
+ /*
+ * An empty command before a ; doesn't make much sense, and
+ * should certainly be disallowed in the case of `if ;'.
+ */
+ if (!redir)
+ synexpect(-1);
+ case TAND:
+ case TOR:
+ case TNL:
+ case TEOF:
+ case TWORD:
+ case TRP:
+ tokpushback++;
+ n1 = simplecmd(rpp, redir);
+ goto checkneg;
+ default:
+ synexpect(-1);
+ }
+
+ /* Now check for redirection which may follow command */
+ while (readtoken() == TREDIR) {
+ *rpp = n2 = redirnode;
+ rpp = &n2->nfile.next;
+ parsefname();
+ }
+ tokpushback++;
+ *rpp = NULL;
+ if (redir) {
+ if (n1->type != NSUBSHELL) {
+ n2 = (union node *)stalloc(sizeof (struct nredir));
+ n2->type = NREDIR;
+ n2->nredir.n = n1;
+ n1 = n2;
+ }
+ n1->nredir.redirect = redir;
+ }
+
+checkneg:
+ if (negate) {
+ n2 = (union node *)stalloc(sizeof (struct nnot));
+ n2->type = NNOT;
+ n2->nnot.com = n1;
+ return n2;
+ }
+ else
+ return n1;
+}
+
+
+STATIC union node *
+simplecmd(rpp, redir)
+ union node **rpp, *redir;
+ {
+ union node *args, **app;
+ union node **orig_rpp = rpp;
+ union node *n = NULL, *n2;
+ int negate = 0;
+
+ /* If we don't have any redirections already, then we must reset */
+ /* rpp to be the address of the local redir variable. */
+ if (redir == 0)
+ rpp = &redir;
+
+ args = NULL;
+ app = &args;
+ /*
+ * We save the incoming value, because we need this for shell
+ * functions. There can not be a redirect or an argument between
+ * the function name and the open parenthesis.
+ */
+ orig_rpp = rpp;
+
+ while (readtoken() == TNOT) {
+ TRACE(("command: TNOT recognized\n"));
+ negate = !negate;
+ }
+ tokpushback++;
+
+ for (;;) {
+ if (readtoken() == TWORD) {
+ n = (union node *)stalloc(sizeof (struct narg));
+ n->type = NARG;
+ n->narg.text = wordtext;
+ n->narg.backquote = backquotelist;
+ *app = n;
+ app = &n->narg.next;
+ } else if (lasttoken == TREDIR) {
+ *rpp = n = redirnode;
+ rpp = &n->nfile.next;
+ parsefname(); /* read name of redirection file */
+ } else if (lasttoken == TLP && app == &args->narg.next
+ && rpp == orig_rpp) {
+ /* We have a function */
+ if (readtoken() != TRP)
+ synexpect(TRP);
+#ifdef notdef
+ if (! goodname(n->narg.text))
+ synerror("Bad function name");
+#endif
+ n->type = NDEFUN;
+ n->narg.next = command();
+ goto checkneg;
+ } else {
+ tokpushback++;
+ break;
+ }
+ }
+ *app = NULL;
+ *rpp = NULL;
+ n = (union node *)stalloc(sizeof (struct ncmd));
+ n->type = NCMD;
+ n->ncmd.backgnd = 0;
+ n->ncmd.args = args;
+ n->ncmd.redirect = redir;
+
+checkneg:
+ if (negate) {
+ n2 = (union node *)stalloc(sizeof (struct nnot));
+ n2->type = NNOT;
+ n2->nnot.com = n;
+ return n2;
+ }
+ else
+ return n;
+}
+
+STATIC union node *
+makename() {
+ union node *n;
+
+ n = (union node *)stalloc(sizeof (struct narg));
+ n->type = NARG;
+ n->narg.next = NULL;
+ n->narg.text = wordtext;
+ n->narg.backquote = backquotelist;
+ return n;
+}
+
+void fixredir(n, text, err)
+ union node *n;
+ const char *text;
+ int err;
+ {
+ TRACE(("Fix redir %s %d\n", text, err));
+ if (!err)
+ n->ndup.vname = NULL;
+
+ if (is_digit(text[0]) && text[1] == '\0')
+ n->ndup.dupfd = digit_val(text[0]);
+ else if (text[0] == '-' && text[1] == '\0')
+ n->ndup.dupfd = -1;
+ else {
+
+ if (err)
+ synerror("Bad fd number");
+ else
+ n->ndup.vname = makename();
+ }
+}
+
+
+STATIC void
+parsefname() {
+ union node *n = redirnode;
+
+ if (readtoken() != TWORD)
+ synexpect(-1);
+ if (n->type == NHERE) {
+ struct heredoc *here = heredoc;
+ struct heredoc *p;
+ int i;
+
+ if (quoteflag == 0)
+ n->type = NXHERE;
+ TRACE(("Here document %d\n", n->type));
+ if (here->striptabs) {
+ while (*wordtext == '\t')
+ wordtext++;
+ }
+ if (! noexpand(wordtext) || (i = strlen(wordtext)) == 0 || i > EOFMARKLEN)
+ synerror("Illegal eof marker for << redirection");
+ rmescapes(wordtext);
+ here->eofmark = wordtext;
+ here->next = NULL;
+ if (heredoclist == NULL)
+ heredoclist = here;
+ else {
+ for (p = heredoclist ; p->next ; p = p->next);
+ p->next = here;
+ }
+ } else if (n->type == NTOFD || n->type == NFROMFD) {
+ fixredir(n, wordtext, 0);
+ } else {
+ n->nfile.fname = makename();
+ }
+}
+
+
+/*
+ * Input any here documents.
+ */
+
+STATIC void
+parseheredoc() {
+ struct heredoc *here;
+ union node *n;
+
+ while (heredoclist) {
+ here = heredoclist;
+ heredoclist = here->next;
+ if (needprompt) {
+ setprompt(2);
+ needprompt = 0;
+ }
+ readtoken1(pgetc(), here->here->type == NHERE? SQSYNTAX : DQSYNTAX,
+ here->eofmark, here->striptabs);
+ n = (union node *)stalloc(sizeof (struct narg));
+ n->narg.type = NARG;
+ n->narg.next = NULL;
+ n->narg.text = wordtext;
+ n->narg.backquote = backquotelist;
+ here->here->nhere.doc = n;
+ }
+}
+
+STATIC int
+peektoken() {
+ int t;
+
+ t = readtoken();
+ tokpushback++;
+ return (t);
+}
+
+STATIC int
+readtoken() {
+ int t;
+ int savecheckkwd = checkkwd;
+ struct alias *ap;
+#ifdef DEBUG
+ int alreadyseen = tokpushback;
+#endif
+
+ top:
+ t = xxreadtoken();
+
+ if (checkkwd) {
+ /*
+ * eat newlines
+ */
+ if (checkkwd == 2) {
+ checkkwd = 0;
+ while (t == TNL) {
+ parseheredoc();
+ t = xxreadtoken();
+ }
+ } else
+ checkkwd = 0;
+ /*
+ * check for keywords and aliases
+ */
+ if (t == TWORD && !quoteflag)
+ {
+ char * const *pp;
+
+ for (pp = (char **)parsekwd; *pp; pp++) {
+ if (**pp == *wordtext && equal(*pp, wordtext))
+ {
+ lasttoken = t = pp - parsekwd + KWDOFFSET;
+ TRACE(("keyword %s recognized\n", tokname[t]));
+ goto out;
+ }
+ }
+ if ((ap = lookupalias(wordtext, 1)) != NULL) {
+ pushstring(ap->val, strlen(ap->val), ap);
+ checkkwd = savecheckkwd;
+ goto top;
+ }
+ }
+out:
+ checkkwd = (t == TNOT) ? savecheckkwd : 0;
+ }
+#ifdef DEBUG
+ if (!alreadyseen)
+ TRACE(("token %s %s\n", tokname[t], t == TWORD ? wordtext : ""));
+ else
+ TRACE(("reread token %s %s\n", tokname[t], t == TWORD ? wordtext : ""));
+#endif
+ return (t);
+}
+
+
+/*
+ * Read the next input token.
+ * If the token is a word, we set backquotelist to the list of cmds in
+ * backquotes. We set quoteflag to true if any part of the word was
+ * quoted.
+ * If the token is TREDIR, then we set redirnode to a structure containing
+ * the redirection.
+ * In all cases, the variable startlinno is set to the number of the line
+ * on which the token starts.
+ *
+ * [Change comment: here documents and internal procedures]
+ * [Readtoken shouldn't have any arguments. Perhaps we should make the
+ * word parsing code into a separate routine. In this case, readtoken
+ * doesn't need to have any internal procedures, but parseword does.
+ * We could also make parseoperator in essence the main routine, and
+ * have parseword (readtoken1?) handle both words and redirection.]
+ */
+
+#define RETURN(token) return lasttoken = token
+
+STATIC int
+xxreadtoken() {
+ int c;
+
+ if (tokpushback) {
+ tokpushback = 0;
+ return lasttoken;
+ }
+ if (needprompt) {
+ setprompt(2);
+ needprompt = 0;
+ }
+ startlinno = plinno;
+ for (;;) { /* until token or start of word found */
+ c = pgetc_macro();
+ if (c == ' ' || c == '\t')
+ continue; /* quick check for white space first */
+ switch (c) {
+ case ' ': case '\t':
+ continue;
+ case '#':
+ while ((c = pgetc()) != '\n' && c != PEOF);
+ pungetc();
+ continue;
+ case '\\':
+ if (pgetc() == '\n') {
+ startlinno = ++plinno;
+ if (doprompt)
+ setprompt(2);
+ else
+ setprompt(0);
+ continue;
+ }
+ pungetc();
+ goto breakloop;
+ case '\n':
+ plinno++;
+ needprompt = doprompt;
+ RETURN(TNL);
+ case PEOF:
+ RETURN(TEOF);
+ case '&':
+ if (pgetc() == '&')
+ RETURN(TAND);
+ pungetc();
+ RETURN(TBACKGND);
+ case '|':
+ if (pgetc() == '|')
+ RETURN(TOR);
+ pungetc();
+ RETURN(TPIPE);
+ case ';':
+ if (pgetc() == ';')
+ RETURN(TENDCASE);
+ pungetc();
+ RETURN(TSEMI);
+ case '(':
+ RETURN(TLP);
+ case ')':
+ RETURN(TRP);
+ default:
+ goto breakloop;
+ }
+ }
+breakloop:
+ return readtoken1(c, BASESYNTAX, (char *)NULL, 0);
+#undef RETURN
+}
+
+
+
+/*
+ * If eofmark is NULL, read a word or a redirection symbol. If eofmark
+ * is not NULL, read a here document. In the latter case, eofmark is the
+ * word which marks the end of the document and striptabs is true if
+ * leading tabs should be stripped from the document. The argument firstc
+ * is the first character of the input token or document.
+ *
+ * Because C does not have internal subroutines, I have simulated them
+ * using goto's to implement the subroutine linkage. The following macros
+ * will run code that appears at the end of readtoken1.
+ */
+
+#define CHECKEND() {goto checkend; checkend_return:;}
+#define PARSEREDIR() {goto parseredir; parseredir_return:;}
+#define PARSESUB() {goto parsesub; parsesub_return:;}
+#define PARSEBACKQOLD() {oldstyle = 1; goto parsebackq; parsebackq_oldreturn:;}
+#define PARSEBACKQNEW() {oldstyle = 0; goto parsebackq; parsebackq_newreturn:;}
+#define PARSEARITH() {goto parsearith; parsearith_return:;}
+
+STATIC int
+readtoken1(firstc, syntax, eofmark, striptabs)
+ int firstc;
+ char const *syntax;
+ char *eofmark;
+ int striptabs;
+ {
+ int c = firstc;
+ char *out;
+ int len;
+ char line[EOFMARKLEN + 1];
+ struct nodelist *bqlist;
+ int quotef;
+ int dblquote;
+ int varnest; /* levels of variables expansion */
+ int arinest; /* levels of arithmetic expansion */
+ int parenlevel; /* levels of parens in arithmetic */
+ int oldstyle;
+ char const *prevsyntax; /* syntax before arithmetic */
+#if __GNUC__
+ /* Avoid longjmp clobbering */
+ (void) &out;
+ (void) &quotef;
+ (void) &dblquote;
+ (void) &varnest;
+ (void) &arinest;
+ (void) &parenlevel;
+ (void) &oldstyle;
+ (void) &prevsyntax;
+ (void) &syntax;
+#endif
+
+ startlinno = plinno;
+ dblquote = 0;
+ if (syntax == DQSYNTAX)
+ dblquote = 1;
+ quotef = 0;
+ bqlist = NULL;
+ varnest = 0;
+ arinest = 0;
+ parenlevel = 0;
+
+ STARTSTACKSTR(out);
+ loop: { /* for each line, until end of word */
+#if ATTY
+ if (c == '\034' && doprompt
+ && attyset() && ! equal(termval(), "emacs")) {
+ attyline();
+ if (syntax == BASESYNTAX)
+ return readtoken();
+ c = pgetc();
+ goto loop;
+ }
+#endif
+ CHECKEND(); /* set c to PEOF if at end of here document */
+ for (;;) { /* until end of line or end of word */
+ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */
+ switch(syntax[c]) {
+ case CNL: /* '\n' */
+ if (syntax == BASESYNTAX)
+ goto endword; /* exit outer loop */
+ USTPUTC(c, out);
+ plinno++;
+ if (doprompt)
+ setprompt(2);
+ else
+ setprompt(0);
+ c = pgetc();
+ goto loop; /* continue outer loop */
+ case CWORD:
+ USTPUTC(c, out);
+ break;
+ case CCTL:
+ if (eofmark == NULL || dblquote)
+ USTPUTC(CTLESC, out);
+ USTPUTC(c, out);
+ break;
+ case CBACK: /* backslash */
+ c = pgetc();
+ if (c == PEOF) {
+ USTPUTC('\\', out);
+ pungetc();
+ } else if (c == '\n') {
+ if (doprompt)
+ setprompt(2);
+ else
+ setprompt(0);
+ } else {
+ if (dblquote && c != '\\' && c != '`' && c != '$'
+ && (c != '"' || eofmark != NULL))
+ USTPUTC('\\', out);
+ if (SQSYNTAX[c] == CCTL)
+ USTPUTC(CTLESC, out);
+ USTPUTC(c, out);
+ quotef++;
+ }
+ break;
+ case CSQUOTE:
+ syntax = SQSYNTAX;
+ break;
+ case CDQUOTE:
+ syntax = DQSYNTAX;
+ dblquote = 1;
+ break;
+ case CENDQUOTE:
+ if (eofmark) {
+ USTPUTC(c, out);
+ } else {
+ if (arinest)
+ syntax = ARISYNTAX;
+ else
+ syntax = BASESYNTAX;
+ quotef++;
+ dblquote = 0;
+ }
+ break;
+ case CVAR: /* '$' */
+ PARSESUB(); /* parse substitution */
+ break;
+ case CENDVAR: /* '}' */
+ if (varnest > 0) {
+ varnest--;
+ USTPUTC(CTLENDVAR, out);
+ } else {
+ USTPUTC(c, out);
+ }
+ break;
+ case CLP: /* '(' in arithmetic */
+ parenlevel++;
+ USTPUTC(c, out);
+ break;
+ case CRP: /* ')' in arithmetic */
+ if (parenlevel > 0) {
+ USTPUTC(c, out);
+ --parenlevel;
+ } else {
+ if (pgetc() == ')') {
+ if (--arinest == 0) {
+ USTPUTC(CTLENDARI, out);
+ syntax = prevsyntax;
+ } else
+ USTPUTC(')', out);
+ } else {
+ /*
+ * unbalanced parens
+ * (don't 2nd guess - no error)
+ */
+ pungetc();
+ USTPUTC(')', out);
+ }
+ }
+ break;
+ case CBQUOTE: /* '`' */
+ PARSEBACKQOLD();
+ break;
+ case CEOF:
+ goto endword; /* exit outer loop */
+ default:
+ if (varnest == 0)
+ goto endword; /* exit outer loop */
+ USTPUTC(c, out);
+ }
+ c = pgetc_macro();
+ }
+ }
+endword:
+ if (syntax == ARISYNTAX)
+ synerror("Missing '))'");
+ if (syntax != BASESYNTAX && ! parsebackquote && eofmark == NULL)
+ synerror("Unterminated quoted string");
+ if (varnest != 0) {
+ startlinno = plinno;
+ synerror("Missing '}'");
+ }
+ USTPUTC('\0', out);
+ len = out - stackblock();
+ out = stackblock();
+ if (eofmark == NULL) {
+ if ((c == '>' || c == '<')
+ && quotef == 0
+ && len <= 2
+ && (*out == '\0' || is_digit(*out))) {
+ PARSEREDIR();
+ return lasttoken = TREDIR;
+ } else {
+ pungetc();
+ }
+ }
+ quoteflag = quotef;
+ backquotelist = bqlist;
+ grabstackblock(len);
+ wordtext = out;
+ return lasttoken = TWORD;
+/* end of readtoken routine */
+
+
+
+/*
+ * Check to see whether we are at the end of the here document. When this
+ * is called, c is set to the first character of the next input line. If
+ * we are at the end of the here document, this routine sets the c to PEOF.
+ */
+
+checkend: {
+ if (eofmark) {
+ if (striptabs) {
+ while (c == '\t')
+ c = pgetc();
+ }
+ if (c == *eofmark) {
+ if (pfgets(line, sizeof line) != NULL) {
+ char *p, *q;
+
+ p = line;
+ for (q = eofmark + 1 ; *q && *p == *q ; p++, q++);
+ if (*p == '\n' && *q == '\0') {
+ c = PEOF;
+ plinno++;
+ needprompt = doprompt;
+ } else {
+ pushstring(line, strlen(line), NULL);
+ }
+ }
+ }
+ }
+ goto checkend_return;
+}
+
+
+/*
+ * Parse a redirection operator. The variable "out" points to a string
+ * specifying the fd to be redirected. The variable "c" contains the
+ * first character of the redirection operator.
+ */
+
+parseredir: {
+ char fd = *out;
+ union node *np;
+
+ np = (union node *)stalloc(sizeof (struct nfile));
+ if (c == '>') {
+ np->nfile.fd = 1;
+ c = pgetc();
+ if (c == '>')
+ np->type = NAPPEND;
+ else if (c == '&')
+ np->type = NTOFD;
+ else {
+ np->type = NTO;
+ pungetc();
+ }
+ } else { /* c == '<' */
+ np->nfile.fd = 0;
+ c = pgetc();
+ if (c == '<') {
+ if (sizeof (struct nfile) != sizeof (struct nhere)) {
+ np = (union node *)stalloc(sizeof (struct nhere));
+ np->nfile.fd = 0;
+ }
+ np->type = NHERE;
+ heredoc = (struct heredoc *)stalloc(sizeof (struct heredoc));
+ heredoc->here = np;
+ if ((c = pgetc()) == '-') {
+ heredoc->striptabs = 1;
+ } else {
+ heredoc->striptabs = 0;
+ pungetc();
+ }
+ } else if (c == '&')
+ np->type = NFROMFD;
+ else {
+ np->type = NFROM;
+ pungetc();
+ }
+ }
+ if (fd != '\0')
+ np->nfile.fd = digit_val(fd);
+ redirnode = np;
+ goto parseredir_return;
+}
+
+
+/*
+ * Parse a substitution. At this point, we have read the dollar sign
+ * and nothing else.
+ */
+
+parsesub: {
+ int subtype;
+ int typeloc;
+ int flags;
+ char *p;
+#ifndef GDB_HACK
+ static const char types[] = "}-+?=";
+#endif
+
+ c = pgetc();
+ if (c != '(' && c != '{' && !is_name(c) && !is_special(c)) {
+ USTPUTC('$', out);
+ pungetc();
+ } else if (c == '(') { /* $(command) or $((arith)) */
+ if (pgetc() == '(') {
+ PARSEARITH();
+ } else {
+ pungetc();
+ PARSEBACKQNEW();
+ }
+ } else {
+ USTPUTC(CTLVAR, out);
+ typeloc = out - stackblock();
+ USTPUTC(VSNORMAL, out);
+ subtype = VSNORMAL;
+ if (c == '{') {
+ c = pgetc();
+ if (c == '#') {
+ if ((c = pgetc()) == '}')
+ c = '#';
+ else
+ subtype = VSLENGTH;
+ }
+ else
+ subtype = 0;
+ }
+ if (is_name(c)) {
+ do {
+ STPUTC(c, out);
+ c = pgetc();
+ } while (is_in_name(c));
+ } else if (is_digit(c)) {
+ do {
+ USTPUTC(c, out);
+ c = pgetc();
+ } while (is_digit(c));
+ }
+ else if (is_special(c)) {
+ USTPUTC(c, out);
+ c = pgetc();
+ }
+ else
+badsub: synerror("Bad substitution");
+
+ STPUTC('=', out);
+ flags = 0;
+ if (subtype == 0) {
+ switch (c) {
+ case ':':
+ flags = VSNUL;
+ c = pgetc();
+ /*FALLTHROUGH*/
+ default:
+ p = strchr(types, c);
+ if (p == NULL)
+ goto badsub;
+ subtype = p - types + VSNORMAL;
+ break;
+ case '%':
+ case '#':
+ {
+ int cc = c;
+ subtype = c == '#' ? VSTRIMLEFT :
+ VSTRIMRIGHT;
+ c = pgetc();
+ if (c == cc)
+ subtype++;
+ else
+ pungetc();
+ break;
+ }
+ }
+ } else {
+ pungetc();
+ }
+ if (dblquote || arinest)
+ flags |= VSQUOTE;
+ *(stackblock() + typeloc) = subtype | flags;
+ if (subtype != VSNORMAL)
+ varnest++;
+ }
+ goto parsesub_return;
+}
+
+
+/*
+ * Called to parse command substitutions. Newstyle is set if the command
+ * is enclosed inside $(...); nlpp is a pointer to the head of the linked
+ * list of commands (passed by reference), and savelen is the number of
+ * characters on the top of the stack which must be preserved.
+ */
+
+parsebackq: {
+ struct nodelist **nlpp;
+ int savepbq;
+ union node *n;
+ char *volatile str;
+ struct jmploc jmploc;
+ struct jmploc *volatile savehandler;
+ int savelen;
+ int saveprompt;
+#ifdef __GNUC__
+ (void) &saveprompt;
+#endif
+
+ savepbq = parsebackquote;
+ if (setjmp(jmploc.loc)) {
+ if (str)
+ ckfree(str);
+ parsebackquote = 0;
+ handler = savehandler;
+ longjmp(handler->loc, 1);
+ }
+ INTOFF;
+ str = NULL;
+ savelen = out - stackblock();
+ if (savelen > 0) {
+ str = ckmalloc(savelen);
+ memcpy(str, stackblock(), savelen);
+ }
+ savehandler = handler;
+ handler = &jmploc;
+ INTON;
+ if (oldstyle) {
+ /* We must read until the closing backquote, giving special
+ treatment to some slashes, and then push the string and
+ reread it as input, interpreting it normally. */
+ char *out;
+ int c;
+ int savelen;
+ char *str;
+
+
+ STARTSTACKSTR(out);
+ for (;;) {
+ if (needprompt) {
+ setprompt(2);
+ needprompt = 0;
+ }
+ switch (c = pgetc()) {
+ case '`':
+ goto done;
+
+ case '\\':
+ if ((c = pgetc()) == '\n') {
+ plinno++;
+ if (doprompt)
+ setprompt(2);
+ else
+ setprompt(0);
+ /*
+ * If eating a newline, avoid putting
+ * the newline into the new character
+ * stream (via the STPUTC after the
+ * switch).
+ */
+ continue;
+ }
+ if (c != '\\' && c != '`' && c != '$'
+ && (!dblquote || c != '"'))
+ STPUTC('\\', out);
+ break;
+
+ case '\n':
+ plinno++;
+ needprompt = doprompt;
+ break;
+
+ case PEOF:
+ startlinno = plinno;
+ synerror("EOF in backquote substitution");
+ break;
+
+ default:
+ break;
+ }
+ STPUTC(c, out);
+ }
+done:
+ STPUTC('\0', out);
+ savelen = out - stackblock();
+ if (savelen > 0) {
+ str = ckmalloc(savelen);
+ memcpy(str, stackblock(), savelen);
+ setinputstring(str, 1);
+ }
+ }
+ nlpp = &bqlist;
+ while (*nlpp)
+ nlpp = &(*nlpp)->next;
+ *nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist));
+ (*nlpp)->next = NULL;
+ parsebackquote = oldstyle;
+
+ if (oldstyle) {
+ saveprompt = doprompt;
+ doprompt = 0;
+ }
+
+ n = list(0);
+
+ if (oldstyle)
+ doprompt = saveprompt;
+ else {
+ if (readtoken() != TRP)
+ synexpect(TRP);
+ }
+
+ (*nlpp)->n = n;
+ if (oldstyle) {
+ /*
+ * Start reading from old file again, ignoring any pushed back
+ * tokens left from the backquote parsing
+ */
+ popfile();
+ tokpushback = 0;
+ }
+ while (stackblocksize() <= savelen)
+ growstackblock();
+ STARTSTACKSTR(out);
+ if (str) {
+ memcpy(out, str, savelen);
+ STADJUST(savelen, out);
+ INTOFF;
+ ckfree(str);
+ str = NULL;
+ INTON;
+ }
+ parsebackquote = savepbq;
+ handler = savehandler;
+ if (arinest || dblquote)
+ USTPUTC(CTLBACKQ | CTLQUOTE, out);
+ else
+ USTPUTC(CTLBACKQ, out);
+ if (oldstyle)
+ goto parsebackq_oldreturn;
+ else
+ goto parsebackq_newreturn;
+}
+
+/*
+ * Parse an arithmetic expansion (indicate start of one and set state)
+ */
+parsearith: {
+
+ if (++arinest == 1) {
+ prevsyntax = syntax;
+ syntax = ARISYNTAX;
+ USTPUTC(CTLARI, out);
+ } else {
+ /*
+ * we collapse embedded arithmetic expansion to
+ * parenthesis, which should be equivalent
+ */
+ USTPUTC('(', out);
+ }
+ goto parsearith_return;
+}
+
+} /* end of readtoken */
+
+
+
+#ifdef mkinit
+RESET {
+ tokpushback = 0;
+ checkkwd = 0;
+}
+#endif
+
+/*
+ * Returns true if the text contains nothing to expand (no dollar signs
+ * or backquotes).
+ */
+
+STATIC int
+noexpand(text)
+ char *text;
+ {
+ char *p;
+ char c;
+
+ p = text;
+ while ((c = *p++) != '\0') {
+ if (c == CTLESC)
+ p++;
+ else if (BASESYNTAX[c] == CCTL)
+ return 0;
+ }
+ return 1;
+}
+
+
+/*
+ * Return true if the argument is a legal variable name (a letter or
+ * underscore followed by zero or more letters, underscores, and digits).
+ */
+
+int
+goodname(name)
+ char *name;
+ {
+ char *p;
+
+ p = name;
+ if (! is_name(*p))
+ return 0;
+ while (*++p) {
+ if (! is_in_name(*p))
+ return 0;
+ }
+ return 1;
+}
+
+
+/*
+ * Called when an unexpected token is read during the parse. The argument
+ * is the token that is expected, or -1 if more than one type of token can
+ * occur at this point.
+ */
+
+STATIC void
+synexpect(token)
+ int token;
+{
+ char msg[64];
+
+ if (token >= 0) {
+ fmtstr(msg, 64, "%s unexpected (expecting %s)",
+ tokname[lasttoken], tokname[token]);
+ } else {
+ fmtstr(msg, 64, "%s unexpected", tokname[lasttoken]);
+ }
+ synerror(msg);
+}
+
+
+STATIC void
+synerror(msg)
+ char *msg;
+ {
+ if (commandname)
+ outfmt(&errout, "%s: %d: ", commandname, startlinno);
+ outfmt(&errout, "Syntax error: %s\n", msg);
+ error((char *)NULL);
+}
+
+STATIC void
+setprompt(which)
+ int which;
+ {
+ whichprompt = which;
+
+#ifndef SMALL
+ if (!el)
+#endif
+ out2str(getprompt(NULL));
+}
+
+/*
+ * called by editline -- any expansions to the prompt
+ * should be added here.
+ */
+char *
+getprompt(unused)
+ void *unused;
+ {
+ switch (whichprompt) {
+ case 0:
+ return "";
+ case 1:
+ return ps1val();
+ case 2:
+ return ps2val();
+ default:
+ return "<internal prompt error>";
+ }
+}
diff --git a/release/picobsd/tinyware/ash/parser.h b/release/picobsd/tinyware/ash/parser.h
new file mode 100644
index 0000000..8d47413
--- /dev/null
+++ b/release/picobsd/tinyware/ash/parser.h
@@ -0,0 +1,82 @@
+/* $NetBSD: parser.h,v 1.11 1996/10/16 15:45:15 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)parser.h 8.3 (Berkeley) 5/4/95
+ */
+
+/* control characters in argument strings */
+#define CTLESC '\201'
+#define CTLVAR '\202'
+#define CTLENDVAR '\203'
+#define CTLBACKQ '\204'
+#define CTLQUOTE 01 /* ored with CTLBACKQ code if in quotes */
+/* CTLBACKQ | CTLQUOTE == '\205' */
+#define CTLARI '\206'
+#define CTLENDARI '\207'
+
+/* variable substitution byte (follows CTLVAR) */
+#define VSTYPE 0x0f /* type of variable substitution */
+#define VSNUL 0x10 /* colon--treat the empty string as unset */
+#define VSQUOTE 0x80 /* inside double quotes--suppress splitting */
+
+/* values of VSTYPE field */
+#define VSNORMAL 0x1 /* normal variable: $var or ${var} */
+#define VSMINUS 0x2 /* ${var-text} */
+#define VSPLUS 0x3 /* ${var+text} */
+#define VSQUESTION 0x4 /* ${var?message} */
+#define VSASSIGN 0x5 /* ${var=text} */
+#define VSTRIMLEFT 0x6 /* ${var#pattern} */
+#define VSTRIMLEFTMAX 0x7 /* ${var##pattern} */
+#define VSTRIMRIGHT 0x8 /* ${var%pattern} */
+#define VSTRIMRIGHTMAX 0x9 /* ${var%%pattern} */
+#define VSLENGTH 0xa /* ${#var} */
+
+
+/*
+ * NEOF is returned by parsecmd when it encounters an end of file. It
+ * must be distinct from NULL, so we use the address of a variable that
+ * happens to be handy.
+ */
+extern int tokpushback;
+#define NEOF ((union node *)&tokpushback)
+extern int whichprompt; /* 1 == PS1, 2 == PS2 */
+
+
+union node *parsecmd __P((int));
+void fixredir __P((union node *, const char *, int));
+int goodname __P((char *));
+char *getprompt __P((void *));
diff --git a/release/picobsd/tinyware/ash/redir.c b/release/picobsd/tinyware/ash/redir.c
new file mode 100644
index 0000000..ae9116a
--- /dev/null
+++ b/release/picobsd/tinyware/ash/redir.c
@@ -0,0 +1,375 @@
+/* $NetBSD: redir.c,v 1.16 1997/07/04 21:02:21 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: redir.c,v 1.16 1997/07/04 21:02:21 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <sys/types.h>
+#include <signal.h>
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+/*
+ * Code for dealing with input/output redirection.
+ */
+
+#include "shell.h"
+#include "nodes.h"
+#include "jobs.h"
+#include "expand.h"
+#include "redir.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+
+
+#define EMPTY -2 /* marks an unused slot in redirtab */
+#define PIPESIZE 4096 /* amount of buffering in a pipe */
+
+
+MKINIT
+struct redirtab {
+ struct redirtab *next;
+ short renamed[10];
+};
+
+
+MKINIT struct redirtab *redirlist;
+
+/*
+ * We keep track of whether or not fd0 has been redirected. This is for
+ * background commands, where we want to redirect fd0 to /dev/null only
+ * if it hasn't already been redirected.
+*/
+int fd0_redirected = 0;
+
+STATIC void openredirect __P((union node *, char[10 ]));
+STATIC int openhere __P((union node *));
+
+
+/*
+ * Process a list of redirection commands. If the REDIR_PUSH flag is set,
+ * old file descriptors are stashed away so that the redirection can be
+ * undone by calling popredir. If the REDIR_BACKQ flag is set, then the
+ * standard output, and the standard error if it becomes a duplicate of
+ * stdout, is saved in memory.
+ */
+
+void
+redirect(redir, flags)
+ union node *redir;
+ int flags;
+ {
+ union node *n;
+ struct redirtab *sv = NULL;
+ int i;
+ int fd;
+ int try;
+ char memory[10]; /* file descriptors to write to memory */
+
+ for (i = 10 ; --i >= 0 ; )
+ memory[i] = 0;
+ memory[1] = flags & REDIR_BACKQ;
+ if (flags & REDIR_PUSH) {
+ sv = ckmalloc(sizeof (struct redirtab));
+ for (i = 0 ; i < 10 ; i++)
+ sv->renamed[i] = EMPTY;
+ sv->next = redirlist;
+ redirlist = sv;
+ }
+ for (n = redir ; n ; n = n->nfile.next) {
+ fd = n->nfile.fd;
+ try = 0;
+ if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
+ n->ndup.dupfd == fd)
+ continue; /* redirect from/to same file descriptor */
+
+ if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) {
+ INTOFF;
+again:
+ if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {
+ switch (errno) {
+ case EBADF:
+ if (!try) {
+ openredirect(n, memory);
+ try++;
+ goto again;
+ }
+ /* FALLTHROUGH*/
+ default:
+ INTON;
+ error("%d: %s", fd, strerror(errno));
+ break;
+ }
+ }
+ if (!try) {
+ sv->renamed[fd] = i;
+ close(fd);
+ }
+ INTON;
+ } else {
+ close(fd);
+ }
+ if (fd == 0)
+ fd0_redirected++;
+ if (!try)
+ openredirect(n, memory);
+ }
+ if (memory[1])
+ out1 = &memout;
+ if (memory[2])
+ out2 = &memout;
+}
+
+
+STATIC void
+openredirect(redir, memory)
+ union node *redir;
+ char memory[10];
+ {
+ int fd = redir->nfile.fd;
+ char *fname;
+ int f;
+
+ /*
+ * We suppress interrupts so that we won't leave open file
+ * descriptors around. This may not be such a good idea because
+ * an open of a device or a fifo can block indefinitely.
+ */
+ INTOFF;
+ memory[fd] = 0;
+ switch (redir->nfile.type) {
+ case NFROM:
+ fname = redir->nfile.expfname;
+ if ((f = open(fname, O_RDONLY)) < 0)
+ error("cannot open %s: %s", fname, errmsg(errno, E_OPEN));
+movefd:
+ if (f != fd) {
+ copyfd(f, fd);
+ close(f);
+ }
+ break;
+ case NTO:
+ fname = redir->nfile.expfname;
+#ifdef O_CREAT
+ if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
+ error("cannot create %s: %s", fname, errmsg(errno, E_CREAT));
+#else
+ if ((f = creat(fname, 0666)) < 0)
+ error("cannot create %s: %s", fname, errmsg(errno, E_CREAT));
+#endif
+ goto movefd;
+ case NAPPEND:
+ fname = redir->nfile.expfname;
+#ifdef O_APPEND
+ if ((f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666)) < 0)
+ error("cannot create %s: %s", fname, errmsg(errno, E_CREAT));
+#else
+ if ((f = open(fname, O_WRONLY)) < 0
+ && (f = creat(fname, 0666)) < 0)
+ error("cannot create %s: %s", fname, errmsg(errno, E_CREAT));
+ lseek(f, (off_t)0, 2);
+#endif
+ goto movefd;
+ case NTOFD:
+ case NFROMFD:
+ if (redir->ndup.dupfd >= 0) { /* if not ">&-" */
+ if (memory[redir->ndup.dupfd])
+ memory[fd] = 1;
+ else
+ copyfd(redir->ndup.dupfd, fd);
+ }
+ break;
+ case NHERE:
+ case NXHERE:
+ f = openhere(redir);
+ goto movefd;
+ default:
+ abort();
+ }
+ INTON;
+}
+
+
+/*
+ * Handle here documents. Normally we fork off a process to write the
+ * data to a pipe. If the document is short, we can stuff the data in
+ * the pipe without forking.
+ */
+
+STATIC int
+openhere(redir)
+ union node *redir;
+ {
+ int pip[2];
+ int len = 0;
+
+ if (pipe(pip) < 0)
+ error("Pipe call failed");
+ if (redir->type == NHERE) {
+ len = strlen(redir->nhere.doc->narg.text);
+ if (len <= PIPESIZE) {
+ xwrite(pip[1], redir->nhere.doc->narg.text, len);
+ goto out;
+ }
+ }
+ if (forkshell((struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) {
+ close(pip[0]);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+#ifdef SIGTSTP
+ signal(SIGTSTP, SIG_IGN);
+#endif
+ signal(SIGPIPE, SIG_DFL);
+ if (redir->type == NHERE)
+ xwrite(pip[1], redir->nhere.doc->narg.text, len);
+ else
+ expandhere(redir->nhere.doc, pip[1]);
+ _exit(0);
+ }
+out:
+ close(pip[1]);
+ return pip[0];
+}
+
+
+
+/*
+ * Undo the effects of the last redirection.
+ */
+
+void
+popredir() {
+ struct redirtab *rp = redirlist;
+ int i;
+
+ for (i = 0 ; i < 10 ; i++) {
+ if (rp->renamed[i] != EMPTY) {
+ if (i == 0)
+ fd0_redirected--;
+ close(i);
+ if (rp->renamed[i] >= 0) {
+ copyfd(rp->renamed[i], i);
+ close(rp->renamed[i]);
+ }
+ }
+ }
+ INTOFF;
+ redirlist = rp->next;
+ ckfree(rp);
+ INTON;
+}
+
+/*
+ * Undo all redirections. Called on error or interrupt.
+ */
+
+#ifdef mkinit
+
+INCLUDE "redir.h"
+
+RESET {
+ while (redirlist)
+ popredir();
+}
+
+SHELLPROC {
+ clearredir();
+}
+
+#endif
+
+/* Return true if fd 0 has already been redirected at least once. */
+int
+fd0_redirected_p () {
+ return fd0_redirected != 0;
+}
+
+/*
+ * Discard all saved file descriptors.
+ */
+
+void
+clearredir() {
+ struct redirtab *rp;
+ int i;
+
+ for (rp = redirlist ; rp ; rp = rp->next) {
+ for (i = 0 ; i < 10 ; i++) {
+ if (rp->renamed[i] >= 0) {
+ close(rp->renamed[i]);
+ }
+ rp->renamed[i] = EMPTY;
+ }
+ }
+}
+
+
+
+/*
+ * Copy a file descriptor to be >= to. Returns -1
+ * if the source file descriptor is closed, EMPTY if there are no unused
+ * file descriptors left.
+ */
+
+int
+copyfd(from, to)
+ int from;
+ int to;
+{
+ int newfd;
+
+ newfd = fcntl(from, F_DUPFD, to);
+ if (newfd < 0) {
+ if (errno == EMFILE)
+ return EMPTY;
+ else
+ error("%d: %s", from, strerror(errno));
+ }
+ return newfd;
+}
diff --git a/release/picobsd/tinyware/ash/redir.h b/release/picobsd/tinyware/ash/redir.h
new file mode 100644
index 0000000..44eecc7
--- /dev/null
+++ b/release/picobsd/tinyware/ash/redir.h
@@ -0,0 +1,51 @@
+/* $NetBSD: redir.h,v 1.10 1996/10/16 15:45:18 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)redir.h 8.2 (Berkeley) 5/4/95
+ */
+
+/* flags passed to redirect */
+#define REDIR_PUSH 01 /* save previous values of file descriptors */
+#define REDIR_BACKQ 02 /* save the command output in memory */
+
+union node;
+void redirect __P((union node *, int));
+void popredir __P((void));
+int fd0_redirected_p __P((void));
+void clearredir __P((void));
+int copyfd __P((int, int));
+
diff --git a/release/picobsd/tinyware/ash/sh.1 b/release/picobsd/tinyware/ash/sh.1
new file mode 100644
index 0000000..281bb3c
--- /dev/null
+++ b/release/picobsd/tinyware/ash/sh.1
@@ -0,0 +1,1450 @@
+.\" $NetBSD: sh.1,v 1.20 1997/05/23 19:40:30 cjs Exp $
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" Kenneth Almquist.
+.\"
+.\" 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.
+.\"
+.\" @(#)sh.1 8.6 (Berkeley) 5/4/95
+.\"
+.na
+.TH SH 1
+.SH NAME
+sh \- command interpreter (shell)
+.SH SYNOPSIS
+sh [-/+aCefnuvxIimsVEb] [-/+o longname] [arg ...]
+.SH DESCRIPTION
+.LP
+Sh is the standard command interpreter for the system.
+The current version of sh is in the process of being changed to
+conform with the POSIX 1003.2 and 1003.2a specifications for
+the shell. This version has many features which make it appear
+similar in some respects to the Korn shell, but it is not a Korn
+shell clone (run GNU's bash if you want that). Only features
+designated by POSIX, plus a few Berkeley extensions, are being
+incorporated into this shell. We expect POSIX conformance by the
+time 4.4 BSD is released.
+This man page is not intended to be a tutorial or a complete
+specification of the shell.
+.sp 2
+.B Overview
+.sp
+.LP
+The shell is a command that reads lines from
+either a file or the terminal, interprets them, and
+generally executes other commands. It is the program that is running
+when a user logs into the system (although a user can select
+a different shell with the chsh(1) command).
+The shell
+implements a language that has flow control constructs,
+a macro facility that provides a variety of features in
+addition to data storage, along with built in history and line
+editing capabilities. It incorporates many features to
+aid interactive use and has the advantage that the interpretative
+language is common to both interactive and non-interactive
+use (shell scripts). That is, commands can be typed directly
+to the running shell or can be put into a file and the file
+can be executed directly by the shell.
+.sp 2
+.B Invocation
+.sp
+.LP
+If no args are present and if the standard input of the shell
+is connected to a terminal (or if the -i flag is set), the shell
+is considered an interactive shell. An interactive shell
+generally prompts before each command and handles programming
+and command errors differently (as described below).
+When first starting, the shell inspects argument 0, and
+if it begins with a dash '-', the shell is also considered
+a login shell. This is normally done automatically by the system
+when the user first logs in. A login shell first reads commands
+from the files /etc/profile and .profile if they exist.
+If the environment variable ENV is set on entry to a shell,
+or is set in the .profile of a login shell, the shell next reads
+commands from the file named in ENV. Therefore, a user should
+place commands that are to be executed only at login time in
+the .profile file, and commands that are executed for every
+shell inside the ENV file. To set the ENV variable to some
+file, place the following line in your .profile of your home
+directory
+.nf
+
+ ENV=$HOME/.shinit; export ENV
+
+.fi
+substituting for ``.shinit'' any filename you wish.
+Since the ENV file is read for
+every invocation of the shell, including shell scripts and
+non-interactive shells, the following paradigm is useful
+for restricting commands in the ENV file to interactive invocations.
+Place commands within the ``case'' and ``esac'' below (these
+commands are described later):
+.nf
+
+ case $- in *i*)
+ # commands for interactive use only
+ ...
+ esac
+
+.fi
+If command line arguments besides the options have been
+specified, then the shell treats the first argument as the
+name of a file from which to read commands (a shell script), and
+the remaining arguments are set as the positional parameters
+of the shell ($1, $2, etc). Otherwise, the shell reads commands
+from its standard input.
+.sp 2
+.B Argument List Processing
+.sp
+.LP
+All of the single letter options have a corresponding name
+that can be used as an argument to the '-o' option. The
+set -o name is provided next to the single letter option in
+the description below.
+Specifying a dash ``-'' turns the option on, while using a plus ``+''
+disables the option.
+The following options can be set from the command line or
+with the set(1) builtin (described later).
+.TP
+-a allexport
+Export all variables assigned to.
+(UNIMPLEMENTED for 4.4alpha)
+.TP
+-C noclobber
+Don't overwrite existing files with ``>''.
+(UNIMPLEMENTED for 4.4alpha)
+.TP
+-e errexit
+If not interactive, exit immediately if any
+untested command fails.
+The exit status of a command is considered to be
+explicitly tested if the command is used to control
+an if, elif, while, or until; or if the command is the left
+hand operand of an ``&&'' or ``||'' operator.
+
+.TP
+-f noglob
+Disable pathname expansion.
+.TP
+-n noexec
+If not interactive, read commands but do not
+execute them. This is useful for checking the
+syntax of shell scripts.
+.TP
+-u nounset
+Write a message to standard error when attempting
+to expand a variable that is not set, and if the
+shell is not interactive, exit immediately.
+(UNIMPLEMENTED for 4.4alpha)
+.TP
+-v verbose
+The shell writes its input to standard error
+as it is read. Useful for debugging.
+.TP
+-x xtrace
+Write each command to standard error (preceded
+by a '+ ') before it is executed. Useful for
+debugging.
+.TP
+-I ignoreeof
+Ignore EOF's from input when interactive.
+.TP
+-i interactive
+Force the shell to behave interactively.
+.TP
+-m monitor
+Turn on job control (set automatically when
+interactive).
+.TP
+-s stdin
+Read commands from standard input (set automatically
+if no file arguments are present). This option has
+no effect when set after the shell has already started
+running (i.e. with set(1)).
+.TP
+-V vi
+Enable the built-in vi(1) command line editor (disables
+-E if it has been set).
+.TP
+-E emacs
+Enable the built-in emacs(1) command line editor (disables
+-V if it has been set).
+.TP
+-b notify
+Enable asynchronous notification of background job
+completion.
+(UNIMPLEMENTED for 4.4alpha)
+.LP
+.sp 2
+.B Lexical Structure
+.sp
+.LP
+The shell reads input in terms of lines from a file and breaks
+it up into words at whitespace (blanks and tabs), and at
+certain sequences of
+characters that are special to the shell called ``operators''.
+There are two types of operators: control operators and
+redirection operators (their meaning is discussed later).
+Following is a list of operators:
+.nf
+.sp
+Control operators: & && ( ) ; ;; | || <newline>
+.sp
+Redirection operator: < > >| << >> <& >& <<- <>
+.sp
+.fi
+.sp 2
+.B Quoting
+.sp
+.LP
+Quoting is used to remove the special meaning of certain characters
+or words to the shell, such as operators, whitespace, or
+keywords. There are three types of quoting: matched single quotes,
+matched double quotes, and backslash.
+.sp 2
+.B Backslash
+.sp
+.LP
+A backslash preserves the literal meaning of the following
+character, with the exception of <newline>. A backslash preceding
+a <newline> is treated as a line continuation.
+.sp 2
+.B Single Quotes
+.sp
+.LP
+Enclosing characters in single quotes preserves the literal
+meaning of all the characters (except single quotes, making
+it impossible to put single-quotes in a single-quoted string).
+.sp 2
+.B Double Quotes
+.sp
+.LP
+Enclosing characters within double quotes preserves the literal
+meaning of all characters except dollarsign ($), backquote (`),
+and backslash (\\). The backslash inside double quotes is
+historically weird, and serves to quote only the following
+characters: $ ` " \\ <newline>.
+Otherwise it remains literal.
+.sp 2
+.B Reserved Words
+.sp
+.LP
+Reserved words are words that have special meaning to the
+shell and are recognized at the beginning of a line and
+after a control operator. The following are reserved words:
+.nf
+
+ ! elif fi while case
+ else for then { }
+ do done until if esac
+
+.fi
+Their meaning is discussed later.
+.sp 2
+.B Aliases
+.sp
+.LP
+An alias is a name and corresponding value set using the alias(1)
+builtin command. Whenever a reserved word may occur (see above),
+and after checking for reserved words, the shell
+checks the word to see if it matches an alias. If it does,
+it replaces it in the input stream with its value. For example,
+if there is an alias called ``lf'' with the value ``ls -F'',
+then the input
+.nf
+
+ lf foobar <return>
+
+ would become
+
+ ls -F foobar <return>
+
+.fi
+.LP
+Aliases provide a convenient way for naive users to
+create shorthands for commands without having to learn how
+to create functions with arguments. They can also be
+used to create lexically obscure code. This use is discouraged.
+.sp 2
+.B Commands
+.sp
+.LP
+The shell interprets the words it reads according to a
+language, the specification of which is outside the scope
+of this man page (refer to the BNF in the POSIX 1003.2
+document). Essentially though, a line is read and if
+the first word of the line (or after a control operator)
+is not a reserved word, then the shell has recognized a
+simple command. Otherwise, a complex command or some
+other special construct may have been recognized.
+.sp 2
+.B Simple Commands
+.sp
+.LP
+If a simple command has been recognized, the shell performs
+the following actions:
+.sp
+1) Leading words of the form ``name=value'' are
+stripped off and assigned to the environment of
+the simple command. Redirection operators and
+their arguments (as described below) are stripped
+off and saved for processing.
+.sp
+2) The remaining words are expanded as described in
+the section called ``Expansions'', and the
+first remaining word is considered the command
+name and the command is located. The remaining
+words are considered the arguments of the command.
+If no command name resulted, then the ``name=value''
+variable assignments recognized in 1) affect the
+current shell.
+.sp
+3) Redirections are performed as described in
+the next section.
+.sp 2
+.B Redirections
+.sp
+.LP
+Redirections are used to change where a command reads its input
+or sends its output. In general, redirections open, close, or
+duplicate an existing reference to a file. The overall format
+used for redirection is:
+.nf
+
+ [n] redir-op file
+
+.fi
+where redir-op is one of the redirection operators mentioned
+previously. Following is a list of the possible redirections.
+The [n] is an optional number, as in '3' (not '[3]'), that
+refers to a file descriptor.
+.TP
+[n]> file
+Redirect standard output (or n) to file.
+.TP
+[n]>| file
+Same, but override the -C option.
+.TP
+[n]>> file
+Append standard output (or n) to file.
+.TP
+[n]< file
+Redirect standard input (or n) from file.
+.TP
+[n1]<&n2
+Duplicate standard input (or n1) from
+file descriptor n2.
+.TP
+[n]<&-
+Close standard input (or n).
+.TP
+[n1]>&n2
+Duplicate standard output (or n) from
+n2.
+.TP
+[n]>&-
+Close standard output (or n).
+.TP
+[n]<> file
+Open file for reading and writing on
+standard input (or n).
+.LP
+The following redirection is often called a ``here-document''.
+.nf
+
+ [n]<< delimiter
+ here-doc-text...
+ delimiter
+
+.fi
+All the text on successive lines up to the delimiter is
+saved away and made available to the command on standard
+input, or file descriptor n if it is specified. If the delimiter
+as specified on the initial line is quoted, then the here-doc-text
+is treated literally, otherwise the text is subjected to
+parameter expansion, command substitution, and arithmetic
+expansion (as described in the section on ``Expansions''). If
+the operator is ``<<-'' instead of ``<<'', then leading tabs
+in the here-doc-text are stripped.
+.sp 2
+.B Search and Execution
+.sp
+.LP
+There are three types of commands: shell functions,
+builtin commands, and normal programs -- and the
+command is searched for (by name) in that order. They
+each are executed in a different way.
+.LP
+When a shell function is executed, all of the shell positional
+parameters (except $0, which remains unchanged) are
+set to the arguments of the shell function.
+The variables which are explicitly placed in the environment of
+the command (by placing assignments to them before the
+function name) are made local to the function and are set
+to the values given. Then the command given in the function
+definition is executed. The positional parameters are
+restored to their original values when the command completes.
+This all occurs within the current shell.
+.LP
+Shell builtins are executed internally to the shell, without
+spawning a new process.
+.LP
+Otherwise, if the command name doesn't match a function
+or builtin, the command is searched for as a normal
+program in the filesystem (as described in the next section).
+When a normal program is executed, the shell runs the program,
+passing the arguments and the environment to the
+program. If the program is not a normal executable file
+(i.e., if it does not begin with the "magic number"
+whose ASCII representation is "#!", so execve(2) returns
+ENOEXEC then) the shell
+will interpret the program in a subshell. The child shell will
+reinitialize itself in this case, so that the effect will
+be as if a new shell had been invoked to handle the ad-hoc shell
+script, except that the location of hashed commands located in
+the parent shell will be remembered by the child.
+.LP
+Note that previous versions of this document
+and the source code itself misleadingly and sporadically
+refer to a shell script without a magic number
+as a "shell procedure".
+.sp 2
+.B Path Search
+.sp
+.LP
+When locating a command, the shell first looks to see if
+it has a shell function by that name. Then it looks for a
+builtin command by that name. If a builtin command is not found,
+one of two things happen:
+.sp
+1) Command names containing a slash are simply executed without
+performing any searches.
+.sp
+2) The shell searches each entry in PATH in turn for the command.
+The value of the PATH variable should be a series of
+entries separated by colons. Each entry consists of a
+directory name.
+The current directory
+may be indicated implicitly by an empty directory name,
+or explicitly by a single period.
+.sp 2
+.B Command Exit Status
+.sp
+.LP
+Each command has an exit status that can influence the behavior
+of other shell commands. The paradigm is that a command exits
+with zero for normal or success, and non-zero for failure,
+error, or a false indication. The man page for each command
+should indicate the various exit codes and what they mean.
+Additionally, the builtin commands return exit codes, as does
+an executed shell function.
+.sp 2
+.B Complex Commands
+.sp
+.LP
+Complex commands are combinations of simple commands
+with control operators or reserved words, together creating a larger complex
+command. More generally, a command is one of the following:
+.nf
+
+ - simple command
+
+ - pipeline
+
+ - list or compound-list
+
+ - compound command
+
+ - function definition
+
+.fi
+.LP
+Unless otherwise stated, the exit status of a command is
+that of the last simple command executed by the command.
+.sp 2
+.B Pipelines
+.sp
+.LP
+A pipeline is a sequence of one or more commands separated
+by the control operator |. The standard output of all but
+the last command is connected to the standard input
+of the next command. The standard output of the last
+command is inherited from the shell, as usual.
+.LP
+The format for a pipeline is:
+.nf
+
+[!] command1 [ | command2 ...]
+
+.fi
+.LP
+The standard output of command1 is connected to the standard
+input of command2. The standard input, standard output, or
+both of a command is considered to be assigned by the
+pipeline before any redirection specified by redirection
+operators that are part of the command.
+.LP
+If the pipeline is not in the background (discussed later),
+the shell waits for all commands to complete.
+.LP
+If the reserved word ! does not precede the pipeline, the
+exit status is the exit status of the last command specified
+in the pipeline. Otherwise, the exit status is the logical
+NOT of the exit status of the last command. That is, if
+the last command returns zero, the exit status is 1; if
+the last command returns greater than zero, the exit status
+is zero.
+.LP
+Because pipeline assignment of standard input or standard
+output or both takes place before redirection, it can be
+modified by redirection. For example:
+.nf
+
+$ command1 2>&1 | command2
+
+.fi
+sends both the standard output and standard error of command1
+to the standard input of command2.
+.LP
+A ; or <newline> terminator causes the preceding
+AND-OR-list (described next) to be executed sequentially; a & causes
+asynchronous execution of the preceding AND-OR-list.
+.LP
+Note that unlike some other shells, each process in the
+pipeline is a child of the invoking shell (unless it
+is a shell builtin, in which case it executes in the
+current shell -- but any effect it has on the
+environment is wiped).
+.sp 2
+.B Background Commands -- &
+.sp
+.LP
+If a command is terminated by the control operator ampersand
+(&), the shell executes the command asynchronously -- that is,
+the shell does not wait for
+the command to finish before executing the next command.
+.LP
+The format for running a command in background is:
+.nf
+
+command1 & [command2 & ...]
+
+.fi
+If the shell is not interactive, the standard input of an
+asynchronous command is set to /dev/null.
+.sp 2
+.B Lists -- Generally Speaking
+.sp
+.LP
+A list is a sequence of zero or more commands separated by
+newlines, semicolons, or ampersands,
+and optionally terminated by one of these three characters.
+The commands in a
+list are executed in the order they are written.
+If command is followed by an ampersand, the shell starts the
+command and immediately proceed onto the next command;
+otherwise it waits for the command to terminate before
+proceeding to the next one.
+.sp 2
+.B Short-Circuit List Operators
+.sp
+.LP
+``&&'' and ``||'' are AND-OR list operators. ``&&'' executes
+the first command, and then executes the second command
+iff the exit status of the first command is zero. ``||''
+is similar, but executes the second command iff the exit
+status of the first command is nonzero. ``&&'' and ``||''
+both have the same priority.
+.sp 2
+.B Flow-Control Constructs -- if, while, for, case
+.sp
+.LP
+The syntax of the if command is
+.nf
+
+ if list
+ then list
+ [ elif list
+ then list ] ...
+ [ else list ]
+ fi
+
+.fi
+The syntax of the while command is
+.nf
+
+ while list
+ do list
+ done
+
+.fi
+The two lists are executed repeatedly while the exit status of the
+first list is zero. The until command is similar, but has the word
+until in place of while, which causes it to
+repeat until the exit status of the first list is zero.
+.LP
+The syntax of the for command is
+.nf
+
+ for variable in word...
+ do list
+ done
+
+.fi
+The words are expanded, and then the list is executed
+repeatedly with the variable set to each word in turn. do
+and done may be replaced with ``{'' and ``}''.
+.LP
+The syntax of the break and continue command is
+.nf
+
+ break [ num ]
+ continue [ num ]
+
+.fi
+Break terminates the num innermost for or while loops.
+Continue continues with the next iteration of the innermost loop.
+These are implemented as builtin commands.
+.LP
+The syntax of the case command is
+.nf
+
+ case word in
+ pattern) list ;;
+ ...
+ esac
+
+.fi
+.LP
+The pattern can actually be one or more patterns (see Shell
+Patterns described later), separated by ``|'' characters.
+.sp 2
+.B Grouping Commands Together
+.sp
+.LP
+Commands may be grouped by writing either
+.nf
+
+ (list)
+
+.fi
+or
+.nf
+
+ { list; }
+
+.fi
+The first of these executes the commands in a subshell.
+Builtin commands grouped into a (list) will not affect
+the current shell.
+The second form does not fork another shell so is
+slightly more efficient.
+Grouping commands together this way allows you to
+redirect their output as though they were one program:
+.nf
+
+ { echo -n "hello"; echo " world" } > greeting
+
+.fi
+.sp 2
+.B Functions
+.sp
+.LP
+The syntax of a function definition is
+.nf
+
+ name ( ) command
+
+.fi
+.LP
+A function definition is an executable statement; when
+executed it installs a function named name and returns an
+exit status of zero. The command is normally a list
+enclosed between ``{'' and ``}''.
+.LP
+Variables may be declared to be local to a function by
+using a local command. This should appear as the first
+statement of a function, and the syntax is
+.nf
+
+ local [ variable | - ] ...
+
+.fi
+Local is implemented as a builtin command.
+.LP
+When a variable is made local, it inherits the initial
+value and exported and readonly flags from the variable
+with the same name in the surrounding scope, if there is
+one. Otherwise, the variable is initially unset. The shell
+uses dynamic scoping, so that if you make the variable x
+local to function f, which then calls function g, references
+to the variable x made inside g will refer to the
+variable x declared inside f, not to the global variable
+named x.
+.LP
+The only special parameter than can be made local is
+``-''. Making ``-'' local any shell options that are
+changed via the set command inside the function to be
+restored to their original values when the function
+returns.
+.LP
+The syntax of the return command is
+.nf
+
+ return [ exitstatus ]
+
+.fi
+It terminates the currently executing function. Return is
+implemented as a builtin command.
+.sp 2
+.B Variables and Parameters
+.sp
+.LP
+The shell maintains a set of parameters. A parameter
+denoted by a name is called a variable. When starting up,
+the shell turns all the environment variables into shell
+variables. New variables can be set using the form
+.nf
+
+ name=value
+
+.fi
+.LP
+Variables set by the user must have a name consisting solely
+of alphabetics, numerics, and underscores - the first of which
+must not be numeric. A parameter can also be denoted by a number
+or a special character as explained below.
+.sp 2
+.B Positional Parameters
+.sp
+.LP
+A positional parameter is a parameter denoted by a number (n > 0).
+The shell sets these initially to the values of its command
+line arguments that follow the name of the shell script.
+The set(1) builtin can also be used to set or reset them.
+.sp 2
+.B Special Parameters
+.sp
+.LP
+A special parameter is a parameter denoted by one of the following
+special characters. The value of the parameter is listed
+next to its character.
+.TP
+*
+Expands to the positional parameters, starting from one. When
+the expansion occurs within a double-quoted string
+it expands to a single field with the value of each parameter
+separated by the first character of the IFS variable, or by a
+<space> if IFS is unset.
+.TP
+@
+Expands to the positional parameters, starting from one. When
+the expansion occurs within double-quotes, each positional
+parameter expands as a separate argument.
+If there are no positional parameters, the
+expansion of @ generates zero arguments, even when @ is
+double-quoted. What this basically means, for example, is
+if $1 is ``abc'' and $2 is ``def ghi'', then "$@" expands to
+the two arguments:
+
+"abc" "def ghi"
+.TP
+#
+Expands to the number of positional parameters.
+.TP
+?
+Expands to the exit status of the most recent pipeline.
+.TP
+- (Hyphen)
+Expands to the current option flags (the single-letter
+option names concatenated into a string) as specified on
+invocation, by the set builtin command, or implicitly
+by the shell.
+.TP
+$
+Expands to the process ID of the invoked shell. A subshell
+retains the same value of $ as its parent.
+.TP
+!
+Expands to the process ID of the most recent background
+command executed from the current shell. For a
+pipeline, the process ID is that of the last command in the
+pipeline.
+.TP
+0 (Zero.)
+Expands to the name of the shell or shell script.
+.LP
+.sp 2
+.B Word Expansions
+.sp
+.LP
+This clause describes the various expansions that are
+performed on words. Not all expansions are performed on
+every word, as explained later.
+.LP
+Tilde expansions, parameter expansions, command substitutions,
+arithmetic expansions, and quote removals that occur within
+a single word expand to a single field. It is only field
+splitting or pathname expansion that can create multiple
+fields from a single word. The single exception to this
+rule is the expansion of the special parameter @ within
+double-quotes, as was described above.
+.LP
+The order of word expansion is:
+.LP
+(1) Tilde Expansion, Parameter Expansion, Command Substitution,
+Arithmetic Expansion (these all occur at the same time).
+.LP
+(2) Field Splitting is performed on fields
+generated by step (1) unless the IFS variable is null.
+.LP
+(3) Pathname Expansion (unless set -f is in effect).
+.LP
+(4) Quote Removal.
+.LP
+The $ character is used to introduce parameter expansion, command
+substitution, or arithmetic evaluation.
+.sp 2
+.B Tilde Expansion (substituting a user's home directory)
+.sp
+.LP
+A word beginning with an unquoted tilde character (~) is
+subjected to tilde expansion. All the characters up to
+a slash (/) or the end of the word are treated as a username
+and are replaced with the user's home directory. If the
+username is missing (as in ~/foobar), the tilde is replaced
+with the value of the HOME variable (the current user's
+home directory).
+
+.sp 2
+.B Parameter Expansion
+.sp
+.LP
+The format for parameter expansion is as follows:
+.nf
+
+ ${expression}
+
+.fi
+where expression consists of all characters until the matching }. Any }
+escaped by a backslash or within a quoted string, and characters in
+embedded arithmetic expansions, command substitutions, and variable
+expansions, are not examined in determining the matching }.
+.LP
+The simplest form for parameter expansion is:
+.nf
+
+ ${parameter}
+
+.fi
+The value, if any, of parameter is substituted.
+.LP
+The parameter name or symbol can be enclosed in braces, which are
+optional except for positional parameters with more than one digit or
+when parameter is followed by a character that could be interpreted as
+part of the name.
+If a parameter expansion occurs inside
+double-quotes:
+.LP
+1) Pathname expansion is not performed on the results of the
+expansion.
+.LP
+2) Field splitting is not performed on the results of the
+expansion, with the exception of @.
+.LP
+In addition, a parameter expansion can be modified by using one of the
+following formats.
+.sp
+.TP
+${parameter:-word}
+Use Default Values. If parameter is unset or
+null, the expansion of word is
+substituted; otherwise, the value of
+parameter is substituted.
+.TP
+${parameter:=word}
+Assign Default Values. If parameter is unset
+or null, the expansion of word is
+assigned to parameter. In all cases, the
+final value of parameter is
+substituted. Only variables, not positional
+parameters or special parameters, can be
+assigned in this way.
+.TP
+${parameter:?[word]}
+Indicate Error if Null or Unset. If
+parameter is unset or null, the expansion of
+word (or a message indicating it is unset if
+word is omitted) is written to standard
+error and the shell exits with a nonzero
+exit status. Otherwise, the value of
+parameter is substituted. An
+interactive shell need not exit.
+.TP
+${parameter:+word}
+Use Alternative Value. If parameter is unset
+or null, null is substituted;
+otherwise, the expansion of word is
+substituted.
+.LP
+In the parameter expansions shown previously, use of the colon in the
+format results in a test for a parameter that is unset or null; omission
+of the colon results in a test for a parameter that is only unset.
+.TP
+${#parameter}
+String Length. The length in characters of
+the value of parameter.
+.LP
+The following four varieties of parameter expansion provide for substring
+processing. In each case, pattern matching notation (see Shell Patterns),
+rather
+than regular expression notation, is used to evaluate the patterns.
+If parameter is * or @, the result of the expansion is unspecified.
+Enclosing the full parameter expansion string in double-quotes does not
+cause the following four varieties of pattern characters to be quoted,
+whereas quoting characters within the braces has this effect.
+.TP
+${parameter%word}
+Remove Smallest Suffix Pattern. The word
+is expanded to produce a pattern. The
+parameter expansion then results in
+parameter, with the smallest portion of the
+suffix matched by the pattern deleted.
+.TP
+${parameter%%word}
+Remove Largest Suffix Pattern. The word
+is expanded to produce a pattern. The
+parameter expansion then results in
+parameter, with the largest portion of the
+suffix matched by the pattern deleted.
+.TP
+${parameter#word}
+Remove Smallest Prefix Pattern. The word
+is expanded to produce a pattern. The
+parameter expansion then results in
+parameter, with the smallest portion of the
+prefix matched by the pattern deleted.
+.TP
+${parameter##word}
+Remove Largest Prefix Pattern. The word
+is expanded to produce a pattern. The
+parameter expansion then results in
+parameter, with the largest portion of the
+prefix matched by the pattern deleted.
+.LP
+.sp 2
+.B Command Substitution
+.sp
+.LP
+Command substitution allows the output of a command to be substituted in
+place of the command name itself. Command substitution occurs when
+the command is enclosed as follows:
+.nf
+
+ $(command)
+
+.fi
+or (``backquoted'' version):
+.nf
+
+ `command`
+
+.fi
+.LP
+The shell expands the command substitution by executing command in a
+subshell environment and replacing the command substitution
+with the
+standard output of the command, removing sequences of one or more
+<newline>s at the end of the substitution. (Embedded <newline>s before
+the end of the output are not removed; however, during field
+splitting, they may be translated into <space>s, depending on the value
+of IFS and quoting that is in effect.)
+
+.sp 2
+.B Arithmetic Expansion
+.sp
+.LP
+Arithmetic expansion provides a mechanism for evaluating an arithmetic
+expression and substituting its value. The format for arithmetic
+expansion is as follows:
+.nf
+
+ $((expression))
+
+.fi
+The expression is treated as if it were in double-quotes, except
+that a double-quote inside the expression is not treated specially. The
+shell expands all tokens in the expression for parameter expansion,
+command substitution, and quote removal.
+.LP
+Next, the shell treats this as an arithmetic expression and
+substitutes the value of the expression.
+
+.sp 2
+.B White Space Splitting (Field Splitting)
+.sp
+.LP
+After parameter expansion, command substitution, and
+arithmetic expansion the shell scans the results of
+expansions and substitutions that did not occur in double-quotes for
+field splitting and multiple fields can result.
+.LP
+The shell treats each character of the IFS as a delimiter and use
+the delimiters to split the results of parameter expansion and command
+substitution into fields.
+
+.sp 2
+.B Pathname Expansion (File Name Generation)
+.sp
+.LP
+Unless the -f flag is set, file name generation is performed
+after word splitting is complete. Each word is
+viewed as a series of patterns, separated by slashes. The
+process of expansion replaces the word with the names of
+all existing files whose names can be formed by replacing
+each pattern with a string that matches the specified pattern.
+There are two restrictions on this: first, a pattern cannot match
+a string containing a slash, and second,
+a pattern cannot match a string starting with a period
+unless the first character of the pattern is a period.
+The next section describes the patterns used for both
+Pathname Expansion and the case(1) command.
+
+.sp 2
+.B Shell Patterns
+.sp
+.LP
+A pattern consists of normal characters, which match themselves,
+and meta-characters. The meta-characters are
+``!'', ``*'', ``?'', and ``[''. These characters lose
+their special meanings if they are quoted. When command
+or variable substitution is performed and the dollar sign
+or back quotes are not double quoted, the value of the
+variable or the output of the command is scanned for these
+characters and they are turned into meta-characters.
+.LP
+An asterisk (``*'') matches any string of characters. A
+question mark matches any single character. A left
+bracket (``['') introduces a character class. The end of
+the character class is indicated by a ``]''; if the ``]''
+is missing then the ``['' matches a ``['' rather than
+introducing a character class. A character class matches
+any of the characters between the square brackets. A
+range of characters may be specified using a minus sign.
+The character class may be complemented by making an
+exclamation point the first character of the character
+class.
+.LP
+To include a ``]'' in a character class, make it the first
+character listed (after the ``!'', if any). To include a
+minus sign, make it the first or last character listed
+
+.sp 2
+.B Builtins
+.sp
+.LP
+This section lists the builtin commands which
+are builtin because they need to perform some operation
+that can't be performed by a separate process. In addition to
+these, there are several other commands that may
+be builtin for efficiency (e.g. printf(1), echo(1), test(1),
+etc).
+.TP
+:
+A null command that returns a 0 (true) exit value.
+.TP
+\&. file
+The commands in the specified file are read and executed by the shell.
+.TP
+alias [ name[=string] ... ]
+If name=string is specified, the shell defines the
+alias ``name'' with value ``string''. If just ``name''
+is specified, the value of the alias ``name'' is printed.
+With no arguments, the alias builtin prints the
+names and values of all defined aliases (see unalias).
+.TP
+bg [ job ] ...
+Continue the specified jobs (or the current job if no
+jobs are given) in the background.
+.TP
+command command arg...
+Execute the specified builtin command. (This is useful when you
+have a shell function with the same name
+as a builtin command.)
+.TP
+cd [ directory ]
+Switch to the specified directory (default $HOME).
+If the an entry for CDPATH appears in the environment
+of the cd command or the shell variable CDPATH is set
+and the directory name does not begin with a slash,
+then the directories listed in CDPATH will be
+searched for the specified directory. The format of
+CDPATH is the same as that of PATH. In an interactive shell,
+the cd command will print out the name of
+the directory that it actually switched to if this is
+different from the name that the user gave. These
+may be different either because the CDPATH mechanism
+was used or because a symbolic link was crossed.
+.TP
+eval string...
+Concatenate all the arguments with spaces. Then
+re-parse and execute the command.
+.TP
+exec [ command arg... ]
+Unless command is omitted, the shell process is
+replaced with the specified program (which must be a
+real program, not a shell builtin or function). Any
+redirections on the exec command are marked as permanent,
+so that they are not undone when the exec command finishes.
+.TP
+exit [ exitstatus ]
+Terminate the shell process. If exitstatus is given
+it is used as the exit status of the shell; otherwise
+the exit status of the preceding command is used.
+.TP
+export name...
+The specified names are exported so that they will
+appear in the environment of subsequent commands.
+The only way to un-export a variable is to unset it.
+The shell allows the value of a variable to be set at the
+same time it is exported by writing
+.nf
+
+ export name=value
+
+.fi
+With no arguments the export command lists the names
+of all exported variables.
+.TP
+fc [-e editor] [first [last]]
+.TP
+fc -l [-nr] [first [last]]
+.TP
+fc -s [old=new] [first]
+The fc builtin lists, or edits and re-executes, commands
+previously entered to an interactive shell.
+.RS +.5i
+.TP 2
+-e editor
+Use the editor named by editor to edit the commands. The
+editor string is a command name, subject to search via the
+PATH variable. The value in the FCEDIT variable
+is used as a default when -e is not specified. If
+FCEDIT is null or unset, the value of the EDITOR
+variable is used. If EDITOR is null or unset,
+ed(1) is used as the editor.
+.TP 2
+-l (ell)
+List the commands rather than invoking
+an editor on them. The commands are written in the
+sequence indicated by the first and last operands, as
+affected by -r, with each command preceded by the command
+number.
+.TP 2
+-n
+Suppress command numbers when listing with -l.
+.TP 2
+-r
+Reverse the order of the commands listed (with -l) or
+edited (with neither -l nor -s).
+.TP 2
+-s
+Re-execute the command without invoking an editor.
+.TP 2
+first
+.TP 2
+last
+Select the commands to list or edit. The number of
+previous commands that can be accessed are determined
+by the value of the HISTSIZE variable. The value of first
+or last or both are one of the following:
+.TP 2
+[+]number
+A positive number representing a command
+number; command numbers can be displayed
+with the -l option.
+.TP 2
+-number
+A negative decimal number representing the
+command that was executed number of
+commands previously. For example, -1 is
+the immediately previous command.
+.TP 2
+string
+A string indicating the most recently
+entered command that begins with that
+string. If the old=new operand is not also
+specified with -s, the string form of the
+first operand cannot contain an embedded
+equal sign.
+.TP
+The following environment variables affect the execution of fc:
+.TP 2
+FCEDIT
+Name of the editor to use.
+.TP 2
+HISTSIZE
+The number of previous commands that are accessable.
+.RE
+.TP
+fg [ job ]
+Move the specified job or the current job to the
+foreground.
+.TP
+getopts optstring var
+The POSIX getopts command.
+The getopts command deprecates the older getopt command.
+The first argument should be a series of letters, each possibly
+followed by a colon which indicates that the option takes an argument.
+The specified variable is set to the parsed option. The index of
+the next argument is placed into the shell variable OPTIND.
+If an option takes an argument, it is placed into the shell variable
+OPTARG. If an invalid option is encountered, var is set to '?'.
+It returns a false value (1) when it encounters the end of the options.
+.TP
+hash -rv command...
+The shell maintains a hash table which remembers the
+locations of commands. With no arguments whatsoever,
+the hash command prints out the contents of this
+table. Entries which have not been looked at since
+the last cd command are marked with an asterisk; it
+is possible for these entries to be invalid.
+.sp
+With arguments, the hash command removes the specified commands
+from the hash table (unless they are
+functions) and then locates them. With the -v
+option, hash prints the locations of the commands as
+it finds them. The -r option causes the hash command
+to delete all the entries in the hash table except
+for functions.
+.TP
+jobid [ job ]
+Print the process id's of the processes in the job.
+If the job argument is omitted, use the current job.
+.TP
+jobs
+This command lists out all the background processes
+which are children of the current shell process.
+.TP
+pwd
+Print the current directory. The builtin command may
+differ from the program of the same name because the
+builtin command remembers what the current directory
+is rather than recomputing it each time. This makes
+it faster. However, if the current directory is
+renamed, the builtin version of pwd will continue to
+print the old name for the directory.
+.TP
+read [ -p prompt ] [ -e ] variable...
+The prompt is printed if the -p option is specified
+and the standard input is a terminal. Then a line is
+read from the standard input. The trailing newline
+is deleted from the line and the line is split as
+described in the section on word splitting above, and
+the pieces are assigned to the variables in order.
+If there are more pieces than variables, the remaining
+pieces (along with the characters in IFS that
+separated them) are assigned to the last variable.
+If there are more variables than pieces, the remaining
+variables are assigned the null string.
+.sp
+The -e option causes any backslashes in the input to
+be treated specially. If a backslash is followed by
+a newline, the backslash and the newline will be
+deleted. If a backslash is followed by any other
+character, the backslash will be deleted and the following
+character will be treated as though it were
+not in IFS, even if it is.
+.TP
+readonly name...
+The specified names are marked as read only, so that
+they cannot be subsequently modified or unset. The shell
+allows the value of a variable to be set at the same
+time it is marked read only by writing
+.TP
+readonly name=value
+With no arguments the readonly command lists the
+names of all read only variables.
+.TP
+set [ { -options | +options | -- } ] arg...
+The set command performs three different functions.
+.sp
+With no arguments, it lists the values of all shell
+variables.
+.sp
+If options are given, it sets the specified option
+flags, or clears them as described in the section
+called ``Argument List Processing''.
+.sp
+The third use of the set command is to set the values
+of the shell's positional parameters to the specified
+args. To change the positional parameters without
+changing any options, use ``--'' as the first argument
+to set. If no args are present, the set command
+will clear all the positional parameters (equivalent
+to executing ``shift $#''.
+.TP
+setvar variable value
+Assigns value to variable. (In general it is better
+to write variable=value rather than using setvar.
+Setvar is intended to be used in functions that
+assign values to variables whose names are passed as
+parameters.)
+.TP
+shift [ n ]
+Shift the positional parameters n times. A shift
+sets the value of $1 to the value of $2, the value of
+$2 to the value of $3, and so on, decreasing the
+value of $# by one. If there are zero positional
+parameters, shifting doesn't do anything.
+.TP
+trap [ action ] signal...
+Cause the shell to parse and execute action when any
+of the specified signals are received. The signals
+are specified by signal number. Action may be null
+or omitted; the former causes the specified signal to
+be ignored and the latter causes the default action
+to be taken. When the shell forks off a subshell, it
+resets trapped (but not ignored) signals to the
+default action. The trap command has no effect on
+signals that were ignored on entry to the shell.
+.TP
+type [name]...
+Interpret each name as a command and print the
+resolution of the command search. Possible resolutions are:
+shell keyword, alias, shell builtin, command, tracked alias
+and not found. For aliases the alias expansion is printed;
+for commands and tracked aliases the complete pathname of
+the command is printed.
+.TP
+ulimit [ -H | -S ] [ -a | -tfdscmlpn [ value ] ]
+Inquire about or set the hard or soft limits on processes or
+set new limits.
+The choice between hard limit (which no process is allowed to
+violate, and which may not be raised once it has been lowered)
+and soft limit (which causes processes to be signalled but not
+necessarily killed, and which may be raised) is made with these flags:
+.RS +.5i
+.TP 2
+-H set or inquire about hard limits
+.TP 2
+-S set or inquire about soft limits
+If neither -H nor -S
+is specified, the soft limit is displayed or both limits are set.
+If both are specified, the last one wins.
+.LP 2
+The limit to be interrogated or set, then, is chosen by specifying
+any one of these flags:
+.TP 2
+-a
+show all the current limits
+.TP 2
+-t
+show or set the limit on CPU time (in seconds)
+.TP 2
+-f
+show or set the limit on the largest file that can be created
+(in 512-byte blocks)
+.TP 2
+-d
+show or set the limit on the data segment size of a process (in kilobytes)
+.TP 2
+-s
+show or set the limit on the stack size of a process (in kilobytes)
+.TP 2
+-c
+show or set the limit on the largest core dump size that can be produced
+(in 512-byte blocks)
+.TP 2
+-m
+show or set the limit on the total physical memory that can be
+in use by a process (in kilobytes)
+.TP 2
+-l
+show or set the limit on how much memory a process can lock with
+.Xr mlock 2
+(in kilobytes)
+.TP 2
+-p
+show or set the limit on the number of processes this user can
+have at one time
+.TP 2
+-n
+show or set the limit on the number files a process can have open at once
+.LP 2
+If none of these is specified, it is the limit on file size
+that is shown or set.
+If value is specified, the limit is set to that number;
+otherwise the current limit is displayed.
+.RE
+.TP
+umask [ mask ]
+Set the value of umask (see umask(2)) to the specified
+octal value. If the argument is omitted, the
+umask value is printed.
+.TP
+unalias [-a] [name]
+If ``name'' is specified, the shell removes that alias.
+If ``-a'' is specified, all aliases are removed.
+.TP
+unset name...
+The specified variables and functions are unset and
+unexported. If a given name corresponds to both a
+variable and a function, both the variable and the
+function are unset.
+.TP
+wait [ job ]
+Wait for the specified job to complete and return the
+exit status of the last process in the job. If the
+argument is omitted, wait for all jobs to complete
+and the return an exit status of zero.
+.LP
+.sp 2
+.B Command Line Editing
+.sp
+.LP
+When sh is being used interactively from a terminal, the current command
+and the command history (see fc in Builtins) can be edited using vi-mode
+command-line editing. This mode uses commands, described below, similar
+to a subset of those described in the vi man page.
+The command set -o vi enables vi-mode editing and place sh into vi
+insert mode.
+With vi-mode enabled, sh can be switched between insert mode and command
+mode. The editor is not described in full here, but will be in a later
+document. It's similar to vi: typing <ESC> will throw you into
+command VI command mode. Hitting <return> while in command mode
+will pass the line to the shell.
+.SH HISTORY
+A
+.I sh
+command appeared in
+Version 1 AT&T UNIX.
+It was, however, unmaintainable so we wrote this one.
diff --git a/release/picobsd/tinyware/ash/shell.h b/release/picobsd/tinyware/ash/shell.h
new file mode 100644
index 0000000..95012d1e
--- /dev/null
+++ b/release/picobsd/tinyware/ash/shell.h
@@ -0,0 +1,83 @@
+/* $NetBSD: shell.h,v 1.10 1996/10/16 15:21:49 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)shell.h 8.2 (Berkeley) 5/4/95
+ */
+
+/*
+ * The follow should be set to reflect the type of system you have:
+ * JOBS -> 1 if you have Berkeley job control, 0 otherwise.
+ * SHORTNAMES -> 1 if your linker cannot handle long names.
+ * define BSD if you are running 4.2 BSD or later.
+ * define SYSV if you are running under System V.
+ * define DEBUG=1 to compile in debugging (set global "debug" to turn on)
+ * define DEBUG=2 to compile in and turn on debugging.
+ *
+ * When debugging is on, debugging info will be written to $HOME/trace and
+ * a quit signal will generate a core dump.
+ */
+
+
+#define JOBS 1
+#ifndef BSD
+#define BSD 1
+#endif
+
+#ifdef __STDC__
+typedef void *pointer;
+#ifndef NULL
+#define NULL (void *)0
+#endif
+#else /* not __STDC__ */
+typedef char *pointer;
+#ifndef NULL
+#define NULL 0
+#endif
+#endif /* not __STDC__ */
+#define STATIC /* empty */
+#define MKINIT /* empty */
+
+#include <sys/cdefs.h>
+
+extern char nullstr[1]; /* null string */
+
+
+#ifdef DEBUG
+#define TRACE(param) trace param
+#else
+#define TRACE(param)
+#endif
diff --git a/release/picobsd/tinyware/ash/show.c b/release/picobsd/tinyware/ash/show.c
new file mode 100644
index 0000000..4316645
--- /dev/null
+++ b/release/picobsd/tinyware/ash/show.c
@@ -0,0 +1,446 @@
+/* $NetBSD: show.c,v 1.15 1997/07/04 21:02:22 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: show.c,v 1.15 1997/07/04 21:02:22 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <stdio.h>
+#ifdef __STDC__
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+
+#include "shell.h"
+#include "parser.h"
+#include "nodes.h"
+#include "mystring.h"
+#include "show.h"
+
+
+#ifdef DEBUG
+static void shtree __P((union node *, int, char *, FILE*));
+static void shcmd __P((union node *, FILE *));
+static void sharg __P((union node *, FILE *));
+static void indent __P((int, char *, FILE *));
+static void trstring __P((char *));
+
+
+void
+showtree(n)
+ union node *n;
+{
+ trputs("showtree called\n");
+ shtree(n, 1, NULL, stdout);
+}
+
+
+static void
+shtree(n, ind, pfx, fp)
+ union node *n;
+ int ind;
+ char *pfx;
+ FILE *fp;
+{
+ struct nodelist *lp;
+ char *s;
+
+ if (n == NULL)
+ return;
+
+ indent(ind, pfx, fp);
+ switch(n->type) {
+ case NSEMI:
+ s = "; ";
+ goto binop;
+ case NAND:
+ s = " && ";
+ goto binop;
+ case NOR:
+ s = " || ";
+binop:
+ shtree(n->nbinary.ch1, ind, NULL, fp);
+ /* if (ind < 0) */
+ fputs(s, fp);
+ shtree(n->nbinary.ch2, ind, NULL, fp);
+ break;
+ case NCMD:
+ shcmd(n, fp);
+ if (ind >= 0)
+ putc('\n', fp);
+ break;
+ case NPIPE:
+ for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
+ shcmd(lp->n, fp);
+ if (lp->next)
+ fputs(" | ", fp);
+ }
+ if (n->npipe.backgnd)
+ fputs(" &", fp);
+ if (ind >= 0)
+ putc('\n', fp);
+ break;
+ default:
+ fprintf(fp, "<node type %d>", n->type);
+ if (ind >= 0)
+ putc('\n', fp);
+ break;
+ }
+}
+
+
+
+static void
+shcmd(cmd, fp)
+ union node *cmd;
+ FILE *fp;
+{
+ union node *np;
+ int first;
+ char *s;
+ int dftfd;
+
+ first = 1;
+ for (np = cmd->ncmd.args ; np ; np = np->narg.next) {
+ if (! first)
+ putchar(' ');
+ sharg(np, fp);
+ first = 0;
+ }
+ for (np = cmd->ncmd.redirect ; np ; np = np->nfile.next) {
+ if (! first)
+ putchar(' ');
+ switch (np->nfile.type) {
+ case NTO: s = ">"; dftfd = 1; break;
+ case NAPPEND: s = ">>"; dftfd = 1; break;
+ case NTOFD: s = ">&"; dftfd = 1; break;
+ case NFROM: s = "<"; dftfd = 0; break;
+ case NFROMFD: s = "<&"; dftfd = 0; break;
+ default: s = "*error*"; dftfd = 0; break;
+ }
+ if (np->nfile.fd != dftfd)
+ fprintf(fp, "%d", np->nfile.fd);
+ fputs(s, fp);
+ if (np->nfile.type == NTOFD || np->nfile.type == NFROMFD) {
+ fprintf(fp, "%d", np->ndup.dupfd);
+ } else {
+ sharg(np->nfile.fname, fp);
+ }
+ first = 0;
+ }
+}
+
+
+
+static void
+sharg(arg, fp)
+ union node *arg;
+ FILE *fp;
+ {
+ char *p;
+ struct nodelist *bqlist;
+ int subtype;
+
+ if (arg->type != NARG) {
+ printf("<node type %d>\n", arg->type);
+ fflush(stdout);
+ abort();
+ }
+ bqlist = arg->narg.backquote;
+ for (p = arg->narg.text ; *p ; p++) {
+ switch (*p) {
+ case CTLESC:
+ putc(*++p, fp);
+ break;
+ case CTLVAR:
+ putc('$', fp);
+ putc('{', fp);
+ subtype = *++p;
+ if (subtype == VSLENGTH)
+ putc('#', fp);
+
+ while (*p != '=')
+ putc(*p++, fp);
+
+ if (subtype & VSNUL)
+ putc(':', fp);
+
+ switch (subtype & VSTYPE) {
+ case VSNORMAL:
+ putc('}', fp);
+ break;
+ case VSMINUS:
+ putc('-', fp);
+ break;
+ case VSPLUS:
+ putc('+', fp);
+ break;
+ case VSQUESTION:
+ putc('?', fp);
+ break;
+ case VSASSIGN:
+ putc('=', fp);
+ break;
+ case VSTRIMLEFT:
+ putc('#', fp);
+ break;
+ case VSTRIMLEFTMAX:
+ putc('#', fp);
+ putc('#', fp);
+ break;
+ case VSTRIMRIGHT:
+ putc('%', fp);
+ break;
+ case VSTRIMRIGHTMAX:
+ putc('%', fp);
+ putc('%', fp);
+ break;
+ case VSLENGTH:
+ break;
+ default:
+ printf("<subtype %d>", subtype);
+ }
+ break;
+ case CTLENDVAR:
+ putc('}', fp);
+ break;
+ case CTLBACKQ:
+ case CTLBACKQ|CTLQUOTE:
+ putc('$', fp);
+ putc('(', fp);
+ shtree(bqlist->n, -1, NULL, fp);
+ putc(')', fp);
+ break;
+ default:
+ putc(*p, fp);
+ break;
+ }
+ }
+}
+
+
+static void
+indent(amount, pfx, fp)
+ int amount;
+ char *pfx;
+ FILE *fp;
+{
+ int i;
+
+ for (i = 0 ; i < amount ; i++) {
+ if (pfx && i == amount - 1)
+ fputs(pfx, fp);
+ putc('\t', fp);
+ }
+}
+#endif
+
+
+
+/*
+ * Debugging stuff.
+ */
+
+
+FILE *tracefile;
+
+#if DEBUG == 2
+int debug = 1;
+#else
+int debug = 0;
+#endif
+
+
+#ifdef DEBUG
+void
+trputc(c)
+ int c;
+{
+ if (tracefile == NULL)
+ return;
+ putc(c, tracefile);
+ if (c == '\n')
+ fflush(tracefile);
+}
+#endif
+
+void
+#ifdef __STDC__
+trace(const char *fmt, ...)
+#else
+trace(va_alist)
+ va_dcl
+#endif
+{
+#ifdef DEBUG
+ va_list va;
+#ifdef __STDC__
+ va_start(va, fmt);
+#else
+ char *fmt;
+ va_start(va);
+ fmt = va_arg(va, char *);
+#endif
+ if (tracefile != NULL) {
+ (void) vfprintf(tracefile, fmt, va);
+ if (strchr(fmt, '\n'))
+ (void) fflush(tracefile);
+ }
+ va_end(va);
+#endif
+}
+
+
+#ifdef DEBUG
+void
+trputs(s)
+ char *s;
+{
+ if (tracefile == NULL)
+ return;
+ fputs(s, tracefile);
+ if (strchr(s, '\n'))
+ fflush(tracefile);
+}
+
+
+static void
+trstring(s)
+ char *s;
+{
+ char *p;
+ char c;
+
+ if (tracefile == NULL)
+ return;
+ putc('"', tracefile);
+ for (p = s ; *p ; p++) {
+ switch (*p) {
+ case '\n': c = 'n'; goto backslash;
+ case '\t': c = 't'; goto backslash;
+ case '\r': c = 'r'; goto backslash;
+ case '"': c = '"'; goto backslash;
+ case '\\': c = '\\'; goto backslash;
+ case CTLESC: c = 'e'; goto backslash;
+ case CTLVAR: c = 'v'; goto backslash;
+ case CTLVAR+CTLQUOTE: c = 'V'; goto backslash;
+ case CTLBACKQ: c = 'q'; goto backslash;
+ case CTLBACKQ+CTLQUOTE: c = 'Q'; goto backslash;
+backslash: putc('\\', tracefile);
+ putc(c, tracefile);
+ break;
+ default:
+ if (*p >= ' ' && *p <= '~')
+ putc(*p, tracefile);
+ else {
+ putc('\\', tracefile);
+ putc(*p >> 6 & 03, tracefile);
+ putc(*p >> 3 & 07, tracefile);
+ putc(*p & 07, tracefile);
+ }
+ break;
+ }
+ }
+ putc('"', tracefile);
+}
+#endif
+
+
+void
+trargs(ap)
+ char **ap;
+{
+#ifdef DEBUG
+ if (tracefile == NULL)
+ return;
+ while (*ap) {
+ trstring(*ap++);
+ if (*ap)
+ putc(' ', tracefile);
+ else
+ putc('\n', tracefile);
+ }
+ fflush(tracefile);
+#endif
+}
+
+
+#ifdef DEBUG
+void
+opentrace() {
+ char s[100];
+ char *getenv();
+#ifdef O_APPEND
+ int flags;
+#endif
+
+ if (!debug)
+ return;
+#ifdef not_this_way
+ {
+ char *p;
+ if ((p = getenv("HOME")) == NULL) {
+ if (geteuid() == 0)
+ p = "/";
+ else
+ p = "/tmp";
+ }
+ scopy(p, s);
+ strcat(s, "/trace");
+ }
+#else
+ scopy("./trace", s);
+#endif /* not_this_way */
+ if ((tracefile = fopen(s, "a")) == NULL) {
+ fprintf(stderr, "Can't open %s\n", s);
+ return;
+ }
+#ifdef O_APPEND
+ if ((flags = fcntl(fileno(tracefile), F_GETFL, 0)) >= 0)
+ fcntl(fileno(tracefile), F_SETFL, flags | O_APPEND);
+#endif
+ fputs("\nTracing started.\n", tracefile);
+ fflush(tracefile);
+}
+#endif /* DEBUG */
diff --git a/release/picobsd/tinyware/ash/show.h b/release/picobsd/tinyware/ash/show.h
new file mode 100644
index 0000000..03a6f6e
--- /dev/null
+++ b/release/picobsd/tinyware/ash/show.h
@@ -0,0 +1,46 @@
+/* $NetBSD: show.h,v 1.3 1997/04/11 22:58:40 christos Exp $ */
+
+/*-
+ * Copyright (c) 1995
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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.
+ *
+ * @(#)show.h 1.1 (Berkeley) 5/4/95
+ */
+
+union node;
+void showtree __P((union node *));
+void trace __P((const char *, ...));
+void trargs __P((char **));
+#ifdef DEBUG
+void trputc __P((int));
+void trputs __P((char *));
+void opentrace __P((void));
+#endif
diff --git a/release/picobsd/tinyware/ash/trap.c b/release/picobsd/tinyware/ash/trap.c
new file mode 100644
index 0000000..dc5e1c8
--- /dev/null
+++ b/release/picobsd/tinyware/ash/trap.c
@@ -0,0 +1,383 @@
+/* $NetBSD: trap.c,v 1.17 1997/07/04 21:02:24 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95";
+#else
+__RCSID("$NetBSD: trap.c,v 1.17 1997/07/04 21:02:24 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "shell.h"
+#include "main.h"
+#include "nodes.h" /* for other headers */
+#include "eval.h"
+#include "jobs.h"
+#include "show.h"
+#include "options.h"
+#include "syntax.h"
+#include "output.h"
+#include "memalloc.h"
+#include "error.h"
+#include "trap.h"
+#include "mystring.h"
+
+
+/*
+ * Sigmode records the current value of the signal handlers for the various
+ * modes. A value of zero means that the current handler is not known.
+ * S_HARD_IGN indicates that the signal was ignored on entry to the shell,
+ */
+
+#define S_DFL 1 /* default signal handling (SIG_DFL) */
+#define S_CATCH 2 /* signal is caught */
+#define S_IGN 3 /* signal is ignored (SIG_IGN) */
+#define S_HARD_IGN 4 /* signal is ignored permenantly */
+#define S_RESET 5 /* temporary - to reset a hard ignored sig */
+
+
+extern char nullstr[1]; /* null string */
+
+char *trap[NSIG+1]; /* trap handler commands */
+MKINIT char sigmode[NSIG]; /* current value of signal */
+char gotsig[NSIG]; /* indicates specified signal received */
+int pendingsigs; /* indicates some signal received */
+
+static int getsigaction __P((int, sig_t *));
+
+/*
+ * The trap builtin.
+ */
+
+int
+trapcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *action;
+ char **ap;
+ int signo;
+
+ if (argc <= 1) {
+ for (signo = 0 ; signo <= NSIG ; signo++) {
+ if (trap[signo] != NULL)
+ out1fmt("%d: %s\n", signo, trap[signo]);
+ }
+ return 0;
+ }
+ ap = argv + 1;
+ if (is_number(*ap))
+ action = NULL;
+ else
+ action = *ap++;
+ while (*ap) {
+ if ((signo = number(*ap)) < 0 || signo > NSIG)
+ error("%s: bad trap", *ap);
+ INTOFF;
+ if (action)
+ action = savestr(action);
+ if (trap[signo])
+ ckfree(trap[signo]);
+ trap[signo] = action;
+ if (signo != 0)
+ setsignal(signo);
+ INTON;
+ ap++;
+ }
+ return 0;
+}
+
+
+
+/*
+ * Clear traps on a fork.
+ */
+
+void
+clear_traps() {
+ char **tp;
+
+ for (tp = trap ; tp <= &trap[NSIG] ; tp++) {
+ if (*tp && **tp) { /* trap not NULL or SIG_IGN */
+ INTOFF;
+ ckfree(*tp);
+ *tp = NULL;
+ if (tp != &trap[0])
+ setsignal(tp - trap);
+ INTON;
+ }
+ }
+}
+
+
+
+/*
+ * Set the signal handler for the specified signal. The routine figures
+ * out what it should be set to.
+ */
+
+long
+setsignal(signo)
+ int signo;
+{
+ int action;
+ sig_t sigact = SIG_DFL;
+ char *t;
+
+ if ((t = trap[signo]) == NULL)
+ action = S_DFL;
+ else if (*t != '\0')
+ action = S_CATCH;
+ else
+ action = S_IGN;
+ if (rootshell && action == S_DFL) {
+ switch (signo) {
+ case SIGINT:
+ if (iflag)
+ action = S_CATCH;
+ break;
+ case SIGQUIT:
+#ifdef DEBUG
+ {
+ extern int debug;
+
+ if (debug)
+ break;
+ }
+#endif
+ /* FALLTHROUGH */
+ case SIGTERM:
+ if (iflag)
+ action = S_IGN;
+ break;
+#if JOBS
+ case SIGTSTP:
+ case SIGTTOU:
+ if (mflag)
+ action = S_IGN;
+ break;
+#endif
+ }
+ }
+
+ t = &sigmode[signo - 1];
+ if (*t == 0) {
+ /*
+ * current setting unknown
+ */
+ if (!getsigaction(signo, &sigact)) {
+ /*
+ * Pretend it worked; maybe we should give a warning
+ * here, but other shells don't. We don't alter
+ * sigmode, so that we retry every time.
+ */
+ return 0;
+ }
+ if (sigact == SIG_IGN) {
+ if (mflag && (signo == SIGTSTP ||
+ signo == SIGTTIN || signo == SIGTTOU)) {
+ *t = S_IGN; /* don't hard ignore these */
+ } else
+ *t = S_HARD_IGN;
+ } else {
+ *t = S_RESET; /* force to be set */
+ }
+ }
+ if (*t == S_HARD_IGN || *t == action)
+ return 0;
+ switch (action) {
+ case S_DFL: sigact = SIG_DFL; break;
+ case S_CATCH: sigact = onsig; break;
+ case S_IGN: sigact = SIG_IGN; break;
+ }
+ *t = action;
+ return (long)signal(signo, sigact);
+}
+
+/*
+ * Return the current setting for sig w/o changing it.
+ */
+static int
+getsigaction(signo, sigact)
+ int signo;
+ sig_t *sigact;
+{
+ struct sigaction sa;
+
+ if (sigaction(signo, (struct sigaction *)0, &sa) == -1)
+ return 0;
+ *sigact = (sig_t) sa.sa_handler;
+ return 1;
+}
+
+/*
+ * Ignore a signal.
+ */
+
+void
+ignoresig(signo)
+ int signo;
+{
+ if (sigmode[signo - 1] != S_IGN && sigmode[signo - 1] != S_HARD_IGN) {
+ signal(signo, SIG_IGN);
+ }
+ sigmode[signo - 1] = S_HARD_IGN;
+}
+
+
+#ifdef mkinit
+INCLUDE <signal.h>
+INCLUDE "trap.h"
+
+SHELLPROC {
+ char *sm;
+
+ clear_traps();
+ for (sm = sigmode ; sm < sigmode + NSIG ; sm++) {
+ if (*sm == S_IGN)
+ *sm = S_HARD_IGN;
+ }
+}
+#endif
+
+
+
+/*
+ * Signal handler.
+ */
+
+void
+onsig(signo)
+ int signo;
+{
+ signal(signo, onsig);
+ if (signo == SIGINT && trap[SIGINT] == NULL) {
+ onint();
+ return;
+ }
+ gotsig[signo - 1] = 1;
+ pendingsigs++;
+}
+
+
+
+/*
+ * Called to execute a trap. Perhaps we should avoid entering new trap
+ * handlers while we are executing a trap handler.
+ */
+
+void
+dotrap() {
+ int i;
+ int savestatus;
+
+ for (;;) {
+ for (i = 1 ; ; i++) {
+ if (gotsig[i - 1])
+ break;
+ if (i >= NSIG)
+ goto done;
+ }
+ gotsig[i - 1] = 0;
+ savestatus=exitstatus;
+ evalstring(trap[i]);
+ exitstatus=savestatus;
+ }
+done:
+ pendingsigs = 0;
+}
+
+
+
+/*
+ * Controls whether the shell is interactive or not.
+ */
+
+
+void
+setinteractive(on)
+ int on;
+{
+ static int is_interactive;
+
+ if (on == is_interactive)
+ return;
+ setsignal(SIGINT);
+ setsignal(SIGQUIT);
+ setsignal(SIGTERM);
+ is_interactive = on;
+}
+
+
+
+/*
+ * Called to exit the shell.
+ */
+
+void
+exitshell(status)
+ int status;
+{
+ struct jmploc loc1, loc2;
+ char *p;
+
+ TRACE(("exitshell(%d) pid=%d\n", status, getpid()));
+ if (setjmp(loc1.loc)) {
+ goto l1;
+ }
+ if (setjmp(loc2.loc)) {
+ goto l2;
+ }
+ handler = &loc1;
+ if ((p = trap[0]) != NULL && *p != '\0') {
+ trap[0] = NULL;
+ evalstring(p);
+ }
+l1: handler = &loc2; /* probably unnecessary */
+ flushall();
+#if JOBS
+ setjobctl(0);
+#endif
+l2: _exit(status);
+}
diff --git a/release/picobsd/tinyware/ash/trap.h b/release/picobsd/tinyware/ash/trap.h
new file mode 100644
index 0000000..00ea79c
--- /dev/null
+++ b/release/picobsd/tinyware/ash/trap.h
@@ -0,0 +1,50 @@
+/* $NetBSD: trap.h,v 1.11 1996/10/16 15:45:20 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)trap.h 8.3 (Berkeley) 6/5/95
+ */
+
+extern int pendingsigs;
+
+int trapcmd __P((int, char **));
+void clear_traps __P((void));
+long setsignal __P((int));
+void ignoresig __P((int));
+void onsig __P((int));
+void dotrap __P((void));
+void setinteractive __P((int));
+void exitshell __P((int));
diff --git a/release/picobsd/tinyware/ash/var.c b/release/picobsd/tinyware/ash/var.c
new file mode 100644
index 0000000..7b8a1e7
--- /dev/null
+++ b/release/picobsd/tinyware/ash/var.c
@@ -0,0 +1,754 @@
+/* $NetBSD: var.c,v 1.19 1997/07/04 21:02:25 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+#ifndef lint
+#if 0
+static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
+#else
+__RCSID("$NetBSD: var.c,v 1.19 1997/07/04 21:02:25 christos Exp $");
+#endif
+#endif /* not lint */
+
+#include <unistd.h>
+#include <stdlib.h>
+
+/*
+ * Shell variables.
+ */
+
+#include "shell.h"
+#include "output.h"
+#include "expand.h"
+#include "nodes.h" /* for other headers */
+#include "eval.h" /* defines cmdenviron */
+#include "exec.h"
+#include "syntax.h"
+#include "options.h"
+#include "mail.h"
+#include "var.h"
+#include "memalloc.h"
+#include "error.h"
+#include "mystring.h"
+#include "parser.h"
+#ifndef SMALL
+#include "myhistedit.h"
+#endif
+
+
+#define VTABSIZE 39
+
+
+struct varinit {
+ struct var *var;
+ int flags;
+ char *text;
+ void (*func) __P((const char *));
+};
+
+
+#if ATTY
+struct var vatty;
+#endif
+#ifndef SMALL
+struct var vhistsize;
+struct var vterm;
+#endif
+struct var vifs;
+struct var vmail;
+struct var vmpath;
+struct var vpath;
+struct var vps1;
+struct var vps2;
+struct var vvers;
+struct var voptind;
+
+const struct varinit varinit[] = {
+#if ATTY
+ { &vatty, VSTRFIXED|VTEXTFIXED|VUNSET, "ATTY=",
+ NULL },
+#endif
+#ifndef SMALL
+ { &vhistsize, VSTRFIXED|VTEXTFIXED|VUNSET, "HISTSIZE=",
+ sethistsize },
+#endif
+ { &vifs, VSTRFIXED|VTEXTFIXED, "IFS= \t\n",
+ NULL },
+ { &vmail, VSTRFIXED|VTEXTFIXED|VUNSET, "MAIL=",
+ NULL },
+ { &vmpath, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH=",
+ NULL },
+ { &vpath, VSTRFIXED|VTEXTFIXED, "PATH=/bin:/usr/bin",
+ changepath },
+ /*
+ * vps1 depends on uid
+ */
+ { &vps2, VSTRFIXED|VTEXTFIXED, "PS2=> ",
+ NULL },
+#ifndef SMALL
+ { &vterm, VSTRFIXED|VTEXTFIXED|VUNSET, "TERM=",
+ setterm },
+#endif
+ { &voptind, VSTRFIXED|VTEXTFIXED, "OPTIND=1",
+ getoptsreset },
+ { NULL, 0, NULL,
+ NULL }
+};
+
+struct var *vartab[VTABSIZE];
+
+STATIC struct var **hashvar __P((char *));
+STATIC int varequal __P((char *, char *));
+
+/*
+ * Initialize the varable symbol tables and import the environment
+ */
+
+#ifdef mkinit
+INCLUDE "var.h"
+INIT {
+ char **envp;
+ extern char **environ;
+
+ initvar();
+ for (envp = environ ; *envp ; envp++) {
+ if (strchr(*envp, '=')) {
+ setvareq(*envp, VEXPORT|VTEXTFIXED);
+ }
+ }
+}
+#endif
+
+
+/*
+ * This routine initializes the builtin variables. It is called when the
+ * shell is initialized and again when a shell procedure is spawned.
+ */
+
+void
+initvar() {
+ const struct varinit *ip;
+ struct var *vp;
+ struct var **vpp;
+
+ for (ip = varinit ; (vp = ip->var) != NULL ; ip++) {
+ if ((vp->flags & VEXPORT) == 0) {
+ vpp = hashvar(ip->text);
+ vp->next = *vpp;
+ *vpp = vp;
+ vp->text = ip->text;
+ vp->flags = ip->flags;
+ vp->func = ip->func;
+ }
+ }
+ /*
+ * PS1 depends on uid
+ */
+ if ((vps1.flags & VEXPORT) == 0) {
+ vpp = hashvar("PS1=");
+ vps1.next = *vpp;
+ *vpp = &vps1;
+ vps1.text = geteuid() ? "PS1=$ " : "PS1=# ";
+ vps1.flags = VSTRFIXED|VTEXTFIXED;
+ }
+}
+
+/*
+ * Safe version of setvar, returns 1 on success 0 on failure.
+ */
+
+int
+setvarsafe(name, val, flags)
+ char *name, *val;
+ int flags;
+{
+ struct jmploc jmploc;
+ struct jmploc *volatile savehandler = handler;
+ int err = 0;
+#ifdef __GNUC__
+ (void) &err;
+#endif
+
+ if (setjmp(jmploc.loc))
+ err = 1;
+ else {
+ handler = &jmploc;
+ setvar(name, val, flags);
+ }
+ handler = savehandler;
+ return err;
+}
+
+/*
+ * Set the value of a variable. The flags argument is ored with the
+ * flags of the variable. If val is NULL, the variable is unset.
+ */
+
+void
+setvar(name, val, flags)
+ char *name, *val;
+ int flags;
+{
+ char *p, *q;
+ int len;
+ int namelen;
+ char *nameeq;
+ int isbad;
+
+ isbad = 0;
+ p = name;
+ if (! is_name(*p))
+ isbad = 1;
+ p++;
+ for (;;) {
+ if (! is_in_name(*p)) {
+ if (*p == '\0' || *p == '=')
+ break;
+ isbad = 1;
+ }
+ p++;
+ }
+ namelen = p - name;
+ if (isbad)
+ error("%.*s: bad variable name", namelen, name);
+ len = namelen + 2; /* 2 is space for '=' and '\0' */
+ if (val == NULL) {
+ flags |= VUNSET;
+ } else {
+ len += strlen(val);
+ }
+ p = nameeq = ckmalloc(len);
+ q = name;
+ while (--namelen >= 0)
+ *p++ = *q++;
+ *p++ = '=';
+ *p = '\0';
+ if (val)
+ scopy(val, p);
+ setvareq(nameeq, flags);
+}
+
+
+
+/*
+ * Same as setvar except that the variable and value are passed in
+ * the first argument as name=value. Since the first argument will
+ * be actually stored in the table, it should not be a string that
+ * will go away.
+ */
+
+void
+setvareq(s, flags)
+ char *s;
+ int flags;
+{
+ struct var *vp, **vpp;
+
+ vpp = hashvar(s);
+ for (vp = *vpp ; vp ; vp = vp->next) {
+ if (varequal(s, vp->text)) {
+ if (vp->flags & VREADONLY) {
+ size_t len = strchr(s, '=') - s;
+ error("%.*s: is read only", len, s);
+ }
+ INTOFF;
+
+ if (vp->func && (flags & VNOFUNC) == 0)
+ (*vp->func)(strchr(s, '=') + 1);
+
+ if ((vp->flags & (VTEXTFIXED|VSTACK)) == 0)
+ ckfree(vp->text);
+
+ vp->flags &= ~(VTEXTFIXED|VSTACK|VUNSET);
+ vp->flags |= flags;
+ vp->text = s;
+
+ /*
+ * We could roll this to a function, to handle it as
+ * a regular variable function callback, but why bother?
+ */
+ if (vp == &vmpath || (vp == &vmail && ! mpathset()))
+ chkmail(1);
+ INTON;
+ return;
+ }
+ }
+ /* not found */
+ vp = ckmalloc(sizeof (*vp));
+ vp->flags = flags;
+ vp->text = s;
+ vp->next = *vpp;
+ vp->func = NULL;
+ *vpp = vp;
+}
+
+
+
+/*
+ * Process a linked list of variable assignments.
+ */
+
+void
+listsetvar(list)
+ struct strlist *list;
+ {
+ struct strlist *lp;
+
+ INTOFF;
+ for (lp = list ; lp ; lp = lp->next) {
+ setvareq(savestr(lp->text), 0);
+ }
+ INTON;
+}
+
+
+
+/*
+ * Find the value of a variable. Returns NULL if not set.
+ */
+
+char *
+lookupvar(name)
+ char *name;
+ {
+ struct var *v;
+
+ for (v = *hashvar(name) ; v ; v = v->next) {
+ if (varequal(v->text, name)) {
+ if (v->flags & VUNSET)
+ return NULL;
+ return strchr(v->text, '=') + 1;
+ }
+ }
+ return NULL;
+}
+
+
+
+/*
+ * Search the environment of a builtin command. If the second argument
+ * is nonzero, return the value of a variable even if it hasn't been
+ * exported.
+ */
+
+char *
+bltinlookup(name, doall)
+ char *name;
+ int doall;
+{
+ struct strlist *sp;
+ struct var *v;
+
+ for (sp = cmdenviron ; sp ; sp = sp->next) {
+ if (varequal(sp->text, name))
+ return strchr(sp->text, '=') + 1;
+ }
+ for (v = *hashvar(name) ; v ; v = v->next) {
+ if (varequal(v->text, name)) {
+ if ((v->flags & VUNSET)
+ || (!doall && (v->flags & VEXPORT) == 0))
+ return NULL;
+ return strchr(v->text, '=') + 1;
+ }
+ }
+ return NULL;
+}
+
+
+
+/*
+ * Generate a list of exported variables. This routine is used to construct
+ * the third argument to execve when executing a program.
+ */
+
+char **
+environment() {
+ int nenv;
+ struct var **vpp;
+ struct var *vp;
+ char **env, **ep;
+
+ nenv = 0;
+ for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
+ for (vp = *vpp ; vp ; vp = vp->next)
+ if (vp->flags & VEXPORT)
+ nenv++;
+ }
+ ep = env = stalloc((nenv + 1) * sizeof *env);
+ for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
+ for (vp = *vpp ; vp ; vp = vp->next)
+ if (vp->flags & VEXPORT)
+ *ep++ = vp->text;
+ }
+ *ep = NULL;
+ return env;
+}
+
+
+/*
+ * Called when a shell procedure is invoked to clear out nonexported
+ * variables. It is also necessary to reallocate variables of with
+ * VSTACK set since these are currently allocated on the stack.
+ */
+
+#ifdef mkinit
+MKINIT void shprocvar __P((void));
+
+SHELLPROC {
+ shprocvar();
+}
+#endif
+
+void
+shprocvar() {
+ struct var **vpp;
+ struct var *vp, **prev;
+
+ for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
+ for (prev = vpp ; (vp = *prev) != NULL ; ) {
+ if ((vp->flags & VEXPORT) == 0) {
+ *prev = vp->next;
+ if ((vp->flags & VTEXTFIXED) == 0)
+ ckfree(vp->text);
+ if ((vp->flags & VSTRFIXED) == 0)
+ ckfree(vp);
+ } else {
+ if (vp->flags & VSTACK) {
+ vp->text = savestr(vp->text);
+ vp->flags &=~ VSTACK;
+ }
+ prev = &vp->next;
+ }
+ }
+ }
+ initvar();
+}
+
+
+
+/*
+ * Command to list all variables which are set. Currently this command
+ * is invoked from the set command when the set command is called without
+ * any variables.
+ */
+
+int
+showvarscmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct var **vpp;
+ struct var *vp;
+
+ for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
+ for (vp = *vpp ; vp ; vp = vp->next) {
+ if ((vp->flags & VUNSET) == 0)
+ out1fmt("%s\n", vp->text);
+ }
+ }
+ return 0;
+}
+
+
+
+/*
+ * The export and readonly commands.
+ */
+
+int
+exportcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ struct var **vpp;
+ struct var *vp;
+ char *name;
+ char *p;
+ int flag = argv[0][0] == 'r'? VREADONLY : VEXPORT;
+
+ listsetvar(cmdenviron);
+ if (argc > 1) {
+ while ((name = *argptr++) != NULL) {
+ if ((p = strchr(name, '=')) != NULL) {
+ p++;
+ } else {
+ vpp = hashvar(name);
+ for (vp = *vpp ; vp ; vp = vp->next) {
+ if (varequal(vp->text, name)) {
+ vp->flags |= flag;
+ goto found;
+ }
+ }
+ }
+ setvar(name, p, flag);
+found:;
+ }
+ } else {
+ for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
+ for (vp = *vpp ; vp ; vp = vp->next) {
+ if (vp->flags & flag) {
+ for (p = vp->text ; *p != '=' ; p++)
+ out1c(*p);
+ out1c('\n');
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+
+/*
+ * The "local" command.
+ */
+
+int
+localcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char *name;
+
+ if (! in_function())
+ error("Not in a function");
+ while ((name = *argptr++) != NULL) {
+ mklocal(name);
+ }
+ return 0;
+}
+
+
+/*
+ * Make a variable a local variable. When a variable is made local, it's
+ * value and flags are saved in a localvar structure. The saved values
+ * will be restored when the shell function returns. We handle the name
+ * "-" as a special case.
+ */
+
+void
+mklocal(name)
+ char *name;
+ {
+ struct localvar *lvp;
+ struct var **vpp;
+ struct var *vp;
+
+ INTOFF;
+ lvp = ckmalloc(sizeof (struct localvar));
+ if (name[0] == '-' && name[1] == '\0') {
+ lvp->text = ckmalloc(sizeof optlist);
+ memcpy(lvp->text, optlist, sizeof optlist);
+ vp = NULL;
+ } else {
+ vpp = hashvar(name);
+ for (vp = *vpp ; vp && ! varequal(vp->text, name) ; vp = vp->next);
+ if (vp == NULL) {
+ if (strchr(name, '='))
+ setvareq(savestr(name), VSTRFIXED);
+ else
+ setvar(name, NULL, VSTRFIXED);
+ vp = *vpp; /* the new variable */
+ lvp->text = NULL;
+ lvp->flags = VUNSET;
+ } else {
+ lvp->text = vp->text;
+ lvp->flags = vp->flags;
+ vp->flags |= VSTRFIXED|VTEXTFIXED;
+ if (strchr(name, '='))
+ setvareq(savestr(name), 0);
+ }
+ }
+ lvp->vp = vp;
+ lvp->next = localvars;
+ localvars = lvp;
+ INTON;
+}
+
+
+/*
+ * Called after a function returns.
+ */
+
+void
+poplocalvars() {
+ struct localvar *lvp;
+ struct var *vp;
+
+ while ((lvp = localvars) != NULL) {
+ localvars = lvp->next;
+ vp = lvp->vp;
+ if (vp == NULL) { /* $- saved */
+ memcpy(optlist, lvp->text, sizeof optlist);
+ ckfree(lvp->text);
+ } else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) {
+ (void)unsetvar(vp->text);
+ } else {
+ if ((vp->flags & VTEXTFIXED) == 0)
+ ckfree(vp->text);
+ vp->flags = lvp->flags;
+ vp->text = lvp->text;
+ }
+ ckfree(lvp);
+ }
+}
+
+
+int
+setvarcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ if (argc <= 2)
+ return unsetcmd(argc, argv);
+ else if (argc == 3)
+ setvar(argv[1], argv[2], 0);
+ else
+ error("List assignment not implemented");
+ return 0;
+}
+
+
+/*
+ * The unset builtin command. We unset the function before we unset the
+ * variable to allow a function to be unset when there is a readonly variable
+ * with the same name.
+ */
+
+int
+unsetcmd(argc, argv)
+ int argc;
+ char **argv;
+{
+ char **ap;
+ int i;
+ int flg_func = 0;
+ int flg_var = 0;
+ int ret = 0;
+
+ while ((i = nextopt("vf")) != '\0') {
+ if (i == 'f')
+ flg_func = 1;
+ else
+ flg_var = 1;
+ }
+ if (flg_func == 0 && flg_var == 0)
+ flg_var = 1;
+
+ for (ap = argptr; *ap ; ap++) {
+ if (flg_func)
+ ret |= unsetfunc(*ap);
+ if (flg_var)
+ ret |= unsetvar(*ap);
+ }
+ return ret;
+}
+
+
+/*
+ * Unset the specified variable.
+ */
+
+int
+unsetvar(s)
+ char *s;
+ {
+ struct var **vpp;
+ struct var *vp;
+
+ vpp = hashvar(s);
+ for (vp = *vpp ; vp ; vpp = &vp->next, vp = *vpp) {
+ if (varequal(vp->text, s)) {
+ if (vp->flags & VREADONLY)
+ return (1);
+ INTOFF;
+ if (*(strchr(vp->text, '=') + 1) != '\0')
+ setvar(s, nullstr, 0);
+ vp->flags &= ~VEXPORT;
+ vp->flags |= VUNSET;
+ if ((vp->flags & VSTRFIXED) == 0) {
+ if ((vp->flags & VTEXTFIXED) == 0)
+ ckfree(vp->text);
+ *vpp = vp->next;
+ ckfree(vp);
+ }
+ INTON;
+ return (0);
+ }
+ }
+
+ return (1);
+}
+
+
+
+/*
+ * Find the appropriate entry in the hash table from the name.
+ */
+
+STATIC struct var **
+hashvar(p)
+ char *p;
+ {
+ unsigned int hashval;
+
+ hashval = ((unsigned char) *p) << 4;
+ while (*p && *p != '=')
+ hashval += (unsigned char) *p++;
+ return &vartab[hashval % VTABSIZE];
+}
+
+
+
+/*
+ * Returns true if the two strings specify the same varable. The first
+ * variable name is terminated by '='; the second may be terminated by
+ * either '=' or '\0'.
+ */
+
+STATIC int
+varequal(p, q)
+ char *p, *q;
+ {
+ while (*p == *q++) {
+ if (*p++ == '=')
+ return 1;
+ }
+ if (*p == '=' && *(q - 1) == '\0')
+ return 1;
+ return 0;
+}
diff --git a/release/picobsd/tinyware/ash/var.h b/release/picobsd/tinyware/ash/var.h
new file mode 100644
index 0000000..15805ce
--- /dev/null
+++ b/release/picobsd/tinyware/ash/var.h
@@ -0,0 +1,130 @@
+/* $NetBSD: var.h,v 1.14 1997/04/11 22:45:40 christos Exp $ */
+
+/*-
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Kenneth Almquist.
+ *
+ * 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.
+ *
+ * @(#)var.h 8.2 (Berkeley) 5/4/95
+ */
+
+/*
+ * Shell variables.
+ */
+
+/* flags */
+#define VEXPORT 0x01 /* variable is exported */
+#define VREADONLY 0x02 /* variable cannot be modified */
+#define VSTRFIXED 0x04 /* variable struct is staticly allocated */
+#define VTEXTFIXED 0x08 /* text is staticly allocated */
+#define VSTACK 0x10 /* text is allocated on the stack */
+#define VUNSET 0x20 /* the variable is not set */
+#define VNOFUNC 0x40 /* don't call the callback function */
+
+
+struct var {
+ struct var *next; /* next entry in hash list */
+ int flags; /* flags are defined above */
+ char *text; /* name=value */
+ void (*func) __P((const char *));
+ /* function to be called when */
+ /* the variable gets set/unset */
+};
+
+
+struct localvar {
+ struct localvar *next; /* next local variable in list */
+ struct var *vp; /* the variable that was made local */
+ int flags; /* saved flags */
+ char *text; /* saved text */
+};
+
+
+struct localvar *localvars;
+
+#if ATTY
+extern struct var vatty;
+#endif
+extern struct var vifs;
+extern struct var vmail;
+extern struct var vmpath;
+extern struct var vpath;
+extern struct var vps1;
+extern struct var vps2;
+#ifndef SMALL
+extern struct var vterm;
+extern struct var vtermcap;
+extern struct var vhistsize;
+#endif
+
+/*
+ * The following macros access the values of the above variables.
+ * They have to skip over the name. They return the null string
+ * for unset variables.
+ */
+
+#define ifsval() (vifs.text + 4)
+#define mailval() (vmail.text + 5)
+#define mpathval() (vmpath.text + 9)
+#define pathval() (vpath.text + 5)
+#define ps1val() (vps1.text + 4)
+#define ps2val() (vps2.text + 4)
+#define optindval() (voptind.text + 7)
+#ifndef SMALL
+#define histsizeval() (vhistsize.text + 9)
+#define termval() (vterm.text + 5)
+#endif
+
+#if ATTY
+#define attyset() ((vatty.flags & VUNSET) == 0)
+#endif
+#define mpathset() ((vmpath.flags & VUNSET) == 0)
+
+void initvar __P((void));
+void setvar __P((char *, char *, int));
+void setvareq __P((char *, int));
+struct strlist;
+void listsetvar __P((struct strlist *));
+char *lookupvar __P((char *));
+char *bltinlookup __P((char *, int));
+char **environment __P((void));
+void shprocvar __P((void));
+int showvarscmd __P((int, char **));
+int exportcmd __P((int, char **));
+int localcmd __P((int, char **));
+void mklocal __P((char *));
+void poplocalvars __P((void));
+int setvarcmd __P((int, char **));
+int unsetcmd __P((int, char **));
+int unsetvar __P((char *));
+int setvarsafe __P((char *, char *, int));
diff --git a/release/picobsd/tinyware/help/Makefile b/release/picobsd/tinyware/help/Makefile
new file mode 100644
index 0000000..0b56779
--- /dev/null
+++ b/release/picobsd/tinyware/help/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:53 abial Exp $
+#
+PROG=help
+SRCS+=help.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/help/README b/release/picobsd/tinyware/help/README
new file mode 100644
index 0000000..8b86ba1
--- /dev/null
+++ b/release/picobsd/tinyware/help/README
@@ -0,0 +1,8 @@
+1998.02.20
+
+This is work in progress. Eventually I'll prepare the help system for newbies,
+and these files are just the beginning of it...
+
+<abial@nask.pl>
+
+$Id: README,v 1.1.1.1 1998/07/14 07:30:53 abial Exp $
diff --git a/release/picobsd/tinyware/help/help.c b/release/picobsd/tinyware/help/help.c
new file mode 100644
index 0000000..fda11a6
--- /dev/null
+++ b/release/picobsd/tinyware/help/help.c
@@ -0,0 +1,97 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: help.c,v 1.1.1.1 1998/07/14 07:30:53 abial Exp $
+ *
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+void
+display(char *fname)
+{
+ FILE *fd;
+ DIR *dirp;
+ struct dirent *d;
+ char buf[100],junk[5],c, *dot;
+ int i;
+
+ snprintf(buf,99,"/help/%s.hlp",fname);
+ if((fd=fopen(buf,"r"))==NULL) {
+ printf("No help available for '%s'.\n",fname);
+ exit(1);
+ }
+ printf("\n");
+ i=0;
+ while(!feof(fd)) {
+ if(fgets(buf,99,fd)==NULL) continue;
+ if(i<23) {
+ printf("%s",buf);
+ i++;
+ } else {
+ printf("Press Enter to continue");
+ fgets(junk,5,stdin);
+ printf("%s",buf);
+ i=0;
+ }
+ }
+ printf("\n");
+ i=0;
+ if(strcmp(fname,"help")==0) {
+ printf("The following help items are available:\n\n");
+ dirp=opendir("/help/.");
+ while((d=readdir(dirp))!=NULL) {
+ if(d->d_name[0]=='.') continue;
+ if((dot=strchr(d->d_name,'.'))!=NULL) {
+ *dot='\0';
+ }
+ printf("%-13s",d->d_name);
+ i++;
+ if(i>5) {
+ printf("\n");
+ i=0;
+ }
+ }
+ closedir(dirp);
+ printf("\n");
+ }
+ return;
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ if(argc==1) {
+ display("help");
+ } else {
+ display(argv[1]);
+ }
+ exit(0);
+}
diff --git a/release/picobsd/tinyware/kget/Makefile b/release/picobsd/tinyware/kget/Makefile
new file mode 100644
index 0000000..a8029c0
--- /dev/null
+++ b/release/picobsd/tinyware/kget/Makefile
@@ -0,0 +1,11 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+#
+PROG=kget
+CFLAGS+= -I/usr/src/sys -DUC_PRIVATE -DKERN_NO_SYMBOLS
+SRCS= uc_isa.c uc_kmem.c uc_list.c uc_main.c uc_main.h \
+ uc_eisa.c uc_pci.c uc_scsi.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/kget/README b/release/picobsd/tinyware/kget/README
new file mode 100644
index 0000000..2acc5ea5
--- /dev/null
+++ b/release/picobsd/tinyware/kget/README
@@ -0,0 +1,47 @@
+1998.06.29
+
+What is it?
+-----------
+
+This utility is taken almost in its entirety from /stand/sysinstall. It allows
+to gather device configuration which possibly was changed in userconfig (-c)
+session, and to save it to /kernel.config file on startup floppy, so that when
+user boots next time, the settings will automatically be changed.
+
+How can I use it?
+-----------------
+
+The best way is to call it from /etc/rc in such phase when the startup floppy
+is mounted, and redirect its output to /kernel.config on the floppy.
+
+NOTE: You need first to create symbols' list, using 'dumpnlist' utility, and
+place it in /stand/symbols.
+
+Usage is straightforward:
+
+ kget -incore|kernel_name output_filename [vanilla]
+
+In simplest form you can do
+
+ kget -incore -
+
+to list current in core parameters, or
+
+ kget kernel_file -
+
+to see settings of another kernel.
+
+or
+
+ kget -incore - /stand/vanilla
+
+to produce list of changes from 'vanilla' configuration. You can redirect this
+list to /kernel.config file with no changes - it already contains required
+keywords.
+
+Credits go to Jordan K. Hubbard for 95% of this code. The rest is mine :-)
+
+Andrzej Bialecki
+<abial@nask.pl>
+
+$Id: README,v 1.2 1998/08/11 06:53:21 abial Exp $
diff --git a/release/picobsd/tinyware/kget/kget.h b/release/picobsd/tinyware/kget/kget.h
new file mode 100644
index 0000000..fc88782
--- /dev/null
+++ b/release/picobsd/tinyware/kget/kget.h
@@ -0,0 +1,2 @@
+#define SAFE_STRCPY strcpy
+#define msgDebug printf
diff --git a/release/picobsd/tinyware/kget/uc_eisa.c b/release/picobsd/tinyware/kget/uc_eisa.c
new file mode 100644
index 0000000..aed003e
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_eisa.c
@@ -0,0 +1,166 @@
+/***************************************************
+ * file: userconfig/uc_eisa.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_eisa.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <nlist.h>
+#include <i386/eisa/eisaconf.h>
+
+#include "uc_main.h"
+
+struct eisa_device_node {
+ struct eisa_device dev;
+ struct eisa_device_node *next;
+};
+
+/* module prototypes */
+static void eisa_fill_in(struct kernel *, struct uc_eisa *, struct eisa_device_node *);
+
+void
+get_eisa_info(struct kernel *kp){
+ int i, total;
+ u_int *ls;
+ struct eisa_driver *ed;
+ struct uc_eisa *ep, *epc;
+ char *name;
+
+ if(kp->nl[EISA_SET].n_value || kp->nl[EISA_LIST].n_value) {
+ ep=epc=(struct uc_eisa *)malloc(sizeof(struct uc_eisa));
+ if(!kp->incore) {
+ if(kp->nl[EISA_SET].n_value) {
+ u_int ndev;
+ ls=(u_int *)kv_to_u(kp, kp->nl[EISA_SET].n_value, sizeof(u_int)*10); /* XXX, size? */
+ ndev=ls[0];
+ for(i=1;i<(ndev+1);i++){
+ ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*i);
+ epc = ep+(i-1);
+ ed=(struct eisa_driver *)kv_to_u(kp, ls[i], sizeof(struct eisa_driver));
+ name=(char *)kv_to_u(kp, (u_int)ed->name, 10); /* XXX, size? */
+ asprintf(&epc->device, "%s", name);
+ asprintf(&epc->full_name, "?");
+ }
+ ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*i);
+ epc = ep+(i-1);
+ bzero(epc, sizeof(struct uc_eisa));
+ kp->eisa_devp=ep;
+ } else { /* not incore and no symbol, we have no EISA devs... */
+ kp->eisa_devp=(struct uc_eisa *)0;
+ }
+ } else {
+ /* if we're incore, we can get data from _eisa_dev_list, */
+ /* which should be much more useful, but I'll need a machine */
+ /* to test :( */
+ if(kp->nl[EISA_LIST].n_value) {
+ u_int t;
+ struct eisa_device_node *edn;
+
+ t=kv_dref_p(kp, kp->nl[EISA_LIST].n_value);
+ total=0;
+ while(t) {
+ edn=(struct eisa_device_node *)
+ kv_to_u(kp, t,sizeof(struct eisa_device_node));
+ ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*(total+1));
+ epc=ep+total;
+ eisa_fill_in(kp, epc, edn);
+ t=(u_int)edn->next;
+ free(edn);
+ total++;
+ }
+
+ ep=(struct uc_eisa *)realloc(ep, sizeof(struct uc_eisa)*(total+1));
+ epc=ep+total;
+ bzero(epc, sizeof(struct uc_eisa));
+ kp->eisa_devp=ep;
+ } else {
+ kp->eisa_devp=(struct uc_eisa *)0;
+ }
+ }
+ } else {
+ kp->eisa_devp=(struct uc_eisa *)0;
+ }
+}
+
+struct list *
+get_eisa_devlist(struct kernel *kp){
+ struct list *dl;
+ struct uc_eisa *kdp;
+
+ dl=list_new();
+
+ for(kdp=kp->eisa_devp; kdp->device; kdp++){
+ list_append(dl, kdp->device);
+ }
+ return(dl);
+}
+
+
+struct list *
+get_eisa_device(struct uc_eisa *ep){
+ struct list *list;
+ list=list_new();
+
+ list_append(list, ep->device);
+ list_append(list, ep->full_name);
+
+ return(list);
+}
+
+
+static void
+eisa_fill_in(struct kernel *kp, struct uc_eisa *epc, struct eisa_device_node *edn){
+ struct eisa_driver *edrv;
+ char *n;
+
+ edrv=(struct eisa_driver *)kv_to_u(kp, (u_int)edn->dev.driver,
+ sizeof(struct eisa_driver));
+
+ n=(char *)kv_to_u(kp, (u_int)edrv->name, 20);
+ asprintf(&epc->device, "%s%d", n, edn->dev.unit);
+ free(n);
+
+ n=(char *)kv_to_u(kp, (u_int)edn->dev.full_name, 40); /*XXX*/
+ asprintf(&epc->full_name, "%s", n);
+ free(n);
+ free(edrv);
+}
+
+void
+eisa_free(struct kernel *kp, int writeback){
+ struct uc_eisa *ep;
+
+ for(ep=kp->eisa_devp;ep->device;ep++){
+ free(ep->device);
+ free(ep->full_name);
+ }
+ free(kp->eisa_devp);
+ kp->eisa_devp=0;
+}
+
+/* end of userconfig/uc_eisa.c */
diff --git a/release/picobsd/tinyware/kget/uc_isa.c b/release/picobsd/tinyware/kget/uc_isa.c
new file mode 100644
index 0000000..b65e8d9
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_isa.c
@@ -0,0 +1,214 @@
+/***************************************************
+ * file: userconfig/uc_isa.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_isa.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <nlist.h>
+#include <i386/isa/isa_device.h>
+
+#include "uc_main.h"
+
+void
+get_isa_info(struct kernel *kp){
+ int total, i, j;
+ struct uc_isa *idp;
+ struct isa_device *p, *isa_dp;
+ struct isa_driver *drv;
+ char *name;
+
+ if(kp->nl[ISA_BIOTAB].n_value || kp->nl[ISA_TTYTAB].n_value || kp->nl[ISA_NETTAB].n_value ||
+ kp->nl[ISA_NULLTAB].n_value || kp->nl[ISA_WDCTAB].n_value || kp->nl[ISA_FDCTAB].n_value) {
+
+ idp = kp->isa_devp = (struct uc_isa *)malloc(sizeof(struct uc_isa));
+ total=0; /* a running total of the number of isa devices */
+
+ for (i=0; i<6; i++) { /* the isa devices */
+ if(kp->nl[i].n_value) {
+ p = isa_dp = (struct isa_device *)kv_to_u(kp, kp->nl[i].n_value, /* XXX size? */
+ sizeof(struct isa_device)*30);
+ /* build the device list */
+ /* `total' keeps a running total of all the devices found */
+ for (j=0; p->id_id; j++, p++, total++) {
+ kp->isa_devp = (struct uc_isa *)realloc(kp->isa_devp,
+ sizeof(struct uc_isa)*(total+1));
+ idp=kp->isa_devp+total;
+
+ drv=(struct isa_driver *)kv_to_u(kp, (u_int)p->id_driver, sizeof(struct isa_driver));
+ name=(char *)kv_to_u(kp, (u_int)drv->name, 64);
+
+ if (i==ISA_WDCTAB || i==ISA_FDCTAB) { /* special case the disk devices */
+ char n[10];
+ strncpy(n, name, 10);
+ n[strlen(n)-1]=0; /* chop off the trailing 'c' */
+ asprintf(&idp->device, "%s%d", n, j);
+ } else {
+ asprintf(&idp->device, "%s%d", name, p->id_unit);
+ }
+ idp->port=p->id_iobase;
+ idp->irq=p->id_irq;
+ idp->drq=p->id_drq;
+ idp->iomem=(u_int)p->id_maddr & 0xFFFFFF; /* kludge to get pa from kva */
+ idp->iosize=p->id_msize;
+ idp->flags=p->id_flags;
+ idp->alive=p->id_alive;
+ idp->enabled=p->id_enabled;
+ idp->modified=0;
+ if(!kp->incore){
+ idp->idp=p;
+ } else {
+ free(name);
+ free(drv);
+ }
+ }
+ if(kp->incore){
+ free(isa_dp);
+ }
+ }
+ }
+
+ idp=kp->isa_devp+total;
+ bzero(idp, sizeof(struct uc_isa));
+ } else {
+ kp->isa_devp=0;
+ }
+}
+
+
+struct list *
+get_isa_devlist(struct kernel *kp){
+ struct list *dl;
+ struct uc_isa *kdp;
+
+ dl=list_new();
+
+ for(kdp=kp->isa_devp; kdp->device; kdp++){
+ list_append(dl, kdp->device);
+ }
+ return(dl);
+}
+
+
+struct list *
+get_isa_device(struct uc_isa *ip){
+ struct list *list;
+ char *tmp;
+
+ list=list_new();
+
+ asprintf(&tmp, "%s", ip->device );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "0x%04x", ip->port );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", ip->irq>0 ? ffs(ip->irq)-1 : ip->irq);
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", ip->drq );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "0x%08x", ip->iomem );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "0x%x", ip->iosize );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "0x%x", ip->flags );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", ip->alive );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", ip->enabled );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", ip->modified );
+ list_append(list, tmp);
+ free(tmp);
+
+ return(list);
+}
+
+int
+isa_setdev(struct kernel *kp, struct list *list){
+ int r=1, irq;
+ struct uc_isa *ip;
+
+ if(kp->isa_devp)
+ for(ip=kp->isa_devp;ip->device;ip++){
+ if(strcmp(list->av[0], ip->device)==0){
+ ip->modified=1;
+ ip->port = strtol(list->av[1], (char **)NULL, 0);
+ irq=strtol(list->av[2], (char **)NULL, 0);
+ ip->irq= irq > 0 ? 1 << (irq) : irq;
+ ip->drq = strtol(list->av[3], (char **)NULL, 0);
+ ip->iomem = strtol(list->av[4], (char **)NULL, 0);
+ ip->iosize = strtol(list->av[5], (char **)NULL, 0);
+ ip->flags = strtol(list->av[6], (char **)NULL, 0);
+ ip->enabled = strtol(list->av[8], (char **)NULL, 0);
+ r=0;
+ break;
+ }
+ }
+ return(r);
+}
+
+void
+isa_free(struct kernel *kp, int writeback){
+ struct uc_isa *ip;
+ for(ip=kp->isa_devp; ip->device; ip++){
+ if((!kp->incore) && ip->modified && writeback) {
+ /* save any changes */
+ ip->idp->id_iobase=ip->port;
+ ip->idp->id_irq = ip->irq;
+ ip->idp->id_drq = ip->drq;
+ ip->idp->id_maddr = (caddr_t)ip->iomem;
+ ip->idp->id_msize = ip->iosize;
+ ip->idp->id_flags = ip->flags;
+ ip->idp->id_enabled = ip->enabled;
+ }
+ /* and, be free... */
+ free(ip->device);
+ }
+ /* and free the whole ball of wax */
+ free(kp->isa_devp);
+ kp->isa_devp=0;
+}
+
+/* end of userconfig/uc_isa.c */
diff --git a/release/picobsd/tinyware/kget/uc_kmem.c b/release/picobsd/tinyware/kget/uc_kmem.c
new file mode 100644
index 0000000..38651e8
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_kmem.c
@@ -0,0 +1,87 @@
+/***************************************************
+ * file: userconfig/uc_kmem.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_kmem.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <a.out.h>
+
+#include <stdio.h>
+
+#include "uc_main.h"
+
+/* translate a kv pointer to user space */
+/* malloc()-ing if we aren't mmaped */
+u_int
+kv_to_u(struct kernel *kp, u_int adr, u_int size){
+ u_int tadr;
+ if(!kp->incore){
+ struct exec *ep;
+ ep=(struct exec *)kp->core;
+ tadr=(u_int)((adr - ep->a_entry + (N_DATOFF(*ep) - ep->a_text))+kp->core);
+ } else {
+ caddr_t ptr;
+ ptr = malloc(size);
+ lseek(kp->fd, adr, SEEK_SET);
+ read(kp->fd, ptr, size);
+ tadr=(u_int)ptr;
+ }
+ return(tadr);
+}
+
+/* dereference a pointer to kernel space */
+u_int
+kv_dref_p(struct kernel *kp, u_int adr){
+ u_int tadr;
+ if(!kp->incore){
+ struct exec *ep;
+ ep=(struct exec *)kp->core;
+ tadr=*(u_int*)((adr - ep->a_entry + (N_DATOFF(*ep) - ep->a_text))+kp->core);
+ } else {
+ lseek(kp->fd, adr, SEEK_SET);
+ read(kp->fd, &tadr, sizeof(tadr));
+ }
+ return(tadr);
+}
+
+/* deref a pointer to kernel text */
+u_int
+kv_dref_t(struct kernel *kp, u_int adr){
+ u_int tadr;
+ if(!kp->incore){
+ struct exec *ep;
+ ep=(struct exec *)kp->core;
+ tadr=*(u_int*)((adr - ep->a_entry) + N_TXTOFF(*ep) + (u_int)kp->core);
+ } else {
+ lseek(kp->fd, adr, SEEK_SET);
+ read(kp->fd, &tadr, sizeof(tadr));
+ }
+ return(tadr);
+}
+
+/* end of userconfig/uc_kmem.c */
diff --git a/release/picobsd/tinyware/kget/uc_list.c b/release/picobsd/tinyware/kget/uc_list.c
new file mode 100644
index 0000000..d0e5ac6
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_list.c
@@ -0,0 +1,76 @@
+/***************************************************
+ * file: userconfig/uc_isa.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_list.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <nlist.h>
+#include "uc_main.h"
+
+struct list *
+list_new(void){
+ struct list *rv;
+ rv=(struct list *)malloc(sizeof(struct list));
+ rv->ac=0;
+ rv->av=(char **)0;
+ return(rv);
+}
+
+void
+list_append(struct list *list , char *item){
+
+ if(list->ac==0) {
+ list->av=(char **)malloc(sizeof(char *)*(list->ac+1));
+ } else {
+ list->av=(char **)realloc(list->av, sizeof(char *)*(list->ac+1));
+ }
+ asprintf(list->av+list->ac, "%s", item);
+ list->ac++;
+}
+
+void
+list_print(struct list *list, char *separator){
+ int i;
+ for(i=0; i<list->ac; i++)
+ printf("%s%s", list->av[i], separator);
+}
+
+void
+list_destroy(struct list *list){
+ int i;
+ for(i=0;i<list->ac;i++){
+ free(list->av[i]);
+ list->av[i]=0;
+ }
+ free(list->av);
+ list->av=0;
+ free(list);
+}
+
+/* end of userconfig/uc_list.c */
diff --git a/release/picobsd/tinyware/kget/uc_main.c b/release/picobsd/tinyware/kget/uc_main.c
new file mode 100644
index 0000000..011f9df
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_main.c
@@ -0,0 +1,466 @@
+/***************************************************
+ * file: userconfig/uc_main.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ * library functions for userconfig library
+ *
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <signal.h>
+#include <paths.h>
+#include <sys/mman.h>
+#include <nlist.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "uc_main.h"
+#include "kget.h"
+
+FILE *f_out;
+
+static struct nlist _nl[] = {
+ {"_isa_devtab_bio"},
+ {"_isa_devtab_tty"},
+ {"_isa_devtab_net"},
+ {"_isa_devtab_null"},
+ {"_isa_biotab_wdc"},
+ {"_isa_biotab_fdc"},
+ {"_eisadriver_set"},
+ {"_eisa_dev_list"},
+ {"_pcidevice_set"},
+ {"_device_list"},
+ {"_scbusses"},
+ {"_scsi_cinit"},
+ {"_scsi_dinit"},
+ {"_scsi_tinit"},
+ {""},
+};
+
+int
+isDebug() {
+ return(0);
+}
+
+struct list *
+vc_getdev(char *vanilla)
+{
+ FILE *fd;
+ struct list *dl;
+ char buf[100];
+
+ fd=fopen(vanilla,"r");
+ if(fd==NULL) {
+ printf("no such file: %s\n",vanilla);
+ exit(2);
+ }
+ dl=list_new();
+ while(!feof(fd)) {
+ buf[0]='\0';
+ if(fgets(buf,99,fd)==NULL) continue;
+ buf[strlen(buf)-1]='\0';
+ list_append(dl,buf);
+ }
+ fclose(fd);
+ return(dl);
+}
+
+void
+process(struct list *d, struct list *v, int flag)
+{
+ int i,idx,found;
+ int len;
+ char *tok,*sep=" ";
+ char *parm[]= {"<devname>",
+ "port",
+ "irq",
+ "drq",
+ "iomem",
+ "iosize",
+ "flags",
+ "<alive>",
+ "<enabled>",
+ "<modified>"};
+
+ if(!flag) {
+ fprintf(f_out,"%s",d->av[0]);
+ for(i=1;i<d->ac;i++) {
+ fprintf(f_out," %s",d->av[i]);
+ }
+ fprintf(f_out,"\n");
+ return;
+ }
+ found=0;
+ for(i=0;i<v->ac;i++) {
+ if(strncmp(d->av[0],v->av[i],strlen(d->av[0]))!=0) continue;
+ found++;
+ break;
+ }
+ if(!found) {
+ printf("\nWhoa!\n");
+ printf("Couldn't find device %s in 'vanilla' list!\n",
+ d->av[0]);
+ printf("It seems that kernel image and 'vanilla' list are out of sync...\n");
+ exit(2);
+ }
+ idx=i;
+ if(strcmp(d->av[8],"0")==0) { /* disable and return */
+ fprintf(f_out,"disable %s\n",d->av[0]);
+ return;
+ }
+ tok=strtok(v->av[idx],sep); /* discard <name> */
+ for(i=1;i<d->ac;i++) {
+ tok=strtok(NULL,sep); /* get next param from string */
+ if(tok==NULL) {
+ fprintf(stderr,"Hmmm... strange error, please report!\n");
+ fprintf(stderr,"Include the 'kget -incore' output and the device name (%s)\n",d->av[0]);
+ exit(10);
+ }
+ if(strcmp(d->av[i],tok)!=0) { /* changed */
+ switch(i) {
+ case 7: /* alive */
+ break;
+ case 8: /* enable/disable */
+ if(strcmp(d->av[i],"0")==0) { /* disable */
+ fprintf(f_out,"disable %s\n",d->av[0]);
+ return;
+ } else {
+ fprintf(f_out,"enable %s\n",d->av[0]);
+ }
+ break;
+ case 2: /* special case for npx */
+ if(strcmp(d->av[0],"npx0")==0) continue;
+ /* FALLTHROUGH */
+ default:
+ fprintf(f_out,"%s %s %s\n",parm[i],d->av[0],d->av[i]);
+ break;
+ }
+ }
+ }
+ return;
+}
+
+int main(int argc, char *argv[])
+{
+ struct kernel *core;
+ struct list *c_isa, *c_dev,*v_isa;
+ int d,j,cnt=0;
+ int diff=0;
+ char buf[100];
+
+ if(argc<3) {
+ printf("Usage: %s name|-incore -|filename [vanilla]\n",argv[0]);
+ exit(1);
+ }
+ if(argc>3) {
+ v_isa=vc_getdev(argv[3]);
+ diff++;
+ }
+ core=uc_open(argv[1]);
+ c_isa=uc_getdev(core,"-isa");
+ if(c_isa==NULL) {
+ printf("no symbols in kernel?\n");
+ exit(2);
+ }
+ if(strcmp(argv[2],"-")==NULL) {
+ f_out=stdout;
+ } else {
+ f_out=fopen(argv[2],"w");
+ if(f_out==NULL) f_out=stdout;
+ }
+ if(diff) fprintf(f_out,"USERCONFIG\n");
+ for(d=0;d<c_isa->ac;d++) {
+ c_dev=uc_getdev(core,c_isa->av[d]);
+ process(c_dev,v_isa,diff);
+ }
+ if(diff) fprintf(f_out,"quit\n");
+ uc_close(core,0);
+ exit(0);
+}
+
+struct kernel *
+uc_open(char *name){
+ int kd, flags, incore;
+ struct kernel *kern;
+ struct stat sb;
+ char kname[80];
+ int size, i = 0;
+ struct nlist *nl = _nl;
+
+ if (strcmp(name, "-incore") == 0)
+ incore = 1;
+ else
+ incore = 0;
+
+ if (incore || (strcmp(name,"-bootfile") == 0))
+ SAFE_STRCPY(kname, getbootfile());
+ else
+ SAFE_STRCPY(kname, name);
+
+ if (isDebug())
+ msgDebug("uc_open: kernel name is %s, incore = %d\n", kname, incore);
+ kern = (struct kernel *)malloc(sizeof(struct kernel));
+
+#ifdef KERN_NO_SYMBOLS
+ if (incore) {
+ FILE *fp;
+
+ fp = fopen("/stand/symbols", "r");
+ if (!fp) {
+ msgDebug("Couldn't open /stand/symbols file! Punting.\n");
+ free(kern);
+ return NULL;
+ }
+ if (fscanf(fp, "%d\n", &size) != 1) {
+ msgDebug("Unable to get # of name list entries from symbol file.\n");
+ free(kern);
+ return NULL;
+ }
+ else if (isDebug())
+ msgDebug("uc_open: opened /stand/symbols file, reading %d entries.\n", size);
+
+
+ kern->nl = nl = (struct nlist *)malloc((size + 1) * sizeof(struct nlist));
+ bzero(nl, (size + 1) * sizeof(struct nlist));
+ for (i = 0; i < size; i++) {
+ char *cp, name[255];
+ int c1;
+ unsigned int uc1;
+ short d1;
+ unsigned long v1;
+
+ if (fgets(name, 255, fp) == NULL) {
+ msgDebug("Can't get name field for entry %d\n", i);
+ free(kern);
+ return NULL;
+ }
+ if ((cp = index(name, '\n')) != NULL)
+ *cp = '\0';
+ nl[i].n_name = strdup(name);
+ if (fscanf(fp, "%u %d %hd %ld\n", &uc1, &c1, &d1, &v1) == 4) {
+ nl[i].n_type = (unsigned char)uc1;
+ nl[i].n_other = (char)c1;
+ nl[i].n_desc = d1;
+ nl[i].n_value = v1;
+ if (isDebug())
+ msgDebug("uc_open: for entry %d, decoded: \"%s\", %u %d %hd %ld\n", i, nl[i].n_name, nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
+ }
+ }
+ nl[i].n_name = "";
+ fclose(fp);
+ i = 0;
+ }
+ else
+#endif
+ i = nlist(kname, nl);
+ if (i == -1) {
+ msgDebug("uc_open: kernel %s does not contain symbols.\n", kname);
+ free(kern);
+ return NULL;
+ }
+#ifdef KERN_NO_SYMBOLS
+ if (!incore) {
+#else
+ {
+#endif
+ kern->nl=(struct nlist *)malloc(sizeof(_nl));
+ bcopy(_nl, kern->nl, sizeof(_nl));
+ }
+
+ if (incore) {
+ if (isDebug())
+ msgDebug("uc_open: attempting to open /dev/kmem for incore.\n");
+ if ((kd = open("/dev/kmem", O_RDONLY)) < 0) {
+ free(kern);
+ msgDebug("uc_open: Unable to open /dev/kmem.\n");
+ return NULL;
+ }
+ kern->core = (caddr_t)NULL;
+ kern->incore = 1;
+ kern->size = 0;
+ }
+ else {
+ if (stat(kname, &sb) < 0) {
+ free(kern);
+ msgDebug("uc_open: Unable to stat %s.\n", kname);
+ return NULL;
+ }
+ kern->size = sb.st_size;
+ flags = sb.st_flags;
+
+ if (chflags(kname, 0) < 0) {
+ free(kern);
+ msgDebug("uc_open: Unable to chflags %s.\n", kname);
+ return NULL;
+ }
+
+ if (isDebug())
+ msgDebug("uc_open: attempting to open %s\n", kname);
+ if ((kd = open(kname, O_RDWR, 0644)) < 0) {
+ free(kern);
+ msgDebug("uc_open: Unable to open %s.\n", kname);
+ return NULL;
+ }
+
+ fchflags(kd, flags);
+
+ if (isDebug())
+ msgDebug("uc_open: attempting to mmap %d bytes\n", sb.st_size);
+ kern->core = mmap((caddr_t)0, sb.st_size, PROT_READ | PROT_WRITE,
+ MAP_SHARED, kd, 0);
+ kern->incore = 0;
+ if (kern->core == MAP_FAILED) {
+ free(kern);
+ msgDebug("uc_open: Unable to mmap from %s.\n", kname);
+ return NULL;
+ }
+ }
+
+ kern->fd = kd;
+ get_isa_info(kern);
+ if (isDebug())
+ msgDebug("uc_open: got isa information\n");
+
+ get_pci_info(kern);
+ if (isDebug())
+ msgDebug("uc_open: got pci information\n");
+
+ get_eisa_info(kern);
+ if (isDebug())
+ msgDebug("uc_open: got eisa information\n");
+#ifdef USE_SCSI
+ get_scsi_info(kern);
+ if (isDebug())
+ msgDebug("uc_open: got scsi information\n");
+#else
+ kern->scsi_devp=(struct uc_scsi*)NULL;
+ kern->scsibus_devp=(struct uc_scsibus*)NULL;
+#endif
+ return kern;
+}
+
+int
+uc_close(struct kernel *kern, int writeback)
+{
+ if (kern->isa_devp)
+ isa_free(kern, writeback);
+
+ if (kern->eisa_devp)
+ eisa_free(kern, writeback); /* `writeback' isn't really useful here */
+
+ if (kern->pci_devp)
+ pci_free(kern, writeback); /* or here */
+
+ if (kern->scsi_devp)
+ scsi_free(kern, writeback);
+
+ if (!kern->incore)
+ munmap(kern->core, kern->size);
+
+ close(kern->fd);
+ free(kern->nl);
+ free(kern);
+
+ return 0;
+}
+
+struct list *
+uc_getdev(struct kernel *kern, char *dev)
+{
+ struct list *list = (struct list *)0;
+
+ if (*dev == '-') { /* asked for -isa, -eisa, -pci, -scsi, -all */
+ if (strcmp(dev, "-all") == 0) {
+ list = list_new();
+ if (kern->isa_devp)
+ list_append(list, "isa");
+
+ if (kern->eisa_devp)
+ list_append(list, "eisa");
+
+ if (kern->pci_devp)
+ list_append(list, "pci");
+
+ if (kern->scsi_devp)
+ list_append(list, "scsi");
+
+ }
+ else if (strcmp(dev, "-isa") == 0)
+ list = get_isa_devlist(kern);
+ else if (strcmp(dev, "-eisa") == 0)
+ list = get_eisa_devlist(kern);
+ else if (strcmp(dev, "-pci") == 0)
+ list = get_pci_devlist(kern);
+ else if (strcmp(dev, "-scsi") == 0)
+ list = get_scsi_devlist(kern);
+ }
+ else {
+ /* we gotta figure out which real device to report */
+ struct uc_isa *ip;
+ struct uc_scsi *sp;
+ struct uc_pci *pp;
+ struct uc_eisa *ep;
+
+ if (kern->isa_devp) {
+ for (ip = kern->isa_devp; ip->device; ip++) {
+ if (strcmp(dev, ip->device) == 0) {
+ list = get_isa_device(ip);
+ goto end;
+ }
+ }
+ }
+
+ if (kern->scsi_devp) {
+ for (sp = kern->scsi_devp; sp->device; sp++) {
+ if (strcmp(dev, sp->device) == 0) {
+ list = get_scsi_device(sp);
+ goto end;
+ }
+ }
+ }
+
+ if (kern->pci_devp) {
+ for(pp = kern->pci_devp; pp->device; pp++) {
+ if (strcmp(dev, pp->device) == 0) {
+ list = get_pci_device(pp);
+ goto end;
+ }
+ }
+ }
+
+ if (kern->eisa_devp) {
+ for (ep = kern->eisa_devp; ep->device; ep++) {
+ if (strcmp(dev, ep->device) == 0) {
+ list = get_eisa_device(ep);
+ goto end;
+ }
+ }
+ }
+ }
+end:
+ return(list);
+}
diff --git a/release/picobsd/tinyware/kget/uc_main.h b/release/picobsd/tinyware/kget/uc_main.h
new file mode 100644
index 0000000..4f7662e
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_main.h
@@ -0,0 +1,167 @@
+/***************************************************
+ * file: userconfig/uc_main.h
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_main.h,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#define ISA_BIOTAB 0
+#define ISA_TTYTAB 1
+#define ISA_NETTAB 2
+#define ISA_NULLTAB 3
+#define ISA_WDCTAB 4
+#define ISA_FDCTAB 5
+#define EISA_SET 6
+#define EISA_LIST 7
+#define PCI_SET 8
+#define SCSI_LIST 9
+#define SCSI_BUSSES 10
+#define SCSI_CINIT 11
+#define SCSI_DINIT 12
+#define SCSI_TINIT 13
+/* symbols + the null terminator */
+#define NSYMBOLS 15
+
+struct kernel {
+ int fd; /* file descriptor for the kernel image, either a binary or /dev/kmem */
+ caddr_t core; /* either the mmap()ed kernel image, or a scratch area */
+ u_int size; /* size of the object at ->core */
+ int incore; /* true if the kernel is running */
+#ifdef UC_PRIVATE
+ struct nlist *nl; /* the symbol table */
+#else
+ void *nl;
+#endif
+ struct uc_isa *isa_devp; /* pointer to the isa devices (if any) */
+ struct uc_eisa *eisa_devp; /* pointer to the eisa devices (if any) */
+ struct uc_pci *pci_devp; /* pointer to the pci devices (if any) */
+ struct uc_scsi *scsi_devp; /* pointer to the scsi devices (if any) */
+ struct uc_scsibus *scsibus_devp; /* internal pointer to scsibus wirings */
+};
+
+struct uc_isa {
+ char *device;
+ u_short port;
+ u_short irq;
+ short drq;
+ u_int iomem;
+ int iosize;
+ int flags;
+ int alive;
+ int enabled;
+#ifdef UC_PRIVATE
+ struct isa_device *idp;
+#else
+ void *idp;
+#endif
+ int modified;
+};
+
+struct uc_pci {
+ char *device;
+};
+
+struct uc_eisa {
+ char *device;
+ char *full_name;
+};
+
+struct uc_scsibus {
+ int bus_no;
+ int unit;
+ char *driver;
+#ifdef UC_PRIVATE
+ struct scsi_ctlr_config *config;
+#else
+ void *config;
+#endif
+};
+
+struct uc_scsi {
+ char *device;
+ char *adapter;
+ u_short target;
+ u_short lun;
+ char *desc;
+#ifdef UC_PRIVATE
+ struct scsi_device_config *config;
+#else
+ void *config;
+#endif
+ int modified;
+};
+
+/* nearly everything useful returns a list */
+
+struct list {
+ int ac;
+ char **av;
+};
+
+/* prototypes */
+
+/* uc_main.c */
+/* these are really the only public ones */
+struct kernel *uc_open(char *name);
+int uc_close(struct kernel *kern, int writeback);
+struct list *uc_getdev(struct kernel *kern, char *dev);
+
+/* uc_isa.c */
+void get_isa_info(struct kernel *kp);
+struct list *get_isa_devlist(struct kernel *kp);
+struct list *get_isa_device(struct uc_isa *ip);
+int isa_setdev(struct kernel *kp, struct list *list);
+void isa_free(struct kernel *kp, int writeback);
+
+/* uc_eisa.c */
+void get_eisa_info(struct kernel *kp);
+struct list *get_eisa_devlist(struct kernel *kp);
+struct list *get_eisa_device(struct uc_eisa *ep);
+void eisa_free(struct kernel *kp, int writeback);
+
+/* uc_pci.c */
+void get_pci_info(struct kernel *kp);
+struct list *get_pci_devlist(struct kernel *kp);
+struct list *get_pci_device(struct uc_pci *pp);
+void pci_free(struct kernel *kp, int writeback);
+
+/* uc_scsi.c */
+void get_scsi_info(struct kernel *kp);
+struct list *get_scsi_devlist(struct kernel *kp);
+struct list *get_scsi_device(struct uc_scsi *sp);
+int scsi_setdev(struct kernel *kp, struct list *list);
+void scsi_free(struct kernel *kp, int writeback);
+
+/* uc_kmem.c */
+u_int kv_to_u(struct kernel *kp, u_int adr, u_int size);
+u_int kv_dref_p(struct kernel *kp, u_int adr);
+u_int kv_dref_t(struct kernel *kp, u_int adr);
+
+/* uc_list.c */
+struct list *list_new(void);
+void list_append(struct list *list, char *item);
+void list_print(struct list *list, char *separator);
+void list_destroy(struct list *list);
+
+/* end of userconfig/uc_main.h */
diff --git a/release/picobsd/tinyware/kget/uc_pci.c b/release/picobsd/tinyware/kget/uc_pci.c
new file mode 100644
index 0000000..ca60790
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_pci.c
@@ -0,0 +1,122 @@
+/***************************************************
+ * file: userconfig/uc_pci.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_pci.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <nlist.h>
+#include <pci/pcivar.h>
+
+#include "uc_main.h"
+
+void
+get_pci_info(struct kernel *kp){
+ int i, total;
+ u_int *ls, ndev;
+ struct pci_device *pd;
+ struct uc_pci *pp,*ppc;
+ char *name;
+
+ if(kp->nl[PCI_SET].n_value){
+ pp = ppc = (struct uc_pci *)malloc(sizeof(struct uc_pci));
+ ls=(u_int *)kv_to_u(kp, kp->nl[PCI_SET].n_value, sizeof(u_int)*30); /* XXX, size? */
+ ndev=ls[0];
+ total=0;
+ for(i=1;i<(ndev+1);i++){
+ pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1));
+ ppc = pp+(total);
+ pd=(struct pci_device *)kv_to_u(kp, ls[i], sizeof(struct pci_device));
+ /* don't try to dereference a null pointer */
+ name=pd->pd_name ? (char *)kv_to_u(kp, (u_int)pd->pd_name, 10) :
+ pd->pd_name; /* XXX, size? */
+ if(kp->incore){
+ int u, k;
+ /* incore, we can get unit numbers */
+
+ u=kv_dref_p(kp, (u_int)pd->pd_count);
+ for(k=0;k<u;k++,total++){
+ pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1));
+ ppc = pp+(total);
+ asprintf(&ppc->device, "%s%d", name, k);
+ }
+ free(pd);
+ if(name)
+ free(name);
+ } else {
+ asprintf(&ppc->device, "%s?", name);
+ total++;
+ }
+ }
+ pp=(struct uc_pci *)realloc(pp, sizeof(struct uc_pci)*(total+1));
+ ppc = pp+(total);
+ bzero(ppc, sizeof(struct uc_pci));
+ kp->pci_devp=pp;
+ } else {
+ kp->pci_devp=(struct uc_pci *)0;
+ }
+}
+
+
+struct list *
+get_pci_devlist(struct kernel *kp){
+ struct list *dl;
+ struct uc_pci *kdp;
+
+ dl=list_new();
+
+ for(kdp=kp->pci_devp; kdp->device; kdp++){
+ list_append(dl, kdp->device);
+ }
+ return(dl);
+}
+
+
+struct list *
+get_pci_device(struct uc_pci *pp){
+ struct list *list;
+ list=list_new();
+
+ list_append(list, pp->device);
+
+ return(list);
+}
+
+void
+pci_free(struct kernel *kp, int writeback){
+ struct uc_pci *pp;
+
+ for(pp=kp->pci_devp;pp->device;pp++){
+ free(pp->device);
+ }
+ free(kp->pci_devp);
+ kp->pci_devp=0;
+
+}
+
+/* end of userconfig/uc_pci.c */
diff --git a/release/picobsd/tinyware/kget/uc_scsi.c b/release/picobsd/tinyware/kget/uc_scsi.c
new file mode 100644
index 0000000..5a539b0
--- /dev/null
+++ b/release/picobsd/tinyware/kget/uc_scsi.c
@@ -0,0 +1,477 @@
+/***************************************************
+ * file: userconfig/uc_scsi.c
+ *
+ * Copyright (c) 1996 Eric L. Hernes (erich@rrnet.com)
+ * All rights reserved.
+ *
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software withough specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $Id: uc_scsi.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <nlist.h>
+#include <scsi/scsiconf.h>
+
+#include "uc_main.h"
+
+/* this stuff is hidden under an #ifdef KERNEL in scsiconf.h */
+#define SCCONF_UNSPEC 255
+#define SCCONF_ANY 254
+
+struct scsi_ctlr_config {
+ int scbus;
+ char *driver;
+ int unit;
+ int bus;
+};
+
+struct scsi_device_config {
+ char *name; /* SCSI device name (sd, st, etc) */
+ int unit; /* desired device unit */
+ int cunit; /* Controller unit */
+ int target; /* SCSI ID (target) */
+ int lun; /* SCSI lun */
+ int flags; /* Flags from config */
+};
+
+/* module prototypes */
+static void get_sl_info(struct kernel *kp, struct uc_scsi *spc,
+ struct scsi_link *sl);
+
+void
+get_scsi_info(struct kernel *kp){
+ int i, j, k;
+
+ if(kp->incore){
+ if (kp->nl[SCSI_BUSSES].n_value) {
+ u_int *es, *sba;
+ struct scsibus_data *sbd;
+ int nsbd, nscsibus, total;
+ struct uc_scsi *sp, *spc;
+ struct uc_scsibus *sbp, *sbpc;
+ struct scsi_link *s_l;
+ u_int *slp;
+ char *temp;
+ struct scsi_device *sdev;
+ u_int t;
+ char name[10];
+
+ sp=(struct uc_scsi*)malloc(sizeof(struct uc_scsi));
+ total=0;
+ sbp=(struct uc_scsibus*)malloc(sizeof(struct uc_scsibus));
+ nscsibus=0;
+
+ es=(u_int *)kv_to_u(kp, kv_dref_p(kp,kp->nl[SCSI_BUSSES].n_value),
+ sizeof(u_int)*2);
+ nsbd=es[0];
+ sba=(u_int *)kv_to_u(kp, es[1], sizeof(u_int)*nsbd);
+ free(es);
+
+ for(i=0;i<nsbd;i++){
+ if(sba[i]){
+ /* first grab the adapter info */
+ sbd=(struct scsibus_data *)kv_to_u(kp, sba[i],
+ sizeof(struct scsibus_data));
+ sbp=(struct uc_scsibus *)realloc(sbp, sizeof(struct uc_scsibus)*
+ (nscsibus+1));
+
+ sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ s_l=(struct scsi_link*)kv_to_u(kp, (u_int)sbd->adapter_link,
+ sizeof(struct scsi_link));
+ get_sl_info(kp, spc, s_l);
+ free(s_l);
+
+ sbpc=sbp+nscsibus;
+ sbpc->bus_no=nscsibus;
+ nscsibus++;
+ sscanf(spc->device, "%[a-z]%d", name, &sbpc->unit);
+ asprintf(&sbpc->driver, "%s", name);
+
+ total++;
+ t=kv_dref_p(kp, (u_int)sbd->sc_link);
+ t=(u_int)sbd->sc_link;
+ for(j=0;j<8;j++) {
+ slp=(u_int *)kv_to_u(kp, t+(j*8*sizeof(u_int)), /* XXX */
+ (sizeof(u_int)*sbd->maxlun));
+ for(k=0;k<sbd->maxlun && slp[k]; k++){
+ struct scsi_link *slt;
+ sp=(struct uc_scsi*)realloc(sp,
+ (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ slt=(struct scsi_link*)kv_to_u(kp, slp[k],
+ sizeof(struct scsi_link));
+ get_sl_info(kp, spc, slt);
+ free(slt);
+ spc->config=(struct scsi_device_config *)0;
+ total++;
+ }
+ free(slp);
+ }
+ free(sbd);
+ }
+ }
+ /* now stuff in the list of drivers configured in the system */
+ t=kv_dref_p(kp, kp->nl[SCSI_LIST].n_value);
+ while(t) {
+ sdev=(struct scsi_device*)kv_to_u(kp, t, sizeof(struct scsi_device));
+ sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ total++;
+ temp=(char *)kv_to_u(kp, (u_int)sdev->name, 10);
+ asprintf(&spc->device, "%s*", temp);
+ free(temp);
+ asprintf(&spc->adapter, "any");
+
+ spc->target=SCCONF_ANY;
+ spc->lun=SCCONF_ANY;
+
+ temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 20);
+ asprintf(&spc->desc, "%s", temp);
+ free(temp);
+
+ spc->config=(struct scsi_device_config *)0;
+
+ t=(u_int)sdev->next;
+ free(sdev);
+ }
+ /* slap on the terminators */
+ sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ bzero(spc, sizeof(struct uc_scsi));
+
+ sbp=(struct uc_scsibus *)realloc(sbp, sizeof(struct uc_scsibus)*
+ (nscsibus+1));
+ sbpc=sbp+nscsibus;
+ bzero(sbpc, sizeof(struct uc_scsibus));
+
+ kp->scsi_devp=sp;
+ kp->scsibus_devp=sbp;
+ } else { /* no symbol, and incore, no scsi */
+ kp->scsi_devp=(struct uc_scsi *)0;
+ kp->scsibus_devp=(struct uc_scsibus *)0;
+ }
+ } else { /* on disk */
+
+ if (kp->nl[SCSI_CINIT].n_value || kp->nl[SCSI_DINIT].n_value ||
+ kp->nl[SCSI_TINIT].n_value) {
+ int total=0;
+ struct uc_scsi *sp, *spc;
+ struct scsi_ctlr_config *sctl_c;
+ struct scsi_device_config *sdev_c;
+ struct scsi_device *sdev;
+
+ struct uc_scsibus *uc_scbus, *uc_scbusc;
+
+ u_int t, ctrl_total;
+ char *temp;
+ u_int initp;
+
+ spc=sp=(struct uc_scsi*)malloc(sizeof(struct uc_scsi));
+ total=0;
+ ctrl_total=0;
+ uc_scbus = NULL; /* Just prevent unused warning */
+
+ /* static kernel, we'll first get the wired controllers/devices */
+ if((t=kp->nl[SCSI_CINIT].n_value)){
+ /* get controller info*/
+ sctl_c=(struct scsi_ctlr_config*)kv_to_u(kp, t, sizeof(struct scsi_ctlr_config));
+ uc_scbus=(struct uc_scsibus*)malloc(sizeof(struct uc_scsibus));
+
+ while(sctl_c->driver){
+
+ /* remember the bus info, for later */
+ uc_scbus=(struct uc_scsibus*)realloc(uc_scbus, sizeof(struct uc_scsibus)*(ctrl_total+1));
+ uc_scbusc=uc_scbus+ctrl_total;
+ uc_scbusc->bus_no=sctl_c->scbus;
+ temp=(char *)kv_to_u(kp, (u_int)sctl_c->driver, 20);
+ uc_scbusc->driver=temp;
+ uc_scbusc->unit=sctl_c->unit;
+ uc_scbusc->config=sctl_c;
+
+ sp=(struct uc_scsi*)realloc(sp,sizeof(struct uc_scsi)*(total+1));
+ spc=sp+total;
+ asprintf(&spc->device, "%s%d", temp, sctl_c->unit);
+ asprintf(&spc->adapter, "%s%d", temp, sctl_c->unit);
+ spc->target=0;
+ spc->lun=0;
+ spc->modified=0;
+ asprintf(&spc->desc, "%s", temp);
+ total++;
+ ctrl_total++;
+ sctl_c++;
+ }
+ }
+
+ if((t=kp->nl[SCSI_DINIT].n_value)){
+ /* get wired device info */
+ sdev_c=(struct scsi_device_config*)kv_to_u(kp, t, sizeof(struct scsi_device_config));
+ while(sdev_c->name){
+ sp=(struct uc_scsi*)realloc(sp, sizeof(struct uc_scsi)*(total+1));
+ spc=sp+total;
+ temp=(char*)kv_to_u(kp, (u_int)sdev_c->name, 10);
+ asprintf(&spc->device, "%s%d", temp, sdev_c->unit);
+ /* figure out controller */
+ if(sdev_c->cunit == SCCONF_ANY){
+ asprintf(&spc->adapter, "any");
+ } else {
+ if(ctrl_total){
+ for(i=0;i<ctrl_total;i++){
+ if(sdev_c->cunit==uc_scbus[i].bus_no){
+ asprintf(&spc->adapter, "%s%d",
+ uc_scbus[i].driver, uc_scbus[i].unit);
+ break;
+ }
+ }
+ if(i==ctrl_total) { /* made it through the whole list */
+ asprintf(&spc->adapter, "any?");
+ }
+ } else {
+ asprintf(&spc->adapter, "any?");
+ }
+ }
+ spc->target= sdev_c->target;
+ spc->lun= sdev_c->lun;
+ spc->desc=(char *)0; /* filled in later */
+ spc->config=sdev_c;
+ spc->modified=0;
+ sdev_c++;
+ total++;
+ }
+ }
+ kp->scsibus_devp=uc_scbus;
+
+ if((t=kp->nl[SCSI_TINIT].n_value)) {
+ /* WARNING: This is teetering on the brink of stupid.
+
+ this ugly little hack only works because the
+ <scsi driver>init routines are macro-generated,
+ so the offset of the device pointers will be
+ the same (hopefully).
+ */
+
+ while((initp=kv_dref_p(kp,t))) {
+ u_int tadr;
+ u_int sl;
+
+ t+=4;
+ tadr=kv_dref_t(kp, initp+4); /* offset in *.text* */
+ sdev=(struct scsi_device*)kv_to_u(kp, tadr, sizeof(struct scsi_device));
+ sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ total++;
+ temp=(char *)kv_to_u(kp, (u_int)sdev->name, 10);
+ asprintf(&spc->device, "%s*", temp);
+
+ asprintf(&spc->adapter, "any");
+
+ spc->target=SCCONF_ANY;
+ spc->lun=SCCONF_ANY;
+ spc->modified=0;
+ temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 20);
+ asprintf(&spc->desc, "%s", temp);
+ /* now try to fill in any device descriptions from above */
+ sl=strlen(spc->device)-1;
+ for(i=0;i<(total-1);i++){ /* don't look at this device */
+ struct uc_scsi *usp;
+
+ usp=sp+i;
+ if(strncmp(usp->device, spc->device, sl)==0 && usp->desc==0) {
+ asprintf(&usp->desc, "%s", spc->desc);
+ }
+ }
+ }
+ if(total){
+ sp=(struct uc_scsi*)realloc(sp, (sizeof(struct uc_scsi)*(total+1)));
+ spc=sp+total;
+ bzero(spc, sizeof(struct uc_scsi));
+ kp->scsi_devp=sp;
+ } else {
+ free(sp);
+ kp->scsi_devp=(struct uc_scsi *)0;
+ }
+ }
+ } else {
+ kp->scsi_devp=(struct uc_scsi *)0;
+ }
+ }
+}
+
+struct list *
+get_scsi_devlist(struct kernel *kp){
+ struct list *dl;
+ struct uc_scsi *kdp;
+
+ dl=list_new();
+
+ for(kdp=kp->scsi_devp; kdp->device; kdp++){
+ list_append(dl, kdp->device);
+ }
+
+ return(dl);
+}
+
+struct list *
+get_scsi_device(struct uc_scsi *sp){
+ struct list *list;
+ char *tmp;
+
+ list=list_new();
+
+ list_append(list, sp->device);
+ list_append(list, sp->adapter);
+
+ asprintf(&tmp, "%d", sp->target );
+ list_append(list, tmp);
+ free(tmp);
+
+ asprintf(&tmp, "%d", sp->lun );
+ list_append(list, tmp);
+ free(tmp);
+
+ list_append(list, sp->desc);
+
+ return(list);
+}
+
+/* given a scsi_link and a uc_scsi pointer, fill it in */
+static void
+get_sl_info(struct kernel *kp, struct uc_scsi *spc, struct scsi_link *sl){
+
+ struct scsi_adapter *sadp;
+ struct scsi_device *sdev;
+ char *temp;
+
+ sadp=(struct scsi_adapter*)kv_to_u(kp, (u_int)sl->adapter,
+ sizeof(struct scsi_adapter));
+
+ sdev=(struct scsi_device*)kv_to_u(kp, (u_int)sl->device,
+ sizeof(struct scsi_device));
+
+ temp=(char *)kv_to_u(kp, (u_int)sdev->name, 20);
+ asprintf(&spc->device, "%s%d", temp, sl->dev_unit);
+ free(temp);
+ temp=(char *)kv_to_u(kp, (u_int)sadp->name, 20);
+ asprintf(&spc->adapter, "%s%d", temp, sl->adapter_unit);
+ free(temp);
+ spc->target = sl->target;
+ spc->lun = sl->lun;
+
+ temp=(char *)kv_to_u(kp, (u_int)sdev->desc, 30);
+ asprintf(&spc->desc, "%s", temp);
+ free(temp);
+
+}
+
+int
+scsi_setdev(struct kernel *kp, struct list *list){
+ int r=1, bus_valid=0;
+ struct uc_scsi *sp;
+ struct uc_scsibus *sbp;
+ char *t;
+
+ if(kp->scsi_devp)
+ for(sp=kp->scsi_devp;sp->device;sp++){
+ if(strcmp(list->av[0], sp->device)==0){
+ for(sbp=kp->scsibus_devp;sbp->driver; sbp++){
+ asprintf(&t, "%s%d", sbp->driver, sbp->unit);
+ if(strcmp(list->av[1], t)==0) {
+ bus_valid=1;
+ }
+ free(t);
+ }
+ if(bus_valid){
+ sp->modified=1;
+ free(sp->adapter);
+ asprintf(&sp->adapter, "%s", list->av[1]);
+ sp->target = strtol(list->av[2], (char **)NULL, 0);
+ sp->lun = strtol(list->av[3], (char **)NULL, 0);
+ r=0;
+ goto done;
+ } else {
+ r=2;
+ }
+ }
+ }
+done:
+ return(r);
+}
+
+void
+scsi_free(struct kernel *kp, int writeback){
+ struct uc_scsi *sp;
+ struct uc_scsibus *sbp;
+ char *t;
+ int scbus, i;
+
+ for(sp=kp->scsi_devp; sp->device; sp++){
+ if((!kp->incore) && sp->modified && writeback) {
+ /* save info */
+
+ /* I'm not sure this is necessary */
+#if 0
+ sscanf(sp->device, "%[a-z]%d", name, &unit);
+ sp->config->unit= unit;
+#endif
+
+ /* figger out the controller, which may have changed */
+ scbus=-1;
+ for(sbp=kp->scsibus_devp, i=0;sbp->driver; sbp++,i++){
+ asprintf(&t, "%s%d", sbp->driver, sbp->unit);
+ if(strcmp(sp->adapter, t)==0) {
+ scbus=i;
+ }
+ free(t);
+ }
+
+ /* if we fell through, don't change anything */
+ if(scbus!=-1){
+ sp->config->cunit= scbus;
+ }
+
+ sp->config->target= sp->target;
+ sp->config->lun= sp->lun;
+ /* sp->config->flags= ; XXX this should be here*/
+
+ }
+ free(sp->device);
+ free(sp->adapter);
+ free(sp->desc);
+ }
+ free(kp->scsi_devp);
+ kp->scsi_devp=(struct uc_scsi *)0;
+ /* now free the bus info */
+ if(kp->incore){
+ for(sbp=kp->scsibus_devp;sbp->driver; sbp++){
+/* fprintf(stderr, "sbp: 0x%x free(0x%x)\n", sbp, sbp->driver);*/
+ free(sbp->driver);
+ }
+ }
+
+ if (kp->scsibus_devp)
+ free(kp->scsibus_devp);
+ kp->scsibus_devp=(struct uc_scsibus *)0;
+}
+
+/* end of userconfig/uc_scsi.c */
diff --git a/release/picobsd/tinyware/ns/Makefile b/release/picobsd/tinyware/ns/Makefile
new file mode 100644
index 0000000..b75d813
--- /dev/null
+++ b/release/picobsd/tinyware/ns/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1 1998/08/01 18:26:02 abial Exp $
+#
+PROG=ns
+SRCS= ns.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/ns/README b/release/picobsd/tinyware/ns/README
new file mode 100644
index 0000000..d81bcd7
--- /dev/null
+++ b/release/picobsd/tinyware/ns/README
@@ -0,0 +1,41 @@
+Warsaw, 1998.07.20
+
+ Small replacement for netstat
+ -----------------------------
+
+This program implements some basic functionality subset of normal netstat -
+it can display the routing table and protocol statistics.
+
+Large part of the code dealing with retrieving the routing table via sysctl(3)
+was taken from code examples written by Richard Stevens to accompany his
+excellent book.
+
+Usage
+-----
+
+ ns [-r] [-s [-p ip|tcp|udp|icmp]]
+
+where
+
+ -r print routing table (default)
+ -s print protocol statistics
+ Options:
+ -p proto display only statistics related to this
+ protocol, where 'proto' is one of:
+ - ip
+ - tcp
+ - udp
+ - icmp
+
+Bugs
+----
+
+* The link layer information is still missing.
+* 'ns' doesn't resolve IP adresses to names
+* well, real netstat provides _much_ more information... but this one needs
+ to be small, right? :-)
+
+Andrzej Bialecki
+<abial@nask.pl>
+
+$Id: README,v 1.1 1998/08/19 17:21:50 abial Exp $
diff --git a/release/picobsd/tinyware/ns/ns.c b/release/picobsd/tinyware/ns/ns.c
new file mode 100644
index 0000000..6ec15d3
--- /dev/null
+++ b/release/picobsd/tinyware/ns/ns.c
@@ -0,0 +1,628 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: ns.c,v 1.2 1998/08/09 18:52:07 abial Exp $
+ */
+
+
+/*
+ * Small replacement for netstat. Uses only sysctl(3) to get the info.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <err.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/sysctl.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/icmp_var.h>
+#include <netinet/ip_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/udp.h>
+#include <netinet/udp_var.h>
+#include <net/route.h>
+#include <net/if_dl.h>
+#include <sys/un.h>
+
+char *progname;
+int rflag=1; /* print routing by default */
+int sflag=0;
+int pflag=0;
+
+extern char *optarg;
+extern int optind;
+
+void
+usage()
+{
+ fprintf(stderr,"\n%s [-r | -s] [-p proto]\n",progname);
+ fprintf(stderr," proto: {ip|tcp|udp|icmp}\n\n");
+}
+
+int if_num;
+
+/*
+ * The following parts related to retrieving the routing table and
+ * interface information, were borrowed from R. Stevens' code examples
+ * accompanying his excellent book. Thanks!
+ */
+
+char *
+sock_ntop(const struct sockaddr *sa, size_t salen)
+{
+ char portstr[7];
+ static char str[128]; /* Unix domain is largest */
+
+ switch (sa->sa_family) {
+ case 255: {
+ struct sockaddr_in *sin = (struct sockaddr_in *) sa;
+ int i;
+
+ i=0;
+ while(sin->sin_addr.s_addr & (0x800000>>i)) i++;
+ sprintf(str,"/%d",i);
+ return(str);
+ }
+ case AF_UNSPEC:
+ case AF_INET: {
+ struct sockaddr_in *sin = (struct sockaddr_in *) sa;
+
+ if (inet_ntop(AF_INET, &sin->sin_addr, str, sizeof(str)) == NULL)
+ return(NULL);
+ if (ntohs(sin->sin_port)!=0) {
+ snprintf(portstr, sizeof(portstr), ".%d", ntohs(sin->sin_port));
+ strcat(str, portstr);
+ }
+ if(strcmp(str,"0.0.0.0")==0) sprintf(str,"default");
+ return(str);
+ }
+ case AF_UNIX: {
+ struct sockaddr_un *unp = (struct sockaddr_un *) sa;
+
+ /* OK to have no pathname bound to the socket: happens on
+ every connect() unless client calls bind() first. */
+ if (unp->sun_path[0] == 0)
+ strcpy(str, "(no pathname bound)");
+ else
+ snprintf(str, sizeof(str), "%s", unp->sun_path);
+ return(str);
+ }
+ case AF_LINK: {
+ struct sockaddr_dl *sdl = (struct sockaddr_dl *) sa;
+
+ if (sdl->sdl_nlen > 0)
+ snprintf(str, sizeof(str), "%*s",
+ sdl->sdl_nlen, &sdl->sdl_data[0]);
+ else
+ snprintf(str, sizeof(str), "link#%d", sdl->sdl_index);
+ return(str);
+ }
+ default:
+ snprintf(str, sizeof(str), "sock_ntop: unknown AF_xxx: %d, len %d",
+ sa->sa_family, salen);
+ return(str);
+ }
+ return (NULL);
+}
+
+char *
+Sock_ntop(const struct sockaddr *sa, size_t salen)
+{
+ char *ptr;
+
+ if ( (ptr = sock_ntop(sa, salen)) == NULL)
+ err(1,"sock_ntop error"); /* inet_ntop() sets errno */
+ return(ptr);
+}
+
+
+#define ROUNDUP(a,size) (((a) & ((size)-1))?(1+((a)|((size)-1))):(a))
+
+#define NEXT_SA(ap) ap=(struct sockaddr *) \
+ ((caddr_t)ap+(ap->sa_len?ROUNDUP(ap->sa_len,sizeof(u_long)):\
+ sizeof(u_long)))
+
+void
+get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
+{
+ int i;
+
+ for(i=0;i<RTAX_MAX;i++) {
+ if(addrs &(1<<i)) {
+ rti_info[i]=sa;
+ NEXT_SA(sa);
+ } else
+ rti_info[i]=NULL;
+ }
+}
+
+void
+get_flags(char *buf, int flags)
+{
+ if(flags & 0x1) {
+ strcat(buf,"U");
+ }
+ if(flags & 0x2) {
+ strcat(buf,"G");
+ }
+ if(flags & 0x4) {
+ strcat(buf,"H");
+ }
+ if(flags & 0x8) {
+ strcat(buf,"r");
+ }
+ if(flags & 0x10) {
+ strcat(buf,"d");
+ }
+ /*
+ if(flags & 0x20) {
+ strcat(buf,"mod,");
+ }
+ */
+ if(flags & 0x100) {
+ strcat(buf,"C");
+ }
+ if(flags & 0x400) {
+ strcat(buf,"L");
+ }
+ if(flags & 0x800) {
+ strcat(buf,"S");
+ }
+ if(flags & 0x10000) {
+ strcat(buf,"c");
+ }
+ if(flags & 0x20000) {
+ strcat(buf,"W");
+ }
+ /*
+ if(flags & 0x200000) {
+ strcat(buf,",LOC");
+ }
+ */
+ if(flags & 0x400000) {
+ strcat(buf,"b");
+ }
+ /*
+ if(flags & 0x800000) {
+ strcat(buf,",MCA");
+ }
+ */
+}
+
+int
+routing(char *proto)
+{
+ int mib[6],i=0,rt_len,if_len;
+ char *rt_buf,*if_buf,*next,*lim;
+ struct rt_msghdr *rtm;
+ struct if_msghdr *ifm,**ifm_table;
+ struct ifa_msghdr *ifam;
+ struct sockaddr *sa,*sa1,*rti_info[RTAX_MAX],**if_table;
+ struct rt_metrics rm;
+ char fbuf[50];
+
+ /* Get the routing table */
+ mib[0]=CTL_NET;
+ mib[1]=PF_ROUTE;
+ mib[2]=0;
+ mib[3]=0;
+ mib[4]=NET_RT_DUMP;
+ mib[5]=0;
+ /* Estimate the size of table */
+ if(sysctl(mib,6,NULL,&rt_len,NULL,0)==-1) {
+ perror("sysctl size");
+ exit(-1);
+ }
+ if((rt_buf=(char *)malloc(rt_len))==NULL) {
+ perror("malloc");
+ exit(-1);
+ }
+ /* Now get it. */
+ if(sysctl(mib,6,rt_buf,&rt_len,NULL,0)==-1) {
+ perror("sysctl get");
+ exit(-1);
+ }
+ /* Get the interfaces table */
+ mib[0]=CTL_NET;
+ mib[1]=PF_ROUTE;
+ mib[2]=0;
+ mib[3]=0;
+ mib[4]=NET_RT_IFLIST;
+ mib[5]=0;
+ /* Estimate the size of table */
+ if(sysctl(mib,6,NULL,&if_len,NULL,0)==-1) {
+ perror("sysctl size");
+ exit(-1);
+ }
+ if((if_buf=(char *)malloc(if_len))==NULL) {
+ perror("malloc");
+ exit(-1);
+ }
+ /* Now get it. */
+ if(sysctl(mib,6,if_buf,&if_len,NULL,0)==-1) {
+ perror("sysctl get");
+ exit(-1);
+ }
+ lim=if_buf+if_len;
+ i=0;
+ for(next=if_buf,i=0;next<lim;next+=ifm->ifm_msglen) {
+ ifm=(struct if_msghdr *)next;
+ i++;
+ }
+ if_num=i;
+ if_table=(struct sockaddr **)malloc(i*sizeof(struct sockaddr));
+ ifm_table=(struct if_msghdr **)malloc(i*sizeof(struct if_msghdr));
+ memset(ifm_table,0,sizeof(ifm_table));
+ i=0;
+ for(next=if_buf;next<lim;next+=ifm->ifm_msglen) {
+ ifm=(struct if_msghdr *)next;
+ if_table[i]=(struct sockaddr *)(ifm+1);
+ ifm_table[i]=ifm;
+ i++;
+ }
+ /* Now dump the routing table */
+ printf("\nRouting table:\n");
+ printf("--------------\n");
+ printf("Destination Gateway Flags Netif Use\n");
+ lim=rt_buf+rt_len;
+ for(next=rt_buf;next<lim;next+=rtm->rtm_msglen) {
+ rtm=(struct rt_msghdr *)next;
+ sa=(struct sockaddr *)(rtm+1);
+ get_rtaddrs(rtm->rtm_addrs,sa,rti_info);
+ if(rtm->rtm_flags & RTF_WASCLONED) {
+ if((rtm->rtm_flags & RTF_LLINFO)==0)continue;
+ }
+ if((sa=rti_info[RTAX_DST])!=NULL) {
+ sprintf(fbuf,"%s",sock_ntop(sa,sa->sa_len));
+ if(((sa1=rti_info[RTAX_NETMASK])!=NULL) && sa1->sa_family==255) {
+ strcat(fbuf,sock_ntop(sa1,sa1->sa_len));
+ }
+ printf("%-19s",fbuf);
+ }
+ if((sa=rti_info[RTAX_GATEWAY])!=NULL) {
+ printf("%-19s",sock_ntop(sa,sa->sa_len));
+ }
+ memset(fbuf,0,sizeof(fbuf));
+ get_flags(fbuf,rtm->rtm_flags);
+ printf("%-10s",fbuf);
+ for(i=0;i<if_num;i++) {
+ ifm=ifm_table[i];
+ if((ifm->ifm_index==rtm->rtm_index) &&
+ (ifm->ifm_data.ifi_type>0)) {
+ sa=if_table[i];
+ break;
+ }
+ }
+ if(ifm->ifm_type==RTM_IFINFO) {
+ get_rtaddrs(ifm->ifm_addrs,sa,rti_info);
+ printf(" %s",Sock_ntop(sa,sa->sa_len));
+ } else if(ifm->ifm_type==RTM_NEWADDR) {
+ ifam=(struct ifa_msghdr *)ifm_table[rtm->rtm_index-1];
+ sa=(struct sockaddr *)(ifam+1);
+ get_rtaddrs(ifam->ifam_addrs,sa,rti_info);
+ printf(" %s",Sock_ntop(sa,sa->sa_len));
+ }
+ printf(" %u",rtm->rtm_use);
+ printf("\n");
+ }
+ return(0);
+
+}
+
+print_ip_stats()
+{
+ int mib[4],len;
+ struct ipstat s;
+
+ mib[0]=CTL_NET;
+ mib[1]=PF_INET;
+ mib[2]=IPPROTO_IP;
+ mib[3]=IPCTL_STATS;
+ len=sizeof(struct ipstat);
+ if(sysctl(mib,4,&s,&len,NULL,0)<0) {
+ perror("sysctl");
+ return(-1);
+ }
+ printf("\nIP statistics:\n");
+ printf("--------------\n");
+ printf(" %10lu total packets received\n",s.ips_total);
+ printf("* Packets ok:\n");
+ printf(" %10lu fragments received\n",s.ips_fragments);
+ printf(" %10lu forwarded\n",s.ips_forward);
+ printf(" %10lu fast forwarded\n",s.ips_fastforward);
+ printf(" %10lu forwarded on same net (redirect)\n",s.ips_redirectsent);
+ printf(" %10lu delivered to upper level\n",s.ips_delivered);
+ printf(" %10lu total ip packets generated here\n",s.ips_localout);
+ printf(" %10lu total packets reassembled ok\n",s.ips_reassembled);
+ printf(" %10lu total datagrams successfully fragmented\n",s.ips_fragmented);
+ printf(" %10lu output fragments created\n",s.ips_ofragments);
+ printf(" %10lu total raw IP packets generated\n",s.ips_rawout);
+ printf("\n* Bad packets:\n");
+ printf(" %10lu bad checksum\n",s.ips_badsum);
+ printf(" %10lu too short\n",s.ips_tooshort);
+ printf(" %10lu not enough data (too small)\n",s.ips_toosmall);
+ printf(" %10lu more data than declared in header\n",s.ips_badhlen);
+ printf(" %10lu less data than declared in header\n",s.ips_badlen);
+ printf(" %10lu fragments dropped (dups, no mbuf)\n",s.ips_fragdropped);
+ printf(" %10lu fragments timed out in reassembly\n",s.ips_fragtimeout);
+ printf(" %10lu received for unreachable dest.\n",s.ips_cantforward);
+ printf(" %10lu unknown or unsupported protocol\n",s.ips_noproto);
+ printf(" %10lu lost due to no bufs etc.\n",s.ips_odropped);
+ printf(" %10lu couldn't fragment (DF set, etc.)\n",s.ips_cantfrag);
+ printf(" %10lu error in IP options processing\n",s.ips_badoptions);
+ printf(" %10lu dropped due to no route\n",s.ips_noroute);
+ printf(" %10lu bad IP version\n",s.ips_badvers);
+ printf(" %10lu too long (more than max IP size)\n",s.ips_toolong);
+ printf(" %10lu multicast for unregistered groups\n",s.ips_notmember);
+}
+
+print_tcp_stats()
+{
+ int mib[4],len;
+ struct tcpstat s;
+
+ mib[0]=CTL_NET;
+ mib[1]=PF_INET;
+ mib[2]=IPPROTO_TCP;
+ mib[3]=TCPCTL_STATS;
+ len=sizeof(struct tcpstat);
+ if(sysctl(mib,4,&s,&len,NULL,0)<0) {
+ perror("sysctl");
+ return(-1);
+ }
+ printf("\nTCP statistics:\n");
+ printf("---------------\n");
+ printf("* Connections:\n");
+ printf(" %10lu initiated\n",s.tcps_connattempt);
+ printf(" %10lu accepted\n",s.tcps_accepts);
+ printf(" %10lu established\n",s.tcps_connects);
+ printf(" %10lu dropped\n",s.tcps_drops);
+ printf(" %10lu embryonic connections dropped\n",s.tcps_conndrops);
+ printf(" %10lu closed (includes dropped)\n",s.tcps_closed);
+ printf(" %10lu segments where we tried to get RTT\n",s.tcps_segstimed);
+ printf(" %10lu times RTT successfully updated\n",s.tcps_rttupdated);
+ printf(" %10lu delayed ACKs sent\n",s.tcps_delack);
+ printf(" %10lu dropped in rxmt timeout\n",s.tcps_timeoutdrop);
+ printf(" %10lu retrasmit timeouts\n",s.tcps_rexmttimeo);
+ printf(" %10lu persist timeouts\n",s.tcps_persisttimeo);
+ printf(" %10lu keepalive timeouts\n",s.tcps_keeptimeo);
+ printf(" %10lu keepalive probes sent\n",s.tcps_keepprobe);
+ printf(" %10lu dropped in keepalive\n",s.tcps_keepdrops);
+
+ printf("* Packets sent:\n");
+ printf(" %10lu total packets sent\n",s.tcps_sndtotal);
+ printf(" %10lu data packets sent\n",s.tcps_sndpack);
+ printf(" %10lu data bytes sent\n",s.tcps_sndbyte);
+ printf(" %10lu data packets retransmitted\n",s.tcps_sndrexmitpack);
+ printf(" %10lu data bytes retransmitted\n",s.tcps_sndrexmitbyte);
+ printf(" %10lu ACK-only packets sent\n",s.tcps_sndacks);
+ printf(" %10lu window probes sent\n",s.tcps_sndprobe);
+ printf(" %10lu URG-only packets sent\n",s.tcps_sndurg);
+ printf(" %10lu window update-only packets sent\n",s.tcps_sndwinup);
+ printf(" %10lu control (SYN,FIN,RST) packets sent\n",s.tcps_sndctrl);
+ printf("* Packets received:\n");
+ printf(" %10lu total packets received\n",s.tcps_rcvtotal);
+ printf(" %10lu packets in sequence\n",s.tcps_rcvpack);
+ printf(" %10lu bytes in sequence\n",s.tcps_rcvbyte);
+ printf(" %10lu packets with bad checksum\n",s.tcps_rcvbadsum);
+ printf(" %10lu packets with bad offset\n",s.tcps_rcvbadoff);
+ printf(" %10lu packets too short\n",s.tcps_rcvshort);
+ printf(" %10lu duplicate-only packets\n",s.tcps_rcvduppack);
+ printf(" %10lu duplicate-only bytes\n",s.tcps_rcvdupbyte);
+ printf(" %10lu packets with some duplicate data\n",s.tcps_rcvpartduppack);
+ printf(" %10lu duplicate bytes in partially dup. packets\n",s.tcps_rcvpartdupbyte);
+ printf(" %10lu out-of-order packets\n",s.tcps_rcvoopack);
+ printf(" %10lu out-of-order bytes\n",s.tcps_rcvoobyte);
+ printf(" %10lu packets with data after window\n",s.tcps_rcvpackafterwin);
+ printf(" %10lu bytes received after window\n",s.tcps_rcvbyteafterwin);
+ printf(" %10lu packets received after 'close'\n",s.tcps_rcvafterclose);
+ printf(" %10lu window probe packets\n",s.tcps_rcvwinprobe);
+ printf(" %10lu duplicate ACKs\n",s.tcps_rcvdupack);
+ printf(" %10lu ACKs for unsent data\n",s.tcps_rcvacktoomuch);
+ printf(" %10lu ACK packets\n",s.tcps_rcvackpack);
+ printf(" %10lu bytes ACKed by received ACKs\n",s.tcps_rcvackbyte);
+ printf(" %10lu window update packets\n",s.tcps_rcvwinupd);
+ printf(" %10lu segments dropped due to PAWS\n",s.tcps_pawsdrop);
+ printf(" %10lu times header predict ok for ACKs\n",s.tcps_predack);
+ printf(" %10lu times header predict ok for data packets\n",s.tcps_preddat);
+ printf(" %10lu PCB cache misses\n",s.tcps_pcbcachemiss);
+ printf(" %10lu times cached RTT in route updated\n",s.tcps_cachedrtt);
+ printf(" %10lu times cached RTTVAR updated\n",s.tcps_cachedrttvar);
+ printf(" %10lu times ssthresh updated\n",s.tcps_cachedssthresh);
+ printf(" %10lu times RTT initialized from route\n",s.tcps_usedrtt);
+ printf(" %10lu times RTTVAR initialized from route\n",s.tcps_usedrttvar);
+ printf(" %10lu times ssthresh initialized from route\n",s.tcps_usedssthresh);
+ printf(" %10lu timeout in persist state\n",s.tcps_persistdrop);
+ printf(" %10lu bogus SYN, e.g. premature ACK\n",s.tcps_badsyn);
+ printf(" %10lu resends due to MTU discovery\n",s.tcps_mturesent);
+ printf(" %10lu listen queue overflows\n",s.tcps_listendrop);
+}
+
+print_udp_stats()
+{
+ int mib[4],len;
+ struct udpstat s;
+
+ mib[0]=CTL_NET;
+ mib[1]=PF_INET;
+ mib[2]=IPPROTO_UDP;
+ mib[3]=UDPCTL_STATS;
+ len=sizeof(struct udpstat);
+ if(sysctl(mib,4,&s,&len,NULL,0)<0) {
+ perror("sysctl");
+ return(-1);
+ }
+ printf("\nUDP statistics:\n");
+ printf("---------------\n");
+ printf("* Packets received:\n");
+ printf(" %10lu total input packets\n",s.udps_ipackets);
+ printf(" %10lu packets shorter than header (dropped)\n",s.udps_hdrops);
+ printf(" %10lu bad checksum\n",s.udps_badsum);
+ printf(" %10lu data length larger than packet\n",s.udps_badlen);
+ printf(" %10lu no socket on specified port\n",s.udps_noport);
+ printf(" %10lu of above, arrived as broadcast\n",s.udps_noportbcast);
+ printf(" %10lu not delivered, input socket full\n",s.udps_fullsock);
+ printf(" %10lu packets missing PCB cache\n",s.udpps_pcbcachemiss);
+ printf(" %10lu packets not for hashed PCBs\n",s.udpps_pcbhashmiss);
+ printf("* Packets sent:\n");
+ printf(" %10lu total output packets\n",s.udps_opackets);
+ printf(" %10lu output packets on fast path\n",s.udps_fastout);
+}
+
+char *icmp_names[]={
+ "echo reply",
+ "#1",
+ "#2",
+ "destination unreachable",
+ "source quench",
+ "routing redirect",
+ "#6",
+ "#7",
+ "echo",
+ "router advertisement",
+ "router solicitation",
+ "time exceeded",
+ "parameter problem",
+ "time stamp",
+ "time stamp reply",
+ "information request",
+ "information request reply",
+ "address mask request",
+ "address mask reply",
+};
+
+print_icmp_stats()
+{
+ int mib[4],len,i;
+ struct icmpstat s;
+
+ mib[0]=CTL_NET;
+ mib[1]=PF_INET;
+ mib[2]=IPPROTO_ICMP;
+ mib[3]=ICMPCTL_STATS;
+ len=sizeof(struct icmpstat);
+ if(sysctl(mib,4,&s,&len,NULL,0)<0) {
+ perror("sysctl");
+ return(-1);
+ }
+ printf("\nICMP statistics:\n");
+ printf("----------------\n");
+ printf("* Output histogram:\n");
+ for(i=0;i<(ICMP_MAXTYPE+1);i++) {
+ if(s.icps_outhist[i]>0)
+ printf("\t%10lu %s\n",
+ s.icps_outhist[i],icmp_names[i]);
+ }
+ printf("* Input histogram:\n");
+ for(i=0;i<(ICMP_MAXTYPE+1);i++) {
+ if(s.icps_inhist[i]>0)
+ printf("\t%10lu %s\n",
+ s.icps_inhist[i],icmp_names[i]);
+ }
+ printf("* Other stats:\n");
+ printf(" %10lu calls to icmp_error\n",s.icps_error);
+ printf(" %10lu no error 'cuz old ip too short\n",s.icps_oldshort);
+ printf(" %10lu no error 'cuz old was icmp\n",s.icps_oldicmp);
+
+ printf(" %10lu icmp code out of range\n",s.icps_badcode);
+ printf(" %10lu packets shorter than min length\n",s.icps_tooshort);
+ printf(" %10lu bad checksum\n",s.icps_checksum);
+ printf(" %10lu calculated bound mismatch\n",s.icps_badlen);
+ printf(" %10lu number of responses\n",s.icps_reflect);
+ printf(" %10lu broad/multi-cast echo requests dropped\n",s.icps_bmcastecho);
+ printf(" %10lu broad/multi-cast timestamp requests dropped\n",s.icps_bmcasttstamp);
+}
+
+int
+stats(char *proto)
+{
+ if(pflag) {
+ if(proto==NULL) {
+ fprintf(stderr,"Option '-p' requires paramter.\n");
+ usage();
+ exit(-1);
+ }
+ if(strcmp(proto,"ip")==0) print_ip_stats();
+ if(strcmp(proto,"icmp")==0) print_icmp_stats();
+ if(strcmp(proto,"udp")==0) print_udp_stats();
+ if(strcmp(proto,"tcp")==0) print_tcp_stats();
+ return(0);
+ }
+ print_ip_stats();
+ print_icmp_stats();
+ print_udp_stats();
+ print_tcp_stats();
+ return(0);
+}
+
+int
+main(int argc, char *argv[])
+{
+ char c;
+ char *proto=NULL;
+
+ progname=argv[0];
+
+ while((c=getopt(argc,argv,"rsp:"))!=-1) {
+ switch(c) {
+ case 'r':
+ rflag++;
+ break;
+ case 's':
+ sflag++;
+ rflag=0;
+ break;
+ case 'p':
+ pflag++;
+ proto=optarg;
+ break;
+ case '?':
+ default:
+ usage();
+ exit(0);
+ break;
+ }
+ }
+ argc-=optind;
+ if(argc>0) {
+ usage();
+ exit(-1);
+ }
+ if(rflag) {
+ routing(proto);
+ } else {
+ stats(proto);
+ }
+ exit(0);
+}
diff --git a/release/picobsd/tinyware/oinit/Makefile b/release/picobsd/tinyware/oinit/Makefile
new file mode 100644
index 0000000..92b7c54
--- /dev/null
+++ b/release/picobsd/tinyware/oinit/Makefile
@@ -0,0 +1,12 @@
+# $Id: Makefile,v 1.4 1998/08/09 18:50:45 abial Exp $
+#
+PROG=oinit
+#CFLAGS+=-DUSE_HISTORY
+CFLAGS+=-DOINIT_RC=\"/etc/oinit.rc\"
+#LDADD=-lutil -ledit -ltermcap
+LDADD=-lutil
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/oinit/README b/release/picobsd/tinyware/oinit/README
new file mode 100644
index 0000000..e14b0af
--- /dev/null
+++ b/release/picobsd/tinyware/oinit/README
@@ -0,0 +1,123 @@
+Warsaw, 1998.07.07
+
+This README shortly describes the features of "oinit" - a very simplistic
+version of init(8) combined with a shell.
+
+Features
+--------
+
+* oinit is able to run system in multi- and single-user modes,
+* it can be started on system with DEVFS/SLICE (i.e. empty /dev),
+* provides minimalistic user interface, called "shell()",
+* it can run the system startup script (/etc/rc),
+* it can be compiled with -DOINIT_RC to use its own startup script
+ (*very* primitive, but doesn't require any real shell to run it!),
+* doesn't require the whole chain of init->getty->login->shell to be run,
+* it is extremely small, and is ideally suited for situations when
+ there is little memory.
+
+As an additional bonus you receive some obvious and some hidden bugs... :-))
+This code is at most alpha quality yet.
+
+
+How it works
+------------
+
+Unlike normal init(8), it forks itself on given number of vty's immediately
+providing shell() interface. Currently it doesn't require (and is unable to
+perform) any authentication, but this is easy to add if needed.
+
+Standard version of FreeBSD kernel looks for /sbin/init first, and then
+tries to execute it. If it fails, it tries to find:
+ /sbin/oinit
+ /sbin/init.bak
+ /stand/sysinstall
+
+So it is easy to make use of it even on standard system - just put it in
+/sbin/oinit and rename /sbin/init to something else, e.g. /sbin/init.bak.
+
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+Init (or oinit) plays crucial role in the system. If you plan to do any
+changes to your system's init, make sure you have a boot floppy with working
+version of statically compiled init(8) on it - you can very easily put your
+system in unusable state when fiddling with it.
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+Shell() interface
+-----------------
+
+It allows you to issue built-in and external commands. Built-in commands
+are listed below. For each command there is short help available, with
+example of usage.
+
+ cd change working directory
+ pwd print working directory
+ set set environment variable (no expansion)
+ unset unset environment variable
+ env print all environment variables
+ echo echo arguments on stdout
+ exit exit from shell (oinit will start a new one after some delay)
+ . source-in a file with commands
+ ? help
+
+Any other command is passed to execvp(3) as it is.
+
+EXCEPTION: if you end the command line with a '&', the command is started
+as daemon. This is NOT the same as in normal shell, where the '&' puts a
+process in background. Here the newly started process is totally dissociated
+from terminal.
+
+Prompt tells you:
+* your `pwd`
+* your PID
+* and that you are root ('#').
+
+WARNING: this pseudo-shell doesn't do any expansion whatsoever.
+
+To do list
+----------
+
+- oinit proper:
+ * fix signal handling and transitions,
+ * invent a one-file configuration database (combining as many files
+ from /etc as possible into one) able to properly handle inter-
+ dependencies in running various daemons,
+ * allow for interpreting of such database, and running various
+ programs ourselves (this would eventually allow to make /bin/sh
+ an option, not necessity),
+ * better hooks for incorporating other modules into oinit (see e.g.
+ the telnet() below),
+ * add optional authentication,
+
+- shell():
+ * more built-ins: perhaps 'kill' and 'ps',
+ * variable expansion,
+ * globbing,
+ * conditionals,
+ * history? (it depends on how much memory it needs).
+ * programmatic hooks for easy customisation of user interface (like
+ hierarchy of commands and contexts),
+ * ...
+
+- implement as a routine (like shell()) a small remote login daemon telnet(),
+ as a built-in module to oinit. It would implement the simplest options of
+ normal telnet, and would itself handle authentication, passing control to
+ shell() on success. The authentication routine would be the same as for
+ checking console access.
+
+And allow me for a moment of day-dreaming: I'd like to rewrite oinit one day
+to be a monolithic one-in-all application, non-forking but multithreaded... It
+would contain all the modules, such as shell(), telnet(), ifconfig() etc...
+started as threads, not separate processes.
+
+Credits
+-------
+
+The overall framework was taken from FreeBSD /sbin/init.
+
+Andrzej Bialecki
+<abial@nask.pl>
+
+$Id: README,v 1.5 1998/08/11 06:53:47 abial Exp $
diff --git a/release/picobsd/tinyware/oinit/oinit.c b/release/picobsd/tinyware/oinit/oinit.c
new file mode 100644
index 0000000..8cadb87
--- /dev/null
+++ b/release/picobsd/tinyware/oinit/oinit.c
@@ -0,0 +1,924 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: oinit.c,v 1.8 1998/08/11 06:53:47 abial Exp $
+ */
+
+/*
+ * A primitive version of init(8) with simplistic user interface
+ */
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+#include <sys/reboot.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
+#include <ctype.h>
+#include <err.h>
+
+#ifdef USE_HISTORY
+#error "Not yet. But it's quite simple to add - patches are welcome!"
+#endif
+
+#include <errno.h>
+#include <fcntl.h>
+#include <libutil.h>
+#include <paths.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#include <syslog.h>
+#include <unistd.h>
+#include <varargs.h>
+
+#define BUFSIZE 1024
+#define MAX_CONS 12
+
+#define NONE 0
+#define SINGLE 1
+#define MULTI 2
+#define DEATH 3
+
+#define FALSE 0
+#define TRUE 1
+
+char cwd[BUFSIZE];
+char vty[]="0123456789abcdef";
+char *progname;
+char *motd=NULL;
+int ncons=MAX_CONS;
+int Reboot=FALSE;
+int transition=MULTI;
+int prevtrans=SINGLE;
+jmp_buf machine;
+
+char *trans[]={ "NONE", "SINGLE", "MULTI", "DEATH" };
+
+extern char **environ;
+
+/* Struct for holding session state */
+struct sess {
+ char tty[11]; /* vty device path */
+ pid_t pid; /* pid of process running on it */
+ int (*func)(int argc, char **argv);
+ /* internal function to run on it (after forking) */
+} ttys[MAX_CONS];
+
+/* Struct for built-in command */
+struct command {
+ char *cmd; /* command name */
+ char *descr; /* command description */
+ char *usage; /* usage */
+ char *example; /* example of usage */
+ int (*func)(char *); /* callback function */
+};
+
+/* Prototypes */
+int cd __P((char *));
+int pwd __P((char *));
+int echo __P((char *));
+int xit __P((char *));
+int set __P((char *));
+int unset __P((char *));
+int env __P((char *));
+int help __P((char *));
+int sourcer __P((char *));
+void do_command __P((int shell, char *cmdline));
+void transition_handler __P((int));
+
+/* Table of built-in functions */
+struct command bltins[]={
+ {"cd","Change working directory","cd [dir]","cd /etc",cd},
+ {"pwd","Print current directory","pwd","pwd",pwd},
+ {"exit","Exit from shell()","exit","exit",xit},
+ {"set","Set environment variable","set [VAR=value]","set TERM=cons25",set},
+ {"unset","Unset environment variable","unset VAR","unset EDITOR",unset},
+ {"echo","Echo arguments on stdout","echo arg1 arg2 ...","echo Hello World!",echo},
+ {"env","Print all environment variables","env","env",env},
+ {".","Source-in a file with commands",". filename",". /etc/rc",sourcer},
+ {"?","Print this help :-)","? [command]","? set",help},
+ {NULL,NULL,NULL,NULL,NULL}
+};
+
+/*
+ * Built-in 'cd <path>' handler
+ */
+int
+cd(char *path)
+{
+ if(chdir(path)) return(-1);
+ getcwd(cwd,BUFSIZE);
+ return(0);
+}
+
+/*
+ * Built-in 'pwd' handler
+ */
+int
+pwd(char *dummy)
+{
+
+ if(getcwd(cwd,BUFSIZE)==NULL) return(-1);
+ printf("%s\n",cwd);
+ return(0);
+}
+
+/*
+ * Built-in 'exit' handler
+ */
+int
+xit(char *dummy)
+{
+ _exit(0);
+}
+
+/*
+ * Built-in 'echo' handler
+ */
+int
+echo(char *args)
+{
+ int i=0,j;
+ int len;
+ char c;
+ int s_quote=0,d_quote=0;
+ int sep=0,no_lf=0;
+
+ if(args==NULL) {
+ printf("\n");
+ return;
+ }
+ len=strlen(args);
+ if(len>=2) {
+ if(args[0]=='-' && args[1]=='n') {
+ no_lf++;
+ i=2;
+ while(i<len && (args[i]==' ' || args[i]=='\t')) i++;
+ }
+ }
+ while(i<len) {
+ c=args[i];
+ switch(c) {
+ case ' ':
+ case '\t':
+ if(s_quote||d_quote) {
+ putchar(c);
+ } else if(!sep) {
+ putchar(' ');
+ sep=1;
+ }
+ break;
+ case '\\':
+ i++;
+ c=args[i];
+ switch(c) {
+ case 'n':
+ putchar('\n');
+ break;
+ case 'b':
+ putchar('\b');
+ break;
+ case 't':
+ putchar('\t');
+ break;
+ case 'r':
+ putchar('\r');
+ break;
+ default:
+ putchar(c);
+ break;
+ }
+ break;
+ case '"':
+ if(!d_quote) {
+ d_quote=1;
+ for(j=i+1;j<len;j++) {
+ if(args[j]=='\\') {
+ j++;
+ continue;
+ }
+ if(args[j]=='"') {
+ d_quote=2;
+ break;
+ }
+ }
+ if(d_quote!=2) {
+ printf("\necho(): unmatched \"\n");
+ return;
+ }
+ } else d_quote=0;
+ break;
+ case '\'':
+ if(!s_quote) {
+ s_quote=1;
+ for(j=i+1;j<len;j++) {
+ if(args[j]=='\\') {
+ j++;
+ continue;
+ }
+ if(args[j]=='\'') {
+ s_quote=2;
+ break;
+ }
+ }
+ if(s_quote!=2) {
+ printf("\necho(): unmatched '\n");
+ return;
+ }
+ } else s_quote=0;
+ break;
+ case '`':
+ printf("echo(): backquote not implemented yet!\n");
+ break;
+ default:
+ sep=0;
+ putchar(c);
+ break;
+ }
+ i++;
+ }
+ if(!no_lf) putchar('\n');
+ fflush(stdout);
+}
+
+/*
+ * Built-in 'set VAR=value' handler
+ */
+int
+set(char *var)
+{
+ int res;
+
+ if(var==NULL) return(env(NULL));
+ res=putenv(var);
+ if(res) printf("set: %s\n",strerror(errno));
+ return(res);
+}
+
+/*
+ * Built-in 'env' handler
+ */
+int
+env(char *dummy)
+{
+ char **e;
+
+ e=environ;
+ while(*e!=NULL) {
+ printf("%s\n",*e++);
+ }
+ return(0);
+}
+
+/*
+ * Built-in 'unset VAR' handler
+ */
+int
+unset(char *var)
+{
+ if(var==NULL) {
+ printf("%s: parameter required.\n",progname);
+ return(-1);
+ }
+ return(unsetenv(var));
+}
+
+/*
+ * Built-in '?' handler
+ */
+int
+help(char *cmd)
+{
+ struct command *x;
+ int found=0;
+
+ if(cmd==NULL) {
+ printf("\nBuilt-in commands:\n");
+ printf("-------------------\n");
+ x=bltins;
+ while(x->cmd!=NULL) {
+ printf("%s\t%s\n",x->cmd,x->descr);
+ x++;
+ }
+ printf("\nEnter '? <cmd>' for details.\n\n");
+ return(0);
+ } else {
+ x=bltins;
+ while(x->cmd!=NULL) {
+ if(strcmp(x->cmd,cmd)==0) {
+ found++;
+ break;
+ }
+ x++;
+ }
+ if(found) {
+ printf("\n%s\t%s:\n",x->cmd,x->descr);
+ printf("\tUsage:\n\t\t%s\n",x->usage);
+ printf("\te.g:\n\t\t%s\n\n",x->example);
+ return(0);
+ } else {
+ printf("\n%s: no such command.\n\n",cmd);
+ return(-1);
+ }
+ }
+}
+
+/*
+ * Signal handler for shell()
+ */
+void
+shell_sig(int sig)
+{
+ switch(sig) {
+ case SIGINT:
+ case SIGQUIT:
+ case SIGTERM:
+ /* ignore ? */
+ break;
+ default:
+ break;
+ }
+}
+
+/*
+ * Built-in '.' handler (read-in and execute commands from file)
+ */
+int
+sourcer(char *fname)
+{
+ FILE *fd;
+ char buf[512],*tok,*arg,**av;
+ int ac,len,f,res,i;
+ pid_t pid;
+ char *sep=" \t";
+
+ fd=fopen(fname,"r");
+ if(fd==NULL) {
+ printf("Couldn't open file '%s'\n",fname);
+ return(-1);
+ }
+ while(!feof(fd)) {
+ memset(buf,0,512);
+ if(fgets(buf,512,fd)==NULL) continue;
+ if((*buf=='#') || (*buf=='\n')) continue;
+ len=strlen(buf);
+ buf[len-1]='\0';
+ if(strncmp(buf,"ncons",5)==0) {
+ tok=strtok(buf,sep);
+ tok=strtok(NULL,sep);
+ ncons=atoi(tok);
+ if((ncons<1)||(ncons>MAX_CONS)) {
+ syslog(LOG_EMERG,"%s: bad ncons value; defaulting to %d\n",fname,MAX_CONS);
+ ncons=MAX_CONS;
+ }
+ continue;
+ } else if(strncmp(buf,"motd",4)==0) {
+ tok=strtok(buf,sep);
+ motd=strdup(strtok(NULL,sep));
+ continue;
+ } else {
+ do_command(0,buf);
+ }
+ /* Next command, please. */
+ }
+ fclose(fd);
+ syslog(LOG_EMERG,"Done with %s",fname);
+}
+
+void
+do_command(int shell, char *cmdline)
+{
+ char *tok,*c,*sep=" \t";
+ char **av;
+ struct command *x;
+ int found,len;
+ int ac,i,f,res;
+ int bg=0;
+ pid_t pid;
+
+ len=strlen(cmdline);
+ if(cmdline[len-1]=='&') {
+ bg++;
+ cmdline[len-1]='\0';
+ len--;
+ } else bg=0;
+ tok=strtok(cmdline,sep);
+ x=bltins;
+ found=0;
+ while(x->cmd!=NULL) {
+ if(strcmp(x->cmd,tok)==0) {
+ found++;
+ break;
+ }
+ x++;
+ }
+ if(found) {
+ tok=cmdline+strlen(x->cmd)+1;
+ while(*tok && isblank(*tok) && (tok<(cmdline+len))) tok++;
+ if(*tok==NULL) tok=NULL;
+ x->func(tok);
+ return;
+ }
+ ac=0;
+ av=(char **)calloc(((len+1)/2+1),sizeof(char *));
+ av[ac++]=tok;
+ while((av[ac++]=strtok(NULL,sep))!=NULL)
+ continue;
+ switch((pid=fork())) {
+ case 0:
+ if(shell) {
+ signal(SIGINT,SIG_DFL);
+ signal(SIGQUIT,SIG_DFL);
+ signal(SIGTERM,SIG_DFL);
+ signal(SIGHUP,SIG_DFL);
+ } else {
+ close(0);
+ close(1);
+ close(2);
+ f=open(_PATH_CONSOLE,O_RDWR);
+ dup2(f,0);
+ dup2(f,1);
+ dup2(f,2);
+ if(f>2) close(f);
+ }
+ if(bg) {
+ if(daemon(0,0)) {
+ printf("do_command(%s): failed to run bg: %s\n",
+ av[0],strerror(errno));
+ _exit(100);
+ }
+ }
+ execvp(av[0],av);
+ /* Something went wrong... */
+ printf("do_command(%s): %s\n",av[0],strerror(errno));
+ _exit(100);
+ break;
+ case -1:
+ printf("do_command(): %s\n",strerror(errno));
+ break;
+ default:
+ while(waitpid(pid,&res,0)!=pid) continue;
+ if(WEXITSTATUS(res)) {
+ printf("%s exited with status %d\n",
+ av[0],WEXITSTATUS(res));
+ }
+ break;
+ }
+ free(av);
+ return;
+}
+
+/*
+ * This is the user interface. This routine gets executed on each
+ * virtual console serviced by init.
+ *
+ * It works as normal shell does - for each external command it forks
+ * and execs, for each internal command just executes a function.
+ */
+
+int
+shell(int argc, char **argv)
+{
+ char buf[BUFSIZE];
+ char *prompt=" # ";
+ int fd;
+ int res;
+ pid_t mypid;
+
+ if(motd!=NULL) {
+ if((fd=open(motd,O_RDONLY))!=-1) {
+ do {
+ res=read(fd,buf,BUFSIZE);
+ res=write(1,buf,res);
+ } while(res>0);
+ close(fd);
+ }
+ }
+
+ printf("\n\n+=========================================================+\n");
+ printf("| Built-in shell() (enter '?' for short help on commands) |\n");
+ printf("+=========================================================+\n\n");
+ getcwd(cwd,BUFSIZE);
+ mypid=getpid();
+ signal(SIGINT,shell_sig);
+ signal(SIGQUIT,shell_sig);
+ signal(SIGTERM,shell_sig);
+ while(!feof(stdin)) {
+ memset(buf,0,BUFSIZE);
+ printf("(%d)%s%s",mypid,cwd,prompt);
+ fflush(stdout);
+ if(fgets(buf,BUFSIZE-1,stdin)==NULL) continue;
+ buf[strlen(buf)-1]='\0';
+ if(strlen(buf)==0) continue;
+ do_command(1,buf);
+ }
+ return(0);
+}
+
+/*
+ * Stub for executing some external program on a console. This is called
+ * from previously forked copy of our process, so that exec is ok.
+ */
+int
+external_cmd(int argc, char **argv)
+{
+ execvp(argv[0],argv);
+}
+
+/*
+ * Acquire vty and properly attach ourselves to it.
+ * Also, build basic environment for running user interface.
+ */
+
+int
+start_session(int vty, int argc, char **argv)
+{
+ int fd;
+ char *t;
+
+ close(0);
+ close(1);
+ close(2);
+ revoke(ttys[vty].tty);
+ fd=open(ttys[vty].tty,O_RDWR);
+ dup2(fd,0);
+ dup2(fd,1);
+ dup2(fd,2);
+ if(fd>2) close(fd);
+ login_tty(fd);
+ setpgid(0,getpid());
+ putenv("TERM=cons25");
+ putenv("HOME=/");
+ putenv("PATH=/stand:/bin:/usr/bin:/sbin:.");
+ signal(SIGHUP,SIG_DFL);
+ signal(SIGINT,SIG_DFL);
+ signal(SIGQUIT,SIG_DFL);
+ signal(SIGTERM,SIG_DFL);
+ chdir("/");
+ t=(char *)(rindex(ttys[vty].tty,'/')+1);
+ printf("\n\n\nStarting session on %s.\n",t);
+ ttys[vty].func(argc,argv);
+ _exit(0);
+}
+
+/*
+ * Execute system startup script /etc/rc
+ *
+ * (Of course if you don't like it - I don't - you can run anything you
+ * want here. Perhaps it would be useful just to read some config DB and
+ * do these things ourselves, avoiding forking lots of shells and scripts.)
+ */
+
+/* If OINIT_RC is defined, oinit will use it's own configuration file,
+ * /etc/oinit.rc. It's format is described below. Otherwise, it will use
+ * normal /etc/rc interpreted by Bourne shell.
+ */
+#ifndef OINIT_RC
+void
+runcom()
+{
+ char *argv[3];
+ pid_t pid;
+ int st;
+ int fd;
+
+ if((pid=fork())==0) {
+ /* child */
+ close(0);
+ close(1);
+ close(2);
+ fd=open(_PATH_CONSOLE,O_RDWR);
+ dup2(fd,0);
+ dup2(fd,1);
+ dup2(fd,2);
+ if(fd>2) close(fd);
+ argv[0]="-sh";
+ argv[1]="/etc/rc";
+ argv[2]=0;
+ execvp("/bin/sh",argv);
+ printf("runcom(): %s\n",strerror(errno));
+ _exit(1);
+ }
+ /* Wait for child to exit */
+ while(pid!=waitpid(pid,(int *)0,0)) continue;
+ return;
+}
+#else
+/* Alternative /etc/rc - default is /etc/oinit.rc. Its format is as follows:
+ * - each empty line or line beginning with a '#' is discarded
+ * - any other line must contain a keyword, or a (nonblocking) command to run.
+ *
+ * Thus far, the following keywords are defined:
+ * ncons <number> number of virtual consoles to open
+ * motd <pathname> full path to motd file
+ *
+ * Examples of commands to run:
+ *
+ * ifconfig lo0 inet 127.0.0.1 netmask 255.0.0.0
+ * ifconfig ed0 inet 148.81.168.10 netmask 255.255.255.0
+ * kbdcontrol -l /usr/share/syscons/my_map.kbd
+ */
+void
+runcom(char *fname)
+{
+ sourcer(fname);
+}
+#endif
+
+int
+run_multi()
+{
+ int i,j;
+ pid_t pid;
+ int found;
+
+ /* Run /etc/rc if not in single user */
+#ifndef OINIT_RC
+ if(prevtrans==SINGLE) runcom();
+#else
+ if(prevtrans==SINGLE) runcom(OINIT_RC);
+#endif
+ if(transition!=MULTI) return(-1);
+
+ syslog(LOG_EMERG,"*** Starting multi-user mode ***");
+
+ /* Fork shell interface for each console */
+ for(i=0;i<ncons;i++) {
+ if(ttys[i].pid==0) {
+ switch(pid=fork()) {
+ case 0:
+ start_session(i,0,NULL);
+ break;
+ case -1:
+ printf("%s: %s\n",progname,strerror(errno));
+ break;
+ default:
+ ttys[i].pid=pid;
+ break;
+ }
+ }
+ }
+ /* Initialize any other services we'll use - most probably this will
+ * be a 'telnet' service (some day...).
+ */
+ /* */
+
+ /* Emulate multi-user */
+ while(transition==MULTI) {
+ /* XXX Modify this to allow for checking for the input on
+ * XXX listening sockets, and forking a 'telnet' service.
+ */
+ /* */
+
+ /* Wait for any process to exit */
+ pid=waitpid(-1,(int *)0,0);
+ if(pid==-1) continue;
+ found=0;
+ j=-1;
+ /* search if it's one of our sessions */
+ for(i=0;i<ncons;i++) {
+ if(ttys[i].pid==pid) {
+ found++;
+ j=i;
+ ttys[j].pid=0;
+ break;
+ }
+ }
+ if(!found) {
+ /* Just collect the process's status */
+ continue;
+ } else {
+ /* restart shell() on a console, if it died */
+ if(transition!=MULTI) return(0);
+ switch(pid=fork()) {
+ case 0:
+ sleep(1);
+ start_session(j,0,NULL);
+ break;
+ case -1:
+ printf("%s: %s\n",progname,strerror(errno));
+ break;
+ default:
+ ttys[j].pid=pid;
+ break;
+ }
+ }
+ }
+}
+
+int clang;
+
+void
+kill_timer(int sig)
+{
+ clang=1;
+}
+
+kill_ttys()
+{
+}
+
+/*
+ * Start a shell on ttyv0 (i.e. the console).
+ */
+
+int
+run_single()
+{
+ int i;
+ pid_t pid,wpid;
+ static int sigs[2]={SIGTERM,SIGKILL};
+
+ syslog(LOG_EMERG,"*** Starting single-user mode ***");
+ /* Kill all existing sessions */
+ syslog(LOG_EMERG,"Killing all existing sessions...");
+ for(i=0;i<MAX_CONS;i++) {
+ kill(ttys[i].pid,SIGHUP);
+ ttys[i].pid=0;
+ }
+ for(i=0;i<2;i++) {
+ if(kill(-1,sigs[i])==-1 && errno==ESRCH) break;
+ clang=0;
+ alarm(10);
+ do {
+ pid=waitpid(-1,(int *)0,WUNTRACED);
+ if(errno==EINTR) continue;
+ else break;
+ } while (clang==0);
+ }
+ if(errno!=ECHILD) {
+ syslog(LOG_EMERG,"Some processes would not die; ps -axl advised");
+ }
+ /* Single-user */
+ switch(pid=fork()) {
+ case 0:
+ start_session(0,0,NULL);
+ break;
+ case -1:
+ printf("%s: %s\n",progname,strerror(errno));
+ printf("The system is seriously hosed. I'm dying...\n");
+ transition=DEATH;
+ return(-1);
+ break;
+ default:
+ do {
+ wpid=waitpid(pid,(int *)0,WUNTRACED);
+ } while(wpid!=pid && transition==SINGLE);
+ if(transition!=DEATH) {
+ prevtrans=transition;
+ transition=MULTI;
+ }
+ break;
+ }
+ return(0);
+}
+
+/*
+ * Transition handler - installed as signal handler.
+ */
+
+void
+transition_handler(int sig)
+{
+
+ switch(sig) {
+ case SIGHUP:
+ case SIGTERM:
+ prevtrans=transition;
+ transition=SINGLE;
+ syslog(LOG_EMERG,"*** Going from %s -> %s\n",trans[prevtrans],trans[transition]);
+ if(prevtrans!=transition) longjmp(machine,sig);
+ break;
+ case SIGINT:
+ case SIGQUIT:
+ prevtrans=transition;
+ transition=DEATH;
+ syslog(LOG_EMERG,"*** Going from %s -> %s\n",trans[prevtrans],trans[transition]);
+ if(prevtrans!=transition) longjmp(machine,sig);
+ break;
+ default:
+ syslog(LOG_EMERG,"pid=%d sig=%s (ignored)\n",getpid(),sys_siglist[sig]);
+ break;
+ }
+}
+
+/*
+ * Change system state appropriately to the signals
+ */
+
+int
+transition_machine()
+{
+ int i;
+
+ while(transition!=DEATH) {
+ switch(transition) {
+ case MULTI:
+ run_multi();
+ break;
+ case SINGLE:
+ run_single();
+ break;
+ }
+ }
+ syslog(LOG_EMERG,"Killing all existing sessions...");
+ /* Kill all sessions */
+ kill(-1,SIGKILL);
+ /* Be nice and wait for them */
+ while(waitpid(-1,(int *)0,WNOHANG|WUNTRACED)>0) continue;
+ unmount("/",0);
+ reboot(RB_AUTOBOOT);
+ /* NOTREACHED */
+}
+
+int
+main(int argc, char **argv)
+{
+ int devfs=0,c,i;
+
+ /* These are copied from real init(8) */
+ if(getuid()!=0)
+ errx(1,"%s",strerror(EPERM));
+ openlog("init",LOG_CONS|LOG_ODELAY,LOG_AUTH);
+ if(setsid()<0)
+ warn("initial setsid() failed");
+ if(setlogin("root")<0)
+ warn("setlogin() failed");
+
+ close(0);
+ close(1);
+ close(2);
+ chdir("/");
+
+ progname=rindex(argv[0],'/');
+ if(progname==NULL) {
+ progname=argv[0];
+ } else progname++;
+
+ transition=MULTI;
+
+ /* We must recognize the same options as real init does */
+ while((c=getopt(argc,argv,"dsf"))!=-1) {
+ switch(c) {
+ case 'd':
+ devfs=1;
+ break;
+ case 's':
+ transition=SINGLE;
+ break;
+ case 'f':
+ break;
+ default:
+ printf("%s: unrecognized flag '-%c'\n",progname,c);
+ break;
+ }
+ }
+ if(devfs)
+ mount("devfs","/dev",MNT_NOEXEC|MNT_RDONLY,0);
+
+ /* Fill in the sess structures. */
+ /* XXX Really, should be filled basing on config file. */
+ for(i=0;i<MAX_CONS;i++) {
+ sprintf(ttys[i].tty,"/dev/ttyv%c",vty[i]);
+ ttys[i].pid=0;
+ ttys[i].func=shell;
+ }
+
+ getcwd(cwd,BUFSIZE);
+
+ signal(SIGINT,transition_handler);
+ signal(SIGQUIT,transition_handler);
+ signal(SIGTERM,transition_handler);
+ signal(SIGHUP,transition_handler);
+ signal(SIGALRM,kill_timer);
+
+ setjmp(machine);
+ transition_machine(transition);
+ /* NOTREACHED */
+ exit(100);
+}
diff --git a/release/picobsd/tinyware/simple_httpd/README b/release/picobsd/tinyware/simple_httpd/README
new file mode 100644
index 0000000..0f69f56
--- /dev/null
+++ b/release/picobsd/tinyware/simple_httpd/README
@@ -0,0 +1,6 @@
+Contributed by Marc Nicholas <marc@netstor.com>
+
+This is a simple, non-forking WWW server. It is free for non-commercial
+use only - see the source code for info on commercial licensing.
+
+$Id: README,v 1.1 1998/08/19 16:24:06 abial Exp $
diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
new file mode 100644
index 0000000..0a83f67
--- /dev/null
+++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
@@ -0,0 +1,356 @@
+/* simpleHTTPd (C) 1998 netSTOR Technologies, Inc. ("netSTOR")
+ FreeBSD port and additional work by Marc Nicholas <marc@netstor.com>
+ Based on work by:-
+ Thierry Leconte & Yury Shimanovsky
+ My Russian webserver writing friends :-)
+
+ This is an HTTP daemon that will serve up HTML, text files, JPEGs,
+ GIFs and do simple CGI work.
+
+ You may use this code for non-commercial distribution only. Commercial
+ distribution requires the express, written permission of netSTOR. No
+ warranty is implied or given -- use at your own risk!
+*/
+
+/*
+ * $Id: simple_httpd.c,v 1.1 1998/08/19 16:24:06 abial Exp $
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <fcntl.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/wait.h>
+
+int http_sock, con_sock;
+int http_port = 80;
+struct sockaddr_in source;
+char homedir[100];
+char *adate();
+struct hostent *hst;
+
+void
+init_servconnection(void)
+{
+ struct sockaddr_in server;
+
+ /* Create a socket */
+ http_sock = socket(AF_INET, SOCK_STREAM, 0);
+ if (http_sock < 0) {
+ perror("socket");
+ exit(1);
+ }
+ server.sin_family = AF_INET;
+ server.sin_port = htons(http_port);
+ server.sin_addr.s_addr = INADDR_ANY;
+ if (bind(http_sock, (struct sockaddr *) & server, sizeof(server)) < 0) {
+ perror("bind socket");
+ exit(1);
+ }
+ printf("simpleHTTPd running on %d port\n",http_port);
+}
+
+attenteconnection(void)
+{
+ int lg;
+
+ lg = sizeof(struct sockaddr_in);
+
+ con_sock = accept(http_sock, (struct sockaddr *) & source, &lg);
+ if (con_sock <= 0) {
+ perror("accept");
+ exit(1);
+ }
+}
+
+outdate()
+{
+ time_t tl;
+ char buff[50];
+
+ tl = time(NULL);
+ strftime(buff, 50, "Date: %a, %d %h %Y %H:%M:%S %Z\r\n", gmtime(&tl));
+ write(con_sock, buff, strlen(buff));
+}
+
+char *rep_err_nget[2] = {"<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY><H1>Error 405</H1>\
+This server is supports only GET and HEAD requests\n</BODY></HTML>\r\n",
+"HTTP/1.0 405 Method Not allowed\r\nAllow: GET,HEAD\r\nServer: jhttpd\r\n"};
+
+char *rep_err_acc[2] = {"<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY><H1>Error 404</H1>\
+Not found - file doesn't exist or is read protected\n</BODY></HTML>\r\n",
+"HTTP/1.0 404 Not found\r\nServer: jhttpd\r\n"};
+
+outerror(char **rep, int http1) /* ÷ÙÄÙÞÁ ÏÛÉÂËÉ ËÌÉÅÎÔÕ × html- ×ÉÄÅ */
+{
+
+ if (http1) {
+ write(con_sock, rep[1], strlen(rep[1]));
+ outdate();
+ write(con_sock, "\r\n", 2);
+ }
+ write(con_sock, rep[0], strlen(rep[0]));
+}
+
+char rep_head[] = "HTTP/1.0 200 OK\r\nServer: simpleHTTPD\r\n";
+
+traite_req()
+{
+ char buff[8192];
+ int fd, lg, cmd, http1, i;
+ char *filename, *c;
+ struct stat statres;
+ char req[1024];
+ char logfile[80];
+ char msg[1024];
+ char *p,
+ *par;
+ long addr;
+ FILE *log;
+
+ lg = read(con_sock, req, 1024);
+
+ if (p=strstr(req,"\n")) *p=0;
+ if (p=strstr(req,"\r")) *p=0;
+
+ if (geteuid())
+ {
+ strcpy(logfile,getenv("HOME"));
+ strcat(logfile,"/");
+ strcat(logfile,"jhttp.log");
+ }
+ else strcpy(logfile,"/usr/adm/jhttpd.log");
+
+ if ( access(logfile,W_OK))
+ {
+ lg=creat (logfile,O_WRONLY);
+ chmod (logfile,00600);
+ close(lg);
+ }
+
+ strcpy(buff,inet_ntoa(source.sin_addr));
+
+ addr=inet_addr(buff);
+
+ strcpy(msg,adate());
+ strcat(msg," ");
+ hst=gethostbyaddr((char*) &addr, 4, AF_INET);
+ if (hst) strcat(msg,hst->h_name);
+ strcat(msg," (");
+ strcat(msg,buff);
+ strcat(msg,") ");
+ strcat(msg,req);
+
+ log=fopen(logfile,"a");
+ fprintf(log,"%s\n",msg);
+ fclose(log);
+
+ c = strtok(req, " ");
+ if (c == NULL) {
+ outerror(rep_err_nget, 0);
+ goto error;
+ }
+ cmd = 0;
+ if (strncmp(c, "GET", 3) == 0)
+ cmd = 1;
+ if (strncmp(c, "HEAD", 4) == 0) {
+ cmd = 2;
+ }
+
+ filename = strtok(NULL, " ");
+
+ http1 = 0;
+ c = strtok(NULL, " ");
+ if (c != NULL && strncmp(c, "HTTP", 4) == 0)
+ http1 = 1;
+
+ if (cmd == 0) {
+ outerror(rep_err_nget, http1);
+ goto error;
+ }
+
+ if (filename == NULL ||
+ strlen(filename)==1) filename="/index.html";
+
+ while (filename[0]== '/') filename++;
+
+ /**/
+ if (!strncmp(filename,"cgi-bin/",8))
+ {
+ par=0;
+ if (par=strstr(filename,"?"))
+ {
+ *par=0;
+ par++;
+ }
+ if (access(filename,X_OK)) goto conti;
+ stat (filename,&statres);
+ if (setuid(statres.st_uid)) return(0);
+ if (seteuid(statres.st_uid)) return(0);
+ if (!fork())
+ {
+ close(1);
+ dup(con_sock);
+ printf("HTTP/1.0 200 OK\nContent-type: text/html\n\n\n");
+ execlp (filename,filename,par,0);
+ }
+ wait(&i);
+ return(0);
+ }
+ conti:
+ if (filename == NULL) {
+ outerror(rep_err_acc, http1);
+ goto error;
+ }
+ /* interdit les .. dans le path */
+ c = filename;
+ while (*c != '\0')
+ if (c[0] == '.' && c[1] == '.') {
+ outerror(rep_err_acc, http1);
+ goto error;
+ } else
+ c++;
+
+ fd = open(filename, O_RDONLY);
+ if (fd < 0) {
+ outerror(rep_err_acc, http1);
+ goto error;
+ }
+ if (fstat(fd, &statres) < 0) {
+ outerror(rep_err_acc, http1);
+ goto error;
+ }
+ if (!S_ISREG(statres.st_mode))
+ {
+ outerror(rep_err_acc, http1);
+ goto error;
+ }
+ if (http1) {
+ char buff[50];
+ time_t tl;
+
+ write(con_sock, rep_head, strlen(rep_head));
+ sprintf(buff, "Content-length: %d\r\n", statres.st_size);
+ write(con_sock, buff, strlen(buff));
+ outdate();
+
+ if (strstr(filename,"."))
+ {
+ strcpy(buff,"Content-type: ");
+ strcat(buff,strstr(filename,".")+1);
+ strcat(buff,"\r\n");
+ write(con_sock,buff,strlen(buff));
+ }
+
+ if (strstr(filename,".txt"))
+ {
+ strcpy(buff,"Content-type: text/plain\r\n");
+ write(con_sock, buff, strlen(buff));
+ }
+
+ if (strstr(filename,".html") ||
+ strstr(filename,".htm"))
+ {
+ strcpy(buff,"Content-type: text/html\r\n");
+ write(con_sock, buff, strlen(buff));
+ }
+
+ if (strstr(filename,".gif"))
+ {
+ strcpy(buff,"Content-type: image/gif\r\n");
+ write(con_sock, buff, strlen(buff));
+ }
+
+ if (strstr(filename,".jpg"))
+ {
+ strcpy(buff,"Content-type: image/jpeg\r\n");
+ write(con_sock, buff, strlen(buff));
+ }
+
+ strftime(buff, 50, "Last-Modified: %a, %d %h %Y %H:%M:%S %Z\r\n\r\n", gmtime(&statres.st_mtime));
+ write(con_sock, buff, strlen(buff));
+ }
+ if (cmd == 1) {
+ while (lg = read(fd, buff, 8192))
+ write(con_sock, buff, lg);
+ }
+
+error:
+ close(fd);
+ close(con_sock);
+
+}
+
+
+main(int argc, char **argv)
+{
+ int lg;
+ char hello[100];
+
+ if (argc<2 && geteuid())
+ {
+ printf("Usage: simple_htppd <port>\n");
+ exit(1);
+ }
+
+ if (argc>=2) http_port = atoi(argv[1]);
+
+ strcpy (homedir,getenv("HOME"));
+ if (!geteuid()) strcpy (homedir,"/httphome");
+ else strcat (homedir,"/httphome");
+
+ strcpy(hello,homedir);
+ strcat(hello,"/0hello.html");
+
+ if (chdir(homedir))
+ {
+ perror("chdir");
+ puts(homedir);
+ exit(1);
+ }
+ init_servconnection();
+
+ if (fork()) exit(0);
+
+ setpgrp(0,65534);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+
+ if (listen(http_sock,100) < 0) exit(1);
+
+ label:
+ attenteconnection();
+ if (fork())
+ {
+ close(con_sock);
+ goto label;
+ }
+ alarm(1800);
+ traite_req();
+ exit(0);
+}
+
+
+
+char *adate()
+{
+ static char out[50];
+ long now;
+ struct tm *t;
+ time(&now);
+ t = localtime(&now);
+ sprintf(out, "%02d:%02d:%02d %02d/%02d/%02d",
+ t->tm_hour, t->tm_min, t->tm_sec,
+ t->tm_mday, t->tm_mon+1, t->tm_year );
+ return out;
+}
diff --git a/release/picobsd/tinyware/sps/Makefile b/release/picobsd/tinyware/sps/Makefile
new file mode 100644
index 0000000..c8969bd
--- /dev/null
+++ b/release/picobsd/tinyware/sps/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1 1998/07/16 23:21:59 abial Exp $
+#
+PROG=sps
+SRCS= sps.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/sps/README b/release/picobsd/tinyware/sps/README
new file mode 100644
index 0000000..94098e7
--- /dev/null
+++ b/release/picobsd/tinyware/sps/README
@@ -0,0 +1,17 @@
+1998.07.17
+
+This is a small 'ps' replacement, which uses information available via
+sysctl(3) interface (contrary to the 'aps', which requires you to mount
+procfs(5) to be able to get exactly the same info, so I think that 'sps'
+is superior solution).
+
+When I have some time, I'll add usual switches and other functions that normal
+'ps' has...
+
+The most serious limitation of 'sps' is that it's unable to retrieve the whole
+command line.
+
+
+<abial@nask.pl>
+
+$Id: README,v 1.1 1998/07/16 23:21:59 abial Exp $
diff --git a/release/picobsd/tinyware/sps/sps.c b/release/picobsd/tinyware/sps/sps.c
new file mode 100644
index 0000000..8685eae
--- /dev/null
+++ b/release/picobsd/tinyware/sps/sps.c
@@ -0,0 +1,104 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: sps.c,v 1.2 1998/07/17 07:55:47 abial Exp $
+ */
+
+/*
+ * Small replacement for ps(1) - uses only sysctl(3) to retrieve info
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/stat.h>
+#include <sys/proc.h>
+#include <sys/user.h>
+
+char p_stat[]="?iRSTZ";
+
+int
+main(int argc, char *argv[])
+{
+ int mib[3],i=0,num,len;
+ struct kinfo_proc kp,*t,*u;
+ char buf[20],vty[5],pst[5];
+ int ma,mi;
+
+ mib[0]=CTL_KERN;
+ mib[1]=KERN_PROC;
+ mib[2]=KERN_PROC_ALL;
+ if(sysctl(mib,3,NULL,&len,NULL,0)) {
+ perror("sysctl sizing");
+ exit(1);
+ }
+ t=(struct kinfo_proc *)malloc(len);
+ if(sysctl(mib,3,t,&len,NULL,0)) {
+ perror("sysctl info");
+ exit(1);
+ }
+ num=len / sizeof(struct kinfo_proc);
+ i=0;
+ printf("USERNAME PID PPID PRI NICE TTY STAT WCHAN COMMAND\n");
+ while(i<num) {
+ u=(t+num-i-1);
+ ma=major(u->kp_eproc.e_tdev);
+ mi=minor(u->kp_eproc.e_tdev);
+ switch(ma) {
+ case 255:
+ strcpy(vty,"??");
+ break;
+ case 12:
+ if(mi!=255) {
+ sprintf(vty,"v%d",mi);
+ break;
+ }
+ /* FALLTHROUGH */
+ case 0:
+ strcpy(vty,"con");
+ break;
+ case 5:
+ sprintf(vty,"p%d",mi);
+ break;
+ }
+ sprintf(pst,"%c",p_stat[u->kp_proc.p_stat]);
+ printf("%8s%5d%5d %3d %4d %3s %-4s %-7s (%s)\n",
+ u->kp_eproc.e_login,
+ u->kp_proc.p_pid,
+ u->kp_eproc.e_ppid,
+ u->kp_proc.p_priority,
+ u->kp_proc.p_nice,
+ vty,
+ pst,
+ u->kp_eproc.e_wmesg,
+ u->kp_proc.p_comm);
+ i++;
+ }
+ free(t);
+ exit(0);
+
+}
diff --git a/release/picobsd/tinyware/view/Makefile b/release/picobsd/tinyware/view/Makefile
new file mode 100644
index 0000000..a960fe3
--- /dev/null
+++ b/release/picobsd/tinyware/view/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1 1998/08/19 06:13:34 abial Exp $
+
+PROG=view
+SRCS=view.c
+CFLAGS+=-I/usr/local/include
+LDADD+=-L/usr/local/lib -lpng -lvgl
+NOMAN=yes
+
+.include <bsd.prog.mk>
diff --git a/release/picobsd/tinyware/view/README b/release/picobsd/tinyware/view/README
new file mode 100644
index 0000000..53ec9a0
--- /dev/null
+++ b/release/picobsd/tinyware/view/README
@@ -0,0 +1,86 @@
+Warsaw, 1998.08.18
+
+ VIEW - small PNG viewer
+ -----------------------
+
+This program is intended to serve as a simple console viewer for PNG
+graphics. It also features some scripting abilities, which allow you to
+build simple presentation.
+
+In fact, using even this initial version I was able to build a nice
+presentation of PicoBSD abilities which I used in real-life situation (you
+can see for yourself one of the presentation's screens, fbsd.png).
+
+The audience was impressed :-), especially when I asked them politely what
+are requirements and cost to make that kind of presentation using M$
+products...
+
+Simple Viewing
+--------------
+
+Usage is as follows:
+
+ view [-g nnn.nnn] [-r x] filename.png
+
+where
+ -g nnn.nnn screen gamma (you can adjust how bright is the
+ picture)
+ -r x resolution:
+ 0 - 640x480x16
+ 1 - 640x200x256
+ 2 - 320x240x256
+
+Under right mouse button you can find a simple menu, which tells you also
+the hotkeys. You can shift, rotate and zoom the picture.
+
+Presentation
+------------
+
+Usage is as above, but the file you give as argument is a (unix) text file
+of the following format:
+
+ 1 VIEW SCRIPT
+ 2 5
+ 3 welcome.png
+ 4 /home/clipart/logo.png
+ 5 /home/present/title.png
+ 6 /home/present/outline.png
+ 7 /home/present/end.png
+
+(of course without the line numbering or the leading space!). The line number
+1 is magic, and must be present in order to recognize the file properly.
+
+The second line tells how many pictures consist the presentation. The
+following lines tell the file names containing the images themselves.
+
+See the example in file picobsd.vu.
+
+Command line arguments (gamma and resolution) are as above. You can also use
+the pop-up menu to adjust image parameters, as well as go forward or
+backward in the presentation.
+
+Bugs, caveats, missing features
+-------------------------------
+
+* there are some bugs in libvgl which require strange workarounds, and even
+ then it doesn't work quite right. See the source for the 'XXX' comments...
+
+* I didn't have time to add gamma adjustment to the pop-up menu. It's
+ simple, though, and I leave it as an exercise for the reader :-))
+
+* it would be great if someone would add GIF and jpeg support.
+
+* the error checking is probably weak. A bad PNG file or script file will
+ probably cause a coredump.
+
+* pop-up menu facilities need more abstraction to be usable in other cases.
+
+Anyway, as it is even now it's quite usable.
+
+Have fun!
+
+Andrzej Bialecki
+
+<abial@nask.pl>
+
+$Id: README,v 1.2 1998/08/19 06:19:44 abial Exp $
diff --git a/release/picobsd/tinyware/view/fbsd.png b/release/picobsd/tinyware/view/fbsd.png
new file mode 100644
index 0000000..0c5d3ed
--- /dev/null
+++ b/release/picobsd/tinyware/view/fbsd.png
Binary files differ
diff --git a/release/picobsd/tinyware/view/picobsd.vu b/release/picobsd/tinyware/view/picobsd.vu
new file mode 100644
index 0000000..16a3630
--- /dev/null
+++ b/release/picobsd/tinyware/view/picobsd.vu
@@ -0,0 +1,9 @@
+VIEW SCRIPT
+7
+/png/logo.png
+/png/1.png
+/png/2.png
+/png/p1.png
+/png/p2.png
+/png/p3.png
+/png/p4.png
diff --git a/release/picobsd/tinyware/view/view.c b/release/picobsd/tinyware/view/view.c
new file mode 100644
index 0000000..9285126
--- /dev/null
+++ b/release/picobsd/tinyware/view/view.c
@@ -0,0 +1,583 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: view.c,v 1.1 1998/08/19 06:13:35 abial Exp $
+ */
+
+/*
+ * Small PNG viewer with scripting abilities
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <termios.h>
+#include <sys/types.h>
+#include <machine/console.h>
+#include <machine/mouse.h>
+#include <vgl.h>
+#include <png.h>
+
+#define NUMBER 8
+
+extern char *optarg;
+extern int optind;
+
+/* Prototypes */
+int kbd_action __P((int x, int y, char hotkey));
+
+struct action {
+ int zoom;
+ int rotate;
+ int Xshift,Yshift;
+};
+
+struct menu_item {
+ char *descr;
+ char hotkey;
+ int (*func)(int x, int y, char hotkey);
+};
+
+struct menu_item std_menu[]= {
+ {"q Quit",'q',kbd_action},
+ {"n Next",'n',kbd_action},
+ {"p Previous",'p',kbd_action},
+ {"Z Zoom in",'Z',kbd_action},
+ {"z Zoom out",'z',kbd_action},
+ {"r Rotate",'r',kbd_action},
+ {"R Refresh",'R',kbd_action},
+ {"l Left",'l',kbd_action},
+ {"h Right",'h',kbd_action},
+ {"j Up",'j',kbd_action},
+ {"k Down",'k',kbd_action},
+ {NULL,0,NULL}
+};
+
+char *progname;
+VGLBitmap pic,bkg;
+struct action a;
+byte pal_red[256];
+byte pal_green[256];
+byte pal_blue[256];
+byte pal_colors;
+double screen_gamma;
+int max_screen_colors=15;
+int quit,changed;
+char **pres;
+int nimg=0;
+int cur_img=0;
+char act;
+FILE *log;
+
+void
+usage()
+{
+ fprintf(stderr,"\nVGL graphics viewer, 1.0 (c) Andrzej Bialecki.\n");
+ fprintf(stderr,"\nUsage:\n");
+ fprintf(stderr,"\t%s [-r n] [-g n.n] filename\n",progname);
+ fprintf(stderr,"\nwhere:\n");
+ fprintf(stderr,"\t-r n\tchoose resolution:\n");
+ fprintf(stderr,"\t\t0 - 640x480x16 (default)\n");
+ fprintf(stderr,"\t\t1 - 640x200x256\n");
+ fprintf(stderr,"\t\t2 - 320x240x256\n");
+ fprintf(stderr,"\t-g n.n\tset screen gamma (1.3 by default)\n");
+ fprintf(stderr,"\n");
+}
+
+int
+pop_up(char *title,int x, int y)
+{
+ VGLBitmap sav,clr;
+ int x1,y1,width,height,i,j;
+ int last_pos,cur_pos,max_item;
+ char buttons;
+ char *t;
+
+ sav.Type=VGLDisplay->Type;
+ clr.Type=VGLDisplay->Type;
+ width=0;
+ height=0;
+ max_item=0;
+ i=0;
+ while(std_menu[i].descr!=NULL) {
+ height++;
+ max_item++;
+ if(strlen(std_menu[i].descr)>width) width=strlen(std_menu[i].descr);
+ i++;
+ }
+ width=width*8+2;
+ height=height*9+4+8;
+ sav.Xsize=width;
+ sav.Ysize=height;
+ clr.Xsize=width;
+ clr.Ysize=height;
+ sav.Bitmap=(byte *)calloc(width*height,1);
+ clr.Bitmap=(byte *)calloc(width*height,1);
+ if(x>(VGLDisplay->Xsize-width)) x1=VGLDisplay->Xsize-width;
+ else x1=x;
+ if(y>(VGLDisplay->Ysize-height)) y1=VGLDisplay->Ysize-height;
+ else y1=y;
+ VGLMouseMode(VGL_MOUSEHIDE);
+ VGLBitmapCopy(VGLDisplay,x1,y1,&sav,0,0,width,height);
+ VGLFilledBox(VGLDisplay,x1,y1,x1+width-1,y1+height-1,pal_colors-1);
+ VGLBitmapString(VGLDisplay,x1+1,y1+1,title,0,pal_colors-1,0,0);
+ VGLLine(VGLDisplay,x1,y1+9,x1+width,y1+9,0);
+ i=0;
+ while(std_menu[i].descr!=NULL) {
+ VGLBitmapString(VGLDisplay,x1+1,y1+11+i*9,std_menu[i].descr,0,pal_colors-1,0,0);
+ i++;
+ }
+ last_pos=-1;
+ VGLMouseMode(VGL_MOUSESHOW);
+ do {
+ pause();
+ VGLMouseStatus(&x,&y,&buttons);
+ cur_pos=(y-y1-11)/9;
+ if((cur_pos<0)||(cur_pos>max_item-1)) {
+ if(last_pos==-1) last_pos=0;
+ VGLBitmapString(VGLDisplay,x1+1,y1+11+last_pos*9,std_menu[last_pos].descr,0,pal_colors-1,0,0);
+ last_pos=-1;
+ } else if(last_pos!=cur_pos) {
+ if(last_pos==-1) last_pos=0;
+ VGLBitmapString(VGLDisplay,x1+1,y1+11+last_pos*9,std_menu[last_pos].descr,0,pal_colors-1,0,0);
+ VGLBitmapString(VGLDisplay,x1+1,y1+11+cur_pos*9,std_menu[cur_pos].descr,pal_colors/2+1,pal_colors-1,0,0);
+ last_pos=cur_pos;
+ }
+ } while (buttons & MOUSE_BUTTON3DOWN);
+ VGLMouseMode(VGL_MOUSEHIDE);
+ /* XXX Screws up totally when r==3. Libvgl bug! */
+ VGLBitmapCopy(&clr,0,0,VGLDisplay,x1,y1,width,height);
+ VGLBitmapCopy(&sav,0,0,VGLDisplay,x1,y1,width,height);
+ VGLMouseMode(VGL_MOUSESHOW);
+ free(sav.Bitmap);
+ free(clr.Bitmap);
+ changed++;
+ if((cur_pos>=0) && (cur_pos<max_item)) {
+ std_menu[cur_pos].func(x,y,std_menu[cur_pos].hotkey);
+ }
+ changed++;
+ return(0);
+}
+
+void
+display( VGLBitmap *pic,
+ byte *red,
+ byte *green,
+ byte *blue,
+ struct action *e)
+{
+ VGLBitmap target;
+ int x,y,i=0,j=0;
+
+ VGLMouseMode(VGL_MOUSEHIDE);
+ VGLRestorePalette();
+ /* XXX Broken in r!=2. Libvgl bug. */
+ //VGLClear(VGLDisplay,0);
+ VGLBitmapCopy(&bkg,0,0,VGLDisplay,0,0,bkg.Xsize,bkg.Ysize);
+
+ if(e!=NULL) {
+ if(e->zoom!=1 || e->rotate) {
+ target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize*e->zoom*e->zoom,1);
+ if(e->rotate) {
+ target.Xsize=pic->Ysize*e->zoom;
+ target.Ysize=pic->Xsize*e->zoom;
+ } else {
+ target.Xsize=pic->Xsize*e->zoom;
+ target.Ysize=pic->Ysize*e->zoom;
+ }
+ target.Type=pic->Type;
+ for(x=0;x<pic->Xsize;x++) {
+ for(y=0;y<pic->Ysize;y++) {
+ for(i=0;i<e->zoom;i++) {
+ for(j=0;j<e->zoom;j++) {
+ if(e->rotate) {
+ VGLSetXY(&target,target.Xsize-(e->zoom*y+i),e->zoom*x+j,VGLGetXY(pic,x,y));
+ } else {
+ VGLSetXY(&target,e->zoom*x+i,e->zoom*y+j,VGLGetXY(pic,x,y));
+ }
+ }
+ }
+ }
+ }
+ } else {
+ target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize,sizeof(byte));
+ target.Xsize=pic->Xsize;
+ target.Ysize=pic->Ysize;
+ target.Type=pic->Type;
+ VGLBitmapCopy(pic,0,0,&target,0,0,pic->Xsize,pic->Ysize);
+ }
+ } else {
+ target.Bitmap=(byte *)calloc(pic->Xsize*pic->Ysize,sizeof(byte));
+ target.Xsize=pic->Xsize;
+ target.Ysize=pic->Ysize;
+ target.Type=pic->Type;
+ VGLBitmapCopy(pic,0,0,&target,0,0,pic->Xsize,pic->Ysize);
+ }
+ VGLSetPalette(red, green, blue);
+ if(e!=NULL) {
+ VGLBitmapCopy(&target,0,0,VGLDisplay,e->Xshift,e->Yshift,target.Xsize,target.Ysize);
+ } else {
+ VGLBitmapCopy(&target,0,0,VGLDisplay,0,0,target.Xsize,target.Ysize);
+ }
+ VGLMouseMode(VGL_MOUSESHOW);
+ free(target.Bitmap);
+}
+
+int
+png_load(char *filename)
+{
+ int i,j,k;
+ FILE *fd;
+ u_char header[NUMBER];
+ png_structp png_ptr;
+ png_infop info_ptr,end_info;
+ png_uint_32 width,height;
+ int bit_depth,color_type,interlace_type;
+ int compression_type,filter_type;
+ int channels,rowbytes;
+ double gamma;
+ png_colorp palette;
+ int num_palette;
+ png_bytep *row_pointers;
+ char c;
+ int res=0;
+
+ fd=fopen(filename,"rb");
+
+ if(fd==NULL) {
+ VGLEnd();
+ perror("fopen");
+ exit(1);
+ }
+ fread(header,1,NUMBER,fd);
+ if(!png_check_sig(header,NUMBER)) {
+ fprintf(stderr,"Not a PNG file.\n");
+ return(-1);
+ }
+ png_ptr=png_create_read_struct(PNG_LIBPNG_VER_STRING,(void *)NULL,
+ NULL,NULL);
+ info_ptr=png_create_info_struct(png_ptr);
+ end_info=png_create_info_struct(png_ptr);
+ if(!png_ptr || !info_ptr || !end_info) {
+ VGLEnd();
+ fprintf(stderr,"failed to allocate needed structs!\n");
+ png_destroy_read_struct(&png_ptr,&info_ptr,&end_info);
+ return(-1);
+ }
+ png_set_sig_bytes(png_ptr,NUMBER);
+ png_init_io(png_ptr,fd);
+ png_read_info(png_ptr,info_ptr);
+ png_get_IHDR(png_ptr,info_ptr,&width,&height,&bit_depth,
+ &color_type,&interlace_type,&compression_type,&filter_type);
+ png_get_PLTE(png_ptr,info_ptr,&palette,&num_palette);
+ channels=png_get_channels(png_ptr,info_ptr);
+ rowbytes=png_get_rowbytes(png_ptr,info_ptr);
+ if(bit_depth==16)
+ png_set_strip_16(png_ptr);
+ if(color_type & PNG_COLOR_MASK_ALPHA)
+ png_set_strip_alpha(png_ptr);
+ if(png_get_gAMA(png_ptr,info_ptr,&gamma))
+ png_set_gamma(png_ptr,screen_gamma,gamma);
+ else
+ png_set_gamma(png_ptr,screen_gamma,0.45);
+ if(res==0) {
+ /* Dither */
+ if(color_type & PNG_COLOR_MASK_COLOR) {
+ if(png_get_valid(png_ptr,info_ptr,PNG_INFO_PLTE)) {
+ png_uint_16p histogram;
+ png_get_hIST(png_ptr,info_ptr,&histogram);
+ png_set_dither(png_ptr,palette,num_palette,max_screen_colors,histogram,0);
+ } else {
+ png_color std_color_cube[16]={
+ {0x00,0x00,0x00},
+ {0x02,0x02,0x02},
+ {0x04,0x04,0x04},
+ {0x06,0x06,0x06},
+ {0x08,0x08,0x08},
+ {0x0a,0x0a,0x0a},
+ {0x0c,0x0c,0x0c},
+ {0x0e,0x0e,0x0e},
+ {0x10,0x10,0x10},
+ {0x12,0x12,0x12},
+ {0x14,0x14,0x14},
+ {0x16,0x16,0x16},
+ {0x18,0x18,0x18},
+ {0x1a,0x1a,0x1a},
+ {0x1d,0x1d,0x1d},
+ {0xff,0xff,0xff},
+ };
+ png_set_dither(png_ptr,std_color_cube,max_screen_colors,max_screen_colors,NULL,0);
+ }
+ }
+ }
+ png_set_packing(png_ptr);
+ if(png_get_valid(png_ptr,info_ptr,PNG_INFO_sBIT)) {
+ png_color_8p sig_bit;
+
+ png_get_sBIT(png_ptr,info_ptr,&sig_bit);
+ png_set_shift(png_ptr,sig_bit);
+ }
+ png_read_update_info(png_ptr,info_ptr);
+ png_get_IHDR(png_ptr,info_ptr,&width,&height,&bit_depth,
+ &color_type,&interlace_type,&compression_type,&filter_type);
+ png_get_PLTE(png_ptr,info_ptr,&palette,&num_palette);
+ channels=png_get_channels(png_ptr,info_ptr);
+ rowbytes=png_get_rowbytes(png_ptr,info_ptr);
+ row_pointers=malloc(height*sizeof(png_bytep));
+ for(i=0;i<height;i++) {
+ row_pointers[i]=malloc(rowbytes);
+ }
+ png_read_image(png_ptr,row_pointers);
+ png_read_end(png_ptr,end_info);
+ png_destroy_read_struct(&png_ptr,&info_ptr,&end_info);
+ fclose(fd);
+ /* Set palette */
+ if(res) k=2;
+ else k=2;
+ for(i=0;i<256;i++) {
+ pal_red[i]=255;
+ pal_green[i]=255;
+ pal_blue[i]=255;
+ }
+ for(i=0;i<num_palette;i++) {
+ pal_red[i]=(palette+i)->red>>k;
+ pal_green[i]=(palette+i)->green>>k;
+ pal_blue[i]=(palette+i)->blue>>k;
+ }
+ pal_colors=num_palette;
+ if(pic.Bitmap!=NULL) free(pic.Bitmap);
+ pic.Bitmap=(byte *)calloc(rowbytes*height,sizeof(byte));
+ pic.Type=MEMBUF;
+ pic.Xsize=rowbytes;
+ pic.Ysize=height;
+ for(i=0;i<rowbytes;i++) {
+ for(j=0;j<height;j++) {
+ VGLSetXY(&pic,
+ i,j,row_pointers[j][i]);
+ }
+ }
+ a.zoom=1;
+ a.Xshift=(VGLDisplay->Xsize-pic.Xsize)/2;
+ a.Yshift=(VGLDisplay->Ysize-pic.Ysize)/2;
+ a.rotate=0;
+ return(0);
+}
+
+void
+kbd_handler(int sig)
+{
+ u_char buf[10];
+ int res;
+
+ res=read(0,&buf,10);
+ changed++;
+ act=buf[res-1];
+}
+
+int
+kbd_action(int x, int y, char key)
+{
+ changed=0;
+ switch(key) {
+ case 'q':
+ quit=1;
+ break;
+ case 'Z':
+ a.zoom++;
+ changed++;
+ break;
+ case 'z':
+ a.zoom--;
+ if(a.zoom<1) a.zoom=1;
+ changed++;
+ break;
+ case 'l':
+ a.Xshift+=VGLDisplay->Xsize/5;
+ changed++;
+ break;
+ case 'h':
+ a.Xshift-=VGLDisplay->Xsize/5;
+ changed++;
+ break;
+ case 'k':
+ a.Yshift+=VGLDisplay->Ysize/5;
+ changed++;
+ break;
+ case 'j':
+ a.Yshift-=VGLDisplay->Ysize/5;
+ changed++;
+ break;
+ case 'R':
+ changed++;
+ break;
+ case 'r':
+ if(a.rotate) a.rotate=0;
+ else a.rotate=1;
+ changed++;
+ break;
+ case '\n':
+ case 'n':
+ if((nimg>0) && (cur_img<nimg-1)) {
+ cur_img++;
+ png_load(pres[cur_img]);
+ changed++;
+ }
+ break;
+ case 'p':
+ if((nimg>0) && (cur_img>0)) {
+ cur_img--;
+ png_load(pres[cur_img]);
+ changed++;
+ }
+ break;
+ }
+ act=0;
+}
+
+int
+main(int argc, char *argv[])
+{
+ int i,j,k;
+ char c;
+ int res=0;
+ int x,y;
+ char buttons;
+ struct termios t_new,t_old;
+ FILE *fsc;
+
+ char buf[100];
+
+ progname=argv[0];
+ screen_gamma=1.5;
+ log=fopen("/png/view.log","w");
+ while((c=getopt(argc,argv,"r:g:"))!=-1) {
+ switch(c) {
+ case 'r':
+ res=atoi(optarg);
+ if(res>0) max_screen_colors=256;
+ break;
+ case 'g':
+ screen_gamma=atof(optarg);
+ break;
+ case '?':
+ default:
+ usage();
+ exit(0);
+ }
+ }
+ switch(res) {
+ case 0:
+ VGLInit(SW_CG640x480);
+ break;
+ case 1:
+ VGLInit(SW_VGA_CG320);
+ break;
+ case 2:
+ VGLInit(SW_VGA_MODEX);
+ break;
+ default:
+ fprintf(stderr,"No such resolution!\n");
+ usage();
+ exit(-1);
+ }
+ fprintf(log,"VGL initialised\n");
+ VGLSavePalette();
+ VGLMouseInit(VGL_MOUSEHIDE);
+ if(argc>optind) {
+ res=png_load(argv[optind]);
+ } else {
+ VGLEnd();
+ usage();
+ exit(0);
+ }
+ if(res) {
+ /* Hmm... Script? */
+ fsc=fopen(argv[optind],"r");
+ fprintf(log,"Trying script %s\n",argv[optind]);
+ fgets(buf,99,fsc);
+ if(strcmp("VIEW SCRIPT\n",buf)!=NULL) {
+ VGLEnd();
+ usage();
+ }
+ fgets(buf,99,fsc);
+ buf[strlen(buf)-1]='\0';
+ nimg=atoi(buf);
+ if(nimg==0) {
+ VGLEnd();
+ usage();
+ }
+ pres=(char **)calloc(nimg,sizeof(char *));
+ for(i=0;i<nimg;i++) {
+ fgets(buf,99,fsc);
+ buf[strlen(buf)-1]='\0';
+ pres[i]=strdup(buf);
+ }
+ fclose(fsc);
+ cur_img=0;
+ fprintf(log,"Script with %d entries\n",nimg);
+ png_load(pres[cur_img]);
+ }
+ /* Prepare the keyboard */
+ tcgetattr(0,&t_old);
+ memcpy(&t_new,&t_old,sizeof(struct termios));
+ cfmakeraw(&t_new);
+ tcsetattr(0,TCSAFLUSH,&t_new);
+ fcntl(0,F_SETFL,O_ASYNC);
+ /* XXX VGLClear doesn't work.. :-(( Prepare a blank background */
+ bkg.Bitmap=(byte *)calloc(VGLDisplay->Xsize*VGLDisplay->Ysize,1);
+ bkg.Xsize=VGLDisplay->Xsize;
+ bkg.Ysize=VGLDisplay->Ysize;
+ bkg.Type=VGLDisplay->Type;
+ signal(SIGIO,kbd_handler);
+ a.zoom=1;
+ a.Xshift=(VGLDisplay->Xsize-pic.Xsize)/2;
+ a.Yshift=(VGLDisplay->Ysize-pic.Ysize)/2;
+ a.rotate=0;
+ quit=0;
+ changed=0;
+ display(&pic,pal_red,pal_green,pal_blue,&a);
+ while(!quit) {
+ if(act) {
+ fprintf(log,"kbd_action(%c)\n",act);
+ kbd_action(x,y,act);
+ }
+ if(quit) break;
+ if(changed) {
+ fprintf(log,"changed, redisplaying\n");
+ display(&pic,pal_red,pal_green,pal_blue,&a);
+ changed=0;
+ }
+ pause();
+ VGLMouseStatus(&x,&y,&buttons);
+ if(buttons & MOUSE_BUTTON3DOWN) {
+ fprintf(log,"pop_up called\n");
+ pop_up("View",x,y);
+ }
+ }
+ VGLEnd();
+ fclose(log);
+ exit(0);
+}
diff --git a/release/picobsd/tinyware/vm/Makefile b/release/picobsd/tinyware/vm/Makefile
new file mode 100644
index 0000000..9e64474
--- /dev/null
+++ b/release/picobsd/tinyware/vm/Makefile
@@ -0,0 +1,10 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+#
+PROG=vm
+#CFLAGS+=
+SRCS= vm.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tinyware/vm/README b/release/picobsd/tinyware/vm/README
new file mode 100644
index 0000000..ec70bc2
--- /dev/null
+++ b/release/picobsd/tinyware/vm/README
@@ -0,0 +1,10 @@
+1998.02.12
+
+This is a small replacement for vmstat(8) program. It allows you to measure
+current memory utilisation. The same info is available via sysctl(8) program,
+but unfortunately this particular variable doesn't have its handler, and
+consequently it is not displayed in stock version of sysctl(8).
+
+<abial@nask.pl>
+
+$Id: README,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
diff --git a/release/picobsd/tinyware/vm/vm.c b/release/picobsd/tinyware/vm/vm.c
new file mode 100644
index 0000000..710cfb9
--- /dev/null
+++ b/release/picobsd/tinyware/vm/vm.c
@@ -0,0 +1,61 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: vm.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <sys/vmmeter.h>
+#include <vm/vm_param.h>
+
+int
+main(int argc, char *argv[])
+{
+ int mib[2],i=0,len;
+ struct vmtotal v;
+
+ len=sizeof(struct vmtotal);
+ mib[0]=CTL_VM;
+ mib[1]=VM_METER;
+ for(;;) {
+ sysctl(mib,2,&v,&len,NULL,0);
+ if(i==0) {
+ printf(" procs kB virt mem real mem shared vm shared real free\n");
+ printf(" r d p s tot act tot act tot act tot act\n");
+ }
+ printf("%2hu%2hu%2hu%2hu",v.t_rq,v.t_dw,v.t_pw,v.t_sl);
+ printf("%7u%7u%7u%7u",
+ v.t_vm<<2,v.t_avm<<2,v.t_rm<<2,v.t_arm<<2);
+ printf("%7u%7u%7u%7u%7u\n",
+ v.t_vmshr<<2,v.t_avmshr<<2,v.t_rmshr<<2,v.t_armshr<<2,v.t_free<<2);
+ sleep(5);
+ i++;
+ if(i>22) i=0;
+ }
+ exit(0);
+
+}
diff --git a/release/picobsd/tools/daemon/Makefile b/release/picobsd/tools/daemon/Makefile
new file mode 100644
index 0000000..71427e3
--- /dev/null
+++ b/release/picobsd/tools/daemon/Makefile
@@ -0,0 +1,8 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:40 abial Exp $
+#
+PROG=daemon
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tools/daemon/README b/release/picobsd/tools/daemon/README
new file mode 100644
index 0000000..596e6ca
--- /dev/null
+++ b/release/picobsd/tools/daemon/README
@@ -0,0 +1,7 @@
+This is a little toy, which implants a color logo of PicoBSD into a file.
+
+Documentation: UTSL.
+
+<abial@nask.pl>
+
+$Id: README,v 1.1.1.1 1998/07/14 07:30:40 abial Exp $
diff --git a/release/picobsd/tools/daemon/daemon.c b/release/picobsd/tools/daemon/daemon.c
new file mode 100644
index 0000000..29a8d2a
--- /dev/null
+++ b/release/picobsd/tools/daemon/daemon.c
@@ -0,0 +1,127 @@
+/*-
+ * Copyright (c) 1998 Andrzej Bialecki
+ * All rights reserved.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+ *
+ * $Id: daemon.c,v 1.1.1.1 1998/07/14 07:30:40 abial Exp $
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+char *logo[]={
+" )\\_)\\\n",
+" (o,o)\n",
+" __ \\~/\n",
+" -->====\\\n",
+" ~~ d d\n",
+" pico\n",
+NULL};
+
+
+void
+printit(int c, char **v)
+{
+ int len=0,i,j;
+ char **line,**txt;
+ char buf[100];
+ FILE *fd=NULL;
+
+ if(c>0 && strcmp(v[0],"-f")==0) {
+ fd=fopen(v[1],"r");
+ if(fd==NULL) c=0;
+ }
+ line=logo;
+ if(c==0) {
+ while(*line) {
+ printf("%s",*line);
+ line++;
+ }
+ return;
+ }
+ if(fd!=NULL) {
+ txt=malloc(sizeof(char *)*6);
+ j=0;
+ while(j<6 && !feof(fd)) {
+ if(fgets(buf,99,fd)==NULL) continue;
+ buf[strlen(buf)-1]='\0';
+ *(txt+j)=strdup(buf);
+ j++;
+ }
+ if(j<6) {
+ for(i=j;i<5;i++) {
+ *(txt+i)=strdup("");
+ }
+ }
+ c=6;
+ } else txt=v;
+ for (j=0;j<c;j++) {
+ if(len<strlen(txt[j])) len=strlen(txt[j]);
+ }
+ for(j=0;j<len+11;j++) {
+ printf("=");
+ }
+ printf("\n");
+ i=0;
+ while(*line) {
+ if(i<c) {
+ printf("%s",txt[i]);
+ for(j=0;j<(len-strlen(txt[i]));j++) {
+ printf(" ");
+ }
+ i++;
+ } else for(j=0;j<len;j++) printf(" ");
+ printf("%s",*line);
+ line++;
+ }
+ while (i<c) {
+ printf("%s\n",txt[i]);
+ i++;
+ }
+ if(fd!=NULL) {
+ while(!feof(fd)) {
+ buf[0]='\0';
+ if(fgets(buf,99,fd)==NULL) continue;
+ printf("%s",buf);
+ }
+ fclose(fd);
+ } else {
+ for(j=0;j<len+10;j++) printf("=");
+ printf("\n");
+ }
+ return;
+}
+
+int
+main(int argc, char *argv[])
+{
+ int c;
+ char **v;
+
+ if(argc<2) printit(0,NULL);
+ else printit(--argc,++argv);
+ exit(0);
+}
diff --git a/release/picobsd/tools/daemon/logo b/release/picobsd/tools/daemon/logo
new file mode 100644
index 0000000..311dd5c
--- /dev/null
+++ b/release/picobsd/tools/daemon/logo
@@ -0,0 +1,6 @@
+ )\_)\
+ (o,o)
+ __ \~/
+ -->====\
+ ~~ d d
+ pico
diff --git a/release/picobsd/tools/dumpnlist/Makefile b/release/picobsd/tools/dumpnlist/Makefile
new file mode 100644
index 0000000..22830dd
--- /dev/null
+++ b/release/picobsd/tools/dumpnlist/Makefile
@@ -0,0 +1,8 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:53 abial Exp $
+#
+PROG=dumpnlist
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tools/dumpnlist/dumpnlist.c b/release/picobsd/tools/dumpnlist/dumpnlist.c
new file mode 100644
index 0000000..a07fb31
--- /dev/null
+++ b/release/picobsd/tools/dumpnlist/dumpnlist.c
@@ -0,0 +1,45 @@
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <nlist.h>
+#include <stdio.h>
+
+struct nlist nl[] = {
+ {"_isa_devtab_bio"},
+ {"_isa_devtab_tty"},
+ {"_isa_devtab_net"},
+ {"_isa_devtab_null"},
+ {"_isa_biotab_wdc"},
+ {"_isa_biotab_fdc"},
+ {"_eisadriver_set"},
+ {"_eisa_dev_list"},
+ {"_pcidevice_set"},
+ {"_device_list"},
+ {"_scbusses"},
+ {"_scsi_cinit"},
+ {"_scsi_dinit"},
+ {"_scsi_tinit"},
+ {"_cnt"},
+ {""},
+};
+
+int
+main(int ac, char **av)
+{
+ int i;
+
+ i = nlist(av[1], nl);
+ if (i == -1) {
+ fprintf(stderr, "nlist returns error for %s\n", av[1]);
+ perror("nlist");
+ return 1;
+ }
+ printf("%d\n", sizeof(nl) / sizeof(struct nlist));
+ for (i = 0; nl[i].n_name; i++) {
+ printf("%s\n", nl[i].n_name);
+ printf("%d %d %d %ld\n",
+ nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
+ }
+ return 0;
+}
diff --git a/release/picobsd/tools/write_mfs_in_kernel/Makefile b/release/picobsd/tools/write_mfs_in_kernel/Makefile
new file mode 100644
index 0000000..d9bfbf1
--- /dev/null
+++ b/release/picobsd/tools/write_mfs_in_kernel/Makefile
@@ -0,0 +1,9 @@
+# $Id: Makefile,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+#
+PROG=wmik
+SRCS=write_mfs_in_kernel.c
+NOMAN=yes
+
+.include <bsd.prog.mk>
+
+
diff --git a/release/picobsd/tools/write_mfs_in_kernel/write_mfs_in_kernel.c b/release/picobsd/tools/write_mfs_in_kernel/write_mfs_in_kernel.c
new file mode 100644
index 0000000..7b4834a
--- /dev/null
+++ b/release/picobsd/tools/write_mfs_in_kernel/write_mfs_in_kernel.c
@@ -0,0 +1,96 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
+ * ----------------------------------------------------------------------------
+ *
+ * $Id: write_mfs_in_kernel.c,v 1.1.1.1 1998/07/14 07:30:54 abial Exp $
+ *
+ * This program patches a filesystem into a kernel made with MFS_ROOT
+ * option.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <ufs/ffs/fs.h>
+
+static int force = 0; /* don't check for zeros, may corrupt kernel */
+
+int
+main(int argc, char **argv)
+{
+ unsigned char *buf_kernel, *buf_fs, *p,*q, *prog;
+ int fd_kernel, fd_fs, ch, errs=0;
+ struct stat st_kernel, st_fs;
+ u_long l;
+
+ prog= *argv;
+ while ((ch = getopt(argc, argv, "f")) != EOF)
+ switch(ch) {
+ case 'f':
+ force = 1 - force;
+ break;
+ default:
+ errs++;
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (errs || argc != 2) {
+ fprintf(stderr,"Usage:\n\t%s [-f] kernel fs\n", prog);
+ exit(2);
+ }
+ --argv; /* original prog did not use getopt(3) */
+ fd_kernel = open(argv[1],O_RDWR);
+ if (fd_kernel < 0) { perror(argv[1]); exit(2); }
+ fstat(fd_kernel,&st_kernel);
+ fd_fs = open(argv[2],O_RDONLY);
+ if (fd_fs < 0) { perror(argv[2]); exit(2); }
+ fstat(fd_fs,&st_fs);
+ buf_kernel = malloc(st_kernel.st_size);
+ if (!buf_kernel) { perror("malloc"); exit(2); }
+ buf_fs = malloc(st_fs.st_size);
+ if (!buf_fs) { perror("malloc"); exit(2); }
+ if (st_kernel.st_size != read(fd_kernel,buf_kernel,st_kernel.st_size))
+ { perror(argv[1]); exit(2); }
+ if (st_fs.st_size != read(fd_fs,buf_fs,st_fs.st_size))
+ { perror(argv[2]); exit(2); }
+ for(l=0,p=buf_kernel; l < st_kernel.st_size - st_fs.st_size ; l++,p++ )
+ if(*p == 'M' && !strcmp(p,"MFS Filesystem goes here"))
+ goto found;
+ fprintf(stderr,"MFS filesystem signature not found in %s\n",argv[1]);
+ exit(1);
+found:
+ if (!force)
+ for(l=0,q= p + SBOFF; l < st_fs.st_size - SBOFF ; l++,q++ )
+ if (*q)
+ goto fail;
+ memcpy(p+SBOFF,buf_fs+SBOFF,st_fs.st_size-SBOFF);
+ lseek(fd_kernel,0L,SEEK_SET);
+ if (st_kernel.st_size != write(fd_kernel,buf_kernel,st_kernel.st_size))
+ { perror(argv[1]); exit(2); }
+ exit(0);
+fail:
+ l += SBOFF;
+ fprintf(stderr,"Obstruction in kernel after %ld bytes (%ld Kbyte)\n",
+ l, l/1024);
+ fprintf(stderr,"Filesystem is %ld bytes (%ld Kbyte)\n",
+ (u_long)st_fs.st_size, (u_long)st_fs.st_size/1024);
+ exit(1);
+}
+
+/*
+ * I added a '-f' option to force writing the image into the kernel, even when
+ * there is already data (i.e. not zero) in the written area. This is useful
+ * to rewrite a changed MFS-image. Beware: If the written image is larger than
+ * the space reserved in the kernel (with option MFS_ROOT) then
+ * THIS WILL CORRUPT THE KERNEL!
+ *
+ */
OpenPOWER on IntegriCloud