chiark / gitweb /
Static buffers: Replace references to bufs[b]
[secnet] / README.mac
CommitLineData
19a171f1
RK
1How to install secnet on a Fink-equipped OS X system:
2 - Install GMP:
3 fink install gmp
4 - Download and install ADNS:
5 ./configure --disable-dynamic
6 make
7 sudo make install
8 - Build secnet:
44bdf5ac 9 ./configure
19a171f1
RK
10 make
11 sudo make install
12 - Install tuntap for OSX from http://tuntaposx.sourceforge.net/
13 - Create /etc/secnet/{key,secnet.conf,sites.conf} as usual
14 - If you don't want secnet 'always on', edit
15 uk.org.greenend.secnet.plist and remove *both* these two lines:
16 <key>RunAtLoad</key>
17 <true/>
18 - Create the 'secnet' user and install the job configuration:
19 ./setup.mac.
20
21To start secnet:
22 sudo launchctl start uk.org.greenend.secnet
23
24To stop secnet:
25 sudo launchctl stop uk.org.greenend.secnet
26
27To uninstall:
b953af83 28 sudo launchctl unload /Library/LaunchDaemons/uk.org.greenend.secnet.plist
19a171f1
RK
29 sudo rm -f /Library/LaunchDaemons/uk.org.greenend.secnet.plist
30
b953af83
RK
31If you need to enable IP forwarding:
32 sudo sysctl -w net.inet.ip.forwarding=1
33
34(Note that on a Mac, you need to enable IP forwarding if you want to
35route to addresses on one interface via another; i.e. if you expect to
36be able to reach an address on en0 with a packet delivered through
37tun0, IP forwarding must be turned on.)
38
cb14700a
RK
39How to import secnet into XCode 3.2:
40
41- Set up build directories as follows:
42 $ mkdir build/Debug build/Release
43 $ cd build/Debug
44 $ ~/src/secnet/configure CFLAGS="-g -O0"
45 $ cd ../Release
46 $ ~/src/secnet/configure
47 $ cd ../..
48 (Replace ~/src/secnet with the *absolute* path to your secnet tree -
49 XCode cannot map the relative paths in errors to the source files
50 otherwise.)
51- Start XCode
52- Menubar -> File -> New Project
53 - Choose the Mac OS X -> Other -> External Build System template
54 - Choose the *parent* of the secnet directory and call the project
55 secnet
56 - OK the overwrite (it won't overwrite anything that matters)
57 - This creates 'build' and 'secnet.xcodeproj' directories in your
58 secnet tree.
59- Right-click Groups & Files -> secnet -> Add -> Existing files and
60 select all the *.c, *.h, *.y and *.fl files.
61 - Omit the following files:
62 - *.yy.[ch] \
63 - *.tab.[ch] | generated during build
64 - version.c |
65 - config.h /
66 - snprintf.[ch] - unnecessary on OSX
67 - Sort by 'kind' may make this easier
68 - Leave 'Copy items...' unchecked
69 - Add To Targets should have 'secnet' checked
70 - For conffile.fl, right click Get Info -> General, and set File
71 Type to sourcecode.lex.
72- Under Groups & Files -> secnet, select all source files and right
73 click Get Info -> General, and set:
74 - Tab Width to 8
75 - Indent Width to 4
76 - Check Editor uses tabs
77- Double click click Groups & Files -> Targets secnet
78 - Add '-C $TARGET_BUILD_DIR' to the start of the arguments.
79
80You should now be able to build both debug and release configurations
81using ⌘B.
82
83Richard Kettlewell 2011-07-23