Commit Graph

66 Commits

Author SHA1 Message Date
Stephen Heumann dd362b0b8f
Recommend latest version of Marinetti. 2021-03-05 19:10:19 -06:00
Stephen Heumann 527483b03b Return specific values from main() in the various programs.
Previously, there were bare "return;" statements in some places, even though main() was declared as returning int. This is disallowed by C99 and later, and ORCA/C now complains about it when using full lint checks.
2020-02-06 17:28:55 -06:00
Stephen Heumann fde8a3255b Explicitly recommend Marinetti 3.0b9 or later for best performance. 2018-07-04 20:58:30 -05:00
Stephen Heumann 195c828734 Add references to some other docs in the README. 2017-05-11 17:17:14 -05:00
Stephen Heumann 51aee4e093 Add instructions for mounting AFP volumes in a shell. 2017-05-11 17:09:21 -05:00
Stephen Heumann 3055089559 Clarify what kind of host names can be used. 2017-05-09 23:05:58 -05:00
Stephen Heumann dd6fb667cf Add build instructions. 2017-05-02 18:22:48 -05:00
Stephen Heumann 68759d93a0 Set theme jekyll-theme-dinky 2017-04-28 16:58:30 -05:00
Stephen Heumann 53294670f5 Add README. 2017-04-28 16:42:48 -05:00
Stephen Heumann 9f5fa330ed Add license. 2017-04-27 23:46:46 -05:00
Stephen Heumann 814158ab0e Reinstall our attention vector patch on return from P8.
It was getting uninstalled when the ATalk driver was restarted at that time.
2017-04-25 22:15:12 -05:00
Stephen Heumann 9ea3f1d2fb Don't call the ATalk driver's attention vector routine for DSI connections.
It is hard-coded to work with session numbers 1-8, and it may trash memory when passed higher session numbers. This was causing crashes after disconnecting in some cases.

This patch just bypasses the attention vector routine completely for DSI sessions (it's still called for sessions 1-8, i.e. ASP sessions). This should be OK, because its only real function was to display alerts about the connection being closed.
2017-04-25 18:30:39 -05:00
Stephen Heumann a38e2f716a Detect when Marinetti has disconnected, and close all sessions at that time.
Also, detect and give an error when invalid session numbers are used.
2017-04-24 17:47:16 -05:00
Stephen Heumann 13e4f4d72f Disable large writes by default, since they cause problems in Mac OS 9 and OS X. 2017-04-22 21:29:47 -05:00
Stephen Heumann c4286a024e Add options to give somewhat better compatibility with the AFP server in OS X 10.5.
*The OS X server doesn't support ProDOS-type file type info, so trying to set it will give an error. This normally causes GS/OS to give an error when creating a file. There is now an option to ignore the error and proceed with creating the file, although the file type still won't be set.

*The OS X server seems to restrict each write operation to a small size based on the ASP quantum, so there is now an option for this. Using this option means we may write less than requested, but the AppleShare FST can detect this and proceed to write the rest.
2017-04-22 18:46:26 -05:00
Stephen Heumann 898c4e531c Don't call TCPIPCloseTCP before calling TCPIPAbortTCP.
This isn't really necessary, and it sometimes seems to put Marinetti in a state where subsequent connections fail.
2017-04-22 17:16:35 -05:00
Stephen Heumann 3a07b12ee6 Allow fake sleep without AFP 2.2.
On the OS X 10.5 server, FPZzzzz messages seem to work even with a connection negotiated as AFP 2.0, so it's useful to allow this combination. (On Netatalk, the sleep requests are ignored and give an error under AFP 2.0, but they don't kill the connection either.)
2017-04-22 16:01:11 -05:00
Stephen Heumann 350204f78a Switch to using two-character codes for options and parsing them in the zone name.
This allows more options, and it avoids having to manually specify the strings for all option combinations.
2017-04-22 15:39:02 -05:00
Stephen Heumann 78a300f799 Add an option to tell the server that the GS is going to sleep after each command sent.
This tells the server to keep the session alive (typically for at least several hours) without sending or expecting tickles. This is useful in cases where our run queue procedure is not run regularly or at all, e.g. in text-mode shells.

