Fun with userspace AppleTalk

I didn’t see one called that, but I did try turning off a bunch of extensions including one called Foreign File Exchange. Now the PHOTO_CD request is gone which is good, but Mac OS still locks up so seems like that was a red herring. Definitely think it’s some rogue extension now
 
The malformed packets may be a problem... or not. Gotta love the lack of error handling in classic MacOS though. When trying to root out bugs in Netatalk, I've found it helpful to do packet traces using one of Apple's AFP servers to see how the communication should progress. The built-in file sharing in System 7+ should be fine for this.

I also have a wide variety of clients on hand since they have their fair share of bugs too. For example, ASC 3.7.x has some quirks in its DSI implementation.
 
At this point I dont _think_ I have any malformed ones left. The only one I am unsure about is FPGetSrvrMsg - Even though that should only be in AFP 2.1 and I am only advertising AFP2.0 and under it still seems to send it. Wireshark seems happy about what I am sending, though.

But yes I think you're right - I have a B&W G3 desktop I should fire up and just capture the conversation between the two to see what I might be doing wrong
 
Just tried booting Mac OS 9.2 on the PowerBook and it gets much farther, before exploding because I have yet to implement the rest of the directory bitmap types 😅 But that seems to confirm at least that on a clean setup it doesn't stall at the FPGetSrvrMsg call.
 
Success! After implementing far more AFP commands than I ever thought I'd need to, I have Linux to Mac OS file copying working with AFP 2.0 via EtherTalk (and indirectly to LocalTalk clients via an Asante). Of course have to get my favourite Rust crab copied first, and using it to copy a load of extra software now too.

So pleased to see it working. Now just to get the other direction working which I _think_ just needs a few more commands and I'll have a pretty basic daemon working that supports AFP and PAP. Afterwards I'll be adding support for it directly using TashTalk, and getting this published for others to start toying with,
IMG_2610.JPEG
 
Hm interestingly on long file transfers I’m seeing my PowerBook just hard lock again. Gets about 30MiB in to a file copy then just halts network activity and everything stops responding on it (no mouse or anything).

Following the capture does not reveal anything interesting it just randomly stops sending FPRead commands, an it happens anywhere from a few megs in to 50.

I’m starting to wonder now if my test machine has bad RAM? Maybe that explains all the really odd crashes I’ve had during testing. Will post a capture here later on if anyone could double check my findings.
 
Hm interestingly on long file transfers I’m seeing my PowerBook just hard lock again. Gets about 30MiB in to a file copy then just halts network activity and everything stops responding on it (no mouse or anything).

Following the capture does not reveal anything interesting it just randomly stops sending FPRead commands, an it happens anywhere from a few megs in to 50.

I’m starting to wonder now if my test machine has bad RAM? Maybe that explains all the really odd crashes I’ve had during testing. Will post a capture here later on if anyone could double check my findings.
Since it's a PowerBook, what are your energy saver settings? Is it trying to go to sleep, disrupting network connections (but not actually going to sleep)?
 
And now write support works! Ferris the Crab was able to make a round trip from my tablet to the PB and back again and still have the same contents. ASP is such an amusing protocol with having the client request the server to ask for packets from it to do a write. Had to implement Icon support too just to make things happy, as it gets rather upset if I dont issue an SpWrtContinue when it tries to add one.

Since it's a PowerBook, what are your energy saver settings? Is it trying to go to sleep, disrupting network connections (but not actually going to sleep)?
I dont think so, as it is only a short period of time until it occurs (30 or so seconds). On the packet captures though I am watching the FPRead commands come in where it starts off with quite a large ReqCount (Usually 262144). I respond with 8 x Quantum Size ATP responses which is 4624 bytes each time, and it correctly advances the offset and now has $ORIG_REQ_COUNT - 4624. It repeats this until the req count finally reaches < 4624 where it gets less than 8 ATP responses and it then resets back up to the large ReqCount.

_However_ each time it freezes it is right when it would wrap that ReqCount back up to a higher number. I am convinced I must have something off with my math somewhere that it is throwing a wobbler, but still trying to figure out what, as small reads up to a few megs always work fine, its just when I am trying to copy big things that it fails. I successfully copied a 30MiB Toast .sit file over the other day, and the one that is getting me is a 515 MiB Toast image. It never freezes at the same offset but it does consistently freeze at that wrap. What is weird too is that right as it freezes it does two AFP FPGetVolParms calls. Anyways, if anyone has a mo to take a look I've attached the packet capture here. Would love if someone has an idea.
 

Attachments

Last edited:
Back
Top