Patch #: 198 Type: operational change Priority: none Modification: add support for Native EtherTalk on NeXT workstations WARNING: requires implementation of Berkeley Packet Filter for WARNING: NeXT workstations available from ftp.aa.ap.titech.ac.jp Submitted: Satoshi Adachi Modification: add support for Linux Kernel AppleTalk (1.3.96+, 2.0.0) Kudos: CyberZone for a loan machine WARNING: run 'capd ' instead of aarpd Modification: increase NBP table size for atlook lookups Modification: increase NBP table size for atis daemon Modification: fix miscellaneous Configure problems Submitted: David Hornsby Modification: fix stupid typo in abmisc.c Submitted: Johan Bevemyr Submitted: Vincent Fox Submitted: Takaoka Tadashi Submitted: Mark Muldoon Submitted: Michel Robitaille Modification: even more fixes for Solaris Submitted: Doug Scoular Submitted: Stephen Campbell Modification: add -F option to set directory for lwsrv temporary files Submitted: Mike Iglesias Submitted: David Hornsby Modification: fix incorrect function call in lwsrv8 list processing Submitted: Stephen Campbell Archived: munnari.OZ.AU mac/cap.patches/cap60.patch198 Application: 'cd cap60; patch -p < cap60.patches/cap60.patch198' File: cap60/Configure File: cap60/conf.func.sh File: cap60/conf.func.lst File: cap60/doc/install.ms File: cap60/netat/sysvcompat.h File: cap60/lib/afp/afpidaufs.c File: cap60/lib/afp/afpidaufs.h File: cap60/lib/afp/afpidclnt.c File: cap60/lib/afp/afpidgnrl.c File: cap60/lib/cap/abmisc.c File: cap60/lib/cap/abatp.c File: cap60/lib/cap/abddp.c File: cap60/lib/cap/abkas.c File: cap60/lib/cap/abkip.c File: cap60/lib/cap/abpapc.c File: cap60/lib/cap/absched.c File: cap60/lib/cap/atalkdbm.c File: cap60/support/capd/capd.c File: cap60/support/ethertalk/sdlpi.c File: cap60/support/ethertalk/bpfiltp.c File: cap60/support/ethertalk/aarpd.c File: cap60/support/ethertalk/aarpd_clnt.c File: cap60/applications/aufs/afps.h File: cap60/applications/aufs/aufs.c File: cap60/applications/aufs/afpdt.c File: cap60/applications/aufs/afpdir.c File: cap60/applications/aufs/afpfile.c File: cap60/applications/aufs/afpidlist.c File: cap60/applications/aufs/afpidtool.c File: cap60/applications/aufs/afpidsrvr.c File: cap60/applications/aufs/afpserver.c File: cap60/applications/aufs/afpos.c File: cap60/applications/aufs/afpvols.c File: cap60/applications/aufs/afposenum.c File: cap60/applications/aufs/aufsicon.c File: cap60/applications/lwsrv/lwsrv.c File: cap60/applications/lwsrv/lwsrvconfig.c File: cap60/applications/lwsrv/procset.c File: cap60/applications/lwsrv/simple.c File: cap60/applications/lwsrv/list.c File: cap60/applications/lwsrv/DBfile File: cap60/applications/lwsrv/query.ps File: cap60/applications/papif/papif.c File: cap60/samples/atlook.c File: cap60/samples/lwpr.c File: cap60/etc/start-cap-servers File: cap60/etc/nisaux.c File: cap60/etc/atis.c *** Configure.orig Tue Apr 30 14:20:19 1996 --- Configure Wed Sep 11 00:11:29 1996 *************** *** 1,7 **** #!/bin/sh ! # $Author: djh $ $Date: 1996/04/30 04:20:05 $ ! # $Header: /mac/src/cap60/RCS/Configure,v 2.105 1996/04/30 04:20:05 djh Rel djh $ ! # $Revision: 2.105 $ # CAP configuration shell script. This ain't perfect, but it's a start. # Execute with /bin/sh Configure if your system won't run it (ksh is okay too) # --- 1,7 ---- #!/bin/sh ! # $Author: djh $ $Date: 1996/09/10 14:11:08 $ ! # $Header: /mac/src/cap60/RCS/Configure,v 2.107 1996/09/10 14:11:08 djh Rel djh $ ! # $Revision: 2.107 $ # CAP configuration shell script. This ain't perfect, but it's a start. # Execute with /bin/sh Configure if your system won't run it (ksh is okay too) # *************** *** 39,45 **** echo echo "This is the CAP configuration script. It will attempt to help" echo "you get the CAP libraries and component programs configured." - echo "Please refer to NOTES before you run if you haven't already." echo if [ -f /etc/atalk.local ]; then ${PGREP} _ /etc/atalk.local > /dev/null --- 39,44 ---- *************** *** 48,56 **** echo "WARNING: Your /etc/atalk.local file MAY need to be edited." echo "Zone names must now be quoted to include spaces. The use" echo "of underscores to denote a space is no longer supported." fi fi - echo echo echo "MAJOR CONFIGURATION" --- 47,55 ---- echo "WARNING: Your /etc/atalk.local file MAY need to be edited." echo "Zone names must now be quoted to include spaces. The use" echo "of underscores to denote a space is no longer supported." + echo fi fi echo echo "MAJOR CONFIGURATION" *************** *** 294,299 **** --- 293,306 ---- osdefault="bsdi" fi fi + # Linux 1.3.N + if [ -z "${osdefault}" ]; then + echo "Checking for Linux" + if [ -f /vmlinuz ]; then + echo "Linux" + osdefault="linux" + fi + fi # HP/Apollo Domain if [ -z "${osdefault}" ]; then echo "Checking for HP/Apollo Domain 10.4" *************** *** 317,322 **** --- 324,337 ---- fi fi fi + # NeXTstation + if [ -z "${osdefault}" ]; then + echo "Checking for NeXT." + if [ -x /NextApps ]; then + echo "NeXT" + osdefault="next" + fi + fi # Default if [ -z "${osdefault}" ]; then echo "Establishing default as BSD" *************** *** 369,374 **** --- 384,390 ---- "netbsd") valid=1;; "freebsd") valid=1;; "bsdi") valid=1;; + "linux") valid=1;; "domainosbsd") valid=1;; "?"|*) if [ "${os}" != "?" ]; then *************** *** 398,403 **** --- 414,420 ---- echo " netbsd - NetBSD 1.0" echo " freebsd - FreeBSD 2.0" echo " bsdi - BSDI BSD/386 1.1" + echo " linux - Linux" echo " domainosbsd - HP/Apollo Domain BSD 4.3" ;; esac *************** *** 476,481 **** --- 493,506 ---- uarsupport=1 ethersupport=1 ;; + "linux") + uarsupport=1 + kernelsupport=1 + ;; + "next") + uarsupport=1 + ethersupport=1 + ;; *) uabsupport=0 uarsupport=0 *************** *** 552,558 **** "hpux") echo "OK, setting things up for UAB." uabpobjs="define([uabpobjs],[sllap.o])";; ! "386bsd"|"netbsd"|"freebsd"|"bsdi") echo "OK, setting things up for UAB." uabpobjs="define([uabpobjs],[bpfiltp.o])";; "solaris") --- 577,583 ---- "hpux") echo "OK, setting things up for UAB." uabpobjs="define([uabpobjs],[sllap.o])";; ! "386bsd"|"netbsd"|"freebsd"|"bsdi"|"next") echo "OK, setting things up for UAB." uabpobjs="define([uabpobjs],[bpfiltp.o])";; "solaris") *************** *** 606,615 **** uabplibs="define([uabplibs],[])" uabpobjs="define([uabpobjs],[])" lapobj="define([lapobj],[abmkip.o abddp.o abnbp.o atalkdbm.o])" ! ${PROMPT} "Do you want Phase 2 compatibility (no) ? " read ans if [ -z "${ans}" ]; then ! ans="no" fi case ${ans} in "yes"|"y") --- 631,640 ---- uabplibs="define([uabplibs],[])" uabpobjs="define([uabpobjs],[])" lapobj="define([lapobj],[abmkip.o abddp.o abnbp.o atalkdbm.o])" ! ${PROMPT} "Do you want Phase 2 compatibility (yes) ? " read ans if [ -z "${ans}" ]; then ! ans="yes" fi case ${ans} in "yes"|"y") *************** *** 653,662 **** echo "OK, setting things up for Native EtherTalk." etherpobjs="define([etherpobjs],[dlip.o])";; "osf1"|"ultrix40") ! ${PROMPT} "Do you want Phase 2 compatibility (no) ? " read ans if [ -z "${ans}" ]; then ! ans="no" fi case ${ans} in "yes"|"y") --- 678,687 ---- echo "OK, setting things up for Native EtherTalk." etherpobjs="define([etherpobjs],[dlip.o])";; "osf1"|"ultrix40") ! ${PROMPT} "Do you want Phase 2 compatibility (yes) ? " read ans if [ -z "${ans}" ]; then ! ans="yes" fi case ${ans} in "yes"|"y") *************** *** 682,692 **** "386bsd") echo "OK, setting things up for Native EtherTalk." etherpobjs="define([etherpobjs],[bpfiltp.o])";; ! "netbsd"|"freebsd"|"bsdi") ! ${PROMPT} "Do you want Phase 2 compatibility (no) ? " read ans if [ -z "${ans}" ]; then ! ans="no" fi case ${ans} in "yes"|"y") --- 707,717 ---- "386bsd") echo "OK, setting things up for Native EtherTalk." etherpobjs="define([etherpobjs],[bpfiltp.o])";; ! "netbsd"|"freebsd"|"bsdi"|"next") ! ${PROMPT} "Do you want Phase 2 compatibility (yes) ? " read ans if [ -z "${ans}" ]; then ! ans="yes" fi case ${ans} in "yes"|"y") *************** *** 699,708 **** esac etherpobjs="define([etherpobjs],[bpfiltp.o])";; "solaris") ! ${PROMPT} "Do you want Phase 2 compatibility (no) ? " read ans if [ -z "${ans}" ]; then ! ans="no" fi case ${ans} in "yes"|"y") --- 724,733 ---- esac etherpobjs="define([etherpobjs],[bpfiltp.o])";; "solaris") ! ${PROMPT} "Do you want Phase 2 compatibility (yes) ? " read ans if [ -z "${ans}" ]; then ! ans="yes" fi case ${ans} in "yes"|"y") *************** *** 719,728 **** fi etherpobjs="define([etherpobjs],[sdlpi.o])";; "sunos") ! ${PROMPT} "Do you want Phase 2 compatibility (no) ? " read ans if [ -z "${ans}" ]; then ! ans="no" fi case ${ans} in "yes"|"y") --- 744,753 ---- fi etherpobjs="define([etherpobjs],[sdlpi.o])";; "sunos") ! ${PROMPT} "Do you want Phase 2 compatibility (yes) ? " read ans if [ -z "${ans}" ]; then ! ans="yes" fi case ${ans} in "yes"|"y") *************** *** 784,789 **** --- 809,815 ---- capdprogs="define([capdprogs],[capd])" capdpobjs="define([capdpobjs],[capd.kas.o])" lapobj="define([lapobj],[abkas.o abddp.o abnbp.o atalkdbm.o])" + usephase2=1 fi fi fi *************** *** 1598,1603 **** --- 1624,1631 ---- define([libspecial],concat(libspecial,[ -lcrypt]))]) ifelse(os,[bsdi],[ define([libspecial],concat(libspecial,[ -lrpc -lkvm]))]) + ifelse(os,[linux],[ + define([libspecial],concat(libspecial,[ -lgdbm]))]) ifelse(os,[solaris],[ define([libspecial],concat(libspecial,[ -lsocket -lnsl ]))]) # rutgers specific *************** *** 1772,1777 **** --- 1800,1807 ---- define([cflags],concat(cflags,[ -D__386BSD__]))]) ifelse(os,[bsdi],[ define([cflags],concat(cflags,[ -D__386BSD__]))]) + ifelse(os,[linux],[ + define([cflags],concat(cflags,[ -DUSE_GDBM]))]) # was used for nbp, but found we needed more... leave in case define([nbpflags],[]) *************** *** 1916,1923 **** EOT4 exec > /dev/tty echo "${of} configured" ! echo "Generate makefiles by typing: gen.makes (or sh gen.makes) from" ! echo "the top level directory" echo case ${os} in "aux") --- 1946,1965 ---- EOT4 exec > /dev/tty echo "${of} configured" ! echo ! echo "Getting ready to create the makefiles" ! echo ! echo "You can (re)generate the makefiles at any time by typing:" ! echo "gen.makes (or sh gen.makes) from the top level directory." ! echo ! echo "You need to build new makefiles if you change the user" ! echo "options by editing the 'm4.setup' or 'm4.features' files" ! echo "or have run 'make spotless' to remove all {m,M}akefiles." ! echo ! ${PROMPT} "[Hit carriage return to continue] " ! read ans ! echo ! ${USESH} ./gen.makes echo case ${os} in "aux") *************** *** 1926,1933 **** echo ;; esac ! echo "MAKE SURE YOU HAVE READ NOTES. There are machine dependencies" ! echo "that are not handled by Configure!!!!!" echo - echo "Program configuration can be done by modifying ${of}" - echo "under the minor configuration parameters" --- 1968,1975 ---- echo ;; esac ! echo "CAP Configuration complete!" ! echo ! echo "You can now start the build process with 'make programs'" ! echo "(but it would be best to read the documentation in 'doc')." echo *** conf.func.sh.orig Thu Jun 29 23:08:00 1995 --- conf.func.sh Wed Sep 11 00:21:13 1996 *************** *** 1,7 **** #!/bin/sh ! # $Author: djh $ $Date: 1995/06/29 13:07:23 $ ! # $Header: /mac/src/cap60/RCS/conf.func.sh,v 2.8 1995/06/29 13:07:23 djh Rel djh $ ! # $Revision: 2.8 $ # # CAP function configuration script. This ain't perfect, but it's a start # execute with /bin/sh Configure if your system won't run it (ksh is okay --- 1,7 ---- #!/bin/sh ! # $Author: djh $ $Date: 1996/09/10 14:21:04 $ ! # $Header: /mac/src/cap60/RCS/conf.func.sh,v 2.9 1996/09/10 14:21:04 djh Rel djh $ ! # $Revision: 2.9 $ # # CAP function configuration script. This ain't perfect, but it's a start # execute with /bin/sh Configure if your system won't run it (ksh is okay *************** *** 167,178 **** if [ "$call" = "x" ]; then call=""; fi if [ "$inc" = "x" ]; then inc=""; fi if [ -n "$call" ]; then callmsg="${call} - "; else callmsg="" ; fi # special case EP/IX in bsd43 environment ! if [ "${confos}" = "epix" ]; then ! if [ -n "$inc" ]; then ! inc="/bsd43${inc}" ! fi ! fi # end of list if [ "$type" = "E" ]; then if [ $fullcheck -eq 0 ]; then echo "At end: $foundit"; fi --- 167,184 ---- if [ "$call" = "x" ]; then call=""; fi if [ "$inc" = "x" ]; then inc=""; fi if [ -n "$call" ]; then callmsg="${call} - "; else callmsg="" ; fi + if [ -n "$inc" ]; then + case "${confos}" in # special case EP/IX in bsd43 environment ! "epix") ! inc="/bsd43${inc}" ! ;; ! # special case NEXTSTEP ! "next") ! inc=`echo ${inc} | sed -e 's%/usr/include%/usr/include/{ansi,bsd}%'` ! ;; ! esac ! fi # end of list if [ "$type" = "E" ]; then if [ $fullcheck -eq 0 ]; then echo "At end: $foundit"; fi *************** *** 231,237 **** fi # if include there or empty good=1 ! if [ -z "${inc}" -o -f "${inc}" ]; then good=0; fi # if call and include okay if [ $good -eq 0 ]; then if [ -n "${call}" ]; then --- 237,262 ---- fi # if include there or empty good=1 ! if [ -x "${inc}" -o "${inc}" = "" ]; then ! good=0 ! else ! echo "${inc}" | grep '{' > /dev/null 2> /dev/null ! rc=$? ! if [ ${rc} = 0 ]; then ! # ${inc} has the form "head/{A,B,...,Z}/tail". ! head=`echo ${inc} | sed -e 's/\([^{}]*\){.*/\1/'` ! list=`echo ${inc} | sed -e 's/[^{}]*{\([^}]*\)}.*/\1/'` ! tail=`echo ${inc} | sed -e 's/[^{}]*{[^}]*}\(.*\)/\1/'` ! for i in `echo ${list} | sed -e 's/,/ /g'`; do ! if [ -f "${head}${i}${tail}" ]; then ! good=0 ! break ! fi ! done ! else ! if [ -f "${inc}" ]; then good=0; fi ! fi ! fi # if call and include okay if [ $good -eq 0 ]; then if [ -n "${call}" ]; then *************** *** 239,245 **** good=$? if [ $fullcheck -eq 1 ]; then if [ $good -eq 0 ]; then ! echo "main(){$call();}" > /tmp/cfs$$.c ${ccompiler} -o /tmp/cfs$$ /tmp/cfs$$.c ${libs} >/dev/null 2>/dev/null good=$? else --- 264,275 ---- good=$? if [ $fullcheck -eq 1 ]; then if [ $good -eq 0 ]; then ! # special case ffs() for gcc ! if [ "${call}" = "ffs" ]; then ! echo "main(){int i; ffs(i);}" > /tmp/cfs$$.c ! else ! echo "main(){$call();}" > /tmp/cfs$$.c ! fi ${ccompiler} -o /tmp/cfs$$ /tmp/cfs$$.c ${libs} >/dev/null 2>/dev/null good=$? else *************** *** 252,258 **** fi msg="" if [ -n "$call" ]; then msg="$call "; fi ! if [ -n "$msg" ]; then msg="${msg}and "; fi if [ -n "$inc" ]; then msg="${msg}${inc} "; fi if [ -n "$msg" ]; then msg="${msg}for "; fi if [ $good -eq 0 ]; then --- 282,288 ---- fi msg="" if [ -n "$call" ]; then msg="$call "; fi ! if [ -n "$inc" ]; then msg="${msg}and "; fi if [ -n "$inc" ]; then msg="${msg}${inc} "; fi if [ -n "$msg" ]; then msg="${msg}for "; fi if [ $good -eq 0 ]; then *** conf.func.lst.orig Mon Mar 11 14:59:10 1996 --- conf.func.lst Wed Sep 11 00:27:02 1996 *************** *** 1,6 **** ! # $Author: djh $ $Date: 1996/03/11 03:58:55 $ ! # $Header: /mac/src/cap60/RCS/conf.func.lst,v 2.9 1996/03/11 03:58:55 djh Rel djh $ ! # $Revision: 2.9 $ # # see Conf.func.sh for format of file # --- 1,6 ---- ! # $Author: djh $ $Date: 1996/09/10 14:26:51 $ ! # $Header: /mac/src/cap60/RCS/conf.func.lst,v 2.11 1996/09/10 14:26:51 djh Rel djh $ ! # $Revision: 2.11 $ # # see Conf.func.sh for format of file # *************** *** 14,22 **** N+-,STATFS,/usr/include/sys/mount.h,statfs,"aufs: info on file systems (bsd44)" E,STATFS,x,x,"aufs: no space information on volumes will be available" N+-,QUOTA,/usr/include/sys/quota.h,quota,"aufs: info on user quota" ! N+-,QUOTA,/usr/include/sys/fs/ufs_quota.h,quota,"aufs: info on user quota (solaris)" E,QUOTA,x,x,"aufs: no information on user quotas" A+,SUNQUOTA,/usr/include/ufs/quota.h,quotactl,"aufs: info on user quota" N+-,SUNQUOTA,/usr/include/mntent.h,getmntent,"aufs: used by sunquota" N+-,BSDQUOTA,/usr/include/ufs/quota.h,quotactl,"aufs: used by bsdquota" E,SUNQUOTA,x,x,"aufs: not using sun/bsd quota system" --- 14,23 ---- N+-,STATFS,/usr/include/sys/mount.h,statfs,"aufs: info on file systems (bsd44)" E,STATFS,x,x,"aufs: no space information on volumes will be available" N+-,QUOTA,/usr/include/sys/quota.h,quota,"aufs: info on user quota" ! N+-,QUOTA,/usr/include/sys/fs/ufs_quota.h,ioctl,"aufs: info on user quota (solaris)" E,QUOTA,x,x,"aufs: no information on user quotas" A+,SUNQUOTA,/usr/include/ufs/quota.h,quotactl,"aufs: info on user quota" + O+,SUNQUOTA,/usr/include/ufs/quotas.h,quotactl,"aufs: info on user quota (next)" N+-,SUNQUOTA,/usr/include/mntent.h,getmntent,"aufs: used by sunquota" N+-,BSDQUOTA,/usr/include/ufs/quota.h,quotactl,"aufs: used by bsdquota" E,SUNQUOTA,x,x,"aufs: not using sun/bsd quota system" *** doc/install.ms.orig Fri Feb 4 15:35:13 1994 --- doc/install.ms Wed Sep 11 00:56:54 1996 *************** *** 24,30 **** .sp Native EtherTalk mode is available on a limited range of hosts - those that support the Stanford ENET Packet Filter ! model - currently SUN workstations and DEC OSF/1 or ULTRIX hosts only. UAR will run on SGI IRIX, Sony NEWS, DEC OSF/1 or ULTRIX, SUN SunOS and Solaris, IBM AIX and HP-UX workstations. IPTalk mode is supported on all of the above and more and is easily ported to other platforms. --- 24,32 ---- .sp Native EtherTalk mode is available on a limited range of hosts - those that support the Stanford ENET Packet Filter ! model - currently SUN workstations, NetBSD, FreeBSD and BSDi, NeXT and ! DEC OSF/1 or ULTRIX hosts only. ! .sp UAR will run on SGI IRIX, Sony NEWS, DEC OSF/1 or ULTRIX, SUN SunOS and Solaris, IBM AIX and HP-UX workstations. IPTalk mode is supported on all of the above and more and is easily ported to other platforms. *************** *** 226,232 **** cap config files - /usr/local/lib/cap or /etc .fi .sp ! If you want things elsewhere, edit the file m4.setup before running gen.makes. .sp By the way, /etc may be a bad place to put things. At Columbia, everything is generally put in /usr/local/lib/cap instead of /etc. --- 228,234 ---- cap config files - /usr/local/lib/cap or /etc .fi .sp ! If you want things elsewhere, edit the file m4.setup and then run gen.makes. .sp By the way, /etc may be a bad place to put things. At Columbia, everything is generally put in /usr/local/lib/cap instead of /etc. *************** *** 240,253 **** etc. to do what you want. If you don't know yet, then don't worry, you can recompile after you verify basic functionality. .SH ! [4] Generate system makefiles .sp .nf % ./gen.makes .fi .sp .LP ! After Configure, or if you have edited the files m4.setup or m4.features, run gen.makes to (re)generate your baseline makefiles. There are "Makefile"s included, but they are included for systems without the m4 preprocessor --- 242,255 ---- etc. to do what you want. If you don't know yet, then don't worry, you can recompile after you verify basic functionality. .SH ! [4] Re-Generate system makefiles .sp .nf % ./gen.makes .fi .sp .LP ! If you have edited the files m4.setup or m4.features, run gen.makes to (re)generate your baseline makefiles. There are "Makefile"s included, but they are included for systems without the m4 preprocessor *************** *** 362,368 **** step C below for atis verification procedure). .sp If you are using Kernel AppleTalk, ensure that the necessary ! code is installed in the kernel, read cap60/support/capd/README, run capd with suitable interface and zone name arguments. Follow this with atis, as above. .sp --- 364,371 ---- step C below for atis verification procedure). .sp If you are using Kernel AppleTalk, ensure that the necessary ! code is installed in the kernel (comes installed with Linux), ! read cap60/support/capd/README, run capd with suitable interface and zone name arguments. Follow this with atis, as above. .sp *** netat/sysvcompat.h.orig Mon Oct 10 19:00:03 1994 --- netat/sysvcompat.h Tue Sep 10 23:51:41 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1994/10/10 08:59:49 $ ! * $Header: /mac/src/cap60/netat/RCS/sysvcompat.h,v 2.11 1994/10/10 08:59:49 djh Rel djh $ ! * $Revision: 2.11 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/09/10 13:51:34 $ ! * $Header: /mac/src/cap60/netat/RCS/sysvcompat.h,v 2.12 1996/09/10 13:51:34 djh Rel djh $ ! * $Revision: 2.12 $ * */ *************** *** 138,143 **** --- 138,151 ---- #if defined (hp300) && !defined(__BSD_4_4__) #define WSTATUS union wait #endif /* hp300 && __BSD_4_4__) */ + + #ifdef NeXT + #define WSTATUS union wait + /* WIFSTOPPED and WIFSIGNALED are defined in "sys/wait.h". */ + #define W_TERMSIG(status) ((status).w_termsig) + #define W_COREDUMP(status) ((status).w_coredump) + #define W_RETCODE(status) ((status).w_retcode) + #endif /* NeXT */ /* FIXED CONFIGURATION -- ALL NEW CONFIGURATIONS MUST PRECEED */ *** lib/afp/afpidaufs.c.orig Wed May 1 02:07:43 1996 --- lib/afp/afpidaufs.c Wed Jun 19 20:14:52 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 16:07:19 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidaufs.c,v 2.3 1996/04/30 16:07:19 djh Rel djh $ ! * $Revision: 2.3 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 10:14:39 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidaufs.c,v 2.5 1996/06/19 10:14:39 djh Rel djh $ ! * $Revision: 2.5 $ * */ *************** *** 24,30 **** #include #include #include ! #include #include "afpidaufs.h" #include "../../applications/aufs/afps.h" --- 24,34 ---- #include #include #include ! #ifdef USESTRINGDOTH ! # include ! #else USESTRINGDOTH ! # include ! #endif USESTRINGDOTH #include "afpidaufs.h" #include "../../applications/aufs/afps.h" *************** *** 50,56 **** if (temp < 0) { db_open = 0; if (DBDIR) ! logit(0, "Can't poll database %d\n", temp); } } } --- 54,60 ---- if (temp < 0) { db_open = 0; if (DBDIR) ! logit(0, "Can't poll database %d", temp); } } } *************** *** 66,75 **** db_open = 1; } else { db_open = 0; ! logit(0, "Can't open database %d\n",temp); } server_probs = 0; extras = NULL; } static int --- 70,82 ---- db_open = 1; } else { db_open = 0; ! logit(0, "Can't open database %d",temp); } server_probs = 0; extras = NULL; + #ifdef USE_GDBM + close_dbase(); + #endif /* USE_GDBM */ } static int *************** *** 213,219 **** abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d\n",poll,errno); db_open = 0; break; } else { --- 220,226 ---- abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d",poll,errno); db_open = 0; break; } else { *************** *** 223,235 **** } } } else { ! logit(0, "Send_new failed with %d errno=%d\n", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?\n"); return(add_to_extras(path)); } --- 230,242 ---- } } } else { ! logit(0, "Send_new failed with %d errno=%d", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?"); return(add_to_extras(path)); } *************** *** 250,256 **** /* have we got an existing entry ? */ if (lookup_path_id(parent, rest, &id, NULL, 0) > 0) { if (DBDIR) ! logit(0, "aufsExtEDirId for %s is %d\n", rest, id); return(id); } --- 257,263 ---- /* have we got an existing entry ? */ if (lookup_path_id(parent, rest, &id, NULL, 0) > 0) { if (DBDIR) ! logit(0, "aufsExtEDirId for %s is %d", rest, id); return(id); } *************** *** 262,288 **** abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d\n",poll,errno); db_open = 0; break; } else { if (poll == 0) { /* db has changed */ if (lookup_path_id(parent, rest, &id, NULL, 0) > 0) { if (DBDIR) ! logit(0, "aufsExtEDirId created new id for %s:%d\n", rest, id); return(id); } } } } } else { ! logit(0, "Send_new failed with %d errno=%d\n", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?\n"); { /* should never really get here, but just in case ... */ char *str = equiv_path(parent); --- 269,295 ---- abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d",poll,errno); db_open = 0; break; } else { if (poll == 0) { /* db has changed */ if (lookup_path_id(parent, rest, &id, NULL, 0) > 0) { if (DBDIR) ! logit(0, "aufsExtEDirId created new id for %s:%d", rest, id); return(id); } } } } } else { ! logit(0, "Send_new failed with %d errno=%d", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?"); { /* should never really get here, but just in case ... */ char *str = equiv_path(parent); *************** *** 334,340 **** if (db_open) { sdword id; - if (lookup_path(path, &id, NULL, 0) > 1) { found = 1; send_delete_id(id); --- 341,346 ---- *************** *** 412,418 **** abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d\n",poll,errno); db_open = 0; break; } else { --- 418,424 ---- abSleep(1, FALSE); /* wait 0.25s! */ poll = poll_db( i%(4*4) == 0 ); /* force poll each 4 s */ if (poll < 0) { /* lost dbase */ ! logit(0, "Lost database %d errno=%d",poll,errno); db_open = 0; break; } else { *************** *** 423,435 **** } } } else { ! logit(0, "Send_new failed with %d errno=%d\n", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?\n"); return(-1); } --- 429,441 ---- } } } else { ! logit(0, "Send_new failed with %d errno=%d", res, errno); server_probs++; } } if (DBDIR) ! logit(0, "Lost connection to aufsExt server?"); return(-1); } *** lib/afp/afpidaufs.h.orig Sat Apr 27 22:33:29 1996 --- lib/afp/afpidaufs.h Tue Jun 18 20:47:08 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/27 12:31:28 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidaufs.h,v 2.1 1996/04/27 12:31:28 djh Rel djh $ ! * $Revision: 2.1 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:46:58 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidaufs.h,v 2.2 1996/06/18 10:46:58 djh Rel djh $ ! * $Revision: 2.2 $ * */ *************** *** 19,25 **** --- 19,31 ---- #include #include + #ifdef USE_GDBM + #include + #define DBM_INSERT GDBM_INSERT + #define DBM_REPLACE GDBM_REPLACE + #else /* USE_GDBM */ #include + #endif /* USE_GDBM */ #include "afpidnames.h" *************** *** 146,152 **** --- 152,162 ---- extern char * aufsSockname; extern char * aufsDbName; extern char * aufsDbVersion; + #ifdef USE_GDBM + extern GDBM_FILE db; + #else /* USE_GDBM */ extern DBM *db; + #endif /* USE_GDBM */ extern sdword rootEid; extern char * aufsRootName; *** lib/afp/afpidclnt.c.orig Wed May 1 02:07:48 1996 --- lib/afp/afpidclnt.c Tue Jun 18 20:47:09 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 16:07:19 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidclnt.c,v 2.4 1996/04/30 16:07:19 djh Rel djh $ ! * $Revision: 2.4 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:46:58 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidclnt.c,v 2.5 1996/06/18 10:46:58 djh Rel djh $ ! * $Revision: 2.5 $ * */ *************** *** 27,33 **** --- 27,37 ---- #include #include #include + #ifdef USE_GDBM + #include + #else /* USE_GDBM */ #include + #endif /* USE_GDBM */ #include #include *************** *** 64,70 **** --- 68,76 ---- { pagFile = (char *)malloc(strlen(aufsDbName)+4+1); strcpy(pagFile, aufsDbName); + #ifndef USE_GDBM strcat(pagFile, ".pag"); + #endif /* USE_GDBM */ } *************** *** 75,92 **** --- 81,115 ---- datum initial_key, initial; char *version; + if (db != NULL) + return(1); + if (pagFile == NULL) setPagFile(); openTime = getMtime(pagFile); /* do before for safety! */ + #ifdef USE_GDBM + { int tries = 0; + while ((db = gdbm_open(aufsDbName, 2048, GDBM_READER, 0644, 0L)) == NULL) { + if (++tries > 60) + return(-1); + usleep(250000); + } + } + #else /* USE_GDBM */ if ((db = dbm_open(aufsDbName, O_RDONLY, 0644)) == NULL) return(-1); + #endif /* USE_GDBM */ if (first) { initial_key.dptr = "I"; initial_key.dsize = strlen(initial_key.dptr); + #ifdef USE_GDBM + initial = gdbm_fetch(db, initial_key); + #else /* USE_GDBM */ initial = dbm_fetch(db, initial_key); + #endif /* USE_GDBM */ if (initial.dptr == NULL) { close_dbase(); return(-1); *************** *** 99,104 **** --- 122,131 ---- close_dbase(); return(-2); } + #ifdef USE_GDBM + if (initial.dptr != NULL) + free(initial.dptr); + #endif /* USE_GDBM */ } return(1); } *************** *** 106,112 **** --- 133,147 ---- void close_dbase() { + if (db == NULL) + return; + #ifdef USE_GDBM + gdbm_close(db); + #else /* USE_GDBM */ dbm_close(db); + #endif /* USE_GDBM */ + db = NULL; + return; } int *************** *** 123,128 **** --- 158,164 ---- res = open_dbase(FALSE); return((res >= 0) ? 0 : res); } + return(1); } *************** *** 162,168 **** sdword parent; char *remaining; { ! char command[MAXPATHLEN+3]; sprintf(command, "a%d\277%s\277", parent, remaining); return(send_command(command)); --- 198,204 ---- sdword parent; char *remaining; { ! char command[MAXPATHLEN+32]; sprintf(command, "a%d\277%s\277", parent, remaining); return(send_command(command)); *************** *** 173,179 **** sdword parent; char *remaining; { ! char command[MAXPATHLEN+3]; sprintf(command, "f%d\277%s\277", parent, remaining); return(send_command(command)); --- 209,215 ---- sdword parent; char *remaining; { ! char command[MAXPATHLEN+32]; sprintf(command, "f%d\277%s\277", parent, remaining); return(send_command(command)); *************** *** 193,199 **** send_delete_id(id) sdword id; { ! char command[10]; sprintf(command, "d%d\277", id); return(send_command(command)); --- 229,235 ---- send_delete_id(id) sdword id; { ! char command[32]; sprintf(command, "d%d\277", id); return(send_command(command)); *************** *** 214,220 **** sdword from_parent, to_parent; char *old_name, *new_name; { ! char command[MAXPATHLEN]; /* should be sufficient */ sprintf(command, "m%d\277%s\277%d\277%s\277", from_parent, old_name, to_parent, new_name); --- 250,256 ---- sdword from_parent, to_parent; char *old_name, *new_name; { ! char command[2*MAXPATHLEN+32]; /* should be sufficient */ sprintf(command, "m%d\277%s\277%d\277%s\277", from_parent, old_name, to_parent, new_name); *************** *** 236,242 **** sdword id; char *new_name; { ! char command[MAXPATHLEN]; sprintf(command, "r%d\277%s\277", id, new_name); return(send_command(command)); --- 272,278 ---- sdword id; char *new_name; { ! char command[MAXPATHLEN+32]; sprintf(command, "r%d\277%s\277", id, new_name); return(send_command(command)); *************** *** 245,251 **** int send_clean() { ! char command[2]; sprintf(command, "C"); return(send_command(command)); --- 281,287 ---- int send_clean() { ! char command[32]; sprintf(command, "C"); return(send_command(command)); *** lib/afp/afpidgnrl.c.orig Wed May 1 02:07:51 1996 --- lib/afp/afpidgnrl.c Wed Jun 19 20:27:33 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 16:07:19 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidgnrl.c,v 2.3 1996/04/30 16:07:19 djh Rel djh $ ! * $Revision: 2.3 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 10:27:21 $ ! * $Header: /mac/src/cap60/lib/afp/RCS/afpidgnrl.c,v 2.5 1996/06/19 10:27:21 djh Rel djh $ ! * $Revision: 2.5 $ * */ *************** *** 26,36 **** #include #include #include #include #include #include #include ! #include #include #include "afpidaufs.h" --- 26,44 ---- #include #include #include + #ifdef USE_GDBM + #include + #else /* USE_GDBM */ #include + #endif /* USE_GDBM */ #include #include #include ! #ifdef USESTRINGDOTH ! # include ! #else USESTRINGDOTH ! # include ! #endif USESTRINGDOTH #include #include "afpidaufs.h" *************** *** 43,49 **** char *aufsDbVersion = DBVERSION; char *aufsRootName = ROOTNAME; sdword rootEid; ! DBM *db; char * string_copy(str) --- 51,61 ---- char *aufsDbVersion = DBVERSION; char *aufsRootName = ROOTNAME; sdword rootEid; ! #ifdef USE_GDBM ! GDBM_FILE db = NULL; ! #else /* USE_GDBM */ ! DBM *db = NULL; ! #endif /* USE_GDBM */ char * string_copy(str) *************** *** 81,87 **** un_addr.sun_family = AF_UNIX; sprintf((char *)un_addr.sun_path, "%s", aufsSockname); *addr = (struct sockaddr *)&un_addr; ! *len = strlen(un_addr.sun_path) + sizeof(un_addr.sun_family); } int --- 93,99 ---- un_addr.sun_family = AF_UNIX; sprintf((char *)un_addr.sun_path, "%s", aufsSockname); *addr = (struct sockaddr *)&un_addr; ! *len = strlen(un_addr.sun_path) + 1 + sizeof(un_addr.sun_family); } int *************** *** 340,345 **** --- 352,361 ---- return(1); } + #ifdef USE_GDBM + static char ftchtmp[MAXPATHLEN+32]; + #endif /* USE_GDBM */ + datum get_datum(id) sdword id; *************** *** 347,353 **** --- 363,391 ---- datum key,entry; key = num_datum(id); + #ifdef USE_GDBM + if (db != NULL) + gdbm_close(db); + entry.dptr = NULL; + { int tries = 0; + while ((db = gdbm_open(aufsDbName, 2048, GDBM_READER, 0644, 0L)) == NULL) { + if (++tries > 60) + return(entry); + usleep(250000); + } + } + entry = gdbm_fetch(db, key); + if (entry.dptr != NULL && entry.dsize <= sizeof(ftchtmp)) { + /* simulate ndbm static data areas */ + bcopy(entry.dptr, ftchtmp, entry.dsize); + free(entry.dptr); + entry.dptr = ftchtmp; + } + gdbm_close(db); + db = NULL; + #else /* USE_GDBM */ entry = dbm_fetch(db, key); + #endif /* USE_GDBM */ #ifdef DEBUG fprintf(stderr, "Read for id %d datum (%d,%x)\n", id, entry.dsize, entry.dptr); *************** *** 365,371 **** --- 403,424 ---- datum key; key = num_datum(id); + #ifdef USE_GDBM + if (db != NULL) + gdbm_close(db); + { int tries = 0; + while ((db = gdbm_open(aufsDbName, 2048, GDBM_WRITER, 0644, 0L)) == NULL) { + if (++tries > 60) + return(-1); + usleep(250000); + } + } + ret = gdbm_store(db, key, entry, flags); + gdbm_close(db); + db = NULL; + #else /* USE_GDBM */ ret = dbm_store(db, key, entry, flags); + #endif /* USE_GDBM */ #ifdef DEBUG fprintf(stderr, "Write for id %d datum (%d,%x) gave %d\n", id, entry.dsize, entry.dptr, ret); *************** *** 381,387 **** --- 434,455 ---- datum key; key = num_datum(id); + #ifdef USE_GDBM + if (db != NULL) + gdbm_close(db); + { int tries = 0; + while ((db = gdbm_open(aufsDbName, 2048, GDBM_WRITER, 0644, 0L)) == NULL) { + if (++tries > 60) + return; + usleep(250000); + } + } + gdbm_delete(db, key); + gdbm_close(db); + db = NULL; + #else /* USE_GDBM */ dbm_delete(db, key); + #endif /* USE_GDBM */ } static *** lib/cap/abatp.c.orig Mon Mar 11 20:39:48 1996 --- lib/cap/abatp.c Tue Jun 18 20:48:23 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/03/11 09:39:33 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abatp.c,v 2.8 1996/03/11 09:39:33 djh Rel djh $ ! * $Revision: 2.8 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:48:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abatp.c,v 2.9 1996/06/18 10:48:17 djh Rel djh $ ! * $Revision: 2.9 $ * */ *************** *** 27,33 **** --- 27,35 ---- #include #include + #ifndef linux #include + #endif /* linux */ #include #include #include *** lib/cap/abddp.c.orig Thu Mar 14 14:35:01 1991 --- lib/cap/abddp.c Tue Jun 18 20:48:25 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 91/03/14 14:34:35 $ ! * $Header: abddp.c,v 2.2 91/03/14 14:34:35 djh Exp $ ! * $Revision: 2.2 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:48:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abddp.c,v 2.3 1996/06/18 10:48:17 djh Rel djh $ ! * $Revision: 2.3 $ */ /* *************** *** 26,32 **** --- 26,34 ---- #include #include + #ifndef linux #include + #endif /* linux */ #include #include *** lib/cap/abkas.c.orig Mon Oct 24 16:42:43 1994 --- lib/cap/abkas.c Fri Sep 6 22:06:46 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1994/10/24 06:42:34 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abkas.c,v 2.2 1994/10/24 06:42:34 djh Rel djh $ ! * $Revision: 2.2 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/09/06 12:06:32 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abkas.c,v 2.4 1996/09/06 12:06:32 djh Rel djh $ ! * $Revision: 2.4 $ */ /* *************** *** 17,22 **** --- 17,23 ---- * Edit History: * * February 1992 djh Created + * May, 1996 djh Updated * */ *************** *** 55,63 **** #include #include #include #include #include - #include #include #include #include --- 56,69 ---- #include #include #include + #ifdef linux + #include + #include + #else /* linux */ + #include #include + #endif /* linux */ #include #include #include #include *************** *** 69,75 **** #include #define ATADDR_ANYNET (u_short)0x0000 - #define ATADDR_LATENET (u_short)0xffff #define ATADDR_ANYNODE (u_char)0x00 #define ATADDR_ANYPORT (u_char)0x00 #define ATADDR_BCAST (u_char)0xff --- 75,80 ---- *************** *** 94,99 **** --- 99,112 ---- char sat_zero[8]; }; + /* Range info for extended networks */ + + struct net_range { + u_char phase; + u_short net_lo; + u_short net_hi; + }; + /* imported network information */ extern word this_net, bridge_net, nis_net, async_net; *************** *** 136,142 **** private struct sockaddr_at addr; /* local appletalk socket addr */ private struct sockaddr_at raddr;/* input appletalk socket addr */ private struct sockaddr_in from; /* loopback receive address */ ! private struct sockaddr_in send; /* send packet to loopback */ private int skt2fd[ddpMaxSkt+1]; /* translate socket to file descriptor */ private int skt2kip[ddpMaxSkt+1];/* loopback socket to file descriptor */ --- 149,155 ---- private struct sockaddr_at addr; /* local appletalk socket addr */ private struct sockaddr_at raddr;/* input appletalk socket addr */ private struct sockaddr_in from; /* loopback receive address */ ! private struct sockaddr_in sndl; /* send packet to loopback */ private int skt2fd[ddpMaxSkt+1]; /* translate socket to file descriptor */ private int skt2kip[ddpMaxSkt+1];/* loopback socket to file descriptor */ *************** *** 219,236 **** bzero(&addr, sizeof(struct sockaddr_at)); addr.sat_family = AF_APPLETALK; ! addr.sat_addr.s_net = ATADDR_LATENET; addr.sat_addr.s_node = ATADDR_ANYNODE; addr.sat_port = (rskt == 0) ? ATADDR_ANYPORT : rskt; ! if ((err = bind(fd, &addr, sizeof(struct sockaddr_at))) < 0) { perror("bind()"); close(fd); return(err); } len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, &addr, &len)) < 0) { perror("getsockname()"); close(fd); return(err); --- 232,249 ---- bzero(&addr, sizeof(struct sockaddr_at)); addr.sat_family = AF_APPLETALK; ! addr.sat_addr.s_net = htons(ATADDR_ANYNET); addr.sat_addr.s_node = ATADDR_ANYNODE; addr.sat_port = (rskt == 0) ? ATADDR_ANYPORT : rskt; ! if ((err = bind(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_at))) < 0) { perror("bind()"); close(fd); return(err); } len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, (struct sockaddr *)&addr, &len)) < 0) { perror("getsockname()"); close(fd); return(err); *************** *** 254,269 **** return(fd); } ! send.sin_family = AF_INET; ! send.sin_addr.s_addr = INADDR_ANY; ! if ((send.sin_port = ddp2ipskt(*skt)) == 0) { fdunlisten(skt2fd[*skt]); close(skt2fd[*skt]); close(fd); return(ddpSktErr); } ! if ((err = bind(fd, (struct sockaddr *)&send, sizeof(struct sockaddr))) < 0) { perror("bind()"); fdunlisten(skt2fd[*skt]); close(skt2fd[*skt]); --- 267,282 ---- return(fd); } ! sndl.sin_family = AF_INET; ! sndl.sin_addr.s_addr = INADDR_ANY; ! if ((sndl.sin_port = htons(ddp2ipskt(*skt))) == 0) { fdunlisten(skt2fd[*skt]); close(skt2fd[*skt]); close(fd); return(ddpSktErr); } ! if ((err = bind(fd, (struct sockaddr *)&sndl, sizeof(struct sockaddr))) < 0) { perror("bind()"); fdunlisten(skt2fd[*skt]); close(skt2fd[*skt]); *************** *** 338,363 **** /* want DDP type in byte 0 */ iov[IOV_DDP_LVL].iov_len = 1; msg.msg_name = (caddr_t) &raddr; msg.msg_namelen = sizeof(struct sockaddr_at); msg.msg_iov = iov+1; msg.msg_iovlen = iovlen-1; msg.msg_accrights = 0; msg.msg_accrightslen = 0; len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, &addr, &len)) < 0) { perror("getsockname()"); return(err); } if ((len = recvmsg(fd, &msg, 0)) < 0) { perror("recvmsg()"); return(len); } - /* make up some dummy headers */ - lap = (LAP *)iov[IOV_LAP_LVL].iov_base; lap->type = lapDDP; lap->dst = addr.sat_addr.s_node; --- 351,385 ---- /* want DDP type in byte 0 */ iov[IOV_DDP_LVL].iov_len = 1; + #ifdef linux + bzero((char *)&msg, sizeof(msg)); + #endif linux msg.msg_name = (caddr_t) &raddr; msg.msg_namelen = sizeof(struct sockaddr_at); msg.msg_iov = iov+1; msg.msg_iovlen = iovlen-1; + #ifndef linux msg.msg_accrights = 0; msg.msg_accrightslen = 0; + #endif /* linux */ len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, (struct sockaddr *)&addr, &len)) < 0) { perror("getsockname()"); return(err); } + /* + * getsockname returns net byte order + * + */ + addr.sat_addr.s_net = ntohs(addr.sat_addr.s_net); + if ((len = recvmsg(fd, &msg, 0)) < 0) { perror("recvmsg()"); return(len); } lap = (LAP *)iov[IOV_LAP_LVL].iov_base; lap->type = lapDDP; lap->dst = addr.sat_addr.s_node; *************** *** 365,372 **** iov[IOV_LAP_LVL].iov_len = lapSize; ddp = (DDP *)iov[IOV_DDP_LVL].iov_base; ! ddp->type = iov[IOV_DDP_LVL].iov_base[0]; ! ddp->length = len + ddpSize - 1; ddp->checksum = 0; ddp->dstNet = addr.sat_addr.s_net; ddp->srcNet = raddr.sat_addr.s_net; --- 387,394 ---- iov[IOV_LAP_LVL].iov_len = lapSize; ddp = (DDP *)iov[IOV_DDP_LVL].iov_base; ! ddp->type = *(char *)iov[IOV_DDP_LVL].iov_base; ! ddp->length = htons(len-1+ddpSize); ddp->checksum = 0; ddp->dstNet = addr.sat_addr.s_net; ddp->srcNet = raddr.sat_addr.s_net; *************** *** 376,382 **** ddp->srcSkt = raddr.sat_port; iov[IOV_DDP_LVL].iov_len = ddpSize; ! return(ddp_protocol(iov+1, iovlen-1, len+ddpSize)); } /* --- 398,404 ---- ddp->srcSkt = raddr.sat_port; iov[IOV_DDP_LVL].iov_len = ddpSize; ! return(ddp_protocol(iov+1, iovlen-1, len-1+ddpSize)); } /* *************** *** 394,405 **** --- 416,432 ---- int len; LAP *lap; + #ifdef linux + bzero((char *)&msg, sizeof(msg)); + #endif linux msg.msg_name = (caddr_t) &from; msg.msg_namelen = sizeof(from); msg.msg_iov = iov; msg.msg_iovlen = iovlen; + #ifndef linux msg.msg_accrights = 0; msg.msg_accrightslen = 0; + #endif /* linux */ if ((len = recvmsg(fd, &msg, 0)) < 0) { perror("recvmsg()"); *************** *** 448,462 **** tokip.sin_family = AF_INET; tokip.sin_addr.s_addr = bridge_addr.s_addr; ! if ((tokip.sin_port = ddp2ipskt(ddp->dstSkt)) == 0) return(ddpSktErr); msg.msg_name = (caddr_t)&tokip; msg.msg_namelen = sizeof(tokip); msg.msg_iov = iov; msg.msg_iovlen = iovlen; msg.msg_accrights = 0; msg.msg_accrightslen = 0; fd = skt2kip[ddp->srcSkt]; if ((err = sendmsg(fd, &msg, 0)) < 0) --- 475,494 ---- tokip.sin_family = AF_INET; tokip.sin_addr.s_addr = bridge_addr.s_addr; ! if ((tokip.sin_port = htons(ddp2ipskt(ddp->dstSkt))) == 0) return(ddpSktErr); + #ifdef linux + bzero((char *)&msg, sizeof(msg)); + #endif linux msg.msg_name = (caddr_t)&tokip; msg.msg_namelen = sizeof(tokip); msg.msg_iov = iov; msg.msg_iovlen = iovlen; + #ifndef linux msg.msg_accrights = 0; msg.msg_accrightslen = 0; + #endif /* linux */ fd = skt2kip[ddp->srcSkt]; if ((err = sendmsg(fd, &msg, 0)) < 0) *************** *** 478,489 **** --- 510,526 ---- iov[IOV_DDP_LVL].iov_base += (ddpSize-1); iov[IOV_DDP_LVL].iov_len = 1; /* ddp type */ + #ifdef linux + bzero((char *)&msg, sizeof(msg)); + #endif linux msg.msg_name = (caddr_t)&taddr; msg.msg_namelen = sizeof(struct sockaddr_at); msg.msg_iov = iov+1; msg.msg_iovlen = iovlen-1; + #ifndef linux msg.msg_accrights = 0; msg.msg_accrightslen = 0; + #endif /* linux */ fd = skt2fd[ddp->srcSkt]; if ((err = sendmsg(fd, &msg, 0)) < 0) { *************** *** 497,510 **** /* * configure the network interface * */ int ! ifconfig(net, node) ! int *net, *node; { struct sockaddr_at addr; struct sockaddr_at *sat; struct ifreq ifreq; int len, err; int fd; --- 534,551 ---- /* * configure the network interface * + * (expects network numbers in host byte order + * and returns network numbers in net byte order) + * */ int ! ifconfig(node, net, net_lo, net_hi) ! int *node, *net, *net_lo, *net_hi; { struct sockaddr_at addr; struct sockaddr_at *sat; + struct net_range *nr; struct ifreq ifreq; int len, err; int fd; *************** *** 515,549 **** } strncpy(ifreq.ifr_name, interface, sizeof(ifreq.ifr_name)); ! sat = (struct sockaddr_at *) &ifreq.ifr_addr; ! bzero(sat, sizeof(struct sockaddr_at)); sat->sat_family = AF_APPLETALK; ! sat->sat_addr.s_net = *net; sat->sat_addr.s_node = *node; sat->sat_port = ATADDR_ANYPORT; if ((err = ioctl(fd, SIOCSIFADDR, &ifreq)) < 0) { perror("SIOCSIFADDR"); return(err); } ! bzero(&addr, sizeof(struct sockaddr_at)); addr.sat_family = AF_APPLETALK; ! addr.sat_addr.s_net = ATADDR_ANYNET; addr.sat_addr.s_node = ATADDR_ANYNODE; addr.sat_port = ATADDR_ANYPORT; ! if ((err = bind(fd, &addr, sizeof(struct sockaddr_at))) < 0) { perror("bind()"); return(err); } len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, &addr, &len)) < 0) { perror("getsockname()"); return(err); } *net = addr.sat_addr.s_net; *node = addr.sat_addr.s_node; --- 556,601 ---- } strncpy(ifreq.ifr_name, interface, sizeof(ifreq.ifr_name)); ! sat = (struct sockaddr_at *)&ifreq.ifr_addr; ! bzero((char *)sat, sizeof(struct sockaddr_at)); sat->sat_family = AF_APPLETALK; ! sat->sat_addr.s_net = htons(*net); sat->sat_addr.s_node = *node; sat->sat_port = ATADDR_ANYPORT; + #ifdef PHASE2 + nr = (struct net_range *)&sat->sat_zero; + nr->net_lo = htons(*net_lo); + nr->net_hi = htons(*net_hi); + nr->phase = 2; + #endif /* PHASE2 */ + if ((err = ioctl(fd, SIOCSIFADDR, &ifreq)) < 0) { perror("SIOCSIFADDR"); return(err); } ! bzero((char *)&addr, sizeof(struct sockaddr_at)); addr.sat_family = AF_APPLETALK; ! addr.sat_addr.s_net = htons(ATADDR_ANYNET); addr.sat_addr.s_node = ATADDR_ANYNODE; addr.sat_port = ATADDR_ANYPORT; ! if ((err = bind(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_at))) < 0) { perror("bind()"); return(err); } len = sizeof(struct sockaddr_at); ! if ((err = getsockname(fd, (struct sockaddr *)&addr, &len)) < 0) { perror("getsockname()"); return(err); } + /* + * getsockname returns net byte order + * + */ *net = addr.sat_addr.s_net; *node = addr.sat_addr.s_node; *************** *** 723,734 **** SetNodeAddress(myNet, myNode) int myNet, myNode; { ! if (ifconfig(&myNet, &myNode) == 0) { ! this_net = nis_net = myNet; ! this_node = nis_node = myNode; etalkdbupdate(NULL); } ! return(noErr); } /* --- 775,792 ---- SetNodeAddress(myNet, myNode) int myNet, myNode; { ! int net_lo, net_hi; ! ! net_lo = 0x0000; ! net_hi = 0xfffe; ! ! if (ifconfig(&myNode, &myNet, &net_lo, &net_hi) == 0) { ! this_net = myNet; ! this_node = myNode; etalkdbupdate(NULL); + return(noErr); } ! return(-1); } /* *************** *** 754,761 **** SetBridgeAddress(baddr) AddrBlock *baddr; { - bridge_net = baddr->net; bridge_node = baddr->node; if (this_net == 0) SetNodeAddress(bridge_net, 0); etalkdbupdate(NULL); --- 812,819 ---- SetBridgeAddress(baddr) AddrBlock *baddr; { bridge_node = baddr->node; + bridge_net = baddr->net; if (this_net == 0) SetNodeAddress(bridge_net, 0); etalkdbupdate(NULL); *************** *** 778,780 **** --- 836,1287 ---- return(noErr); } #endif PHASE2 + + /* + * Maintain a simple routing table for use with Kernel AppleTalk + * + * Copyright 1996, The University of Melbourne + * + */ + + struct rtmp { + u_short net_lo; /* network range start */ + u_short net_hi; /* network range end */ + u_short dist; /* distance to destination */ + u_short rnet; /* router network address */ + u_char rnode; /* router node address */ + u_char state; /* entry state */ + #define RTMP_GOOD 0 + #define RTMP_SUSP 1 + #define RTMP_BAD1 2 + #define RTMP_BAD2 3 + u_char flags; /* flag bits for this entry */ + #define RTMP_EXTENDED 0x01 + u_char dummy; /* padding to longword */ + struct rtmp *next; /* next in linked list */ + }; + + #define RTMPNULL ((struct rtmp *)NULL) + + #define RTMPTABSIZ 256 + #define RTMPTABMSK RTMPTABSIZ-1 + + #define RTMP_MODIFIED 1 + #define RTMP_DELETED 2 + + struct rtmp *rtmpTab[RTMPTABSIZ]; + + /* + * pkt points to RTMP tuples + * from router rnode.rnet + * + */ + + void + rtmp_data(rnode, rnet, pkt, len) + u_char rnode; + u_short rnet; + u_char *pkt; + int len; + { + int i; + u_char dist; + u_char *data; + int tuplelen; + int modified; + static int init = 0; + u_short net_lo, net_hi; + struct rtmp *rtmp_new(); + struct rtmp *rtmp_delete(); + struct rtmp *rtmp, *rtmp_find(); + void rtmp_kernel_update(); + void rtmp_insert(); + + if (!init) { + for (i = 0; i < RTMPTABSIZ; i++) + rtmpTab[i] = RTMPNULL; + init = 1; + } + + data = pkt; + rnet = ntohs(rnet); + + while (data < (pkt+len)) { + net_lo = (data[0] << 8) | data[1]; + dist = data[2] & 0x1f; + if (data[2] & 0x80) { + /* extended tuples */ + net_hi = (data[3] << 8) | data[4]; + tuplelen = 6; + } else { + /* non-extended */ + net_hi = net_lo; + tuplelen = 3; + } + + modified = 0; + + if ((rtmp = rtmp_find(net_lo, net_hi)) != RTMPNULL) { + /* update the entry */ + if (rtmp->state == RTMP_BAD1 && dist < 15) { + /* replace entry */ + if (rtmp->rnet != rnet + || rtmp->rnode != rnode) + modified = 1; + rtmp->dist = dist+1; + rtmp->rnet = rnet; + rtmp->rnode = rnode; + rtmp->state = RTMP_GOOD; + } else { + if (rtmp->dist >= dist+1 && dist < 15) { + /* replace entry */ + if (rtmp->rnet != rnet + || rtmp->rnode != rnode) + modified = 1; + rtmp->dist = dist+1; + rtmp->rnet = rnet; + rtmp->rnode = rnode; + rtmp->state = RTMP_GOOD; + } else { + if (rtmp->rnet == rnet + && rtmp->rnode == rnode) { + /* net further away now */ + if (dist != 31) { + rtmp->dist = dist+1; + if (rtmp->dist < 16) + rtmp->state = RTMP_GOOD; + else { + rtmp_kernel_update(rtmp, RTMP_DELETED); + (void)rtmp_delete(rtmp); + } + } else + rtmp->state = RTMP_BAD1; + } + } + } + } else { + /* create a new entry */ + if ((rtmp = rtmp_new()) != RTMPNULL) { + rtmp->net_lo = net_lo; + rtmp->net_hi = net_hi; + rtmp->dist = dist+1; + rtmp->rnet = rnet; + rtmp->rnode = rnode; + rtmp->state = (dist == 31) ? RTMP_BAD1 : RTMP_GOOD; + rtmp_kernel_update(rtmp, RTMP_MODIFIED); + rtmp_insert(rtmp); + } + } + + if (data[2] & 0x80) + if (rtmp != RTMPNULL) + rtmp->flags |= RTMP_EXTENDED; + + if (modified) + rtmp_kernel_update(rtmp, RTMP_MODIFIED); + + data += tuplelen; + } + + return; + } + + /* + * RTMP validity timer, check & age each entry. + * + */ + + void + rtmp_timer() + { + int i, nrtmp; + struct rtmp *rtmp, *rtmp_delete(); + void Timeout(), rtmp_timer(); + void rtmp_kernel_update(); + + for (i = 0, nrtmp = 0; i < RTMPTABSIZ; i++) { + rtmp = rtmpTab[i]; + while (rtmp != RTMPNULL) { + switch (rtmp->state) { + case RTMP_GOOD: + if (rtmp->dist != 0) + rtmp->state = RTMP_SUSP; + break; + case RTMP_SUSP: + rtmp->state = RTMP_BAD1; + break; + case RTMP_BAD1: + rtmp->state = RTMP_BAD2; + break; + case RTMP_BAD2: + rtmp_kernel_update(rtmp, RTMP_DELETED); + rtmp = rtmp_delete(rtmp); + continue; + break; + } + rtmp = rtmp->next; + nrtmp++; + } + } + + #ifdef DEBUG + for (i = 0; i < RTMPTABSIZ; i++) { + rtmp = rtmpTab[i]; + while (rtmp != RTMPNULL) { + logit(1, "%4x %c %4x -> net %4x node %3d dist %d state %d", + rtmp->net_lo, (rtmp->flags & RTMP_EXTENDED) ? '-' : ' ', + rtmp->net_hi, rtmp->rnet, rtmp->rnode, rtmp->dist, rtmp->state); + rtmp = rtmp->next; + } + } + #endif /* DEBUG */ + + logit(1, "Processed %d entries", nrtmp); + + /* + * schedule another call + * + */ + Timeout(rtmp_timer, 0, 40); + + return; + } + + /* + * exiting, delete all routes from kernel tables + * and reset the network number information. + * + */ + + void + rtmp_release() + { + int i; + struct rtmp *rtmp; + int node, net, net_lo, net_hi; + void rtmp_kernel_update(); + + for (i = 0; i < RTMPTABSIZ; i++) { + rtmp = rtmpTab[i]; + while (rtmp != RTMPNULL) { + rtmp_kernel_update(rtmp, RTMP_DELETED); + rtmp = rtmp->next; + } + } + + node = 0x00; + net = 0xff00; + net_lo = 0x0000; + net_hi = 0xfffe; + + ifconfig(&node, &net, &net_lo, &net_hi); + + return; + } + + /* + * create a new RTMP element + * + */ + + struct rtmp * + rtmp_new() + { + struct rtmp *rtmp; + + rtmp = (struct rtmp *)malloc(sizeof(struct rtmp)); + + if (rtmp == RTMPNULL) + return(RTMPNULL); + + rtmp->flags = 0x00; + + return(rtmp); + } + + /* + * free memory occupied by RTMP element + * + */ + + void + rtmp_free(rtmp) + struct rtmp *rtmp; + { + free((char *)rtmp); + + return; + } + + /* + * insert RTMP tuple in linked list + * + */ + + void + rtmp_insert(rtmp) + struct rtmp *rtmp; + { + int idx, rtmp_hash(); + struct rtmp *p, *q; + + idx = rtmp_hash(rtmp->net_lo, rtmp->net_hi); + + p = rtmpTab[idx]; + q = RTMPNULL; + + while (p != RTMPNULL) { + if (p->net_lo >= rtmp->net_lo) + break; + q = p; + p = p->next; + } + + rtmp->next = p; + + if (q == RTMPNULL) + rtmpTab[idx] = rtmp; + else + q->next = rtmp; + + return; + } + + /* + * delete RTMP tuple from linked list + * + */ + + struct rtmp * + rtmp_delete(rtmp) + struct rtmp *rtmp; + { + int idx, rtmp_hash(); + struct rtmp *next, *p, *q; + void rtmp_free(); + + idx = rtmp_hash(rtmp->net_lo, rtmp->net_hi); + + p = rtmpTab[idx]; + q = RTMPNULL; + + while (p != RTMPNULL) { + if (p == rtmp) + break; + q = p; + p = p->next; + } + + if (p == RTMPNULL) + return(p); + + next = rtmp->next; + + if (q == RTMPNULL) + rtmpTab[idx] = next; + else + q->next = next; + + rtmp_free(rtmp); + + return(next); + } + + /* + * find an entry in the RTMP table. + * + */ + + struct rtmp * + rtmp_find(net_lo, net_hi) + u_short net_lo, net_hi; + { + struct rtmp *rtmp; + int rtmp_hash(); + + rtmp = rtmpTab[rtmp_hash(net_lo, net_hi)]; + + while (rtmp != RTMPNULL) { + if (rtmp->net_lo == net_lo + && rtmp->net_hi == net_hi) + return(rtmp); + rtmp = rtmp->next; + } + + return(RTMPNULL); + } + + /* + * simple hash of high and low net numbers + * + */ + + int + rtmp_hash(net_lo, net_hi) + register u_short net_lo, net_hi; + { + register int i, idx; + + for (i = 0; i < 17; i++) + if ((idx = ((net_lo>>i) & RTMPTABMSK)) == ((net_hi>>i) & RTMPTABMSK)) + return(idx); + + return(0); + } + + /* + * update (add) or delete entry in kernel routing table + * + */ + + void + rtmp_kernel_update(rtmp, what) + struct rtmp *rtmp; + int what; + { + #ifdef linux + u_short net; + struct rtentry rt; + struct sockaddr_at *ad; + struct sockaddr_at *gw; + + if (rtmp == RTMPNULL) + return; + + ad = (struct sockaddr_at *)&rt.rt_dst; + gw = (struct sockaddr_at *)&rt.rt_gateway; + + ad->sat_family = AF_APPLETALK; + gw->sat_family = AF_APPLETALK; + ad->sat_port = 0; + gw->sat_port = 0; + ad->sat_addr.s_node = 0; + gw->sat_addr.s_node = rtmp->rnode; + gw->sat_addr.s_net = htons(rtmp->rnet); + + if (skt2fd[1] == -1) + return; + + /* + * the kernel only keeps routes to single networks, + * we have to add an entry for each possible net + * in each network range :-( + * + */ + for (net = rtmp->net_lo; net <= rtmp->net_hi; net++) { + ad->sat_addr.s_net = htons(net); + switch (what) { + case RTMP_MODIFIED: + rt.rt_flags = (RTF_GATEWAY|RTF_UP); + (void)ioctl(skt2fd[1], SIOCADDRT, &rt); + break; + case RTMP_DELETED: + rt.rt_flags = RTF_GATEWAY; + (void)ioctl(skt2fd[1], SIOCDELRT, &rt); + break; + } + } + #endif /* linux */ + + return; + } *** lib/cap/abkip.c.orig Tue Aug 29 16:45:40 1995 --- lib/cap/abkip.c Tue Jun 18 20:48:28 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/08/29 06:45:27 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abkip.c,v 2.7 1995/08/29 06:45:27 djh Rel djh $ ! * $Revision: 2.7 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:48:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abkip.c,v 2.8 1996/06/18 10:48:17 djh Rel djh $ ! * $Revision: 2.8 $ * */ *************** *** 71,77 **** --- 71,79 ---- #include #include #include + #ifndef linux #include + #endif /* linux */ #include #include #include *************** *** 672,674 **** --- 674,695 ---- bridge_node = addr->node; return(noErr); } + + #ifdef linux + /* + * dummy routines for loader + * + */ + void + rtmp_timer() + { + } + void + rtmp_data() + { + } + void + rtmp_release() + { + } + #endif /* linux */ *** lib/cap/abpapc.c.orig Thu Apr 25 11:01:55 1996 --- lib/cap/abpapc.c Tue Jun 18 20:48:30 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/25 01:01:44 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abpapc.c,v 2.3 1996/04/25 01:01:44 djh Rel djh $ ! * $Revision: 2.3 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:48:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abpapc.c,v 2.4 1996/06/18 10:48:17 djh Rel djh $ ! * $Revision: 2.4 $ */ /* *************** *** 144,150 **** ps->statusbuff = statusbuff; ps->addr = addr; ps->flowq = flowquantum; ! time(&ps->wtime.tv_sec); /* get current time */ ps->state = PAP_OPENING; *refnum = cno; /* send back refnum */ --- 144,150 ---- ps->statusbuff = statusbuff; ps->addr = addr; ps->flowq = flowquantum; ! time((time_t *)&ps->wtime.tv_sec); /* get current time */ ps->state = PAP_OPENING; *refnum = cno; /* send back refnum */ *** lib/cap/absched.c.orig Thu Jun 15 09:59:22 1995 --- lib/cap/absched.c Tue Sep 10 23:47:47 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/06/14 23:59:16 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/absched.c,v 2.6 1995/06/14 23:59:16 djh Rel djh $ ! * $Revision: 2.6 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/09/10 13:47:34 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/absched.c,v 2.8 1996/09/10 13:47:34 djh Rel djh $ ! * $Revision: 2.8 $ */ /* *************** *** 56,61 **** --- 56,69 ---- #define MULTI_BPF_PKT #endif /* __NetBSD__ */ + #ifdef __FreeBSD__ + #define MULTI_BPF_PKT + #endif /* __FreeBSD__ */ + + #ifdef NeXT + #define MULTI_BPF_PKT + #endif /* NeXT */ + /* * NOTE: it is not important to get the TZ information. It is simply * included because some systems complain if there isn't a valid pointer *************** *** 807,813 **** int top; top = howmany(maxfd, NFDBITS); /* find length of array */ ! fm = p->fds_bits; /* point to start of array */ for (w=0,i=0; i < top; i++,fm++) { if ((w=ffs(*fm)) > 0) break; --- 815,821 ---- int top; top = howmany(maxfd, NFDBITS); /* find length of array */ ! fm = (gfd_mask *)p->fds_bits; /* point to start of array */ for (w=0,i=0; i < top; i++,fm++) { if ((w=ffs(*fm)) > 0) break; *** lib/cap/atalkdbm.c.orig Wed May 31 22:58:29 1995 --- lib/cap/atalkdbm.c Tue Jun 18 20:48:32 1996 *************** *** 1,7 **** /* ! * $Date: 1995/05/31 12:58:21 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/atalkdbm.c,v 2.12 1995/05/31 12:58:21 djh Rel djh $ ! * $Revision: 2.12 $ * * mods for async appletalk support, /etc/etalk.local for EtherTalk and * changes for quoted zone names: djh@munnari.OZ.AU, 27/11/90 --- 1,7 ---- /* ! * $Date: 1996/06/18 10:48:17 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/atalkdbm.c,v 2.13 1996/06/18 10:48:17 djh Rel djh $ ! * $Revision: 2.13 $ * * mods for async appletalk support, /etc/etalk.local for EtherTalk and * changes for quoted zone names: djh@munnari.OZ.AU, 27/11/90 *************** *** 11,19 **** #include #include ! #ifdef SOLARIS #include ! #endif SOLARIS #include #include #include --- 11,19 ---- #include #include ! #if (defined(SOLARIS) || defined(linux)) #include ! #endif SOLARIS || linux #include #include #include *** support/capd/capd.c.orig Thu Jul 30 20:01:06 1992 --- support/capd/capd.c Wed Sep 11 02:15:29 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1992/07/30 10:00:58 $ ! * $Header: /mac/src/cap60/support/capd/RCS/capd.c,v 2.2 1992/07/30 10:00:58 djh Rel djh $ ! * $Revision: 2.2 $ */ /* --- 1,8 ---- /* ! * $Author: djh $ $Date: 1996/09/10 16:15:17 $ ! * $Header: /mac/src/cap60/support/capd/RCS/capd.c,v 2.6 1996/09/10 16:15:17 djh Rel djh $ ! * $Revision: 2.6 $ ! * */ /* *************** *** 17,31 **** #include #ifdef PHASE2 #include ! #ifndef ultrix #include ! #endif ultrix #include #endif PHASE2 #include #include #include extern char interface[50]; /* which ethernet device */ extern char this_zone[34]; /* zone for this host */ extern struct in_addr bridge_addr; /* IP address for local bridge */ --- 18,36 ---- #include #ifdef PHASE2 #include ! #if (!(defined(ultrix) || defined(linux))) #include ! #endif ultrix || linux #include #endif PHASE2 #include #include #include + /* + * etalkdbm globals + * + */ extern char interface[50]; /* which ethernet device */ extern char this_zone[34]; /* zone for this host */ extern struct in_addr bridge_addr; /* IP address for local bridge */ *************** *** 35,47 **** extern word this_net; /* this host node */ extern byte nis_node; /* atis running here */ extern word nis_net; /* atis running here */ - #ifdef PHASE2 extern word net_range_start; /* phase 2 network range start */ extern word net_range_end; /* phase 2 network range end */ - #endif PHASE2 extern short lap_proto; /* our LAP mechanism */ int dlevel=0; /* debug level */ main(argc, argv) --- 40,56 ---- extern word this_net; /* this host node */ extern byte nis_node; /* atis running here */ extern word nis_net; /* atis running here */ extern word net_range_start; /* phase 2 network range start */ extern word net_range_end; /* phase 2 network range end */ extern short lap_proto; /* our LAP mechanism */ + int node, net, net_lo, net_hi; + char *zonename = NULL; + char *ifname = NULL; + + private char mcaddr[6] = { 0x09, 0x00, 0x07, 0xff, 0xff, 0xff }; + int dlevel=0; /* debug level */ main(argc, argv) *************** *** 52,57 **** --- 61,67 ---- char *cp, *ep; extern int optind; extern char *optarg; + struct ifreq ifreq; short capdIdent(); void run(); *************** *** 75,123 **** openetalkdb(NULL); /* open/create etalk.local */ ! nis_net = this_net = 0; /* assume that we don't know */ ! nis_node = this_node = 0; ! bridge_net = bridge_node = 0; ! bridge_addr.s_addr = inet_addr("127.0.0.1"); ! ! #ifdef PHASE2 ! this_net = htons(0xff00); /* the startup range */ ! net_range_start = htons(0); /* the total range */ net_range_end = htons(0xfffe); - #endif PHASE2 lap_proto = capdIdent(); if (argc == (optind+2)) { ! /* arg list supplied interface & zone names */ ! strncpy(interface, argv[optind++], sizeof(interface)); ! strncpy(this_zone, argv[optind++], sizeof(this_zone)); } if (optind != argc) { fprintf(stderr, "usage: capd [-D level] [-d opt] [-l log] [interface zone]\n"); exit(1); } ! if (*interface == '\0') { fprintf(stderr, "No ethernet interface specified\n"); exit(1); } ep = NULL; ! for (cp = interface; *cp != '\0'; cp++) { if (*cp >= '0' && *cp <= '9') ep = cp; } if (ep == NULL) { /* interface, but no number */ ! fprintf(stderr, "Specified interface invalid: %s\n", interface); exit(1); } ! if (*this_zone == '\0') { fprintf(stderr, "No zone name specified\n"); exit(1); } etalkdbupdate(NULL); /* rewrite gleaned information */ if (!dbug.db_flgs && (dlevel == 0)) --- 85,195 ---- openetalkdb(NULL); /* open/create etalk.local */ ! /* ! * initialise externals ! * ! */ ! this_node = 0; ! this_net = htons(0xff00); ! nis_net = nis_node = bridge_net = bridge_node = 0; ! bridge_addr.s_addr = inet_addr("127.0.0.1"); ! net_range_start = htons(0); net_range_end = htons(0xfffe); lap_proto = capdIdent(); + /* + * get supplied interface & zone names + * + */ if (argc == (optind+2)) { ! ifname = argv[optind++]; ! zonename = argv[optind++]; ! strncpy(interface, ifname, sizeof(interface)); ! strncpy(this_zone, zonename, sizeof(this_zone)); } + /* + * wrong number of args ? + * + */ if (optind != argc) { fprintf(stderr, "usage: capd [-D level] [-d opt] [-l log] [interface zone]\n"); exit(1); } ! if (ifname == NULL ! || *ifname == '\0') { fprintf(stderr, "No ethernet interface specified\n"); exit(1); } ep = NULL; ! for (cp = ifname; *cp != '\0'; cp++) { if (*cp >= '0' && *cp <= '9') ep = cp; } if (ep == NULL) { /* interface, but no number */ ! fprintf(stderr, "Specified interface invalid: %s\n", ifname); exit(1); } ! if (zonename == NULL ! || *zonename == '\0') { fprintf(stderr, "No zone name specified\n"); exit(1); } + /* + * config Kernel AppleTalk + * startup range, any node + * + */ + node = 0x00; + net = 0xff00; + net_lo = 0x0000; + net_hi = 0xfffe; + + if (ifconfig(&node, &net, &net_lo, &net_hi) < 0) { + fprintf(stderr, "Can't initialise AppleTalk on %s\n", ifname); + exit(1); + } + + #ifdef PHASE2 + /* + * add multicast address to interface + * + */ + strncpy(ifreq.ifr_name, ifname, sizeof(ifreq.ifr_name)); + if (pi_addmulti(mcaddr, (caddr_t)&ifreq) < 0) { + fprintf(stderr, "Can't add multicast address!\n"); + exit(1); + } + + /* + * if phase 2, ask network for net + * ranges, get zone multicast address and + * verify user supplied zone name. + * + */ + if (getNetInfo() >= 0) { + net = net_lo; + strncpy(interface, ifname, sizeof(interface)); + if (ifconfig(&node, &net, &net_lo, &net_hi) < 0) { + fprintf(stderr, "Can't reinitialise AppleTalk on %s\n", ifname); + exit(1); + } + net_range_start = htons(net_lo); + net_range_end = htons(net_hi); + } + #endif /* PHASE2 */ + + nis_net = this_net = net; + nis_node = this_node = node; + strncpy(interface, ifname, sizeof(interface)); + strncpy(this_zone, zonename, sizeof(this_zone)); + bridge_addr.s_addr = inet_addr("127.0.0.1"); + bridge_net = bridge_node = 0; + etalkdbupdate(NULL); /* rewrite gleaned information */ if (!dbug.db_flgs && (dlevel == 0)) *************** *** 126,131 **** --- 198,204 ---- run(); /* do all the CAPD work */ (void)fprintf(stderr, "capd: run() returned!\n"); + exit(1); } *************** *** 154,156 **** --- 227,441 ---- (void) setsid(); #endif POSIX } + + #ifdef PHASE2 + + #define ZIPQuery 1 + #define ZIPReply 2 + #define ZIPEReply 8 + #define ZIPGetInfoReq 5 + #define ZIPGetInfoRepl 6 + + #define ZIPATTEMPTS 4 + + #define ZIPZoneBad 0x80 + #define ZIPNoMultiCast 0x40 + #define ZIPSingleZone 0x20 + + private int zisSkt; + private int heardFrom; + private char zmcaddr[6]; + private char defzone[34]; + + /* + * This is the ZIP ZIS listener + * (at present we are only interested + * in receiving one GetNetInfo packet + * and that only at startup) + * + */ + + void + zis_listener(skt, type, zis, len, addr) + u_char skt; + u_char type; + u_char *zis; + int len; + AddrBlock *addr; + { + int x; + struct ifreq ifreq; + + if (heardFrom) + return; /* drop it */ + + if (type == ddpATP) + return; /* drop it */ + + if (type != ddpZIP) { + logit(3, "ZIS listener - bad packet"); + return; /* drop it */ + } + + defzone[0] = '\0'; + + switch (*zis) { + case ZIPQuery: + case ZIPReply: + case ZIPEReply: + case ZIPGetInfoReq: + break; /* drop it */ + case ZIPGetInfoRepl: + heardFrom = 1; + net_lo = (zis[2] << 8) | zis[3]; /* net byte order */ + net_hi = (zis[4] << 8) | zis[5]; /* net byte order */ + if ((x = zis[6]) < sizeof(defzone)) { + bcopy(&zis[7], defzone, x); + defzone[x] = '\0'; + } + + /* + * check multicast address length + * + */ + x += 7; + if (zis[x] != sizeof(zmcaddr)) { + fprintf(stderr, "Bogus Multicast Address length %d\n", zis[x]); + exit(1); + } + + /* + * get zone multicast address + * + */ + bcopy((char *)&zis[x+1], zmcaddr, sizeof(zmcaddr)); + + logit(3, "GetNetInfo reply packet arrived:"); + logit(3, "%sFlags 0x%02x, rangeStart %04x, rangeEnd %04x", + " ", zis[1], net_lo, net_hi); + logit(3, "%sZone %s (len %d), MCZAddr %x:%x:%x:%x:%x:%x", + " ", defzone, zis[6], (u_char) zmcaddr[0], + (u_char) zmcaddr[1], (u_char) zmcaddr[2], + (u_char) zmcaddr[3], (u_char) zmcaddr[4], + (u_char) zmcaddr[5]); + + /* + * supplied zone name valid ? + * + */ + if (zis[1] & ZIPZoneBad) { + x += 7; + if (zis[x] < sizeof(defzone)) { + bcopy((char *)&zis[x+1], defzone, zis[x]); + defzone[zis[x]] = '\0'; + } + fprintf(stderr, "Zone \"%s\" unknown, network default is \"%s\"\n", + zonename, defzone); + exit(1); + } + + /* + * set zone multicast address on interface + * + */ + strncpy(ifreq.ifr_name, ifname, sizeof(ifreq.ifr_name)); + if (pi_addmulti(zmcaddr, (caddr_t)&ifreq) < 0) { + fprintf(stderr, "Can't add zone multicast address on %s!\n", ifname); + exit(1); + } + + break; + } + } + + /* + * open the ZIS socket, start the listener, probe for netinfo + * + */ + + int + getNetInfo() + { + void zis_listener(); + ABusRecord ddpr; + u_char zipbuf[48]; + int count, error; + + abInit(FALSE); + heardFrom = 0; + zisSkt = ddpZIP; + + if (DDPOpenSocket(&zisSkt, zis_listener) != noErr) { + logit(0, "Failed to start ZIS listener!"); + exit(1); + } + + zipbuf[0] = ZIPGetInfoReq; + zipbuf[1] = 0x0; + zipbuf[2] = 0x0; + zipbuf[3] = 0x0; + zipbuf[4] = 0x0; + zipbuf[5] = 0x0; + zipbuf[6] = strlen(zonename); + strncpy(&zipbuf[7], zonename, sizeof(zipbuf)-8); + + ddpr.abResult = 0; + ddpr.proto.ddp.ddpAddress.net = 0x0000; /* local net */ + ddpr.proto.ddp.ddpAddress.node = 0xff; /* broadcast */ + ddpr.proto.ddp.ddpAddress.skt = zisSkt; /* to ZIS at GW */ + ddpr.proto.ddp.ddpSocket = zisSkt; /* from our ZIS */ + ddpr.proto.ddp.ddpType = ddpZIP; + ddpr.proto.ddp.ddpDataPtr = (u_char *)zipbuf; + ddpr.proto.ddp.ddpReqCount = zipbuf[6] + 7; + + for (count = 0 ; count < ZIPATTEMPTS ; count++) { + logit(3, "sending GetNetInfo request ..."); + DDPWrite(&ddpr, FALSE); /* send it to GW */ + abSleep(sectotick(4), FALSE); /* wait for a reply */ + if (heardFrom) + break; /* don't ask again */ + } + + error = (heardFrom) ? 0 : -1; + + if (!heardFrom) + heardFrom = 1; /* ignore it later */ + + return(error); + } + + /* + * add a multicast address to the interface + * + */ + + int + pi_addmulti(multi, ifr) + char *multi; + struct ifreq *ifr; + { + int sock; + + ifr->ifr_addr.sa_family = AF_UNSPEC; + bcopy(multi, ifr->ifr_addr.sa_data, 6); + + /* + * open a socket, temporarily, to use for SIOC* ioctls + * + */ + if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("socket()"); + return(-1); + } + + if (ioctl(sock, SIOCADDMULTI, (caddr_t)ifr) < 0) { + perror("SIOCADDMULTI"); + close(sock); + return(-1); + } + + close(sock); + + return(0); + } + #endif PHASE2 *** support/ethertalk/sdlpi.c.orig Mon Oct 10 18:55:51 1994 --- support/ethertalk/sdlpi.c Wed Jun 19 13:47:50 1996 *************** *** 868,874 **** databuf.maxlen = 512; databuf.len = 0; ! databuf.buf = buf; if ((retval = getmsg(fd, &ctlbuf, &databuf, &flags)) < 0) { perror("bogus!"); --- 868,874 ---- databuf.maxlen = 512; databuf.len = 0; ! databuf.buf = (char *)buf; if ((retval = getmsg(fd, &ctlbuf, &databuf, &flags)) < 0) { perror("bogus!"); *************** *** 889,902 **** u_char *znam; short zlen; { u_char zone[34]; ! u_short i, chkSum(); static u_char zmcaddr[7] = {0x09,0x00,0x07,0x00,0x00,0x00}; if (zlen > sizeof(zone)) return(NULL); ! for (i = 0; i < zlen; i++) zone[i] = (u_char)zip_toupper(znam[i]); zmcaddr[5] = (u_char)(chkSum(zone, zlen) % 253); --- 889,903 ---- u_char *znam; short zlen; { + int i; u_char zone[34]; ! u_short chkSum(); static u_char zmcaddr[7] = {0x09,0x00,0x07,0x00,0x00,0x00}; if (zlen > sizeof(zone)) return(NULL); ! for (i = 0; i < (int)zlen; i++) zone[i] = (u_char)zip_toupper(znam[i]); zmcaddr[5] = (u_char)(chkSum(zone, zlen) % 253); *** support/ethertalk/bpfiltp.c.orig Wed Jun 28 23:39:38 1995 --- support/ethertalk/bpfiltp.c Tue Sep 24 23:55:39 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1995/06/28 13:39:17 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/support/ethertalk/RCS/bpfiltp.c,v 2.6 1995/06/28 13:39:17 djh Rel djh $"; ! static char revision[] = "$Revision: 2.6 $"; /* * bpfiltp.c - Simple "protocol" level interface to BPF --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/09/24 13:55:14 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/support/ethertalk/RCS/bpfiltp.c,v 2.8 1996/09/24 13:55:14 djh Rel djh $"; ! static char revision[] = "$Revision: 2.8 $"; /* * bpfiltp.c - Simple "protocol" level interface to BPF *************** *** 60,65 **** --- 60,76 ---- #define USE_SIOCGIFCONF #endif __NetBSD__ + #ifdef __FreeBSD__ + #define MULTI_BPF_PKT + #define USE_SIOCGIFCONF + #endif __FreeBSD__ + + #ifdef NeXT + #include + #define MULTI_BPF_PKT + #undef USE_SIOCGIFCONF + #endif NeXT + #ifdef USE_SIOCGIFCONF #include #include *************** *** 156,166 **** --- 167,183 ---- pi_close(edx) int edx; { + #ifdef MULTI_BPF_PKT + extern int read_buf_len; + #endif /* MULTI_BPF_PKT */ if (edx < 1 || edx > MAXOPENPROT || !ephlist[edx-1].inuse) return(-1); fdunlisten(ephlist[edx-1].fd); /* toss listener */ close(ephlist[edx-1].fd); ephlist[edx-1].inuse = 0; + #ifdef MULTI_BPF_PKT + read_buf_len = 0; + #endif /* MULTI_BPF_PKT */ return(0); } *************** *** 252,258 **** --- 269,338 ---- #ifdef PHASE2 /* * add a multicast address to the interface + * + */ + + #ifdef NeXT + + /* + * For NEXTSTEP 3.1 and later + * + * Multicast is controled through an enhanced version of BPF for NeXT. + * You can get it from "ftp.aa.ap.titech.ac.jp". (S.Adachi, 96/02/17) + * + * It was announced that NEXTSTEP (>=3.3) would officially support multicast. + * However, it does not actually work. + * */ + + #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ + #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ + + int + pi_addmulti(multi, ifr) + char *multi; + struct ifreq *ifr; + { + int s; + int i; + int failed = 0; + char enetd[256]; + + /* Prepare the interface request struct. */ + ifr->ifr_addr.sa_family = AF_UNSPEC; + bcopy(multi, ifr->ifr_addr.sa_data, EHRD); + + /* Open a bpf device. */ + for (i = 0; !failed ; i++) { + sprintf (enetd, "/dev/bpf%d", i); + if ((s = open (enetd, O_RDWR)) >= 0) + break; + /* if we get past the break, we got an error */ + if (errno != EBUSY) failed++; + } + if (failed) { + perror("open: /dev/bpfXX"); + return(-1); + } + + /* Attach the Ethernet device /dev/en0 to the BPF. */ + if (ioctl(s, BIOCSETIF, ifr) < 0) { + perror("ioctl: set interface"); + return(-1); + } + + /* Set the multicast address. */ + if (ioctl(s, SIOCADDMULTI, (caddr_t)ifr) < 0) { + perror("SIOCADDMULTI"); + close(s); + return(-1); + } + close(s); + return(0); + } + + #else /* NeXT */ + int pi_addmulti(multi, ifr) char *multi; *************** *** 278,283 **** --- 358,364 ---- close(sock); return(0); } + #endif /* NeXT */ #endif PHASE2 *** support/ethertalk/aarpd.c.orig Sun Apr 28 00:57:00 1996 --- support/ethertalk/aarpd.c Wed Sep 11 00:07:31 1996 *************** *** 16,22 **** #include #ifdef PHASE2 #include ! #if !defined(ultrix) && !defined(__osf__) && !defined(__386BSD__) && !defined(__FreeBSD__) && !defined(__bsdi__) #include #endif /* ultrix && __osf__ && __386BSD__ && __FreeBSD__ */ #include --- 16,22 ---- #include #ifdef PHASE2 #include ! #if !defined(ultrix) && !defined(__osf__) && !defined(__386BSD__) && !defined(__FreeBSD__) && !defined(__bsdi__) && !defined(NeXT) #include #endif /* ultrix && __osf__ && __386BSD__ && __FreeBSD__ */ #include *** support/ethertalk/aarpd_clnt.c.orig Mon Oct 10 18:55:19 1994 --- support/ethertalk/aarpd_clnt.c Wed Jun 19 13:56:38 1996 *************** *** 33,39 **** static etheraddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, AARP_RESOLVE, xdr_int, (caddr_t)argp, ! xdr_etheraddr, res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); --- 33,39 ---- static etheraddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, AARP_RESOLVE, xdr_int, (caddr_t)argp, ! xdr_etheraddr, (char *)res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); *************** *** 51,57 **** static bridgeaddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, RTMP_GETBADDR, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); --- 51,57 ---- static bridgeaddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, RTMP_GETBADDR, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, (char *)res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); *************** *** 69,75 **** static bridgeaddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, RTMP_SETBADDR, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); --- 69,75 ---- static bridgeaddr res; bzero((char *)res, sizeof(res)); if (clnt_call(clnt, RTMP_SETBADDR, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, (char *)res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); *************** *** 88,94 **** static bridgeaddr res; /* convenient size */ bzero((char *)res, sizeof(res)); if (clnt_call(clnt, NET_RANGE_SET, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); --- 88,94 ---- static bridgeaddr res; /* convenient size */ bzero((char *)res, sizeof(res)); if (clnt_call(clnt, NET_RANGE_SET, xdr_int, (caddr_t)argp, ! xdr_bridgeaddr, (char *)res, TIMEOUT) != RPC_SUCCESS) { return (NULL); } return (res); *** applications/aufs/afps.h.orig Wed May 1 00:41:30 1996 --- applications/aufs/afps.h Wed Jun 19 14:04:43 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 14:41:04 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afps.h,v 2.10 1996/04/30 14:41:04 djh Rel djh $ ! * $Revision: 2.10 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:04:29 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afps.h,v 2.11 1996/06/19 04:04:29 djh Rel djh $ ! * $Revision: 2.11 $ * */ *************** *** 193,201 **** /* Portable library functions */ ! #if (!(defined(AIX) || defined(hpux))) char *malloc(),*strcpy(),*strcat(),*realloc(); ! #endif /* AIX || hpux */ /* defined here so that enumerate can skip these entries when reading dirs */ --- 193,201 ---- /* Portable library functions */ ! #if (!(defined(AIX) || defined(hpux) || defined(SOLARIS))) char *malloc(),*strcpy(),*strcat(),*realloc(); ! #endif /* AIX || hpux || SOLARIS */ /* defined here so that enumerate can skip these entries when reading dirs */ *** applications/aufs/aufs.c.orig Tue Apr 30 23:59:28 1996 --- applications/aufs/aufs.c Thu Sep 12 15:12:14 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 13:59:00 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/aufs.c,v 2.33 1996/04/30 13:59:00 djh Rel djh $ ! * $Revision: 2.33 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/09/12 05:11:59 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/aufs.c,v 2.34 1996/09/12 05:11:59 djh Rel djh $ ! * $Revision: 2.34 $ * */ *************** *** 607,612 **** --- 607,615 ---- } } #endif TIOCNOTTY + #ifdef linux + (void) setsid(); + #endif linux #ifdef xenix5 /* * USG process groups: *************** *** 1444,1449 **** --- 1447,1453 ---- { void dying(); + signal(SIGTERM, SIG_IGN); if (minutes_to_shutdown >= 0) /* already in shutdown mode */ return; logit(0,"Superior told us to shutdown by time -- initiating 5 minute shutdown"); *************** *** 1479,1485 **** --- 1483,1493 ---- signal (SIGHUP, SIG_IGN); logit(0,"Parent received SIGHUP -- immediate shutdown"); + #ifdef linux + killlist(SIGHUP); + #else linux killpg (parent_pid, SIGHUP); + #endif linux if ((err = SrvrShutdown(&srvr_entity_name)) != noErr) logit(0,"NBPRemove failed: code %d\n", err); exit(0); *************** *** 1498,1504 **** --- 1506,1516 ---- #endif REREAD_AFPVOLS signal (SIGTERM, SIG_IGN); logit(0,"Shutdown by time -- initiating 5 minute shutdown"); + #ifdef linux + killlist(SIGTERM); + #else linux killpg (parent_pid, SIGTERM); + #endif linux minutes_to_shutdown = 4; /* in case children get blocked up */ signal(SIGALRM, killinn); *************** *** 1515,1521 **** --- 1527,1537 ---- return; if (!minutes_to_shutdown) killnow(); + #ifdef linux + killlist(SIGTERM); + #else linux killpg (parent_pid, SIGTERM); /* in case inferior was blocked up */ + #endif linux signal(SIGALRM, killinn); minutes_to_shutdown--; alarm(60); *************** *** 1530,1540 **** --- 1546,1578 ---- { signal(SIGURG, SIG_IGN); logit(0, "Server Message available -- notifying clients"); + #ifdef linux + killlist(SIGURG); + #else linux killpg(parent_pid, SIGURG); + #endif linux signal(SIGURG, msgnotify); return; } + #ifdef linux + /* + * send specified signal to child processes + * (process groups appear to be broken) + * + */ + killlist(sig) + int sig; + { + int i; + struct cno_to_pid *cp; + + for (i = 0, cp = ctp_tab; i < maxsess; i++, cp++) + if (cp->state == CP_RUNNING) + kill(cp->pid, sig); + return; + } + #endif /* linux */ #endif /* NOSHUTDOWNCODE */ #ifdef REREAD_AFPVOLS *** applications/aufs/afpdt.c.orig Mon Jun 26 15:58:02 1995 --- applications/aufs/afpdt.c Wed Jun 19 14:29:23 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/06/26 05:57:53 $ ! * $Header: /local/mulga/mac/src/cap60/applications/aufs/RCS/afpdt.c,v 2.13 1995/06/26 05:57:53 djh Rel djh $ ! * $Revision: 2.13 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:29:14 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpdt.c,v 2.15 1996/06/19 04:29:14 djh Rel djh $ ! * $Revision: 2.15 $ * */ *************** *** 55,60 **** --- 55,63 ---- #ifdef SOLARIS #include #endif SOLARIS + #ifdef linux + #include + #endif linux #include #include #include "afpntoh.h" *************** *** 500,506 **** else fprintf(dbg, "\tUPath: \n", err); fprintf(dbg, "\tComnt: (len %d) \"", *adc.adc_comment); ! for (i = 0; i < *adc.adc_comment; i++) fprintf(dbg, "%c", *(adc.adc_comment+i+1)); fprintf(dbg, "\"\n"); fflush(dbg); --- 503,509 ---- else fprintf(dbg, "\tUPath: \n", err); fprintf(dbg, "\tComnt: (len %d) \"", *adc.adc_comment); ! for (i = 0; i < (int)*adc.adc_comment; i++) fprintf(dbg, "%c", *(adc.adc_comment+i+1)); fprintf(dbg, "\"\n"); fflush(dbg); *** applications/aufs/afpdir.c.orig Thu Apr 25 11:32:10 1996 --- applications/aufs/afpdir.c Wed Jun 19 14:26:35 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/25 01:32:00 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpdir.c,v 2.7 1996/04/25 01:32:00 djh Rel djh $ ! * $Revision: 2.7 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:26:25 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpdir.c,v 2.8 1996/06/19 04:26:25 djh Rel djh $ ! * $Revision: 2.8 $ * */ *************** *** 756,762 **** fprintf(dbg, "\t Long Name: \""); offset = get2(r); q = p + offset; ! for (j = 0; j < *q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; --- 756,762 ---- fprintf(dbg, "\t Long Name: \""); offset = get2(r); q = p + offset; ! for (j = 0; j < (int)*q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; *************** *** 766,772 **** fprintf(dbg, "\tShort Name: "); offset = get2(r); q = p + offset; ! for (j = 0; j < *q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; --- 766,772 ---- fprintf(dbg, "\tShort Name: "); offset = get2(r); q = p + offset; ! for (j = 0; j < (int)*q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; *** applications/aufs/afpfile.c.orig Mon Apr 29 18:22:25 1996 --- applications/aufs/afpfile.c Wed Jun 19 14:20:21 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/29 08:21:55 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpfile.c,v 2.9 1996/04/29 08:21:55 djh Rel djh $ ! * $Revision: 2.9 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:20:09 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpfile.c,v 2.11 1996/06/19 04:20:09 djh Rel djh $ ! * $Revision: 2.11 $ * */ *************** *** 241,246 **** --- 241,247 ---- #ifdef DEBUG_AFP_CMD if (dbg != NULL) { + void dbg_print_bmap(); fprintf(dbg, "\tVolID: %04x\n", rid.rid_volid); fprintf(dbg, "\tFilID: %04x\n", rid.rid_fileid); fprintf(dbg, "\tFBMap: %04x\t", rid.rid_fbitmap); *************** *** 615,621 **** /* where should this be done if not here? */ #ifdef SHORT_NAMES if ((mov.mov_newtype != 0x2) && (mov.mov_newname[0]!= '\0')) { ! for (i = 1; i <= mov.mov_newname[0]; i++) tempfile[i-1] = mov.mov_newname[i]; tempfile[mov.mov_newname[0]] = '\0'; if (DBFIL) --- 616,622 ---- /* where should this be done if not here? */ #ifdef SHORT_NAMES if ((mov.mov_newtype != 0x2) && (mov.mov_newname[0]!= '\0')) { ! for (i = 1; i <= (int)mov.mov_newname[0]; i++) tempfile[i-1] = mov.mov_newname[i]; tempfile[mov.mov_newname[0]] = '\0'; if (DBFIL) *** applications/aufs/afpidlist.c.orig Mon Apr 29 17:00:42 1996 --- applications/aufs/afpidlist.c Tue Jun 18 20:49:44 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/29 07:00:27 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidlist.c,v 2.2 1996/04/29 07:00:27 djh Rel djh $ ! * $Revision: 2.2 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:49:40 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidlist.c,v 2.3 1996/06/18 10:49:40 djh Rel djh $ ! * $Revision: 2.3 $ * */ *************** *** 40,46 **** --- 40,50 ---- strcpy(me, ""); key = num_datum(id); + #ifdef USE_GDBM + data = gdbm_fetch(db, key); + #else /* USE_GDBM */ data = dbm_fetch(db, key); + #endif /* USE_GDBM */ if (data.dptr == NULL) { printf("**Error** id %d not found (prefix '%s')\n", id, prefix); *************** *** 61,66 **** --- 65,74 ---- } children = copy_children(children, num_children); + + #ifdef USE_GDBM + free(data.dptr); + #endif /* USE_GDBM */ for (i = 0; i < num_children; i++) print_tree(children[i], me); *** applications/aufs/afpidtool.c.orig Sat Apr 27 22:29:30 1996 --- applications/aufs/afpidtool.c Wed Jun 19 20:51:43 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/27 12:27:36 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidtool.c,v 2.1 1996/04/27 12:27:36 djh Rel djh $ ! * $Revision: 2.1 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 10:51:19 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidtool.c,v 2.3 1996/06/19 10:51:19 djh Rel djh $ ! * $Revision: 2.3 $ * */ *************** *** 18,24 **** #include #include #include ! #include #include "../../lib/afp/afpidaufs.h" --- 18,28 ---- #include #include #include ! #ifdef USESTRINGDOTH ! # include ! #else USESTRINGDOTH ! # include ! #endif USESTRINGDOTH #include "../../lib/afp/afpidaufs.h" *************** *** 71,77 **** --- 75,85 ---- char *ptr; if (path[0] == '\0') + #ifdef SOLARIS + getcwd(fullPath, MAXPATHLEN); + #else /* SOLARIS */ getwd(fullPath); + #endif /* SOLARIS */ else if (is_directory(path)) getcdwd(path, fullPath); *** applications/aufs/afpidsrvr.c.orig Wed May 1 01:26:24 1996 --- applications/aufs/afpidsrvr.c Wed Jun 19 20:32:25 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 15:25:51 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidsrvr.c,v 2.3 1996/04/30 15:25:51 djh Rel djh $ ! * $Revision: 2.3 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 10:32:13 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpidsrvr.c,v 2.5 1996/06/19 10:32:13 djh Rel djh $ ! * $Revision: 2.5 $ * */ *************** *** 25,33 **** #include #include #include #include #include ! #include #include "../../lib/afp/afpidaufs.h" --- 25,41 ---- #include #include #include + #ifdef USE_GDBM + #include + #else /* USE_GDBM */ #include + #endif /* USE_GDBM */ #include ! #ifdef USESTRINGDOTH ! # include ! #else USESTRINGDOTH ! # include ! #endif USESTRINGDOTH #include "../../lib/afp/afpidaufs.h" *************** *** 61,68 **** --- 69,81 ---- perror(""); } else putc('\n', stderr); + #ifdef USE_GDBM + if (db != NULL) + gdbm_close(db); + #else /* USE_GDBM */ if (db != NULL) dbm_close(db); + #endif /* USE_GDBM */ if (bound_queries) unlink(aufsSockname); exit(-1); *************** *** 80,87 **** --- 93,105 ---- clean_exit(n) int n; { + #ifdef USE_GDBM + if (db != NULL) + gdbm_close(db); + #else /* USE_GDBM */ if (db != NULL) dbm_close(db); + #endif /* USE_GDBM */ if (bound_queries) unlink(aufsSockname); exit(n); *************** *** 148,153 **** --- 166,176 ---- clean_entries(); while (continue_clean); + #ifdef USE_GDBM + gdbm_close(db); + db = NULL; + #endif /* USE_GDBM */ + { time_t now; *************** *** 179,189 **** fatal2("Problem binding socket ", aufsSockname); bound_queries = 1; if (listen(queries, 5) < 0) fatal("Listen"); } ! int do_exit() { clean_exit(-1); } --- 202,219 ---- fatal2("Problem binding socket ", aufsSockname); bound_queries = 1; + #ifdef linux + chmod(aufsSockname, 0666); + #endif /* linux */ + if (listen(queries, 5) < 0) fatal("Listen"); + + return; } ! void ! do_exit() { clean_exit(-1); } *************** *** 210,229 **** --- 240,274 ---- datum initial_key, initial; datum root, root_datum; + #ifdef USE_GDBM + if ((db = gdbm_open(aufsDbName, 2048, GDBM_WRCREAT, 0644, 0L)) == NULL) + fatal("Creating db"); + #else /* USE_GDBM */ if ((db = dbm_open(aufsDbName, O_RDWR|O_CREAT, 0644)) == NULL) fatal("Creating db"); + #endif /* USE_GDBM */ rootEid = valid_id(); /* any will do */ root_datum = new_entry(aufsRootName, (sdword)0); root = num_datum(rootEid); + #ifdef USE_GDBM + if (gdbm_store(db, root, root_datum, GDBM_REPLACE) < 0) + fatal("Writing root record"); + #else /* USE_GDBM */ if (dbm_store(db, root, root_datum, DBM_REPLACE) < 0) fatal("Writing root record"); + #endif /* USE_GDBM */ initial_key.dptr = "I"; initial_key.dsize = strlen(initial_key.dptr); initial = create_init(aufsDbVersion, rootEid); + #ifdef USE_GDBM + if (gdbm_store(db, initial_key, initial, GDBM_REPLACE) < 0) + fatal("Writing root record"); + #else /* USE_GDBM */ if (dbm_store(db, initial_key, initial, DBM_REPLACE) < 0) fatal("Writing root record"); + #endif /* USE_GDBM */ flush_database(); } *************** *** 238,256 **** --- 283,315 ---- initial_key.dptr = "I"; initial_key.dsize = strlen(initial_key.dptr); + #ifdef USE_GDBM + db = gdbm_open(aufsDbName, 2048, GDBM_READER, 0644, 0L); + #else /* USE_GDBM */ db = dbm_open(aufsDbName, O_RDWR, 0644); + #endif /* USE_GDBM */ if (db == NULL && errno == ENOENT) create_database(); if (db == NULL) fatal("Opening db"); + #ifdef USE_GDBM + initial = gdbm_fetch(db, initial_key); + #else /* USE_GDBM */ initial = dbm_fetch(db, initial_key); + #endif /* USE_GDBM */ if (initial.dptr == NULL) fatal("Suspect Database"); if (extract_init(initial, &version, &rootEid) < 0) fatal("Problem with initial record"); if (strcmp(version, aufsDbVersion) != 0) fatal2("Incompatible d/b, can't deal with version ", version); + + #ifdef USE_GDBM + free(initial.dptr); + #endif /* USE_GDBM */ + + return; } void *************** *** 265,270 **** --- 324,331 ---- if ((ret = lookup_path(entry, NULL, NULL, 1)) <= 0) fprintf(stderr, "Failed to create '%s' (%d, %d)\n", entry, ret, errno); + + return; } void *************** *** 292,297 **** --- 353,360 ---- if (!is_directory(entry)) /* check existance in restrospect! */ delete_entry_id(id); flush_database(); + + return; } void *************** *** 312,317 **** --- 375,382 ---- if (!is_file(entry)) /* check existance in restrospect! */ delete_entry_id(id); flush_database(); + + return; } void *************** *** 330,335 **** --- 395,402 ---- delete_child(parent, id); flush_database(); } + + return; } void *************** *** 351,356 **** --- 418,425 ---- do_delete_entry(id); delete_child(parent, id); flush_database(); + + return; } void *************** *** 372,377 **** --- 441,448 ---- do_delete_entry(id); delete_child(parent, id); flush_database(); + + return; } void *************** *** 429,434 **** --- 500,507 ---- data = modify_name(data, new_name); store_datum(id, data, DBM_REPLACE); flush_database(); + + return; } void *************** *** 471,476 **** --- 544,551 ---- delete_entry_id(id); /* does not actually exist */ else flush_database(); + + return; } void *************** *** 504,509 **** --- 579,586 ---- delete_entry_id(id); /* does not actually exist */ } else flush_database(); + + return; } void *************** *** 525,530 **** --- 602,609 ---- delete_entry_id(id); /* does not actually exist */ else flush_database(); + + return; } void *************** *** 532,537 **** --- 611,618 ---- { /* currently no-op */ continue_clean = 0; + + return; } void *************** *** 656,665 **** fprintf(stderr, "Bad command '%s'\n", buff); close(sock); } } /* ! * disconnect code from aufs itself * */ --- 737,748 ---- fprintf(stderr, "Bad command '%s'\n", buff); close(sock); } + + return; } /* ! * disassociate * */ *************** *** 729,738 **** --- 812,825 ---- void flush_database() { + #ifndef USE_GDBM extern void open_database( /* void */ ); dbm_close(db); open_database(); + #endif /* USE_GDBM */ + + return; } #else FIXED_DIRIDS #include *** applications/aufs/afpserver.c.orig Wed May 1 02:21:13 1996 --- applications/aufs/afpserver.c Wed Jun 19 14:23:50 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 16:20:46 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpserver.c,v 2.16 1996/04/30 16:20:46 djh Rel djh $ ! * $Revision: 2.16 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:23:36 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpserver.c,v 2.17 1996/06/19 04:23:36 djh Rel djh $ ! * $Revision: 2.17 $ * */ *************** *** 1449,1455 **** if (dbg != NULL) { fprintf(dbg, "%s \"", str); ! for (i = 0; i < *nam; i++) fprintf(dbg, "%c", *(nam+i+1)); fprintf(dbg, "\"\n"); } --- 1449,1455 ---- if (dbg != NULL) { fprintf(dbg, "%s \"", str); ! for (i = 0; i < (int)*nam; i++) fprintf(dbg, "%c", *(nam+i+1)); fprintf(dbg, "\"\n"); } *** applications/aufs/afpos.c.orig Fri Apr 26 01:05:35 1996 --- applications/aufs/afpos.c Wed Sep 11 00:30:17 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/25 15:05:22 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.78 1996/04/25 15:05:22 djh Rel djh $ ! * $Revision: 2.78 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/09/10 14:30:03 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpos.c,v 2.80 1996/09/10 14:30:03 djh Rel djh $ ! * $Revision: 2.80 $ * */ *************** *** 165,170 **** --- 165,174 ---- #include #endif /* __BSD_4_4__ */ + #ifdef linux + #include + #endif /* linux */ + #ifdef NeXT #undef USEQUOTA #undef USESUNQUOTA *************** *** 4668,4678 **** --- 4672,4692 ---- /* or */ /* (b) signaled (0x7f != 0) */ /* (c) coredumped (0x80 != 0) */ + #if defined(WIFSTOPPED) && defined(WIFSIGNALED) && defined(W_COREDUMP) + if (WIFSTOPPED(status) || WIFSIGNALED(status) || (W_COREDUMP(status) != 0)) + return(aeAccessDenied); /* oh well */ + #else /* WIFSTOPPED && WIFSIGNALED && W_COREDUMP */ if ((status & 0xff) != 0) return(aeAccessDenied); /* oh well */ + #endif/* WIFSTOPPED && WIFSIGNALED && W_COREDUMP */ /* retcode is leftmost 8 bits */ + #ifdef W_RETCODE + if (W_RETCODE(status) != 0) + return(aeAccessDenied); /* oh well */ + #else /* W_RETCODE */ if ((status>>8) != 0) return(aeAccessDenied); /* oh well */ + #endif /* W_RETCODE */ return(noErr); } #endif USECHOWN *** applications/aufs/afpvols.c.orig Mon Jun 26 16:27:15 1995 --- applications/aufs/afpvols.c Wed Jun 19 14:16:40 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/06/26 06:26:55 $ ! * $Header: /local/mulga/mac/src/cap60/applications/aufs/RCS/afpvols.c,v 2.17 1995/06/26 06:26:55 djh Rel djh $ ! * $Revision: 2.17 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/19 04:16:30 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afpvols.c,v 2.18 1996/06/19 04:16:30 djh Rel djh $ ! * $Revision: 2.18 $ * */ *************** *** 962,968 **** fprintf(dbg, "\tVolume Nam: \""); offset = get2(r); q = p + offset; ! for (j = 0; j < *q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; --- 962,968 ---- fprintf(dbg, "\tVolume Nam: \""); offset = get2(r); q = p + offset; ! for (j = 0; j < (int)*q; j++) fprintf(dbg, "%c", *(q+j+1)); fprintf(dbg, "\"\n"); rl -= 2; *** applications/aufs/afposenum.c.orig Mon Jun 19 11:32:36 1995 --- applications/aufs/afposenum.c Tue Jun 18 20:49:49 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/06/19 01:32:20 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afposenum.c,v 2.14 1995/06/19 01:32:20 djh Rel djh $ ! * $Revision: 2.14 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:49:40 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/afposenum.c,v 2.15 1996/06/18 10:49:40 djh Rel djh $ ! * $Revision: 2.15 $ * */ *************** *** 56,61 **** --- 56,64 ---- #ifdef SOLARIS # include #endif /* SOLARIS */ + #ifdef linux + # include + #endif /* linux */ #ifdef DISTRIB_PASSWDS #include #endif /* DISTRIB_PASSWDS */ *** applications/aufs/aufsicon.c.orig Wed Jun 21 16:31:42 1995 --- applications/aufs/aufsicon.c Tue Jun 18 20:49:51 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1995/06/21 06:31:26 $ ! * $Header: /local/mulga/mac/src/cap60/applications/aufs/RCS/aufsicon.c,v 2.8 1995/06/21 06:31:26 djh rel djh $ ! * $Revision: 2.8 $ */ /* --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/06/18 10:49:40 $ ! * $Header: /mac/src/cap60/applications/aufs/RCS/aufsicon.c,v 2.9 1996/06/18 10:49:40 djh Rel djh $ ! * $Revision: 2.9 $ */ /* *************** *** 38,43 **** --- 38,45 ---- * * The "4.3BSD System Daemon" is Copyright (c) 1988 Kirk Mckusick, UC. * + * The "Penguin with scarf" icon is Copyright (c) 1996 David Hornsby. + * * In general, there are two version of each ICON. The first is the * normal "network platter" representation, the second the usual CAP * "network folder" version. Define PLATTER_ICON for the former. To *************** *** 117,123 **** #endif ultrix #endif USE_ALT_ICONS ! #define NUM_ICONS 16 /* default for System V */ --- 119,125 ---- #endif ultrix #endif USE_ALT_ICONS ! #define NUM_ICONS 17 /* default for System V */ *************** *** 127,132 **** --- 129,142 ---- #endif SYSTYPE_SYSV #endif INDEX + /* default for Linux */ + + #ifndef INDEX + #ifdef linux + #define INDEX 16 + #endif linux + #endif INDEX + /* default "BSD Daemon" */ #ifndef INDEX *************** *** 2095,2100 **** --- 2105,2177 ---- 0xff, 0xff, 0xff, 0x8f, /* XXXXXXXXXXXXXXXXXXXXXXXXX XXXX */ #endif PLATTER_ICON + /* ICON 16, default Linux */ + /* ICON */ + 0x00, 0x00, 0x00, 0x00, /* */ + 0x00, 0x00, 0x0f, 0xc0, /* XXXXXX */ + 0x00, 0x00, 0x3f, 0xe0, /* XXXXXXXXX */ + 0x00, 0x00, 0xff, 0xf0, /* XXXXXXXXXXXX */ + 0x00, 0x07, 0xe1, 0xf0, /* XXXXXX XXXXX */ + 0x00, 0x03, 0xcc, 0xf8, /* XXXX XX XXXXX */ + 0x00, 0x00, 0xcc, 0xf8, /* XX XX XXXXX */ + 0x00, 0x00, 0x21, 0xf8, /* X XXXXXX */ + 0x00, 0x00, 0x21, 0xf8, /* X XXXXXX */ + 0x00, 0x00, 0x17, 0xf0, /* X XXXXXXX */ + 0x00, 0x00, 0x3f, 0xf8, /* XXXXXXXXXXX */ + 0x00, 0x00, 0x62, 0x28, /* XX X X X */ + 0x00, 0x00, 0x3f, 0xfc, /* XXXXXXXXXXXX */ + 0x78, 0x00, 0x4f, 0xea, /* XXXX X XXXXXXX X X */ + 0x84, 0x3f, 0xff, 0xfe, /* X X XXXXXXXXXXXXXXXXXXXXX */ + 0xff, 0xff, 0xff, 0xf7, /* XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX */ + 0x80, 0x17, 0xff, 0xfa, /* X X XXXXXXXXXXXXXXXX X */ + 0x81, 0x11, 0xff, 0xf9, /* X X X XXXXXXXXXXXXXX X */ + 0x82, 0x10, 0x8f, 0xf8, /* X X X X XXXXXXXXX */ + 0x84, 0x10, 0x8f, 0xf8, /* X X X X XXXXXXXXX */ + 0x88, 0x10, 0x8f, 0xf8, /* X X X X XXXXXXXXX */ + 0x92, 0x90, 0x8f, 0xf8, /* X X X X X X XXXXXXXXX */ + 0x80, 0x10, 0x8f, 0xf8, /* X X X XXXXXXXXX */ + 0xff, 0xf0, 0x8f, 0xf8, /* XXXXXXXXXXXX X XXXXXXXXX */ + 0x05, 0x00, 0x4f, 0xf8, /* X X X XXXXXXXXX */ + 0x0f, 0x80, 0x47, 0xf8, /* XXXXX X XXXXXXXX */ + 0x08, 0x80, 0x23, 0xf0, /* X X X XXXXXX */ + 0x0f, 0x80, 0x7f, 0xe0, /* XXXXX XXXXXXXXXX */ + 0x0a, 0x81, 0xff, 0xf0, /* X X X XXXXXXXXXXXXX */ + 0xf2, 0x7f, 0xff, 0xff, /* XXXX X XXXXXXXXXXXXXXXXXXXXXXX */ + 0x05, 0x00, 0x00, 0x00, /* X X */ + 0xf8, 0xff, 0xff, 0xff, /* XXXXX XXXXXXXXXXXXXXXXXXXXXXXX */ + /* MASK */ + 0x00, 0x00, 0x00, 0x00, /* */ + 0x00, 0x00, 0x0f, 0xc0, /* XXXXXX */ + 0x00, 0x00, 0x3f, 0xe0, /* XXXXXXXXX */ + 0x00, 0x00, 0xff, 0xf0, /* XXXXXXXXXXXX */ + 0x00, 0x07, 0xff, 0xf0, /* XXXXXXXXXXXXXXX */ + 0x00, 0x03, 0xff, 0xf8, /* XXXXXXXXXXXXXXX */ + 0x00, 0x00, 0xff, 0xf8, /* XXXXXXXXXXXXX */ + 0x00, 0x00, 0x3f, 0xf8, /* XXXXXXXXXXX */ + 0x00, 0x00, 0x3f, 0xf8, /* XXXXXXXXXXX */ + 0x00, 0x00, 0x1f, 0xf0, /* XXXXXXXXX */ + 0x00, 0x00, 0x3f, 0xf8, /* XXXXXXXXXXX */ + 0x00, 0x00, 0x7f, 0xf8, /* XXXXXXXXXXXX */ + 0x00, 0x00, 0x3f, 0xfc, /* XXXXXXXXXXXX */ + 0x78, 0x00, 0x7f, 0xfe, /* XXXX XXXXXXXXXXXXXX */ + 0xfc, 0x3f, 0xff, 0xfe, /* XXXXXX XXXXXXXXXXXXXXXXXXXXX */ + 0xff, 0xff, 0xff, 0xff, /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ + 0xff, 0xf7, 0xff, 0xfa, /* XXXXXXXXXXXX XXXXXXXXXXXXXXXX X */ + 0xff, 0xf1, 0xff, 0xf9, /* XXXXXXXXXXXX XXXXXXXXXXXXXX X */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0xff, 0xf0, 0xff, 0xf8, /* XXXXXXXXXXXX XXXXXXXXXXXXX */ + 0x07, 0x00, 0x7f, 0xf8, /* XXX XXXXXXXXXXXX */ + 0x0f, 0x80, 0x7f, 0xf8, /* XXXXX XXXXXXXXXXXX */ + 0x0f, 0x80, 0x3f, 0xf0, /* XXXXX XXXXXXXXXX */ + 0x0f, 0x80, 0x7f, 0xe0, /* XXXXX XXXXXXXXXX */ + 0x0a, 0x81, 0xff, 0xf0, /* X X X XXXXXXXXXXXXX */ + 0xf2, 0x7f, 0xff, 0xff, /* XXXX X XXXXXXXXXXXXXXXXXXXXXXX */ + 0x05, 0x00, 0x00, 0x00, /* X X */ + 0xf8, 0xff, 0xff, 0xff /* XXXXX XXXXXXXXXXXXXXXXXXXXXXXX */ }; export int aufsiconsize = ICONSIZE; *** applications/lwsrv/lwsrv.c.orig Thu Mar 7 21:28:32 1996 --- applications/lwsrv/lwsrv.c Tue Sep 10 23:56:50 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1996/03/07 10:28:16 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.45 1996/03/07 10:28:16 djh Rel djh $"; ! static char revision[] = "$Revision: 2.45 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/09/10 13:56:31 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrv.c,v 2.47 1996/09/10 13:56:31 djh Rel djh $"; ! static char revision[] = "$Revision: 2.47 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 160,165 **** --- 160,167 ---- # define TEMPFILE "/tmp/lwsrvXXXXXX" /* temporary file holds job */ #endif TEMPFILE + private char *tmpfiledir = NULL; + #define RFLOWQ atpMaxNum #define BUFMAX (PAPSegSize*RFLOWQ)+10 *************** *** 337,342 **** --- 339,345 ---- fprintf(stderr,"\t-f* contains an font coordination list.\n"); fprintf(stderr,"\t-t stores session and appledict in\n"); fprintf(stderr,"\t without printing.\n"); + fprintf(stderr,"\t-F directory to store temporary files\n"); fprintf(stderr,"\t-l specifies a file to log the %s session\n", myname); #ifdef LWSRV8 *************** *** 443,449 **** } #ifdef LWSRV8 ! static char optlist[64] = "a:f:l:p:t:d:n:krehNT:A:C:Svq:"; private void lwsrv_init(name) --- 446,452 ---- } #ifdef LWSRV8 ! static char optlist[64] = "a:f:l:p:t:d:n:krehNT:A:C:F:Svq:"; private void lwsrv_init(name) *************** *** 603,608 **** --- 606,614 ---- prtp->prttype = optarg; break; #endif LW_TYPE + case 'F': + tmpfiledir = optarg; + break; case 'N': prtp->capture = FALSE; break; *************** *** 671,677 **** extern char *optarg; extern int optind; extern boolean dochecksum; ! static char optlist[64] = "a:f:l:p:t:d:n:krehNT:A:C:Sv"; #ifdef ISO_TRANSLATE void cISO2Mac(); #endif ISO_TRANSLATE --- 677,683 ---- extern char *optarg; extern int optind; extern boolean dochecksum; ! static char optlist[64] = "a:f:l:p:t:d:n:krehNT:A:C:F:Sv"; #ifdef ISO_TRANSLATE void cISO2Mac(); #endif ISO_TRANSLATE *************** *** 782,787 **** --- 788,796 ---- dont_parse = TRUE; break; #endif DONT_PARSE + case 'F': + tmpfiledir = optarg; + break; case 'N': capture = FALSE; break; *************** *** 1294,1299 **** --- 1303,1309 ---- prtno = 0; while (TRUE) { openlogfile(); + NewStatus("idle"); /* scan each printer in turn, processing each one as "normal" if there * is work available. If no work was available then abSleep for a while *************** *** 1915,1921 **** #endif aux chmod(tname, 0644); } else { /* otherwise use a temp file */ ! strcpy(tname,TEMPFILE); mktemp(tname); if ((outfile = fopen(tname, "w+")) == NULL) perror(tname); --- 1925,1935 ---- #endif aux chmod(tname, 0644); } else { /* otherwise use a temp file */ ! if (tmpfiledir != NULL) { ! strcpy(tname,tmpfiledir); ! strcat(tname,"/lwsrvXXXXXX"); ! } else ! strcpy(tname,TEMPFILE); mktemp(tname); if ((outfile = fopen(tname, "w+")) == NULL) perror(tname); *************** *** 2337,2343 **** if (tracefile != NULL) /* is this a trace? */ strcpy(tname,tracefile); /* yes... then output is tracefile */ else { /* otherwise use a temp file */ ! strcpy(tname,TEMPFILE); mktemp(tname); } --- 2351,2361 ---- if (tracefile != NULL) /* is this a trace? */ strcpy(tname,tracefile); /* yes... then output is tracefile */ else { /* otherwise use a temp file */ ! if (tmpfiledir != NULL) { ! strcpy(tname,tmpfiledir); ! strcat(tname,"/lwsrvXXXXXX"); ! } else ! strcat(tname,TEMPFILE); mktemp(tname); } *** applications/lwsrv/lwsrvconfig.c.orig Thu Aug 31 00:47:47 1995 --- applications/lwsrv/lwsrvconfig.c Wed Sep 11 00:33:12 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1995/08/30 14:47:34 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrvconfig.c,v 2.1 1995/08/30 14:47:34 djh Rel djh $"; ! static char revision[] = "$Revision: 2.1 $"; /* * lwsrvconfig - auxiliary program for testing configuration files --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/09/10 14:33:00 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/lwsrvconfig.c,v 2.3 1996/09/10 14:33:00 djh Rel djh $"; ! static char revision[] = "$Revision: 2.3 $"; /* * lwsrvconfig - auxiliary program for testing configuration files *************** *** 668,674 **** return(sp); } ! #if (!(defined(SOLARIS) || defined(bsdi) || defined(__NetBSD__))) char * strdup(str) char *str; --- 668,674 ---- return(sp); } ! #if (!(defined(SOLARIS)||defined(bsdi)||defined(__NetBSD__)||defined(__FreeBSD__)||defined(linux))) char * strdup(str) char *str; *** applications/lwsrv/procset.c.orig Wed Aug 30 18:14:08 1995 --- applications/lwsrv/procset.c Tue Jun 18 20:50:25 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1995/08/30 08:13:25 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/procset.c,v 2.12 1995/08/30 08:13:25 djh Rel djh $"; ! static char revision[] = "$Revision: 2.12 $"; /* * procset - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/06/18 10:50:20 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/procset.c,v 2.13 1996/06/18 10:50:20 djh Rel djh $"; ! static char revision[] = "$Revision: 2.13 $"; /* * procset - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 48,53 **** --- 48,56 ---- #if defined(xenix5) || defined(SOLARIS) # include #endif /* xenix5 || SOLARIS */ + #ifdef linux + # include + #endif /* linux */ #ifdef LWSRV8 #include "list.h" *** applications/lwsrv/simple.c.orig Wed Aug 30 18:14:13 1995 --- applications/lwsrv/simple.c Tue Jun 18 20:50:28 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1995/08/30 08:13:25 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/simple.c,v 2.12 1995/08/30 08:13:25 djh Rel djh $"; ! static char revision[] = "$Revision: 2.12 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/06/18 10:50:20 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/simple.c,v 2.13 1996/06/18 10:50:20 djh Rel djh $"; ! static char revision[] = "$Revision: 2.13 $"; /* * lwsrv - UNIX AppleTalk spooling program: act as a laserwriter *************** *** 29,40 **** /* assume included by param.h */ # include #endif /* _TYPES */ - #include - #include - #include #ifdef LWSRV8 #include #endif /* LWSRV8 */ #ifdef USESTRINGDOTH # include --- 29,40 ---- /* assume included by param.h */ # include #endif /* _TYPES */ #ifdef LWSRV8 #include #endif /* LWSRV8 */ + #include + #include + #include #ifdef USESTRINGDOTH # include *** applications/lwsrv/DBfile.orig Mon Aug 28 20:38:52 1995 --- applications/lwsrv/DBfile Wed Sep 11 00:36:37 1996 *************** *** 15,20 **** --- 15,21 ---- FeatureQuery *ColorDevice Unknown; FeatureQuery *FreeVM '"2397046"'; FeatureQuery *Product '"(COMPAQ PAGEMARQ 15)"'; + Query Product '"(COMPAQ PAGEMARQ 15)"'; FeatureQuery *FaxSupport Base; Query ADORamSize '"10485760"'; ); *************** *** 24,29 **** --- 25,31 ---- FeatureQuery *PSVersion '"(47.0) 0"'; FeatureQuery *FreeVM '"2389815"'; FeatureQuery *Product '"(Dataproducts LZR 1260)"'; + Query Product '"(Dataproducts LZR 1260)"'; FeatureQuery *TTRasterizer Accept68K; Query ADORamSize '"4194304"'; ); *************** *** 48,53 **** --- 50,56 ---- FeatureQuery *PSVersion '"(23.0) 0"'; FeatureQuery *FreeVM '"173936"'; FeatureQuery *Product '"(LaserWriter)"'; + Query Product '"(LaserWriter)"'; Query ADORamSize '"2097152"'; ); *************** *** 56,61 **** --- 59,65 ---- FeatureQuery *PSVersion '"(47.0) 1"'; FeatureQuery *FreeVM '"434204"'; FeatureQuery *Product '"(LaserWriter II NT)"'; + Query Product '"(LaserWriter II NT)"'; FeatureQuery *TTRasterizer Accept68K; ); *************** *** 64,69 **** --- 68,74 ---- FeatureQuery *PSVersion '"(47.0) 1"'; FeatureQuery *FreeVM '"433810"'; FeatureQuery *Product '"(LaserWriter II NTX)"'; + Query Product '"(LaserWriter II NTX)"'; ); "LaserWriter IIf" = ( *************** *** 74,79 **** --- 79,85 ---- FeatureQuery *FreeVM '"2381689"'; FeatureQuery *TTRasterizer Type42; FeatureQuery *Product '"(LaserWriter IIf)"'; + Query Product '"(LaserWriter IIf)"'; Query ADORamSize '"8388608"'; ); *************** *** 82,87 **** --- 88,94 ---- FeatureQuery *PSVersion '"(2010.130) 2"'; FeatureQuery *FreeVM '"2150107"'; FeatureQuery *Product '"(LaserWriter IIg)"'; + Query Product '"(LaserWriter IIg)"'; ); "LaserWriter Plus" = ( *************** *** 126,131 **** --- 133,139 ---- FeatureQuery *PSVersion '"(42.2) 3"'; FeatureQuery *FreeVM '"172414"'; FeatureQuery *Product '"(LaserWriter Plus)"'; + Query Product '"(LaserWriter Plus)"'; ); "LaserWriter Pro 630" = ( *************** *** 133,138 **** --- 141,147 ---- FeatureQuery *PSVersion '"(2010.130) 1"'; FeatureQuery *FreeVM '"1698253"'; FeatureQuery *Product '"(LaserWriter Pro 630)"'; + Query Product '"(LaserWriter Pro 630)"'; FeatureQuery *?Resolution 600dpi; ); *************** *** 141,146 **** --- 150,156 ---- FeatureQuery *PSVersion '"(48.3) 19"'; FeatureQuery *FreeVM '"964599"'; FeatureQuery *Product '"(PrintServer 20)"'; + Query Product '"(PrintServer 20)"'; Query ADORamSize '"2621440"'; font ( AvantGarde-Book, *************** *** 180,185 **** --- 190,196 ---- FeatureQuery *PSVersion '"(52.4) 94"'; FeatureQuery *FreeVM '"336596"'; FeatureQuery *Product '"(QMS-PS 410)"'; + Query Product '"(QMS-PS 410)"'; font ( AGaramond-Bold, AGaramond-BoldItalic, *************** *** 235,240 **** --- 246,252 ---- FeatureQuery *FreeVM '"251597"'; FeatureQuery *TTRasterizer None; FeatureQuery *Product '"(Silentwriter 95)"'; + Query Product '"(Silentwriter 95)"'; Query ADORamSize '"2097152"'; ); *************** *** 244,249 **** --- 256,262 ---- FeatureQuery *PSVersion '"(52.3) 4.7"'; FeatureQuery *FreeVM '"2298400"'; FeatureQuery *Product '"(Varityper)"'; + Query Product '"(Varityper)"'; FeatureQuery *ColorDevice Unknown; Query ADORamSize '"16777212"'; ); *************** *** 253,258 **** --- 266,272 ---- FeatureQuery *PSVersion '"(3.010) 0"'; FeatureQuery *FreeVM '"1147258"'; FeatureQuery *Product '"(NeWS Server)"'; + Query Product '"(NeWS Server)"'; Query ADORamSize '"138936320"'; font ( AvantGarde-Book, *************** *** 313,316 **** --- 327,552 ---- ZapfChancery-MediumItalic, ZapfDingbats, ); + ); + + "OKI ML801PS" = ( + include "LaserWriter Plus"; + FeatureQuery *PSVersion '"(52.3) 0"'; + FeatureQuery *?Resolution 400dpi; + FeatureQuery *FreeVM '"3947324"'; + FeatureQuery *TTRasterizer Accept68K; + FeatureQuery *Product '"(ML801PS)"'; + Query Product '"(ML801PS)"'; + Query ADORamSize '"8388608"'; + font ( + Courier, + Courier-Bold, + Courier-BoldOblique, + Courier-Oblique, + Helvetica, + Helvetica-Bold, + Helvetica-BoldOblique, + Helvetica-Oblique, + Symbol, + Times-Bold, + Times-BoldItalic, + Times-Italic, + Times-Roman, + PCTimes-Roman, + PCHelvetica, + Mincho-PC-Hiragana, + Mincho-PC-Katakana, + NotDefFont, + Ryumin-Light-H, + Ryumin-Light-V, + Ryumin-Light-EUC-H, + Ryumin-Light-EUC-V, + Ryumin-Light-SuppA-H, + Ryumin-Light-SuppA-V, + Ryumin-Light-SuppB-HV, + Ryumin-Light-RKSJ-H, + Ryumin-Light-RKSJ-V, + Ryumin-Light-RKSJ-UserGaiji, + Ryumin-Light-83pv-SuppA-H, + Ryumin-Light-83pv-SuppB-H, + Ryumin-Light-83pv-RKSJ-H, + Ryumin-Light-NWP-H, + Ryumin-Light-NWP-V, + Ryumin-Light-Ext-H, + Ryumin-Light-Ext-V, + Ryumin-Light-Ext-SuppA-H, + Ryumin-Light-Ext-SuppA-V, + Ryumin-Light-Ext-SuppB-HV, + Ryumin-Light-Ext-RKSJ-H, + Ryumin-Light-Ext-RKSJ-V, + Ryumin-Light-Add-H, + Ryumin-Light-Add-V, + Ryumin-Light-Add-SuppA-H, + Ryumin-Light-Add-SuppA-V, + Ryumin-Light-Add-SuppB-HV, + Ryumin-Light-Add-RKSJ-H, + Ryumin-Light-Add-RKSJ-V, + GothicBBB-Medium-H, + GothicBBB-Medium-V, + GothicBBB-Medium-EUC-H, + GothicBBB-Medium-EUC-V, + GothicBBB-Medium-SuppA-H, + GothicBBB-Medium-SuppA-V, + GothicBBB-Medium-SuppB-HV, + GothicBBB-Medium-RKSJ-H, + GothicBBB-Medium-RKSJ-V, + GothicBBB-Medium-RKSJ-UserGaiji, + GothicBBB-Medium-83pv-SuppA-H, + GothicBBB-Medium-83pv-SuppB-H, + GothicBBB-Medium-83pv-RKSJ-H, + GothicBBB-Medium-NWP-H, + GothicBBB-Medium-NWP-V, + GothicBBB-Medium-Ext-H, + GothicBBB-Medium-Ext-V, + GothicBBB-Medium-Ext-SuppA-H, + GothicBBB-Medium-Ext-SuppA-V, + GothicBBB-Medium-Ext-SuppB-HV, + GothicBBB-Medium-Ext-RKSJ-H, + GothicBBB-Medium-Ext-RKSJ-V, + GothicBBB-Medium-Add-H, + GothicBBB-Medium-Add-V, + GothicBBB-Medium-Add-SuppA-H, + GothicBBB-Medium-Add-SuppA-V, + GothicBBB-Medium-Add-SuppB-HV, + GothicBBB-Medium-Add-RKSJ-H, + GothicBBB-Medium-Add-RKSJ-V, + Helvetica-Narrow, + Helvetica-Narrow-Bold, + Helvetica-Narrow-BoldOblique, + Helvetica-Narrow-Oblique, + Palatino-Bold, + Palatino-BoldItalic, + Palatino-Italic, + Palatino-Roman, + ZapfChancery-MediumItalic, + ZapfDingbats, + Bookman-Demi, + Bookman-DemiItalic, + Bookman-Light, + Bookman-LightItalic, + NewCenturySchlbk-Bold, + NewCenturySchlbk-BoldItalic, + NewCenturySchlbk-Italic, + NewCenturySchlbk-Roman, + AvantGarde-Book, + AvantGarde-BookOblique, + AvantGarde-Demi, + AvantGarde-DemiOblique, + ); + ); + + "EPSON LP-9000PS2" = ( + include "LaserWriter Plus"; + FeatureQuery *PSVersion '"(2014.107) 1"'; + FeatureQuery *?Resolution 600dpi; + FeatureQuery *FreeVM '"1880311"'; + FeatureQuery *TTRasterizer Type42; + FeatureQuery *Product '"(EPSON LP-9000PS2)"'; + Query Product '"(EPSON LP-9000PS2)"'; + Query ADORamSize '"11534336"'; + font ( + Courier, + Courier-Bold, + Courier-BoldOblique, + Courier-Oblique, + Helvetica, + Helvetica-Bold, + Helvetica-BoldOblique, + Helvetica-Oblique, + Symbol, + Times-Bold, + Times-BoldItalic, + Times-Italic, + Times-Roman, + PCTimes-Roman, + PCHelvetica, + Mincho-PC-Hiragana, + Mincho-PC-Katakana, + NotDefFont, + Ryumin-Light-H, + Ryumin-Light-V, + Ryumin-Light-EUC-H, + Ryumin-Light-EUC-V, + Ryumin-Light-SuppA-H, + Ryumin-Light-SuppA-V, + Ryumin-Light-SuppB-HV, + Ryumin-Light-RKSJ-H, + Ryumin-Light-RKSJ-V, + Ryumin-Light-RKSJ-UserGaiji, + Ryumin-Light-83pv-SuppA-H, + Ryumin-Light-83pv-SuppB-H, + Ryumin-Light-83pv-RKSJ-H, + Ryumin-Light-NWP-H, + Ryumin-Light-NWP-V, + Ryumin-Light-Ext-H, + Ryumin-Light-Ext-V, + Ryumin-Light-Ext-SuppA-H, + Ryumin-Light-Ext-SuppA-V, + Ryumin-Light-Ext-SuppB-HV, + Ryumin-Light-Ext-RKSJ-H, + Ryumin-Light-Ext-RKSJ-V, + Ryumin-Light-Add-H, + Ryumin-Light-Add-V, + Ryumin-Light-Add-SuppA-H, + Ryumin-Light-Add-SuppA-V, + Ryumin-Light-Add-SuppB-HV, + Ryumin-Light-Add-RKSJ-H, + Ryumin-Light-Add-RKSJ-V, + GothicBBB-Medium-H, + GothicBBB-Medium-V, + GothicBBB-Medium-EUC-H, + GothicBBB-Medium-EUC-V, + GothicBBB-Medium-SuppA-H, + GothicBBB-Medium-SuppA-V, + GothicBBB-Medium-SuppB-HV, + GothicBBB-Medium-RKSJ-H, + GothicBBB-Medium-RKSJ-V, + GothicBBB-Medium-RKSJ-UserGaiji, + GothicBBB-Medium-83pv-SuppA-H, + GothicBBB-Medium-83pv-SuppB-H, + GothicBBB-Medium-83pv-RKSJ-H, + GothicBBB-Medium-NWP-H, + GothicBBB-Medium-NWP-V, + GothicBBB-Medium-Ext-H, + GothicBBB-Medium-Ext-V, + GothicBBB-Medium-Ext-SuppA-H, + GothicBBB-Medium-Ext-SuppA-V, + GothicBBB-Medium-Ext-SuppB-HV, + GothicBBB-Medium-Ext-RKSJ-H, + GothicBBB-Medium-Ext-RKSJ-V, + GothicBBB-Medium-Add-H, + GothicBBB-Medium-Add-V, + GothicBBB-Medium-Add-SuppA-H, + GothicBBB-Medium-Add-SuppA-V, + GothicBBB-Medium-Add-SuppB-HV, + GothicBBB-Medium-Add-RKSJ-H, + GothicBBB-Medium-Add-RKSJ-V, + Helvetica-Narrow, + Helvetica-Narrow-Bold, + Helvetica-Narrow-BoldOblique, + Helvetica-Narrow-Oblique, + Palatino-Bold, + Palatino-BoldItalic, + Palatino-Italic, + Palatino-Roman, + ZapfChancery-MediumItalic, + ZapfDingbats, + Bookman-Demi, + Bookman-DemiItalic, + Bookman-Light, + Bookman-LightItalic, + NewCenturySchlbk-Bold, + NewCenturySchlbk-BoldItalic, + NewCenturySchlbk-Italic, + NewCenturySchlbk-Roman, + AvantGarde-Book, + AvantGarde-BookOblique, + AvantGarde-Demi, + AvantGarde-DemiOblique, + ); ); *** applications/lwsrv/query.ps.orig Mon Aug 28 20:40:03 1995 --- applications/lwsrv/query.ps Wed Sep 11 00:40:29 1996 *************** *** 147,152 **** --- 147,158 ---- ("\()print product print(\)"\n)print end %%?EndFeatureQuery: Unknown + %%?BeginQuery: Product + (==>Query Product) = + statusdict begin + ("\()print product print(\)"\n)print + end + %%?EndQuery: Unknown %%?BeginFeatureQuery: *ColorDevice (==>FeatureQuery *ColorDevice) = systemdict/colorimage known *** applications/papif/papif.c.orig Sun Apr 28 17:12:57 1996 --- applications/papif/papif.c Wed Sep 11 14:02:26 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1996/04/28 07:12:46 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/papif/RCS/papif.c,v 2.25 1996/04/28 07:12:46 djh Rel djh $"; ! static char revision[] = "$Revision: 2.25 $"; /* * papif - UNIX AppleTalk test program: simple line printer input filter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/09/11 04:02:06 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/papif/RCS/papif.c,v 2.27 1996/09/11 04:02:06 djh Rel djh $"; ! static char revision[] = "$Revision: 2.27 $"; /* * papif - UNIX AppleTalk test program: simple line printer input filter *************** *** 54,59 **** --- 54,63 ---- # include # include #endif SOLARIS + #ifdef linux + #define SIGEMT SIGUNUSED + # include + #endif /* linux */ /* Configuration options */ *************** *** 1446,1452 **** if (strncmp(status, s+1, *s) != 0) { strncpy(status, s+1, *s); status[*s] = '\0'; ! log_e("%s\r", status); } #endif SOLARIS } --- 1450,1456 ---- if (strncmp(status, s+1, *s) != 0) { strncpy(status, s+1, *s); status[*s] = '\0'; ! log_e("%s\n", status); } #endif SOLARIS } *** samples/atlook.c.orig Mon Mar 11 15:20:40 1996 --- samples/atlook.c Wed Jun 19 16:57:17 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1996/03/11 04:20:29 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/atlook.c,v 2.14 1996/03/11 04:20:29 djh Rel djh $"; ! static char revision[] = "$Revision: 2.14 $"; /* * atlook - UNIX AppleTalk test program: lookup entities --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/06/19 06:57:03 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/atlook.c,v 2.15 1996/06/19 06:57:03 djh Rel djh $"; ! static char revision[] = "$Revision: 2.15 $"; /* * atlook - UNIX AppleTalk test program: lookup entities *************** *** 30,36 **** #include /* so htons() works for non-vax */ #include /* include appletalk definitions */ ! #define NUMNBPENTRY 250 /* max names we can lookup */ #ifndef ATPINGER # define ATPINGER 0 --- 30,36 ---- #include /* so htons() works for non-vax */ #include /* include appletalk definitions */ ! #define NUMNBPENTRY 500 /* max names we can lookup */ #ifndef ATPINGER # define ATPINGER 0 *** samples/lwpr.c.orig Mon Oct 10 19:00:24 1994 --- samples/lwpr.c Tue Jun 18 20:51:15 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1994/10/10 09:00:16 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/lwpr.c,v 2.4 1994/10/10 09:00:16 djh Rel djh $"; ! static char revision[] = "$Revision: 2.4 $"; /* * lwpr - UNIX AppleTalk test program: print a ps file to appletalk LaserWriter --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/06/18 10:51:10 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/samples/RCS/lwpr.c,v 2.5 1996/06/18 10:51:10 djh Rel djh $"; ! static char revision[] = "$Revision: 2.5 $"; /* * lwpr - UNIX AppleTalk test program: print a ps file to appletalk LaserWriter *************** *** 37,42 **** --- 37,45 ---- #if defined(xenix5) || defined(SOLARIS) # include #endif /* xenix5 || SOLARIS */ + #ifdef linux + # include + #endif /* linux */ #ifndef CAPPRINTERS # define CAPPRINTERS "/etc/cap.printers" *** etc/atis.c.orig Wed Aug 4 02:18:00 1993 --- etc/atis.c Tue Jun 18 20:51:34 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1993/08/03 16:17:51 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/etc/RCS/atis.c,v 2.10 1993/08/03 16:17:51 djh Rel djh $"; ! static char revision[] = "$Revision: 2.10 $"; /* * atis.c - a simple appletalk information server --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/06/18 10:51:30 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/etc/RCS/atis.c,v 2.11 1996/06/18 10:51:30 djh Rel djh $"; ! static char revision[] = "$Revision: 2.11 $"; /* * atis.c - a simple appletalk information server *************** *** 8,14 **** * This provides a simple name information and echo server. * The NBP it assumes is a slightly extended form (cf. nbp.ext). * ! * Also acts as the RTMP listener for use with Native EtherTalk. * * Needs some cleaning. A quit signal causes it to dump it's database. * a HUP signal tells it to reload it. --- 8,15 ---- * This provides a simple name information and echo server. * The NBP it assumes is a slightly extended form (cf. nbp.ext). * ! * Also acts as the RTMP listener for use with Native EtherTalk and ! * Kernel EtherTalk for which we also maintain a simple routing table. * * Needs some cleaning. A quit signal causes it to dump it's database. * a HUP signal tells it to reload it. *************** *** 26,35 **** * December 17, 1986 CCKim Revise to rev1086 of UDP code * April 28, 1991 djh Add Phase 2 support * ! */ ! ! /* PATCH: Moy@Berkeley/atis.c.diff, djh@munnari.OZ.AU, 17/11/90 */ ! /* PATCH: XENIX/file.3, djh@munnari.OZ.AU, 20/11/90 */ #include #include --- 27,33 ---- * December 17, 1986 CCKim Revise to rev1086 of UDP code * April 28, 1991 djh Add Phase 2 support * ! */ #include #include *************** *** 51,56 **** --- 49,58 ---- # include #endif + #ifdef linux + #define SIGEMT SIGUNUSED + #endif /* linux */ + /* signals in use */ #define DUMPSIG sigmask(SIGQUIT) #define EXITSIG sigmask(SIGTERM) *************** *** 188,193 **** --- 190,201 ---- void atis_end() { + #ifdef linux + if (lap_proto == LAP_KERNEL) { + void rtmp_release(); + rtmp_release(); + } + #endif /* linux */ logit(0, "exiting"); (void)unlink(pidfile); exit(1); *************** *** 463,468 **** --- 471,482 ---- if ((lap_proto == LAP_ETALK || lap_proto == LAP_KERNEL) && rtmpskt) { if ((rtmperr = DDPOpenSocket(&rtmpskt, rtmp_listener)) != noErr) logit(L_UERR|0, "RTMP: RTMP socket not available: error %d", rtmperr); + #ifdef linux + if (lap_proto == LAP_KERNEL) { + extern void rtmp_timer(); + Timeout(rtmp_timer, 0, 40); + } + #endif /* linux */ } if (echoerr != noErr && nbperr != noErr && rtmperr != noErr) *************** *** 754,765 **** AddrBlock *addr; { u_char rc; /* rtmp command */ - ABusRecord abr; - u_short net; - int goodness; time_t now; ! static time_t current_time; ! static u_short current_node; static int current_goodness = -1; #ifdef PHASE2 u_short new_net_range_start, new_net_range_end, increment; --- 768,781 ---- AddrBlock *addr; { u_char rc; /* rtmp command */ time_t now; ! u_short net; ! ABusRecord abr; ! static int goodness = 0; ! static AddrBlock last_addr; ! static time_t last_time = 0; ! static AddrBlock current_addr; ! static time_t current_time = 0; static int current_goodness = -1; #ifdef PHASE2 u_short new_net_range_start, new_net_range_end, increment; *************** *** 771,776 **** --- 787,793 ---- } net = htons((pkt[0] << 8) | pkt[1]); + logit(5, "Got RTMP pkt net %d from %d.%d", ntohs(net), ntohs(addr->net), addr->node); *************** *** 805,832 **** * * Be aware that very good routers can send a full RTMP packet followed * by a small "overflow" RTMP packet, be careful not to overreact. */ ! /* ! * go to beginning of routing triples ! */ #ifdef PHASE2 pkt += 4; len -= 4; if (pkt[0] == 0 && pkt[1] == 0 && pkt[2] == 0x82) { /* non-extended net */ new_net_range_start = net; /* net byte order */ new_net_range_end = net; /* net byte order */ ! increment = 0; ! } else if (pkt[5] == 0x82) { /* extended network */ new_net_range_start = htons((pkt[0] << 8) | pkt[1]); new_net_range_end = htons((pkt[3] << 8) | pkt[4]); ! pkt += 3; len -= 3; ! increment = 3; } else { logit(2, "RTMP: unknown format packet, dropped!"); return; } ! pkt += 3; len -= 3; #ifdef notdef /* ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ */ /* we should be doing this, in case the router was down when */ --- 822,851 ---- * * Be aware that very good routers can send a full RTMP packet followed * by a small "overflow" RTMP packet, be careful not to overreact. + * */ ! /* ! * go to beginning of routing triples ! * ! */ #ifdef PHASE2 pkt += 4; len -= 4; if (pkt[0] == 0 && pkt[1] == 0 && pkt[2] == 0x82) { /* non-extended net */ new_net_range_start = net; /* net byte order */ new_net_range_end = net; /* net byte order */ ! } else if (pkt[2] & 0x80 && pkt[5] == 0x82) { /* extended network */ new_net_range_start = htons((pkt[0] << 8) | pkt[1]); new_net_range_end = htons((pkt[3] << 8) | pkt[4]); ! pkt += 3; ! len -= 3; } else { logit(2, "RTMP: unknown format packet, dropped!"); return; } ! pkt += 3; ! len -= 3; #ifdef notdef /* ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ */ /* we should be doing this, in case the router was down when */ *************** *** 844,906 **** pkt += 7; len -= 7; #endif PHASE2 ! /* ! * loop over routing triples, counting them. ! * If we find our own network, this router isn't doing split horizon. ! */ ! goodness = 0; while (len > 0) { net = htons((pkt[0] << 8) | pkt[1]); /* pkt data is not aligned */ if (net == addr->net) { /* not doing split horizon */ - goodness = 0; logit (10, "No split horizon in router %d.%d", ! ntohs(addr->net), addr->node); ! break; } goodness++; - len -= 3; - pkt += 3; #ifdef PHASE2 len -= increment; pkt += increment; #endif PHASE2 } logit (8, "Router %d.%d has goodness %d", ntohs(addr->net), addr->node, goodness); ! now = time(NULL); #define MARGIN (current_goodness / 20) /* currently 5% */ if (goodness > (current_goodness+MARGIN)) { ! SetBridgeAddress(addr); ! logit (1, "New default router %d.%d, goodness %d->%d", ! ntohs(addr->net), addr->node, current_goodness, goodness); ! current_node = addr->node; current_goodness = goodness; current_time = now; return; } ! if (addr->node != current_node && (now - current_time) > 15) { ! SetBridgeAddress(addr); ! logit (1, "New default router %d.%d, old expired", ! ntohs(addr->net), addr->node); ! current_node = addr->node; ! current_goodness = goodness; current_time = now; return; } ! if (addr->node == current_node) { ! /* ! * check for possible overflow packets, these should ! * arrive quite quickly after the full RTMP packet ! */ ! if (now < current_time + 2) ! current_goodness += goodness; ! else ! current_goodness = goodness; current_time = now; - logit (1, "Current default router %d.%d, goodness %d", - ntohs(addr->net), addr->node, current_goodness); return; } } --- 863,975 ---- pkt += 7; len -= 7; #endif PHASE2 ! ! #ifdef linux ! /* ! * build RTMP table for kernel ! * ! */ ! if (lap_proto == LAP_KERNEL) { ! void rtmp_data(); ! rtmp_data(addr->node, addr->net, pkt, len); ! } ! #endif /* linux */ ! ! now = time(NULL); ! ! /* ! * reset goodness if more than 2 seconds ! * old or this is from a different router. ! * ! */ ! if (now > last_time+2 ! || last_addr.net != addr->net ! || last_addr.node != addr->node) ! goodness = 0; ! ! /* ! * loop over routing triples, counting them. ! * If we find the router network, this router ! * isn't doing split horizon. ! * ! */ while (len > 0) { net = htons((pkt[0] << 8) | pkt[1]); /* pkt data is not aligned */ if (net == addr->net) { /* not doing split horizon */ logit (10, "No split horizon in router %d.%d", ! ntohs(addr->net), addr->node); ! goodness = 0; } goodness++; #ifdef PHASE2 + if (pkt[2] & 0x80 && pkt[5] == 0x82) + increment = 3; + else + increment = 0; len -= increment; pkt += increment; #endif PHASE2 + len -= 3; + pkt += 3; } + logit (8, "Router %d.%d has goodness %d", ntohs(addr->net), addr->node, goodness); ! ! last_time = now; ! last_addr.net = addr->net; ! last_addr.node = addr->node; #define MARGIN (current_goodness / 20) /* currently 5% */ + /* + * this router knows more than 5% more + * routes than the current one, adopt it + * (may be subsequent packets from current) + * + */ if (goodness > (current_goodness+MARGIN)) { ! if (addr->node != current_addr.node ! || addr->net != current_addr.net) { ! SetBridgeAddress(addr); ! logit (1, "New default router %d.%d, goodness %d -> %d", ! ntohs(addr->net), addr->node, current_goodness, goodness); ! current_addr.node = addr->node; ! current_addr.net = addr->net; ! } current_goodness = goodness; current_time = now; return; } ! ! /* ! * same router, update heard-from time ! * ! */ ! if (addr->node == current_addr.node ! && addr->net == current_addr.net) { ! logit (1, "Current default router %d.%d, goodness %d", ! ntohs(addr->net), addr->node, current_goodness); current_time = now; return; } ! ! /* ! * different router, and we haven't heard ! * from our current router for more than ! * 15 seconds, adopt it ! * ! */ ! if ((addr->node != current_addr.node ! || addr->net != current_addr.net) ! && (now - current_time) > 15) { ! SetBridgeAddress(addr); ! logit (1, "New default router %d.%d (old expired)", ! ntohs(addr->net), addr->node); ! current_addr.node = addr->node; ! current_addr.net = addr->net; ! current_goodness = goodness; current_time = now; return; } } *** etc/start-cap-servers.orig Tue Apr 30 18:58:30 1996 --- etc/start-cap-servers Wed Sep 11 14:33:45 1996 *************** *** 22,27 **** --- 22,32 ---- # ${CAP}/aarpd "interface" "zone" # + # Or capd for Kernel AppleTalk under Linux + # + # ${CAP}/capd "interface" "zone" + + # # allow atis to startup before other CAP programs # ${CAP}/atis *** etc/nisaux.c.orig Wed Aug 4 02:18:02 1993 --- etc/nisaux.c Sun May 19 00:27:23 1996 *************** *** 1,8 **** /* ! * $Author: djh $ $Date: 1993/08/03 16:17:51 $ ! * $Header: /mac/src/cap60/etc/RCS/nisaux.c,v 2.6 1993/08/03 16:17:51 djh Rel djh $ ! * $Revision: 2.6 $ ! */ /* * nisaux.c - name table management routines --- 1,9 ---- /* ! * $Author: djh $ $Date: 1996/05/18 14:27:15 $ ! * $Header: /mac/src/cap60/etc/RCS/nisaux.c,v 2.7 1996/05/18 14:27:15 djh Rel djh $ ! * $Revision: 2.7 $ ! * ! */ /* * nisaux.c - name table management routines *************** *** 21,27 **** * * July 10, 1986 CCKim Created * ! */ #include #include --- 22,28 ---- * * July 10, 1986 CCKim Created * ! */ #include #include *************** *** 36,42 **** * We do NOT assume that the only entries in this table will be for this * node. * ! */ typedef struct { AddrBlock addr; --- 37,43 ---- * We do NOT assume that the only entries in this table will be for this * node. * ! */ typedef struct { AddrBlock addr; *************** *** 45,51 **** EntityName ent; } SNBPTEntry; ! #define NUMNVE 30 /* careful - no more than 255 */ SNBPTEntry nbptable[NUMNVE]; private int numnve = 0; private int newenum = 0; --- 46,53 ---- EntityName ent; } SNBPTEntry; ! #define NUMNVE 96 /* careful - no more than 255 */ ! SNBPTEntry nbptable[NUMNVE]; private int numnve = 0; private int newenum = 0; *** lib/cap/abmisc.c.orig Thu Mar 7 22:42:14 1996 --- lib/cap/abmisc.c Thu May 2 01:30:32 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/03/07 11:42:04 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abmisc.c,v 2.8 1996/03/07 11:42:04 djh Rel djh $ ! * $Revision: 2.8 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/05/01 15:30:26 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abmisc.c,v 2.9 1996/05/01 15:30:26 djh Rel djh $ ! * $Revision: 2.9 $ * */ *************** *** 620,626 **** if (c & 0x80) return(ISO2Mac[c]); else ! return(isprintf(c); } #endif ISO_TRANSLATE --- 620,626 ---- if (c & 0x80) return(ISO2Mac[c]); else ! return(isprint(c)); } #endif ISO_TRANSLATE *** applications/lwsrv/list.c.orig Mon Aug 28 20:38:59 1995 --- applications/lwsrv/list.c Wed May 8 14:19:49 1996 *************** *** 1,6 **** ! static char rcsid[] = "$Author: djh $ $Date: 1995/08/28 10:38:35 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/list.c,v 2.1 1995/08/28 10:38:35 djh Rel djh $"; ! static char revision[] = "$Revision: 2.1 $"; /* * list.c - general list package-simple and key-value lists --- 1,6 ---- ! static char rcsid[] = "$Author: djh $ $Date: 1996/05/08 04:19:28 $"; ! static char rcsident[] = "$Header: /mac/src/cap60/applications/lwsrv/RCS/list.c,v 2.2 1996/05/08 04:19:28 djh Rel djh $"; ! static char revision[] = "$Revision: 2.2 $"; /* * list.c - general list package-simple and key-value lists *************** *** 252,260 **** int (*keyfree)(), (*valfree)(); { if (lp->left) ! FreeKVTree(lp->left, keyfree, valfree); if (lp->right) ! FreeKVTree(lp->right, keyfree, valfree); if (keyfree) (*keyfree)(lp->key); if (valfree) --- 252,260 ---- int (*keyfree)(), (*valfree)(); { if (lp->left) ! _FreeKVTree(lp->left, keyfree, valfree); if (lp->right) ! _FreeKVTree(lp->right, keyfree, valfree); if (keyfree) (*keyfree)(lp->key); if (valfree) *** lib/cap/abversion.c.orig Wed May 1 03:25:44 1996 --- lib/cap/abversion.c Sat May 18 20:51:26 1996 *************** *** 1,7 **** /* ! * $Author: djh $ $Date: 1996/04/30 17:25:37 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.97 1996/04/30 17:25:37 djh Rel djh $ ! * $Revision: 2.97 $ * */ --- 1,7 ---- /* ! * $Author: djh $ $Date: 1996/05/18 10:51:21 $ ! * $Header: /mac/src/cap60/lib/cap/RCS/abversion.c,v 2.98 1996/05/18 10:51:21 djh Rel djh $ ! * $Revision: 2.98 $ * */ *************** *** 32,39 **** myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 197; ! myversion.cv_rmonth = "April"; myversion.cv_ryear = "1996"; switch (lap_proto) { case LAP_KIP: --- 32,39 ---- myversion.cv_name = "CAP"; myversion.cv_version = 6; myversion.cv_subversion = 0; ! myversion.cv_patchlevel = 198; ! myversion.cv_rmonth = "June"; myversion.cv_ryear = "1996"; switch (lap_proto) { case LAP_KIP: *** CAP60.README.orig Tue Apr 30 18:44:08 1996 --- CAP60.README Thu May 30 20:09:58 1996 *************** *** 385,391 **** to comp.protocols.appletalk, the patches will be available via FTP from munnari.OZ.AU (in mac/cap.patches) ! rutgers.EDU (in src/cap60.patches) gatekeeper.DEC.COM (in pub/net/appletalk/cap/cap.patches) ftp.kuis.kyoto-u.AC.JP (in net/cap/cap60.patches) src.doc.ic.AC.UK (in mac/multigate/cap.patches) --- 385,391 ---- to comp.protocols.appletalk, the patches will be available via FTP from munnari.OZ.AU (in mac/cap.patches) ! ftp-ns.rutgers.edu (in pub/cap/cap.patches) gatekeeper.DEC.COM (in pub/net/appletalk/cap/cap.patches) ftp.kuis.kyoto-u.AC.JP (in net/cap/cap60.patches) src.doc.ic.AC.UK (in mac/multigate/cap.patches) *** README.orig Mon Mar 11 21:46:26 1996 --- README Thu May 30 20:13:26 1996 *************** *** 2,8 **** CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 197, April 1996 Notice ------ --- 2,8 ---- CAP - Columbia AppleTalk Package for UNIX o RELEASE NOTES ! o CAP Distribution 6.0, Patch Level 198, June 1996 Notice ------ *************** *** 95,102 **** CAP can be obtained by anonymous FTP from - rutgers.EDU src/{cap60.pl100.tar.Z,cap60.patches/*} munnari.OZ.AU mac/{cap60.pl100.tar.Z,cap.patches/*} gatekeeper.DEC.COM pub/net/appletalk/cap/{cap60.pl100.tar.Z,cap.patches/*} ftp.kuis.kyoto-u.AC.JP net/cap/{cap60.pl100.tar.Z,cap60.patches/*.Z} src.doc.ic.AC.UK packages/multigate/{cap60.pl100.tar.Z,cap.patches/*} --- 95,102 ---- CAP can be obtained by anonymous FTP from munnari.OZ.AU mac/{cap60.pl100.tar.Z,cap.patches/*} + ftp-ns.rutgers.EDU pub/cap/{cap60.pl100.tar.Z,cap.patches/*} gatekeeper.DEC.COM pub/net/appletalk/cap/{cap60.pl100.tar.Z,cap.patches/*} ftp.kuis.kyoto-u.AC.JP net/cap/{cap60.pl100.tar.Z,cap60.patches/*.Z} src.doc.ic.AC.UK packages/multigate/{cap60.pl100.tar.Z,cap.patches/*}