media/mtransport/third_party/nrappkit/README

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 $Id: README,v 1.3 2007/11/21 00:09:10 adamcain Exp $ 
     3 nrappkit 1.0b2
     4 Copyright (C) 2006 Network Resonance, Inc.
     7 nrappkit is a toolkit for building standalone applications and
     8 appliances. It provides:
    10 - registry-based configuration (with change callbacks)
    11 - extensible command and configuration shell
    12 - extensible statistics system
    13 - configurable logging system
    14 - event and timer handling
    15 - generic plugin system
    16 - launcher daemon
    18 The contents of nrappkit were extracted from Network Resonance's
    19 product on the theory that they were generally useful for 
    20 application developers. 
    22 THIS PACKAGE DOES NOT GRANT A LICENSE OR RIGHT TO ANY OTHER NETWORK
    23 RESONANCE TECHNOLOGY OR SOFTWARE.
    27 BUILDING
    29 Builds are done semi-manually with port directories for each
    30 platform. There are pre-existing ports to FreeBSD, Linux (Ubuntu
    31 and Fedora Core), and Darwin (MacOSX). To build the system:
    33 	cd src/make/<platform>
    34 	gmake
    36 Some of the platforms come in several variants. Most notably,
    37 if a platform exists in "regular" and "-appliance" variant,
    38 this means that the regular variant just builds binaries intended
    39 to be run out of the make directory (for development) and the
    40 appliance variant is intended to be installed in a real system.
    42 By default we want to install things owned as user "pcecap".
    43 Either make this user or edit the Makefile to be a user you
    44 like (e.g., nobody).
    46 If you want to include the 'nrsh' command-line configuration
    47 tool in your build, you will need to make sure the line
    48   BUILD_NRSH=yes
    49 appears (uncommented-out) in your platform Makefile.  You will 
    50 also need to to build OpenSSL and libedit and point your nrappkit
    51 Makefile to the correct paths. You can obtain these packages at:
    52     openssl-0.9.7l
    53     http://www.openssl.org/source/openssl-0.9.7l.tar.gz
    55     libedit-20060829-2.9
    56     http://freshmeat.net/redir/editline/53029/url_tgz/libedit-20060829-2.9.tar.gz
    59 INSTALLING
    60 If you're doing an appliance as opposed to a development build,
    61 you'll want to install it. This is easy:
    63 	su
    64  	gmake install
    66 Most binaries and libraries ends up in /usr/local/pcecap while
    67 data files are in /var/pcecap. However, you can tweak
    68 this in the Makefile. By default it's all owned by pcecap.
    70 To ensure that dynamic libraries are loaded correctly at runtime,
    71 you'd want to make sure the right directory is included in your
    72 LD_LIBRARY_PATH or via ldconfig.
    75 QUICK TOUR
    76 The build makes the following binaries that you may find useful:
    78 - captured    -- the launcher (the name is historical)
    79 - registryd   -- the registry daemon
    80 - nrregctl    -- a registry control program
    81 - nrsh        -- the command shell (when included in build)
    82 - nrstatsctl  -- the stats control program
    84 Using the nrcapctl script is the easiest way to interact with
    85 the applications. It is run as "nrcapctl <command>" with the
    86 following commands recognized:
    88   startup            -- fires up captured, which in turn runs and
    89                         initializes the registry
    91   shutdown           -- kills captured and its child processes
    93   status             -- prints the running status of captured in
    94                         human-readable form
    96   stat               -- prints the running status of captured in
    97                         a form easily parsed by scripts
    99   enable             -- alters the mode.txt file so that captured
   100                         starts 
   102   disable            -- alters the mode.txt file so that captured
   103                         does not start
   105   clear-statistics   -- equivalent to "nrstatsctl -z" (requires
   106                         that captured be running)
   108 Note: the "start" and "stop" nrcapctl commands do nothing as they
   109 use components not included in nrappkit. However the associated
   110 script logic in nrcapctl demonstrates how additional applications
   111 might be launched using nrcapctl and particular registry settings.
   114 EXTENDING
   115 When things come up, they're pretty dumb. You'll probably want to
   116 write your own applications, otherwise it's not clear why you're doing
   117 this. The general idea is that you write your application using the
   118 facilities that nrappkit provides and then write plugins to the
   119 nrappkit components as necessary. So, for example, say you want
   120 to write a network daemon. You would:
   122  - configure the launcher to launch your daemon (using the registry,
   123    naturally).
   124  - make calls to the registry to get configuration data
   125  - make calls to the logging system to log data
   126  - implement a stats module to record statistics
   127  - write a plugin to nrsh to let people configure your parameters
   129 Examples of some of this stuff can be found in examples/demo_plugin.
   130 Otherwise, read the source. More documentation will be on the way,
   131 hopefully.

mercurial