Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site k.cs.cmu.edu Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!lll-crg!seismo!rochester!pt.cs.cmu.edu!k.cs.cmu.edu!tim From: tim@k.cs.cmu.edu (Tim Maroney) Newsgroups: net.sources.mac Subject: Macintosh Internet Protocols (2 of 12) Message-ID: <661@k.cs.cmu.edu> Date: Tue, 26-Nov-85 04:52:22 EST Article-I.D.: k.661 Posted: Tue Nov 26 04:52:22 1985 Date-Received: Fri, 29-Nov-85 21:25:39 EST Organization: Carnegie-Mellon University, Networking Lines: 2324 echo extracting appl/cust.link.text... cat >appl/cust.link.text <<'!E!O!F!' $EXEC L{ink}? +X { no more options} appl-cust obj-quickdraw obj-tooltraps obj-ostraps obj-prlink obj-packtraps obj-rtlib obj-pasinit obj-paslibasm obj-paslib obj-abpascalls net-cust_lib net-ip_lib net-name_user {no more object files} {list on console} appl-custL.OBJ $ENDEXEC !E!O!F! # # echo extracting appl/cust.text... cat >appl/cust.text <<'!E!O!F!' {$X-} {$M+} {$R-} {$0V-} {$D-} {$DECL DEBUG} {$SETC DEBUG := false} PROGRAM Customize; { Please note the copyright notice in the file "copyright/notice" } {$L-} USES {$U-} {$U Obj-Memtypes } Memtypes, {$U Obj-QuickDraw } QuickDraw, {$U Obj-OSIntf } OSIntf, {$U Obj-ToolIntf } ToolIntf, {$U Obj-PackIntf } PackIntf, {$U Obj-ABPasIntf } ABPasIntf, {$U net-Task_Lib } Task_Lib, {$U net-cust_Lib } Cust_Lib, {$U net-ip_lib } IP_Lib, {$U net-name_user } Name_User; {$L+} VAR screen,dragRect: Rect; myEvent: EventRecord; whichWindow: WindowPtr; theItem: INTEGER; MyDialog: DialogPtr; dRecord: DialogRecord; TheItemType: Integer; TheItemBox: Rect; PROCEDURE SetupValue(Val:LongInt;Where:Integer); { Where is the item number into which to write the data } VAR LocalItemHandle: Handle; TempText: STR255; BEGIN GetDItem(MyDialog,Where,TheItemType,LocalItemHandle,TheItemBox); cvt_inaddr(Val,TempText); SetIText(LocalItemHandle,TempText); END; FUNCTION GetValue(Where:Integer): LongInt; { Read a value from a field } VAR LocalItemHandle: Handle; TempText: STR255; BEGIN GetDItem(MyDialog,Where,TheItemType,LocalItemHandle,TheItemBox); GetIText(LocalItemHandle,TempText); GetValue := convert_name(TempText); END; PROCEDURE DoCustom; CONST OKBut = 1; CancelBut = 2; LocalIPField = 3; GWIPField = 4; NSIPField = 5; UserField = 6; DefHField = 7; ABRadio = 8; LocIPHeadr = 9; GWIPHeader = 10; NSIPHeader = 11; UserHeader = 12; DefHHeader = 13; ErrField = 14; CustDialog = 1; TYPE TwoHandle = RECORD CASE Integer OF 0:( h: Handle); 1:( ch: ControlHandle); END; VAR i: Integer; ItemHit: Integer; LocalItemHandle: Handle; ErrHandle, ABButHandle: TwoHandle; FRN: Integer; { File reference number for the custimzation values } CurVal: CustRecord; RLength: LongInt; OSStatus: OSErr; ErrMsg: STR255; TLIP,TGWIP,{ TTSIP,} TNSIP: in_name; TUser,THost: STR255; myNet,myNode:INTEGER; BEGIN { Some values in case something goes wrong } if GetNodeAddress(myNode,myNet) <> noErr then myNode := 0; CurVal.LocalIPAddr:= $80020000 + myNode; CurVal.GateWIPAddr:= $80020040; CurVal.NameServer := $80020040; CurVal.TimeServer := $80020040; CurVal.UserName := 'AppleMAC'; CurVal.DefHost := 'Unknown'; CurVal.UseAB := TRUE; { Try to read in old values } OSStatus := FSOpen(CFileName, {Current Vol} 0, FRN); IF OSStatus = noErr THEN BEGIN { File is there, read in the values } RLength := sizeof(CustRecord); { Get to the start of the file } OSStatus := SetFPos(FRN,fsFromStart,0); IF OSStatus = noErr THEN OSStatus := FSRead(FRN,RLength,@CurVal); ErrMsg := 'Current values from customization file are shown.'; END ELSE IF OSStatus = fnfErr THEN BEGIN { File wasn't found, so create it and fill with default values } { Not really a text file, but this allows other programs to try to diddle with it } OSStatus := Create(CFileName, { Vol } 0, { Creator } '????', { FileType} 'TEXT'); { After creating it, open it and make sure we can get the room } IF OSStatus = noErr THEN OSStatus := FSOpen(CFileName, {Current Vol} 0, FRN); { and get the room } RLength := sizeof(CustRecord); IF OSStatus = noErr THEN OSStatus := Allocate(FRN,RLength); ErrMsg := 'Customization file not found - creating it with default values.'; END; IF OSStatus <> noErr THEN BEGIN { Have problem, may be cannot correct them } NumToString(OSStatus,ErrMsg); ErrMsg := concat('Could not open customization file - status ',ErrMsg); END; MyDialog := GetNewDialog(CustDialog,@dRecord,POINTER(-1)); GetDItem(MyDialog,ABRadio,TheItemType,ABButHandle.h,TheItemBox); GetDItem(MyDialog,ErrField,TheItemType,ErrHandle.h,TheItemBox); REPEAT { Now fill in the values read from the file } SetCtlValue(ABButHandle.ch,ORD(CurVal.UseAB)); SetupValue(CurVal.LocalIPAddr,LocalIPField); SetupValue(CurVal.GateWIPAddr,GWIPField); { SetupValue(CurVal.TimeServer,TSIPField); } SetupValue(CurVal.NameServer,NSIPField); GetDItem(MyDialog,UserField,TheItemType,LocalItemHandle,TheItemBox); SetIText(LocalItemHandle,CurVal.UserName); GetDItem(MyDialog,DefHField,TheItemType,LocalItemHandle,TheItemBox); SetIText(LocalItemHandle,CurVal.DefHost); SetIText(ErrHandle.h,ErrMsg); ModalDialog(NIL,ItemHit); { Read in the fields } ErrMsg := ''; TLIP := GetValue(LocalIPField); IF TLIP = 0 THEN ErrMsg := 'Local IP Address is ill formed.' ELSE CurVal.LocalIPAddr := TLIP; IF CurVal.UseAB AND (ErrMsg = '') THEN BEGIN { Now use AB value } CurVal.LocalIPAddr := BitAnd(CurVal.LocalIPAddr,$FFFFFF00) + myNode; SetupValue(CurVal.LocalIPAddr,LocalIPField); END; TGWIP := GetValue(GWIPField); IF TGWIP = 0 THEN ErrMsg := 'Gateway IP Address is ill formed.' ELSE CurVal.GateWIPAddr := TGWIP; { TTSIP := GetValue(TSIPField); IF TTSIP = 0 THEN ErrMsg := 'Timer Server IP Address is ill formed.' ELSE CurVal.TimeServer := TTSIP; } TNSIP := GetValue(NSIPField); IF TNSIP = 0 THEN ErrMsg := 'Name Server IP Address is ill formed.' ELSE CurVal.NameServer := TNSIP; GetDItem(MyDialog,UserField,TheItemType,LocalItemHandle,TheItemBox); GetIText(LocalItemHandle,TUser); IF length(TUser)>8 THEN ErrMsg := 'User name greater than 8 character' ELSE IF length(TUser) = 0 THEN ErrMsg := 'Null user name is not permitted.' ELSE CurVal.UserName := TUser; GetDItem(MyDialog,DefHField,TheItemType,LocalItemHandle,TheItemBox); GetIText(LocalItemHandle,THost); IF length(THost) = 0 THEN ErrMsg := 'Null host name is not permitted.' ELSE CurVal.DefHost := THost; CASE ItemHit OF OKBut: BEGIN IF ErrMsg = '' THEN BEGIN { All values OK } { Writeout the file } ErrMsg := 'Please confirm by clicking ''OK'''; SetIText(ErrHandle.h,ErrMsg); ModalDialog(NIL,ItemHit); IF ItemHit <> OKBut THEN BEGIN ItemHit := ErrField; ErrMsg := 'Save has been canceled.'; SetIText(ErrHandle.h,ErrMsg); END ELSE BEGIN RLength := sizeof(CustRecord); OSStatus := SetFPos(FRN,fsFromStart,0); IF OSStatus = noErr THEN OSStatus := FSWrite(FRN,RLength,@CurVal); IF OSStatus <> noErr THEN BEGIN ErrMsg := 'Trouble writing the customization file.'; SetIText(ErrHandle.h,ErrMsg); ModalDialog(NIL,ItemHit); END; IF OSStatus = noErr THEN OSStatus := FSClose(FRN); IF OSStatus <> noErr THEN BEGIN ErrMsg := 'Trouble closing the customization file.'; SetIText(ErrHandle.h,ErrMsg); ModalDialog(NIL,ItemHit); END; IF OSStatus <> noErr THEN ItemHit := ErrField; END END ELSE ItemHit := ErrField; END; CancelBut: BEGIN { Person decided to punt } ErrMsg := 'Are you sure you want to cancel? (Select OK)'; SetIText(ErrHandle.h,ErrMsg); ModalDialog(NIL,ItemHit); IF ItemHit <> OKBut THEN BEGIN ItemHit := ErrField; ErrMsg := 'Cancel ''canceled'''; END ELSE OSStatus := FSClose(FRN); END; ABRadio: BEGIN { Person wants some calculation based on the AB address to be used for Local IP Address } CurVal.UseAB := NOT CurVal.UseAB; SetCtlvalue(ABButHandle.ch,ORD(CurVal.UseAB)); IF CurVal.UseAB THEN BEGIN { Now use AB value } ErrMsg := 'Local IP Address now a function of Applebus node number.'; CurVal.LocalIPAddr := BitAnd(CurVal.LocalIPAddr,$FFFFFF00) + myNode; END ELSE BEGIN ErrMsg := 'Local IP Address is no longer a function of the Applebus node number.'; END; END; END; UNTIL ItemHit in [OKBut, CancelBut]; CloseDialog(MyDialog); END; BEGIN { main program } InitGraf(@thePort); InitFonts; FlushEvents(everyEvent,0); InitWindows; TEInit; InitDialogs(NIL); InitCursor; screen := screenBits.bounds; SetRect(dragRect,4,24,screen.right-4,screen.bottom-4); DoCustom; END. !E!O!F! # # echo extracting appl/custo.text... cat >appl/custo.text <<'!E!O!F!' appl-custo.rsrc Type CODE appl-custL,0 !E!O!F! # # echo extracting appl/custr.text... cat >appl/custr.text <<'!E!O!F!' * appl-custr -- Resource input for customizer * *{ Please note the copyright notice in the file "copyright/notice" } appl-custr.Rsrc Type MENU ,256 File Customize User Quit Type DLOG ,1 30 20 300 490 Visible 1 NoGoAway 0 3 Type DITL ,3 14 BtnItem Enabled 20 110 35 190 OK BtnItem Enabled 20 260 35 340 Cancel EditText Disabled 50 195 65 350 DefaultLocalIPAddress EditText Disabled 75 195 90 350 DefaultGWIPAddress EditText Disabled 100 195 115 350 DefaultNSIPAddress EditText Disabled 125 195 140 350 DefaultUserName EditText Disabled 150 195 165 350 DefaultHostName ChkItem Enabled 175 10 190 350 Base Local IP Address on Applebus Node Number StatText Disabled 50 10 65 190 Local IP Address: StatText Disabled 75 10 90 190 Gateway IP Address: StatText Disabled 100 10 115 190 Name Server IP Address: StatText Disabled 125 10 140 190 User Name: StatText Disabled 150 10 165 190 Default Foreign Host: StatText Disabled 200 10 260 400 Customization file not found -- creating it. Type BNDL ,128 CUST 0 2 ICN# 1 0 128 FREF 1 0 128 Type FREF ,128 APPL 0 Type CUST = STR ,0 CUST Version 2, 10 September 1985 !E!O!F! # # echo extracting appl/telnet.link.te... cat >appl/telnet.link.te <<'!E!O!F!' $EXEC L{ink}? +X { no more options} appl-telnet obj-quickdraw obj-tooltraps obj-ostraps obj-prlink obj-packtraps obj-rtlib obj-pasinit obj-paslibasm obj-paslib obj-abpascalls net-err_lib net-task_lib net-task_asm net-timer_lib net-cust_lib net-name_host net-arp_lib net-ip_listen net-icmp_lib net-ip_lib net-udp_lib net-name_user net-tftp_defs net-tftp_file net-tftp_lib net-tcp_lib net-term_lib net-tn_lib net-calls net-call_asm {no more object files} {list on console} appl-telnetL.OBJ $ENDEXEC !E!O!F! # # echo extracting appl/telnet.text... cat >appl/telnet.text <<'!E!O!F!' {$X-} {$M+} {$R-} {$0V-} {$D-} {$DECL DEBUG} {$SETC DEBUG := false} {$DECL LISTEN} {$SETC LISTEN := true} {$DECL TCPSTATS} {$SETC TCPSTATS := false} {$DECL UDPSTATS} {$SETC UDPSTATS := false} {$DECL IPSTATS} {$SETC IPSTATS := false} PROGRAM TELNET; { Please note the copyright notice in the file "copyright/notice" } {$L-} USES {$U-} {$U Obj-Memtypes } Memtypes, {$U Obj-QuickDraw } QuickDraw, {$U Obj-OSIntf } OSIntf, {$U Obj-ToolIntf } ToolIntf, {$U Obj-PackIntf } PackIntf, {$U Obj-ABPasIntf } ABPasIntf, {$U net-err_lib } Err_Lib, {$U net-Task_Lib } Task_Lib, {$U net-Timer_Lib } Timer_Lib, {$U net-ip_lib } IP_Lib, {$U net-arp_lib } ARP_Lib, {$U net-icmp_lib } ICMP_Lib, {$U net-UDP_Lib } UDP_Lib, {$U net-TCP_Lib } TCP_Lib, {$U net-TFTP_Lib } TFTP_Lib, {$U net-tn_lib } TN_Lib, {$U net-term_lib } Term_Lib; {$L+} CONST lastMenu = 4; appleMenu = 1; { menu ID for desk accessory menu } CmdMenu = 257; { menu ID for Command menu } SndMenu = 256; { menu ID for Send menu } ShowMenu = 258; { menu ID for Show menu } VAR myMenus: ARRAY [1..lastMenu] OF MenuHandle; myEvent: EventRecord; code,refNum: INTEGER; whichWindow: WindowPtr; theMenu,theItem: INTEGER; dragRect,screen:Rect; mainstack: integer; TempText:STR255; {$S InitSeg} PROCEDURE SetUpMenus; { Once-only initialization for menus } VAR i: INTEGER; appleTitle: STRING[1]; BEGIN InitMenus; { initialize Menu Manager } appleTitle := ' '; appleTitle[1] := CHR(20); myMenus[1] := NewMenu(appleMenu,appleTitle); AddResMenu(myMenus[1],'DRVR'); { desk accessories } myMenus[2] := GetMenu(CmdMenu); myMenus[3] := GetMenu(SndMenu); myMenus[4] := GetMenu(ShowMenu); FOR i := 1 TO lastMenu DO InsertMenu(myMenus[i],0); DrawMenuBar; if NOT tn_tftp then DisableItem(myMenus[1],0); {disable desk accessories} {$IFC LISTEN} EnableItem(myMenus[2],5); {$ENDC} {$IFC TCPSTATS} EnableItem(myMenus[4],1); {$ENDC} {$IFC UDPSTATS} EnableItem(myMenus[4],4); {$ENDC} {$IFC IPSTATS} EnableItem(myMenus[4],5); {$ENDC} END; { of SetUpMenus } {$S } PROCEDURE DoCommand(mResult: LongInt); VAR DummyInt,i: Integer; TempLong:LongInt; myNode,myNet:INTEGER; BEGIN theMenu := HiWord(mResult); theItem := LoWord(mResult); CASE theMenu OF appleMenu: BEGIN GetItem(myMenus[1],theItem,TempText); refNum := OpenDeskAcc(TempText); END; CmdMenu: TelnetMenuCmd(theItem,myMenus[2]); SndMenu: SendMenuCmd(theItem,myMenus[3]); ShowMenu: begin case theItem of {$IFC TCPSTATS} 1: showstats; {$ENDC} 2: { Address of my machine } begin cvt_inaddr(in_mymach(0),Msg); Message(StrCvt('My Internet address:'),@Msg); end; 3: { Show Local Appletalk Address } if GetNodeAddress(myNode,myNet) = noErr then begin Msg := 'Network: '; NumToStr(myNet,TempText); insert(TempText,Msg,length(Msg)+1); insert(', Node: ',Msg,length(Msg)+1); NumToStr(myNode,TempText); insert(TempText,Msg,length(Msg)+1); Message(StrCvt('My Appletalk address:'),@Msg); end; {$IFC UDPSTATS} 4: udp_table; {$ENDC} {$IFC IPSTATS} 5: in_stats; {$ENDC} end; end; END; { of menu case } HiliteMenu(0); END; { of DoCommand } {$S InitSeg } FUNCTION StackBase:LongInt; CONST CurStackBase = $908; { system global } TYPE LongPtr = ^LongInt; BEGIN StackBase := LongPtr(CurStackBase)^; END; PROCEDURE InitNetwork; BEGIN MainStack := 4096; IPStack := 4096; SetApplLimit(POINTER(StackBase - (MainStack + IPStack + ARPTKSZ + TFTKSZ + TCPTKSZ + TNTKSZ + 2048))); MaxApplZone; MoreMasters; MoreMasters; MoreMasters; MoreMasters; MoreMasters; if (ORD4(ApplicZone^.bkLim) - ORD4(ApplicZone)) < $19000 { 100K } then tn_tftp := false else tn_tftp := true; InitGraf(@thePort); InitFonts; FlushEvents(everyEvent,0); InitWindows; SetUpMenus; InitDialogs(NIL); InitCursor; TEInit; screen := screenBits.bounds; SetRect(dragRect,4,24,screen.right-4,screen.bottom-4); ErrInit; if MPPOpen <> noErr then Fatal(StrCvt('Can''t open Mac Protocol Package'),false); Main_Task := tk_init(mainstack); tm_init; in_init; IcmpInit; GgpInit; UdpInit; if tn_tftp then tftpinit; tcp_init(512); tel_init; tn_done := FALSE; END; {$S } PROCEDURE MainEventLoop; CONST NetworkEvt = 10; VAR dp:DialogPtr; itemHit:INTEGER; i:INTEGER; BEGIN REPEAT SystemTask; if GetNextEvent(everyEvent,myEvent) then begin if IsDialogEvent(myEvent) then begin if NOT DialogSelect(myEvent,dp,itemHit) then begin if (myEvent.what = mouseDown) then begin IF NOT ClickResolve(myEvent) THEN ; end else if (myEvent.what = activateEvt) then begin if NOT ActResolve(myEvent) then ; end; cycle; end; end; CASE myEvent.what OF mouseDown: BEGIN code := FindWindow(myEvent.where,whichWindow); CASE code OF inMenuBar: begin TNFixMenu(myMenus[2]); FixSendMenu(myMenus[3]); DoCommand(MenuSelect(myEvent.where)); end; inSysWindow: SystemClick(myEvent,whichWindow); inDrag: DragWindow(whichWindow,myEvent.where,dragRect); inGrow,inContent: BEGIN IF whichWindow = myWindow then begin IoClick(code,myEvent.where,myEvent.modifiers) end ELSE IF whichWindow <> FrontWindow THEN SelectWindow(whichWindow) END; inGoAway: ; END; { of code case } END; { of mouseDown } keyDown,autoKey: IF (myWindow=FrontWindow) THEN begin { when connection is open, keyboard input gets treated as terminal input; at other times it is ignored } em_input(@myEvent,TempText); for i := 1 to length(TempText) do gt_usr(TempText[i]); end; activateEvt: if POINTER(myEvent.message) = myWindow then IoActivate(myEvent.modifiers); updateEvt: if POINTER(myEvent.message) = myWindow then IoUpdate; END; { of event case } END { of if GetNextEvent } ELSE IF myEvent.what = nullEvent THEN begin tk_yield; { See if anyone else wants to execute } IOIdle; end; UNTIL tn_done; END; { end of My Main Event Loop } BEGIN { main program } InitNetwork; UnloadSeg(@InitNetwork); MainEventLoop; in_close; tm_allFree; END. !E!O!F! # # echo extracting appl/telneto.text... cat >appl/telneto.text <<'!E!O!F!' appl-telneto.rsrc Type CODE appl-telnetL,0 !E!O!F! # # echo extracting appl/telnetr.text... cat >appl/telnetr.text <<'!E!O!F!' * Resource compiler file for TELNET * *{ Please note the copyright notice in the file "copyright/notice" } * appl-telnetr.Rsrc Type MENU ,256 Send Local Echo "Are You There?" "Abort Output" "Break" Expedite Data ,257 Commands Open... Close Send Immediately TFTP Service (Listen Quit ,258 Show (TCP Statistics My Internet Address My Appletalk Address (Active UDP Connections (IP Statistics Type DLOG ,11 90 50 200 440 Visible 1 NoGoAway 0 13 Confirm File Transfer Type DITL ,13 4 BtnItem Enabled 80 90 105 150 YES BtnItem Enabled 80 240 105 300 NO StatText Disabled 5 20 25 370 You have received a TFTP (file transfer) request. StatText Disabled 25 20 75 370 The host ^0 wants to ^1 the file "^2". Is that all right? Type DLOG ,49 100 125 245 375 Invisible 3 NoGoAway 0 51 Error Box Type DITL ,51 2 StatText Disabled 10 10 25 240 A Network Error Happened! StatText Disabled 80 10 135 240 Set by SetIText Type DLOG ,31 100 125 245 375 Visible 1 NoGoAway 0 62 Name Foreign Host Type DITL ,62 4 BtnItem Enabled 10 50 40 110 OK BtnItem Enabled 10 140 40 200 CANCEL EditText Disabled 115 10 130 240 DefaultForeignHost StatText Disabled 50 10 100 240 Please type in the name or number of the foreign host you want to reach. Type ALRT ,333 80 100 255 420 444 FFFF Type DITL ,444 3 BtnItem Enabled 140 110 165 210 QUIT StatText Disabled 10 90 55 300 A fatal error happened! The program will die. StatText Disabled 80 20 135 300 ^0 Type ALRT ,666 80 100 255 420 777 FFFF Type DITL ,777 5 BtnItem Enabled 140 110 165 210 HALT StatText Disabled 10 90 55 300 Fatal Error! A task overflowed its stack! StatText Disabled 80 20 95 300 Stack Pointer about ^0 StatText Disabled 100 20 115 300 Task control block at ^1 StatText Disabled 120 20 135 300 Task name is ^2 Type DLOG ,77 50 100 295 375 Visible 4 NoGoAway 0 78 IP Statistics Type DITL ,78 22 StatText Disabled 15 180 30 265 precv StatText Disabled 35 180 50 265 psnt StatText Disabled 55 180 70 265 pdrop StatText Disabled 75 180 90 265 bdchk StatText Disabled 95 180 110 265 unprot StatText Disabled 115 180 130 265 bdvers StatText Disabled 135 180 150 265 bdlen StatText Disabled 155 180 170 265 ttlexp StatText Disabled 175 180 190 265 frags StatText Disabled 195 180 210 265 free StatText Disabled 215 180 230 265 fail StatText Disabled 15 10 30 170 Packets Received: StatText Disabled 35 10 50 170 Packets Sent: StatText Disabled 55 10 70 170 Packets Dropped: StatText Disabled 75 10 90 170 Bad Checksums: StatText Disabled 95 10 110 170 Unhandled Protocols: StatText Disabled 115 10 130 170 Bad Versions: StatText Disabled 135 10 150 170 Bad Lengths: StatText Disabled 155 10 170 170 TTL Expired: StatText Disabled 175 10 190 170 Fragments: StatText Disabled 195 10 210 170 Free Packets: StatText Disabled 215 10 230 170 Listen Failures: Type DLOG ,93 100 75 250 425 Visible 4 NoGoAway 0 94 UDP Statistics Type DITL ,94 15 StatText Disabled 10 10 25 70 Local StatText Disabled 10 78 25 138 Foreign StatText Disabled 10 146 25 206 Host StatText Disabled 10 214 25 276 Handler StatText Disabled 10 284 25 344 Cn StatText Disabled 30 10 45 70 StatText Disabled 30 78 45 138 StatText Disabled 30 146 45 206 StatText Disabled 30 214 45 276 StatText Disabled 30 284 45 344 StatText Disabled 50 10 65 70 StatText Disabled 50 78 65 138 StatText Disabled 50 146 65 206 StatText Disabled 50 214 65 276 StatText Disabled 50 284 65 344 Type BNDL ,128 TLNT 0 2 ICN# 1 0 128 FREF 1 0 128 Type FREF ,128 APPL 0 *Switcher application size resource Type SIZE = HEXA ,-1 00000002000000018000 Type TLNT = STR ,0 TELNET Version 1.2, 10 September 1985 !E!O!F! # # echo extracting appl/tftp.link.text... cat >appl/tftp.link.text <<'!E!O!F!' $EXEC L{ink}? +X { no more options} appl-tftp obj-quickdraw obj-tooltraps obj-ostraps obj-prlink obj-packtraps obj-rtlib obj-pasinit obj-paslibasm obj-paslib obj-abpascalls sfmget-sfmintf sfmget-sfmintf_asm net-err_lib net-task_lib net-task_asm net-timer_lib net-cust_lib net-name_host net-arp_lib net-ip_listen net-icmp_lib net-ip_lib net-udp_lib net-name_user net-tftp_defs net-tftp_file net-tftp_lib net-calls net-call_asm {no more object files} {list on console} appl-tftpL.OBJ $ENDEXEC !E!O!F! # # echo extracting appl/tftp.text... cat >appl/tftp.text <<'!E!O!F!' {$X-} {$M+} {$R-} {$0V-} {$D-} {$DECL DEBUG} {$SETC DEBUG := false} PROGRAM TFTP; { Please note the copyright notice in the file "copyright/notice" } { TFTP - Trivial File transfer over Applebus } { by Mark Sherman (Dartmouth) and Tim Maroney (C-MU) } {$L-} USES {$U-} {$U Obj-Memtypes } Memtypes, {$U Obj-QuickDraw } QuickDraw, {$U Obj-OSIntf } OSIntf, {$U Obj-ToolIntf } ToolIntf, {$U Obj-PackIntf } PackIntf, {$U Obj-ABPasIntf } ABPasIntf, {$U net-err_lib } Err_Lib, {$U net-Task_Lib } Task_Lib, {$U net-Timer_Lib } Timer_Lib, {$U net-ip_lib } IP_Lib, {$U net-arp_lib } ARP_Lib, {$U net-icmp_lib } ICMP_Lib, {$U net-UDP_Lib } UDP_Lib, {$U net-name_user } Name_User, {$U net-tftp_defs } TFTP_Defs, {$U net-tftp_lib } TFTP_Lib, {$U net-name_host } NameHost, {$U sfmget-SFMIntf } SFMIntf; {$L+} CONST lastMenu = 4; {number of menus } appleMenu = 1; { menu ID for desk accessory menu } CmdMenu = 256; { menu ID for Command menu } ShowMenu = 258; { menu ID for Show menu } SettingMenu = 257; { menu ID for Setting menu } RFileDialog = 11; MCmd = 2; MSetting = 3; MShow = 4; ServerItem = 3; MYTKSZ = 6144; VAR myMenus: ARRAY [1..lastMenu] OF MenuHandle; SGOK,SPOK:Boolean; doneFlag: BOOLEAN; myEvent: EventRecord; code,refNum: INTEGER; whichWindow: WindowPtr; theMenu,theItem: INTEGER; dragRect,screen:Rect; TempText:STR255; ServerEnabled: Boolean; INFOMSGChked, NETERRChked, PROTERRChked : BOOLEAN; LocalFileName, DestFileName, DestHostName, Directory: STR255; LocalVolume:Integer; tftpnum: Integer; fhost: in_name; ModeToUse: Integer; IPuninited: Boolean; UserTask, Server_Task: Ref_Task; UserDirection: Integer; UserRunning: Boolean; mainstack: integer; {$S TFTPSeg } PROCEDURE tfshow(host:in_name;fileName:StringPtr;mode:Integer); BEGIN Msg := 'tftp #'; NumToStr(tftpnum,TempText); insert(TempText,Msg,length(Msg)+1); tftpnum := tftpnum + 1; insert(', with ',Msg,length(Msg)+1); cvt_inaddr(host,TempText); insert(TempText,Msg,length(Msg)+1); insert(': ',Msg,length(Msg)+1); IF mode = GET THEN insert('Receiving ',Msg,length(Msg)+1) ELSE IF mode = PUT THEN insert('Sending ',Msg,length(Msg)+1) ELSE insert(' BAD direction ',Msg,length(Msg)+1); insert(fileName^,Msg,length(Msg)+1); Message(StrCvt('Starting file transfer.'),@Msg); END; FUNCTION tfprint(host:in_name;fileName:StringPtr;mode:Integer): Integer; BEGIN if ((mode = PUT) and NOT SGOK) or ((mode = GET) and NOT SPOK) THEN BEGIN Msg := 'From '; cvt_inaddr(host,TempText); insert(TempText,Msg,length(Msg)+1); insert(': Tried to ',Msg,length(Msg)+1); IF mode = GET THEN insert('put ',Msg,length(Msg)+1) ELSE IF mode = PUT THEN insert('get ',Msg,length(Msg)+1); insert(fileName^,Msg,length(Msg)+1); Message(StrCvt('Rejected transfer request.'),@Msg); tfprint := 0; END else BEGIN tfshow(host,fileName,mode); tfprint := 1; END; END; PROCEDURE tfdone(success:integer); BEGIN IF success <> 0 THEN begin Msg := 'Successful transfer'; Message(StrCvt('File transfer done.'),@Msg); end; { Print nothing in case of error } END; PROCEDURE DoServer(Dummy:PTR); BEGIN tfsinit(@tfprint,@tfdone); tfs_on; WHILE (ServerEnabled) DO tk_yield; { Keep acting as server until disabled } tk_exit; END; PROCEDURE FixSetMenu; VAR i:Integer; BEGIN { Fix up the check marks on the menu } FOR i := 1 TO 4 DO CheckItem(MyMenus[MSetting],i,FALSE); case ModeToUse of ASCII: CheckItem(MyMenus[MSetting],1,TRUE); IMAGE: CheckItem(MyMenus[MSetting],2,TRUE); OCTET: CheckItem(MyMenus[MSetting],3,TRUE); MACINTOSH:CheckItem(MyMenus[MSetting],4,TRUE) end; END; FUNCTION SInitDialog: Boolean; CONST OKBut = 1; CancelBut = 2; GetBox = 3; PutBox = 4; SInitDlog = 50; VAR itemHit:INTEGER; MyDialog:DialogPtr; itemType:INTEGER; itemHndl:Handle; itemBox:Rect; BEGIN SGOK := true; SPOK := false; MyDialog := GetNewDialog(SInitDlog,NIL,POINTER(-1)); GetDItem(MyDialog,GetBox,itemType,itemHndl,itemBox); SetCtlValue(POINTER(ORD4(itemHndl)),1); GetDItem(MyDialog,PutBox,itemType,itemHndl,itemBox); SetCtlValue(POINTER(ORD4(itemHndl)),0); ModalDialog(NIL,itemHit); while not (itemHit in [OKBut, CancelBut]) do begin GetDItem(MyDialog,itemHit,itemType,itemHndl,itemBox); case itemHit of GetBox: BEGIN SGOK := NOT SGOK; SetCtlValue(POINTER(ORD4(itemHndl)),ORD(SGOK)); END; PutBox: BEGIN SPOK := NOT SPOK; SetCtlValue(POINTER(ORD4(itemHndl)),ORD(SPOK)); END; end; { case } ModalDialog(NIL, ItemHit); end; DisposDialog(MyDialog); if itemHit = CancelBut then SInitDialog := false else SInitDialog := true; END; FUNCTION NameRemFile(root:STR255; VAR oname:STR255; VAR host:STR255):Boolean; CONST OKBut = 1; CancelBut = 2; FileItem = 3; HostItem = 4; ASCIIitem = 5; IMAGEitem = 6; OCTETitem = 7; MACitem = 8; VAR itemHit:INTEGER; MyDialog:DialogPtr; itemType:INTEGER; itemHndl:Handle; itemBox:Rect; PROCEDURE ResetButton(val:INTEGER); VAR tmp:INTEGER; begin case ModeToUse of ASCII: tmp := ASCIIitem; IMAGE: tmp := IMAGEitem; OCTET: tmp := OCTETitem; MACINTOSH: tmp := MACitem; end; GetDItem(MyDialog,tmp,itemType,itemHndl,itemBox); SetCtlValue(POINTER(ORD4(itemHndl)),val); end; BEGIN if root = '' then begin ParamText('Name of The Directory','','',''); end else begin oname := concat(Directory,root); ParamText('Name of The Remote File','','',''); end; MyDialog := GetNewDialog(RFileDialog,NIL,POINTER(-1)); GetDItem(MyDialog,HostItem,itemType,itemHndl,itemBox); SetIText(itemHndl,DestHostName); GetDItem(MyDialog,FileItem,itemType,itemHndl,itemBox); SetIText(itemHndl,oname); SelIText(MyDialog,FileItem,0,16000); ResetButton(1); ModalDialog(NIL,itemHit); while not (itemHit in [1,2]) do begin ResetButton(0); case itemHit of ASCIIitem: ModeToUse := ASCII; IMAGEitem: ModeToUse := IMAGE; OCTETitem: ModeToUse := OCTET; MACitem: ModeToUse := MACINTOSH; end; GetDItem(MyDialog,itemHit,itemType,itemHndl,itemBox); SetCtlValue(POINTER(ORD4(itemHndl)),1); ModalDialog(NIL,itemHit); end; if itemHit = 2 then begin DisposDialog(MyDialog); FixSetMenu; NameRemFile := false; exit(NameRemFile); end; GetDItem(MyDialog,HostItem,itemType,itemHndl,itemBox); GetIText(itemHndl,host); GetDItem(MyDialog,FileItem,itemType,itemHndl,itemBox); GetIText(itemHndl,oname); DisposDialog(MyDialog); FixSetMenu; NameRemFile := true; END; VAR UserSuccess:Integer; PROCEDURE UserDone(success:Integer); BEGIN tk_wake(UserTask); UserSuccess := success; END; PROCEDURE DoTransfer; VAR TotalDeltat: LongInt; ADummy: INTEGER; BEGIN fhost := resolve_name(DestHostName); IF fhost = 0 THEN BEGIN Error2(StrCvt('TFTP: Couldn''t resolve host name '),@DestHostName); exit(DoTransfer); END; IF fhost = NAMETMO THEN BEGIN Error(StrCvt('TFTP: Name servers not responding')); exit(DoTransfer); END; tfshow(fhost,@LocalFileName,Userdirection); totalDeltat := tickCount; if tftpuse(fhost,@LocalFileName,LocalVolume,@DestFileName,Userdirection, ModeToUse,@UserDone) = 0 then begin UserSuccess := 0; exit(DoTransfer); end; tk_block; Totaldeltat := (tickCount - totalDeltat) DIV TPS; if userdirection = GET then ADummy := ORD(flushvol(NIL,LocalVolume)); if UserSuccess <> 0 then begin Msg := 'File transferred in '; NumToStr(Totaldeltat,TempText); insert(TempText,Msg,length(Msg)+1); insert(' seconds.',Msg,length(Msg)+1); Message(StrCvt('File transfer successful.'),@Msg); end; END; {dummy procedures to force loading of the segments they contain} {$S UDPNameS} PROCEDURE NameLoad; BEGIN END; {$S UDPSeg } PROCEDURE UDPLoad; BEGIN NameLoad END; {$S TFTPSeg } PROCEDURE DoUser(Dummy:PTR); VAR Pnt:Point; Reply:SFReply; SFDummy:SFTypeList; Files:StrLHandle; i:Integer; BEGIN Pnt.h := 100; Pnt.v := 90; WHILE TRUE DO BEGIN UserRunning := FALSE; tk_block; UserRunning := TRUE; DisableItem(MyMenus[MCmd],1); { turn off get } DisableItem(MyMenus[MCmd],2); { turn off put } EnableItem(MyMenus[MCmd],4); { turn on abort } { these next three statements are intended to prevent the need to swap disks if the disk with TFTP is ejected } CouldDialog(RFileDialog); CouldDialog(errID); UDPLoad; if UserDirection = GET then begin SFPutFile(Pnt,'Local File Name:',LocalFileName,NIL,Reply); if Reply.good then begin LocalFileName := Reply.fName; DestFileName := Reply.fName; LocalVolume := Reply.vRefNum; if NameRemFile(LocalFileName,DestFileName, DestHostName) then DoTransfer; end; end else begin { UserDirection = PUT } Files := SFMGetFile(Pnt,NIL,-1,SFDummy,NIL,BitOR(SFMmulti,SFMenable)); if Files <> NIL then begin if Files^^.howmany = 1 then begin { just one file selected } LocalFileName := Files^^.table[0].str^^; DestFileName := Files^^.table[0].str^^; LocalVolume := Files^^.volume; if NameRemFile(LocalFileName,DestFileName,DestHostName) then DoTransfer; end else begin { more than one file selected } if NameRemFile('',Directory,DestHostName) then begin for i := 0 to Files^^.howmany-1 do begin LocalFileName := Files^^.table[i].str^^; DestFileName := concat(Directory, Files^^.table[i].str^^); LocalVolume := Files^^.volume; DoTransfer; if UserSuccess = 0 then leave; end; { for } end; {if NameRemFile} end; { multiple files } DelFList(Files); { clean up from SFMGetFile } end; { if Files <> NIL } SFMEnd; end; { PUT } FreeDialog(RFileDialog); FreeDialog(errID); EnableItem(MyMenus[MCmd],1); { turn on get } EnableItem(MyMenus[MCmd],2); { turn on put } DisableItem(MyMenus[MCmd],4);{ turn off abort } END; { endless while } END; {$S InitSeg} PROCEDURE SetUpMenus; { Once-only initialization for menus } VAR i: INTEGER; appleTitle: STRING[1]; BEGIN InitMenus; { initialize Menu Manager } appleTitle := ' '; appleTitle[1] := CHR(20); myMenus[1] := NewMenu(appleMenu,appleTitle); AddResMenu(myMenus[1],'DRVR'); { desk accessories } myMenus[MCmd] := GetMenu(CmdMenu); myMenus[MSetting] := GetMenu(SettingMenu); myMenus[MShow] := GetMenu(ShowMenu); FOR i := 1 TO lastMenu DO InsertMenu(myMenus[i],0); DrawMenuBar; DisableItem(MyMenus[MCmd],4); { turn off abort } END; { of SetUpMenus } {$S } PROCEDURE DoCommand(mResult: LongInt); CONST FDirDialog = 60; DirItem = 3; VAR i: Integer; ItemHndl:Handle; myNode,myNet:INTEGER; itemHit:INTEGER; MyDialog:DialogPtr; itemType:INTEGER; itemBox:Rect; BEGIN theMenu := HiWord(mResult); theItem := LoWord(mResult); CASE theMenu OF appleMenu: BEGIN GetItem(myMenus[1],theItem,TempText); refNum := OpenDeskAcc(TempText); END; CmdMenu: BEGIN CASE theItem OF 1,2: BEGIN DisableItem(MyMenus[MCmd],3); { turn off server } IF UserTask = NIL THEN BEGIN UserTask := tk_fork(Main_Task,@DoUser, MYTKSZ, 'DoUser',NIL); tk_yield; { Give initial wakeup } END; IF theItem = 1 THEN UserDirection := GET ELSE UserDirection := PUT; tk_wake(UserTask); END; 3: BEGIN if SInitDialog then begin ServerEnabled := TRUE; Server_Task := tk_fork(Main_Task,@DoServer,MYTKSZ, 'Server',NIL); { Disable all commands but Quit } CheckItem(MyMenus[MCmd],ServerItem,TRUE); DisableItem(MyMenus[MSetting],0); DisableItem(MyMenus[MCmd],1); DisableItem(MyMenus[MCmd],2); DisableItem(MyMenus[MCmd],3); end; END; 4: tfabort; 5: doneFlag := TRUE; END; { of item case } END; { of CmdMenu } SettingMenu: BEGIN CASE theItem OF 1: ModeToUse := ASCII; 2: ModeToUse := IMAGE; 3: ModeToUse := OCTET; 4: ModeToUse := MACINTOSH; 5: { Remote Host } if NameRemoteHost(TempText) then DestHostName := TempText; 6: BEGIN { Remote Directory } MyDialog := GetNewDialog(FDirDialog,NIL,POINTER(-1)); GetDItem(MyDialog,DirItem,itemType,itemHndl,itemBox); SetIText(itemHndl,Directory); SelIText(MyDialog,DirItem,0,16000); ModalDialog(NIL,itemHit); if itemHit = 1 then GetIText(itemHndl,Directory); DisposDialog(MyDialog); END; END; { End of item case } FixSetMenu; END; { of SettingMenu } ShowMenu: begin case theItem of 1: BEGIN { Show UDP statistics } udp_table; END; 2: { Address of my machine } begin cvt_inaddr(in_mymach(0),Msg); Message(StrCvt('My Internet address:'),@Msg); end; 3: { Show Local Appletalk Address } if GetNodeAddress(myNode,myNet) = noErr then begin Msg := 'Network: '; NumToStr(myNet,TempText); insert(TempText,Msg,length(Msg)+1); insert(', Node: ',Msg,length(Msg)+1); NumToStr(myNode,TempText); insert(TempText,Msg,length(Msg)+1); Message(StrCvt('My Appletalk address:'),@Msg); END; 4: begin in_stats; end; END; { case theItem of } END; { ShowMenu } END; { case theMenu of } HiliteMenu(0); END; { of DoCommand } {$S InitSeg } FUNCTION StackBase:LongInt; CONST CurStackBase = $908; { system global } TYPE LongPtr = ^LongInt; BEGIN StackBase := LongPtr(CurStackBase)^; END; PROCEDURE InitNetwork; BEGIN MainStack := 4096; IPStack := 4096; SetApplLimit(POINTER(StackBase - (MainStack + IPStack + ARPTKSZ + TFTKSZ + MYTKSZ + 2048))); MaxApplZone; MoreMasters; MoreMasters; MoreMasters; MoreMasters; MoreMasters; InitGraf(@thePort); InitFonts; FlushEvents(everyEvent,0); InitWindows; SetUpMenus; InitDialogs(NIL); InitCursor; TEInit; screen := screenBits.bounds; SetRect(dragRect,4,24,screen.right-4,screen.bottom-4); ErrInit; if MPPOpen <> noErr then Fatal(StrCvt('Can''t open Mac Protocol Package'),false); Main_Task := tk_init(mainstack); tm_init; in_init; IcmpInit; GgpInit; UdpInit; tftpinit; { end of Init_IP } INFOMSGChked := True; NETERRChked := True; PROTERRChked := True; ServerEnabled := False; LocalFileName := ''; DestFileName := ''; Directory := ''; DestHostName := DefaultHost; ModeToUse := ASCII; CheckItem(MyMenus[MSetting],1,true); tftpnum := 0; IPuninited := TRUE; server_task := NIL; UserTask := NIL; UserRunning := FALSE; doneFlag := FALSE; END; {$S } PROCEDURE MainEventLoop; CONST NetworkEvt = 10; VAR dp:DialogPtr; itemHit:INTEGER; BEGIN REPEAT SystemTask; if GetNextEvent(everyEvent,myEvent) then begin if IsDialogEvent(myEvent) then begin if NOT DialogSelect(myEvent,dp,itemHit) then begin if (myEvent.what = mouseDown) then begin IF NOT ClickResolve(myEvent) THEN ; end else if (myEvent.what = activateEvt) then begin if NOT ActResolve(myEvent) then ; end; cycle; end; end; CASE myEvent.what OF mouseDown: BEGIN code := FindWindow(myEvent.where,whichWindow); CASE code OF inMenuBar: DoCommand(MenuSelect(myEvent.where)); inSysWindow: SystemClick(myEvent,whichWindow); inDrag: DragWindow(whichWindow,myEvent.where,dragRect); inGrow,inContent: BEGIN IF whichWindow <> FrontWindow THEN SelectWindow(whichWindow) END; END; { of code case } END; { of mouseDown } keyDown,autoKey: SysBeep(2); END; { of event case } END { of if GetNextEvent } ELSE IF myEvent.what = nullEvent THEN tk_yield; UNTIL doneFlag; END; BEGIN { main program } InitNetwork; UnLoadSeg(@InitNetwork); MainEventLoop; in_close; tm_allFree; END. !E!O!F! # # echo extracting appl/tftpo.text... cat >appl/tftpo.text <<'!E!O!F!' appl-tftpo.rsrc Type CODE appl-tftpl,0 !E!O!F! # # echo extracting appl/tftpr.text... cat >appl/tftpr.text <<'!E!O!F!' * TftpResDef -- Resource input for TFTP program * *{ Please note the copyright notice in the file "copyright/notice" } appl-tftpr.Rsrc Type MENU ,256 File Get... Put... Server... Abort Quit ,257 Settings ASCII Mode IMAGE Mode OCTET Mode MACINTOSH Mode Remote Host... Remote Directory... ,258 Show UDP Statistics My Internet Address My Appletalk Address IP Statistics Type DLOG ,11 90 75 260 425 Visible 1 NoGoAway 0 17 Type DITL ,17 10 BtnItem Enabled 114 15 132 160 OK BtnItem Enabled 114 190 132 335 Cancel EditText Disabled 34 15 50 335 Put Name Here EditText Disabled 84 15 100 335 Put Host Here RadioItem Enabled 150 15 165 90 ASCII RadioItem Enabled 150 95 165 170 Image RadioItem Enabled 150 175 165 250 Octet RadioItem Enabled 150 255 165 330 Mac StatText Disabled 12 15 28 335 ^0: StatText Disabled 62 15 78 335 Name or Address of the Remote Host: Type DLOG ,50 100 100 215 400 Visible 2 NoGoAway 0 52 Type DITL ,52 5 BtnItem Enabled 65 34 97 114 OK BtnItem Enabled 65 180 97 260 CANCEL ChkItem Enabled 35 35 52 115 Fetch ChkItem Enabled 35 180 51 280 Store StatText Disabled 10 35 31 280 Indicate which transfers to allow: Type DLOG ,49 100 125 245 375 Invisible 3 NoGoAway 0 51 Error Box Type DITL ,51 2 StatText Disabled 10 10 25 240 A Network Error Happened! StatText Disabled 80 10 135 240 Set by SetIText Type DLOG ,60 100 80 190 420 Visible 1 NoGoAway 0 61 Foreign Directory Type DITL ,61 4 BtnItem Enabled 10 95 30 155 OK BtnItem Enabled 10 185 30 245 CANCEL EditText Disabled 65 10 80 330 dir StatText Disabled 40 10 55 330 Please type in the foreign directory name. Type DLOG ,-4001 0 0 152 358 InVisible 1 NoGoAway 0 -4001 Type DITL ,-4001 12 BtnItem Enabled 28 162 46 242 Open BtnItem Disabled 59 1552 77 1232 Invisible BtnItem Enabled 90 162 108 242 Cancel *the volume name UserItem Disabled 22 258 54 354 BtnItem Enabled 59 266 77 346 Eject BtnItem Enabled 90 266 108 346 Drive *the window in the dialog UserItem Enabled 11 12 125 135 *the scroll bar for the window UserItem Enabled 11 134 125 150 *the gray line UserItem Disabled 20 254 116 255 StatText Disabled 20 1044 116 1145 Invisible Text *the horizontal scroll bar UserItem Enabled 124 12 140 135 ChkItem Enabled 125 172 140 346 Multiple File Selection Type DLOG ,31 100 125 245 375 Visible 1 NoGoAway 0 62 Name Foreign Host Type DITL ,62 4 BtnItem Enabled 10 50 40 110 OK BtnItem Enabled 10 140 40 200 CANCEL EditText Disabled 115 10 130 240 DefaultForeignHost StatText Disabled 50 10 100 240 Please type in the name or number of the foreign host you want to reach. Type ALRT ,333 80 100 255 420 444 FFFF Type DITL ,444 3 BtnItem Enabled 140 110 165 210 QUIT StatText Disabled 10 90 55 300 A fatal error happened! The program will die. StatText Disabled 80 20 135 300 ^0 Type ALRT ,666 80 100 255 420 777 FFFF Type DITL ,777 5 BtnItem Enabled 140 110 165 210 HALT StatText Disabled 10 90 55 300 Fatal Error! A task overflowed its stack! StatText Disabled 80 20 95 300 Stack Pointer about ^0 StatText Disabled 100 20 115 300 Task control block at ^1 StatText Disabled 120 20 135 300 Task name is ^2 Type DLOG ,77 50 100 295 375 Visible 4 NoGoAway 0 78 IP Statistics Type DITL ,78 22 StatText Disabled 15 180 30 265 precv StatText Disabled 35 180 50 265 psnt StatText Disabled 55 180 70 265 pdrop StatText Disabled 75 180 90 265 bdchk StatText Disabled 95 180 110 265 unprot StatText Disabled 115 180 130 265 bdvers StatText Disabled 135 180 150 265 bdlen StatText Disabled 155 180 170 265 ttlexp StatText Disabled 175 180 190 265 frags StatText Disabled 195 180 210 265 free StatText Disabled 215 180 230 265 fail StatText Disabled 15 10 30 170 Packets Received: StatText Disabled 35 10 50 170 Packets Sent: StatText Disabled 55 10 70 170 Packets Dropped: StatText Disabled 75 10 90 170 Bad Checksums: StatText Disabled 95 10 110 170 Unhandled Protocols: StatText Disabled 115 10 130 170 Bad Versions: StatText Disabled 135 10 150 170 Bad Lengths: StatText Disabled 155 10 170 170 TTL Expired: StatText Disabled 175 10 190 170 Fragments: StatText Disabled 195 10 210 170 Free Packets: StatText Disabled 215 10 230 170 Listen Failures: Type DLOG ,93 100 75 250 425 Visible 4 NoGoAway 0 94 UDP Statistics Type DITL ,94 15 StatText Disabled 10 10 25 70 Local StatText Disabled 10 78 25 138 Foreign StatText Disabled 10 146 25 206 Host StatText Disabled 10 214 25 276 Handler StatText Disabled 10 284 25 344 Cn StatText Disabled 30 10 45 70 StatText Disabled 30 78 45 138 StatText Disabled 30 146 45 206 StatText Disabled 30 214 45 276 StatText Disabled 30 284 45 344 StatText Disabled 50 10 65 70 StatText Disabled 50 78 65 138 StatText Disabled 50 146 65 206 StatText Disabled 50 214 65 276 StatText Disabled 50 284 65 344 Type BNDL ,128 TFTP 0 2 ICN# 1 0 128 FREF 1 0 128 Type FREF ,128 APPL 0 Type TFTP = STR ,0 TFTP Version 2.2, 10 September 1985 !E!O!F! exit -=- Tim Maroney, Professional Heretic, CMU Center for Art and Technology tim@k.cs.cmu.edu | uucp: {seismo,decwrl,ucbvax,etc.}!k.cs.cmu.edu!tim CompuServe: 74176,1360 | God is not dead; he just smells funny.