Commit Graph

23 Commits

Author SHA1 Message Date
Stephen Heumann 73399e8eda Add initial code for AFP Mounter CDev.
This code tries to call EasyMount using the request procedure documented in its ERS, but it turns out that doesn't work. The request procedure trashes its return address on the stack, so it crashes whenever you call it.
2017-04-11 17:34:00 -05:00
Stephen Heumann dca542e0cd Support "asynchronous" LookupName calls (not really executed asynchronously).
This allows the "choose" utility from Apple to work.
2017-04-09 23:23:29 -05:00
Stephen Heumann 35bcc701d3 Check for presence of AppleShare FST and don't load if it is missing.
We also don't load if the Marinetti tool stub is missing (we can't easily check for the Marinetti init).
2017-04-09 22:06:13 -05:00
Stephen Heumann 3b2f1b6a25 Pass through calls we don’t handle to the original AppleTalk stack.
It is now possible to have AFP volumes mounted over both AppleTalk and TCP/IP simultaneously.
2017-04-09 20:57:09 -05:00
Stephen Heumann 6c6dff0e18 Use timers when connecting and disconnecting, so failures don't result in long hangs. 2017-04-09 19:55:47 -05:00
Stephen Heumann 7dd2be9ae2 Patch NBPLookupName to map IP address or domain name to AppleTalk-style address. 2017-04-09 00:08:11 -05:00
Stephen Heumann f0dee6d55c Various makefile updates.
It is now set up to use the stock ORCA libraries and to enable most optimizations.
2017-04-08 22:05:32 -05:00
Stephen Heumann 503b15b5e4 Make afpbridge an init.
This currently uses the run queue to poll for messages from the server, which works OK in typical desktop programs but not in other environments.
2017-04-05 00:24:54 -05:00
Stephen Heumann 1f6122ba39 Correctly detect when Marinetti needs to be loaded. 2017-04-03 23:33:00 -05:00
Stephen Heumann c119492cec Work around problem with asynchronous polling calls from AppleShare FST.
This patch disables asynchronous SPCommand calls to work around the problem, which was causing hangs and crashes when those calls triggered. This effectively prevents the FST from automatically polling to check if the volume has been changed, but shouldn't cause other problems.
2017-04-03 20:19:30 -05:00
Stephen Heumann 3f40a3190d Modify FPRead requests so they don’t return more data than will fit in the reply buffer.
This issue arises because ASP requests and replies are limited to a “quantum size” of 4624 bytes even if the amount requested is larger, and the AppleShare FST relies on this behavior in sizing its buffers. DSI does not have this limitation, so it was returning more data than would fit in the buffer.

Also improve error checking, so an error is reported in cases where the buffer is too small.
2017-04-03 16:36:50 -05:00
Stephen Heumann 17421e0ba5 Add support for calling asynchronous completion routines.
At this point it can connect and largely work, but there are still several issues.
2017-04-03 15:39:37 -05:00
Stephen Heumann 1bd953dd40 Fix memory trashing bug.
This occurred because a global with structure type was declared without the structure definition in scope. ORCA/C allows this, and just treats the struct variable as having size 0. As a result, it effectively shares the storage of whatever comes after it in the OMF file, leading to memory trashing.
2017-04-02 00:55:27 -05:00
Stephen Heumann 9720f37531 Initial code for installing our commands.
This code works to some extent, but tends to cause system hangs.

Also includes some DSI implementation fixes.
2017-04-01 15:32:32 -05:00
Stephen Heumann 65da8f895e Add utility for dumping the AppleTalk command table, and glue code for accessing it. 2017-03-25 18:19:42 -05:00
Stephen Heumann 7d79acda96 Complete AFP mounter program.
It can now successfully mount a volume, although only using a guest login.
2017-03-24 01:40:48 -05:00
Stephen Heumann f9a65d1f54 Start writing AFP mounter program/test case.
Currently this just does an NBP lookup.
2017-03-23 21:03:28 -05:00
Stephen Heumann 6367b37e6f Add glue code to make AppleTalk calls from ORCA/C. 2017-03-23 20:46:54 -05:00
Stephen Heumann ee83e402f8 Implement support for DSIWrite, plus a few other cleanups. 2017-03-23 02:31:06 -05:00
Stephen Heumann 275f3456ba Add support for sending DSICommand requests. 2017-03-22 20:13:20 -05:00
Stephen Heumann 83c702fcbb Include the FPGetSrvrInfo AFP-level request in DSIGetInfo packets.
The macOS AFP server gives a response even without this, but the protocol spec says it should be there.
2017-03-20 00:58:17 -05:00
Stephen Heumann 0b0a422c33 Updates to support opening and closing a session. 2017-03-19 17:23:42 -05:00
Stephen Heumann b5c3a29f37 Initial version, with test program.
It can currently send a GetStatus request and get a response.
2017-03-18 19:42:25 -05:00