/
README.AppleTalk
239 lines (179 loc) · 9.1 KB
/
README.AppleTalk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
This is a README for the major platforms where Netatalk is in use.
Platforms Covered:
A. Linux
B. Solaris
C.I OpenBSD
C.II Other BSDs
D. Generic
----------------------------------------------------------------
A. Linux
We no longer include Linux kernel code with netatalk, since Linux
includes AppleTalk support.
Some Linux distributions ship with AppleTalk support out of the box
(e.g. Debian) others have the kernel module but with a blacklisting
in effect that has to be deactived before you can use it (e.g. Fedora.)
Netatalk supplies two different types of AFP servers and both
can run at the same time. Classic AFP requires afpd and
atalkd. AFP over TCP only requires afpd.
Classic AFP on GNU/Linux requires that CONFIG_ATALK is compiled
into the kernel or as a kernel module. To check to see if the kernel
has support for AppleTalk:
$> dmesg | grep Apple
This just parses the boot messages for any line containing
'Apple'.
$> lsmod | grep appletalk
This checks if the appletalk kernel module is presently loaded.
If you don't find it, you may have to compile a kernel and turn on
Appletalk in Networking options -> Appletalk DDP. You have an option
to install as a module or directly into the kernel.
Some default distribution kernels have already compiled Appletalk DDP
as a module, you may have to edit your /etc/modules.conf to include:
"alias net-pf-5 appletalk ".
Note: check your distribution documentation about editing
/etc/modules.conf.
For more complete information about the Linux kernel see the
Kernel-HOWTO:
http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
A note for RedHat users: You may need to install the glibc-devel
package to be able to compile Netatalk correctly.
----------------------------------------------------------------
B. SOLARIS
1. SELECT COMPILER. This distribution is configured to build with
gcc. It should also work with cc. At the present time only cc
v5.0 and gcc 3.1 and above can build the 64-bit kernel module.
1a. SELECT KERNEL TYPE. Edit sys/solaris/Makefile.kernel and set KCFLAGS
to include sparcv9 support if you run a 64-bit kernel, or leave it
commented out for a 32-bit kernel. Only UltraSPARC systems
running Solaris 7 and above support a 64-bit kernel. If you're
not sure what kernel you use, run "isainfo -v". You're running a
64-bit kernel if the result includes 64-bit (sparcv9), otherwize
it's 32-bit.
NOTE: If you want both the 32-bit and 64-bit kernel modules to be
installed, first compile and install the version appropriate to
the kernel that you're currently running, then make clean,
compile and install the other version.
2. EDIT NETCONFIG. Add the following line to /etc/netconfig:
ddp tpi_clts - appletalk ddp /dev/ddp -
This makes the socket library aware of the AppleTalk protocol
family.
3. INSTALL DRIVER. Since the STREAMS ddp driver must be installed as
root, we've separated that portion of the build. Type
make -f Makefile.kernel kinstall
to install the driver. This copies the driver and its config file
into /usr/kernel/drv and /usr/kernel/strmod, runs "add_drv ddp" to
make the kernel aware of the new driver, and adds an rc file to
/etc/rc?.d. Watch out for error messages after it runs add_drv.
If you see something like
devfsadm: driver failed to attach: ddp
Warning: Driver (ddp) successfully added to system but failed to attach
then recheck sys/solaris/Makefile.kernel and/or try a different
compiler.
4. ATALKD.CONF. Under Solaris, you must create atalkd.conf, since
Solaris provides no method for determining the names of the
available interfaces. It is sufficent to name the available
interfaces in atalkd.conf, one per line. E.g.
le0
on a line by itself on many Suns. hme0 on Ultras. See atalkd(8).
5. PRINTING. Netatalk can use any postscript printer that has been set
up for use by Solaris. If you haven't already set up a printer,
type admintool then select Browse --> Printers, and then Edit --> Add
and fill in the form for either a local or remote printer. If adding
a local printer, set the Printer Type to PostScript. Then find a
postscript file and test your printer from the command line. For
example if you created a printer called "fred" your print command
would be something like: lp -d fred some_file.ps
Once you have a printer that works under Solaris, you need to create
a papd.conf file. For example
MacLaserjet:\
:pr=|/usr/bin/lp -d fred:\
:op=nobody:\
:pd=/usr/local/etc/HPLJ_4M.PPD:
See doc/CONFIGURE for more information on papd.conf.
Once you have this set up, and assuming netatalk starts up after
/etc/rc2.d/S79atalk start
you should be able to see the printer from the Macintosh Chooser.
----------------------------------------------------------------
C.I OpenBSD
1. KERNEL SUPPORT. Note that kernel support for netatalk appears in
OpenBSD 2.2, or openbsd-current dated after Aug 1, 1997. But the
'comment out' character must be removed and the kernel must be
recompiled.
The kernel file that needs to be edited is usually located in:
/usr/src/sys/conf
Remove the first comment (#) from this line:
# option NETATALK # AppleTalk
Generally this is the GENERIC kernal. If you decide to rename
the kernel, don't forget to go to
/usr/src/sys/arch/<your arch>/conf/NEWNAME, and change the
../../../conf/GENERIC line to your NEWNAME. See
http://www.openbsd.org/faq/faq5.html for more information on
compiling a new kernel.
2. STARTING NETATALK. The rc scripts that come with openbsd to
start netatalk are specific to an older version of netatalk.
So, if you use the initscript provided in a current netatalk's
distrib/initscripts directory, you must either add the lines
from rc.atalk.bsd by hand into /etc/rc.local (or wherever you
want to launch the daemons from) or modify your /etc/rc.local
file to read:
(currently says)
# Netatalk stuff
if [ -f /etc/netatalk/rc.atalk ]; then
. /etc/netatlk/rc.atalk
fi
(change to)
# Netatalk stuff
if [ -f /etc/rc.atalk ]; then
. /etc/rc.atalk
fi
and copy netatalk/distrib/initscripts/rc.atalk.bsd to /etc/rc.atalk.
C.II Other BSDs
1. KERNEL SUPPORT. Note that kernel support for netatalk appears in
FreeBSD 2.2-current dated after 12 September 1996.
Add the line
options NETATALK
to the config file for your kernel. Rebuild and install your
kernel. Reboot.
----------------------------------------------------------------
D. Generic
(It's unknown how applicable this is compared to the current codebase)
The generic system profile is for use on systems that don't have native
appletalk support. For those systems, it should still be possible to get
the AFP/tcp portion of netatalk to still work.
To do that, you will need the following information:
1) Endian order: If your machine does not specify the
byte-order in netinet/in.h, you may need to modify
netatalk/endian.h.
2) Integer sizes: If your machine does not define intX_t and
u_intX_t, you will need to define them in
netatalk/endian.h. To ease matters, you can specify
_ISOC9X_SOURCE if you have inttypes.h, HAVE_64BIT_LONGS for
64 bit machines, or HAVE_32BIT_LONGS for 32 bit
machines. NOTE: you should only use HAVE_32/64BIT_LONGS on
machines that don't have a header file somewhere with the
integer sizes. If you have a file with all the relevant
bits, modify netatalk/endian.h to include it.
3) Quota/statfs information: You may be able to get away with
either BSD4_4 or __svr4__, but that's unlikely if your os
is some bizarre hybrid. If you don't have quota support,
just specify NO_QUOTA_SUPPORT. In addition, if you'll need
to specify the include file that gets statfs() (usually
either USE_VFS_H or USE_STATFS_H although BSD4_4 and
__svr4__ bring in a set of include files for that). Look at
etc/afpd/quota.c, unix.c, and unix.h for more information.
Finally, if you have a really old version of rquota, you
can define USE_OLD_RQUOTA as well.
4) path information for lock/spool/printer files. you'll need
to specify -D_PATH_LOCKDIR if include/atalk/paths.h doesn't
have the correct paths specified for printer info and lock
files.
Beyond that, you should make sure that your operating system looks and
smells like a Un*x POSIXy operating system. If your operating system
is peculiar, you may need to add in compatibility routines
(libatalk/compat, include/atalk/compat.h) to make it look more
like the others.
If you would like native AppleTalk support, you will need kernel support
for your operating system. Look at the Solaris STREAMS module if your
operating system supports that framework. Otherwise, look at the ddp
code in NetBSD if your operating system is BSDish in nature.
If your operating system looks different than these two cases,
you'll have to roll your own implementation.