"Fossies" - the Fresh Open Source Software Archive

Member "tor-0.4.1.6/src/core/or/or_sys.c" (10 Jun 2019, 925 Bytes) of package /linux/misc/tor-0.4.1.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "or_sys.c" see the Fossies "Dox" file reference documentation.

    1 /* Copyright (c) 2001 Matej Pfajfar.
    2  * Copyright (c) 2001-2004, Roger Dingledine.
    3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
    4  * Copyright (c) 2007-2019, The Tor Project, Inc. */
    5 /* See LICENSE for licensing information */
    6 
    7 /**
    8  * @file or_sys.c
    9  * @brief Subsystem definitions for OR module.
   10  **/
   11 
   12 #include "orconfig.h"
   13 #include "core/or/or.h"
   14 #include "core/or/or_periodic.h"
   15 #include "core/or/or_sys.h"
   16 #include "core/or/policies.h"
   17 #include "core/or/protover.h"
   18 #include "core/or/versions.h"
   19 
   20 #include "lib/subsys/subsys.h"
   21 
   22 static int
   23 subsys_or_initialize(void)
   24 {
   25   or_register_periodic_events();
   26   return 0;
   27 }
   28 
   29 static void
   30 subsys_or_shutdown(void)
   31 {
   32   protover_free_all();
   33   protover_summary_cache_free_all();
   34   policies_free_all();
   35 }
   36 
   37 const struct subsys_fns_t sys_or = {
   38   .name = "or",
   39   .supported = true,
   40   .level = 20,
   41   .initialize = subsys_or_initialize,
   42   .shutdown = subsys_or_shutdown,
   43 };