Program: gopher client for VMS using CMU/TEK IP/TCP Internet package Anon ftp host: moe.tn.cornell.edu (128.84.242.72) Directory: /pub/ Files: gopherclient_cmu.bck_z - gopher client saveset compressed with LZCOMP.EXE This "version" of gopher-client has been modified to work with CMU/TEK IP/TCP using the CMUTEK socket package inet_cmutil.bck_z developed by me, Brian T Carcich. You do not need to get the socket package as the relevant object files are included in the gopherclient_cmu.bck_z packages or the CMUTEK distribution. The compressed savesets ending in .bck_z need to be transferred in binary mode (get/t=i) and decompressed with LZDCMP.EXE with the qualifier /EXPORT=VMS (e.g. $ LZDC=="$DDCU:[DIR]LZDCMP/EXPORT=VMS" $ LZDC GOPHERCLIENT_CMU.BCK_Z GOPHERCLIENT_CMU.BCK $ CREATE/DIR DDCU:[BLAH.GOPHER] $ BACK/VER GOPHERCLIENT_CMU.BCK/SAVE [.*] ) This file is 000gopherclient_cmu.readme in the savesets and gopherclient_cmu.000readme at the ftp site. The gopher client source was copied from boombox.micro.umn.edu:/pub/gopher/VMS/vms_client_v0.6/ on 9-SEP-1992 and was not changed other than to handle the CMU socket package by me. Original source for typical changed file fil.typ is in file_ORIG.typ ***N.B. UMM$HELP should be a logical that points to the directory that contains GOPHER.HLP when running gopher client. ***N.B. LINK_CLIENT assumes VMSMISC.OBJ and INET_CMUTIL.OBJ are in the default dir and NETERROR.OBJ is in SYS$LIBRARY: for the link. VMSMISC and INET_CMUTIL are in the gopherclient_cmu distribution, and NETERROR is part of the CMUTEK distribution, but they are also included in the inet_cmutek.bck* distribution files in the same place. =========== Modifications: =========== COMPILE.COM changed to use P1 as the tcp/ip product (MULTINET, UCX, CMUTEK_BTC) and now defaults to CMUTEK_BTC CONF.H changed mainly to add defines (socket -> inet_socket) and inet_addr(), gethostname(), htons() functionality for CMUTEK_BTC case. GOPHER.C changed to add gethostbyname() functionality for CMUTEK_BTC case. GOPHER.H changed to remove redundant #include "sys$share:smgdef.h" and eliminate compiler warnings. LINK_CLIENT.COM changed to add CMUTEK_BTC link command ***N.B. assumes files VMSMISC.OBJ & INET_CMUTIL.OBJ (in default dir) and SYS$LIBRARY:NETERROR.OBJ are available. Also provides P1-driven path for MULTINET or CMUTEK_BTC, defaults to CMUTEK_BTC. UTIL.C changed to add CMUTEK_BTC paths, also to consolidate multiple #ifdef's in code to single section at top. =========== the diff's follow this file =========== Brian Carcich saved|by +01(607)255-7453 FAX...-9002 Cornell University --+-- carcich@cuspif.tn.cornell.edu 422 Space Sciences Building |grace CUSPIF::CARCICH (SPAN 6287::) Ithaca, NY 14853-6801 | btcx@crnlvax5.BITnet ************ File SCR:[CARCICH.GOPHER]COMPILE_ORIG.COM;1 1 $! 2 $ cc/define=(MULTINET=1) calendar 3 $ cc/define=(MULTINET=1) cso 4 $ cc/define=(MULTINET=1) error 5 $ cc/define=(MULTINET=1) globals 6 $ cc/define=(MULTINET=1) gopher 7 $ cc/define=(MULTINET=1) gopherstruct 8 $ cc/define=(MULTINET=1) manager 9 $ cc/define=(MULTINET=1) ourutils 10 $ cc/define=(MULTINET=1) subprocs 11 $ cc/define=(MULTINET=1) util 12 $ cc/define=(MULTINET=1) v2stuff 13 $! ****** File SCR:[CARCICH.GOPHER]COMPILE.COM;3 1 $ ! 2 $ !$ inetype := MULTINET 3 $ inetype := CMUTEK_BTC 4 $ if p1 .nes. "" then inetype = f$edit(p1,"upcase,collapse") 5 $ ! 6 $ cc/define=('inetype'=1) calendar 7 $ cc/define=('inetype'=1) cso 8 $ cc/define=('inetype'=1) error 9 $ cc/define=('inetype'=1) globals 10 $ cc/define=('inetype'=1) gopher 11 $ cc/define=('inetype'=1) gopherstruct 12 $ cc/define=('inetype'=1) manager 13 $ cc/define=('inetype'=1) ourutils 14 $ cc/define=('inetype'=1) subprocs 15 $ cc/define=('inetype'=1) util 16 $ cc/define=('inetype'=1) v2stuff 17 $! ************ Number of difference sections found: 1 Number of difference records found: 16 DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=SCR:[CARCICH.GOPHER]A.A;6- SCR:[CARCICH.GOPHER]COMPILE_ORIG.COM;1- SCR:[CARCICH.GOPHER]COMPILE.COM;3 ************ File SCR:[CARCICH.GOPHER]GOPHER.C;8 1134 1135 #ifdef CMUTEK_BTC 1136 /* for gethostbyname, simply return FFFFFF at the beginning of the .haddr 1137 and a pointer to the host name in the following bytes - assuming the 1138 FF's and the pointer get copied into sin_addr, the FF's will tell the 1139 socket package to use the address after the FF's */ 1140 1141 struct hostent *gethostbyname(A) 1142 char *A; 1143 { 1144 #define GHN_HOSTENT_NAME_SIZE 5000 1145 static char ghn_hostent_name[GHN_HOSTENT_NAME_SIZE]; 1146 static int ghn_hostent_offset = 0; 1147 static struct hostent ghn_hostent = { 0, 0, AF_INET, 0, 0}; 1148 int i; 1149 char *addr1; 1150 char *addr2 = (char *) &addr1; 1151 1152 /* check for overflow */ 1153 if ( (strlen(A)+sizeof(u_long)+sizeof(char *)+ghn_hostent_offset+1) > 1154 GHN_HOSTENT_NAME_SIZE) 1155 return( (struct hostent *) 0); 1156 1157 /* make .h_addr point to FFFFFFFF's followed by name */ 1158 ghn_hostent.h_addr = ghn_hostent_name + ghn_hostent_offset; 1159 1160 /* copy hex FF's into static area starting at offset */ 1161 for ( i=0; i