File: README.mac

package info (click to toggle)
secnet 0.6.8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: ansic: 15,234; python: 1,057; perl: 966; sh: 596; tcl: 484; java: 231; asm: 114; yacc: 89; php: 64; makefile: 48; awk: 40
file content (90 lines) | stat: -rw-r--r-- 3,078 bytes parent folder | download | duplicates (2)
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
How to install secnet on a Fink-equipped OS X system:
  - Install GMP:
    fink install gmp
  - Download and install ADNS:
    ./configure --disable-dynamic
    make
    sudo make install
  - Build secnet:
    ./configure
    make
    sudo make install
  - Install tuntap for OSX from http://tuntaposx.sourceforge.net/
  - Create /etc/secnet/{key,secnet.conf,sites.conf} as usual
  - If you don't want secnet 'always on', edit
    uk.org.greenend.secnet.plist and remove *both* these two lines:
        <key>RunAtLoad</key>
        <true/>
  - Create the 'secnet' user and install the job configuration:
    ./setup.mac.

To start secnet:
  sudo launchctl start uk.org.greenend.secnet

To stop secnet:
  sudo launchctl stop uk.org.greenend.secnet

To uninstall:
  sudo launchctl unload /Library/LaunchDaemons/uk.org.greenend.secnet.plist
  sudo rm -f /Library/LaunchDaemons/uk.org.greenend.secnet.plist

If you need to enable IP forwarding:
  sudo sysctl -w net.inet.ip.forwarding=1

(Note that on a Mac, you need to enable IP forwarding if you want to
route to addresses on one interface via another; i.e. if you expect to
be able to reach an address on en0 with a packet delivered through
tun0, IP forwarding must be turned on.)

How to import secnet into XCode 3.2:

- Set up build directories as follows:
    $ mkdir build/Debug build/Release
    $ cd build/Debug
    $ ~/src/secnet/configure CFLAGS="-g -O0"
    $ cd ../Release
    $ ~/src/secnet/configure
    $ cd ../..
  (Replace ~/src/secnet with the *absolute* path to your secnet tree -
  XCode cannot map the relative paths in errors to the source files
  otherwise.)
- Start XCode
- Menubar -> File -> New Project
  - Choose the Mac OS X -> Other -> External Build System template
  - Choose the *parent* of the secnet directory and call the project
    secnet
    - OK the overwrite (it won't overwrite anything that matters)
    - This creates 'build' and 'secnet.xcodeproj' directories in your
      secnet tree.
- Right-click Groups & Files -> secnet -> Add -> Existing files and
  select all the *.c, *.h, *.y and *.fl files.
  - Omit the following files:
    - *.yy.[ch]       \
    - *.tab.[ch]      | generated during build
    - version.c       |
    - config.h        /
    - snprintf.[ch]   - unnecessary on OSX
  - Sort by 'kind' may make this easier
  - Leave 'Copy items...' unchecked
  - Add To Targets should have 'secnet' checked
  - For conffile.fl, right click Get Info -> General, and set File
    Type to sourcecode.lex.
- Under Groups & Files -> secnet, select all source files and right
  click Get Info -> General, and set:
  - Tab Width to 8
  - Indent Width to 4
  - Check Editor uses tabs
- Double click click Groups & Files -> Targets secnet
  - Add '-C $TARGET_BUILD_DIR' to the start of the arguments.

You should now be able to build both debug and release configurations
using ⌘B.

Richard Kettlewell 2011-07-23


-- 
This file is part of secnet.
See LICENCE and this file CREDITS for full list of copyright holders.
SPDX-License-Identifier: GPL-3.0-or-later
There is NO WARRANTY.