Compare commits

...

8 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
7 changed files with 94 additions and 15 deletions

35
BUILDING.md Normal file
View File

@ -0,0 +1,35 @@
Building AFPBridge
==================
AFPBridge is designed to be built under GNO 2.0.6, with ORCA/C and ORCA/M
installed under `/lang/orca` as described in the GNO documentation.
I am using a custom version of ORCA/C with several patches applied,
but I believe a stock version of ORCA/C 2.1.x should also work.
You also need to get the `AppleTalk.h` header file, which is included
under `Libraries/APWCInclude` in an ORCA/C installation. Copy it either
to `/lang/orca/Libraries/ORCACDefs` or to the directory with the AFPBridge
source files. The original version of that file does not include
prototypes in its function declarations, which will cause an ORCA/C error
with the settings in the makefile. To avoid this, either remove the
`-w` flag from `CFLAGS` in `Makefile.mk`, or add the prototypes in
`AppleTalk.h`. If adding the prototypes, they should be `RamForbid(void)`,
`RamPermit(void)`, and `_CALLAT(void*)`.
To build AFPBridge using source files copied directly from the Git repository,
first run:
make import
This sets the file types appropriately, converts files to Apple II-style
line endings, and generates required assembly-language macro files.
Once that is done, you can build the code by running:
make
This builds the `AFPBridge` init, the `AFPMounter` CDev, and several
command-line utilities that can be useful for testing and debugging.
You can also run `make install` to install the init and CDev in your
system folder, or `make clean` to remove the generated files.

View File

@ -13,7 +13,8 @@ System Requirements
-------------------
* An Apple IIgs with AppleTalk enabled in the Control Panel (see below)
* System 6.0.1 or later, with AppleTalk-related components installed (see below)
* Marinetti (latest version recommended) and a compatible network interface
* Marinetti ([version 3.0b11 or later][Marinetti] recommended for best performance and compatibility)
* A Marinetti-compatible network interface (such as an Ethernet card)
Although AFPBridge uses TCP/IP rather than AppleTalk for networking, it relies on the AppleShare FST and related system components, and these are designed to work with AppleTalk. Therefore, the system must be configured to use AppleTalk, and the AppleTalk-related components in the system software must be installed and enabled.
@ -23,6 +24,8 @@ In order for the AppleShare FST and the components it requires to load and be us
If you wish to use AFPBridge in an emulator, it must be capable of running with AppleTalk enabled as discussed above, although it need not be capable of actually communicating over AppleTalk networks. GSplus, GSport, and perhaps other KEGS-based emulators should work. Sweet16 did not work in my testing, because the system hangs during boot-up when AppleTalk is enabled.
[Marinetti]: http://www.apple2.org/marinetti/index.html
Server Compatibility
--------------------
@ -51,6 +54,8 @@ The general form of URLs supported for AFP connections over TCP/IP is:
afp://[user[:password]@]server[:port]/volume
The server can be specified using an IP address or host name. A host name can only be used if the DNS server you are using can resolve it; other ways of naming systems on the local network are not supported.
It is also possible to use the AFP Mounter control panel to connect to AFP servers over AppleTalk (not relying on AFPBridge). The form of URLs for that is:
afp:/at/[user[:password]@]server[:zone]/volume
@ -70,9 +75,22 @@ The current options will be saved in any alias, as well as applying to connectio
* The __Ignore Errors Setting File Types__ option causes the IIgs to ignore errors when trying to set the ProDOS-style types of files on the server. This allows the IIgs to write files to servers that do not support ProDOS-style file types (such as the one in old versions of Mac OS X) without being stopped by these errors. Note that file types will not be correctly set when writing to such servers, even when using this option.
It is also possible to mount AFP volumes from the command line in a shell. For instructions on doing that, see [here][3].
[3]: https://sheumann.github.io/AFPBridge/ShellMount
Building AFPBridge
------------------
The full source code for AFPBridge is available [on GitHub][4]. For instructions on building it, see [here][5].
[4]: https://github.com/sheumann/AFPBridge
[5]: https://sheumann.github.io/AFPBridge/BUILDING
Contact
-------
If you have questions, comments, bug reports, or feature requests, you can contact me at stephen.heumann@gmail.com or submit them to the [issues page][3] on GitHub.
If you have questions, comments, bug reports, or feature requests, you can contact me at stephen.heumann@gmail.com or submit them to the [issues page][6] on GitHub.
[3]: https://github.com/sheumann/AFPBridge/issues
[6]: https://github.com/sheumann/AFPBridge/issues

26
ShellMount.md Normal file
View File