The implementation here is geared toward compatibility with Netatalk and differs from Apple's published standards in a couple ways. It may or may not work with other servers.
2017-04-21 21:09:57 -05:00
Stephen Heumann 2cb7cc7572 Makefile adjustments.
Macros are now generated by 'make import', so I removed them from the repository.
2017-04-20 20:58:36 -05:00
Stephen Heumann 3dff06fdd6 Add rVersion and rComment resources for AFPBridge init. 2017-04-20 20:29:12 -05:00
Stephen Heumann 7d9dc2de54 Add rVersion and rComment resources for AFP Mounter CDev. 2017-04-20 20:11:55 -05:00
Stephen Heumann 8f72c9b89f Flag an error if we are expecting to receive data and don't get any for 30 seconds.
This prevents the system from hanging indefinitely if the network suddenly disconnects in the middle of an AFP operation.
2017-04-19 23:54:19 -05:00
Stephen Heumann 74e32c7d3f Work around issue where PFI gives an inappropriate "too many sessions" error.
It does this when the ASP layer gives a network error. To work around it, we count the number of sessions (possibly overestimating) and convert the error to "unable to open session" if PFI has not reached its session limit (8).
2017-04-19 21:56:37 -05:00
Stephen Heumann 6be698833d Detect if AFPBridge and Marinetti are installed, and give an error/warning if not.
We indicate that AFPBridge is installed by creating a message in the message center (which also includes its version, in case we want to distinguish between different versions in the future).
2017-04-19 21:10:23 -05:00
Stephen Heumann 4bb7e378ba Connect to the network before doing a DNS lookup, if we're not connected already. 2017-04-18 18:05:00 -05:00
Stephen Heumann d08a36c9ca Add small program to list sessions using FIListSessions2. 2017-04-18 17:47:49 -05:00
Stephen Heumann 33c4871183 Add wrapper code around PFI to save the server/zone names and properly return them in FIListSessions2.
This is necessary because FIListSessions2 has a bug that causes it to return garbage in the server/zone fields for DSI sessions. (The bug is essentially that PFI is indexing into its own tables based on the ASP/DSI session number, rather than properly using a PFI-level session index.)
2017-04-18 17:46:33 -05:00
Stephen Heumann 444fdbee49 Call NewHandle/DisposeHandle directly instead of using ORCA/C's malloc/free. 2017-04-16 20:54:18 -05:00
Stephen Heumann fe2680b65a Bail out early if we're in P8 mode.
This avoids any possible strange behavior with calling Marinetti in P8 mode. It also ensures that I/O operations in P8 mode will give an error, but not terminate the connection: it will still be alive when we get back to GS/OS, unless the server has killed it due to inactivity (which is quite possible).
2017-04-16 18:25:58 -05:00
Stephen Heumann 93e2a5a864 Call attention routine when appropriate, and handle close requests from the server. 2017-04-16 16:19:59 -05:00
Stephen Heumann 5b5295fd40 Fixes related to error handling and asynchronous command support. 2017-04-16 15:17:55 -05:00
Stephen Heumann 9d6dad03b4 Add support for soft reset.
This can occur when control-reset is pressed in P8 mode. It’s supposed to reinitialize the AppleTalk stack. In our case, we mark connections to be reset once we're back in GS/OS, since we can't call Marinetti in P8 mode.
2017-04-16 13:36:01 -05:00
Stephen Heumann 7d2c225d2f Add code to close the sessions when the system is shutting down.
This only works if our init is loaded before Marinetti’s, because otherwise Marinetti’s shutdown notification procedure gets control first and shuts down the connection.
2017-04-16 00:37:57 -05:00
Stephen Heumann e5c1cd4465 Allow AFPBridge init to work when loaded before the TCPIP init.
In that case, LoadOneTool returns an error, but the tool stub is still loaded, which is good enough (we just need its FPT to be loaded and installed in the TPT).
2017-04-15 23:01:48 -05:00
Stephen Heumann a52a041389 Add support for rewriting login requests to force use of AFP version 2.2.
This should add support for a greater variety of servers, which may only support AFP 2.2 and up (or refuse to use older versions over TCP).

The IIgs software is designed for AFP 2.0. AFP 2.2 is close enough that things seem to work, but there could potentially be a few compatibility issues.
2017-04-15 18:11:24 -05:00
Stephen Heumann d4857e483f Implement option to let read replies return more data than the specified reply buffer size.
This could be unsafe for some forms of client code, but it looks like the AppleShare FST always actually has a large enough buffer to hold the full amount being requested, and can deal with up to 65535 bytes being returned at once. We take advantage of this to do larger reads in a single request, which provides a noticeable performance advantage.
2017-04-15 00:06:43 -05:00
Stephen Heumann 695f2d8611 Implement infrastructure (in init and CDev) to support options encoded in the zone name. 2017-04-14 22:16:55 -05:00
Stephen Heumann df9a9f8821 Add UI for AFP over TCP options (not yet operational). 2017-04-14 18:50:17 -05:00
Stephen Heumann a610156e9a Use fast assembly code to handle EventsCDEV, rather than C.
With the C version (and its entry/exit code) typing in the URL box could be a little laggy when running at 2.8 MHz.
2017-04-13 17:10:58 -05:00
Stephen Heumann 079ab7e00a Work around an issue where the top and bottom of the LineEdit caret could blink out of sync.
This could happen when the caret had been partially obscured by another window.
2017-04-13 00:21:12 -05:00
Stephen Heumann ed3292dbc1 Support cut/copy/paste/clear operation on the LineEdit control. 2017-04-12 23:33:43 -05:00
Stephen Heumann 91c2707cf3 Complete basic implementation of AFP Mounter CDev.
It now invokes EasyMount by creating a temporary alias file. Support for saving the alias is also implemented.
2017-04-12 21:09:27 -05:00
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