@ -0,0 +1,26 @@
Mounting AFP Volumes in a Shell
===============================
It is possible to mount AFP volumes from an ORCA, GNO, or APW shell command line. To do this, you should get the `Choose` utility produced by Apple. It is available on certain old Apple developer CDs, and in the Golden Orchard and Golden Grail software collections available for download [here][1]. On the Golden Orchard CD, the `Choose` command is available under `Programming:Apple:APW & ORCA Commands:Gregs.APW.Utils`. (The actual command is in the `Utilities` directory, and documentation is in the `Documentation` and `Utilities:Help` directories.)
`Choose` takes an argument of the form `zone:server:volume` to specify the server and volume to connect to. To connect to a server over TCP/IP, the server name is an IP address or host name, and a special zone name must be used. This is `AFP over TCP`, optionally followed by a parenthesized list of option codes as given in the table below. Multiple option codes should be separated by commas.
| Code | Option |
|:-----|:---------------------------------|
| `LR` | Use Large Reads |
| `LW` | Use Large Writes |
| `22` | Force AFP Version 2.2 |
| `FS` | Fake Sleep to Keep Alive |
| `IE` | Ignore Errors Setting File Types |
As an example, the following command could be used to connect to a server on the local network as a guest, using large reads and large writes:
Choose -guest "AFP over TCP (LR,LW):192.168.1.10:A2FILES"
See the documentation on `Choose` for more information about its arguments, including how to specify a username and password.
Note that AFPBridge is currently not able to send regular 'tickle' messages to keep AFP connections alive when a text-based shell is active. This may cause the server to terminate the connection if there is no activity for some length of time. You can avoid this by using the `FS` (Fake Sleep to Keep Alive) option, if it works with your server.
AFP volumes can be unmounted using the `Eject` command, available in the same place as `Choose`.
[1]: http://digisoft.callapple.org

1
_config.yml Normal file
View File

@ -0,0 +1 @@
theme: jekyll-theme-dinky

View File

@ -144,11 +144,10 @@ int main(void) {
PatchAttentionVector();
return;
return 0;
error:
setUnloadFlag();
return;
}
/*

View File

@ -44,7 +44,7 @@ int main(int argc, char **argv) {
if (argc < 4 || argc > 5) {
fprintf(stderr, "Usage: afpmounter name zone volume [volPassword]\n");
return;
return EXIT_FAILURE;
}
object = argv[1];
@ -52,13 +52,13 @@ int main(int argc, char **argv) {
zone = argv[2];
if (strlen(object) > ENTITY_FIELD_MAX || strlen(zone) > ENTITY_FIELD_MAX) {
fprintf(stderr, "Entity name too long (max 32 chars)\n");
return;
return EXIT_FAILURE;
}
count = strlen(argv[3]);
if (count > VOL_NAME_MAX) {
fprintf(stderr, "Volume name too long\n");
return;
return EXIT_FAILURE;
}
volName[0] = count;
strncpy(volName+1, argv[3], count);
@ -67,7 +67,7 @@ int main(int argc, char **argv) {
count = strlen(argv[4]);
if (count > VOL_PASSWORD_MAX) {
fprintf(stderr, "Volume password too long\n");
return;
return EXIT_FAILURE;
}
strncpy(volPassword, argv[4], count);
}
@ -104,12 +104,12 @@ int main(int argc, char **argv) {
atRetCode = _CALLAT(&lookupNameRec);
if (atRetCode != 0) {
fprintf(stderr, "NBP lookup error: %04x\n", lookupNameRec.result);
return;
return EXIT_FAILURE;
}
if (lookupNameRec.actualMatch == 0) {
fprintf(stderr, "The specified server could not be found\n");
return;
return EXIT_FAILURE;
}
#if 0
@ -154,7 +154,7 @@ int main(int argc, char **argv) {
fprintf(stderr, "Login failure: %04x\n", login2Rec.result);
if (login2Rec.result == pfiLoginContErr)
goto logout_and_exit;
return;
return EXIT_FAILURE;
}
mountVolRec.async = 0;
@ -171,7 +171,7 @@ int main(int argc, char **argv) {
}
/* success - leave the volume mounted */
return;
return EXIT_SUCCESS;
logout_and_exit:
logoutRec.async = 0;
@ -179,5 +179,5 @@ logout_and_exit:
logoutRec.sessRefID = login2Rec.sessRefID;
_CALLAT(&logoutRec);
return;
return EXIT_FAILURE;
}

View File

@ -24,7 +24,7 @@ int main(void)
i = _CALLAT(&listSessions2Rec);
if (i != 0) {
fprintf(stderr, "Error %04x\n", listSessions2Rec.result);
return;
return 1;
}
for (i = 0; i < listSessions2Rec.entriesRtn; i++) {